/**
 * Input Validation and Sanitization Utilities
 *
 * Provides schema-based validation and sanitization for API inputs.
 * Built on top of Zod with additional security features.
 *
 * @packageDocumentation
 */
import { z } from 'zod';
/**
 * Common validation patterns
 */
export declare const patterns: {
    uuid: RegExp;
    isoDateTime: RegExp;
    slug: RegExp;
    email: RegExp;
    identifier: RegExp;
    semver: RegExp;
};
/**
 * Sanitize a string by removing potentially dangerous characters
 */
export declare function sanitizeString(input: string): string;
/**
 * Sanitize an object recursively
 */
export declare function sanitizeObject<T extends Record<string, unknown>>(obj: T): T;
/**
 * Common Zod schemas
 */
export declare const schemas: {
    /** UUID v4 */
    uuid: z.ZodString;
    /** Entity ID (UUID) */
    entityId: z.ZodString;
    /** Intent ID (UUID) */
    intentId: z.ZodString;
    /** Proof ID (UUID) */
    proofId: z.ZodString;
    /** ISO 8601 timestamp */
    timestamp: z.ZodString;
    /** Trust score (0-1000) */
    trustScore: z.ZodNumber;
    /** Trust level (T0-T7) */
    trustLevel: z.ZodNumber;
    /** Non-empty string */
    nonEmptyString: z.ZodString;
    /** Safe object (with depth limit) */
    safeObject: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>;
    /** Pagination parameters */
    pagination: z.ZodObject<{
        offset: z.ZodDefault<z.ZodNumber>;
        limit: z.ZodDefault<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        limit?: number;
        offset?: number;
    }, {
        limit?: number;
        offset?: number;
    }>;
    /** Sort parameters */
    sort: z.ZodObject<{
        field: z.ZodString;
        order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
    }, "strip", z.ZodTypeAny, {
        field?: string;
        order?: "asc" | "desc";
    }, {
        field?: string;
        order?: "asc" | "desc";
    }>;
};
/**
 * Create a validated and sanitized request body parser
 */
export declare function createBodyParser<T extends z.ZodTypeAny>(schema: T): {
    parse: (data: unknown) => z.infer<T>;
    safeParse: (data: unknown) => z.SafeParseReturnType<any, any>;
};
/**
 * Validate array size
 */
export declare function validateArraySize<T>(arr: T[], maxSize: number, fieldName: string): void;
/**
 * Validate string length
 */
export declare function validateStringLength(str: string, maxLength: number, fieldName: string): void;
/**
 * Custom validation error
 */
export declare class ValidationError extends Error {
    code: string;
    field?: string;
    constructor(message: string, code?: string, field?: string);
}
/**
 * Rate limiting helper for validation
 */
export declare function createRateLimitedValidator<T>(validator: (data: T) => void, maxPerMinute: number): (data: T) => void;
/**
 * Validate JSON payload size
 */
export declare function validatePayloadSize(payload: unknown, maxSizeBytes?: number): void;
/**
 * Check for potential injection patterns
 */
export declare function checkInjectionPatterns(input: string): boolean;
/**
 * Validate that input doesn't contain injection patterns
 */
export declare function validateNoInjection(input: string, fieldName: string): void;
//# sourceMappingURL=validation.d.ts.map