import { SchemaModelType } from "./SchemaModelType.js"; import * as z$1 from "zod"; //#region src/ZodSchemaType.d.ts /** * Options for ZodSchemaType wrapper. */ interface ZodSchemaTypeOptions { /** Name for GraphQL/JSON Schema representation */ name?: string; /** Description for documentation */ description?: string; } /** * Wrapper to use a raw Zod schema as a SchemaType. * Enables schema definition directly with Zod for maximum flexibility. * * @template T - The Zod schema type being wrapped * * @example * ```typescript * const UserSchema = fromZod( * z.object({ * id: z.string().uuid(), * name: z.string().min(1), * email: z.string().email(), * }), * { name: 'User' } * ); * * // Use in SchemaModel * const CreateUserInput = new SchemaModel({ * name: 'CreateUserInput', * fields: { * user: { type: UserSchema, isOptional: false }, * }, * }); * ``` */ declare class ZodSchemaType implements SchemaModelType> { private readonly schema; private readonly options; constructor(schema: T, options?: ZodSchemaTypeOptions); /** * Return the wrapped Zod schema. */ getZod(): z$1.ZodType>; /** * Return JSON Schema representation using Zod's toJSONSchema. */ getJsonSchema(): unknown; /** * Return GraphQL type info. * For complex Zod types, defaults to JSON scalar. */ getPothos(): { type: string; name?: string; }; /** * Get the configured name for this schema. */ getName(): string | undefined; /** * Get the configured description for this schema. */ getDescription(): string | undefined; } /** * Helper to wrap a raw Zod schema as a SchemaType. * * @param schema - The Zod schema to wrap * @param options - Optional configuration * @returns A SchemaType-compatible wrapper * * @example * ```typescript * const AddressSchema = fromZod( * z.object({ * street: z.string(), * city: z.string(), * country: z.string(), * }), * { name: 'Address', description: 'Physical address' } * ); * ``` */ declare const fromZod: (schema: T, options?: ZodSchemaTypeOptions) => ZodSchemaType; //#endregion export { ZodSchemaType, ZodSchemaTypeOptions, fromZod }; //# sourceMappingURL=ZodSchemaType.d.ts.map