Skip to content

Commit 0cf47ff

Browse files
feat: [AI-2206][apps/api] Surface proxySettings.caCertificates in public SDK & docs
1 parent 279aa9a commit 0cf47ff

4 files changed

Lines changed: 24 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 27
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-9bab373fc62ce19147560ed3ec29fe09ad59d9a5b406d9ed21a22f15a511d9cb.yml
3-
openapi_spec_hash: 518fdefff1eabc4bb8a3b54ddf7fa293
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-f39b852755134d01a440f7c37701f6c5397f43d13740d9ba08739cae488382a7.yml
3+
openapi_spec_hash: de6c25eebe5026d0fb9a4d7a93ec7718
44
config_hash: d4b0c534eaf7665ea25168e0e824c9d3

src/browserbase/resources/sessions/sessions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def create(
116116
keep_alive: bool | Omit = omit,
117117
project_id: str | Omit = omit,
118118
proxies: Union[Iterable[session_create_params.ProxiesUnionMember0], bool] | Omit = omit,
119+
proxy_settings: session_create_params.ProxySettings | Omit = omit,
119120
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"] | Omit = omit,
120121
api_timeout: int | Omit = omit,
121122
user_metadata: Dict[str, object] | Omit = omit,
@@ -144,6 +145,8 @@ def create(
144145
proxies: Proxy configuration. Can be true for default proxy, or an array of proxy
145146
configurations.
146147
148+
proxy_settings: Supplementary proxy settings. Optional.
149+
147150
region: The region where the Session should run.
148151
149152
api_timeout: Duration in seconds after which the session will automatically end. Defaults to
@@ -169,6 +172,7 @@ def create(
169172
"keep_alive": keep_alive,
170173
"project_id": project_id,
171174
"proxies": proxies,
175+
"proxy_settings": proxy_settings,
172176
"region": region,
173177
"api_timeout": api_timeout,
174178
"user_metadata": user_metadata,
@@ -392,6 +396,7 @@ async def create(
392396
keep_alive: bool | Omit = omit,
393397
project_id: str | Omit = omit,
394398
proxies: Union[Iterable[session_create_params.ProxiesUnionMember0], bool] | Omit = omit,
399+
proxy_settings: session_create_params.ProxySettings | Omit = omit,
395400
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"] | Omit = omit,
396401
api_timeout: int | Omit = omit,
397402
user_metadata: Dict[str, object] | Omit = omit,
@@ -420,6 +425,8 @@ async def create(
420425
proxies: Proxy configuration. Can be true for default proxy, or an array of proxy
421426
configurations.
422427
428+
proxy_settings: Supplementary proxy settings. Optional.
429+
423430
region: The region where the Session should run.
424431
425432
api_timeout: Duration in seconds after which the session will automatically end. Defaults to
@@ -445,6 +452,7 @@ async def create(
445452
"keep_alive": keep_alive,
446453
"project_id": project_id,
447454
"proxies": proxies,
455+
"proxy_settings": proxy_settings,
448456
"region": region,
449457
"api_timeout": api_timeout,
450458
"user_metadata": user_metadata,

src/browserbase/types/session_create_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import Dict, Union, Iterable
66
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
77

8+
from .._types import SequenceNotStr
89
from .._utils import PropertyInfo
910

1011
__all__ = [
@@ -17,6 +18,7 @@
1718
"ProxiesUnionMember0BrowserbaseProxyConfigGeolocation",
1819
"ProxiesUnionMember0ExternalProxyConfig",
1920
"ProxiesUnionMember0NoneProxyConfig",
21+
"ProxySettings",
2022
]
2123

2224

@@ -48,6 +50,9 @@ class SessionCreateParams(TypedDict, total=False):
4850
Can be true for default proxy, or an array of proxy configurations.
4951
"""
5052

53+
proxy_settings: Annotated[ProxySettings, PropertyInfo(alias="proxySettings")]
54+
"""Supplementary proxy settings. Optional."""
55+
5156
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"]
5257
"""The region where the Session should run."""
5358

@@ -201,3 +206,10 @@ class ProxiesUnionMember0NoneProxyConfig(TypedDict, total=False):
201206
ProxiesUnionMember0ExternalProxyConfig,
202207
ProxiesUnionMember0NoneProxyConfig,
203208
]
209+
210+
211+
class ProxySettings(TypedDict, total=False):
212+
"""Supplementary proxy settings. Optional."""
213+
214+
ca_certificates: Annotated[SequenceNotStr[str], PropertyInfo(alias="caCertificates")]
215+
"""The TLS certificate IDs to trust. Optional."""

tests/api_resources/test_sessions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def test_method_create_with_all_params(self, client: Browserbase) -> None:
6666
},
6767
}
6868
],
69+
proxy_settings={"ca_certificates": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]},
6970
region="us-west-2",
7071
api_timeout=60,
7172
user_metadata={"foo": "bar"},
@@ -301,6 +302,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBrowserbas
301302
},
302303
}
303304
],
305+
proxy_settings={"ca_certificates": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]},
304306
region="us-west-2",
305307
api_timeout=60,
306308
user_metadata={"foo": "bar"},

0 commit comments

Comments
 (0)