import { z } from 'zod'; import type { EponymeSchema } from '../types/index.js'; import { type ValidationErrors, type ValidationMode } from './validate-eponyme-data.js'; /** * Exposes the Eponyme rules as a standard zod schema, so the same validation runs server-side on write and * client-side on every keystroke. */ export type EponymeZodSchema = z.ZodType>; /** Cached per (schema, mode) pair: the client rebuilds nothing while typing. */ export declare function buildEponymeSchema(schema: EponymeSchema, mode?: ValidationMode): EponymeZodSchema; /** Same shape as a patch validation, for validating a partial payload. */ export declare function buildEponymePatchSchema(schema: EponymeSchema, mode?: ValidationMode): EponymeZodSchema; /** Turns a zod error back into the `{ path: messages }` shape the API and the editor use. */ export declare function zodErrorToValidationErrors(error: z.ZodError): ValidationErrors; /** Convenience wrapper: parse and get errors keyed by field path. */ export declare function validateWithSchema(schema: EponymeSchema, data: unknown, mode?: ValidationMode): ValidationErrors;