import type { ColumnKind } from './coercion-plugin.js'; import { type ZodFormat } from './zod-codegen.js'; type Classification = 'public' | 'private' | 'pii' | 'secret'; type AnonymizeStrategy = 'fake:email' | 'fake:name' | 'hash' | 'keep' | null; export interface ColAnnotation { /** Column kind override: `date`, `bool`, `json`, or `uuid`. */ kind?: ColumnKind; /** TypeScript type string that overrides the inferred column type, e.g. `string[]`. */ tsType?: string; /** * Zod string-format validator (`email`, `url`, …). Refines the zod schema only; * the TypeScript type stays `string`. Applied by the codegen only when the * column's resolved type is plain `string`. */ format?: ZodFormat; classification?: Classification; anonymize?: AnonymizeStrategy; } /** Per-table, per-column annotation map sourced from `db/annotations.ts`. */ export type AnnotationMap = Record>; /** * Warn-only naming heuristic. We no longer *infer* a column's kind from its * name (it produced wrong types — e.g. SQLite stores `*_at` as ISO TEXT, not a * `Date`). Instead the codegen warns when a column name looks like it wants a * `kind` but none is declared in `db/annotations.ts`, so the developer can opt * in explicitly. Returns the *suggested* kind, or null. */ export declare function nameSuggestsKind(colName: string): ColumnKind | null; /** * Load annotations from the `db/annotations.gen.json` sidecar, which is * compiled from the developer-authored `db/annotations.ts` (`DbClassificationMap`) * by `syncClassifications`. This is the single source of column classification * and type-override information — there is no SQL-comment fallback. * * The authored `ColumnEntry` shape is: * { security?, classification?: , kind?, tsType?, description? } * where `security` is the privacy level and `classification` is the anonymize * strategy. Returns `{}` if the sidecar doesn't exist yet (first migrate run, * before it has been generated). */ export declare function loadAnnotations(rootDir: string): AnnotationMap; export {};