@@ -109,6 +109,20 @@ export class Browsers extends APIResource {
109109 return this . _client . get ( path `/browsers/${ id } ` , options ) ;
110110 }
111111
112+ /**
113+ * Update a browser session.
114+ *
115+ * @example
116+ * ```ts
117+ * const browser = await client.browsers.update(
118+ * 'htzv5orfit78e1m2biiifpbv',
119+ * );
120+ * ```
121+ */
122+ update ( id : string , body : BrowserUpdateParams , options ?: RequestOptions ) : APIPromise < BrowserUpdateResponse > {
123+ return this . _client . patch ( path `/browsers/${ id } ` , { body, ...options } ) ;
124+ }
125+
112126 /**
113127 * List all browser sessions with pagination support. Use include_deleted=true to
114128 * include soft-deleted sessions in the results.
@@ -382,6 +396,82 @@ export interface BrowserRetrieveResponse {
382396 viewport ?: Shared . BrowserViewport ;
383397}
384398
399+ export interface BrowserUpdateResponse {
400+ /**
401+ * Websocket URL for Chrome DevTools Protocol connections to the browser session
402+ */
403+ cdp_ws_url : string ;
404+
405+ /**
406+ * When the browser session was created.
407+ */
408+ created_at : string ;
409+
410+ /**
411+ * Whether the browser session is running in headless mode.
412+ */
413+ headless : boolean ;
414+
415+ /**
416+ * Unique identifier for the browser session
417+ */
418+ session_id : string ;
419+
420+ /**
421+ * Whether the browser session is running in stealth mode.
422+ */
423+ stealth : boolean ;
424+
425+ /**
426+ * The number of seconds of inactivity before the browser session is terminated.
427+ */
428+ timeout_seconds : number ;
429+
430+ /**
431+ * Remote URL for live viewing the browser session. Only available for non-headless
432+ * browsers.
433+ */
434+ browser_live_view_url ?: string ;
435+
436+ /**
437+ * When the browser session was soft-deleted. Only present for deleted sessions.
438+ */
439+ deleted_at ?: string ;
440+
441+ /**
442+ * Whether the browser session is running in kiosk mode.
443+ */
444+ kiosk_mode ?: boolean ;
445+
446+ /**
447+ * @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
448+ * instead.
449+ */
450+ persistence ?: BrowserPersistence ;
451+
452+ /**
453+ * Browser profile metadata.
454+ */
455+ profile ?: Profile ;
456+
457+ /**
458+ * ID of the proxy associated with this browser session, if any.
459+ */
460+ proxy_id ?: string ;
461+
462+ /**
463+ * Initial browser window size in pixels with optional refresh rate. If omitted,
464+ * image defaults apply (1920x1080@25). Only specific viewport configurations are
465+ * supported. The server will reject unsupported combinations. Supported
466+ * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
467+ * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
468+ * automatically determined from the width and height if they match a supported
469+ * configuration exactly. Note: Higher resolutions may affect the responsiveness of
470+ * live view browser
471+ */
472+ viewport ?: Shared . BrowserViewport ;
473+ }
474+
385475export interface BrowserListResponse {
386476 /**
387477 * Websocket URL for Chrome DevTools Protocol connections to the browser session
@@ -528,6 +618,14 @@ export interface BrowserCreateParams {
528618 viewport ?: Shared . BrowserViewport ;
529619}
530620
621+ export interface BrowserUpdateParams {
622+ /**
623+ * ID of the proxy to use. Omit to leave unchanged, set to empty string to remove
624+ * proxy.
625+ */
626+ proxy_id ?: string | null ;
627+ }
628+
531629export interface BrowserListParams extends OffsetPaginationParams {
532630 /**
533631 * When true, includes soft-deleted browser sessions in the results alongside
@@ -578,9 +676,11 @@ export declare namespace Browsers {
578676 type Profile as Profile ,
579677 type BrowserCreateResponse as BrowserCreateResponse ,
580678 type BrowserRetrieveResponse as BrowserRetrieveResponse ,
679+ type BrowserUpdateResponse as BrowserUpdateResponse ,
581680 type BrowserListResponse as BrowserListResponse ,
582681 type BrowserListResponsesOffsetPagination as BrowserListResponsesOffsetPagination ,
583682 type BrowserCreateParams as BrowserCreateParams ,
683+ type BrowserUpdateParams as BrowserUpdateParams ,
584684 type BrowserListParams as BrowserListParams ,
585685 type BrowserDeleteParams as BrowserDeleteParams ,
586686 type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams ,
0 commit comments