Skip to content

Commit fa8005d

Browse files
committed
ci: regenerated with OpenAPI Doc 0.4.0 ., Speakeasy CLI 1.277.8
1 parent 6824ecb commit fa8005d

File tree

18 files changed

+229
-82
lines changed

18 files changed

+229
-82
lines changed

.speakeasy/gen.lock

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
lockVersion: 2.0.0
22
id: b0b519b1-d1d3-43b2-82dd-b4292eadd4b0
33
management:
4-
docChecksum: e87f7661ef116d09df25c842b1032981
4+
docChecksum: 1710218668d467d8f56c88d745bfdf80
55
docVersion: 0.4.0 .
6-
speakeasyVersion: 1.277.0
7-
generationVersion: 2.317.0
8-
releaseVersion: 5.6.12
9-
configChecksum: 07ee419dccd2777287e8afcfc0972899
6+
speakeasyVersion: 1.277.8
7+
generationVersion: 2.319.10
8+
releaseVersion: 5.7.0
9+
configChecksum: 8bbd4341c19f8d7e8c265101ef155959
1010
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-python.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-python.git
1313
published: true
1414
features:
1515
python:
16-
core: 4.6.5
16+
acceptHeaders: 2.81.2
17+
core: 4.6.7
1718
downloadStreams: 0.0.2
1819
examples: 2.81.3
1920
globalSecurity: 2.83.5
@@ -45,7 +46,6 @@ generatedFiles:
4546
- src/speakeasy/utils/retries.py
4647
- src/speakeasy/utils/utils.py
4748
- src/speakeasy/models/errors/sdkerror.py
48-
- tests/helpers.py
4949
- src/speakeasy/models/operations/deleteapi.py
5050
- src/speakeasy/models/operations/generateopenapispec.py
5151
- src/speakeasy/models/operations/generatepostmancollection.py
@@ -76,6 +76,7 @@ generatedFiles:
7676
- src/speakeasy/models/operations/getnamespaces.py
7777
- src/speakeasy/models/operations/getrevisions.py
7878
- src/speakeasy/models/operations/gettags.py
79+
- src/speakeasy/models/operations/posttags.py
7980
- src/speakeasy/models/operations/preflight.py
8081
- src/speakeasy/models/operations/getaccesstoken.py
8182
- src/speakeasy/models/operations/getuser.py
@@ -114,6 +115,7 @@ generatedFiles:
114115
- src/speakeasy/models/shared/revision.py
115116
- src/speakeasy/models/shared/gettagsresponse.py
116117
- src/speakeasy/models/shared/tag.py
118+
- src/speakeasy/models/shared/addtags.py
117119
- src/speakeasy/models/shared/preflighttoken.py
118120
- src/speakeasy/models/shared/preflightrequest.py
119121
- src/speakeasy/models/shared/accesstoken.py
@@ -202,6 +204,8 @@ generatedFiles:
202204
- docs/models/operations/getrevisionsresponse.md
203205
- docs/models/operations/gettagsrequest.md
204206
- docs/models/operations/gettagsresponse.md
207+
- docs/models/operations/posttagsrequest.md
208+
- docs/models/operations/posttagsresponse.md
205209
- docs/models/operations/preflightresponse.md
206210
- docs/models/operations/getaccesstokenrequest.md
207211
- docs/models/operations/getaccesstokenresponse.md
@@ -263,6 +267,7 @@ generatedFiles:
263267
- docs/models/shared/revision.md
264268
- docs/models/shared/gettagsresponse.md
265269
- docs/models/shared/tag.md
270+
- docs/models/shared/addtags.md
266271
- docs/models/shared/preflighttoken.md
267272
- docs/models/shared/preflightrequest.md
268273
- docs/models/shared/claims.md

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ if res.apis is not None:
8282
* [get_namespaces](docs/sdks/artifacts/README.md#get_namespaces) - Each namespace contains many revisions.
8383
* [get_revisions](docs/sdks/artifacts/README.md#get_revisions)
8484
* [get_tags](docs/sdks/artifacts/README.md#get_tags)
85+
* [post_tags](docs/sdks/artifacts/README.md#post_tags) - Add tags to an existing revision
8586
* [preflight](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints
8687

8788
### [auth](docs/sdks/auth/README.md)

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,4 +1506,14 @@ Based on:
15061506
### Generated
15071507
- [python v5.6.12] .
15081508
### Releases
1509-
- [PyPI v5.6.12] https://pypi.org/project/speakeasy-client-sdk-python/5.6.12 - .
1509+
- [PyPI v5.6.12] https://pypi.org/project/speakeasy-client-sdk-python/5.6.12 - .
1510+
1511+
## 2024-05-03 00:11:11
1512+
### Changes
1513+
Based on:
1514+
- OpenAPI Doc 0.4.0 . https://docs.speakeasyapi.dev/openapi.yaml
1515+
- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy
1516+
### Generated
1517+
- [python v5.7.0] .
1518+
### Releases
1519+
- [PyPI v5.7.0] https://pypi.org/project/speakeasy-client-sdk-python/5.7.0 - .
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PostTagsRequest
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
8+
| `namespace_name` | *str* | :heavy_check_mark: | N/A |
9+
| `add_tags` | [Optional[shared.AddTags]](../../models/shared/addtags.md) | :heavy_minus_sign: | A JSON representation of the tags to add |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# PostTagsResponse
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
8+
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
9+
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
10+
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
11+
| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Default error response |

docs/models/shared/addtags.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AddTags
2+
3+
Request body of tags to add to a revision
4+
5+
6+
## Fields
7+
8+
| Field | Type | Required | Description |
9+
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
10+
| `revision_digest` | *str* | :heavy_check_mark: | revision digest to add tags too sha256:... |
11+
| `tags` | List[*str*] | :heavy_check_mark: | string tags to add to the revision |

docs/sdks/artifacts/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* [get_namespaces](#get_namespaces) - Each namespace contains many revisions.
99
* [get_revisions](#get_revisions)
1010
* [get_tags](#get_tags)
11+
* [post_tags](#post_tags) - Add tags to an existing revision
1112
* [preflight](#preflight) - Get access token for communicating with OCI distribution endpoints
1213

1314
## get_blob
@@ -228,6 +229,51 @@ if res.get_tags_response is not None:
228229
| --------------- | --------------- | --------------- |
229230
| errors.SDKError | 4xx-5xx | */* |
230231

232+
## post_tags
233+
234+
Add tags to an existing revision
235+
236+
### Example Usage
237+
238+
```python
239+
import speakeasy
240+
from speakeasy.models import operations, shared
241+
242+
s = speakeasy.Speakeasy(
243+
security=shared.Security(
244+
api_key="<YOUR_API_KEY_HERE>",
245+
),
246+
workspace_id='<value>',
247+
)
248+
249+
req = operations.PostTagsRequest(
250+
namespace_name='<value>',
251+
)
252+
253+
res = s.artifacts.post_tags(req)
254+
255+
if res is not None:
256+
# handle response
257+
pass
258+
259+
```
260+
261+
### Parameters
262+
263+
| Parameter | Type | Required | Description |
264+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
265+
| `request` | [operations.PostTagsRequest](../../models/operations/posttagsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
266+
267+
268+
### Response
269+
270+
**[operations.PostTagsResponse](../../models/operations/posttagsresponse.md)**
271+
### Errors
272+
273+
| Error Object | Status Code | Content Type |
274+
| --------------- | --------------- | --------------- |
275+
| errors.SDKError | 4xx-5xx | */* |
276+
231277
## preflight
232278

233279
Get access token for communicating with OCI distribution endpoints

gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ generation:
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
1212
python:
13-
version: 5.6.12
13+
version: 5.7.0
1414
additionalDependencies:
1515
dependencies: {}
1616
extraDependencies:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
setuptools.setup(
2121
name='speakeasy-client-sdk-python',
22-
version='5.6.12',
22+
version='5.7.0',
2323
author='Speakeasy',
2424
description='Speakeasy API Client SDK for Python',
2525
url='https://github.com/speakeasy-api/speakeasy-client-sdk-python.git',

src/speakeasy/artifacts.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,63 @@ def get_tags(self, request: operations.GetTagsRequest) -> operations.GetTagsResp
323323

324324

325325

326+
def post_tags(self, request: operations.PostTagsRequest) -> operations.PostTagsResponse:
327+
r"""Add tags to an existing revision"""
328+
hook_ctx = HookContext(operation_id='postTags', oauth2_scopes=[], security_source=self.sdk_configuration.security)
329+
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
330+
331+
url = utils.generate_url(base_url, '/v1/artifacts/namespaces/{namespace_name}/tags', request)
332+
333+
if callable(self.sdk_configuration.security):
334+
headers, query_params = utils.get_security(self.sdk_configuration.security())
335+
else:
336+
headers, query_params = utils.get_security(self.sdk_configuration.security)
337+
338+
req_content_type, data, form = utils.serialize_request_body(request, operations.PostTagsRequest, "add_tags", False, True, 'json')
339+
if req_content_type is not None and req_content_type not in ('multipart/form-data', 'multipart/mixed'):
340+
headers['content-type'] = req_content_type
341+
headers['Accept'] = 'application/json'
342+
headers['user-agent'] = self.sdk_configuration.user_agent
343+
client = self.sdk_configuration.client
344+
345+
try:
346+
req = client.prepare_request(requests_http.Request('POST', url, params=query_params, data=data, files=form, headers=headers))
347+
req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req)
348+
http_res = client.send(req)
349+
except Exception as e:
350+
_, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e)
351+
if e is not None:
352+
raise e
353+
354+
if utils.match_status_codes(['4XX','5XX'], http_res.status_code):
355+
result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None)
356+
if e is not None:
357+
raise e
358+
if result is not None:
359+
http_res = result
360+
else:
361+
http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res)
362+
363+
364+
365+
res = operations.PostTagsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res)
366+
367+
if http_res.status_code == 200:
368+
pass
369+
elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
370+
raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
371+
else:
372+
if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'):
373+
out = utils.unmarshal_json(http_res.text, Optional[errors.Error])
374+
res.error = out
375+
else:
376+
content_type = http_res.headers.get('Content-Type')
377+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
378+
379+
return res
380+
381+
382+
326383
def preflight(self, request: Optional[shared.PreflightRequest]) -> operations.PreflightResponse:
327384
r"""Get access token for communicating with OCI distribution endpoints"""
328385
hook_ctx = HookContext(operation_id='preflight', oauth2_scopes=[], security_source=self.sdk_configuration.security)

0 commit comments

Comments
 (0)