A typed API contract with one level of grouping.
Each key is a group name and each value is an ApiGroup — a record of named endpoints.
const contract: ApiContract = { todos: { list: todosResource.get(), create: todosResource.post() }, auth: { login: endpoint.post('/api/auth/login') },}; Copy
const contract: ApiContract = { todos: { list: todosResource.get(), create: todosResource.post() }, auth: { login: endpoint.post('/api/auth/login') },};
A typed API contract with one level of grouping.
Each key is a group name and each value is an ApiGroup — a record of named endpoints.