/** * Canonical map of `format` tokens (authored in `db/annotations.ts`) to the zod * expression they emit. These are all *string* refinements — they do not change * the column's TypeScript type (it stays `string`), only the runtime validator. * This is the single source of truth: `annotation-parser` imports it to validate * authored values and `db-codegen` imports the key list to emit the `format` * union in `ColumnEntry`. All confirmed present in zod 4. */ export declare const ZOD_FORMATS: { readonly email: "z.email()"; readonly url: "z.url()"; readonly emoji: "z.emoji()"; readonly e164: "z.e164()"; readonly jwt: "z.jwt()"; readonly cuid: "z.cuid()"; readonly cuid2: "z.cuid2()"; readonly ulid: "z.ulid()"; readonly nanoid: "z.nanoid()"; readonly base64: "z.base64()"; readonly base64url: "z.base64url()"; readonly ipv4: "z.ipv4()"; readonly ipv6: "z.ipv6()"; readonly cidrv4: "z.cidrv4()"; readonly cidrv6: "z.cidrv6()"; readonly isoDate: "z.iso.date()"; readonly isoTime: "z.iso.time()"; readonly isoDatetime: "z.iso.datetime()"; readonly isoDuration: "z.iso.duration()"; }; export type ZodFormat = keyof typeof ZOD_FORMATS; export interface ZodCodegenOptions { schemaFile: string; outFile: string; /** * Per-interface, per-field `format` overrides. Keyed by the *interface* name * (PascalCase, as it appears in `schema.gen.ts`) and the *field* name (camelCase), * matching how `parseTables` reads the schema. Computed by `db-codegen` (which * owns the snake→Pascal/camel name mapping) so this emitter stays a dumb * string→zod translator. */ formats?: Record>; } export interface ZodCodegenResult { outFile: string; written: boolean; tables: string[]; } export declare function generateZodTypes(options: ZodCodegenOptions): ZodCodegenResult;