casedev 0.1.0__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.
- casedev/__init__.py +104 -0
- casedev/_base_client.py +1995 -0
- casedev/_client.py +560 -0
- casedev/_compat.py +219 -0
- casedev/_constants.py +14 -0
- casedev/_exceptions.py +108 -0
- casedev/_files.py +123 -0
- casedev/_models.py +857 -0
- casedev/_qs.py +150 -0
- casedev/_resource.py +43 -0
- casedev/_response.py +830 -0
- casedev/_streaming.py +333 -0
- casedev/_types.py +260 -0
- casedev/_utils/__init__.py +64 -0
- casedev/_utils/_compat.py +45 -0
- casedev/_utils/_datetime_parse.py +136 -0
- casedev/_utils/_logs.py +25 -0
- casedev/_utils/_proxy.py +65 -0
- casedev/_utils/_reflection.py +42 -0
- casedev/_utils/_resources_proxy.py +24 -0
- casedev/_utils/_streams.py +12 -0
- casedev/_utils/_sync.py +58 -0
- casedev/_utils/_transform.py +457 -0
- casedev/_utils/_typing.py +156 -0
- casedev/_utils/_utils.py +421 -0
- casedev/_version.py +4 -0
- casedev/lib/.keep +4 -0
- casedev/py.typed +0 -0
- casedev/resources/__init__.py +173 -0
- casedev/resources/actions/__init__.py +33 -0
- casedev/resources/actions/actions.py +102 -0
- casedev/resources/actions/v1.py +640 -0
- casedev/resources/compute/__init__.py +33 -0
- casedev/resources/compute/compute.py +102 -0
- casedev/resources/compute/v1/__init__.py +89 -0
- casedev/resources/compute/v1/environments.py +492 -0
- casedev/resources/compute/v1/functions.py +278 -0
- casedev/resources/compute/v1/invoke.py +216 -0
- casedev/resources/compute/v1/runs.py +290 -0
- casedev/resources/compute/v1/secrets.py +655 -0
- casedev/resources/compute/v1/v1.py +583 -0
- casedev/resources/convert/__init__.py +33 -0
- casedev/resources/convert/convert.py +102 -0
- casedev/resources/convert/v1/__init__.py +33 -0
- casedev/resources/convert/v1/jobs.py +254 -0
- casedev/resources/convert/v1/v1.py +450 -0
- casedev/resources/format/__init__.py +33 -0
- casedev/resources/format/format.py +102 -0
- casedev/resources/format/v1/__init__.py +33 -0
- casedev/resources/format/v1/templates.py +419 -0
- casedev/resources/format/v1/v1.py +244 -0
- casedev/resources/llm/__init__.py +33 -0
- casedev/resources/llm/llm.py +192 -0
- casedev/resources/llm/v1/__init__.py +33 -0
- casedev/resources/llm/v1/chat.py +243 -0
- casedev/resources/llm/v1/v1.py +317 -0
- casedev/resources/ocr/__init__.py +33 -0
- casedev/resources/ocr/ocr.py +102 -0
- casedev/resources/ocr/v1.py +407 -0
- casedev/resources/search/__init__.py +33 -0
- casedev/resources/search/search.py +102 -0
- casedev/resources/search/v1.py +1052 -0
- casedev/resources/templates/__init__.py +33 -0
- casedev/resources/templates/templates.py +102 -0
- casedev/resources/templates/v1.py +633 -0
- casedev/resources/vault/__init__.py +47 -0
- casedev/resources/vault/graphrag.py +256 -0
- casedev/resources/vault/objects.py +571 -0
- casedev/resources/vault/vault.py +764 -0
- casedev/resources/voice/__init__.py +61 -0
- casedev/resources/voice/streaming.py +160 -0
- casedev/resources/voice/transcription.py +327 -0
- casedev/resources/voice/v1/__init__.py +33 -0
- casedev/resources/voice/v1/speak.py +478 -0
- casedev/resources/voice/v1/v1.py +290 -0
- casedev/resources/voice/voice.py +166 -0
- casedev/resources/webhooks/__init__.py +33 -0
- casedev/resources/webhooks/v1.py +447 -0
- casedev/resources/webhooks/webhooks.py +102 -0
- casedev/resources/workflows/__init__.py +33 -0
- casedev/resources/workflows/v1.py +1053 -0
- casedev/resources/workflows/workflows.py +102 -0
- casedev/types/__init__.py +12 -0
- casedev/types/actions/__init__.py +8 -0
- casedev/types/actions/v1_create_params.py +22 -0
- casedev/types/actions/v1_create_response.py +33 -0
- casedev/types/actions/v1_execute_params.py +16 -0
- casedev/types/actions/v1_execute_response.py +31 -0
- casedev/types/compute/__init__.py +7 -0
- casedev/types/compute/v1/__init__.py +18 -0
- casedev/types/compute/v1/environment_create_params.py +12 -0
- casedev/types/compute/v1/environment_create_response.py +34 -0
- casedev/types/compute/v1/environment_delete_response.py +11 -0
- casedev/types/compute/v1/function_get_logs_params.py +12 -0
- casedev/types/compute/v1/function_list_params.py +12 -0
- casedev/types/compute/v1/invoke_run_params.py +21 -0
- casedev/types/compute/v1/invoke_run_response.py +39 -0
- casedev/types/compute/v1/run_list_params.py +18 -0
- casedev/types/compute/v1/secret_create_params.py +24 -0
- casedev/types/compute/v1/secret_create_response.py +24 -0
- casedev/types/compute/v1/secret_delete_group_params.py +18 -0
- casedev/types/compute/v1/secret_list_params.py +15 -0
- casedev/types/compute/v1/secret_retrieve_group_params.py +12 -0
- casedev/types/compute/v1/secret_update_group_params.py +16 -0
- casedev/types/compute/v1_deploy_params.py +114 -0
- casedev/types/compute/v1_deploy_response.py +30 -0
- casedev/types/compute/v1_get_usage_params.py +15 -0
- casedev/types/convert/__init__.py +8 -0
- casedev/types/convert/v1/__init__.py +3 -0
- casedev/types/convert/v1_process_params.py +15 -0
- casedev/types/convert/v1_process_response.py +19 -0
- casedev/types/convert/v1_webhook_params.py +32 -0
- casedev/types/convert/v1_webhook_response.py +13 -0
- casedev/types/format/__init__.py +5 -0
- casedev/types/format/v1/__init__.py +7 -0
- casedev/types/format/v1/template_create_params.py +32 -0
- casedev/types/format/v1/template_create_response.py +27 -0
- casedev/types/format/v1/template_list_params.py +12 -0
- casedev/types/format/v1_create_document_params.py +42 -0
- casedev/types/llm/__init__.py +5 -0
- casedev/types/llm/v1/__init__.py +6 -0
- casedev/types/llm/v1/chat_create_completion_params.py +42 -0
- casedev/types/llm/v1/chat_create_completion_response.py +49 -0
- casedev/types/llm/v1_create_embedding_params.py +27 -0
- casedev/types/ocr/__init__.py +6 -0
- casedev/types/ocr/v1_process_params.py +44 -0
- casedev/types/ocr/v1_process_response.py +32 -0
- casedev/types/search/__init__.py +15 -0
- casedev/types/search/v1_answer_params.py +45 -0
- casedev/types/search/v1_answer_response.py +35 -0
- casedev/types/search/v1_contents_params.py +42 -0
- casedev/types/search/v1_contents_response.py +31 -0
- casedev/types/search/v1_research_params.py +23 -0
- casedev/types/search/v1_research_response.py +20 -0
- casedev/types/search/v1_retrieve_research_params.py +15 -0
- casedev/types/search/v1_search_params.py +56 -0
- casedev/types/search/v1_search_response.py +38 -0
- casedev/types/search/v1_similar_params.py +44 -0
- casedev/types/search/v1_similar_response.py +33 -0
- casedev/types/templates/__init__.py +8 -0
- casedev/types/templates/v1_execute_params.py +22 -0
- casedev/types/templates/v1_execute_response.py +31 -0
- casedev/types/templates/v1_list_params.py +32 -0
- casedev/types/templates/v1_search_params.py +18 -0
- casedev/types/vault/__init__.py +6 -0
- casedev/types/vault/object_create_presigned_url_params.py +22 -0
- casedev/types/vault/object_create_presigned_url_response.py +51 -0
- casedev/types/vault_create_params.py +20 -0
- casedev/types/vault_create_response.py +36 -0
- casedev/types/vault_ingest_response.py +26 -0
- casedev/types/vault_list_response.py +40 -0
- casedev/types/vault_search_params.py +27 -0
- casedev/types/vault_search_response.py +53 -0
- casedev/types/vault_upload_params.py +26 -0
- casedev/types/vault_upload_response.py +39 -0
- casedev/types/voice/__init__.py +7 -0
- casedev/types/voice/transcription_create_params.py +36 -0
- casedev/types/voice/transcription_retrieve_response.py +41 -0
- casedev/types/voice/v1/__init__.py +6 -0
- casedev/types/voice/v1/speak_create_params.py +59 -0
- casedev/types/voice/v1/speak_stream_params.py +58 -0
- casedev/types/voice/v1_list_voices_params.py +36 -0
- casedev/types/webhooks/__init__.py +6 -0
- casedev/types/webhooks/v1_create_params.py +20 -0
- casedev/types/webhooks/v1_create_response.py +33 -0
- casedev/types/workflows/__init__.py +19 -0
- casedev/types/workflows/v1_create_params.py +32 -0
- casedev/types/workflows/v1_create_response.py +29 -0
- casedev/types/workflows/v1_delete_response.py +13 -0
- casedev/types/workflows/v1_deploy_response.py +20 -0
- casedev/types/workflows/v1_execute_params.py +12 -0
- casedev/types/workflows/v1_execute_response.py +22 -0
- casedev/types/workflows/v1_list_executions_params.py +13 -0
- casedev/types/workflows/v1_list_executions_response.py +27 -0
- casedev/types/workflows/v1_list_params.py +18 -0
- casedev/types/workflows/v1_list_response.py +37 -0
- casedev/types/workflows/v1_retrieve_execution_response.py +31 -0
- casedev/types/workflows/v1_retrieve_response.py +35 -0
- casedev/types/workflows/v1_undeploy_response.py +13 -0
- casedev/types/workflows/v1_update_params.py +26 -0
- casedev/types/workflows/v1_update_response.py +17 -0
- casedev-0.1.0.dist-info/METADATA +454 -0
- casedev-0.1.0.dist-info/RECORD +185 -0
- casedev-0.1.0.dist-info/WHEEL +4 -0
- casedev-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,1053 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Iterable
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ..._compat import cached_property
|
|
13
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ..._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.workflows import (
|
|
22
|
+
v1_list_params,
|
|
23
|
+
v1_create_params,
|
|
24
|
+
v1_update_params,
|
|
25
|
+
v1_execute_params,
|
|
26
|
+
v1_list_executions_params,
|
|
27
|
+
)
|
|
28
|
+
from ...types.workflows.v1_list_response import V1ListResponse
|
|
29
|
+
from ...types.workflows.v1_create_response import V1CreateResponse
|
|
30
|
+
from ...types.workflows.v1_delete_response import V1DeleteResponse
|
|
31
|
+
from ...types.workflows.v1_deploy_response import V1DeployResponse
|
|
32
|
+
from ...types.workflows.v1_update_response import V1UpdateResponse
|
|
33
|
+
from ...types.workflows.v1_execute_response import V1ExecuteResponse
|
|
34
|
+
from ...types.workflows.v1_retrieve_response import V1RetrieveResponse
|
|
35
|
+
from ...types.workflows.v1_undeploy_response import V1UndeployResponse
|
|
36
|
+
from ...types.workflows.v1_list_executions_response import V1ListExecutionsResponse
|
|
37
|
+
from ...types.workflows.v1_retrieve_execution_response import V1RetrieveExecutionResponse
|
|
38
|
+
|
|
39
|
+
__all__ = ["V1Resource", "AsyncV1Resource"]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class V1Resource(SyncAPIResource):
|
|
43
|
+
@cached_property
|
|
44
|
+
def with_raw_response(self) -> V1ResourceWithRawResponse:
|
|
45
|
+
"""
|
|
46
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
47
|
+
the raw response object instead of the parsed content.
|
|
48
|
+
|
|
49
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
50
|
+
"""
|
|
51
|
+
return V1ResourceWithRawResponse(self)
|
|
52
|
+
|
|
53
|
+
@cached_property
|
|
54
|
+
def with_streaming_response(self) -> V1ResourceWithStreamingResponse:
|
|
55
|
+
"""
|
|
56
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
57
|
+
|
|
58
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
59
|
+
"""
|
|
60
|
+
return V1ResourceWithStreamingResponse(self)
|
|
61
|
+
|
|
62
|
+
def create(
|
|
63
|
+
self,
|
|
64
|
+
*,
|
|
65
|
+
name: str,
|
|
66
|
+
description: str | Omit = omit,
|
|
67
|
+
edges: Iterable[object] | Omit = omit,
|
|
68
|
+
nodes: Iterable[object] | Omit = omit,
|
|
69
|
+
trigger_config: object | Omit = omit,
|
|
70
|
+
trigger_type: Literal["manual", "webhook", "schedule", "vault_upload"] | Omit = omit,
|
|
71
|
+
visibility: Literal["private", "org", "public"] | Omit = omit,
|
|
72
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
73
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
74
|
+
extra_headers: Headers | None = None,
|
|
75
|
+
extra_query: Query | None = None,
|
|
76
|
+
extra_body: Body | None = None,
|
|
77
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
78
|
+
) -> V1CreateResponse:
|
|
79
|
+
"""
|
|
80
|
+
Create a new visual workflow with nodes, edges, and trigger configuration.
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
name: Workflow name
|
|
84
|
+
|
|
85
|
+
description: Workflow description
|
|
86
|
+
|
|
87
|
+
edges: React Flow edges
|
|
88
|
+
|
|
89
|
+
nodes: React Flow nodes
|
|
90
|
+
|
|
91
|
+
trigger_config: Trigger configuration
|
|
92
|
+
|
|
93
|
+
visibility: Workflow visibility
|
|
94
|
+
|
|
95
|
+
extra_headers: Send extra headers
|
|
96
|
+
|
|
97
|
+
extra_query: Add additional query parameters to the request
|
|
98
|
+
|
|
99
|
+
extra_body: Add additional JSON properties to the request
|
|
100
|
+
|
|
101
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
102
|
+
"""
|
|
103
|
+
return self._post(
|
|
104
|
+
"/workflows/v1",
|
|
105
|
+
body=maybe_transform(
|
|
106
|
+
{
|
|
107
|
+
"name": name,
|
|
108
|
+
"description": description,
|
|
109
|
+
"edges": edges,
|
|
110
|
+
"nodes": nodes,
|
|
111
|
+
"trigger_config": trigger_config,
|
|
112
|
+
"trigger_type": trigger_type,
|
|
113
|
+
"visibility": visibility,
|
|
114
|
+
},
|
|
115
|
+
v1_create_params.V1CreateParams,
|
|
116
|
+
),
|
|
117
|
+
options=make_request_options(
|
|
118
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
119
|
+
),
|
|
120
|
+
cast_to=V1CreateResponse,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
def retrieve(
|
|
124
|
+
self,
|
|
125
|
+
id: str,
|
|
126
|
+
*,
|
|
127
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
128
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
129
|
+
extra_headers: Headers | None = None,
|
|
130
|
+
extra_query: Query | None = None,
|
|
131
|
+
extra_body: Body | None = None,
|
|
132
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
133
|
+
) -> V1RetrieveResponse:
|
|
134
|
+
"""
|
|
135
|
+
Get a specific workflow by ID with full configuration.
|
|
136
|
+
|
|
137
|
+
Args:
|
|
138
|
+
extra_headers: Send extra headers
|
|
139
|
+
|
|
140
|
+
extra_query: Add additional query parameters to the request
|
|
141
|
+
|
|
142
|
+
extra_body: Add additional JSON properties to the request
|
|
143
|
+
|
|
144
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
145
|
+
"""
|
|
146
|
+
if not id:
|
|
147
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
148
|
+
return self._get(
|
|
149
|
+
f"/workflows/v1/{id}",
|
|
150
|
+
options=make_request_options(
|
|
151
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
152
|
+
),
|
|
153
|
+
cast_to=V1RetrieveResponse,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
def update(
|
|
157
|
+
self,
|
|
158
|
+
id: str,
|
|
159
|
+
*,
|
|
160
|
+
description: str | Omit = omit,
|
|
161
|
+
edges: Iterable[object] | Omit = omit,
|
|
162
|
+
name: str | Omit = omit,
|
|
163
|
+
nodes: Iterable[object] | Omit = omit,
|
|
164
|
+
trigger_config: object | Omit = omit,
|
|
165
|
+
trigger_type: Literal["manual", "webhook", "schedule", "vault_upload"] | Omit = omit,
|
|
166
|
+
visibility: Literal["private", "org", "public"] | Omit = omit,
|
|
167
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
168
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
169
|
+
extra_headers: Headers | None = None,
|
|
170
|
+
extra_query: Query | None = None,
|
|
171
|
+
extra_body: Body | None = None,
|
|
172
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
173
|
+
) -> V1UpdateResponse:
|
|
174
|
+
"""
|
|
175
|
+
Update an existing workflow's configuration.
|
|
176
|
+
|
|
177
|
+
Args:
|
|
178
|
+
extra_headers: Send extra headers
|
|
179
|
+
|
|
180
|
+
extra_query: Add additional query parameters to the request
|
|
181
|
+
|
|
182
|
+
extra_body: Add additional JSON properties to the request
|
|
183
|
+
|
|
184
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
185
|
+
"""
|
|
186
|
+
if not id:
|
|
187
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
188
|
+
return self._patch(
|
|
189
|
+
f"/workflows/v1/{id}",
|
|
190
|
+
body=maybe_transform(
|
|
191
|
+
{
|
|
192
|
+
"description": description,
|
|
193
|
+
"edges": edges,
|
|
194
|
+
"name": name,
|
|
195
|
+
"nodes": nodes,
|
|
196
|
+
"trigger_config": trigger_config,
|
|
197
|
+
"trigger_type": trigger_type,
|
|
198
|
+
"visibility": visibility,
|
|
199
|
+
},
|
|
200
|
+
v1_update_params.V1UpdateParams,
|
|
201
|
+
),
|
|
202
|
+
options=make_request_options(
|
|
203
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
204
|
+
),
|
|
205
|
+
cast_to=V1UpdateResponse,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
def list(
|
|
209
|
+
self,
|
|
210
|
+
*,
|
|
211
|
+
limit: int | Omit = omit,
|
|
212
|
+
offset: int | Omit = omit,
|
|
213
|
+
visibility: Literal["private", "org", "public"] | Omit = omit,
|
|
214
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
215
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
216
|
+
extra_headers: Headers | None = None,
|
|
217
|
+
extra_query: Query | None = None,
|
|
218
|
+
extra_body: Body | None = None,
|
|
219
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
220
|
+
) -> V1ListResponse:
|
|
221
|
+
"""
|
|
222
|
+
List all workflows for the authenticated organization.
|
|
223
|
+
|
|
224
|
+
Args:
|
|
225
|
+
limit: Maximum number of results
|
|
226
|
+
|
|
227
|
+
offset: Offset for pagination
|
|
228
|
+
|
|
229
|
+
visibility: Filter by visibility
|
|
230
|
+
|
|
231
|
+
extra_headers: Send extra headers
|
|
232
|
+
|
|
233
|
+
extra_query: Add additional query parameters to the request
|
|
234
|
+
|
|
235
|
+
extra_body: Add additional JSON properties to the request
|
|
236
|
+
|
|
237
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
238
|
+
"""
|
|
239
|
+
return self._get(
|
|
240
|
+
"/workflows/v1",
|
|
241
|
+
options=make_request_options(
|
|
242
|
+
extra_headers=extra_headers,
|
|
243
|
+
extra_query=extra_query,
|
|
244
|
+
extra_body=extra_body,
|
|
245
|
+
timeout=timeout,
|
|
246
|
+
query=maybe_transform(
|
|
247
|
+
{
|
|
248
|
+
"limit": limit,
|
|
249
|
+
"offset": offset,
|
|
250
|
+
"visibility": visibility,
|
|
251
|
+
},
|
|
252
|
+
v1_list_params.V1ListParams,
|
|
253
|
+
),
|
|
254
|
+
),
|
|
255
|
+
cast_to=V1ListResponse,
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
def delete(
|
|
259
|
+
self,
|
|
260
|
+
id: str,
|
|
261
|
+
*,
|
|
262
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
263
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
264
|
+
extra_headers: Headers | None = None,
|
|
265
|
+
extra_query: Query | None = None,
|
|
266
|
+
extra_body: Body | None = None,
|
|
267
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
268
|
+
) -> V1DeleteResponse:
|
|
269
|
+
"""
|
|
270
|
+
Delete a workflow and all associated data.
|
|
271
|
+
|
|
272
|
+
Args:
|
|
273
|
+
extra_headers: Send extra headers
|
|
274
|
+
|
|
275
|
+
extra_query: Add additional query parameters to the request
|
|
276
|
+
|
|
277
|
+
extra_body: Add additional JSON properties to the request
|
|
278
|
+
|
|
279
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
280
|
+
"""
|
|
281
|
+
if not id:
|
|
282
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
283
|
+
return self._delete(
|
|
284
|
+
f"/workflows/v1/{id}",
|
|
285
|
+
options=make_request_options(
|
|
286
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
287
|
+
),
|
|
288
|
+
cast_to=V1DeleteResponse,
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
def deploy(
|
|
292
|
+
self,
|
|
293
|
+
id: str,
|
|
294
|
+
*,
|
|
295
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
296
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
297
|
+
extra_headers: Headers | None = None,
|
|
298
|
+
extra_query: Query | None = None,
|
|
299
|
+
extra_body: Body | None = None,
|
|
300
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
301
|
+
) -> V1DeployResponse:
|
|
302
|
+
"""Deploy a workflow to Modal compute.
|
|
303
|
+
|
|
304
|
+
Returns a webhook URL and secret for
|
|
305
|
+
triggering the workflow.
|
|
306
|
+
|
|
307
|
+
Args:
|
|
308
|
+
extra_headers: Send extra headers
|
|
309
|
+
|
|
310
|
+
extra_query: Add additional query parameters to the request
|
|
311
|
+
|
|
312
|
+
extra_body: Add additional JSON properties to the request
|
|
313
|
+
|
|
314
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
315
|
+
"""
|
|
316
|
+
if not id:
|
|
317
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
318
|
+
return self._post(
|
|
319
|
+
f"/workflows/v1/{id}/deploy",
|
|
320
|
+
options=make_request_options(
|
|
321
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
322
|
+
),
|
|
323
|
+
cast_to=V1DeployResponse,
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
def execute(
|
|
327
|
+
self,
|
|
328
|
+
id: str,
|
|
329
|
+
*,
|
|
330
|
+
body: object | Omit = omit,
|
|
331
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
332
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
333
|
+
extra_headers: Headers | None = None,
|
|
334
|
+
extra_query: Query | None = None,
|
|
335
|
+
extra_body: Body | None = None,
|
|
336
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
337
|
+
) -> V1ExecuteResponse:
|
|
338
|
+
"""Execute a workflow for testing.
|
|
339
|
+
|
|
340
|
+
This runs the workflow synchronously without
|
|
341
|
+
deployment.
|
|
342
|
+
|
|
343
|
+
Args:
|
|
344
|
+
body: Input data to pass to the workflow trigger
|
|
345
|
+
|
|
346
|
+
extra_headers: Send extra headers
|
|
347
|
+
|
|
348
|
+
extra_query: Add additional query parameters to the request
|
|
349
|
+
|
|
350
|
+
extra_body: Add additional JSON properties to the request
|
|
351
|
+
|
|
352
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
353
|
+
"""
|
|
354
|
+
if not id:
|
|
355
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
356
|
+
return self._post(
|
|
357
|
+
f"/workflows/v1/{id}/execute",
|
|
358
|
+
body=maybe_transform(body, v1_execute_params.V1ExecuteParams),
|
|
359
|
+
options=make_request_options(
|
|
360
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
361
|
+
),
|
|
362
|
+
cast_to=V1ExecuteResponse,
|
|
363
|
+
)
|
|
364
|
+
|
|
365
|
+
def list_executions(
|
|
366
|
+
self,
|
|
367
|
+
id: str,
|
|
368
|
+
*,
|
|
369
|
+
limit: int | Omit = omit,
|
|
370
|
+
status: Literal["pending", "running", "completed", "failed", "cancelled"] | Omit = omit,
|
|
371
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
372
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
373
|
+
extra_headers: Headers | None = None,
|
|
374
|
+
extra_query: Query | None = None,
|
|
375
|
+
extra_body: Body | None = None,
|
|
376
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
377
|
+
) -> V1ListExecutionsResponse:
|
|
378
|
+
"""
|
|
379
|
+
List all executions for a specific workflow.
|
|
380
|
+
|
|
381
|
+
Args:
|
|
382
|
+
extra_headers: Send extra headers
|
|
383
|
+
|
|
384
|
+
extra_query: Add additional query parameters to the request
|
|
385
|
+
|
|
386
|
+
extra_body: Add additional JSON properties to the request
|
|
387
|
+
|
|
388
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
389
|
+
"""
|
|
390
|
+
if not id:
|
|
391
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
392
|
+
return self._get(
|
|
393
|
+
f"/workflows/v1/{id}/executions",
|
|
394
|
+
options=make_request_options(
|
|
395
|
+
extra_headers=extra_headers,
|
|
396
|
+
extra_query=extra_query,
|
|
397
|
+
extra_body=extra_body,
|
|
398
|
+
timeout=timeout,
|
|
399
|
+
query=maybe_transform(
|
|
400
|
+
{
|
|
401
|
+
"limit": limit,
|
|
402
|
+
"status": status,
|
|
403
|
+
},
|
|
404
|
+
v1_list_executions_params.V1ListExecutionsParams,
|
|
405
|
+
),
|
|
406
|
+
),
|
|
407
|
+
cast_to=V1ListExecutionsResponse,
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
def retrieve_execution(
|
|
411
|
+
self,
|
|
412
|
+
id: str,
|
|
413
|
+
*,
|
|
414
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
415
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
416
|
+
extra_headers: Headers | None = None,
|
|
417
|
+
extra_query: Query | None = None,
|
|
418
|
+
extra_body: Body | None = None,
|
|
419
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
420
|
+
) -> V1RetrieveExecutionResponse:
|
|
421
|
+
"""
|
|
422
|
+
Get detailed information about a workflow execution.
|
|
423
|
+
|
|
424
|
+
Args:
|
|
425
|
+
extra_headers: Send extra headers
|
|
426
|
+
|
|
427
|
+
extra_query: Add additional query parameters to the request
|
|
428
|
+
|
|
429
|
+
extra_body: Add additional JSON properties to the request
|
|
430
|
+
|
|
431
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
432
|
+
"""
|
|
433
|
+
if not id:
|
|
434
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
435
|
+
return self._get(
|
|
436
|
+
f"/workflows/v1/executions/{id}",
|
|
437
|
+
options=make_request_options(
|
|
438
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
439
|
+
),
|
|
440
|
+
cast_to=V1RetrieveExecutionResponse,
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
def undeploy(
|
|
444
|
+
self,
|
|
445
|
+
id: str,
|
|
446
|
+
*,
|
|
447
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
448
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
449
|
+
extra_headers: Headers | None = None,
|
|
450
|
+
extra_query: Query | None = None,
|
|
451
|
+
extra_body: Body | None = None,
|
|
452
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
453
|
+
) -> V1UndeployResponse:
|
|
454
|
+
"""
|
|
455
|
+
Stop a deployed workflow and release its webhook URL.
|
|
456
|
+
|
|
457
|
+
Args:
|
|
458
|
+
extra_headers: Send extra headers
|
|
459
|
+
|
|
460
|
+
extra_query: Add additional query parameters to the request
|
|
461
|
+
|
|
462
|
+
extra_body: Add additional JSON properties to the request
|
|
463
|
+
|
|
464
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
465
|
+
"""
|
|
466
|
+
if not id:
|
|
467
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
468
|
+
return self._delete(
|
|
469
|
+
f"/workflows/v1/{id}/deploy",
|
|
470
|
+
options=make_request_options(
|
|
471
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
472
|
+
),
|
|
473
|
+
cast_to=V1UndeployResponse,
|
|
474
|
+
)
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
class AsyncV1Resource(AsyncAPIResource):
|
|
478
|
+
@cached_property
|
|
479
|
+
def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
|
|
480
|
+
"""
|
|
481
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
482
|
+
the raw response object instead of the parsed content.
|
|
483
|
+
|
|
484
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
485
|
+
"""
|
|
486
|
+
return AsyncV1ResourceWithRawResponse(self)
|
|
487
|
+
|
|
488
|
+
@cached_property
|
|
489
|
+
def with_streaming_response(self) -> AsyncV1ResourceWithStreamingResponse:
|
|
490
|
+
"""
|
|
491
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
492
|
+
|
|
493
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
494
|
+
"""
|
|
495
|
+
return AsyncV1ResourceWithStreamingResponse(self)
|
|
496
|
+
|
|
497
|
+
async def create(
|
|
498
|
+
self,
|
|
499
|
+
*,
|
|
500
|
+
name: str,
|
|
501
|
+
description: str | Omit = omit,
|
|
502
|
+
edges: Iterable[object] | Omit = omit,
|
|
503
|
+
nodes: Iterable[object] | Omit = omit,
|
|
504
|
+
trigger_config: object | Omit = omit,
|
|
505
|
+
trigger_type: Literal["manual", "webhook", "schedule", "vault_upload"] | Omit = omit,
|
|
506
|
+
visibility: Literal["private", "org", "public"] | Omit = omit,
|
|
507
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
508
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
509
|
+
extra_headers: Headers | None = None,
|
|
510
|
+
extra_query: Query | None = None,
|
|
511
|
+
extra_body: Body | None = None,
|
|
512
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
513
|
+
) -> V1CreateResponse:
|
|
514
|
+
"""
|
|
515
|
+
Create a new visual workflow with nodes, edges, and trigger configuration.
|
|
516
|
+
|
|
517
|
+
Args:
|
|
518
|
+
name: Workflow name
|
|
519
|
+
|
|
520
|
+
description: Workflow description
|
|
521
|
+
|
|
522
|
+
edges: React Flow edges
|
|
523
|
+
|
|
524
|
+
nodes: React Flow nodes
|
|
525
|
+
|
|
526
|
+
trigger_config: Trigger configuration
|
|
527
|
+
|
|
528
|
+
visibility: Workflow visibility
|
|
529
|
+
|
|
530
|
+
extra_headers: Send extra headers
|
|
531
|
+
|
|
532
|
+
extra_query: Add additional query parameters to the request
|
|
533
|
+
|
|
534
|
+
extra_body: Add additional JSON properties to the request
|
|
535
|
+
|
|
536
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
537
|
+
"""
|
|
538
|
+
return await self._post(
|
|
539
|
+
"/workflows/v1",
|
|
540
|
+
body=await async_maybe_transform(
|
|
541
|
+
{
|
|
542
|
+
"name": name,
|
|
543
|
+
"description": description,
|
|
544
|
+
"edges": edges,
|
|
545
|
+
"nodes": nodes,
|
|
546
|
+
"trigger_config": trigger_config,
|
|
547
|
+
"trigger_type": trigger_type,
|
|
548
|
+
"visibility": visibility,
|
|
549
|
+
},
|
|
550
|
+
v1_create_params.V1CreateParams,
|
|
551
|
+
),
|
|
552
|
+
options=make_request_options(
|
|
553
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
554
|
+
),
|
|
555
|
+
cast_to=V1CreateResponse,
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
async def retrieve(
|
|
559
|
+
self,
|
|
560
|
+
id: str,
|
|
561
|
+
*,
|
|
562
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
563
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
564
|
+
extra_headers: Headers | None = None,
|
|
565
|
+
extra_query: Query | None = None,
|
|
566
|
+
extra_body: Body | None = None,
|
|
567
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
568
|
+
) -> V1RetrieveResponse:
|
|
569
|
+
"""
|
|
570
|
+
Get a specific workflow by ID with full configuration.
|
|
571
|
+
|
|
572
|
+
Args:
|
|
573
|
+
extra_headers: Send extra headers
|
|
574
|
+
|
|
575
|
+
extra_query: Add additional query parameters to the request
|
|
576
|
+
|
|
577
|
+
extra_body: Add additional JSON properties to the request
|
|
578
|
+
|
|
579
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
580
|
+
"""
|
|
581
|
+
if not id:
|
|
582
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
583
|
+
return await self._get(
|
|
584
|
+
f"/workflows/v1/{id}",
|
|
585
|
+
options=make_request_options(
|
|
586
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
587
|
+
),
|
|
588
|
+
cast_to=V1RetrieveResponse,
|
|
589
|
+
)
|
|
590
|
+
|
|
591
|
+
async def update(
|
|
592
|
+
self,
|
|
593
|
+
id: str,
|
|
594
|
+
*,
|
|
595
|
+
description: str | Omit = omit,
|
|
596
|
+
edges: Iterable[object] | Omit = omit,
|
|
597
|
+
name: str | Omit = omit,
|
|
598
|
+
nodes: Iterable[object] | Omit = omit,
|
|
599
|
+
trigger_config: object | Omit = omit,
|
|
600
|
+
trigger_type: Literal["manual", "webhook", "schedule", "vault_upload"] | Omit = omit,
|
|
601
|
+
visibility: Literal["private", "org", "public"] | Omit = omit,
|
|
602
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
603
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
604
|
+
extra_headers: Headers | None = None,
|
|
605
|
+
extra_query: Query | None = None,
|
|
606
|
+
extra_body: Body | None = None,
|
|
607
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
608
|
+
) -> V1UpdateResponse:
|
|
609
|
+
"""
|
|
610
|
+
Update an existing workflow's configuration.
|
|
611
|
+
|
|
612
|
+
Args:
|
|
613
|
+
extra_headers: Send extra headers
|
|
614
|
+
|
|
615
|
+
extra_query: Add additional query parameters to the request
|
|
616
|
+
|
|
617
|
+
extra_body: Add additional JSON properties to the request
|
|
618
|
+
|
|
619
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
620
|
+
"""
|
|
621
|
+
if not id:
|
|
622
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
623
|
+
return await self._patch(
|
|
624
|
+
f"/workflows/v1/{id}",
|
|
625
|
+
body=await async_maybe_transform(
|
|
626
|
+
{
|
|
627
|
+
"description": description,
|
|
628
|
+
"edges": edges,
|
|
629
|
+
"name": name,
|
|
630
|
+
"nodes": nodes,
|
|
631
|
+
"trigger_config": trigger_config,
|
|
632
|
+
"trigger_type": trigger_type,
|
|
633
|
+
"visibility": visibility,
|
|
634
|
+
},
|
|
635
|
+
v1_update_params.V1UpdateParams,
|
|
636
|
+
),
|
|
637
|
+
options=make_request_options(
|
|
638
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
639
|
+
),
|
|
640
|
+
cast_to=V1UpdateResponse,
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
async def list(
|
|
644
|
+
self,
|
|
645
|
+
*,
|
|
646
|
+
limit: int | Omit = omit,
|
|
647
|
+
offset: int | Omit = omit,
|
|
648
|
+
visibility: Literal["private", "org", "public"] | Omit = omit,
|
|
649
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
650
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
651
|
+
extra_headers: Headers | None = None,
|
|
652
|
+
extra_query: Query | None = None,
|
|
653
|
+
extra_body: Body | None = None,
|
|
654
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
655
|
+
) -> V1ListResponse:
|
|
656
|
+
"""
|
|
657
|
+
List all workflows for the authenticated organization.
|
|
658
|
+
|
|
659
|
+
Args:
|
|
660
|
+
limit: Maximum number of results
|
|
661
|
+
|
|
662
|
+
offset: Offset for pagination
|
|
663
|
+
|
|
664
|
+
visibility: Filter by visibility
|
|
665
|
+
|
|
666
|
+
extra_headers: Send extra headers
|
|
667
|
+
|
|
668
|
+
extra_query: Add additional query parameters to the request
|
|
669
|
+
|
|
670
|
+
extra_body: Add additional JSON properties to the request
|
|
671
|
+
|
|
672
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
673
|
+
"""
|
|
674
|
+
return await self._get(
|
|
675
|
+
"/workflows/v1",
|
|
676
|
+
options=make_request_options(
|
|
677
|
+
extra_headers=extra_headers,
|
|
678
|
+
extra_query=extra_query,
|
|
679
|
+
extra_body=extra_body,
|
|
680
|
+
timeout=timeout,
|
|
681
|
+
query=await async_maybe_transform(
|
|
682
|
+
{
|
|
683
|
+
"limit": limit,
|
|
684
|
+
"offset": offset,
|
|
685
|
+
"visibility": visibility,
|
|
686
|
+
},
|
|
687
|
+
v1_list_params.V1ListParams,
|
|
688
|
+
),
|
|
689
|
+
),
|
|
690
|
+
cast_to=V1ListResponse,
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
async def delete(
|
|
694
|
+
self,
|
|
695
|
+
id: str,
|
|
696
|
+
*,
|
|
697
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
698
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
699
|
+
extra_headers: Headers | None = None,
|
|
700
|
+
extra_query: Query | None = None,
|
|
701
|
+
extra_body: Body | None = None,
|
|
702
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
703
|
+
) -> V1DeleteResponse:
|
|
704
|
+
"""
|
|
705
|
+
Delete a workflow and all associated data.
|
|
706
|
+
|
|
707
|
+
Args:
|
|
708
|
+
extra_headers: Send extra headers
|
|
709
|
+
|
|
710
|
+
extra_query: Add additional query parameters to the request
|
|
711
|
+
|
|
712
|
+
extra_body: Add additional JSON properties to the request
|
|
713
|
+
|
|
714
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
715
|
+
"""
|
|
716
|
+
if not id:
|
|
717
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
718
|
+
return await self._delete(
|
|
719
|
+
f"/workflows/v1/{id}",
|
|
720
|
+
options=make_request_options(
|
|
721
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
722
|
+
),
|
|
723
|
+
cast_to=V1DeleteResponse,
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
async def deploy(
|
|
727
|
+
self,
|
|
728
|
+
id: str,
|
|
729
|
+
*,
|
|
730
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
731
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
732
|
+
extra_headers: Headers | None = None,
|
|
733
|
+
extra_query: Query | None = None,
|
|
734
|
+
extra_body: Body | None = None,
|
|
735
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
736
|
+
) -> V1DeployResponse:
|
|
737
|
+
"""Deploy a workflow to Modal compute.
|
|
738
|
+
|
|
739
|
+
Returns a webhook URL and secret for
|
|
740
|
+
triggering the workflow.
|
|
741
|
+
|
|
742
|
+
Args:
|
|
743
|
+
extra_headers: Send extra headers
|
|
744
|
+
|
|
745
|
+
extra_query: Add additional query parameters to the request
|
|
746
|
+
|
|
747
|
+
extra_body: Add additional JSON properties to the request
|
|
748
|
+
|
|
749
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
750
|
+
"""
|
|
751
|
+
if not id:
|
|
752
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
753
|
+
return await self._post(
|
|
754
|
+
f"/workflows/v1/{id}/deploy",
|
|
755
|
+
options=make_request_options(
|
|
756
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
757
|
+
),
|
|
758
|
+
cast_to=V1DeployResponse,
|
|
759
|
+
)
|
|
760
|
+
|
|
761
|
+
async def execute(
|
|
762
|
+
self,
|
|
763
|
+
id: str,
|
|
764
|
+
*,
|
|
765
|
+
body: object | Omit = omit,
|
|
766
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
767
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
768
|
+
extra_headers: Headers | None = None,
|
|
769
|
+
extra_query: Query | None = None,
|
|
770
|
+
extra_body: Body | None = None,
|
|
771
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
772
|
+
) -> V1ExecuteResponse:
|
|
773
|
+
"""Execute a workflow for testing.
|
|
774
|
+
|
|
775
|
+
This runs the workflow synchronously without
|
|
776
|
+
deployment.
|
|
777
|
+
|
|
778
|
+
Args:
|
|
779
|
+
body: Input data to pass to the workflow trigger
|
|
780
|
+
|
|
781
|
+
extra_headers: Send extra headers
|
|
782
|
+
|
|
783
|
+
extra_query: Add additional query parameters to the request
|
|
784
|
+
|
|
785
|
+
extra_body: Add additional JSON properties to the request
|
|
786
|
+
|
|
787
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
788
|
+
"""
|
|
789
|
+
if not id:
|
|
790
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
791
|
+
return await self._post(
|
|
792
|
+
f"/workflows/v1/{id}/execute",
|
|
793
|
+
body=await async_maybe_transform(body, v1_execute_params.V1ExecuteParams),
|
|
794
|
+
options=make_request_options(
|
|
795
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
796
|
+
),
|
|
797
|
+
cast_to=V1ExecuteResponse,
|
|
798
|
+
)
|
|
799
|
+
|
|
800
|
+
async def list_executions(
|
|
801
|
+
self,
|
|
802
|
+
id: str,
|
|
803
|
+
*,
|
|
804
|
+
limit: int | Omit = omit,
|
|
805
|
+
status: Literal["pending", "running", "completed", "failed", "cancelled"] | Omit = omit,
|
|
806
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
807
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
808
|
+
extra_headers: Headers | None = None,
|
|
809
|
+
extra_query: Query | None = None,
|
|
810
|
+
extra_body: Body | None = None,
|
|
811
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
812
|
+
) -> V1ListExecutionsResponse:
|
|
813
|
+
"""
|
|
814
|
+
List all executions for a specific workflow.
|
|
815
|
+
|
|
816
|
+
Args:
|
|
817
|
+
extra_headers: Send extra headers
|
|
818
|
+
|
|
819
|
+
extra_query: Add additional query parameters to the request
|
|
820
|
+
|
|
821
|
+
extra_body: Add additional JSON properties to the request
|
|
822
|
+
|
|
823
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
824
|
+
"""
|
|
825
|
+
if not id:
|
|
826
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
827
|
+
return await self._get(
|
|
828
|
+
f"/workflows/v1/{id}/executions",
|
|
829
|
+
options=make_request_options(
|
|
830
|
+
extra_headers=extra_headers,
|
|
831
|
+
extra_query=extra_query,
|
|
832
|
+
extra_body=extra_body,
|
|
833
|
+
timeout=timeout,
|
|
834
|
+
query=await async_maybe_transform(
|
|
835
|
+
{
|
|
836
|
+
"limit": limit,
|
|
837
|
+
"status": status,
|
|
838
|
+
},
|
|
839
|
+
v1_list_executions_params.V1ListExecutionsParams,
|
|
840
|
+
),
|
|
841
|
+
),
|
|
842
|
+
cast_to=V1ListExecutionsResponse,
|
|
843
|
+
)
|
|
844
|
+
|
|
845
|
+
async def retrieve_execution(
|
|
846
|
+
self,
|
|
847
|
+
id: str,
|
|
848
|
+
*,
|
|
849
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
850
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
851
|
+
extra_headers: Headers | None = None,
|
|
852
|
+
extra_query: Query | None = None,
|
|
853
|
+
extra_body: Body | None = None,
|
|
854
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
855
|
+
) -> V1RetrieveExecutionResponse:
|
|
856
|
+
"""
|
|
857
|
+
Get detailed information about a workflow execution.
|
|
858
|
+
|
|
859
|
+
Args:
|
|
860
|
+
extra_headers: Send extra headers
|
|
861
|
+
|
|
862
|
+
extra_query: Add additional query parameters to the request
|
|
863
|
+
|
|
864
|
+
extra_body: Add additional JSON properties to the request
|
|
865
|
+
|
|
866
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
867
|
+
"""
|
|
868
|
+
if not id:
|
|
869
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
870
|
+
return await self._get(
|
|
871
|
+
f"/workflows/v1/executions/{id}",
|
|
872
|
+
options=make_request_options(
|
|
873
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
874
|
+
),
|
|
875
|
+
cast_to=V1RetrieveExecutionResponse,
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
async def undeploy(
|
|
879
|
+
self,
|
|
880
|
+
id: str,
|
|
881
|
+
*,
|
|
882
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
883
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
884
|
+
extra_headers: Headers | None = None,
|
|
885
|
+
extra_query: Query | None = None,
|
|
886
|
+
extra_body: Body | None = None,
|
|
887
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
888
|
+
) -> V1UndeployResponse:
|
|
889
|
+
"""
|
|
890
|
+
Stop a deployed workflow and release its webhook URL.
|
|
891
|
+
|
|
892
|
+
Args:
|
|
893
|
+
extra_headers: Send extra headers
|
|
894
|
+
|
|
895
|
+
extra_query: Add additional query parameters to the request
|
|
896
|
+
|
|
897
|
+
extra_body: Add additional JSON properties to the request
|
|
898
|
+
|
|
899
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
900
|
+
"""
|
|
901
|
+
if not id:
|
|
902
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
903
|
+
return await self._delete(
|
|
904
|
+
f"/workflows/v1/{id}/deploy",
|
|
905
|
+
options=make_request_options(
|
|
906
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
907
|
+
),
|
|
908
|
+
cast_to=V1UndeployResponse,
|
|
909
|
+
)
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
class V1ResourceWithRawResponse:
|
|
913
|
+
def __init__(self, v1: V1Resource) -> None:
|
|
914
|
+
self._v1 = v1
|
|
915
|
+
|
|
916
|
+
self.create = to_raw_response_wrapper(
|
|
917
|
+
v1.create,
|
|
918
|
+
)
|
|
919
|
+
self.retrieve = to_raw_response_wrapper(
|
|
920
|
+
v1.retrieve,
|
|
921
|
+
)
|
|
922
|
+
self.update = to_raw_response_wrapper(
|
|
923
|
+
v1.update,
|
|
924
|
+
)
|
|
925
|
+
self.list = to_raw_response_wrapper(
|
|
926
|
+
v1.list,
|
|
927
|
+
)
|
|
928
|
+
self.delete = to_raw_response_wrapper(
|
|
929
|
+
v1.delete,
|
|
930
|
+
)
|
|
931
|
+
self.deploy = to_raw_response_wrapper(
|
|
932
|
+
v1.deploy,
|
|
933
|
+
)
|
|
934
|
+
self.execute = to_raw_response_wrapper(
|
|
935
|
+
v1.execute,
|
|
936
|
+
)
|
|
937
|
+
self.list_executions = to_raw_response_wrapper(
|
|
938
|
+
v1.list_executions,
|
|
939
|
+
)
|
|
940
|
+
self.retrieve_execution = to_raw_response_wrapper(
|
|
941
|
+
v1.retrieve_execution,
|
|
942
|
+
)
|
|
943
|
+
self.undeploy = to_raw_response_wrapper(
|
|
944
|
+
v1.undeploy,
|
|
945
|
+
)
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
class AsyncV1ResourceWithRawResponse:
|
|
949
|
+
def __init__(self, v1: AsyncV1Resource) -> None:
|
|
950
|
+
self._v1 = v1
|
|
951
|
+
|
|
952
|
+
self.create = async_to_raw_response_wrapper(
|
|
953
|
+
v1.create,
|
|
954
|
+
)
|
|
955
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
956
|
+
v1.retrieve,
|
|
957
|
+
)
|
|
958
|
+
self.update = async_to_raw_response_wrapper(
|
|
959
|
+
v1.update,
|
|
960
|
+
)
|
|
961
|
+
self.list = async_to_raw_response_wrapper(
|
|
962
|
+
v1.list,
|
|
963
|
+
)
|
|
964
|
+
self.delete = async_to_raw_response_wrapper(
|
|
965
|
+
v1.delete,
|
|
966
|
+
)
|
|
967
|
+
self.deploy = async_to_raw_response_wrapper(
|
|
968
|
+
v1.deploy,
|
|
969
|
+
)
|
|
970
|
+
self.execute = async_to_raw_response_wrapper(
|
|
971
|
+
v1.execute,
|
|
972
|
+
)
|
|
973
|
+
self.list_executions = async_to_raw_response_wrapper(
|
|
974
|
+
v1.list_executions,
|
|
975
|
+
)
|
|
976
|
+
self.retrieve_execution = async_to_raw_response_wrapper(
|
|
977
|
+
v1.retrieve_execution,
|
|
978
|
+
)
|
|
979
|
+
self.undeploy = async_to_raw_response_wrapper(
|
|
980
|
+
v1.undeploy,
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
class V1ResourceWithStreamingResponse:
|
|
985
|
+
def __init__(self, v1: V1Resource) -> None:
|
|
986
|
+
self._v1 = v1
|
|
987
|
+
|
|
988
|
+
self.create = to_streamed_response_wrapper(
|
|
989
|
+
v1.create,
|
|
990
|
+
)
|
|
991
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
992
|
+
v1.retrieve,
|
|
993
|
+
)
|
|
994
|
+
self.update = to_streamed_response_wrapper(
|
|
995
|
+
v1.update,
|
|
996
|
+
)
|
|
997
|
+
self.list = to_streamed_response_wrapper(
|
|
998
|
+
v1.list,
|
|
999
|
+
)
|
|
1000
|
+
self.delete = to_streamed_response_wrapper(
|
|
1001
|
+
v1.delete,
|
|
1002
|
+
)
|
|
1003
|
+
self.deploy = to_streamed_response_wrapper(
|
|
1004
|
+
v1.deploy,
|
|
1005
|
+
)
|
|
1006
|
+
self.execute = to_streamed_response_wrapper(
|
|
1007
|
+
v1.execute,
|
|
1008
|
+
)
|
|
1009
|
+
self.list_executions = to_streamed_response_wrapper(
|
|
1010
|
+
v1.list_executions,
|
|
1011
|
+
)
|
|
1012
|
+
self.retrieve_execution = to_streamed_response_wrapper(
|
|
1013
|
+
v1.retrieve_execution,
|
|
1014
|
+
)
|
|
1015
|
+
self.undeploy = to_streamed_response_wrapper(
|
|
1016
|
+
v1.undeploy,
|
|
1017
|
+
)
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
class AsyncV1ResourceWithStreamingResponse:
|
|
1021
|
+
def __init__(self, v1: AsyncV1Resource) -> None:
|
|
1022
|
+
self._v1 = v1
|
|
1023
|
+
|
|
1024
|
+
self.create = async_to_streamed_response_wrapper(
|
|
1025
|
+
v1.create,
|
|
1026
|
+
)
|
|
1027
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
1028
|
+
v1.retrieve,
|
|
1029
|
+
)
|
|
1030
|
+
self.update = async_to_streamed_response_wrapper(
|
|
1031
|
+
v1.update,
|
|
1032
|
+
)
|
|
1033
|
+
self.list = async_to_streamed_response_wrapper(
|
|
1034
|
+
v1.list,
|
|
1035
|
+
)
|
|
1036
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
1037
|
+
v1.delete,
|
|
1038
|
+
)
|
|
1039
|
+
self.deploy = async_to_streamed_response_wrapper(
|
|
1040
|
+
v1.deploy,
|
|
1041
|
+
)
|
|
1042
|
+
self.execute = async_to_streamed_response_wrapper(
|
|
1043
|
+
v1.execute,
|
|
1044
|
+
)
|
|
1045
|
+
self.list_executions = async_to_streamed_response_wrapper(
|
|
1046
|
+
v1.list_executions,
|
|
1047
|
+
)
|
|
1048
|
+
self.retrieve_execution = async_to_streamed_response_wrapper(
|
|
1049
|
+
v1.retrieve_execution,
|
|
1050
|
+
)
|
|
1051
|
+
self.undeploy = async_to_streamed_response_wrapper(
|
|
1052
|
+
v1.undeploy,
|
|
1053
|
+
)
|