Interface: Endpoint
Defined in: src/endpoint.ts:6
A single API endpoint.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
errors? | readonly number[] | The HTTP error status codes. | src/endpoint.ts:8 |
method | EndpointMethod | The HTTP method. | src/endpoint.ts:10 |
path | string | The URL path (e.g. /invoices/:id). | src/endpoint.ts:12 |
pathParams? | ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | The Zod schema for path parameters. | src/endpoint.ts:14 |
request? | { body?: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; query?: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; } | The request schemas. | src/endpoint.ts:16 |
request.body? | ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | The Zod schema for the request body. | src/endpoint.ts:18 |
request.query? | ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | The Zod schema for query parameters. | src/endpoint.ts:20 |
response? | { body: ZodType; } | The response schemas. | src/endpoint.ts:23 |
response.body | ZodType | The Zod schema for the response body. | src/endpoint.ts:25 |