vellum-ai 1.1.0__py3-none-any.whl → 1.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vellum/client/README.md +0 -55
- vellum/client/__init__.py +159 -873
- vellum/client/core/__init__.py +3 -0
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/core/http_response.py +47 -0
- vellum/client/core/pydantic_utilities.py +10 -3
- vellum/client/raw_client.py +1561 -0
- vellum/client/reference.md +20 -693
- vellum/client/resources/ad_hoc/client.py +55 -161
- vellum/client/resources/ad_hoc/raw_client.py +278 -0
- vellum/client/resources/container_images/client.py +62 -172
- vellum/client/resources/container_images/raw_client.py +400 -0
- vellum/client/resources/deployments/client.py +112 -437
- vellum/client/resources/deployments/raw_client.py +995 -0
- vellum/client/resources/document_indexes/client.py +108 -317
- vellum/client/resources/document_indexes/raw_client.py +847 -0
- vellum/client/resources/documents/client.py +88 -285
- vellum/client/resources/documents/raw_client.py +655 -0
- vellum/client/resources/folder_entities/client.py +54 -92
- vellum/client/resources/folder_entities/raw_client.py +277 -0
- vellum/client/resources/metric_definitions/client.py +48 -95
- vellum/client/resources/metric_definitions/raw_client.py +225 -0
- vellum/client/resources/ml_models/client.py +36 -40
- vellum/client/resources/ml_models/raw_client.py +103 -0
- vellum/client/resources/organizations/client.py +34 -39
- vellum/client/resources/organizations/raw_client.py +96 -0
- vellum/client/resources/prompts/client.py +50 -193
- vellum/client/resources/prompts/raw_client.py +346 -0
- vellum/client/resources/sandboxes/client.py +68 -141
- vellum/client/resources/sandboxes/raw_client.py +393 -0
- vellum/client/resources/test_suite_runs/client.py +58 -141
- vellum/client/resources/test_suite_runs/raw_client.py +355 -0
- vellum/client/resources/test_suites/client.py +73 -141
- vellum/client/resources/test_suites/raw_client.py +379 -0
- vellum/client/resources/workflow_deployments/client.py +118 -362
- vellum/client/resources/workflow_deployments/raw_client.py +931 -0
- vellum/client/resources/workflow_executions/client.py +36 -40
- vellum/client/resources/workflow_executions/raw_client.py +97 -0
- vellum/client/resources/workflow_sandboxes/client.py +60 -108
- vellum/client/resources/workflow_sandboxes/raw_client.py +300 -0
- vellum/client/resources/workflows/client.py +68 -133
- vellum/client/resources/workflows/raw_client.py +307 -0
- vellum/client/resources/workspace_secrets/client.py +46 -90
- vellum/client/resources/workspace_secrets/raw_client.py +220 -0
- vellum/client/resources/workspaces/client.py +34 -39
- vellum/client/resources/workspaces/raw_client.py +96 -0
- vellum/core/http_response.py +3 -0
- vellum/raw_client.py +3 -0
- vellum/resources/ad_hoc/raw_client.py +3 -0
- vellum/resources/container_images/raw_client.py +3 -0
- vellum/resources/deployments/raw_client.py +3 -0
- vellum/resources/document_indexes/raw_client.py +3 -0
- vellum/resources/documents/raw_client.py +3 -0
- vellum/resources/folder_entities/raw_client.py +3 -0
- vellum/resources/metric_definitions/raw_client.py +3 -0
- vellum/resources/ml_models/raw_client.py +3 -0
- vellum/resources/organizations/raw_client.py +3 -0
- vellum/resources/prompts/raw_client.py +3 -0
- vellum/resources/sandboxes/raw_client.py +3 -0
- vellum/resources/test_suite_runs/raw_client.py +3 -0
- vellum/resources/test_suites/raw_client.py +3 -0
- vellum/resources/workflow_deployments/raw_client.py +3 -0
- vellum/resources/workflow_executions/raw_client.py +3 -0
- vellum/resources/workflow_sandboxes/raw_client.py +3 -0
- vellum/resources/workflows/raw_client.py +3 -0
- vellum/resources/workspace_secrets/raw_client.py +3 -0
- vellum/resources/workspaces/raw_client.py +3 -0
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/METADATA +1 -1
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/RECORD +76 -33
- vellum_ee/workflows/display/exceptions.py +7 -0
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +2 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +53 -2
- vellum_ee/workflows/display/workflows/base_workflow_display.py +2 -1
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/LICENSE +0 -0
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/WHEEL +0 -0
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,931 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
from ...core.client_wrapper import SyncClientWrapper
|
5
|
+
from .types.workflow_deployments_list_request_status import WorkflowDeploymentsListRequestStatus
|
6
|
+
from ...core.request_options import RequestOptions
|
7
|
+
from ...core.http_response import HttpResponse
|
8
|
+
from ...types.paginated_slim_workflow_deployment_list import PaginatedSlimWorkflowDeploymentList
|
9
|
+
from ...core.pydantic_utilities import parse_obj_as
|
10
|
+
from json.decoder import JSONDecodeError
|
11
|
+
from ...core.api_error import ApiError
|
12
|
+
from ...types.workflow_deployment_read import WorkflowDeploymentRead
|
13
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
14
|
+
from ...types.workflow_deployment_event_executions_response import WorkflowDeploymentEventExecutionsResponse
|
15
|
+
from ...types.workflow_event_execution_read import WorkflowEventExecutionRead
|
16
|
+
from ...types.workflow_deployment_history_item import WorkflowDeploymentHistoryItem
|
17
|
+
from .types.list_workflow_release_tags_request_source import ListWorkflowReleaseTagsRequestSource
|
18
|
+
from ...types.paginated_workflow_release_tag_read_list import PaginatedWorkflowReleaseTagReadList
|
19
|
+
from ...types.workflow_release_tag_read import WorkflowReleaseTagRead
|
20
|
+
from ...types.workflow_deployment_release import WorkflowDeploymentRelease
|
21
|
+
from ...core.client_wrapper import AsyncClientWrapper
|
22
|
+
from ...core.http_response import AsyncHttpResponse
|
23
|
+
|
24
|
+
# this is used as the default value for optional parameters
|
25
|
+
OMIT = typing.cast(typing.Any, ...)
|
26
|
+
|
27
|
+
|
28
|
+
class RawWorkflowDeploymentsClient:
|
29
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
30
|
+
self._client_wrapper = client_wrapper
|
31
|
+
|
32
|
+
def list(
|
33
|
+
self,
|
34
|
+
*,
|
35
|
+
limit: typing.Optional[int] = None,
|
36
|
+
offset: typing.Optional[int] = None,
|
37
|
+
ordering: typing.Optional[str] = None,
|
38
|
+
status: typing.Optional[WorkflowDeploymentsListRequestStatus] = None,
|
39
|
+
request_options: typing.Optional[RequestOptions] = None,
|
40
|
+
) -> HttpResponse[PaginatedSlimWorkflowDeploymentList]:
|
41
|
+
"""
|
42
|
+
Used to list all Workflow Deployments.
|
43
|
+
|
44
|
+
Parameters
|
45
|
+
----------
|
46
|
+
limit : typing.Optional[int]
|
47
|
+
Number of results to return per page.
|
48
|
+
|
49
|
+
offset : typing.Optional[int]
|
50
|
+
The initial index from which to return the results.
|
51
|
+
|
52
|
+
ordering : typing.Optional[str]
|
53
|
+
Which field to use when ordering the results.
|
54
|
+
|
55
|
+
status : typing.Optional[WorkflowDeploymentsListRequestStatus]
|
56
|
+
status
|
57
|
+
|
58
|
+
request_options : typing.Optional[RequestOptions]
|
59
|
+
Request-specific configuration.
|
60
|
+
|
61
|
+
Returns
|
62
|
+
-------
|
63
|
+
HttpResponse[PaginatedSlimWorkflowDeploymentList]
|
64
|
+
|
65
|
+
"""
|
66
|
+
_response = self._client_wrapper.httpx_client.request(
|
67
|
+
"v1/workflow-deployments",
|
68
|
+
base_url=self._client_wrapper.get_environment().default,
|
69
|
+
method="GET",
|
70
|
+
params={
|
71
|
+
"limit": limit,
|
72
|
+
"offset": offset,
|
73
|
+
"ordering": ordering,
|
74
|
+
"status": status,
|
75
|
+
},
|
76
|
+
request_options=request_options,
|
77
|
+
)
|
78
|
+
try:
|
79
|
+
if 200 <= _response.status_code < 300:
|
80
|
+
_data = typing.cast(
|
81
|
+
PaginatedSlimWorkflowDeploymentList,
|
82
|
+
parse_obj_as(
|
83
|
+
type_=PaginatedSlimWorkflowDeploymentList, # type: ignore
|
84
|
+
object_=_response.json(),
|
85
|
+
),
|
86
|
+
)
|
87
|
+
return HttpResponse(response=_response, data=_data)
|
88
|
+
_response_json = _response.json()
|
89
|
+
except JSONDecodeError:
|
90
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
91
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
92
|
+
|
93
|
+
def retrieve(
|
94
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
95
|
+
) -> HttpResponse[WorkflowDeploymentRead]:
|
96
|
+
"""
|
97
|
+
Used to retrieve a workflow deployment given its ID or name.
|
98
|
+
|
99
|
+
Parameters
|
100
|
+
----------
|
101
|
+
id : str
|
102
|
+
Either the Workflow Deployment's ID or its unique name
|
103
|
+
|
104
|
+
request_options : typing.Optional[RequestOptions]
|
105
|
+
Request-specific configuration.
|
106
|
+
|
107
|
+
Returns
|
108
|
+
-------
|
109
|
+
HttpResponse[WorkflowDeploymentRead]
|
110
|
+
|
111
|
+
"""
|
112
|
+
_response = self._client_wrapper.httpx_client.request(
|
113
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}",
|
114
|
+
base_url=self._client_wrapper.get_environment().default,
|
115
|
+
method="GET",
|
116
|
+
request_options=request_options,
|
117
|
+
)
|
118
|
+
try:
|
119
|
+
if 200 <= _response.status_code < 300:
|
120
|
+
_data = typing.cast(
|
121
|
+
WorkflowDeploymentRead,
|
122
|
+
parse_obj_as(
|
123
|
+
type_=WorkflowDeploymentRead, # type: ignore
|
124
|
+
object_=_response.json(),
|
125
|
+
),
|
126
|
+
)
|
127
|
+
return HttpResponse(response=_response, data=_data)
|
128
|
+
_response_json = _response.json()
|
129
|
+
except JSONDecodeError:
|
130
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
131
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
132
|
+
|
133
|
+
def list_workflow_deployment_event_executions(
|
134
|
+
self,
|
135
|
+
id: str,
|
136
|
+
*,
|
137
|
+
filters: typing.Optional[str] = None,
|
138
|
+
limit: typing.Optional[int] = None,
|
139
|
+
offset: typing.Optional[int] = None,
|
140
|
+
request_options: typing.Optional[RequestOptions] = None,
|
141
|
+
) -> HttpResponse[WorkflowDeploymentEventExecutionsResponse]:
|
142
|
+
"""
|
143
|
+
Parameters
|
144
|
+
----------
|
145
|
+
id : str
|
146
|
+
|
147
|
+
filters : typing.Optional[str]
|
148
|
+
|
149
|
+
limit : typing.Optional[int]
|
150
|
+
Number of executions to return per page.
|
151
|
+
|
152
|
+
offset : typing.Optional[int]
|
153
|
+
The initial index from which to return the executions.
|
154
|
+
|
155
|
+
request_options : typing.Optional[RequestOptions]
|
156
|
+
Request-specific configuration.
|
157
|
+
|
158
|
+
Returns
|
159
|
+
-------
|
160
|
+
HttpResponse[WorkflowDeploymentEventExecutionsResponse]
|
161
|
+
|
162
|
+
"""
|
163
|
+
_response = self._client_wrapper.httpx_client.request(
|
164
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/execution-events",
|
165
|
+
base_url=self._client_wrapper.get_environment().default,
|
166
|
+
method="GET",
|
167
|
+
params={
|
168
|
+
"filters": filters,
|
169
|
+
"limit": limit,
|
170
|
+
"offset": offset,
|
171
|
+
},
|
172
|
+
request_options=request_options,
|
173
|
+
)
|
174
|
+
try:
|
175
|
+
if 200 <= _response.status_code < 300:
|
176
|
+
_data = typing.cast(
|
177
|
+
WorkflowDeploymentEventExecutionsResponse,
|
178
|
+
parse_obj_as(
|
179
|
+
type_=WorkflowDeploymentEventExecutionsResponse, # type: ignore
|
180
|
+
object_=_response.json(),
|
181
|
+
),
|
182
|
+
)
|
183
|
+
return HttpResponse(response=_response, data=_data)
|
184
|
+
_response_json = _response.json()
|
185
|
+
except JSONDecodeError:
|
186
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
187
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
188
|
+
|
189
|
+
def workflow_deployment_event_execution(
|
190
|
+
self, execution_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
191
|
+
) -> HttpResponse[WorkflowEventExecutionRead]:
|
192
|
+
"""
|
193
|
+
Parameters
|
194
|
+
----------
|
195
|
+
execution_id : str
|
196
|
+
|
197
|
+
id : str
|
198
|
+
|
199
|
+
request_options : typing.Optional[RequestOptions]
|
200
|
+
Request-specific configuration.
|
201
|
+
|
202
|
+
Returns
|
203
|
+
-------
|
204
|
+
HttpResponse[WorkflowEventExecutionRead]
|
205
|
+
|
206
|
+
"""
|
207
|
+
_response = self._client_wrapper.httpx_client.request(
|
208
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/execution-events/{jsonable_encoder(execution_id)}",
|
209
|
+
base_url=self._client_wrapper.get_environment().default,
|
210
|
+
method="GET",
|
211
|
+
request_options=request_options,
|
212
|
+
)
|
213
|
+
try:
|
214
|
+
if 200 <= _response.status_code < 300:
|
215
|
+
_data = typing.cast(
|
216
|
+
WorkflowEventExecutionRead,
|
217
|
+
parse_obj_as(
|
218
|
+
type_=WorkflowEventExecutionRead, # type: ignore
|
219
|
+
object_=_response.json(),
|
220
|
+
),
|
221
|
+
)
|
222
|
+
return HttpResponse(response=_response, data=_data)
|
223
|
+
_response_json = _response.json()
|
224
|
+
except JSONDecodeError:
|
225
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
226
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
227
|
+
|
228
|
+
def workflow_deployment_history_item_retrieve(
|
229
|
+
self, history_id_or_release_tag: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
230
|
+
) -> HttpResponse[WorkflowDeploymentHistoryItem]:
|
231
|
+
"""
|
232
|
+
DEPRECATED: This endpoint is deprecated and will be removed in a future release. Please use the
|
233
|
+
`retrieve_workflow_deployment_release` endpoint instead.
|
234
|
+
|
235
|
+
Parameters
|
236
|
+
----------
|
237
|
+
history_id_or_release_tag : str
|
238
|
+
Either the UUID of Workflow Deployment History Item you'd like to retrieve, or the name of a Release Tag that's pointing to the Workflow Deployment History Item you'd like to retrieve.
|
239
|
+
|
240
|
+
id : str
|
241
|
+
Either the Workflow Deployment's ID or its unique name
|
242
|
+
|
243
|
+
request_options : typing.Optional[RequestOptions]
|
244
|
+
Request-specific configuration.
|
245
|
+
|
246
|
+
Returns
|
247
|
+
-------
|
248
|
+
HttpResponse[WorkflowDeploymentHistoryItem]
|
249
|
+
|
250
|
+
"""
|
251
|
+
_response = self._client_wrapper.httpx_client.request(
|
252
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/history/{jsonable_encoder(history_id_or_release_tag)}",
|
253
|
+
base_url=self._client_wrapper.get_environment().default,
|
254
|
+
method="GET",
|
255
|
+
request_options=request_options,
|
256
|
+
)
|
257
|
+
try:
|
258
|
+
if 200 <= _response.status_code < 300:
|
259
|
+
_data = typing.cast(
|
260
|
+
WorkflowDeploymentHistoryItem,
|
261
|
+
parse_obj_as(
|
262
|
+
type_=WorkflowDeploymentHistoryItem, # type: ignore
|
263
|
+
object_=_response.json(),
|
264
|
+
),
|
265
|
+
)
|
266
|
+
return HttpResponse(response=_response, data=_data)
|
267
|
+
_response_json = _response.json()
|
268
|
+
except JSONDecodeError:
|
269
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
270
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
271
|
+
|
272
|
+
def list_workflow_release_tags(
|
273
|
+
self,
|
274
|
+
id: str,
|
275
|
+
*,
|
276
|
+
limit: typing.Optional[int] = None,
|
277
|
+
offset: typing.Optional[int] = None,
|
278
|
+
ordering: typing.Optional[str] = None,
|
279
|
+
source: typing.Optional[ListWorkflowReleaseTagsRequestSource] = None,
|
280
|
+
request_options: typing.Optional[RequestOptions] = None,
|
281
|
+
) -> HttpResponse[PaginatedWorkflowReleaseTagReadList]:
|
282
|
+
"""
|
283
|
+
List Release Tags associated with the specified Workflow Deployment
|
284
|
+
|
285
|
+
Parameters
|
286
|
+
----------
|
287
|
+
id : str
|
288
|
+
Either the Workflow Deployment's ID or its unique name
|
289
|
+
|
290
|
+
limit : typing.Optional[int]
|
291
|
+
Number of results to return per page.
|
292
|
+
|
293
|
+
offset : typing.Optional[int]
|
294
|
+
The initial index from which to return the results.
|
295
|
+
|
296
|
+
ordering : typing.Optional[str]
|
297
|
+
Which field to use when ordering the results.
|
298
|
+
|
299
|
+
source : typing.Optional[ListWorkflowReleaseTagsRequestSource]
|
300
|
+
|
301
|
+
request_options : typing.Optional[RequestOptions]
|
302
|
+
Request-specific configuration.
|
303
|
+
|
304
|
+
Returns
|
305
|
+
-------
|
306
|
+
HttpResponse[PaginatedWorkflowReleaseTagReadList]
|
307
|
+
|
308
|
+
"""
|
309
|
+
_response = self._client_wrapper.httpx_client.request(
|
310
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/release-tags",
|
311
|
+
base_url=self._client_wrapper.get_environment().default,
|
312
|
+
method="GET",
|
313
|
+
params={
|
314
|
+
"limit": limit,
|
315
|
+
"offset": offset,
|
316
|
+
"ordering": ordering,
|
317
|
+
"source": source,
|
318
|
+
},
|
319
|
+
request_options=request_options,
|
320
|
+
)
|
321
|
+
try:
|
322
|
+
if 200 <= _response.status_code < 300:
|
323
|
+
_data = typing.cast(
|
324
|
+
PaginatedWorkflowReleaseTagReadList,
|
325
|
+
parse_obj_as(
|
326
|
+
type_=PaginatedWorkflowReleaseTagReadList, # type: ignore
|
327
|
+
object_=_response.json(),
|
328
|
+
),
|
329
|
+
)
|
330
|
+
return HttpResponse(response=_response, data=_data)
|
331
|
+
_response_json = _response.json()
|
332
|
+
except JSONDecodeError:
|
333
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
334
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
335
|
+
|
336
|
+
def retrieve_workflow_release_tag(
|
337
|
+
self, id: str, name: str, *, request_options: typing.Optional[RequestOptions] = None
|
338
|
+
) -> HttpResponse[WorkflowReleaseTagRead]:
|
339
|
+
"""
|
340
|
+
Retrieve a Workflow Release Tag by tag name, associated with a specified Workflow Deployment.
|
341
|
+
|
342
|
+
Parameters
|
343
|
+
----------
|
344
|
+
id : str
|
345
|
+
Either the Workflow Deployment's ID or its unique name
|
346
|
+
|
347
|
+
name : str
|
348
|
+
The name of the Release Tag associated with this Workflow Deployment that you'd like to retrieve.
|
349
|
+
|
350
|
+
request_options : typing.Optional[RequestOptions]
|
351
|
+
Request-specific configuration.
|
352
|
+
|
353
|
+
Returns
|
354
|
+
-------
|
355
|
+
HttpResponse[WorkflowReleaseTagRead]
|
356
|
+
|
357
|
+
"""
|
358
|
+
_response = self._client_wrapper.httpx_client.request(
|
359
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/release-tags/{jsonable_encoder(name)}",
|
360
|
+
base_url=self._client_wrapper.get_environment().default,
|
361
|
+
method="GET",
|
362
|
+
request_options=request_options,
|
363
|
+
)
|
364
|
+
try:
|
365
|
+
if 200 <= _response.status_code < 300:
|
366
|
+
_data = typing.cast(
|
367
|
+
WorkflowReleaseTagRead,
|
368
|
+
parse_obj_as(
|
369
|
+
type_=WorkflowReleaseTagRead, # type: ignore
|
370
|
+
object_=_response.json(),
|
371
|
+
),
|
372
|
+
)
|
373
|
+
return HttpResponse(response=_response, data=_data)
|
374
|
+
_response_json = _response.json()
|
375
|
+
except JSONDecodeError:
|
376
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
377
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
378
|
+
|
379
|
+
def update_workflow_release_tag(
|
380
|
+
self,
|
381
|
+
id: str,
|
382
|
+
name: str,
|
383
|
+
*,
|
384
|
+
history_item_id: typing.Optional[str] = OMIT,
|
385
|
+
request_options: typing.Optional[RequestOptions] = None,
|
386
|
+
) -> HttpResponse[WorkflowReleaseTagRead]:
|
387
|
+
"""
|
388
|
+
Updates an existing Release Tag associated with the specified Workflow Deployment.
|
389
|
+
|
390
|
+
Parameters
|
391
|
+
----------
|
392
|
+
id : str
|
393
|
+
Either the Workflow Deployment's ID or its unique name
|
394
|
+
|
395
|
+
name : str
|
396
|
+
The name of the Release Tag associated with this Workflow Deployment that you'd like to update.
|
397
|
+
|
398
|
+
history_item_id : typing.Optional[str]
|
399
|
+
The ID of the Workflow Deployment History Item to tag
|
400
|
+
|
401
|
+
request_options : typing.Optional[RequestOptions]
|
402
|
+
Request-specific configuration.
|
403
|
+
|
404
|
+
Returns
|
405
|
+
-------
|
406
|
+
HttpResponse[WorkflowReleaseTagRead]
|
407
|
+
|
408
|
+
"""
|
409
|
+
_response = self._client_wrapper.httpx_client.request(
|
410
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/release-tags/{jsonable_encoder(name)}",
|
411
|
+
base_url=self._client_wrapper.get_environment().default,
|
412
|
+
method="PATCH",
|
413
|
+
json={
|
414
|
+
"history_item_id": history_item_id,
|
415
|
+
},
|
416
|
+
headers={
|
417
|
+
"content-type": "application/json",
|
418
|
+
},
|
419
|
+
request_options=request_options,
|
420
|
+
omit=OMIT,
|
421
|
+
)
|
422
|
+
try:
|
423
|
+
if 200 <= _response.status_code < 300:
|
424
|
+
_data = typing.cast(
|
425
|
+
WorkflowReleaseTagRead,
|
426
|
+
parse_obj_as(
|
427
|
+
type_=WorkflowReleaseTagRead, # type: ignore
|
428
|
+
object_=_response.json(),
|
429
|
+
),
|
430
|
+
)
|
431
|
+
return HttpResponse(response=_response, data=_data)
|
432
|
+
_response_json = _response.json()
|
433
|
+
except JSONDecodeError:
|
434
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
435
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
436
|
+
|
437
|
+
def retrieve_workflow_deployment_release(
|
438
|
+
self, id: str, release_id_or_release_tag: str, *, request_options: typing.Optional[RequestOptions] = None
|
439
|
+
) -> HttpResponse[WorkflowDeploymentRelease]:
|
440
|
+
"""
|
441
|
+
Retrieve a specific Workflow Deployment Release by either its UUID or the name of a Release Tag that points to it.
|
442
|
+
|
443
|
+
Parameters
|
444
|
+
----------
|
445
|
+
id : str
|
446
|
+
Either the Workflow Deployment's ID or its unique name
|
447
|
+
|
448
|
+
release_id_or_release_tag : str
|
449
|
+
Either the UUID of Workflow Deployment Release you'd like to retrieve, or the name of a Release Tag that's pointing to the Workflow Deployment Release you'd like to retrieve.
|
450
|
+
|
451
|
+
request_options : typing.Optional[RequestOptions]
|
452
|
+
Request-specific configuration.
|
453
|
+
|
454
|
+
Returns
|
455
|
+
-------
|
456
|
+
HttpResponse[WorkflowDeploymentRelease]
|
457
|
+
|
458
|
+
"""
|
459
|
+
_response = self._client_wrapper.httpx_client.request(
|
460
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/releases/{jsonable_encoder(release_id_or_release_tag)}",
|
461
|
+
base_url=self._client_wrapper.get_environment().default,
|
462
|
+
method="GET",
|
463
|
+
request_options=request_options,
|
464
|
+
)
|
465
|
+
try:
|
466
|
+
if 200 <= _response.status_code < 300:
|
467
|
+
_data = typing.cast(
|
468
|
+
WorkflowDeploymentRelease,
|
469
|
+
parse_obj_as(
|
470
|
+
type_=WorkflowDeploymentRelease, # type: ignore
|
471
|
+
object_=_response.json(),
|
472
|
+
),
|
473
|
+
)
|
474
|
+
return HttpResponse(response=_response, data=_data)
|
475
|
+
_response_json = _response.json()
|
476
|
+
except JSONDecodeError:
|
477
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
478
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
479
|
+
|
480
|
+
|
481
|
+
class AsyncRawWorkflowDeploymentsClient:
|
482
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
483
|
+
self._client_wrapper = client_wrapper
|
484
|
+
|
485
|
+
async def list(
|
486
|
+
self,
|
487
|
+
*,
|
488
|
+
limit: typing.Optional[int] = None,
|
489
|
+
offset: typing.Optional[int] = None,
|
490
|
+
ordering: typing.Optional[str] = None,
|
491
|
+
status: typing.Optional[WorkflowDeploymentsListRequestStatus] = None,
|
492
|
+
request_options: typing.Optional[RequestOptions] = None,
|
493
|
+
) -> AsyncHttpResponse[PaginatedSlimWorkflowDeploymentList]:
|
494
|
+
"""
|
495
|
+
Used to list all Workflow Deployments.
|
496
|
+
|
497
|
+
Parameters
|
498
|
+
----------
|
499
|
+
limit : typing.Optional[int]
|
500
|
+
Number of results to return per page.
|
501
|
+
|
502
|
+
offset : typing.Optional[int]
|
503
|
+
The initial index from which to return the results.
|
504
|
+
|
505
|
+
ordering : typing.Optional[str]
|
506
|
+
Which field to use when ordering the results.
|
507
|
+
|
508
|
+
status : typing.Optional[WorkflowDeploymentsListRequestStatus]
|
509
|
+
status
|
510
|
+
|
511
|
+
request_options : typing.Optional[RequestOptions]
|
512
|
+
Request-specific configuration.
|
513
|
+
|
514
|
+
Returns
|
515
|
+
-------
|
516
|
+
AsyncHttpResponse[PaginatedSlimWorkflowDeploymentList]
|
517
|
+
|
518
|
+
"""
|
519
|
+
_response = await self._client_wrapper.httpx_client.request(
|
520
|
+
"v1/workflow-deployments",
|
521
|
+
base_url=self._client_wrapper.get_environment().default,
|
522
|
+
method="GET",
|
523
|
+
params={
|
524
|
+
"limit": limit,
|
525
|
+
"offset": offset,
|
526
|
+
"ordering": ordering,
|
527
|
+
"status": status,
|
528
|
+
},
|
529
|
+
request_options=request_options,
|
530
|
+
)
|
531
|
+
try:
|
532
|
+
if 200 <= _response.status_code < 300:
|
533
|
+
_data = typing.cast(
|
534
|
+
PaginatedSlimWorkflowDeploymentList,
|
535
|
+
parse_obj_as(
|
536
|
+
type_=PaginatedSlimWorkflowDeploymentList, # type: ignore
|
537
|
+
object_=_response.json(),
|
538
|
+
),
|
539
|
+
)
|
540
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
541
|
+
_response_json = _response.json()
|
542
|
+
except JSONDecodeError:
|
543
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
544
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
545
|
+
|
546
|
+
async def retrieve(
|
547
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
548
|
+
) -> AsyncHttpResponse[WorkflowDeploymentRead]:
|
549
|
+
"""
|
550
|
+
Used to retrieve a workflow deployment given its ID or name.
|
551
|
+
|
552
|
+
Parameters
|
553
|
+
----------
|
554
|
+
id : str
|
555
|
+
Either the Workflow Deployment's ID or its unique name
|
556
|
+
|
557
|
+
request_options : typing.Optional[RequestOptions]
|
558
|
+
Request-specific configuration.
|
559
|
+
|
560
|
+
Returns
|
561
|
+
-------
|
562
|
+
AsyncHttpResponse[WorkflowDeploymentRead]
|
563
|
+
|
564
|
+
"""
|
565
|
+
_response = await self._client_wrapper.httpx_client.request(
|
566
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}",
|
567
|
+
base_url=self._client_wrapper.get_environment().default,
|
568
|
+
method="GET",
|
569
|
+
request_options=request_options,
|
570
|
+
)
|
571
|
+
try:
|
572
|
+
if 200 <= _response.status_code < 300:
|
573
|
+
_data = typing.cast(
|
574
|
+
WorkflowDeploymentRead,
|
575
|
+
parse_obj_as(
|
576
|
+
type_=WorkflowDeploymentRead, # type: ignore
|
577
|
+
object_=_response.json(),
|
578
|
+
),
|
579
|
+
)
|
580
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
581
|
+
_response_json = _response.json()
|
582
|
+
except JSONDecodeError:
|
583
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
584
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
585
|
+
|
586
|
+
async def list_workflow_deployment_event_executions(
|
587
|
+
self,
|
588
|
+
id: str,
|
589
|
+
*,
|
590
|
+
filters: typing.Optional[str] = None,
|
591
|
+
limit: typing.Optional[int] = None,
|
592
|
+
offset: typing.Optional[int] = None,
|
593
|
+
request_options: typing.Optional[RequestOptions] = None,
|
594
|
+
) -> AsyncHttpResponse[WorkflowDeploymentEventExecutionsResponse]:
|
595
|
+
"""
|
596
|
+
Parameters
|
597
|
+
----------
|
598
|
+
id : str
|
599
|
+
|
600
|
+
filters : typing.Optional[str]
|
601
|
+
|
602
|
+
limit : typing.Optional[int]
|
603
|
+
Number of executions to return per page.
|
604
|
+
|
605
|
+
offset : typing.Optional[int]
|
606
|
+
The initial index from which to return the executions.
|
607
|
+
|
608
|
+
request_options : typing.Optional[RequestOptions]
|
609
|
+
Request-specific configuration.
|
610
|
+
|
611
|
+
Returns
|
612
|
+
-------
|
613
|
+
AsyncHttpResponse[WorkflowDeploymentEventExecutionsResponse]
|
614
|
+
|
615
|
+
"""
|
616
|
+
_response = await self._client_wrapper.httpx_client.request(
|
617
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/execution-events",
|
618
|
+
base_url=self._client_wrapper.get_environment().default,
|
619
|
+
method="GET",
|
620
|
+
params={
|
621
|
+
"filters": filters,
|
622
|
+
"limit": limit,
|
623
|
+
"offset": offset,
|
624
|
+
},
|
625
|
+
request_options=request_options,
|
626
|
+
)
|
627
|
+
try:
|
628
|
+
if 200 <= _response.status_code < 300:
|
629
|
+
_data = typing.cast(
|
630
|
+
WorkflowDeploymentEventExecutionsResponse,
|
631
|
+
parse_obj_as(
|
632
|
+
type_=WorkflowDeploymentEventExecutionsResponse, # type: ignore
|
633
|
+
object_=_response.json(),
|
634
|
+
),
|
635
|
+
)
|
636
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
637
|
+
_response_json = _response.json()
|
638
|
+
except JSONDecodeError:
|
639
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
640
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
641
|
+
|
642
|
+
async def workflow_deployment_event_execution(
|
643
|
+
self, execution_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
644
|
+
) -> AsyncHttpResponse[WorkflowEventExecutionRead]:
|
645
|
+
"""
|
646
|
+
Parameters
|
647
|
+
----------
|
648
|
+
execution_id : str
|
649
|
+
|
650
|
+
id : str
|
651
|
+
|
652
|
+
request_options : typing.Optional[RequestOptions]
|
653
|
+
Request-specific configuration.
|
654
|
+
|
655
|
+
Returns
|
656
|
+
-------
|
657
|
+
AsyncHttpResponse[WorkflowEventExecutionRead]
|
658
|
+
|
659
|
+
"""
|
660
|
+
_response = await self._client_wrapper.httpx_client.request(
|
661
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/execution-events/{jsonable_encoder(execution_id)}",
|
662
|
+
base_url=self._client_wrapper.get_environment().default,
|
663
|
+
method="GET",
|
664
|
+
request_options=request_options,
|
665
|
+
)
|
666
|
+
try:
|
667
|
+
if 200 <= _response.status_code < 300:
|
668
|
+
_data = typing.cast(
|
669
|
+
WorkflowEventExecutionRead,
|
670
|
+
parse_obj_as(
|
671
|
+
type_=WorkflowEventExecutionRead, # type: ignore
|
672
|
+
object_=_response.json(),
|
673
|
+
),
|
674
|
+
)
|
675
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
676
|
+
_response_json = _response.json()
|
677
|
+
except JSONDecodeError:
|
678
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
679
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
680
|
+
|
681
|
+
async def workflow_deployment_history_item_retrieve(
|
682
|
+
self, history_id_or_release_tag: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
683
|
+
) -> AsyncHttpResponse[WorkflowDeploymentHistoryItem]:
|
684
|
+
"""
|
685
|
+
DEPRECATED: This endpoint is deprecated and will be removed in a future release. Please use the
|
686
|
+
`retrieve_workflow_deployment_release` endpoint instead.
|
687
|
+
|
688
|
+
Parameters
|
689
|
+
----------
|
690
|
+
history_id_or_release_tag : str
|
691
|
+
Either the UUID of Workflow Deployment History Item you'd like to retrieve, or the name of a Release Tag that's pointing to the Workflow Deployment History Item you'd like to retrieve.
|
692
|
+
|
693
|
+
id : str
|
694
|
+
Either the Workflow Deployment's ID or its unique name
|
695
|
+
|
696
|
+
request_options : typing.Optional[RequestOptions]
|
697
|
+
Request-specific configuration.
|
698
|
+
|
699
|
+
Returns
|
700
|
+
-------
|
701
|
+
AsyncHttpResponse[WorkflowDeploymentHistoryItem]
|
702
|
+
|
703
|
+
"""
|
704
|
+
_response = await self._client_wrapper.httpx_client.request(
|
705
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/history/{jsonable_encoder(history_id_or_release_tag)}",
|
706
|
+
base_url=self._client_wrapper.get_environment().default,
|
707
|
+
method="GET",
|
708
|
+
request_options=request_options,
|
709
|
+
)
|
710
|
+
try:
|
711
|
+
if 200 <= _response.status_code < 300:
|
712
|
+
_data = typing.cast(
|
713
|
+
WorkflowDeploymentHistoryItem,
|
714
|
+
parse_obj_as(
|
715
|
+
type_=WorkflowDeploymentHistoryItem, # type: ignore
|
716
|
+
object_=_response.json(),
|
717
|
+
),
|
718
|
+
)
|
719
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
720
|
+
_response_json = _response.json()
|
721
|
+
except JSONDecodeError:
|
722
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
723
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
724
|
+
|
725
|
+
async def list_workflow_release_tags(
|
726
|
+
self,
|
727
|
+
id: str,
|
728
|
+
*,
|
729
|
+
limit: typing.Optional[int] = None,
|
730
|
+
offset: typing.Optional[int] = None,
|
731
|
+
ordering: typing.Optional[str] = None,
|
732
|
+
source: typing.Optional[ListWorkflowReleaseTagsRequestSource] = None,
|
733
|
+
request_options: typing.Optional[RequestOptions] = None,
|
734
|
+
) -> AsyncHttpResponse[PaginatedWorkflowReleaseTagReadList]:
|
735
|
+
"""
|
736
|
+
List Release Tags associated with the specified Workflow Deployment
|
737
|
+
|
738
|
+
Parameters
|
739
|
+
----------
|
740
|
+
id : str
|
741
|
+
Either the Workflow Deployment's ID or its unique name
|
742
|
+
|
743
|
+
limit : typing.Optional[int]
|
744
|
+
Number of results to return per page.
|
745
|
+
|
746
|
+
offset : typing.Optional[int]
|
747
|
+
The initial index from which to return the results.
|
748
|
+
|
749
|
+
ordering : typing.Optional[str]
|
750
|
+
Which field to use when ordering the results.
|
751
|
+
|
752
|
+
source : typing.Optional[ListWorkflowReleaseTagsRequestSource]
|
753
|
+
|
754
|
+
request_options : typing.Optional[RequestOptions]
|
755
|
+
Request-specific configuration.
|
756
|
+
|
757
|
+
Returns
|
758
|
+
-------
|
759
|
+
AsyncHttpResponse[PaginatedWorkflowReleaseTagReadList]
|
760
|
+
|
761
|
+
"""
|
762
|
+
_response = await self._client_wrapper.httpx_client.request(
|
763
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/release-tags",
|
764
|
+
base_url=self._client_wrapper.get_environment().default,
|
765
|
+
method="GET",
|
766
|
+
params={
|
767
|
+
"limit": limit,
|
768
|
+
"offset": offset,
|
769
|
+
"ordering": ordering,
|
770
|
+
"source": source,
|
771
|
+
},
|
772
|
+
request_options=request_options,
|
773
|
+
)
|
774
|
+
try:
|
775
|
+
if 200 <= _response.status_code < 300:
|
776
|
+
_data = typing.cast(
|
777
|
+
PaginatedWorkflowReleaseTagReadList,
|
778
|
+
parse_obj_as(
|
779
|
+
type_=PaginatedWorkflowReleaseTagReadList, # type: ignore
|
780
|
+
object_=_response.json(),
|
781
|
+
),
|
782
|
+
)
|
783
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
784
|
+
_response_json = _response.json()
|
785
|
+
except JSONDecodeError:
|
786
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
787
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
788
|
+
|
789
|
+
async def retrieve_workflow_release_tag(
|
790
|
+
self, id: str, name: str, *, request_options: typing.Optional[RequestOptions] = None
|
791
|
+
) -> AsyncHttpResponse[WorkflowReleaseTagRead]:
|
792
|
+
"""
|
793
|
+
Retrieve a Workflow Release Tag by tag name, associated with a specified Workflow Deployment.
|
794
|
+
|
795
|
+
Parameters
|
796
|
+
----------
|
797
|
+
id : str
|
798
|
+
Either the Workflow Deployment's ID or its unique name
|
799
|
+
|
800
|
+
name : str
|
801
|
+
The name of the Release Tag associated with this Workflow Deployment that you'd like to retrieve.
|
802
|
+
|
803
|
+
request_options : typing.Optional[RequestOptions]
|
804
|
+
Request-specific configuration.
|
805
|
+
|
806
|
+
Returns
|
807
|
+
-------
|
808
|
+
AsyncHttpResponse[WorkflowReleaseTagRead]
|
809
|
+
|
810
|
+
"""
|
811
|
+
_response = await self._client_wrapper.httpx_client.request(
|
812
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/release-tags/{jsonable_encoder(name)}",
|
813
|
+
base_url=self._client_wrapper.get_environment().default,
|
814
|
+
method="GET",
|
815
|
+
request_options=request_options,
|
816
|
+
)
|
817
|
+
try:
|
818
|
+
if 200 <= _response.status_code < 300:
|
819
|
+
_data = typing.cast(
|
820
|
+
WorkflowReleaseTagRead,
|
821
|
+
parse_obj_as(
|
822
|
+
type_=WorkflowReleaseTagRead, # type: ignore
|
823
|
+
object_=_response.json(),
|
824
|
+
),
|
825
|
+
)
|
826
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
827
|
+
_response_json = _response.json()
|
828
|
+
except JSONDecodeError:
|
829
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
830
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
831
|
+
|
832
|
+
async def update_workflow_release_tag(
|
833
|
+
self,
|
834
|
+
id: str,
|
835
|
+
name: str,
|
836
|
+
*,
|
837
|
+
history_item_id: typing.Optional[str] = OMIT,
|
838
|
+
request_options: typing.Optional[RequestOptions] = None,
|
839
|
+
) -> AsyncHttpResponse[WorkflowReleaseTagRead]:
|
840
|
+
"""
|
841
|
+
Updates an existing Release Tag associated with the specified Workflow Deployment.
|
842
|
+
|
843
|
+
Parameters
|
844
|
+
----------
|
845
|
+
id : str
|
846
|
+
Either the Workflow Deployment's ID or its unique name
|
847
|
+
|
848
|
+
name : str
|
849
|
+
The name of the Release Tag associated with this Workflow Deployment that you'd like to update.
|
850
|
+
|
851
|
+
history_item_id : typing.Optional[str]
|
852
|
+
The ID of the Workflow Deployment History Item to tag
|
853
|
+
|
854
|
+
request_options : typing.Optional[RequestOptions]
|
855
|
+
Request-specific configuration.
|
856
|
+
|
857
|
+
Returns
|
858
|
+
-------
|
859
|
+
AsyncHttpResponse[WorkflowReleaseTagRead]
|
860
|
+
|
861
|
+
"""
|
862
|
+
_response = await self._client_wrapper.httpx_client.request(
|
863
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/release-tags/{jsonable_encoder(name)}",
|
864
|
+
base_url=self._client_wrapper.get_environment().default,
|
865
|
+
method="PATCH",
|
866
|
+
json={
|
867
|
+
"history_item_id": history_item_id,
|
868
|
+
},
|
869
|
+
headers={
|
870
|
+
"content-type": "application/json",
|
871
|
+
},
|
872
|
+
request_options=request_options,
|
873
|
+
omit=OMIT,
|
874
|
+
)
|
875
|
+
try:
|
876
|
+
if 200 <= _response.status_code < 300:
|
877
|
+
_data = typing.cast(
|
878
|
+
WorkflowReleaseTagRead,
|
879
|
+
parse_obj_as(
|
880
|
+
type_=WorkflowReleaseTagRead, # type: ignore
|
881
|
+
object_=_response.json(),
|
882
|
+
),
|
883
|
+
)
|
884
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
885
|
+
_response_json = _response.json()
|
886
|
+
except JSONDecodeError:
|
887
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
888
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
889
|
+
|
890
|
+
async def retrieve_workflow_deployment_release(
|
891
|
+
self, id: str, release_id_or_release_tag: str, *, request_options: typing.Optional[RequestOptions] = None
|
892
|
+
) -> AsyncHttpResponse[WorkflowDeploymentRelease]:
|
893
|
+
"""
|
894
|
+
Retrieve a specific Workflow Deployment Release by either its UUID or the name of a Release Tag that points to it.
|
895
|
+
|
896
|
+
Parameters
|
897
|
+
----------
|
898
|
+
id : str
|
899
|
+
Either the Workflow Deployment's ID or its unique name
|
900
|
+
|
901
|
+
release_id_or_release_tag : str
|
902
|
+
Either the UUID of Workflow Deployment Release you'd like to retrieve, or the name of a Release Tag that's pointing to the Workflow Deployment Release you'd like to retrieve.
|
903
|
+
|
904
|
+
request_options : typing.Optional[RequestOptions]
|
905
|
+
Request-specific configuration.
|
906
|
+
|
907
|
+
Returns
|
908
|
+
-------
|
909
|
+
AsyncHttpResponse[WorkflowDeploymentRelease]
|
910
|
+
|
911
|
+
"""
|
912
|
+
_response = await self._client_wrapper.httpx_client.request(
|
913
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/releases/{jsonable_encoder(release_id_or_release_tag)}",
|
914
|
+
base_url=self._client_wrapper.get_environment().default,
|
915
|
+
method="GET",
|
916
|
+
request_options=request_options,
|
917
|
+
)
|
918
|
+
try:
|
919
|
+
if 200 <= _response.status_code < 300:
|
920
|
+
_data = typing.cast(
|
921
|
+
WorkflowDeploymentRelease,
|
922
|
+
parse_obj_as(
|
923
|
+
type_=WorkflowDeploymentRelease, # type: ignore
|
924
|
+
object_=_response.json(),
|
925
|
+
),
|
926
|
+
)
|
927
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
928
|
+
_response_json = _response.json()
|
929
|
+
except JSONDecodeError:
|
930
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
931
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|