/// import type { CDPSession } from "puppeteer-core"; import { FetchInterceptionStage } from "./types"; import type { FetchEvent, Headers } from "./types"; import type { MocksPattern } from "../types"; type RespondWithMockParams = { requestId: string; body: string; headers: Headers; responseCode?: number; }; export type ApiType = { respondWithMock: (params: RespondWithMockParams) => Promise; getRealResponse: (requestId: string, responseHeaders?: Headers) => Promise; continueRequest(requestId: string): Promise; }; export declare class CdpInterceptor { protected readonly session: CDPSession; private readonly patterns; private readonly stage; constructor(session: CDPSession, patterns: MocksPattern[], stage: FetchInterceptionStage); enable(): Promise; listen(handler: (event: FetchEvent, api: ApiType) => Promise): void; protected get api(): ApiType; protected continueRequest(requestId: string): Promise; protected respondWithMock({ requestId, body, headers, responseCode, }: RespondWithMockParams): Promise; protected getRealResponse(requestId: string, responseHeaders?: Headers): Promise; private isGzip; private decodeBody; } export {};