import type { BrowserContext, Page } from 'playwright-core'; import type { LaunchInput, ResolvedLaunchConfig } from './camoufox/config.js'; import { type PreparedPersistentCamoufoxLaunch } from './camoufox/launcher.js'; import { type CamoucliPaths } from './state/paths.js'; export interface LaunchCamoufoxOptions extends LaunchInput { session?: string | undefined; paths?: CamoucliPaths | undefined; verbose?: boolean | undefined; } export interface ResolvedCamoufoxLaunchSpec { sessionName: string; browserVersion: string; executablePath: string; profileDir: string; downloadsDir: string; artifactsDir: string; resolvedConfig: ResolvedLaunchConfig; userDataDir: string; launchOptions: PreparedPersistentCamoufoxLaunch['launchOptions']; } export declare class CamoufoxSession { readonly context: BrowserContext; readonly sessionName: string; readonly browserVersion: string; readonly executablePath: string; readonly profileDir: string; readonly downloadsDir: string; readonly artifactsDir: string; readonly resolvedConfig: ResolvedLaunchConfig; constructor(input: { context: BrowserContext; sessionName: string; browserVersion: string; executablePath: string; profileDir: string; downloadsDir: string; artifactsDir: string; resolvedConfig: ResolvedLaunchConfig; }); newPage(url?: string): Promise; pages(): Page[]; firstPage(): Page | undefined; ensurePage(): Promise; open(url: string, page?: Page): Promise; close(): Promise; } export declare class Camoufox extends CamoufoxSession { static launch(options?: LaunchCamoufoxOptions): Promise; static launchContext(options?: LaunchCamoufoxOptions): Promise; static resolveLaunch(options?: LaunchCamoufoxOptions): Promise; static with(options: LaunchCamoufoxOptions, callback: (browser: Camoufox) => Promise | T): Promise; } export declare class AsyncCamoufox extends Camoufox { } export declare function launchCamoufox(options?: LaunchCamoufoxOptions): Promise; export declare function resolveCamoufoxLaunchSpec(options?: LaunchCamoufoxOptions): Promise; export declare function launchCamoufoxContext(options?: LaunchCamoufoxOptions): Promise; export declare function withCamoufox(options: LaunchCamoufoxOptions, callback: (session: CamoufoxSession) => Promise | T): Promise;