/** * Type utilities for namespace implementations. * These types bridge the gap between our ergonomic namespace APIs * and the OpenAPI-generated generic types. */ /** * JSON:API page parameter structure */ export type JsonApiPageParams = { number?: number; size?: number; [key: string]: unknown; }; /** * JSON:API query parameters with pagination */ export type JsonApiQueryWithPage = { query: { page?: JsonApiPageParams; [key: string]: unknown; }; [key: string]: unknown; }; /** * JSON:API data envelope for POST/PATCH requests */ export type JsonApiDataEnvelope = { data: { type: T; attributes: Record; [key: string]: unknown; }; [key: string]: unknown; }; /** * JSON:API body parameter */ export type JsonApiBody = { body: JsonApiDataEnvelope; [key: string]: unknown; }; /** * Empty body (for endpoints that require a body but no data) */ export type EmptyBody = { body: Record; [key: string]: unknown; }; /** * Path parameters */ export type PathParams = { path: Record; [key: string]: unknown; }; /** * Query parameter dictionary (generic index signature) */ export type QueryParamDict = { [key: string]: unknown; }; /** * File upload body (File, Blob, or FormData) * This is cast as unknown because the OpenAPI generated types expect JSON:API structure, * but file uploads use multipart/form-data or binary content. */ export type FileUploadBody = { body: File | Blob | FormData; [key: string]: unknown; }; /** * Helper to construct query params with page */ export declare function buildPageQuery(page?: number, pageSize?: number): JsonApiQueryWithPage; /** * Helper to construct JSON:API body */ export declare function buildJsonApiBody(type: T, attributes: Record): JsonApiBody; //# sourceMappingURL=namespace-types.d.ts.map