import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; /** * Record and manage browser session video replays. */ export declare class Replays extends APIResource { /** * List all replays for the specified browser session. * * @example * ```ts * const replays = await client.browsers.replays.list('id'); * ``` */ list(id: string, options?: RequestOptions): APIPromise; /** * Download or stream the specified replay recording. * * @example * ```ts * const response = await client.browsers.replays.download( * 'replay_id', * { id: 'id' }, * ); * * const content = await response.blob(); * console.log(content); * ``` */ download(replayID: string, params: ReplayDownloadParams, options?: RequestOptions): APIPromise; /** * Start recording the browser session and return a replay ID. * * @example * ```ts * const response = await client.browsers.replays.start('id'); * ``` */ start(id: string, body?: ReplayStartParams | null | undefined, options?: RequestOptions): APIPromise; /** * Stop the specified replay recording and persist the video. * * @example * ```ts * await client.browsers.replays.stop('replay_id', { * id: 'id', * }); * ``` */ stop(replayID: string, params: ReplayStopParams, options?: RequestOptions): APIPromise; } export type ReplayListResponse = Array; export declare namespace ReplayListResponse { /** * Information about a browser replay recording. */ interface ReplayListResponseItem { /** * Unique identifier for the replay recording. */ replay_id: string; /** * Timestamp when replay finished */ finished_at?: string | null; /** * URL for viewing the replay recording. */ replay_view_url?: string; /** * Timestamp when replay started */ started_at?: string | null; } } /** * Information about a browser replay recording. */ export interface ReplayStartResponse { /** * Unique identifier for the replay recording. */ replay_id: string; /** * Timestamp when replay finished */ finished_at?: string | null; /** * URL for viewing the replay recording. */ replay_view_url?: string; /** * Timestamp when replay started */ started_at?: string | null; } export interface ReplayDownloadParams { /** * Browser session ID */ id: string; } export interface ReplayStartParams { /** * Recording framerate in fps. Values above 20 require GPU to be enabled on the * browser session. */ framerate?: number; /** * Maximum recording duration in seconds. */ max_duration_in_seconds?: number; /** * Record audio in addition to video. When false (the default), the recording is * video-only. */ record_audio?: boolean; } export interface ReplayStopParams { /** * Browser session ID */ id: string; } export declare namespace Replays { export { type ReplayListResponse as ReplayListResponse, type ReplayStartResponse as ReplayStartResponse, type ReplayDownloadParams as ReplayDownloadParams, type ReplayStartParams as ReplayStartParams, type ReplayStopParams as ReplayStopParams, }; } //# sourceMappingURL=replays.d.mts.map