groundx 2.5.9__py3-none-any.whl → 2.6.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.
Potentially problematic release.
This version of groundx might be problematic. Click here for more details.
- groundx/__init__.py +44 -1
- groundx/client.py +3 -0
- groundx/core/client_wrapper.py +2 -2
- groundx/extract/agents/agent.py +5 -5
- groundx/types/__init__.py +40 -0
- groundx/types/workflow_apply_request.py +24 -0
- groundx/types/workflow_detail.py +55 -0
- groundx/types/workflow_detail_relationships.py +36 -0
- groundx/types/workflow_engine.py +58 -0
- groundx/types/workflow_engine_reasoning_effort.py +5 -0
- groundx/types/workflow_engine_service.py +7 -0
- groundx/types/workflow_prompt.py +39 -0
- groundx/types/workflow_prompt_group.py +25 -0
- groundx/types/workflow_prompt_role.py +5 -0
- groundx/types/workflow_response.py +20 -0
- groundx/types/workflow_step.py +26 -0
- groundx/types/workflow_steps.py +50 -0
- groundx/types/workflow_steps_chunk_instruct.py +24 -0
- groundx/types/workflow_steps_chunk_summary.py +26 -0
- groundx/types/workflow_steps_doc_keys.py +22 -0
- groundx/types/workflow_steps_doc_summary.py +23 -0
- groundx/types/workflow_steps_search_query.py +22 -0
- groundx/types/workflow_steps_sect_instruct.py +20 -0
- groundx/types/workflow_steps_sect_summary.py +23 -0
- groundx/types/workflows_response.py +20 -0
- groundx/workflow/__init__.py +7 -0
- groundx/workflow/client.py +743 -0
- groundx/workflow/raw_client.py +834 -0
- groundx/workflow/types/__init__.py +7 -0
- groundx/workflow/types/workflow_get_request_id.py +5 -0
- {groundx-2.5.9.dist-info → groundx-2.6.0.dist-info}/METADATA +1 -1
- {groundx-2.5.9.dist-info → groundx-2.6.0.dist-info}/RECORD +34 -9
- {groundx-2.5.9.dist-info → groundx-2.6.0.dist-info}/LICENSE +0 -0
- {groundx-2.5.9.dist-info → groundx-2.6.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,743 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.message_response import MessageResponse
|
|
8
|
+
from ..types.workflow_response import WorkflowResponse
|
|
9
|
+
from ..types.workflow_steps import WorkflowSteps
|
|
10
|
+
from ..types.workflows_response import WorkflowsResponse
|
|
11
|
+
from .raw_client import AsyncRawWorkflowClient, RawWorkflowClient
|
|
12
|
+
from .types.workflow_get_request_id import WorkflowGetRequestId
|
|
13
|
+
|
|
14
|
+
# this is used as the default value for optional parameters
|
|
15
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class WorkflowClient:
|
|
19
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
20
|
+
self._raw_client = RawWorkflowClient(client_wrapper=client_wrapper)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def with_raw_response(self) -> RawWorkflowClient:
|
|
24
|
+
"""
|
|
25
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
RawWorkflowClient
|
|
30
|
+
"""
|
|
31
|
+
return self._raw_client
|
|
32
|
+
|
|
33
|
+
def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> WorkflowsResponse:
|
|
34
|
+
"""
|
|
35
|
+
Get all workflows associated with the API key.
|
|
36
|
+
|
|
37
|
+
Parameters
|
|
38
|
+
----------
|
|
39
|
+
request_options : typing.Optional[RequestOptions]
|
|
40
|
+
Request-specific configuration.
|
|
41
|
+
|
|
42
|
+
Returns
|
|
43
|
+
-------
|
|
44
|
+
WorkflowsResponse
|
|
45
|
+
Look up success
|
|
46
|
+
|
|
47
|
+
Examples
|
|
48
|
+
--------
|
|
49
|
+
from groundx import GroundX
|
|
50
|
+
|
|
51
|
+
client = GroundX(
|
|
52
|
+
api_key="YOUR_API_KEY",
|
|
53
|
+
)
|
|
54
|
+
client.workflow.list()
|
|
55
|
+
"""
|
|
56
|
+
_response = self._raw_client.list(request_options=request_options)
|
|
57
|
+
return _response.data
|
|
58
|
+
|
|
59
|
+
def create(
|
|
60
|
+
self,
|
|
61
|
+
*,
|
|
62
|
+
name: typing.Optional[str] = OMIT,
|
|
63
|
+
steps: typing.Optional[WorkflowSteps] = OMIT,
|
|
64
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
65
|
+
) -> WorkflowResponse:
|
|
66
|
+
"""
|
|
67
|
+
Create a workflow.
|
|
68
|
+
|
|
69
|
+
Parameters
|
|
70
|
+
----------
|
|
71
|
+
name : typing.Optional[str]
|
|
72
|
+
The name of the workflow being created.
|
|
73
|
+
|
|
74
|
+
steps : typing.Optional[WorkflowSteps]
|
|
75
|
+
|
|
76
|
+
request_options : typing.Optional[RequestOptions]
|
|
77
|
+
Request-specific configuration.
|
|
78
|
+
|
|
79
|
+
Returns
|
|
80
|
+
-------
|
|
81
|
+
WorkflowResponse
|
|
82
|
+
Workflow successfully created
|
|
83
|
+
|
|
84
|
+
Examples
|
|
85
|
+
--------
|
|
86
|
+
from groundx import GroundX
|
|
87
|
+
|
|
88
|
+
client = GroundX(
|
|
89
|
+
api_key="YOUR_API_KEY",
|
|
90
|
+
)
|
|
91
|
+
client.workflow.create()
|
|
92
|
+
"""
|
|
93
|
+
_response = self._raw_client.create(name=name, steps=steps, request_options=request_options)
|
|
94
|
+
return _response.data
|
|
95
|
+
|
|
96
|
+
def relationship_add_to_account(
|
|
97
|
+
self, *, workflow_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
98
|
+
) -> MessageResponse:
|
|
99
|
+
"""
|
|
100
|
+
Assigns the given workflow to the customer account and is applied by default to all files unless overridden by document or bucket workflows.
|
|
101
|
+
|
|
102
|
+
Parameters
|
|
103
|
+
----------
|
|
104
|
+
workflow_id : str
|
|
105
|
+
The id of the workflow that is being applied.
|
|
106
|
+
|
|
107
|
+
request_options : typing.Optional[RequestOptions]
|
|
108
|
+
Request-specific configuration.
|
|
109
|
+
|
|
110
|
+
Returns
|
|
111
|
+
-------
|
|
112
|
+
MessageResponse
|
|
113
|
+
Apply success
|
|
114
|
+
|
|
115
|
+
Examples
|
|
116
|
+
--------
|
|
117
|
+
from groundx import GroundX
|
|
118
|
+
|
|
119
|
+
client = GroundX(
|
|
120
|
+
api_key="YOUR_API_KEY",
|
|
121
|
+
)
|
|
122
|
+
client.workflow.relationship_add_to_account(
|
|
123
|
+
workflow_id="workflowId",
|
|
124
|
+
)
|
|
125
|
+
"""
|
|
126
|
+
_response = self._raw_client.relationship_add_to_account(
|
|
127
|
+
workflow_id=workflow_id, request_options=request_options
|
|
128
|
+
)
|
|
129
|
+
return _response.data
|
|
130
|
+
|
|
131
|
+
def relationship_remove_from_account(
|
|
132
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
133
|
+
) -> MessageResponse:
|
|
134
|
+
"""
|
|
135
|
+
Removes the assigned workflow from the customer account.
|
|
136
|
+
|
|
137
|
+
Parameters
|
|
138
|
+
----------
|
|
139
|
+
request_options : typing.Optional[RequestOptions]
|
|
140
|
+
Request-specific configuration.
|
|
141
|
+
|
|
142
|
+
Returns
|
|
143
|
+
-------
|
|
144
|
+
MessageResponse
|
|
145
|
+
Apply success
|
|
146
|
+
|
|
147
|
+
Examples
|
|
148
|
+
--------
|
|
149
|
+
from groundx import GroundX
|
|
150
|
+
|
|
151
|
+
client = GroundX(
|
|
152
|
+
api_key="YOUR_API_KEY",
|
|
153
|
+
)
|
|
154
|
+
client.workflow.relationship_remove_from_account()
|
|
155
|
+
"""
|
|
156
|
+
_response = self._raw_client.relationship_remove_from_account(request_options=request_options)
|
|
157
|
+
return _response.data
|
|
158
|
+
|
|
159
|
+
def relationship_add_to_id(
|
|
160
|
+
self, id: int, *, workflow_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
161
|
+
) -> MessageResponse:
|
|
162
|
+
"""
|
|
163
|
+
Assigns the given workflow to the group or bucket and is applied by default to all files unless overridden by document workflows.
|
|
164
|
+
|
|
165
|
+
Parameters
|
|
166
|
+
----------
|
|
167
|
+
id : int
|
|
168
|
+
The id of the group or bucket that the workflow will be assigned to.
|
|
169
|
+
|
|
170
|
+
workflow_id : str
|
|
171
|
+
The id of the workflow that is being applied.
|
|
172
|
+
|
|
173
|
+
request_options : typing.Optional[RequestOptions]
|
|
174
|
+
Request-specific configuration.
|
|
175
|
+
|
|
176
|
+
Returns
|
|
177
|
+
-------
|
|
178
|
+
MessageResponse
|
|
179
|
+
Apply success
|
|
180
|
+
|
|
181
|
+
Examples
|
|
182
|
+
--------
|
|
183
|
+
from groundx import GroundX
|
|
184
|
+
|
|
185
|
+
client = GroundX(
|
|
186
|
+
api_key="YOUR_API_KEY",
|
|
187
|
+
)
|
|
188
|
+
client.workflow.relationship_add_to_id(
|
|
189
|
+
id=1,
|
|
190
|
+
workflow_id="workflowId",
|
|
191
|
+
)
|
|
192
|
+
"""
|
|
193
|
+
_response = self._raw_client.relationship_add_to_id(
|
|
194
|
+
id, workflow_id=workflow_id, request_options=request_options
|
|
195
|
+
)
|
|
196
|
+
return _response.data
|
|
197
|
+
|
|
198
|
+
def relationship_remove_from_id(
|
|
199
|
+
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
200
|
+
) -> MessageResponse:
|
|
201
|
+
"""
|
|
202
|
+
Removes the assigned workflow from the customer account.
|
|
203
|
+
|
|
204
|
+
Parameters
|
|
205
|
+
----------
|
|
206
|
+
id : int
|
|
207
|
+
The id of the group or bucket that the workflow will removed from.
|
|
208
|
+
|
|
209
|
+
request_options : typing.Optional[RequestOptions]
|
|
210
|
+
Request-specific configuration.
|
|
211
|
+
|
|
212
|
+
Returns
|
|
213
|
+
-------
|
|
214
|
+
MessageResponse
|
|
215
|
+
Apply success
|
|
216
|
+
|
|
217
|
+
Examples
|
|
218
|
+
--------
|
|
219
|
+
from groundx import GroundX
|
|
220
|
+
|
|
221
|
+
client = GroundX(
|
|
222
|
+
api_key="YOUR_API_KEY",
|
|
223
|
+
)
|
|
224
|
+
client.workflow.relationship_remove_from_id(
|
|
225
|
+
id=1,
|
|
226
|
+
)
|
|
227
|
+
"""
|
|
228
|
+
_response = self._raw_client.relationship_remove_from_id(id, request_options=request_options)
|
|
229
|
+
return _response.data
|
|
230
|
+
|
|
231
|
+
def get(
|
|
232
|
+
self, id: WorkflowGetRequestId, *, request_options: typing.Optional[RequestOptions] = None
|
|
233
|
+
) -> WorkflowResponse:
|
|
234
|
+
"""
|
|
235
|
+
look up a specific workflow by groupId, bucketId, or workflowId.
|
|
236
|
+
|
|
237
|
+
Parameters
|
|
238
|
+
----------
|
|
239
|
+
id : WorkflowGetRequestId
|
|
240
|
+
The id of the group, bucket, or workflow to look up.
|
|
241
|
+
|
|
242
|
+
request_options : typing.Optional[RequestOptions]
|
|
243
|
+
Request-specific configuration.
|
|
244
|
+
|
|
245
|
+
Returns
|
|
246
|
+
-------
|
|
247
|
+
WorkflowResponse
|
|
248
|
+
Look up success
|
|
249
|
+
|
|
250
|
+
Examples
|
|
251
|
+
--------
|
|
252
|
+
from groundx import GroundX
|
|
253
|
+
|
|
254
|
+
client = GroundX(
|
|
255
|
+
api_key="YOUR_API_KEY",
|
|
256
|
+
)
|
|
257
|
+
client.workflow.get(
|
|
258
|
+
id=1,
|
|
259
|
+
)
|
|
260
|
+
"""
|
|
261
|
+
_response = self._raw_client.get(id, request_options=request_options)
|
|
262
|
+
return _response.data
|
|
263
|
+
|
|
264
|
+
def update(
|
|
265
|
+
self,
|
|
266
|
+
id: str,
|
|
267
|
+
*,
|
|
268
|
+
workflow_id: str,
|
|
269
|
+
name: typing.Optional[str] = OMIT,
|
|
270
|
+
steps: typing.Optional[WorkflowSteps] = OMIT,
|
|
271
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
272
|
+
) -> WorkflowResponse:
|
|
273
|
+
"""
|
|
274
|
+
Update an existing workflow.
|
|
275
|
+
|
|
276
|
+
Parameters
|
|
277
|
+
----------
|
|
278
|
+
id : str
|
|
279
|
+
The workflowId of the workflow being updated.
|
|
280
|
+
|
|
281
|
+
workflow_id : str
|
|
282
|
+
The id of the workflow that is being updated.
|
|
283
|
+
|
|
284
|
+
name : typing.Optional[str]
|
|
285
|
+
The name of the workflow being created.
|
|
286
|
+
|
|
287
|
+
steps : typing.Optional[WorkflowSteps]
|
|
288
|
+
|
|
289
|
+
request_options : typing.Optional[RequestOptions]
|
|
290
|
+
Request-specific configuration.
|
|
291
|
+
|
|
292
|
+
Returns
|
|
293
|
+
-------
|
|
294
|
+
WorkflowResponse
|
|
295
|
+
Update success
|
|
296
|
+
|
|
297
|
+
Examples
|
|
298
|
+
--------
|
|
299
|
+
from groundx import GroundX
|
|
300
|
+
|
|
301
|
+
client = GroundX(
|
|
302
|
+
api_key="YOUR_API_KEY",
|
|
303
|
+
)
|
|
304
|
+
client.workflow.update(
|
|
305
|
+
id="id",
|
|
306
|
+
workflow_id="workflowId",
|
|
307
|
+
)
|
|
308
|
+
"""
|
|
309
|
+
_response = self._raw_client.update(
|
|
310
|
+
id, workflow_id=workflow_id, name=name, steps=steps, request_options=request_options
|
|
311
|
+
)
|
|
312
|
+
return _response.data
|
|
313
|
+
|
|
314
|
+
def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> MessageResponse:
|
|
315
|
+
"""
|
|
316
|
+
Delete a workflow.
|
|
317
|
+
|
|
318
|
+
Parameters
|
|
319
|
+
----------
|
|
320
|
+
id : str
|
|
321
|
+
The workflowId of the workflow being deleted.
|
|
322
|
+
|
|
323
|
+
request_options : typing.Optional[RequestOptions]
|
|
324
|
+
Request-specific configuration.
|
|
325
|
+
|
|
326
|
+
Returns
|
|
327
|
+
-------
|
|
328
|
+
MessageResponse
|
|
329
|
+
Delete success
|
|
330
|
+
|
|
331
|
+
Examples
|
|
332
|
+
--------
|
|
333
|
+
from groundx import GroundX
|
|
334
|
+
|
|
335
|
+
client = GroundX(
|
|
336
|
+
api_key="YOUR_API_KEY",
|
|
337
|
+
)
|
|
338
|
+
client.workflow.delete(
|
|
339
|
+
id="id",
|
|
340
|
+
)
|
|
341
|
+
"""
|
|
342
|
+
_response = self._raw_client.delete(id, request_options=request_options)
|
|
343
|
+
return _response.data
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
class AsyncWorkflowClient:
|
|
347
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
348
|
+
self._raw_client = AsyncRawWorkflowClient(client_wrapper=client_wrapper)
|
|
349
|
+
|
|
350
|
+
@property
|
|
351
|
+
def with_raw_response(self) -> AsyncRawWorkflowClient:
|
|
352
|
+
"""
|
|
353
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
354
|
+
|
|
355
|
+
Returns
|
|
356
|
+
-------
|
|
357
|
+
AsyncRawWorkflowClient
|
|
358
|
+
"""
|
|
359
|
+
return self._raw_client
|
|
360
|
+
|
|
361
|
+
async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> WorkflowsResponse:
|
|
362
|
+
"""
|
|
363
|
+
Get all workflows associated with the API key.
|
|
364
|
+
|
|
365
|
+
Parameters
|
|
366
|
+
----------
|
|
367
|
+
request_options : typing.Optional[RequestOptions]
|
|
368
|
+
Request-specific configuration.
|
|
369
|
+
|
|
370
|
+
Returns
|
|
371
|
+
-------
|
|
372
|
+
WorkflowsResponse
|
|
373
|
+
Look up success
|
|
374
|
+
|
|
375
|
+
Examples
|
|
376
|
+
--------
|
|
377
|
+
import asyncio
|
|
378
|
+
|
|
379
|
+
from groundx import AsyncGroundX
|
|
380
|
+
|
|
381
|
+
client = AsyncGroundX(
|
|
382
|
+
api_key="YOUR_API_KEY",
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
async def main() -> None:
|
|
387
|
+
await client.workflow.list()
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
asyncio.run(main())
|
|
391
|
+
"""
|
|
392
|
+
_response = await self._raw_client.list(request_options=request_options)
|
|
393
|
+
return _response.data
|
|
394
|
+
|
|
395
|
+
async def create(
|
|
396
|
+
self,
|
|
397
|
+
*,
|
|
398
|
+
name: typing.Optional[str] = OMIT,
|
|
399
|
+
steps: typing.Optional[WorkflowSteps] = OMIT,
|
|
400
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
401
|
+
) -> WorkflowResponse:
|
|
402
|
+
"""
|
|
403
|
+
Create a workflow.
|
|
404
|
+
|
|
405
|
+
Parameters
|
|
406
|
+
----------
|
|
407
|
+
name : typing.Optional[str]
|
|
408
|
+
The name of the workflow being created.
|
|
409
|
+
|
|
410
|
+
steps : typing.Optional[WorkflowSteps]
|
|
411
|
+
|
|
412
|
+
request_options : typing.Optional[RequestOptions]
|
|
413
|
+
Request-specific configuration.
|
|
414
|
+
|
|
415
|
+
Returns
|
|
416
|
+
-------
|
|
417
|
+
WorkflowResponse
|
|
418
|
+
Workflow successfully created
|
|
419
|
+
|
|
420
|
+
Examples
|
|
421
|
+
--------
|
|
422
|
+
import asyncio
|
|
423
|
+
|
|
424
|
+
from groundx import AsyncGroundX
|
|
425
|
+
|
|
426
|
+
client = AsyncGroundX(
|
|
427
|
+
api_key="YOUR_API_KEY",
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
async def main() -> None:
|
|
432
|
+
await client.workflow.create()
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
asyncio.run(main())
|
|
436
|
+
"""
|
|
437
|
+
_response = await self._raw_client.create(name=name, steps=steps, request_options=request_options)
|
|
438
|
+
return _response.data
|
|
439
|
+
|
|
440
|
+
async def relationship_add_to_account(
|
|
441
|
+
self, *, workflow_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
442
|
+
) -> MessageResponse:
|
|
443
|
+
"""
|
|
444
|
+
Assigns the given workflow to the customer account and is applied by default to all files unless overridden by document or bucket workflows.
|
|
445
|
+
|
|
446
|
+
Parameters
|
|
447
|
+
----------
|
|
448
|
+
workflow_id : str
|
|
449
|
+
The id of the workflow that is being applied.
|
|
450
|
+
|
|
451
|
+
request_options : typing.Optional[RequestOptions]
|
|
452
|
+
Request-specific configuration.
|
|
453
|
+
|
|
454
|
+
Returns
|
|
455
|
+
-------
|
|
456
|
+
MessageResponse
|
|
457
|
+
Apply success
|
|
458
|
+
|
|
459
|
+
Examples
|
|
460
|
+
--------
|
|
461
|
+
import asyncio
|
|
462
|
+
|
|
463
|
+
from groundx import AsyncGroundX
|
|
464
|
+
|
|
465
|
+
client = AsyncGroundX(
|
|
466
|
+
api_key="YOUR_API_KEY",
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
async def main() -> None:
|
|
471
|
+
await client.workflow.relationship_add_to_account(
|
|
472
|
+
workflow_id="workflowId",
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
asyncio.run(main())
|
|
477
|
+
"""
|
|
478
|
+
_response = await self._raw_client.relationship_add_to_account(
|
|
479
|
+
workflow_id=workflow_id, request_options=request_options
|
|
480
|
+
)
|
|
481
|
+
return _response.data
|
|
482
|
+
|
|
483
|
+
async def relationship_remove_from_account(
|
|
484
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
485
|
+
) -> MessageResponse:
|
|
486
|
+
"""
|
|
487
|
+
Removes the assigned workflow from the customer account.
|
|
488
|
+
|
|
489
|
+
Parameters
|
|
490
|
+
----------
|
|
491
|
+
request_options : typing.Optional[RequestOptions]
|
|
492
|
+
Request-specific configuration.
|
|
493
|
+
|
|
494
|
+
Returns
|
|
495
|
+
-------
|
|
496
|
+
MessageResponse
|
|
497
|
+
Apply success
|
|
498
|
+
|
|
499
|
+
Examples
|
|
500
|
+
--------
|
|
501
|
+
import asyncio
|
|
502
|
+
|
|
503
|
+
from groundx import AsyncGroundX
|
|
504
|
+
|
|
505
|
+
client = AsyncGroundX(
|
|
506
|
+
api_key="YOUR_API_KEY",
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
async def main() -> None:
|
|
511
|
+
await client.workflow.relationship_remove_from_account()
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
asyncio.run(main())
|
|
515
|
+
"""
|
|
516
|
+
_response = await self._raw_client.relationship_remove_from_account(request_options=request_options)
|
|
517
|
+
return _response.data
|
|
518
|
+
|
|
519
|
+
async def relationship_add_to_id(
|
|
520
|
+
self, id: int, *, workflow_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
521
|
+
) -> MessageResponse:
|
|
522
|
+
"""
|
|
523
|
+
Assigns the given workflow to the group or bucket and is applied by default to all files unless overridden by document workflows.
|
|
524
|
+
|
|
525
|
+
Parameters
|
|
526
|
+
----------
|
|
527
|
+
id : int
|
|
528
|
+
The id of the group or bucket that the workflow will be assigned to.
|
|
529
|
+
|
|
530
|
+
workflow_id : str
|
|
531
|
+
The id of the workflow that is being applied.
|
|
532
|
+
|
|
533
|
+
request_options : typing.Optional[RequestOptions]
|
|
534
|
+
Request-specific configuration.
|
|
535
|
+
|
|
536
|
+
Returns
|
|
537
|
+
-------
|
|
538
|
+
MessageResponse
|
|
539
|
+
Apply success
|
|
540
|
+
|
|
541
|
+
Examples
|
|
542
|
+
--------
|
|
543
|
+
import asyncio
|
|
544
|
+
|
|
545
|
+
from groundx import AsyncGroundX
|
|
546
|
+
|
|
547
|
+
client = AsyncGroundX(
|
|
548
|
+
api_key="YOUR_API_KEY",
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
async def main() -> None:
|
|
553
|
+
await client.workflow.relationship_add_to_id(
|
|
554
|
+
id=1,
|
|
555
|
+
workflow_id="workflowId",
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
asyncio.run(main())
|
|
560
|
+
"""
|
|
561
|
+
_response = await self._raw_client.relationship_add_to_id(
|
|
562
|
+
id, workflow_id=workflow_id, request_options=request_options
|
|
563
|
+
)
|
|
564
|
+
return _response.data
|
|
565
|
+
|
|
566
|
+
async def relationship_remove_from_id(
|
|
567
|
+
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
568
|
+
) -> MessageResponse:
|
|
569
|
+
"""
|
|
570
|
+
Removes the assigned workflow from the customer account.
|
|
571
|
+
|
|
572
|
+
Parameters
|
|
573
|
+
----------
|
|
574
|
+
id : int
|
|
575
|
+
The id of the group or bucket that the workflow will removed from.
|
|
576
|
+
|
|
577
|
+
request_options : typing.Optional[RequestOptions]
|
|
578
|
+
Request-specific configuration.
|
|
579
|
+
|
|
580
|
+
Returns
|
|
581
|
+
-------
|
|
582
|
+
MessageResponse
|
|
583
|
+
Apply success
|
|
584
|
+
|
|
585
|
+
Examples
|
|
586
|
+
--------
|
|
587
|
+
import asyncio
|
|
588
|
+
|
|
589
|
+
from groundx import AsyncGroundX
|
|
590
|
+
|
|
591
|
+
client = AsyncGroundX(
|
|
592
|
+
api_key="YOUR_API_KEY",
|
|
593
|
+
)
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
async def main() -> None:
|
|
597
|
+
await client.workflow.relationship_remove_from_id(
|
|
598
|
+
id=1,
|
|
599
|
+
)
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
asyncio.run(main())
|
|
603
|
+
"""
|
|
604
|
+
_response = await self._raw_client.relationship_remove_from_id(id, request_options=request_options)
|
|
605
|
+
return _response.data
|
|
606
|
+
|
|
607
|
+
async def get(
|
|
608
|
+
self, id: WorkflowGetRequestId, *, request_options: typing.Optional[RequestOptions] = None
|
|
609
|
+
) -> WorkflowResponse:
|
|
610
|
+
"""
|
|
611
|
+
look up a specific workflow by groupId, bucketId, or workflowId.
|
|
612
|
+
|
|
613
|
+
Parameters
|
|
614
|
+
----------
|
|
615
|
+
id : WorkflowGetRequestId
|
|
616
|
+
The id of the group, bucket, or workflow to look up.
|
|
617
|
+
|
|
618
|
+
request_options : typing.Optional[RequestOptions]
|
|
619
|
+
Request-specific configuration.
|
|
620
|
+
|
|
621
|
+
Returns
|
|
622
|
+
-------
|
|
623
|
+
WorkflowResponse
|
|
624
|
+
Look up success
|
|
625
|
+
|
|
626
|
+
Examples
|
|
627
|
+
--------
|
|
628
|
+
import asyncio
|
|
629
|
+
|
|
630
|
+
from groundx import AsyncGroundX
|
|
631
|
+
|
|
632
|
+
client = AsyncGroundX(
|
|
633
|
+
api_key="YOUR_API_KEY",
|
|
634
|
+
)
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
async def main() -> None:
|
|
638
|
+
await client.workflow.get(
|
|
639
|
+
id=1,
|
|
640
|
+
)
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
asyncio.run(main())
|
|
644
|
+
"""
|
|
645
|
+
_response = await self._raw_client.get(id, request_options=request_options)
|
|
646
|
+
return _response.data
|
|
647
|
+
|
|
648
|
+
async def update(
|
|
649
|
+
self,
|
|
650
|
+
id: str,
|
|
651
|
+
*,
|
|
652
|
+
workflow_id: str,
|
|
653
|
+
name: typing.Optional[str] = OMIT,
|
|
654
|
+
steps: typing.Optional[WorkflowSteps] = OMIT,
|
|
655
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
656
|
+
) -> WorkflowResponse:
|
|
657
|
+
"""
|
|
658
|
+
Update an existing workflow.
|
|
659
|
+
|
|
660
|
+
Parameters
|
|
661
|
+
----------
|
|
662
|
+
id : str
|
|
663
|
+
The workflowId of the workflow being updated.
|
|
664
|
+
|
|
665
|
+
workflow_id : str
|
|
666
|
+
The id of the workflow that is being updated.
|
|
667
|
+
|
|
668
|
+
name : typing.Optional[str]
|
|
669
|
+
The name of the workflow being created.
|
|
670
|
+
|
|
671
|
+
steps : typing.Optional[WorkflowSteps]
|
|
672
|
+
|
|
673
|
+
request_options : typing.Optional[RequestOptions]
|
|
674
|
+
Request-specific configuration.
|
|
675
|
+
|
|
676
|
+
Returns
|
|
677
|
+
-------
|
|
678
|
+
WorkflowResponse
|
|
679
|
+
Update success
|
|
680
|
+
|
|
681
|
+
Examples
|
|
682
|
+
--------
|
|
683
|
+
import asyncio
|
|
684
|
+
|
|
685
|
+
from groundx import AsyncGroundX
|
|
686
|
+
|
|
687
|
+
client = AsyncGroundX(
|
|
688
|
+
api_key="YOUR_API_KEY",
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
async def main() -> None:
|
|
693
|
+
await client.workflow.update(
|
|
694
|
+
id="id",
|
|
695
|
+
workflow_id="workflowId",
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
asyncio.run(main())
|
|
700
|
+
"""
|
|
701
|
+
_response = await self._raw_client.update(
|
|
702
|
+
id, workflow_id=workflow_id, name=name, steps=steps, request_options=request_options
|
|
703
|
+
)
|
|
704
|
+
return _response.data
|
|
705
|
+
|
|
706
|
+
async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> MessageResponse:
|
|
707
|
+
"""
|
|
708
|
+
Delete a workflow.
|
|
709
|
+
|
|
710
|
+
Parameters
|
|
711
|
+
----------
|
|
712
|
+
id : str
|
|
713
|
+
The workflowId of the workflow being deleted.
|
|
714
|
+
|
|
715
|
+
request_options : typing.Optional[RequestOptions]
|
|
716
|
+
Request-specific configuration.
|
|
717
|
+
|
|
718
|
+
Returns
|
|
719
|
+
-------
|
|
720
|
+
MessageResponse
|
|
721
|
+
Delete success
|
|
722
|
+
|
|
723
|
+
Examples
|
|
724
|
+
--------
|
|
725
|
+
import asyncio
|
|
726
|
+
|
|
727
|
+
from groundx import AsyncGroundX
|
|
728
|
+
|
|
729
|
+
client = AsyncGroundX(
|
|
730
|
+
api_key="YOUR_API_KEY",
|
|
731
|
+
)
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
async def main() -> None:
|
|
735
|
+
await client.workflow.delete(
|
|
736
|
+
id="id",
|
|
737
|
+
)
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
asyncio.run(main())
|
|
741
|
+
"""
|
|
742
|
+
_response = await self._raw_client.delete(id, request_options=request_options)
|
|
743
|
+
return _response.data
|