import type { LLMProviders } from '../../LLMService.typedefs'; import type { LLMSchemaInterface, ParseResult, InferSchema } from '../../utilities/schema/LLMSchema.typedefs'; /** * Concrete implementation of schema builder using Zod as the underlying validator. * This implementation can be replaced with another validator without changing the public API. */ export declare class LLMSchema implements LLMSchemaInterface { private readonly zodSchema; private constructor(); /** * Creates a string schema */ static string(): LLMSchemaInterface; /** * Creates a number schema */ static number(): LLMSchemaInterface; /** * Creates a boolean schema */ static boolean(): LLMSchemaInterface; /** * Creates an object schema */ static object>(shape: T): LLMSchemaInterface<{ [K in keyof T]: InferSchema; }>; /** * Creates an array schema */ static array(itemSchema: LLMSchemaInterface): LLMSchemaInterface; /** * Creates an enum schema */ static enum(values: T): LLMSchemaInterface; /** * Creates a union schema */ static union(schemas: T): LLMSchemaInterface>; /** * Creates a literal schema */ static literal(value: T): LLMSchemaInterface; /** * Makes the schema optional * In Zod v4, this also makes the field nullable to support provider adapters * that convert optional fields to required+nullable (e.g., OpenAI structured output) */ optional(): LLMSchemaInterface; /** * Makes the schema nullable */ nullable(): LLMSchemaInterface; /** * Sets a default value */ default(value: any): LLMSchemaInterface; /** * Adds a description (for documentation) */ describe(description: string): LLMSchemaInterface; /** * Sets minimum string length */ min(length: number): LLMSchemaInterface; /** * Sets maximum string length */ max(length: number): LLMSchemaInterface; /** * Validates as email */ email(): LLMSchemaInterface; /** * Validates as URL */ url(): LLMSchemaInterface; /** * Validates as UUID */ uuid(): LLMSchemaInterface; /** * Validates as integer */ int(): LLMSchemaInterface; /** * Validates as positive number */ positive(): LLMSchemaInterface; /** * Validates as negative number */ negative(): LLMSchemaInterface; /** * Validates as non-positive number */ nonpositive(): LLMSchemaInterface; /** * Validates as non-negative number */ nonnegative(): LLMSchemaInterface; /** * @internal * Parses data using the schema */ _parse(data: unknown): ParseResult; /** * @internal * Converts schema to provider-specific format using the adapter registry */ _toProviderSchema(provider: LLMProviders): any; }