/** * Schema Validator * * Task validation uses drizzle-zod schemas (src/store/validation-schemas.ts) * as the single source of truth for field-level constraints. * * AJV/JSON Schema validation is retained for the `config` type and backward- * compatible `validateSchema()` calls with raw data. */ /** * Validation result */ export interface ValidationResult { valid: boolean; errors: ValidationError[]; } /** * Individual validation error */ export interface ValidationError { path: string; message: string; keyword: string; params: Record; } /** * Schema types that can be validated via AJV/JSON Schema. * SQLite-backed types (todo, archive, log, sessions) use drizzle-zod validation instead. */ export type SchemaType = 'config'; /** * Validate data against a CLEO schema * * @param schemaType - Which schema to validate against * @param data - The data to validate * @returns Validation result with errors if invalid */ export declare function validateSchema(schemaType: SchemaType, data: unknown): ValidationResult; /** * Validate a single task object against the drizzle-zod insert schema. * Uses drizzle-derived Zod schemas as the single source of truth for * field-level constraints (pattern, length, enum). * * @param task - Task object to validate * @returns Validation result */ export declare function validateTask(task: unknown): ValidationResult; /** * Clear the schema cache (useful for testing) */ export declare function clearSchemaCache(): void; //# sourceMappingURL=schema-validator.d.ts.map