export type RequestState = 'PENDING' | 'COMPLETED';
export type RequestType = 'put' | 'delete' | 'accessRequest';
export interface ClientRequest {
    requestId?: string;
    [key: string]: unknown;
}
export interface Request {
    requestId: string;
    type: RequestType;
    clientRequest: ClientRequest;
    ip?: string;
    date: Date;
    state: RequestState;
    statusCode: number;
    updateCb?: (reply: Reply) => void;
    user?: string;
    message?: string;
    data?: unknown;
    percentComplete?: number;
    accessIdentifier?: string;
    accessDescription?: string;
    accessPassword?: string;
    requestedPermissions?: boolean;
    permissions?: string;
    token?: string;
}
export interface AccessRequestData {
    permission?: string;
    token?: string;
}
export interface Reply {
    state: RequestState;
    requestId: string;
    statusCode: number;
    message?: string;
    href: string;
    ip?: string;
    user?: string;
    put?: unknown;
    delete?: unknown;
    accessRequest?: AccessRequestData;
}
export interface UpdateOptions {
    statusCode?: number | null;
    data?: unknown | null;
    message?: string | null;
    percentComplete?: number | null;
}
interface AppWithIntervals {
    intervals: NodeJS.Timeout[];
}
export declare function resetRequests(): void;
export declare function createRequest(app: AppWithIntervals, type: RequestType, clientRequest: ClientRequest, user?: string, clientIp?: string, updateCb?: (reply: Reply) => void): Promise<Request>;
export declare function updateRequest(requestId: string, state: RequestState | null, { statusCode, data, message, percentComplete }: UpdateOptions): Promise<Reply>;
export declare function queryRequest(requestId: string): Promise<Reply>;
export declare function findRequest(matcher: (request: Request) => boolean): Request | undefined;
export declare function filterRequests(type: RequestType, state: RequestState | null): Request[];
export {};
//# sourceMappingURL=requestResponse.d.ts.map