UNPKG

@hyperbrowser/sdk

Version:

Node SDK for Hyperbrowser API

40 lines (39 loc) 1.56 kB
import { BasicResponse, CreateSessionParams, GetSessionDownloadsUrlResponse, GetSessionRecordingUrlResponse, SessionDetail, SessionListParams, SessionListResponse, SessionRecording } from "../types/session"; import { BaseService } from "./base"; export declare class SessionsService extends BaseService { /** * Create a new browser session * @param params Configuration parameters for the new session */ create(params?: CreateSessionParams): Promise<SessionDetail>; /** * Get details of an existing session * @param id The ID of the session to get */ get(id: string): Promise<SessionDetail>; /** * Stop a running session * @param id The ID of the session to stop */ stop(id: string): Promise<BasicResponse>; /** * List all sessions with optional filtering * @param params Optional parameters to filter the sessions */ list(params?: SessionListParams): Promise<SessionListResponse>; /** * Get the recording of a session * @param id The ID of the session to get the recording from */ getRecording(id: string): Promise<SessionRecording[]>; /** * Get the recording URL of a session * @param id The ID of the session to get the recording URL from */ getRecordingURL(id: string): Promise<GetSessionRecordingUrlResponse>; /** * Get the downloads URL of a session * @param id The ID of the session to get the downloads URL from */ getDownloadsURL(id: string): Promise<GetSessionDownloadsUrlResponse>; }