import { z } from "@hono/zod-openapi";

//#region src/utils/schema-conversion.d.ts

/**
 * Converts JSON Schema to Zod schema at runtime.
 *
 * This is useful for dynamically creating Zod schemas from JSON Schema definitions,
 * such as when using AI SDK's generateObject/streamObject with data component props.
 *
 * Note: Uses z.string() as fallback for unknown types to ensure Anthropic compatibility
 * (Anthropic requires explicit types - z.any()/z.unknown() produce invalid JSON Schema).
 */
declare function jsonSchemaToZod(jsonSchema: any): z.ZodType<any>;
/**
 * Utility function for converting Zod schemas to JSON Schema
 * Uses Zod's built-in toJSONSchema method
 */
declare function convertZodToJsonSchema(zodSchema: any): Record<string, unknown>;
/**
 * 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: <T extends z.ZodTypeAny>(schema: T) => T;
/**
 * Convert Zod schema to JSON Schema while preserving preview metadata
 */
declare function convertZodToJsonSchemaWithPreview(zodSchema: z.ZodTypeAny): Record<string, unknown>;
/**
 * Type guard to check if a value is a Zod schema
 */
declare function isZodSchema(value: any): value is z.ZodObject<any>;
/**
 * Extract preview fields from either JSON Schema or Zod schema
 */
declare function extractPreviewFields(schema: any): string[];
//#endregion
export { jsonSchemaToZod as a, isZodSchema as i, convertZodToJsonSchemaWithPreview as n, preview as o, extractPreviewFields as r, convertZodToJsonSchema as t };
//# sourceMappingURL=schema-conversion.d.ts.map