Skip to content

Commit 39fee02

Browse files
feat(api): manual updates
1 parent b67592a commit 39fee02

12 files changed

Lines changed: 598 additions & 19 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 36
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-e80dfc4671603a503dc62812916b0d467e344106a1c4412ee1442914504fc94d.yml
1+
configured_endpoints: 38
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-98cc68ad9afa71355baf2b31f305a5e2f3a315fd311c96659405eff96b8f2b1e.yml
33
openapi_spec_hash: 71dfbc1021a33dd7fc9d82844965b1b3
4-
config_hash: 1b24ea9fa13645b16b74aa794dbc8190
4+
config_hash: 6209a285dd5980f5c418fe6575723aef

api.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,24 @@ from browserbase.types.sessions import SessionRecording, RecordingRetrieveRespon
130130

131131
Methods:
132132

133-
- <code title="get /v1/sessions/{id}/recording">client.sessions.recording.<a href="./src/browserbase/resources/sessions/recording.py">retrieve</a>(id) -> <a href="./src/browserbase/types/sessions/recording_retrieve_response.py">RecordingRetrieveResponse</a></code>
133+
- <code title="get /v1/sessions/{id}/recording">client.sessions.recording.<a href="./src/browserbase/resources/sessions/recording/recording.py">retrieve</a>(id) -> <a href="./src/browserbase/types/sessions/recording_retrieve_response.py">RecordingRetrieveResponse</a></code>
134+
135+
### Downloads
136+
137+
Types:
138+
139+
```python
140+
from browserbase.types.sessions.recording import (
141+
RecordingDownload,
142+
DownloadCreateResponse,
143+
DownloadListResponse,
144+
)
145+
```
146+
147+
Methods:
148+
149+
- <code title="post /v1/sessions/{id}/recording/downloads">client.sessions.recording.downloads.<a href="./src/browserbase/resources/sessions/recording/downloads.py">create</a>(id) -> <a href="./src/browserbase/types/sessions/recording/download_create_response.py">DownloadCreateResponse</a></code>
150+
- <code title="get /v1/sessions/{id}/recording/downloads">client.sessions.recording.downloads.<a href="./src/browserbase/resources/sessions/recording/downloads.py">list</a>(id) -> <a href="./src/browserbase/types/sessions/recording/download_list_response.py">DownloadListResponse</a></code>
134151

135152
## Uploads
136153

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .downloads import (
4+
DownloadsResource,
5+
AsyncDownloadsResource,
6+
DownloadsResourceWithRawResponse,
7+
AsyncDownloadsResourceWithRawResponse,
8+
DownloadsResourceWithStreamingResponse,
9+
AsyncDownloadsResourceWithStreamingResponse,
10+
)
11+
from .recording import (
12+
RecordingResource,
13+
AsyncRecordingResource,
14+
RecordingResourceWithRawResponse,
15+
AsyncRecordingResourceWithRawResponse,
16+
RecordingResourceWithStreamingResponse,
17+
AsyncRecordingResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"DownloadsResource",
22+
"AsyncDownloadsResource",
23+
"DownloadsResourceWithRawResponse",
24+
"AsyncDownloadsResourceWithRawResponse",
25+
"DownloadsResourceWithStreamingResponse",
26+
"AsyncDownloadsResourceWithStreamingResponse",
27+
"RecordingResource",
28+
"AsyncRecordingResource",
29+
"RecordingResourceWithRawResponse",
30+
"AsyncRecordingResourceWithRawResponse",
31+
"RecordingResourceWithStreamingResponse",
32+
"AsyncRecordingResourceWithStreamingResponse",
33+
]
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
import httpx
6+
7+
from ...._types import Body, Query, Headers, NotGiven, not_given
8+
from ...._utils import path_template
9+
from ...._compat import cached_property
10+
from ...._resource import SyncAPIResource, AsyncAPIResource
11+
from ...._response import (
12+
to_raw_response_wrapper,
13+
to_streamed_response_wrapper,
14+
async_to_raw_response_wrapper,
15+
async_to_streamed_response_wrapper,
16+
)
17+
from ...._base_client import make_request_options
18+
from ....types.sessions.recording.download_list_response import DownloadListResponse
19+
from ....types.sessions.recording.download_create_response import DownloadCreateResponse
20+
21+
__all__ = ["DownloadsResource", "AsyncDownloadsResource"]
22+
23+
24+
class DownloadsResource(SyncAPIResource):
25+
@cached_property
26+
def with_raw_response(self) -> DownloadsResourceWithRawResponse:
27+
"""
28+
This property can be used as a prefix for any HTTP method call to return
29+
the raw response object instead of the parsed content.
30+
31+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
32+
"""
33+
return DownloadsResourceWithRawResponse(self)
34+
35+
@cached_property
36+
def with_streaming_response(self) -> DownloadsResourceWithStreamingResponse:
37+
"""
38+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
39+
40+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
41+
"""
42+
return DownloadsResourceWithStreamingResponse(self)
43+
44+
def create(
45+
self,
46+
id: str,
47+
*,
48+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
49+
# The extra values given here take precedence over values defined on the client or passed to this method.
50+
extra_headers: Headers | None = None,
51+
extra_query: Query | None = None,
52+
extra_body: Body | None = None,
53+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
54+
) -> DownloadCreateResponse:
55+
"""Requests one downloadable MP4 per recorded page of a session.
56+
57+
Assembly runs
58+
asynchronously and every page returns as `PENDING`. Re-posting re-enqueues all
59+
pages and retries any that failed. Poll the GET endpoint for per-page status
60+
and, on standard (non-BYOS) projects, download URLs.
61+
62+
Args:
63+
extra_headers: Send extra headers
64+
65+
extra_query: Add additional query parameters to the request
66+
67+
extra_body: Add additional JSON properties to the request
68+
69+
timeout: Override the client-level default timeout for this request, in seconds
70+
"""
71+
if not id:
72+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
73+
return self._post(
74+
path_template("/v1/sessions/{id}/recording/downloads", id=id),
75+
options=make_request_options(
76+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
77+
),
78+
cast_to=DownloadCreateResponse,
79+
)
80+
81+
def list(
82+
self,
83+
id: str,
84+
*,
85+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
86+
# The extra values given here take precedence over values defined on the client or passed to this method.
87+
extra_headers: Headers | None = None,
88+
extra_query: Query | None = None,
89+
extra_body: Body | None = None,
90+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
91+
) -> DownloadListResponse:
92+
"""
93+
Returns the per-page download status for a session, with a short-lived signed
94+
URL for each completed page on standard (non-BYOS) projects.
95+
96+
Args:
97+
extra_headers: Send extra headers
98+
99+
extra_query: Add additional query parameters to the request
100+
101+
extra_body: Add additional JSON properties to the request
102+
103+
timeout: Override the client-level default timeout for this request, in seconds
104+
"""
105+
if not id:
106+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
107+
return self._get(
108+
path_template("/v1/sessions/{id}/recording/downloads", id=id),
109+
options=make_request_options(
110+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
111+
),
112+
cast_to=DownloadListResponse,
113+
)
114+
115+
116+
class AsyncDownloadsResource(AsyncAPIResource):
117+
@cached_property
118+
def with_raw_response(self) -> AsyncDownloadsResourceWithRawResponse:
119+
"""
120+
This property can be used as a prefix for any HTTP method call to return
121+
the raw response object instead of the parsed content.
122+
123+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
124+
"""
125+
return AsyncDownloadsResourceWithRawResponse(self)
126+
127+
@cached_property
128+
def with_streaming_response(self) -> AsyncDownloadsResourceWithStreamingResponse:
129+
"""
130+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
131+
132+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
133+
"""
134+
return AsyncDownloadsResourceWithStreamingResponse(self)
135+
136+
async def create(
137+
self,
138+
id: str,
139+
*,
140+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
141+
# The extra values given here take precedence over values defined on the client or passed to this method.
142+
extra_headers: Headers | None = None,
143+
extra_query: Query | None = None,
144+
extra_body: Body | None = None,
145+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
146+
) -> DownloadCreateResponse:
147+
"""Requests one downloadable MP4 per recorded page of a session.
148+
149+
Assembly runs
150+
asynchronously and every page returns as `PENDING`. Re-posting re-enqueues all
151+
pages and retries any that failed. Poll the GET endpoint for per-page status
152+
and, on standard (non-BYOS) projects, download URLs.
153+
154+
Args:
155+
extra_headers: Send extra headers
156+
157+
extra_query: Add additional query parameters to the request
158+
159+
extra_body: Add additional JSON properties to the request
160+
161+
timeout: Override the client-level default timeout for this request, in seconds
162+
"""
163+
if not id:
164+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
165+
return await self._post(
166+
path_template("/v1/sessions/{id}/recording/downloads", id=id),
167+
options=make_request_options(
168+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
169+
),
170+
cast_to=DownloadCreateResponse,
171+
)
172+
173+
async def list(
174+
self,
175+
id: str,
176+
*,
177+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
178+
# The extra values given here take precedence over values defined on the client or passed to this method.
179+
extra_headers: Headers | None = None,
180+
extra_query: Query | None = None,
181+
extra_body: Body | None = None,
182+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
183+
) -> DownloadListResponse:
184+
"""
185+
Returns the per-page download status for a session, with a short-lived signed
186+
URL for each completed page on standard (non-BYOS) projects.
187+
188+
Args:
189+
extra_headers: Send extra headers
190+
191+
extra_query: Add additional query parameters to the request
192+
193+
extra_body: Add additional JSON properties to the request
194+
195+
timeout: Override the client-level default timeout for this request, in seconds
196+
"""
197+
if not id:
198+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
199+
return await self._get(
200+
path_template("/v1/sessions/{id}/recording/downloads", id=id),
201+
options=make_request_options(
202+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
203+
),
204+
cast_to=DownloadListResponse,
205+
)
206+
207+
208+
class DownloadsResourceWithRawResponse:
209+
def __init__(self, downloads: DownloadsResource) -> None:
210+
self._downloads = downloads
211+
212+
self.create = to_raw_response_wrapper(
213+
downloads.create,
214+
)
215+
self.list = to_raw_response_wrapper(
216+
downloads.list,
217+
)
218+
219+
220+
class AsyncDownloadsResourceWithRawResponse:
221+
def __init__(self, downloads: AsyncDownloadsResource) -> None:
222+
self._downloads = downloads
223+
224+
self.create = async_to_raw_response_wrapper(
225+
downloads.create,
226+
)
227+
self.list = async_to_raw_response_wrapper(
228+
downloads.list,
229+
)
230+
231+
232+
class DownloadsResourceWithStreamingResponse:
233+
def __init__(self, downloads: DownloadsResource) -> None:
234+
self._downloads = downloads
235+
236+
self.create = to_streamed_response_wrapper(
237+
downloads.create,
238+
)
239+
self.list = to_streamed_response_wrapper(
240+
downloads.list,
241+
)
242+
243+
244+
class AsyncDownloadsResourceWithStreamingResponse:
245+
def __init__(self, downloads: AsyncDownloadsResource) -> None:
246+
self._downloads = downloads
247+
248+
self.create = async_to_streamed_response_wrapper(
249+
downloads.create,
250+
)
251+
self.list = async_to_streamed_response_wrapper(
252+
downloads.list,
253+
)

0 commit comments

Comments
 (0)