import type { IValidator, ValidationResult, ValidationErrorItem } from './validation.js'; export declare abstract class BaseSchema implements IValidator { protected isOptional: boolean; protected defaultValue?: T | undefined; optional(): BaseSchema; default(val: T): this; abstract validate(input: unknown, path?: string): ValidationResult; protected success(data: T): ValidationResult; protected failure(errors: ValidationErrorItem[]): ValidationResult; } export declare class StringSchema extends BaseSchema { private minLength?; private maxLength?; private isEmail; private pattern?; min(length: number): this; max(length: number): this; email(): this; regex(pat: RegExp): this; validate(input: unknown, path?: string): ValidationResult; } export declare class NumberSchema extends BaseSchema { private minValue?; private maxValue?; private isInteger; min(min: number): this; max(max: number): this; int(): this; positive(): this; validate(input: unknown, path?: string): ValidationResult; } export declare class BooleanSchema extends BaseSchema { validate(input: unknown, path?: string): ValidationResult; } export declare class DateSchema extends BaseSchema { validate(input: unknown, path?: string): ValidationResult; } export declare class ArraySchema extends BaseSchema { private readonly itemSchema; constructor(itemSchema: BaseSchema); private minItems?; private maxItems?; min(n: number): this; max(n: number): this; validate(input: unknown, path?: string): ValidationResult; } export type InferSchema = T extends BaseSchema ? R : never; export type ShapeDefinition = Record>; export type InferShape = { [K in keyof T]: InferSchema; }; export declare class ObjectSchema extends BaseSchema> { readonly shape: TShape; constructor(shape: TShape); validate(input: unknown, path?: string): ValidationResult>; } export declare function string(): StringSchema; export declare function number(): NumberSchema; export declare function boolean(): BooleanSchema; export declare function date(): DateSchema; export declare function email(): StringSchema; export declare function array(itemSchema: BaseSchema): ArraySchema; export declare function object(shape: TShape): ObjectSchema; export declare function schema(shape: TShape): ObjectSchema; //# sourceMappingURL=schema.d.ts.map