Skip to content

Commit cbc0191

Browse files
authored
Merge pull request #119 from steel-dev/release-please--branches--main--changes--next
2 parents 7c0d770 + 38e8642 commit cbc0191

11 files changed

Lines changed: 189 additions & 19 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.8.0"
2+
".": "0.9.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 33
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-44f289567c281ce445273c28f44fe7ccd44979172c4933bfbfe63bb5f119640c.yml
3-
openapi_spec_hash: 449cf480b2d477ef67ff32992734fb8c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-b5496a8d20faef3918563bbf1563b9c1f0ab280fa0aa32baca55faa95c8d8266.yml
3+
openapi_spec_hash: b776cb76def983d026964ea90cdb3e29
44
config_hash: 3dda15a7a3da8ba8e97a8ec239cbcb80

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.9.0 (2025-08-22)
4+
5+
Full Changelog: [v0.8.0...v0.9.0](https://github.com/steel-dev/steel-python/compare/v0.8.0...v0.9.0)
6+
7+
### Features
8+
9+
* **api:** api update ([27c6eec](https://github.com/steel-dev/steel-python/commit/27c6eeca51e709af636e6e7cd324eb9b4fbcc5f6))
10+
311
## 0.8.0 (2025-08-21)
412

513
Full Changelog: [v0.7.0...v0.8.0](https://github.com/steel-dev/steel-python/compare/v0.7.0...v0.8.0)

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ from steel.types import (
115115

116116
Methods:
117117

118-
- <code title="put /v1/extensions/{extensionId}">client.extensions.<a href="./src/steel/resources/extensions.py">update</a>(extension_id) -> <a href="./src/steel/types/extension_update_response.py">ExtensionUpdateResponse</a></code>
118+
- <code title="put /v1/extensions/{extensionId}">client.extensions.<a href="./src/steel/resources/extensions.py">update</a>(extension_id, \*\*<a href="src/steel/types/extension_update_params.py">params</a>) -> <a href="./src/steel/types/extension_update_response.py">ExtensionUpdateResponse</a></code>
119119
- <code title="get /v1/extensions">client.extensions.<a href="./src/steel/resources/extensions.py">list</a>() -> <a href="./src/steel/types/extension_list_response.py">ExtensionListResponse</a></code>
120120
- <code title="delete /v1/extensions/{extensionId}">client.extensions.<a href="./src/steel/resources/extensions.py">delete</a>(extension_id) -> <a href="./src/steel/types/extension_delete_response.py">ExtensionDeleteResponse</a></code>
121121
- <code title="delete /v1/extensions">client.extensions.<a href="./src/steel/resources/extensions.py">delete_all</a>() -> <a href="./src/steel/types/extension_delete_all_response.py">ExtensionDeleteAllResponse</a></code>
122122
- <code title="get /v1/extensions/{extensionId}">client.extensions.<a href="./src/steel/resources/extensions.py">download</a>(extension_id) -> str</code>
123-
- <code title="post /v1/extensions">client.extensions.<a href="./src/steel/resources/extensions.py">upload</a>() -> <a href="./src/steel/types/extension_upload_response.py">ExtensionUploadResponse</a></code>
123+
- <code title="post /v1/extensions">client.extensions.<a href="./src/steel/resources/extensions.py">upload</a>(\*\*<a href="src/steel/types/extension_upload_params.py">params</a>) -> <a href="./src/steel/types/extension_upload_response.py">ExtensionUploadResponse</a></code>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "steel-sdk"
3-
version = "0.8.0"
3+
version = "0.9.0"
44
description = "The official Python library for the steel API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/steel/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "steel"
4-
__version__ = "0.8.0" # x-release-please-version
4+
__version__ = "0.9.0" # x-release-please-version

src/steel/resources/extensions.py

Lines changed: 100 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
import httpx
66

7+
from ..types import extension_update_params, extension_upload_params
78
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
9+
from .._utils import maybe_transform, async_maybe_transform
810
from .._compat import cached_property
911
from .._resource import SyncAPIResource, AsyncAPIResource
1012
from .._response import (
@@ -47,6 +49,8 @@ def update(
4749
self,
4850
extension_id: str,
4951
*,
52+
file: object | NotGiven = NOT_GIVEN,
53+
url: str | NotGiven = NOT_GIVEN,
5054
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5155
# The extra values given here take precedence over values defined on the client or passed to this method.
5256
extra_headers: Headers | None = None,
@@ -55,9 +59,14 @@ def update(
5559
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
5660
) -> ExtensionUpdateResponse:
5761
"""
58-
Update a Chrome extension (.zip/.crx file) for the organization
62+
Update a Chrome extension (.zip/.crx file or Chrome Web Store URL) for the
63+
organization
5964
6065
Args:
66+
file: Extension .zip/.crx file
67+
68+
url: Extension URL
69+
6170
extra_headers: Send extra headers
6271
6372
extra_query: Add additional query parameters to the request
@@ -68,8 +77,19 @@ def update(
6877
"""
6978
if not extension_id:
7079
raise ValueError(f"Expected a non-empty value for `extension_id` but received {extension_id!r}")
80+
# It should be noted that the actual Content-Type header that will be
81+
# sent to the server will contain a `boundary` parameter, e.g.
82+
# multipart/form-data; boundary=---abc--
83+
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
7184
return self._put(
7285
f"/v1/extensions/{extension_id}",
86+
body=maybe_transform(
87+
{
88+
"file": file,
89+
"url": url,
90+
},
91+
extension_update_params.ExtensionUpdateParams,
92+
),
7393
options=make_request_options(
7494
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
7595
),
@@ -183,16 +203,45 @@ def download(
183203
def upload(
184204
self,
185205
*,
206+
file: object | NotGiven = NOT_GIVEN,
207+
url: str | NotGiven = NOT_GIVEN,
186208
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
187209
# The extra values given here take precedence over values defined on the client or passed to this method.
188210
extra_headers: Headers | None = None,
189211
extra_query: Query | None = None,
190212
extra_body: Body | None = None,
191213
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
192214
) -> ExtensionUploadResponse:
193-
"""Upload a Chrome extension (.zip/.crx file) for the organization"""
215+
"""
216+
Upload a Chrome extension (.zip/.crx file or Chrome Web Store URL) for the
217+
organization
218+
219+
Args:
220+
file: Extension .zip/.crx file
221+
222+
url: Extension URL
223+
224+
extra_headers: Send extra headers
225+
226+
extra_query: Add additional query parameters to the request
227+
228+
extra_body: Add additional JSON properties to the request
229+
230+
timeout: Override the client-level default timeout for this request, in seconds
231+
"""
232+
# It should be noted that the actual Content-Type header that will be
233+
# sent to the server will contain a `boundary` parameter, e.g.
234+
# multipart/form-data; boundary=---abc--
235+
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
194236
return self._post(
195237
"/v1/extensions",
238+
body=maybe_transform(
239+
{
240+
"file": file,
241+
"url": url,
242+
},
243+
extension_upload_params.ExtensionUploadParams,
244+
),
196245
options=make_request_options(
197246
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
198247
),
@@ -224,6 +273,8 @@ async def update(
224273
self,
225274
extension_id: str,
226275
*,
276+
file: object | NotGiven = NOT_GIVEN,
277+
url: str | NotGiven = NOT_GIVEN,
227278
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
228279
# The extra values given here take precedence over values defined on the client or passed to this method.
229280
extra_headers: Headers | None = None,
@@ -232,9 +283,14 @@ async def update(
232283
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
233284
) -> ExtensionUpdateResponse:
234285
"""
235-
Update a Chrome extension (.zip/.crx file) for the organization
286+
Update a Chrome extension (.zip/.crx file or Chrome Web Store URL) for the
287+
organization
236288
237289
Args:
290+
file: Extension .zip/.crx file
291+
292+
url: Extension URL
293+
238294
extra_headers: Send extra headers
239295
240296
extra_query: Add additional query parameters to the request
@@ -245,8 +301,19 @@ async def update(
245301
"""
246302
if not extension_id:
247303
raise ValueError(f"Expected a non-empty value for `extension_id` but received {extension_id!r}")
304+
# It should be noted that the actual Content-Type header that will be
305+
# sent to the server will contain a `boundary` parameter, e.g.
306+
# multipart/form-data; boundary=---abc--
307+
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
248308
return await self._put(
249309
f"/v1/extensions/{extension_id}",
310+
body=await async_maybe_transform(
311+
{
312+
"file": file,
313+
"url": url,
314+
},
315+
extension_update_params.ExtensionUpdateParams,
316+
),
250317
options=make_request_options(
251318
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
252319
),
@@ -360,16 +427,45 @@ async def download(
360427
async def upload(
361428
self,
362429
*,
430+
file: object | NotGiven = NOT_GIVEN,
431+
url: str | NotGiven = NOT_GIVEN,
363432
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
364433
# The extra values given here take precedence over values defined on the client or passed to this method.
365434
extra_headers: Headers | None = None,
366435
extra_query: Query | None = None,
367436
extra_body: Body | None = None,
368437
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
369438
) -> ExtensionUploadResponse:
370-
"""Upload a Chrome extension (.zip/.crx file) for the organization"""
439+
"""
440+
Upload a Chrome extension (.zip/.crx file or Chrome Web Store URL) for the
441+
organization
442+
443+
Args:
444+
file: Extension .zip/.crx file
445+
446+
url: Extension URL
447+
448+
extra_headers: Send extra headers
449+
450+
extra_query: Add additional query parameters to the request
451+
452+
extra_body: Add additional JSON properties to the request
453+
454+
timeout: Override the client-level default timeout for this request, in seconds
455+
"""
456+
# It should be noted that the actual Content-Type header that will be
457+
# sent to the server will contain a `boundary` parameter, e.g.
458+
# multipart/form-data; boundary=---abc--
459+
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
371460
return await self._post(
372461
"/v1/extensions",
462+
body=await async_maybe_transform(
463+
{
464+
"file": file,
465+
"url": url,
466+
},
467+
extension_upload_params.ExtensionUploadParams,
468+
),
373469
options=make_request_options(
374470
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
375471
),

src/steel/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
from .session_create_params import SessionCreateParams as SessionCreateParams
1818
from .credential_list_params import CredentialListParams as CredentialListParams
1919
from .extension_list_response import ExtensionListResponse as ExtensionListResponse
20+
from .extension_update_params import ExtensionUpdateParams as ExtensionUpdateParams
21+
from .extension_upload_params import ExtensionUploadParams as ExtensionUploadParams
2022
from .session_events_response import SessionEventsResponse as SessionEventsResponse
2123
from .client_screenshot_params import ClientScreenshotParams as ClientScreenshotParams
2224
from .credential_create_params import CredentialCreateParams as CredentialCreateParams
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import TypedDict
6+
7+
__all__ = ["ExtensionUpdateParams"]
8+
9+
10+
class ExtensionUpdateParams(TypedDict, total=False):
11+
file: object
12+
"""Extension .zip/.crx file"""
13+
14+
url: str
15+
"""Extension URL"""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import TypedDict
6+
7+
__all__ = ["ExtensionUploadParams"]
8+
9+
10+
class ExtensionUploadParams(TypedDict, total=False):
11+
file: object
12+
"""Extension .zip/.crx file"""
13+
14+
url: str
15+
"""Extension URL"""

0 commit comments

Comments
 (0)