vellum-ai 1.0.11__py3-none-any.whl → 1.1.1__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/__init__.py +2 -2
- vellum/client/README.md +0 -55
- vellum/client/__init__.py +159 -877
- 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/raw_client.py +1561 -0
- vellum/client/reference.md +22 -696
- vellum/client/resources/__init__.py +0 -2
- 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 +203 -328
- 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/client/types/__init__.py +2 -0
- vellum/client/types/api_request_parent_context.py +1 -0
- vellum/client/types/external_parent_context.py +36 -0
- vellum/client/types/node_execution_fulfilled_event.py +1 -0
- vellum/client/types/node_execution_initiated_event.py +1 -0
- vellum/client/types/node_execution_paused_event.py +1 -0
- vellum/client/types/node_execution_rejected_event.py +1 -0
- vellum/client/types/node_execution_resumed_event.py +1 -0
- vellum/client/types/node_execution_span.py +1 -0
- vellum/client/types/node_execution_span_attributes.py +1 -0
- vellum/client/types/node_execution_streaming_event.py +1 -0
- vellum/client/types/node_parent_context.py +1 -0
- vellum/client/types/parent_context.py +2 -0
- vellum/client/types/prompt_deployment_parent_context.py +1 -0
- vellum/client/types/slim_workflow_execution_read.py +1 -0
- vellum/client/types/span_link.py +1 -0
- vellum/client/types/workflow_deployment_event_executions_response.py +1 -0
- vellum/client/types/workflow_deployment_parent_context.py +1 -0
- vellum/client/types/workflow_event_execution_read.py +1 -0
- vellum/client/types/workflow_execution_detail.py +1 -0
- vellum/client/types/workflow_execution_fulfilled_event.py +1 -0
- vellum/client/types/workflow_execution_initiated_event.py +1 -0
- vellum/client/types/workflow_execution_paused_event.py +1 -0
- vellum/client/types/workflow_execution_rejected_event.py +1 -0
- vellum/client/types/workflow_execution_resumed_event.py +1 -0
- vellum/client/types/workflow_execution_snapshotted_event.py +1 -0
- vellum/client/types/workflow_execution_span.py +1 -0
- vellum/client/types/workflow_execution_span_attributes.py +1 -0
- vellum/client/types/workflow_execution_streaming_event.py +1 -0
- vellum/client/types/workflow_parent_context.py +1 -0
- vellum/client/types/workflow_sandbox_parent_context.py +1 -0
- vellum/{resources/release_reviews/__init__.py → core/http_response.py} +1 -1
- vellum/{resources/release_reviews/client.py → raw_client.py} +1 -1
- 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/types/external_parent_context.py +3 -0
- vellum/workflows/emitters/vellum_emitter.py +3 -2
- vellum/workflows/events/types.py +6 -0
- vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +5 -15
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +6 -0
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +75 -0
- vellum/workflows/state/context.py +13 -2
- vellum/workflows/types/definition.py +2 -2
- vellum/workflows/types/tests/test_definition.py +2 -3
- vellum/workflows/utils/functions.py +1 -1
- vellum/workflows/utils/tests/test_functions.py +3 -3
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/METADATA +1 -1
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/RECORD +123 -81
- 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/nodes/vellum/tests/test_tool_calling_node.py +93 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +98 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_workflow_deployment_serialization.py +1 -1
- vellum_ee/workflows/display/utils/expressions.py +1 -1
- vellum_ee/workflows/display/workflows/base_workflow_display.py +2 -1
- vellum/client/resources/release_reviews/__init__.py +0 -2
- vellum/client/resources/release_reviews/client.py +0 -139
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/LICENSE +0 -0
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/WHEEL +0 -0
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/entry_points.txt +0 -0
@@ -2,21 +2,20 @@
|
|
2
2
|
|
3
3
|
import typing
|
4
4
|
from ...core.client_wrapper import SyncClientWrapper
|
5
|
+
from .raw_client import RawWorkflowDeploymentsClient
|
5
6
|
from .types.workflow_deployments_list_request_status import WorkflowDeploymentsListRequestStatus
|
6
7
|
from ...core.request_options import RequestOptions
|
7
8
|
from ...types.paginated_slim_workflow_deployment_list import PaginatedSlimWorkflowDeploymentList
|
8
|
-
from ...core.pydantic_utilities import parse_obj_as
|
9
|
-
from json.decoder import JSONDecodeError
|
10
|
-
from ...core.api_error import ApiError
|
11
9
|
from ...types.workflow_deployment_read import WorkflowDeploymentRead
|
12
|
-
from ...core.jsonable_encoder import jsonable_encoder
|
13
10
|
from ...types.workflow_deployment_event_executions_response import WorkflowDeploymentEventExecutionsResponse
|
14
11
|
from ...types.workflow_event_execution_read import WorkflowEventExecutionRead
|
15
12
|
from ...types.workflow_deployment_history_item import WorkflowDeploymentHistoryItem
|
16
13
|
from .types.list_workflow_release_tags_request_source import ListWorkflowReleaseTagsRequestSource
|
17
14
|
from ...types.paginated_workflow_release_tag_read_list import PaginatedWorkflowReleaseTagReadList
|
18
15
|
from ...types.workflow_release_tag_read import WorkflowReleaseTagRead
|
16
|
+
from ...types.workflow_deployment_release import WorkflowDeploymentRelease
|
19
17
|
from ...core.client_wrapper import AsyncClientWrapper
|
18
|
+
from .raw_client import AsyncRawWorkflowDeploymentsClient
|
20
19
|
|
21
20
|
# this is used as the default value for optional parameters
|
22
21
|
OMIT = typing.cast(typing.Any, ...)
|
@@ -24,9 +23,24 @@ OMIT = typing.cast(typing.Any, ...)
|
|
24
23
|
|
25
24
|
class WorkflowDeploymentsClient:
|
26
25
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
27
|
-
self.
|
26
|
+
self._raw_client = RawWorkflowDeploymentsClient(client_wrapper=client_wrapper)
|
28
27
|
|
29
|
-
|
28
|
+
@property
|
29
|
+
def _client_wrapper(self) -> SyncClientWrapper:
|
30
|
+
return self._raw_client._client_wrapper
|
31
|
+
|
32
|
+
@property
|
33
|
+
def with_raw_response(self) -> RawWorkflowDeploymentsClient:
|
34
|
+
"""
|
35
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
36
|
+
|
37
|
+
Returns
|
38
|
+
-------
|
39
|
+
RawWorkflowDeploymentsClient
|
40
|
+
"""
|
41
|
+
return self._raw_client
|
42
|
+
|
43
|
+
def list_(
|
30
44
|
self,
|
31
45
|
*,
|
32
46
|
limit: typing.Optional[int] = None,
|
@@ -70,31 +84,14 @@ class WorkflowDeploymentsClient:
|
|
70
84
|
)
|
71
85
|
client.workflow_deployments.list()
|
72
86
|
"""
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
"limit": limit,
|
79
|
-
"offset": offset,
|
80
|
-
"ordering": ordering,
|
81
|
-
"status": status,
|
82
|
-
},
|
87
|
+
response = self._raw_client.list(
|
88
|
+
limit=limit,
|
89
|
+
offset=offset,
|
90
|
+
ordering=ordering,
|
91
|
+
status=status,
|
83
92
|
request_options=request_options,
|
84
93
|
)
|
85
|
-
|
86
|
-
if 200 <= _response.status_code < 300:
|
87
|
-
return typing.cast(
|
88
|
-
PaginatedSlimWorkflowDeploymentList,
|
89
|
-
parse_obj_as(
|
90
|
-
type_=PaginatedSlimWorkflowDeploymentList, # type: ignore
|
91
|
-
object_=_response.json(),
|
92
|
-
),
|
93
|
-
)
|
94
|
-
_response_json = _response.json()
|
95
|
-
except JSONDecodeError:
|
96
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
97
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
94
|
+
return response.data
|
98
95
|
|
99
96
|
def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> WorkflowDeploymentRead:
|
100
97
|
"""
|
@@ -125,25 +122,11 @@ class WorkflowDeploymentsClient:
|
|
125
122
|
id="id",
|
126
123
|
)
|
127
124
|
"""
|
128
|
-
|
129
|
-
|
130
|
-
base_url=self._client_wrapper.get_environment().default,
|
131
|
-
method="GET",
|
125
|
+
response = self._raw_client.retrieve(
|
126
|
+
id,
|
132
127
|
request_options=request_options,
|
133
128
|
)
|
134
|
-
|
135
|
-
if 200 <= _response.status_code < 300:
|
136
|
-
return typing.cast(
|
137
|
-
WorkflowDeploymentRead,
|
138
|
-
parse_obj_as(
|
139
|
-
type_=WorkflowDeploymentRead, # type: ignore
|
140
|
-
object_=_response.json(),
|
141
|
-
),
|
142
|
-
)
|
143
|
-
_response_json = _response.json()
|
144
|
-
except JSONDecodeError:
|
145
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
146
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
129
|
+
return response.data
|
147
130
|
|
148
131
|
def list_workflow_deployment_event_executions(
|
149
132
|
self,
|
@@ -187,30 +170,14 @@ class WorkflowDeploymentsClient:
|
|
187
170
|
id="id",
|
188
171
|
)
|
189
172
|
"""
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
"filters": filters,
|
196
|
-
"limit": limit,
|
197
|
-
"offset": offset,
|
198
|
-
},
|
173
|
+
response = self._raw_client.list_workflow_deployment_event_executions(
|
174
|
+
id,
|
175
|
+
filters=filters,
|
176
|
+
limit=limit,
|
177
|
+
offset=offset,
|
199
178
|
request_options=request_options,
|
200
179
|
)
|
201
|
-
|
202
|
-
if 200 <= _response.status_code < 300:
|
203
|
-
return typing.cast(
|
204
|
-
WorkflowDeploymentEventExecutionsResponse,
|
205
|
-
parse_obj_as(
|
206
|
-
type_=WorkflowDeploymentEventExecutionsResponse, # type: ignore
|
207
|
-
object_=_response.json(),
|
208
|
-
),
|
209
|
-
)
|
210
|
-
_response_json = _response.json()
|
211
|
-
except JSONDecodeError:
|
212
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
213
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
180
|
+
return response.data
|
214
181
|
|
215
182
|
def workflow_deployment_event_execution(
|
216
183
|
self, execution_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
@@ -243,25 +210,12 @@ class WorkflowDeploymentsClient:
|
|
243
210
|
id="id",
|
244
211
|
)
|
245
212
|
"""
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
method="GET",
|
213
|
+
response = self._raw_client.workflow_deployment_event_execution(
|
214
|
+
execution_id,
|
215
|
+
id,
|
250
216
|
request_options=request_options,
|
251
217
|
)
|
252
|
-
|
253
|
-
if 200 <= _response.status_code < 300:
|
254
|
-
return typing.cast(
|
255
|
-
WorkflowEventExecutionRead,
|
256
|
-
parse_obj_as(
|
257
|
-
type_=WorkflowEventExecutionRead, # type: ignore
|
258
|
-
object_=_response.json(),
|
259
|
-
),
|
260
|
-
)
|
261
|
-
_response_json = _response.json()
|
262
|
-
except JSONDecodeError:
|
263
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
264
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
218
|
+
return response.data
|
265
219
|
|
266
220
|
def workflow_deployment_history_item_retrieve(
|
267
221
|
self, history_id_or_release_tag: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
@@ -299,25 +253,12 @@ class WorkflowDeploymentsClient:
|
|
299
253
|
id="id",
|
300
254
|
)
|
301
255
|
"""
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
method="GET",
|
256
|
+
response = self._raw_client.workflow_deployment_history_item_retrieve(
|
257
|
+
history_id_or_release_tag,
|
258
|
+
id,
|
306
259
|
request_options=request_options,
|
307
260
|
)
|
308
|
-
|
309
|
-
if 200 <= _response.status_code < 300:
|
310
|
-
return typing.cast(
|
311
|
-
WorkflowDeploymentHistoryItem,
|
312
|
-
parse_obj_as(
|
313
|
-
type_=WorkflowDeploymentHistoryItem, # type: ignore
|
314
|
-
object_=_response.json(),
|
315
|
-
),
|
316
|
-
)
|
317
|
-
_response_json = _response.json()
|
318
|
-
except JSONDecodeError:
|
319
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
320
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
261
|
+
return response.data
|
321
262
|
|
322
263
|
def list_workflow_release_tags(
|
323
264
|
self,
|
@@ -368,31 +309,15 @@ class WorkflowDeploymentsClient:
|
|
368
309
|
id="id",
|
369
310
|
)
|
370
311
|
"""
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
"offset": offset,
|
378
|
-
"ordering": ordering,
|
379
|
-
"source": source,
|
380
|
-
},
|
312
|
+
response = self._raw_client.list_workflow_release_tags(
|
313
|
+
id,
|
314
|
+
limit=limit,
|
315
|
+
offset=offset,
|
316
|
+
ordering=ordering,
|
317
|
+
source=source,
|
381
318
|
request_options=request_options,
|
382
319
|
)
|
383
|
-
|
384
|
-
if 200 <= _response.status_code < 300:
|
385
|
-
return typing.cast(
|
386
|
-
PaginatedWorkflowReleaseTagReadList,
|
387
|
-
parse_obj_as(
|
388
|
-
type_=PaginatedWorkflowReleaseTagReadList, # type: ignore
|
389
|
-
object_=_response.json(),
|
390
|
-
),
|
391
|
-
)
|
392
|
-
_response_json = _response.json()
|
393
|
-
except JSONDecodeError:
|
394
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
395
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
320
|
+
return response.data
|
396
321
|
|
397
322
|
def retrieve_workflow_release_tag(
|
398
323
|
self, id: str, name: str, *, request_options: typing.Optional[RequestOptions] = None
|
@@ -429,25 +354,12 @@ class WorkflowDeploymentsClient:
|
|
429
354
|
name="name",
|
430
355
|
)
|
431
356
|
"""
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
method="GET",
|
357
|
+
response = self._raw_client.retrieve_workflow_release_tag(
|
358
|
+
id,
|
359
|
+
name,
|
436
360
|
request_options=request_options,
|
437
361
|
)
|
438
|
-
|
439
|
-
if 200 <= _response.status_code < 300:
|
440
|
-
return typing.cast(
|
441
|
-
WorkflowReleaseTagRead,
|
442
|
-
parse_obj_as(
|
443
|
-
type_=WorkflowReleaseTagRead, # type: ignore
|
444
|
-
object_=_response.json(),
|
445
|
-
),
|
446
|
-
)
|
447
|
-
_response_json = _response.json()
|
448
|
-
except JSONDecodeError:
|
449
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
450
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
362
|
+
return response.data
|
451
363
|
|
452
364
|
def update_workflow_release_tag(
|
453
365
|
self,
|
@@ -492,39 +404,73 @@ class WorkflowDeploymentsClient:
|
|
492
404
|
name="name",
|
493
405
|
)
|
494
406
|
"""
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
407
|
+
response = self._raw_client.update_workflow_release_tag(
|
408
|
+
id,
|
409
|
+
name,
|
410
|
+
history_item_id=history_item_id,
|
411
|
+
request_options=request_options,
|
412
|
+
)
|
413
|
+
return response.data
|
414
|
+
|
415
|
+
def retrieve_workflow_deployment_release(
|
416
|
+
self, id: str, release_id_or_release_tag: str, *, request_options: typing.Optional[RequestOptions] = None
|
417
|
+
) -> WorkflowDeploymentRelease:
|
418
|
+
"""
|
419
|
+
Retrieve a specific Workflow Deployment Release by either its UUID or the name of a Release Tag that points to it.
|
420
|
+
|
421
|
+
Parameters
|
422
|
+
----------
|
423
|
+
id : str
|
424
|
+
Either the Workflow Deployment's ID or its unique name
|
425
|
+
|
426
|
+
release_id_or_release_tag : str
|
427
|
+
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.
|
428
|
+
|
429
|
+
request_options : typing.Optional[RequestOptions]
|
430
|
+
Request-specific configuration.
|
431
|
+
|
432
|
+
Returns
|
433
|
+
-------
|
434
|
+
WorkflowDeploymentRelease
|
435
|
+
|
436
|
+
|
437
|
+
Examples
|
438
|
+
--------
|
439
|
+
from vellum import Vellum
|
440
|
+
|
441
|
+
client = Vellum(
|
442
|
+
api_version="YOUR_API_VERSION",
|
443
|
+
api_key="YOUR_API_KEY",
|
444
|
+
)
|
445
|
+
client.workflow_deployments.retrieve_workflow_deployment_release(
|
446
|
+
id="id",
|
447
|
+
release_id_or_release_tag="release_id_or_release_tag",
|
448
|
+
)
|
449
|
+
"""
|
450
|
+
response = self._raw_client.retrieve_workflow_deployment_release(
|
451
|
+
id,
|
452
|
+
release_id_or_release_tag,
|
505
453
|
request_options=request_options,
|
506
|
-
omit=OMIT,
|
507
454
|
)
|
508
|
-
|
509
|
-
if 200 <= _response.status_code < 300:
|
510
|
-
return typing.cast(
|
511
|
-
WorkflowReleaseTagRead,
|
512
|
-
parse_obj_as(
|
513
|
-
type_=WorkflowReleaseTagRead, # type: ignore
|
514
|
-
object_=_response.json(),
|
515
|
-
),
|
516
|
-
)
|
517
|
-
_response_json = _response.json()
|
518
|
-
except JSONDecodeError:
|
519
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
520
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
455
|
+
return response.data
|
521
456
|
|
522
457
|
|
523
458
|
class AsyncWorkflowDeploymentsClient:
|
524
459
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
525
|
-
self.
|
460
|
+
self._raw_client = AsyncRawWorkflowDeploymentsClient(client_wrapper=client_wrapper)
|
461
|
+
|
462
|
+
@property
|
463
|
+
def with_raw_response(self) -> AsyncRawWorkflowDeploymentsClient:
|
464
|
+
"""
|
465
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
526
466
|
|
527
|
-
|
467
|
+
Returns
|
468
|
+
-------
|
469
|
+
AsyncRawWorkflowDeploymentsClient
|
470
|
+
"""
|
471
|
+
return self._raw_client
|
472
|
+
|
473
|
+
async def list_(
|
528
474
|
self,
|
529
475
|
*,
|
530
476
|
limit: typing.Optional[int] = None,
|
@@ -576,31 +522,14 @@ class AsyncWorkflowDeploymentsClient:
|
|
576
522
|
|
577
523
|
asyncio.run(main())
|
578
524
|
"""
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
"limit": limit,
|
585
|
-
"offset": offset,
|
586
|
-
"ordering": ordering,
|
587
|
-
"status": status,
|
588
|
-
},
|
525
|
+
response = await self._raw_client.list(
|
526
|
+
limit=limit,
|
527
|
+
offset=offset,
|
528
|
+
ordering=ordering,
|
529
|
+
status=status,
|
589
530
|
request_options=request_options,
|
590
531
|
)
|
591
|
-
|
592
|
-
if 200 <= _response.status_code < 300:
|
593
|
-
return typing.cast(
|
594
|
-
PaginatedSlimWorkflowDeploymentList,
|
595
|
-
parse_obj_as(
|
596
|
-
type_=PaginatedSlimWorkflowDeploymentList, # type: ignore
|
597
|
-
object_=_response.json(),
|
598
|
-
),
|
599
|
-
)
|
600
|
-
_response_json = _response.json()
|
601
|
-
except JSONDecodeError:
|
602
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
603
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
532
|
+
return response.data
|
604
533
|
|
605
534
|
async def retrieve(
|
606
535
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
@@ -641,25 +570,11 @@ class AsyncWorkflowDeploymentsClient:
|
|
641
570
|
|
642
571
|
asyncio.run(main())
|
643
572
|
"""
|
644
|
-
|
645
|
-
|
646
|
-
base_url=self._client_wrapper.get_environment().default,
|
647
|
-
method="GET",
|
573
|
+
response = await self._raw_client.retrieve(
|
574
|
+
id,
|
648
575
|
request_options=request_options,
|
649
576
|
)
|
650
|
-
|
651
|
-
if 200 <= _response.status_code < 300:
|
652
|
-
return typing.cast(
|
653
|
-
WorkflowDeploymentRead,
|
654
|
-
parse_obj_as(
|
655
|
-
type_=WorkflowDeploymentRead, # type: ignore
|
656
|
-
object_=_response.json(),
|
657
|
-
),
|
658
|
-
)
|
659
|
-
_response_json = _response.json()
|
660
|
-
except JSONDecodeError:
|
661
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
662
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
577
|
+
return response.data
|
663
578
|
|
664
579
|
async def list_workflow_deployment_event_executions(
|
665
580
|
self,
|
@@ -711,30 +626,14 @@ class AsyncWorkflowDeploymentsClient:
|
|
711
626
|
|
712
627
|
asyncio.run(main())
|
713
628
|
"""
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
"filters": filters,
|
720
|
-
"limit": limit,
|
721
|
-
"offset": offset,
|
722
|
-
},
|
629
|
+
response = await self._raw_client.list_workflow_deployment_event_executions(
|
630
|
+
id,
|
631
|
+
filters=filters,
|
632
|
+
limit=limit,
|
633
|
+
offset=offset,
|
723
634
|
request_options=request_options,
|
724
635
|
)
|
725
|
-
|
726
|
-
if 200 <= _response.status_code < 300:
|
727
|
-
return typing.cast(
|
728
|
-
WorkflowDeploymentEventExecutionsResponse,
|
729
|
-
parse_obj_as(
|
730
|
-
type_=WorkflowDeploymentEventExecutionsResponse, # type: ignore
|
731
|
-
object_=_response.json(),
|
732
|
-
),
|
733
|
-
)
|
734
|
-
_response_json = _response.json()
|
735
|
-
except JSONDecodeError:
|
736
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
737
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
636
|
+
return response.data
|
738
637
|
|
739
638
|
async def workflow_deployment_event_execution(
|
740
639
|
self, execution_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
@@ -775,25 +674,12 @@ class AsyncWorkflowDeploymentsClient:
|
|
775
674
|
|
776
675
|
asyncio.run(main())
|
777
676
|
"""
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
method="GET",
|
677
|
+
response = await self._raw_client.workflow_deployment_event_execution(
|
678
|
+
execution_id,
|
679
|
+
id,
|
782
680
|
request_options=request_options,
|
783
681
|
)
|
784
|
-
|
785
|
-
if 200 <= _response.status_code < 300:
|
786
|
-
return typing.cast(
|
787
|
-
WorkflowEventExecutionRead,
|
788
|
-
parse_obj_as(
|
789
|
-
type_=WorkflowEventExecutionRead, # type: ignore
|
790
|
-
object_=_response.json(),
|
791
|
-
),
|
792
|
-
)
|
793
|
-
_response_json = _response.json()
|
794
|
-
except JSONDecodeError:
|
795
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
796
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
682
|
+
return response.data
|
797
683
|
|
798
684
|
async def workflow_deployment_history_item_retrieve(
|
799
685
|
self, history_id_or_release_tag: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
@@ -839,25 +725,12 @@ class AsyncWorkflowDeploymentsClient:
|
|
839
725
|
|
840
726
|
asyncio.run(main())
|
841
727
|
"""
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
method="GET",
|
728
|
+
response = await self._raw_client.workflow_deployment_history_item_retrieve(
|
729
|
+
history_id_or_release_tag,
|
730
|
+
id,
|
846
731
|
request_options=request_options,
|
847
732
|
)
|
848
|
-
|
849
|
-
if 200 <= _response.status_code < 300:
|
850
|
-
return typing.cast(
|
851
|
-
WorkflowDeploymentHistoryItem,
|
852
|
-
parse_obj_as(
|
853
|
-
type_=WorkflowDeploymentHistoryItem, # type: ignore
|
854
|
-
object_=_response.json(),
|
855
|
-
),
|
856
|
-
)
|
857
|
-
_response_json = _response.json()
|
858
|
-
except JSONDecodeError:
|
859
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
860
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
733
|
+
return response.data
|
861
734
|
|
862
735
|
async def list_workflow_release_tags(
|
863
736
|
self,
|
@@ -916,31 +789,15 @@ class AsyncWorkflowDeploymentsClient:
|
|
916
789
|
|
917
790
|
asyncio.run(main())
|
918
791
|
"""
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
"offset": offset,
|
926
|
-
"ordering": ordering,
|
927
|
-
"source": source,
|
928
|
-
},
|
792
|
+
response = await self._raw_client.list_workflow_release_tags(
|
793
|
+
id,
|
794
|
+
limit=limit,
|
795
|
+
offset=offset,
|
796
|
+
ordering=ordering,
|
797
|
+
source=source,
|
929
798
|
request_options=request_options,
|
930
799
|
)
|
931
|
-
|
932
|
-
if 200 <= _response.status_code < 300:
|
933
|
-
return typing.cast(
|
934
|
-
PaginatedWorkflowReleaseTagReadList,
|
935
|
-
parse_obj_as(
|
936
|
-
type_=PaginatedWorkflowReleaseTagReadList, # type: ignore
|
937
|
-
object_=_response.json(),
|
938
|
-
),
|
939
|
-
)
|
940
|
-
_response_json = _response.json()
|
941
|
-
except JSONDecodeError:
|
942
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
943
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
800
|
+
return response.data
|
944
801
|
|
945
802
|
async def retrieve_workflow_release_tag(
|
946
803
|
self, id: str, name: str, *, request_options: typing.Optional[RequestOptions] = None
|
@@ -985,25 +842,12 @@ class AsyncWorkflowDeploymentsClient:
|
|
985
842
|
|
986
843
|
asyncio.run(main())
|
987
844
|
"""
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
method="GET",
|
845
|
+
response = await self._raw_client.retrieve_workflow_release_tag(
|
846
|
+
id,
|
847
|
+
name,
|
992
848
|
request_options=request_options,
|
993
849
|
)
|
994
|
-
|
995
|
-
if 200 <= _response.status_code < 300:
|
996
|
-
return typing.cast(
|
997
|
-
WorkflowReleaseTagRead,
|
998
|
-
parse_obj_as(
|
999
|
-
type_=WorkflowReleaseTagRead, # type: ignore
|
1000
|
-
object_=_response.json(),
|
1001
|
-
),
|
1002
|
-
)
|
1003
|
-
_response_json = _response.json()
|
1004
|
-
except JSONDecodeError:
|
1005
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1006
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
850
|
+
return response.data
|
1007
851
|
|
1008
852
|
async def update_workflow_release_tag(
|
1009
853
|
self,
|
@@ -1056,29 +900,60 @@ class AsyncWorkflowDeploymentsClient:
|
|
1056
900
|
|
1057
901
|
asyncio.run(main())
|
1058
902
|
"""
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
903
|
+
response = await self._raw_client.update_workflow_release_tag(
|
904
|
+
id,
|
905
|
+
name,
|
906
|
+
history_item_id=history_item_id,
|
907
|
+
request_options=request_options,
|
908
|
+
)
|
909
|
+
return response.data
|
910
|
+
|
911
|
+
async def retrieve_workflow_deployment_release(
|
912
|
+
self, id: str, release_id_or_release_tag: str, *, request_options: typing.Optional[RequestOptions] = None
|
913
|
+
) -> WorkflowDeploymentRelease:
|
914
|
+
"""
|
915
|
+
Retrieve a specific Workflow Deployment Release by either its UUID or the name of a Release Tag that points to it.
|
916
|
+
|
917
|
+
Parameters
|
918
|
+
----------
|
919
|
+
id : str
|
920
|
+
Either the Workflow Deployment's ID or its unique name
|
921
|
+
|
922
|
+
release_id_or_release_tag : str
|
923
|
+
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.
|
924
|
+
|
925
|
+
request_options : typing.Optional[RequestOptions]
|
926
|
+
Request-specific configuration.
|
927
|
+
|
928
|
+
Returns
|
929
|
+
-------
|
930
|
+
WorkflowDeploymentRelease
|
931
|
+
|
932
|
+
|
933
|
+
Examples
|
934
|
+
--------
|
935
|
+
import asyncio
|
936
|
+
|
937
|
+
from vellum import AsyncVellum
|
938
|
+
|
939
|
+
client = AsyncVellum(
|
940
|
+
api_version="YOUR_API_VERSION",
|
941
|
+
api_key="YOUR_API_KEY",
|
942
|
+
)
|
943
|
+
|
944
|
+
|
945
|
+
async def main() -> None:
|
946
|
+
await client.workflow_deployments.retrieve_workflow_deployment_release(
|
947
|
+
id="id",
|
948
|
+
release_id_or_release_tag="release_id_or_release_tag",
|
949
|
+
)
|
950
|
+
|
951
|
+
|
952
|
+
asyncio.run(main())
|
953
|
+
"""
|
954
|
+
response = await self._raw_client.retrieve_workflow_deployment_release(
|
955
|
+
id,
|
956
|
+
release_id_or_release_tag,
|
1069
957
|
request_options=request_options,
|
1070
|
-
omit=OMIT,
|
1071
958
|
)
|
1072
|
-
|
1073
|
-
if 200 <= _response.status_code < 300:
|
1074
|
-
return typing.cast(
|
1075
|
-
WorkflowReleaseTagRead,
|
1076
|
-
parse_obj_as(
|
1077
|
-
type_=WorkflowReleaseTagRead, # type: ignore
|
1078
|
-
object_=_response.json(),
|
1079
|
-
),
|
1080
|
-
)
|
1081
|
-
_response_json = _response.json()
|
1082
|
-
except JSONDecodeError:
|
1083
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1084
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
959
|
+
return response.data
|