import type { App } from "./app.js";
import { Event } from "../tools/router/event.js";
import { Record as RecordModel } from "./record_model.js";
export declare const RequestInfoContextDefault = "default";
export declare const RequestInfoContextExpand = "expand";
export declare const RequestInfoContextRealtime = "realtime";
export declare const RequestInfoContextProtectedFile = "protectedFile";
export declare const RequestInfoContextBatch = "batch";
export declare const RequestInfoContextOAuth2 = "oauth2";
export declare const RequestInfoContextOTP = "otp";
export declare const RequestInfoContextPasswordAuth = "password";
export declare const RequestEventKeyInfoContext = "infoContext";
export type RequestInfo = {
    query: Record<string, string>;
    headers: Record<string, string>;
    body: Record<string, unknown>;
    auth: RecordModel | null;
    method: string;
    context: string;
};
export declare class RequestEvent extends Event {
    #private;
    app: App;
    auth: RecordModel | null;
    pattern: string;
    constructor(options: {
        app: App;
        request: Request;
        params?: Record<string, string>;
        remoteAddress?: string | null;
        remoteAddressResolver?: (() => string | null) | null;
        pattern?: string;
        rawHeaders?: Record<string, string[]>;
        requestUrl?: URL;
    });
    realIP(): string;
    hasSuperuserAuth(): boolean;
    requestInfo(): Promise<RequestInfo>;
    bindBody<T extends object>(target: T): Promise<void>;
    setStopSignal(signal: {
        stopped: boolean;
        error?: Error;
    } | null): void;
    setRequestInfo(info: RequestInfo): void;
    SetRequestInfo(info: RequestInfo): void;
    getStopSignal(): {
        stopped: boolean;
        error?: Error;
    } | null;
}
