import type { ValidationError } from '../types/base-types';
export interface ValidationResult<T = unknown> {
    success: boolean;
    data?: T | undefined;
    error?: ValidationError | undefined;
}
export interface RuntimeValidator<T = unknown> {
    validate(value: unknown): ValidationResult<T>;
    safeParse(value: unknown): {
        success: boolean;
        data?: T;
        error?: {
            errors: ValidationError[];
        };
    };
    description?: string;
    describe(description: string): RuntimeValidator<T>;
    strict(): RuntimeValidator<T>;
    optional(): RuntimeValidator<T | undefined>;
    default(value: T): RuntimeValidator<T>;
    min(value: number): RuntimeValidator<T>;
    max(value: number): RuntimeValidator<T>;
    url(): RuntimeValidator<T>;
    email(): RuntimeValidator<T>;
    uuid(): RuntimeValidator<T>;
    regex(pattern: RegExp): RuntimeValidator<T>;
    date(): RuntimeValidator<T>;
    rest(): RuntimeValidator<T>;
    parse(value: unknown): T;
    merge(other: RuntimeValidator<any>): RuntimeValidator<T>;
    refine(refineFn: (value: T) => boolean, errorMessage?: string): RuntimeValidator<T>;
    _defaultValue?: T;
    _isOptional?: boolean;
    _baseValidator?: RuntimeValidator<any>;
}
export interface StringValidatorOptions {
    minLength?: number;
    maxLength?: number;
    pattern?: RegExp;
    optional?: boolean;
    description?: string;
}
export declare function createStringValidator(options?: StringValidatorOptions): RuntimeValidator<string>;
export declare function createObjectValidator<T extends Record<string, RuntimeValidator>>(fields: T, options?: {
    strict?: boolean;
} | undefined): RuntimeValidator<{
    [K in keyof T]: T[K] extends RuntimeValidator<infer U> ? U : never;
}>;
export declare function createArrayValidator<T>(itemValidator: RuntimeValidator<T>): RuntimeValidator<T[]>;
export declare function createTupleValidator<T extends readonly RuntimeValidator[]>(validators: T): RuntimeValidator<{
    [K in keyof T]: T[K] extends RuntimeValidator<infer U> ? U : never;
}>;
export declare function createUnionValidator<T>(validators: RuntimeValidator<T>[]): RuntimeValidator<T>;
export declare function createLiteralValidator<T extends string | number | boolean>(literalValue: T): RuntimeValidator<T>;
export declare function createNumberValidator(options?: {
    min?: number;
    max?: number;
}): RuntimeValidator<number>;
export declare function createBooleanValidator(): RuntimeValidator<boolean>;
export declare function createCustomValidator<T>(validator: (value: unknown) => boolean, errorMessage?: string): RuntimeValidator<T>;
export declare function createRecordValidator<K extends string | number | symbol, V>(keyValidator: RuntimeValidator<K>, valueValidator: RuntimeValidator<V>): RuntimeValidator<Record<K, V>>;
export declare function createEnumValidator<T extends readonly string[]>(values: T): RuntimeValidator<T[number]>;
export declare const v: {
    string: (options?: StringValidatorOptions) => RuntimeValidator<unknown>;
    number: (options?: {
        min?: number;
        max?: number;
    }) => RuntimeValidator<unknown>;
    boolean: () => RuntimeValidator<unknown>;
    object: (fields: any) => RuntimeValidator<unknown>;
    array: (itemValidator: any) => RuntimeValidator<unknown>;
    tuple: (validators: any) => RuntimeValidator<unknown>;
    union: (validators: any) => RuntimeValidator<unknown>;
    literal: (value: any) => RuntimeValidator<unknown>;
    custom: (validator: any, errorMessage?: string) => RuntimeValidator<unknown>;
    record: (keyValidator: any, valueValidator: any) => RuntimeValidator<unknown>;
    enum: (values: readonly string[]) => RuntimeValidator<unknown>;
    function: () => RuntimeValidator<unknown>;
    unknown: () => RuntimeValidator<unknown>;
    any: () => RuntimeValidator<unknown>;
    null: () => RuntimeValidator<unknown>;
    undefined: () => RuntimeValidator<unknown>;
    instanceOf: (constructor: any) => RuntimeValidator<unknown>;
    instanceof: (constructor: any) => RuntimeValidator<unknown>;
};
export declare const z: {
    string: (options?: StringValidatorOptions) => RuntimeValidator<unknown>;
    number: (options?: {
        min?: number;
        max?: number;
    }) => RuntimeValidator<unknown>;
    boolean: () => RuntimeValidator<unknown>;
    object: (fields: any) => RuntimeValidator<unknown>;
    array: (itemValidator: any) => RuntimeValidator<unknown>;
    tuple: (validators: any) => RuntimeValidator<unknown>;
    union: (validators: any) => RuntimeValidator<unknown>;
    literal: (value: any) => RuntimeValidator<unknown>;
    custom: (validator: any, errorMessage?: string) => RuntimeValidator<unknown>;
    record: (keyValidator: any, valueValidator: any) => RuntimeValidator<unknown>;
    enum: (values: readonly string[]) => RuntimeValidator<unknown>;
    function: () => RuntimeValidator<unknown>;
    unknown: () => RuntimeValidator<unknown>;
    any: () => RuntimeValidator<unknown>;
    null: () => RuntimeValidator<unknown>;
    undefined: () => RuntimeValidator<unknown>;
    instanceOf: (constructor: any) => RuntimeValidator<unknown>;
    instanceof: (constructor: any) => RuntimeValidator<unknown>;
};
//# sourceMappingURL=lightweight-validators.d.ts.map