/** Route schema: a valibot schema or raw JSON Schema. */ export type SchemaSource = ValibotSchema | JsonSchemaObject; /** The minimal valibot schema shape we detect at runtime. */ export interface ValibotSchema { readonly '~standard'?: unknown; readonly kind?: string; readonly '~run'?: unknown; } /** The slice of JSON Schema we care about (everything else is left alone). */ export interface JsonSchemaObject { properties?: Record; [key: string]: unknown; } /** A single validation problem in the `400` response format (§6b). */ export interface ValidationIssue { in: IssueLocation; path: string; message: string; code: string; } /** Where exactly the mismatch happened. */ export type IssueLocation = 'body' | 'query' | 'params'; /** The valibot issue shape we rely on. */ interface ValibotIssue { path?: ReadonlyArray<{ key?: unknown; }>; message: string; type?: string; } /** The result of valibot's `safeParse`. */ interface ValibotParseResult { success: boolean; output?: unknown; issues?: ReadonlyArray; } /** Load the valibot dependencies. Called from `listen()` when schemas are present. */ export declare function loadSchemaDeps(): Promise; /** Is this a valibot schema? (Standard Schema / valibot's internal markers). */ export declare function isValibot(s: unknown): s is ValibotSchema; /** Schema → JSON Schema string (the structural part, for Rust). */ export declare function toJsonSchemaString(schema: SchemaSource | null | undefined): string | undefined; /** The set of top-level property names (used for response stripping). */ export declare function topProps(schema: SchemaSource | null | undefined): Set | null; /** valibot safeParse (for transform/refine during the preValidation stage). */ export declare function valibotSafeParse(schema: ValibotSchema, data: unknown): ValibotParseResult; /** valibot issues → a machine-readable list `[{ in, path, message, code }]`. */ export declare function valibotIssues(issues: ReadonlyArray, location: IssueLocation): ValidationIssue[]; export {}; //# sourceMappingURL=schema.d.ts.map