Skip to content

Commit 0735db2

Browse files
feat(api): update via SDK Studio (#28)
1 parent b1facb8 commit 0735db2

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
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-1ccf843d2efab92c6fa01ffb11a0b5e6787218d750597687de526ac9f22f6b81.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-3140ed9942ce873c477c950cc9a13ccce88c3b054b903cdf78ac0db6cf2c634f.yml

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

+10
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def create(
106106
keep_alive: bool | NotGiven = NOT_GIVEN,
107107
proxies: object | NotGiven = NOT_GIVEN,
108108
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"] | NotGiven = NOT_GIVEN,
109+
api_timeout: int | NotGiven = NOT_GIVEN,
109110
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
110111
# The extra values given here take precedence over values defined on the client or passed to this method.
111112
extra_headers: Headers | None = None,
@@ -132,6 +133,9 @@ def create(
132133
133134
region: The region where the Session should run.
134135
136+
api_timeout: Duration in seconds after which the session will automatically end. Defaults to
137+
the Project's `defaultTimeout`.
138+
135139
extra_headers: Send extra headers
136140
137141
extra_query: Add additional query parameters to the request
@@ -150,6 +154,7 @@ def create(
150154
"keep_alive": keep_alive,
151155
"proxies": proxies,
152156
"region": region,
157+
"timeout": api_timeout,
153158
},
154159
session_create_params.SessionCreateParams,
155160
),
@@ -355,6 +360,7 @@ async def create(
355360
keep_alive: bool | NotGiven = NOT_GIVEN,
356361
proxies: object | NotGiven = NOT_GIVEN,
357362
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"] | NotGiven = NOT_GIVEN,
363+
api_timeout: int | NotGiven = NOT_GIVEN,
358364
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
359365
# The extra values given here take precedence over values defined on the client or passed to this method.
360366
extra_headers: Headers | None = None,
@@ -381,6 +387,9 @@ async def create(
381387
382388
region: The region where the Session should run.
383389
390+
api_timeout: Duration in seconds after which the session will automatically end. Defaults to
391+
the Project's `defaultTimeout`.
392+
384393
extra_headers: Send extra headers
385394
386395
extra_query: Add additional query parameters to the request
@@ -399,6 +408,7 @@ async def create(
399408
"keep_alive": keep_alive,
400409
"proxies": proxies,
401410
"region": region,
411+
"timeout": api_timeout,
402412
},
403413
session_create_params.SessionCreateParams,
404414
),

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

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ class SessionCreateParams(TypedDict, total=False):
4747
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"]
4848
"""The region where the Session should run."""
4949

50+
api_timeout: Annotated[int, PropertyInfo(alias="timeout")]
51+
"""Duration in seconds after which the session will automatically end.
52+
53+
Defaults to the Project's `defaultTimeout`.
54+
"""
55+
5056

5157
class BrowserSettingsContext(TypedDict, total=False):
5258
id: Required[str]

Diff for: tests/api_resources/test_sessions.py

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def test_method_create_with_all_params(self, client: Browserbase) -> None:
6565
keep_alive=True,
6666
proxies={},
6767
region="us-west-2",
68+
api_timeout=60,
6869
)
6970
assert_matches_type(SessionCreateResponse, session, path=["response"])
7071

@@ -293,6 +294,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBrowserbas
293294
keep_alive=True,
294295
proxies={},
295296
region="us-west-2",
297+
api_timeout=60,
296298
)
297299
assert_matches_type(SessionCreateResponse, session, path=["response"])
298300

0 commit comments

Comments
 (0)