import type { RouteErrorDef } from './types'; /** Builtin error codes — always on every route contract; never declared per route. */ export declare const BUILTIN_ERROR: { readonly VALIDATION_ERROR: "VALIDATION_ERROR"; readonly UNAUTHORIZED: "UNAUTHORIZED"; readonly INTERNAL_ERROR: "INTERNAL_ERROR"; readonly ROUTE_NOT_FOUND: "ROUTE_NOT_FOUND"; readonly NOT_FOUND: "NOT_FOUND"; readonly FORBIDDEN: "FORBIDDEN"; readonly TOO_MANY_REQUESTS: "TOO_MANY_REQUESTS"; readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE"; }; export type BuiltinErrorCode = typeof BUILTIN_ERROR[keyof typeof BUILTIN_ERROR]; /** Builtin codes handlers throw via {@link errors} / {@link err} — subset of {@link BUILTIN_ERROR}. */ export type ThrowableBuiltinCode = typeof BUILTIN_ERROR.NOT_FOUND | typeof BUILTIN_ERROR.FORBIDDEN | typeof BUILTIN_ERROR.TOO_MANY_REQUESTS | typeof BUILTIN_ERROR.SERVICE_UNAVAILABLE; export type OptionalBuiltinContext = { message?: string; description?: string; }; export declare const builtInErrors: { NOT_FOUND: { status: number; data: import("runtyp").Pred<{ description?: string | undefined; message?: string | undefined; } | undefined>; }; FORBIDDEN: { status: number; data: import("runtyp").Pred<{ description?: string | undefined; message?: string | undefined; } | undefined>; }; TOO_MANY_REQUESTS: { status: number; data: import("runtyp").Pred<{ title?: string | undefined; message?: string | undefined; } | undefined>; }; SERVICE_UNAVAILABLE: { status: number; data: import("runtyp").Pred<{ description?: string | undefined; message?: string | undefined; } | undefined>; }; }; /** Builtin error defs merged onto every route at route time. */ export declare const builtInErrorDefs: Record; export declare function isThrowableBuiltinCode(code: string): code is ThrowableBuiltinCode; export declare function isBuiltinErrorCode(code: string): code is BuiltinErrorCode; /** OpenAPI responses for mount/router-owned builtin errors (not handler throwables). */ export declare function openApiMountBuiltinErrorResponses(options?: { includeUnauthorized?: boolean; }): Record; export declare function mergeOpenApiErrorResponses(mountBuiltin: Record, throwableAndDomain: Record): Record;