import { z } from '@hono/zod-openapi'; import type { TIdSchemaType } from './constants'; /** * The error RESPONSE for OpenAPI docs - here, beside the REST layer that already needs `@hono/zod-openapi`. * Named, so every route's `4XX` and `5XX` reference one `ErrorResponse` component. */ export declare const ErrorSchema: z.ZodObject<{ statusCode: z.ZodOptional; message: z.ZodString; normalized: z.ZodOptional; }, z.core.$strip>>; extra: z.ZodOptional>; requestId: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; export type TErrorResponse = z.infer; export declare const idParamsSchema: (opts?: { idType: TIdSchemaType; }) => z.ZodObject<{ id: z.ZodNumber; }, z.core.$strip> | z.ZodObject<{ id: z.ZodString; }, z.core.$strip>; export declare const jsonContent: (opts: { schema: T; description: string; required?: boolean; }) => { description: string; content: { 'application/json': { schema: T; }; }; required: boolean | undefined; }; /** The JSON error body of a route, under `4XX` and `5XX` - the range keys OpenAPI accepts. */ export declare const errorResponses: () => { '4XX': { description: string; content: { 'application/json': { schema: z.ZodObject<{ statusCode: z.ZodOptional; message: z.ZodString; normalized: z.ZodOptional; }, z.core.$strip>>; extra: z.ZodOptional>; requestId: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; }; }; required: boolean | undefined; }; '5XX': { description: string; content: { 'application/json': { schema: z.ZodObject<{ statusCode: z.ZodOptional; message: z.ZodString; normalized: z.ZodOptional; }, z.core.$strip>>; extra: z.ZodOptional>; requestId: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; }; }; required: boolean | undefined; }; }; /** OpenAPI Header Object format */ type THeaderObject = { description?: string; schema: { type: string; examples?: Array; }; }; /** Map of header names to Header Objects */ type TResponseHeaders = Record; type TJsonResponseOpts = { schema: T; description?: string; required?: boolean; headers?: H; }; export declare const jsonResponse: (opts: TJsonResponseOpts) => { '4XX': { description: string; content: { 'application/json': { schema: z.ZodObject<{ statusCode: z.ZodOptional; message: z.ZodString; normalized: z.ZodOptional; }, z.core.$strip>>; extra: z.ZodOptional>; requestId: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; }; }; required: boolean | undefined; }; '5XX': { description: string; content: { 'application/json': { schema: z.ZodObject<{ statusCode: z.ZodOptional; message: z.ZodString; normalized: z.ZodOptional; }, z.core.$strip>>; extra: z.ZodOptional>; requestId: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; }; }; required: boolean | undefined; }; 200: { description: string; content: { 'application/json': { schema: ContentSchema; }; }; required: boolean | undefined; } | { headers: NonNullable; description: string; content: { 'application/json': { schema: ContentSchema; }; }; required: boolean | undefined; }; }; export {}; //# sourceMappingURL=schemas.d.ts.map