From 4135c4b2fdc56ddcaab7f6e5d1cf1fee04c66302 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Sun, 27 Oct 2024 01:03:30 +0000 Subject: [PATCH] feat(api): update via SDK Studio --- .stats.yml | 2 +- .../resources/sessions/sessions.py | 6 +- .../types/session_create_params.py | 63 +------------------ 3 files changed, 7 insertions(+), 64 deletions(-) diff --git a/.stats.yml b/.stats.yml index b492b7b..0e9ae69 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-9af27d5ca04efd55b732756ee4c81b76331e5ee8ab8c74576a3eaf16faac44f1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-70bae250a6bae7dc6efc73ce837b3244eab63318b2d4de9a77ac8733e104df5b.yml diff --git a/src/browserbase/resources/sessions/sessions.py b/src/browserbase/resources/sessions/sessions.py index f50cf0d..d2c8d93 100644 --- a/src/browserbase/resources/sessions/sessions.py +++ b/src/browserbase/resources/sessions/sessions.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Iterable +from typing import Union from typing_extensions import Literal import httpx @@ -104,7 +104,7 @@ def create( browser_settings: session_create_params.BrowserSettings | NotGiven = NOT_GIVEN, extension_id: str | NotGiven = NOT_GIVEN, keep_alive: bool | NotGiven = NOT_GIVEN, - proxies: Union[bool, Iterable[session_create_params.ProxiesUnionMember1]] | NotGiven = NOT_GIVEN, + proxies: Union[bool, object] | NotGiven = NOT_GIVEN, api_timeout: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -354,7 +354,7 @@ async def create( browser_settings: session_create_params.BrowserSettings | NotGiven = NOT_GIVEN, extension_id: str | NotGiven = NOT_GIVEN, keep_alive: bool | NotGiven = NOT_GIVEN, - proxies: Union[bool, Iterable[session_create_params.ProxiesUnionMember1]] | NotGiven = NOT_GIVEN, + proxies: Union[bool, object] | NotGiven = NOT_GIVEN, api_timeout: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. diff --git a/src/browserbase/types/session_create_params.py b/src/browserbase/types/session_create_params.py index fd43187..add0212 100644 --- a/src/browserbase/types/session_create_params.py +++ b/src/browserbase/types/session_create_params.py @@ -2,8 +2,8 @@ from __future__ import annotations -from typing import List, Union, Iterable -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing import List, Union +from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -14,10 +14,6 @@ "BrowserSettingsFingerprint", "BrowserSettingsFingerprintScreen", "BrowserSettingsViewport", - "ProxiesUnionMember1", - "ProxiesUnionMember1BrowserbaseProxyConfig", - "ProxiesUnionMember1BrowserbaseProxyConfigGeolocation", - "ProxiesUnionMember1ExternalProxyConfig", ] @@ -42,7 +38,7 @@ class SessionCreateParams(TypedDict, total=False): This is available on the Startup plan only. """ - proxies: Union[bool, Iterable[ProxiesUnionMember1]] + proxies: Union[bool, object] """Proxy configuration. Can be true for default proxy, or an array of proxy configurations. @@ -131,56 +127,3 @@ class BrowserSettings(TypedDict, total=False): """Enable or disable captcha solving in the browser. Defaults to `true`.""" viewport: BrowserSettingsViewport - - -class ProxiesUnionMember1BrowserbaseProxyConfigGeolocation(TypedDict, total=False): - country: Required[str] - """Country code in ISO 3166-1 alpha-2 format""" - - city: str - """Name of the city. Use spaces for multi-word city names. Optional.""" - - state: str - """US state code (2 characters). Must also specify US as the country. Optional.""" - - -class ProxiesUnionMember1BrowserbaseProxyConfig(TypedDict, total=False): - type: Required[Literal["browserbase"]] - """Type of proxy. - - Always use 'browserbase' for the Browserbase managed proxy network. - """ - - domain_pattern: Annotated[str, PropertyInfo(alias="domainPattern")] - """Domain pattern for which this proxy should be used. - - If omitted, defaults to all domains. Optional. - """ - - geolocation: ProxiesUnionMember1BrowserbaseProxyConfigGeolocation - """Configuration for geolocation""" - - -class ProxiesUnionMember1ExternalProxyConfig(TypedDict, total=False): - server: Required[str] - """Server URL for external proxy. Required.""" - - type: Required[Literal["external"]] - """Type of proxy. Always 'external' for this config.""" - - domain_pattern: Annotated[str, PropertyInfo(alias="domainPattern")] - """Domain pattern for which this proxy should be used. - - If omitted, defaults to all domains. Optional. - """ - - password: str - """Password for external proxy authentication. Optional.""" - - username: str - """Username for external proxy authentication. Optional.""" - - -ProxiesUnionMember1: TypeAlias = Union[ - ProxiesUnionMember1BrowserbaseProxyConfig, ProxiesUnionMember1ExternalProxyConfig -]