import { z } from "@hono/zod-openapi"; //#region src/utils/schema-conversion.d.ts /** * Utility function for converting Zod schemas to JSON Schema * Uses Zod's built-in toJSONSchema method */ declare function convertZodToJsonSchema(zodSchema: any): Record; /** * Simple helper to mark a Zod schema field as a preview field * Adds metadata to the schema definition without modifying Zod's core */ declare const preview: (schema: T) => T; /** * Convert Zod schema to JSON Schema while preserving preview metadata */ declare function convertZodToJsonSchemaWithPreview(zodSchema: z.ZodTypeAny): Record; /** * Type guard to check if a value is a Zod schema */ declare function isZodSchema(value: any): value is z.ZodObject; /** * Strips JSON Schema numeric constraints that are not supported by all LLM providers. * * Anthropic structured output rejects `minimum`, `maximum`, `exclusiveMinimum`, * `exclusiveMaximum`, and `multipleOf` on `number`/`integer` types. * Applied recursively to handle nested objects and arrays. */ declare function stripUnsupportedConstraints | null | undefined>(schema: T): T; /** * Makes all properties required in an object schema, wrapping originally-optional * fields as `{ anyOf: [, { type: 'null' }] }`. * * OpenAI strict-mode structured output requires every key in `properties` to also * appear in `required`. Applied recursively to handle nested objects and arrays. */ declare function makeAllPropertiesRequired | null | undefined>(schema: T): T; /** * Normalizes a data component JSON Schema for cross-provider LLM compatibility. * * Applies two transformations in order: * 1. `stripUnsupportedConstraints` — removes `minimum`/`maximum`/etc. from numbers * (Anthropic structured output rejects these) * 2. `makeAllPropertiesRequired` — ensures every property appears in `required`, * wrapping optional fields as nullable (OpenAI strict-mode requires this) */ declare function normalizeDataComponentSchema | null | undefined>(schema: T): T; /** * Extract preview fields from either JSON Schema or Zod schema */ declare function extractPreviewFields(schema: any): string[]; //#endregion export { convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, extractPreviewFields, isZodSchema, makeAllPropertiesRequired, normalizeDataComponentSchema, preview, stripUnsupportedConstraints };