import type { ApplogValue } from '../../applog/datom-types.ts'; import type { ISchemaAdapter } from '../types.ts'; import type { ZodObject, ZodTypeAny } from 'zod'; /** * Create a schema adapter from a Zod object schema. * * Usage: * ```ts * import { z } from 'zod' * import { createZodAdapter } from '@wovin/core/viewmodel/adapters/zod' * * const MySchema = z.object({ * name: z.string(), * age: z.number().optional(), * }) * * const adapter = createZodAdapter(MySchema, 'myEntity') * ``` * * The type parameter `T` is the inferred type of the schema. */ export declare function createZodAdapter = Record>(zodSchema: ZodObject>, entityPrefix: string, options?: { /** Override at-paths for specific attributes */ atOverrides?: Record; /** Default values */ defaults?: Partial; /** Property name to at-path mapping function */ toAtPath?: (entityPrefix: string, attrName: string) => string; }): ISchemaAdapter; //# sourceMappingURL=zod.d.ts.map