import { APIResource } from "../../../../resource.js"; import * as Core from "../../../../core.js"; import * as PageAPI from "./page.js"; import { Page, PageGetParams } from "./page.js"; import * as TargetsAPI from "./targets.js"; import { TargetActivateParams, TargetActivateResponse, TargetCloseParams, TargetCloseResponse, TargetCreateParams, TargetCreateResponse, TargetGetParams, TargetGetResponse, TargetListParams, TargetListResponse, Targets } from "./targets.js"; export declare class Browser extends APIResource { page: PageAPI.Page; targets: TargetsAPI.Targets; /** * Get a browser session ID. * * @example * ```ts * const browser = * await client.browserRendering.devtools.browser.create({ * account_id: 'account_id', * }); * ``` */ create(params: BrowserCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Closes an existing browser session. * * @example * ```ts * const browser = * await client.browserRendering.devtools.browser.delete( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ delete(sessionId: string, params: BrowserDeleteParams, options?: Core.RequestOptions): Core.APIPromise; /** * Establishes a WebSocket connection to an existing browser session. * * @example * ```ts * await client.browserRendering.devtools.browser.connect( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ connect(sessionId: string, params: BrowserConnectParams, options?: Core.RequestOptions): Core.APIPromise; /** * Acquires and establishes a WebSocket connection to a browser session. * * @example * ```ts * await client.browserRendering.devtools.browser.launch({ * account_id: 'account_id', * }); * ``` */ launch(params: BrowserLaunchParams, options?: Core.RequestOptions): Core.APIPromise; /** * Returns the complete Chrome DevTools Protocol schema including all domains, * commands, events, and types. This schema describes the entire CDP API surface. * * @example * ```ts * const response = * await client.browserRendering.devtools.browser.protocol( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ protocol(sessionId: string, params: BrowserProtocolParams, options?: Core.RequestOptions): Core.APIPromise; /** * Get browser version metadata. * * @example * ```ts * const response = * await client.browserRendering.devtools.browser.version( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ version(sessionId: string, params: BrowserVersionParams, options?: Core.RequestOptions): Core.APIPromise; } export interface BrowserCreateResponse { /** * Browser session ID. */ sessionId: string; /** * WebSocket URL for the session. */ webSocketDebuggerUrl?: string; } export interface BrowserDeleteResponse { status: 'closing' | 'closed'; } export interface BrowserProtocolResponse { /** * List of protocol domains. */ domains: Array; /** * Protocol version. */ version?: BrowserProtocolResponse.Version; } export declare namespace BrowserProtocolResponse { interface Domain { /** * Domain name. */ domain: string; /** * Available commands. */ commands?: Array<{ [key: string]: unknown; }>; /** * Domain dependencies. */ dependencies?: Array; /** * Available events. */ events?: Array<{ [key: string]: unknown; }>; /** * Whether this domain is experimental. */ experimental?: boolean; /** * Type definitions. */ types?: Array<{ [key: string]: unknown; }>; } /** * Protocol version. */ interface Version { /** * Major version. */ major: string; /** * Minor version. */ minor: string; } } export interface BrowserVersionResponse { /** * Browser name and version. */ Browser: string; /** * Chrome DevTools Protocol version. */ 'Protocol-Version': string; /** * User agent string. */ 'User-Agent': string; /** * V8 JavaScript engine version. */ 'V8-Version': string; /** * WebKit version. */ 'WebKit-Version': string; /** * WebSocket URL for debugging the browser. */ webSocketDebuggerUrl: string; } export interface BrowserCreateParams { /** * Path param: Account ID. */ account_id: string; /** * Query param: Keep-alive time in milliseconds. */ keep_alive?: number; /** * Query param: Use experimental browser. */ lab?: boolean; /** * Query param */ recording?: boolean; /** * Query param: Include browser targets in response. */ targets?: boolean; } export interface BrowserDeleteParams { /** * Account ID. */ account_id: string; } export interface BrowserConnectParams { /** * Path param: Account ID. */ account_id: string; /** * Query param: Keep-alive time in ms (only valid when acquiring new session). */ keep_alive?: number; /** * Query param: Use experimental browser. */ lab?: boolean; /** * Query param */ recording?: boolean; } export interface BrowserLaunchParams { /** * Path param: Account ID. */ account_id: string; /** * Query param: Keep-alive time in ms (only valid when acquiring new session). */ keep_alive?: number; /** * Query param: Use experimental browser. */ lab?: boolean; /** * Query param */ recording?: boolean; } export interface BrowserProtocolParams { /** * Account ID. */ account_id: string; } export interface BrowserVersionParams { /** * Account ID. */ account_id: string; } export declare namespace Browser { export { type BrowserCreateResponse as BrowserCreateResponse, type BrowserDeleteResponse as BrowserDeleteResponse, type BrowserProtocolResponse as BrowserProtocolResponse, type BrowserVersionResponse as BrowserVersionResponse, type BrowserCreateParams as BrowserCreateParams, type BrowserDeleteParams as BrowserDeleteParams, type BrowserConnectParams as BrowserConnectParams, type BrowserLaunchParams as BrowserLaunchParams, type BrowserProtocolParams as BrowserProtocolParams, type BrowserVersionParams as BrowserVersionParams, }; export { Page as Page, type PageGetParams as PageGetParams }; export { Targets as Targets, type TargetCreateResponse as TargetCreateResponse, type TargetListResponse as TargetListResponse, type TargetActivateResponse as TargetActivateResponse, type TargetCloseResponse as TargetCloseResponse, type TargetGetResponse as TargetGetResponse, type TargetCreateParams as TargetCreateParams, type TargetListParams as TargetListParams, type TargetActivateParams as TargetActivateParams, type TargetCloseParams as TargetCloseParams, type TargetGetParams as TargetGetParams, }; } //# sourceMappingURL=browser.d.ts.map