@@ -270,22 +270,28 @@ def update(
270270 self ,
271271 id : str ,
272272 * ,
273+ profile : BrowserProfile | Omit = omit ,
273274 proxy_id : Optional [str ] | Omit = omit ,
275+ viewport : BrowserViewport | Omit = omit ,
274276 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
275277 # The extra values given here take precedence over values defined on the client or passed to this method.
276278 extra_headers : Headers | None = None ,
277279 extra_query : Query | None = None ,
278280 extra_body : Body | None = None ,
279281 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
280282 ) -> BrowserUpdateResponse :
281- """Update a browser session.
283+ """
284+ Update a browser session.
282285
283286 Args:
284- proxy_id: ID of the proxy to use.
287+ profile: Profile to load into the browser session. Only allowed if the session does not
288+ already have a profile loaded.
285289
286- Omit to leave unchanged, set to empty string to remove
290+ proxy_id: ID of the proxy to use. Omit to leave unchanged, set to empty string to remove
287291 proxy.
288292
293+ viewport: Viewport configuration to apply to the browser session.
294+
289295 extra_headers: Send extra headers
290296
291297 extra_query: Add additional query parameters to the request
@@ -298,7 +304,14 @@ def update(
298304 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
299305 return self ._patch (
300306 f"/browsers/{ id } " ,
301- body = maybe_transform ({"proxy_id" : proxy_id }, browser_update_params .BrowserUpdateParams ),
307+ body = maybe_transform (
308+ {
309+ "profile" : profile ,
310+ "proxy_id" : proxy_id ,
311+ "viewport" : viewport ,
312+ },
313+ browser_update_params .BrowserUpdateParams ,
314+ ),
302315 options = make_request_options (
303316 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
304317 ),
@@ -668,22 +681,28 @@ async def update(
668681 self ,
669682 id : str ,
670683 * ,
684+ profile : BrowserProfile | Omit = omit ,
671685 proxy_id : Optional [str ] | Omit = omit ,
686+ viewport : BrowserViewport | Omit = omit ,
672687 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
673688 # The extra values given here take precedence over values defined on the client or passed to this method.
674689 extra_headers : Headers | None = None ,
675690 extra_query : Query | None = None ,
676691 extra_body : Body | None = None ,
677692 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
678693 ) -> BrowserUpdateResponse :
679- """Update a browser session.
694+ """
695+ Update a browser session.
680696
681697 Args:
682- proxy_id: ID of the proxy to use.
698+ profile: Profile to load into the browser session. Only allowed if the session does not
699+ already have a profile loaded.
683700
684- Omit to leave unchanged, set to empty string to remove
701+ proxy_id: ID of the proxy to use. Omit to leave unchanged, set to empty string to remove
685702 proxy.
686703
704+ viewport: Viewport configuration to apply to the browser session.
705+
687706 extra_headers: Send extra headers
688707
689708 extra_query: Add additional query parameters to the request
@@ -696,7 +715,14 @@ async def update(
696715 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
697716 return await self ._patch (
698717 f"/browsers/{ id } " ,
699- body = await async_maybe_transform ({"proxy_id" : proxy_id }, browser_update_params .BrowserUpdateParams ),
718+ body = await async_maybe_transform (
719+ {
720+ "profile" : profile ,
721+ "proxy_id" : proxy_id ,
722+ "viewport" : viewport ,
723+ },
724+ browser_update_params .BrowserUpdateParams ,
725+ ),
700726 options = make_request_options (
701727 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
702728 ),
0 commit comments