type ValidationType = 'string' | 'number' | 'boolean' | 'array' | 'object' | 'date' | 'enum'; interface ValidationRule { type: ValidationType; required?: boolean; minLength?: number; maxLength?: number; pattern?: RegExp; minValue?: number; maxValue?: number; enumValues?: (string | number)[]; items?: ValidationRule; properties?: Record; } interface ValidationSchema { [key: string]: ValidationRule; } export interface ValidationResult { valid: boolean; error?: string; /** * Argument keys the caller supplied that this schema does not know. * * They are NOT rejected — an unknown key has never been fatal here and making * it so would break existing callers. But it must be *said*: an argument that * is silently dropped returns a success for a call that did less than it was * asked, and the caller has no way to tell the difference. Handlers surface * this alongside their own result. */ ignored?: string[]; } export declare function validate(args: any, schema: ValidationSchema): ValidationResult; export declare const ValidationSchemas: { stringArray: (minLength?: number) => ValidationRule; entityArray: () => ValidationRule; relationArray: () => ValidationRule; isoDate: () => ValidationRule; nonEmptyString: () => ValidationRule; }; export {};