Skip to content

Commit 65abbd9

Browse files
committed
ci: regenerated with OpenAPI Doc 0.4.0, Speakeasy CLI 1.176.0
1 parent 20c6d4b commit 65abbd9

File tree

84 files changed

+323
-160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+323
-160
lines changed

.speakeasy/gen.lock

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: b0b519b1-d1d3-43b2-82dd-b4292eadd4b0
33
management:
4-
docChecksum: dff663dce4f21ddf3fc2332b7d7be92b
4+
docChecksum: 557634d4bb5964b949ae70f79f40d856
55
docVersion: 0.4.0
66
speakeasyVersion: internal
7-
generationVersion: 2.250.16
8-
releaseVersion: 5.1.0
9-
configChecksum: e8aa5833a2494c942488ff20935dee69
7+
generationVersion: 2.250.22
8+
releaseVersion: 5.2.0
9+
configChecksum: d1c2bec8a16d1c1fedb94c617e5344dc
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
@@ -20,6 +20,7 @@ features:
2020
globalServerURLs: 2.82.1
2121
globals: 2.81.1
2222
inputOutputModels: 2.83.0
23+
retries: 2.82.1
2324
serverIDs: 2.81.1
2425
generatedFiles:
2526
- src/speakeasy/sdkconfiguration.py
@@ -73,7 +74,7 @@ generatedFiles:
7374
- src/speakeasy/models/operations/getvalidembedaccesstokens.py
7475
- src/speakeasy/models/operations/revokeembedaccesstoken.py
7576
- src/speakeasy/models/operations/postworkspaceevents.py
76-
- src/speakeasy/models/shared/error.py
77+
- src/speakeasy/models/errors/error.py
7778
- src/speakeasy/models/shared/generateopenapispecdiff.py
7879
- src/speakeasy/models/shared/api.py
7980
- src/speakeasy/models/shared/api_input.py
@@ -165,7 +166,7 @@ generatedFiles:
165166
- docs/models/operations/revokeembedaccesstokenresponse.md
166167
- docs/models/operations/postworkspaceeventsrequest.md
167168
- docs/models/operations/postworkspaceeventsresponse.md
168-
- docs/models/shared/error.md
169+
- docs/models/errors/error.md
169170
- docs/models/shared/generateopenapispecdiff.md
170171
- docs/models/shared/api.md
171172
- docs/models/shared/apiinput.md
@@ -196,6 +197,7 @@ generatedFiles:
196197
- docs/sdks/auth/README.md
197198
- docs/sdks/requests/README.md
198199
- docs/sdks/embeds/README.md
200+
- docs/models/utils/retryconfig.md
199201
- docs/sdks/events/README.md
200202
- USAGE.md
201203
- .gitattributes

README.md

Lines changed: 105 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,15 @@ if res.apis is not None:
115115

116116
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
117117

118-
| Error Object | Status Code | Content Type |
119-
| --------------- | --------------- | --------------- |
120-
| errors.SDKError | 4x-5xx | */* |
118+
| Error Object | Status Code | Content Type |
119+
| ---------------- | ---------------- | ---------------- |
120+
| errors.Error | 5XX | application/json |
121+
| errors.SDKError | 4x-5xx | */* |
121122

122123
### Example
123124

124125
```python
126+
import dateutil.parser
125127
import speakeasy
126128
from speakeasy.models import operations, shared
127129

@@ -132,14 +134,28 @@ s = speakeasy.Speakeasy(
132134
workspace_id='string',
133135
)
134136

135-
req = operations.DeleteAPIRequest(
136-
api_id='string',
137-
version_id='string',
137+
req = operations.PostWorkspaceEventsRequest(
138+
request_body=[
139+
shared.CliEvent(
140+
created_at=dateutil.parser.isoparse('2024-11-21T06:58:42.120Z'),
141+
execution_id='string',
142+
id='<ID>',
143+
interaction_type=shared.InteractionType.CLI_EXEC,
144+
local_started_at=dateutil.parser.isoparse('2024-05-07T12:35:47.182Z'),
145+
speakeasy_api_key_name='string',
146+
speakeasy_version='string',
147+
success=False,
148+
workspace_id='string',
149+
),
150+
],
138151
)
139152

140153
res = None
141154
try:
142-
res = s.apis.delete_api(req)
155+
res = s.events.post_workspace_events(req)
156+
except errors.Error as e:
157+
print(e) # handle exception
158+
raise(e)
143159
except errors.SDKError as e:
144160
print(e) # handle exception
145161
raise(e)
@@ -329,6 +345,88 @@ if res.status_code == 200:
329345
```
330346
<!-- End Global Parameters [global-parameters] -->
331347

348+
<!-- Start Retries [retries] -->
349+
## Retries
350+
351+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
352+
353+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
354+
```python
355+
import dateutil.parser
356+
import speakeasy
357+
from speakeasy.models import operations, shared
358+
from speakeasy.utils import BackoffStrategy, RetryConfig
359+
360+
s = speakeasy.Speakeasy(
361+
security=shared.Security(
362+
api_key="<YOUR_API_KEY_HERE>",
363+
),
364+
workspace_id='string',
365+
)
366+
367+
req = operations.PostWorkspaceEventsRequest(
368+
request_body=[
369+
shared.CliEvent(
370+
created_at=dateutil.parser.isoparse('2024-11-21T06:58:42.120Z'),
371+
execution_id='string',
372+
id='<ID>',
373+
interaction_type=shared.InteractionType.CLI_EXEC,
374+
local_started_at=dateutil.parser.isoparse('2024-05-07T12:35:47.182Z'),
375+
speakeasy_api_key_name='string',
376+
speakeasy_version='string',
377+
success=False,
378+
workspace_id='string',
379+
),
380+
],
381+
)
382+
383+
res = s.events.post_workspace_events(req,
384+
RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))
385+
386+
if res.status_code == 200:
387+
# handle response
388+
pass
389+
```
390+
391+
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
392+
```python
393+
import dateutil.parser
394+
import speakeasy
395+
from speakeasy.models import operations, shared
396+
from speakeasy.utils import BackoffStrategy, RetryConfig
397+
398+
s = speakeasy.Speakeasy(
399+
retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False)
400+
security=shared.Security(
401+
api_key="<YOUR_API_KEY_HERE>",
402+
),
403+
workspace_id='string',
404+
)
405+
406+
req = operations.PostWorkspaceEventsRequest(
407+
request_body=[
408+
shared.CliEvent(
409+
created_at=dateutil.parser.isoparse('2024-11-21T06:58:42.120Z'),
410+
execution_id='string',
411+
id='<ID>',
412+
interaction_type=shared.InteractionType.CLI_EXEC,
413+
local_started_at=dateutil.parser.isoparse('2024-05-07T12:35:47.182Z'),
414+
speakeasy_api_key_name='string',
415+
speakeasy_version='string',
416+
success=False,
417+
workspace_id='string',
418+
),
419+
],
420+
)
421+
422+
res = s.events.post_workspace_events(req)
423+
424+
if res.status_code == 200:
425+
# handle response
426+
pass
427+
```
428+
<!-- End Retries [retries] -->
429+
332430
<!-- Placeholder for Future Speakeasy SDK Sections -->
333431

334432

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,4 +1196,14 @@ Based on:
11961196
### Generated
11971197
- [python v5.1.0] .
11981198
### Releases
1199-
- [PyPI v5.1.0] https://pypi.org/project/speakeasy-client-sdk-python/5.1.0 - .
1199+
- [PyPI v5.1.0] https://pypi.org/project/speakeasy-client-sdk-python/5.1.0 - .
1200+
1201+
## 2024-02-09 00:10:13
1202+
### Changes
1203+
Based on:
1204+
- OpenAPI Doc 0.4.0 https://docs.speakeasyapi.dev/openapi.yaml
1205+
- Speakeasy CLI 1.176.0 (2.250.22) https://github.com/speakeasy-api/speakeasy
1206+
### Generated
1207+
- [python v5.2.0] .
1208+
### Releases
1209+
- [PyPI v5.2.0] https://pypi.org/project/speakeasy-client-sdk-python/5.2.0 - .
File renamed without changes.

docs/models/operations/deleteapiendpointresponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
99
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
1010
| `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[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | Default error response |
11+
| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Default error response |

docs/models/operations/deleteapiresponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
99
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
1010
| `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[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | Default error response |
11+
| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Default error response |

docs/models/operations/deleteschemaresponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
99
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
1010
| `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[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | Default error response |
11+
| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Default error response |

docs/models/operations/deleteversionmetadataresponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
99
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
1010
| `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[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | Default error response |
11+
| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Default error response |

docs/models/operations/downloadschemaresponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
1111
| `two_hundred_application_json_schema` | *Optional[requests_http.Response]* | :heavy_minus_sign: | OK |
1212
| `two_hundred_application_x_yaml_schema` | *Optional[requests_http.Response]* | :heavy_minus_sign: | OK |
13-
| `error` | [Optional[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | Default error response |
13+
| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Default error response |

docs/models/operations/downloadschemarevisionresponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
1111
| `two_hundred_application_json_schema` | *Optional[requests_http.Response]* | :heavy_minus_sign: | OK |
1212
| `two_hundred_application_x_yaml_schema` | *Optional[requests_http.Response]* | :heavy_minus_sign: | OK |
13-
| `error` | [Optional[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | Default error response |
13+
| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Default error response |

0 commit comments

Comments
 (0)