declare class Input<T> {
    private data;
    constructor(data: T);
    get<K extends keyof T>(key: K): T[K];
    has(key: keyof T): boolean;
    toJSON(): T;
}
type StringType = "string";
type NumberType = "number";
type BooleanType = "boolean";
type MinLengthType = `min:${number}`;
type MaxLengthType = `max:${number}`;
type RequiredType = "required";
type FileType = "file";
type FileTypeType = "fileType:${string}";
type FileSizeType = "fileSize:${string}";
type SchemaKey = StringType | NumberType | BooleanType | MinLengthType | MaxLengthType | RequiredType | FileType | FileTypeType | FileSizeType;
export type Schema<T extends Body> = Record<keyof T, Partial<Record<SchemaKey, string>>>;
export type Body = Record<string, any>;
export type HttpRequestKind = "view" | "api";
export declare class HttpRequest<T extends Body = Record<string, never>, Params = Record<string, never>> {
    kind: HttpRequestKind;
    rawRequest: Request;
    headers: Omit<Headers, "set" | "delete">;
    cookies: Omit<Map<string, string>, "set" | "delete">;
    search: Input<any>;
    schema: any;
    routePath: string;
    params: Params;
    constructor(req?: Request, params?: any, kind?: HttpRequestKind, routePath?: string);
    locale(): string;
    ctx(): {
        cookies: Set<string>;
        headers: Headers;
        prefetchedResources: Map<string, Record<string, any>>;
        prefetchPromiseQueue: Set<() => Promise<any>>;
        user: any;
        csrfHmac: string | null;
        locale: string | null;
        metadata: import("./Metadata").Metadata;
        req: HttpRequest;
        setLocale(locale: string): void;
        renderMeta(): {
            title: any;
            description: any;
            openGraph: any;
        };
        setCSRFHmac(hmac: string): void;
        setCookie(name: string, value: string, options?: import("./requestContext").CreateCookieOptions): void;
        deleteCookie(name: string): void;
        setHeaders(name: string, value: string): void;
        setUser(user: any): void;
        setRequest(req: HttpRequest<any, any>): void;
        destroy(): void;
    };
    refine(_input: any): any;
    private parseBody;
    private validateInput;
    input(): Promise<Input<T>>;
    safeInput(): Promise<{
        isValid: boolean;
        errors: Record<string, string[]>;
        input: Input<T>;
    }>;
}
export {};
//# sourceMappingURL=HttpRequest.d.ts.map