/**
 * Copyright: (c) Myia SAS 2026.
 * This file and its contents are licensed under the AGPLv3 License.
 * Please see the LICENSE file at the root of this repository
 */
import type { APIRequest, APIRequestContext, Browser, BrowserContext, Page } from 'playwright';
/**
 * Capture sessions implement just enough of the `Wireable`
 * surface for this helper. Both `NetworkCaptureSession` and
 * `ConsoleCaptureSession` already match — the typing is structural
 * to avoid an import cycle between the fixture and the adapters.
 */
export interface WireableContextSession {
    attachToContext(ctx: BrowserContext): void;
}
export interface WireableApiSession {
    attachToApiRequestContext?(api: APIRequestContext): void;
}
export type WireableSession = WireableContextSession & WireableApiSession;
export interface WireAllPagesOptions {
    browser: Browser;
    /**
     * Optional reference to the global `request` from `@playwright/test`
     * (an `APIRequest`). Pass it to also patch `request.newContext` so
     * api-request contexts created inside the test body are wired.
     */
    apiRequest?: APIRequest;
}
/** Returns a `restore()` thunk that undoes all patches. */
export declare function wireAllPages(sessions: WireableSession[], opts: WireAllPagesOptions): () => void;
/**
 * Wire a single page (and its context) eagerly. Used by the fixture
 * for the test's initial `page` so the first request fired by the
 * test body is captured even if it races with the `attachToContext`
 * call for a sibling context.
 */
export declare function wireInitialPage(sessions: WireableSession[], page: Page): void;
