/**
 * Validator
 * Schema-based input validation with fluent API matching QueryBuilder style
 * Sealed namespace pattern - all exports through Validator namespace
 */
export type Rule = 'required' | 'email' | 'string' | 'number' | 'boolean' | 'array' | 'integer' | 'min' | 'max' | 'minLength' | 'maxLength' | 'regex' | 'in' | 'custom' | 'alphanumeric' | 'uuid' | 'token' | 'ipAddress' | 'positiveNumber' | 'digits' | 'decimal' | 'url' | 'phone' | 'date';
export interface ValidationRule {
    rule: Rule;
    value?: unknown;
    message?: string;
}
export type CustomValidatorFn = ((value: unknown) => boolean) | ((value: unknown, data: Record<string, unknown>) => boolean);
export interface ISchemaBase<TReturn> {
    required(field: string, message?: string): TReturn;
    string(field: string, message?: string): TReturn;
    number(field: string, message?: string): TReturn;
    integer(field: string, message?: string): TReturn;
    boolean(field: string, message?: string): TReturn;
    array(field: string, message?: string): TReturn;
    email(field: string, message?: string): TReturn;
    min(field: string, value: number, message?: string): TReturn;
    max(field: string, value: number, message?: string): TReturn;
    minLength(field: string, value: number, message?: string): TReturn;
    maxLength(field: string, value: number, message?: string): TReturn;
    regex(field: string, pattern: RegExp, message?: string): TReturn;
    in(field: string, values: unknown[], message?: string): TReturn;
    custom(field: string, validator: CustomValidatorFn, message?: string): TReturn;
    alphanumeric(field: string, message?: string): TReturn;
    uuid(field: string, message?: string): TReturn;
    token(field: string, message?: string): TReturn;
    ipAddress(field: string, message?: string): TReturn;
    positiveNumber(field: string, message?: string): TReturn;
    digits(field: string, message?: string): TReturn;
    decimal(field: string, message?: string): TReturn;
    url(field: string, message?: string): TReturn;
    phone(field: string, message?: string): TReturn;
    date(field: string, message?: string): TReturn;
    getRules(): Map<string, ValidationRule[]>;
}
export type ISchema = ISchemaBase<ISchema>;
export type TypedSchema<T> = ISchemaBase<TypedSchema<T>> & {
    readonly __type?: T;
};
export type InferSchema<TSchema> = TSchema extends {
    readonly __type?: infer T;
} ? unknown extends T ? never : T : never;
export interface SchemaType {
    create(): ISchema;
}
/**
 * Schema builder for defining validation rules
 * Sealed namespace for immutability
 */
export declare const Schema: Readonly<{
    /**
     * Create a new schema instance
     */
    create(): ISchema;
    /**
     * Create a schema instance carrying a declared TypeScript shape.
     * This enables schema-inferred request typing when paired with validation middleware.
     */
    typed<T>(): TypedSchema<T>;
}>;
type RuleStringInput = string | string[];
export type RuleStringMap = Record<string, RuleStringInput>;
/**
 * Validator validates data against a schema
 */
export declare const Validator: Readonly<{
    Schema: Readonly<{
        /**
         * Create a new schema instance
         */
        create(): ISchema;
        /**
         * Create a schema instance carrying a declared TypeScript shape.
         * This enables schema-inferred request typing when paired with validation middleware.
         */
        typed<T>(): TypedSchema<T>;
    }>;
    validate: (data: Record<string, unknown>, schema: ISchema) => Record<string, unknown>;
    isValid: (data: Record<string, unknown>, schema: ISchema) => boolean;
    rulesToSchema: (rules: RuleStringMap) => ISchema;
    validateRules: (data: Record<string, unknown>, rules: RuleStringMap) => Record<string, unknown>;
    isValidRules: (data: Record<string, unknown>, rules: RuleStringMap) => boolean;
}>;
/**
 * Export ValidationError for use in tests and applications
 */
export { ValidationError } from './ValidationError';
export type { FieldError } from './ValidationError';
//# sourceMappingURL=Validator.d.ts.map