import { BiDi } from "../../index"; import * as EventType from './types'; import { NetworkEvents } from "./events"; /** * Network class provides methods to manage network requests and responses * using BiDi (Bidirectional) communication. */ export default class Network { _ws: BiDi; _events: NetworkEvents; /** * Constructs a new Network instance. * @param BidiConnection - The BiDi connection instance. */ constructor(BidiConnection: BiDi); /** * Gets BrowsingContext events. * @returns {NetworkEvents} The BrowsingContext events. */ get events(): NetworkEvents; /** * Adds a network intercept. * @param context - The parameters for adding the network intercept. * @returns A promise that resolves with the result of adding the network intercept. */ addIntercept(context: EventType.NetworkAddInterceptParameters): Promise; /** * Continues a paused network request. * @param context - The parameters for continuing the network request. * @returns A promise that resolves when the request is continued. */ continueRequest(context: EventType.NetworkContinueRequestParameters): Promise; /** * Continues a paused network response. * @param context - The parameters for continuing the network response. * @returns A promise that resolves when the response is continued. */ continueResponse(context: EventType.NetworkContinueResponseParameters): Promise; /** * Continues a paused network request with authentication. * @param context - The parameters for continuing the network request with authentication. * @returns A promise that resolves when the request is continued with authentication. */ continueWithAuth(context: EventType.NetworkContinueWithAuthParameters): Promise; /** * Fails a network request. * @param context - The parameters for failing the network request. * @returns A promise that resolves when the request is failed. */ failRequest(context: EventType.NetworkFailRequestParameters): Promise; /** * Provides a response to a network request. * @param context - The parameters for providing the network response. * @returns A promise that resolves when the response is provided. */ provideResponse(context: EventType.NetworkProvideResponseParameters): Promise; /** * Removes a network intercept. * @param context - The parameters for removing the network intercept. * @returns A promise that resolves when the network intercept is removed. */ removeIntercept(context: EventType.NetworkRemoveInterceptParameters): Promise; /** * Configures the network cache behavior for certain requests. * @param context - The parameters for setting the cache behavior. * @returns A promise that resolves when the cache behavior is set. */ setCacheBehavior(context: EventType.NetworkSetCacheBehaviorParameters): Promise; }