A type representing an API endpoint with method, path, request body, path parameters, query parameters, and response type.
type GetUserEndpoint = Endpoint<{ method: "GET"; path: "/users/:id"; response: User; pathParams: { id: string }; query: { includePosts: boolean };}>; Copy
type GetUserEndpoint = Endpoint<{ method: "GET"; path: "/users/:id"; response: User; pathParams: { id: string }; query: { includePosts: boolean };}>;
A type representing an API endpoint with method, path, request body, path parameters, query parameters, and response type.
Example