/// <reference types="node" />
import { Page } from './page.js';
import { CdpHeaderEntry, CdpHeaders, CdpRequest, CdpResponse } from './types';
export declare class NetworkManager {
    page: Page;
    pendingRequestIds: Set<string>;
    collectedResources: NetworkResource[];
    lastNetworkEventAt: number;
    constructor(page: Page);
    get logger(): import("../logger.js").Logger;
    isSilent(): boolean;
    isSilentFor(duration: number): boolean;
    invalidate(): void;
    getCollectedResources(): NetworkResource[];
    getPendingRequests(): NetworkResource[];
    getResourceById(requestId: string): NetworkResource | null;
    getResponseBody(requestId: string): Promise<Buffer>;
    waitForFinish(requestId: string, timeout?: number): Promise<void>;
    private onRequestWillBeSent;
    private onResponseReceived;
    private onLoadingFinished;
    private onLoadingFailed;
    private logFailedRequest;
    private logHttpError;
    static headersObjectToEntries(cdpHeaders: CdpHeaders): CdpHeaderEntry[];
    static headerEntriesToObject(cdpHeaderEntries: CdpHeaderEntry[]): CdpHeaders;
}
export interface NetworkResource {
    requestId: string;
    frameId: string;
    type: string;
    status: 'requestWillBeSent' | 'responseReceived' | 'loadingFinished' | 'loadingFailed';
    localSendTimestamp: number;
    request: CdpRequest;
    response?: CdpResponse;
    errorText?: string;
}
//# sourceMappingURL=network-manager.d.ts.map