Skip to content

Commit 3739129

Browse files
feat(api): update via SDK Studio (#16)
1 parent 0e9ec99 commit 3739129

File tree

3 files changed

+7
-64
lines changed

3 files changed

+7
-64
lines changed

Diff for: .stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-9af27d5ca04efd55b732756ee4c81b76331e5ee8ab8c74576a3eaf16faac44f1.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-70bae250a6bae7dc6efc73ce837b3244eab63318b2d4de9a77ac8733e104df5b.yml

Diff for: src/browserbase/resources/sessions/sessions.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union, Iterable
5+
from typing import Union
66
from typing_extensions import Literal
77

88
import httpx
@@ -104,7 +104,7 @@ def create(
104104
browser_settings: session_create_params.BrowserSettings | NotGiven = NOT_GIVEN,
105105
extension_id: str | NotGiven = NOT_GIVEN,
106106
keep_alive: bool | NotGiven = NOT_GIVEN,
107-
proxies: Union[bool, Iterable[session_create_params.ProxiesUnionMember1]] | NotGiven = NOT_GIVEN,
107+
proxies: Union[bool, object] | NotGiven = NOT_GIVEN,
108108
api_timeout: int | NotGiven = NOT_GIVEN,
109109
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
110110
# 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(
354354
browser_settings: session_create_params.BrowserSettings | NotGiven = NOT_GIVEN,
355355
extension_id: str | NotGiven = NOT_GIVEN,
356356
keep_alive: bool | NotGiven = NOT_GIVEN,
357-
proxies: Union[bool, Iterable[session_create_params.ProxiesUnionMember1]] | NotGiven = NOT_GIVEN,
357+
proxies: Union[bool, object] | NotGiven = NOT_GIVEN,
358358
api_timeout: int | NotGiven = NOT_GIVEN,
359359
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
360360
# The extra values given here take precedence over values defined on the client or passed to this method.

Diff for: src/browserbase/types/session_create_params.py

+3-60
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Union, Iterable
6-
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
5+
from typing import List, Union
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from .._utils import PropertyInfo
99

@@ -14,10 +14,6 @@
1414
"BrowserSettingsFingerprint",
1515
"BrowserSettingsFingerprintScreen",
1616
"BrowserSettingsViewport",
17-
"ProxiesUnionMember1",
18-
"ProxiesUnionMember1BrowserbaseProxyConfig",
19-
"ProxiesUnionMember1BrowserbaseProxyConfigGeolocation",
20-
"ProxiesUnionMember1ExternalProxyConfig",
2117
]
2218

2319

@@ -42,7 +38,7 @@ class SessionCreateParams(TypedDict, total=False):
4238
This is available on the Startup plan only.
4339
"""
4440

45-
proxies: Union[bool, Iterable[ProxiesUnionMember1]]
41+
proxies: Union[bool, object]
4642
"""Proxy configuration.
4743
4844
Can be true for default proxy, or an array of proxy configurations.
@@ -131,56 +127,3 @@ class BrowserSettings(TypedDict, total=False):
131127
"""Enable or disable captcha solving in the browser. Defaults to `true`."""
132128

133129
viewport: BrowserSettingsViewport
134-
135-
136-
class ProxiesUnionMember1BrowserbaseProxyConfigGeolocation(TypedDict, total=False):
137-
country: Required[str]
138-
"""Country code in ISO 3166-1 alpha-2 format"""
139-
140-
city: str
141-
"""Name of the city. Use spaces for multi-word city names. Optional."""
142-
143-
state: str
144-
"""US state code (2 characters). Must also specify US as the country. Optional."""
145-
146-
147-
class ProxiesUnionMember1BrowserbaseProxyConfig(TypedDict, total=False):
148-
type: Required[Literal["browserbase"]]
149-
"""Type of proxy.
150-
151-
Always use 'browserbase' for the Browserbase managed proxy network.
152-
"""
153-
154-
domain_pattern: Annotated[str, PropertyInfo(alias="domainPattern")]
155-
"""Domain pattern for which this proxy should be used.
156-
157-
If omitted, defaults to all domains. Optional.
158-
"""
159-
160-
geolocation: ProxiesUnionMember1BrowserbaseProxyConfigGeolocation
161-
"""Configuration for geolocation"""
162-
163-
164-
class ProxiesUnionMember1ExternalProxyConfig(TypedDict, total=False):
165-
server: Required[str]
166-
"""Server URL for external proxy. Required."""
167-
168-
type: Required[Literal["external"]]
169-
"""Type of proxy. Always 'external' for this config."""
170-
171-
domain_pattern: Annotated[str, PropertyInfo(alias="domainPattern")]
172-
"""Domain pattern for which this proxy should be used.
173-
174-
If omitted, defaults to all domains. Optional.
175-
"""
176-
177-
password: str
178-
"""Password for external proxy authentication. Optional."""
179-
180-
username: str
181-
"""Username for external proxy authentication. Optional."""
182-
183-
184-
ProxiesUnionMember1: TypeAlias = Union[
185-
ProxiesUnionMember1BrowserbaseProxyConfig, ProxiesUnionMember1ExternalProxyConfig
186-
]

0 commit comments

Comments
 (0)