Skip to content

Commit 32e4d51

Browse files
feat(api): manual updates
1 parent 3bf8100 commit 32e4d51

File tree

3 files changed

+84
-9
lines changed

3 files changed

+84
-9
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 19
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-a9cd420dd3e871aaaad18fb9def41d277ae000607f369657c965a30e779c221a.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-af59f86ea3ee682d54560eaf6055df5bebacee560749f5f3cbd9c8ff8b5fa8e5.yml
33
openapi_spec_hash: 72dfdba2efc46c7cbbaa98bd234b72de
4-
config_hash: b32e9f369edd843015c9b9d4fbc3b4f9
4+
config_hash: 99e5318dc8a8d75839ec565d94276c71

src/browserbase/resources/sessions/sessions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

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

88
import httpx
@@ -104,7 +104,7 @@ def create(
104104
extension_id: str | Omit = omit,
105105
keep_alive: bool | Omit = omit,
106106
project_id: str | Omit = omit,
107-
proxies: Union[bool, object] | Omit = omit,
107+
proxies: Union[bool, Iterable[session_create_params.ProxiesUnionMember1]] | Omit = omit,
108108
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"] | Omit = omit,
109109
user_metadata: Dict[str, object] | Omit = omit,
110110
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -373,7 +373,7 @@ async def create(
373373
extension_id: str | Omit = omit,
374374
keep_alive: bool | Omit = omit,
375375
project_id: str | Omit = omit,
376-
proxies: Union[bool, object] | Omit = omit,
376+
proxies: Union[bool, Iterable[session_create_params.ProxiesUnionMember1]] | Omit = omit,
377377
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"] | Omit = omit,
378378
user_metadata: Dict[str, object] | Omit = omit,
379379
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/browserbase/types/session_create_params.py

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@
22

33
from __future__ import annotations
44

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

88
from .._utils import PropertyInfo
99

10-
__all__ = ["SessionCreateParams", "BrowserSettings", "BrowserSettingsContext", "BrowserSettingsViewport"]
10+
__all__ = [
11+
"SessionCreateParams",
12+
"BrowserSettings",
13+
"BrowserSettingsContext",
14+
"BrowserSettingsViewport",
15+
"ProxiesUnionMember1",
16+
"ProxiesUnionMember1BrowserbaseProxyConfig",
17+
"ProxiesUnionMember1BrowserbaseProxyConfigGeolocation",
18+
"ProxiesUnionMember1ExternalProxyConfig",
19+
"ProxiesUnionMember1NoneProxyConfig",
20+
]
1121

1222

1323
class SessionCreateParams(TypedDict, total=False):
@@ -37,7 +47,7 @@ class SessionCreateParams(TypedDict, total=False):
3747
Can be found in [Settings](https://www.browserbase.com/settings).
3848
"""
3949

40-
proxies: Union[bool, object]
50+
proxies: Union[bool, Iterable[ProxiesUnionMember1]]
4151
"""Proxy configuration.
4252
4353
Can be true for default proxy, or an array of proxy configurations.
@@ -111,3 +121,68 @@ class BrowserSettings(TypedDict, total=False):
111121
"""Enable or disable captcha solving in the browser. Defaults to `true`."""
112122

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

0 commit comments

Comments
 (0)