step_rest_client 1.0.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.
Files changed (117) hide show
  1. step_rest_client/__init__.py +136 -0
  2. step_rest_client/api/__init__.py +26 -0
  3. step_rest_client/api/assets_api.py +7960 -0
  4. step_rest_client/api/attributes_api.py +340 -0
  5. step_rest_client/api/background_process_types_api.py +640 -0
  6. step_rest_client/api/background_processes_api.py +1577 -0
  7. step_rest_client/api/classifications_api.py +7991 -0
  8. step_rest_client/api/data_container_types_api.py +340 -0
  9. step_rest_client/api/data_type_groups_api.py +340 -0
  10. step_rest_client/api/entities_api.py +8680 -0
  11. step_rest_client/api/event_processors_api.py +3337 -0
  12. step_rest_client/api/export_api.py +383 -0
  13. step_rest_client/api/gateway_integration_endpoints_api.py +1232 -0
  14. step_rest_client/api/import_api.py +390 -0
  15. step_rest_client/api/inbound_integration_endpoints_api.py +2815 -0
  16. step_rest_client/api/lists_of_values_api.py +642 -0
  17. step_rest_client/api/object_types_api.py +340 -0
  18. step_rest_client/api/outbound_integration_endpoints_api.py +3655 -0
  19. step_rest_client/api/products_api.py +8007 -0
  20. step_rest_client/api/reference_types_api.py +340 -0
  21. step_rest_client/api/reporting_api.py +707 -0
  22. step_rest_client/api/units_api.py +340 -0
  23. step_rest_client/api/workflow_tasks_api.py +1887 -0
  24. step_rest_client/api/workflows_api.py +1270 -0
  25. step_rest_client/api_client.py +797 -0
  26. step_rest_client/api_response.py +21 -0
  27. step_rest_client/configuration.py +597 -0
  28. step_rest_client/exceptions.py +216 -0
  29. step_rest_client/models/__init__.py +98 -0
  30. step_rest_client/models/amount.py +89 -0
  31. step_rest_client/models/and_condition.py +107 -0
  32. step_rest_client/models/approval_response.py +87 -0
  33. step_rest_client/models/approval_status.py +99 -0
  34. step_rest_client/models/asset.py +129 -0
  35. step_rest_client/models/attribute.py +120 -0
  36. step_rest_client/models/attribute_link.py +102 -0
  37. step_rest_client/models/background_process.py +139 -0
  38. step_rest_client/models/background_process_attachment_metadata.py +105 -0
  39. step_rest_client/models/background_process_identification.py +89 -0
  40. step_rest_client/models/background_process_type.py +89 -0
  41. step_rest_client/models/classification.py +135 -0
  42. step_rest_client/models/condition.py +265 -0
  43. step_rest_client/models/data_container.py +139 -0
  44. step_rest_client/models/data_container_entry.py +117 -0
  45. step_rest_client/models/data_container_object_condition.py +181 -0
  46. step_rest_client/models/data_container_type.py +106 -0
  47. step_rest_client/models/data_type_group.py +108 -0
  48. step_rest_client/models/endpoint_statistics.py +109 -0
  49. step_rest_client/models/endpoint_status.py +99 -0
  50. step_rest_client/models/entity.py +142 -0
  51. step_rest_client/models/error.py +91 -0
  52. step_rest_client/models/event_processor.py +93 -0
  53. step_rest_client/models/event_processor_statistics.py +97 -0
  54. step_rest_client/models/event_processor_status.py +99 -0
  55. step_rest_client/models/event_queue_status.py +89 -0
  56. step_rest_client/models/execution_report_entry.py +103 -0
  57. step_rest_client/models/export_specification.py +89 -0
  58. step_rest_client/models/find_similar_business_rule_result.py +91 -0
  59. step_rest_client/models/find_similar_entities_request.py +95 -0
  60. step_rest_client/models/find_similar_entities_response.py +103 -0
  61. step_rest_client/models/find_similar_entities_response_record.py +95 -0
  62. step_rest_client/models/find_similar_execution_report.py +103 -0
  63. step_rest_client/models/gateway_integration_endpoint.py +93 -0
  64. step_rest_client/models/has_data_container_object_condition.py +106 -0
  65. step_rest_client/models/has_reference_to_condition.py +108 -0
  66. step_rest_client/models/id_condition.py +105 -0
  67. step_rest_client/models/inbound_integration_endpoint.py +93 -0
  68. step_rest_client/models/incoming_reference_entry.py +118 -0
  69. step_rest_client/models/list_of_values.py +110 -0
  70. step_rest_client/models/list_of_values_entry.py +91 -0
  71. step_rest_client/models/lov_value_condition.py +100 -0
  72. step_rest_client/models/match_and_merge_execution_report.py +119 -0
  73. step_rest_client/models/match_and_merge_general_execution_report.py +91 -0
  74. step_rest_client/models/match_and_merge_potential_duplicate.py +93 -0
  75. step_rest_client/models/match_and_merge_record_in.py +95 -0
  76. step_rest_client/models/match_and_merge_record_out.py +117 -0
  77. step_rest_client/models/match_and_merge_response.py +103 -0
  78. step_rest_client/models/multi_data_container.py +101 -0
  79. step_rest_client/models/multi_reference.py +97 -0
  80. step_rest_client/models/multi_value.py +103 -0
  81. step_rest_client/models/name_condition.py +107 -0
  82. step_rest_client/models/numeric_value_condition.py +111 -0
  83. step_rest_client/models/object_type.py +104 -0
  84. step_rest_client/models/object_type_condition.py +96 -0
  85. step_rest_client/models/or_condition.py +107 -0
  86. step_rest_client/models/outbound_integration_endpoint.py +93 -0
  87. step_rest_client/models/product.py +150 -0
  88. step_rest_client/models/query.py +91 -0
  89. step_rest_client/models/query_result.py +99 -0
  90. step_rest_client/models/reference.py +139 -0
  91. step_rest_client/models/reference_entry.py +141 -0
  92. step_rest_client/models/reference_metadata_condition.py +181 -0
  93. step_rest_client/models/reference_type.py +114 -0
  94. step_rest_client/models/rejected_by_business_condition.py +93 -0
  95. step_rest_client/models/simple_below_condition.py +105 -0
  96. step_rest_client/models/single_data_container.py +97 -0
  97. step_rest_client/models/single_reference.py +93 -0
  98. step_rest_client/models/single_value.py +103 -0
  99. step_rest_client/models/status_flag.py +89 -0
  100. step_rest_client/models/text_value_condition.py +111 -0
  101. step_rest_client/models/trigger_workflow_event.py +93 -0
  102. step_rest_client/models/unit.py +104 -0
  103. step_rest_client/models/value.py +137 -0
  104. step_rest_client/models/value_entry.py +91 -0
  105. step_rest_client/models/workflow.py +91 -0
  106. step_rest_client/models/workflow_event.py +89 -0
  107. step_rest_client/models/workflow_instance.py +87 -0
  108. step_rest_client/models/workflow_instance_creation.py +93 -0
  109. step_rest_client/models/workflow_node.py +99 -0
  110. step_rest_client/models/workflow_task.py +113 -0
  111. step_rest_client/models/workflow_task_query.py +101 -0
  112. step_rest_client/py.typed +0 -0
  113. step_rest_client/rest.py +258 -0
  114. step_rest_client-1.0.0.dist-info/METADATA +23 -0
  115. step_rest_client-1.0.0.dist-info/RECORD +117 -0
  116. step_rest_client-1.0.0.dist-info/WHEEL +5 -0
  117. step_rest_client-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1887 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STEP REST API V2
5
+
6
+ <h1>About</h1><p>The STEP REST API V2 provides read and write access to a set of core STEP objects using the HTTP operations GET, PUT, POST, PATCH and DELETE.</p><h1>Resource Representation</h1><p>With the exception of a few resource operations for retrieving and uploading binary data, all request and response bodies are JSON, compliant with the schema documented here.</p><h1>Context and Workspace</h1><p>All requests are handled in a specific STEP context and workspace and both can be specified via query parameters available for all resource operations. A context must always be specified while requests per default will be handled in the &quot;Main&quot; workspace.</p><h1>Polymorphism</h1><p>In STEP, attributes, reference types and data container types can all be either single- or multivalued. The STEP REST API V2 uses polymorphism to address this complexity with resources that include values, references and data containers specified to produce and consume a common &quot;abstract&quot; supertype that always will be one of either the single- or multivalued subtype.<br/>As an example, the GET /entities/{id}/values/{attributeId} resource operation is specified to return a &quot;Value&quot; but as evident from the model, the &quot;Value&quot; will always be &quot;oneOf&quot; either &quot;SingleValue&quot;, that has a &quot;value&quot; property for which the value is an object, or &quot;MultiValue&quot;, that has a &quot;values&quot; property for which the value is an array.<br/>Clients are advised to use the presence or absence of the plural array property (&quot;values&quot;, &quot;references&quot; and &quot;dataContainers&quot;) to determine the concrete type.</p><h1>Authentication</h1><p>The REST API is protected by HTTP Basic Authentication or if OAuth2-based authentication is enabled (SaaS customers only), by Bearer Authentication. With Basic Authentication, user name and password are supplied with each request and it is therefore highly recommended to only use the API in conjunction with HTTPS. For more information about OAuth2-based authentication for SaaS customers, please see the STEP Authentication Guide.</p><h1>Versioning</h1><p>The STEP REST API V2 is versioned using semantic versioning. Stibo Systems reserve the right to make non-breaking, minor / patch changes in any release without warning and clients must be coded / configured to be 'tolerant' and capable of handling such changes.</p><p>Examples of breaking, major changes:</p><ul><li>Renaming of a property</li><li>Removal of a property</li><li>Property type change</li><li>Addition of new property required for write operations</li><li>Marking existing property as required for write operations</li><li>Removal of resource or resource operation</li><li>Materially different behavior for existing resource operation</li></ul><p>Examples of non-breaking, minor / patch changes:</p><ul><li>Addition of new properties in request responses</li><li>Addition of new query parameter not required for write operations</li><li>Addition of new resource or resource operation</li><li>Bug fixes that do not change the schema or resource operations as described here</li><li>Inclusion of a response body for resource operations specified to return a 200 response with no body</li><li>Change of response &quot;Model&quot; / &quot;schema&quot; to type extending the previously specified type</li><li>Renaming a &quot;Model&quot; / &quot;schema&quot; type</li></ul><p>In addition, error message texts may change without warning within the same version. Client program logic should not depend upon the message content.</p><h1>Error Handling</h1><p>The STEP REST API V2 responds with standard HTTP status codes, with 2** responses indicating a success, 4** responses indicating a client error and 5** indicating a server error. Notice that this specification does not specify common error responses like 500 (internal server error) or 401 (unauthorized) for the individual resource operations. Clients should however be capable of handling such responses.</p><p>Error responses have a JSON response body (see Error schema below) containing HTTP status code information in addition to a message providing details about the error. As mentioned above, client program logic should not depend upon the message content.</p><p>The specific status codes used in the API are:</p><ul><li>200 (OK): Success, response may or may not have a body</li><li>201 (Created): Entity successfully created, response may or may not have a body</li><li>400 (Bad request): The server cannot or will not process the request due to an apparent client error</li><li>401 (Unauthorized): Returned only in relation to failed authentication</li><li>404 (Not Found): Returned only in relation to objects specified via path parameters (variable parts of the URL). If STEP objects referenced in request bodies or via query parameters cannot be found, the response will be 400.</li><li>429 (Too Many Requests): Clients are per default limited to 100 requests per second. Returned if the rate limit is exceeded.</li><li>500 (Internal Server Error): Unexpected error (could potentially cover an issue that rightfully should be a 400)</li></ul>
7
+
8
+ The version of the OpenAPI document: 1.3.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import List, Optional
21
+ from typing_extensions import Annotated
22
+ from step_rest_client.models.trigger_workflow_event import TriggerWorkflowEvent
23
+ from step_rest_client.models.workflow_event import WorkflowEvent
24
+ from step_rest_client.models.workflow_instance import WorkflowInstance
25
+ from step_rest_client.models.workflow_task import WorkflowTask
26
+ from step_rest_client.models.workflow_task_query import WorkflowTaskQuery
27
+
28
+ from step_rest_client.api_client import ApiClient, RequestSerialized
29
+ from step_rest_client.api_response import ApiResponse
30
+ from step_rest_client.rest import RESTResponseType
31
+
32
+
33
+ class WorkflowTasksApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def workflow_tasks_id_claim_post(
48
+ self,
49
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
50
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
51
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
52
+ _request_timeout: Union[
53
+ None,
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Tuple[
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Annotated[StrictFloat, Field(gt=0)]
58
+ ]
59
+ ] = None,
60
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
61
+ _content_type: Optional[StrictStr] = None,
62
+ _headers: Optional[Dict[StrictStr, Any]] = None,
63
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
+ ) -> None:
65
+ """Claims a specific workflow tasks
66
+
67
+ Operation for claiming a workflow task. I.e. assigning the task to the user invoking the operation.
68
+
69
+ :param id: ID of the workflow task (required)
70
+ :type id: str
71
+ :param context: ID of the context in which to perform the operation (required)
72
+ :type context: str
73
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
74
+ :type workspace: str
75
+ :param _request_timeout: timeout setting for this request. If one
76
+ number provided, it will be total request
77
+ timeout. It can also be a pair (tuple) of
78
+ (connection, read) timeouts.
79
+ :type _request_timeout: int, tuple(int, int), optional
80
+ :param _request_auth: set to override the auth_settings for an a single
81
+ request; this effectively ignores the
82
+ authentication in the spec for a single request.
83
+ :type _request_auth: dict, optional
84
+ :param _content_type: force content-type for the request.
85
+ :type _content_type: str, Optional
86
+ :param _headers: set to override the headers for a single
87
+ request; this effectively ignores the headers
88
+ in the spec for a single request.
89
+ :type _headers: dict, optional
90
+ :param _host_index: set to override the host_index for a single
91
+ request; this effectively ignores the host_index
92
+ in the spec for a single request.
93
+ :type _host_index: int, optional
94
+ :return: Returns the result object.
95
+ """ # noqa: E501
96
+
97
+ _param = self._workflow_tasks_id_claim_post_serialize(
98
+ id=id,
99
+ context=context,
100
+ workspace=workspace,
101
+ _request_auth=_request_auth,
102
+ _content_type=_content_type,
103
+ _headers=_headers,
104
+ _host_index=_host_index
105
+ )
106
+
107
+ _response_types_map: Dict[str, Optional[str]] = {
108
+ '200': None,
109
+ '400': "Error",
110
+ '404': "Error",
111
+ }
112
+ response_data = self.api_client.call_api(
113
+ *_param,
114
+ _request_timeout=_request_timeout
115
+ )
116
+ response_data.read()
117
+ return self.api_client.response_deserialize(
118
+ response_data=response_data,
119
+ response_types_map=_response_types_map,
120
+ ).data
121
+
122
+
123
+ @validate_call
124
+ def workflow_tasks_id_claim_post_with_http_info(
125
+ self,
126
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
127
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
128
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
129
+ _request_timeout: Union[
130
+ None,
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Tuple[
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Annotated[StrictFloat, Field(gt=0)]
135
+ ]
136
+ ] = None,
137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
138
+ _content_type: Optional[StrictStr] = None,
139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
141
+ ) -> ApiResponse[None]:
142
+ """Claims a specific workflow tasks
143
+
144
+ Operation for claiming a workflow task. I.e. assigning the task to the user invoking the operation.
145
+
146
+ :param id: ID of the workflow task (required)
147
+ :type id: str
148
+ :param context: ID of the context in which to perform the operation (required)
149
+ :type context: str
150
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
151
+ :type workspace: str
152
+ :param _request_timeout: timeout setting for this request. If one
153
+ number provided, it will be total request
154
+ timeout. It can also be a pair (tuple) of
155
+ (connection, read) timeouts.
156
+ :type _request_timeout: int, tuple(int, int), optional
157
+ :param _request_auth: set to override the auth_settings for an a single
158
+ request; this effectively ignores the
159
+ authentication in the spec for a single request.
160
+ :type _request_auth: dict, optional
161
+ :param _content_type: force content-type for the request.
162
+ :type _content_type: str, Optional
163
+ :param _headers: set to override the headers for a single
164
+ request; this effectively ignores the headers
165
+ in the spec for a single request.
166
+ :type _headers: dict, optional
167
+ :param _host_index: set to override the host_index for a single
168
+ request; this effectively ignores the host_index
169
+ in the spec for a single request.
170
+ :type _host_index: int, optional
171
+ :return: Returns the result object.
172
+ """ # noqa: E501
173
+
174
+ _param = self._workflow_tasks_id_claim_post_serialize(
175
+ id=id,
176
+ context=context,
177
+ workspace=workspace,
178
+ _request_auth=_request_auth,
179
+ _content_type=_content_type,
180
+ _headers=_headers,
181
+ _host_index=_host_index
182
+ )
183
+
184
+ _response_types_map: Dict[str, Optional[str]] = {
185
+ '200': None,
186
+ '400': "Error",
187
+ '404': "Error",
188
+ }
189
+ response_data = self.api_client.call_api(
190
+ *_param,
191
+ _request_timeout=_request_timeout
192
+ )
193
+ response_data.read()
194
+ return self.api_client.response_deserialize(
195
+ response_data=response_data,
196
+ response_types_map=_response_types_map,
197
+ )
198
+
199
+
200
+ @validate_call
201
+ def workflow_tasks_id_claim_post_without_preload_content(
202
+ self,
203
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
204
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
205
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
206
+ _request_timeout: Union[
207
+ None,
208
+ Annotated[StrictFloat, Field(gt=0)],
209
+ Tuple[
210
+ Annotated[StrictFloat, Field(gt=0)],
211
+ Annotated[StrictFloat, Field(gt=0)]
212
+ ]
213
+ ] = None,
214
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
215
+ _content_type: Optional[StrictStr] = None,
216
+ _headers: Optional[Dict[StrictStr, Any]] = None,
217
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
218
+ ) -> RESTResponseType:
219
+ """Claims a specific workflow tasks
220
+
221
+ Operation for claiming a workflow task. I.e. assigning the task to the user invoking the operation.
222
+
223
+ :param id: ID of the workflow task (required)
224
+ :type id: str
225
+ :param context: ID of the context in which to perform the operation (required)
226
+ :type context: str
227
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
228
+ :type workspace: str
229
+ :param _request_timeout: timeout setting for this request. If one
230
+ number provided, it will be total request
231
+ timeout. It can also be a pair (tuple) of
232
+ (connection, read) timeouts.
233
+ :type _request_timeout: int, tuple(int, int), optional
234
+ :param _request_auth: set to override the auth_settings for an a single
235
+ request; this effectively ignores the
236
+ authentication in the spec for a single request.
237
+ :type _request_auth: dict, optional
238
+ :param _content_type: force content-type for the request.
239
+ :type _content_type: str, Optional
240
+ :param _headers: set to override the headers for a single
241
+ request; this effectively ignores the headers
242
+ in the spec for a single request.
243
+ :type _headers: dict, optional
244
+ :param _host_index: set to override the host_index for a single
245
+ request; this effectively ignores the host_index
246
+ in the spec for a single request.
247
+ :type _host_index: int, optional
248
+ :return: Returns the result object.
249
+ """ # noqa: E501
250
+
251
+ _param = self._workflow_tasks_id_claim_post_serialize(
252
+ id=id,
253
+ context=context,
254
+ workspace=workspace,
255
+ _request_auth=_request_auth,
256
+ _content_type=_content_type,
257
+ _headers=_headers,
258
+ _host_index=_host_index
259
+ )
260
+
261
+ _response_types_map: Dict[str, Optional[str]] = {
262
+ '200': None,
263
+ '400': "Error",
264
+ '404': "Error",
265
+ }
266
+ response_data = self.api_client.call_api(
267
+ *_param,
268
+ _request_timeout=_request_timeout
269
+ )
270
+ return response_data.response
271
+
272
+
273
+ def _workflow_tasks_id_claim_post_serialize(
274
+ self,
275
+ id,
276
+ context,
277
+ workspace,
278
+ _request_auth,
279
+ _content_type,
280
+ _headers,
281
+ _host_index,
282
+ ) -> RequestSerialized:
283
+
284
+ _host = None
285
+
286
+ _collection_formats: Dict[str, str] = {
287
+ }
288
+
289
+ _path_params: Dict[str, str] = {}
290
+ _query_params: List[Tuple[str, str]] = []
291
+ _header_params: Dict[str, Optional[str]] = _headers or {}
292
+ _form_params: List[Tuple[str, str]] = []
293
+ _files: Dict[
294
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
295
+ ] = {}
296
+ _body_params: Optional[bytes] = None
297
+
298
+ # process the path parameters
299
+ if id is not None:
300
+ _path_params['id'] = id
301
+ # process the query parameters
302
+ if context is not None:
303
+
304
+ _query_params.append(('context', context))
305
+
306
+ if workspace is not None:
307
+
308
+ _query_params.append(('workspace', workspace))
309
+
310
+ # process the header parameters
311
+ # process the form parameters
312
+ # process the body parameter
313
+
314
+
315
+ # set the HTTP header `Accept`
316
+ if 'Accept' not in _header_params:
317
+ _header_params['Accept'] = self.api_client.select_header_accept(
318
+ [
319
+ 'application/json'
320
+ ]
321
+ )
322
+
323
+
324
+ # authentication setting
325
+ _auth_settings: List[str] = [
326
+ 'basicAuth'
327
+ ]
328
+
329
+ return self.api_client.param_serialize(
330
+ method='POST',
331
+ resource_path='/workflow-tasks/{id}/claim',
332
+ path_params=_path_params,
333
+ query_params=_query_params,
334
+ header_params=_header_params,
335
+ body=_body_params,
336
+ post_params=_form_params,
337
+ files=_files,
338
+ auth_settings=_auth_settings,
339
+ collection_formats=_collection_formats,
340
+ _host=_host,
341
+ _request_auth=_request_auth
342
+ )
343
+
344
+
345
+
346
+
347
+ @validate_call
348
+ def workflow_tasks_id_events_get(
349
+ self,
350
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
351
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
352
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
353
+ _request_timeout: Union[
354
+ None,
355
+ Annotated[StrictFloat, Field(gt=0)],
356
+ Tuple[
357
+ Annotated[StrictFloat, Field(gt=0)],
358
+ Annotated[StrictFloat, Field(gt=0)]
359
+ ]
360
+ ] = None,
361
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
362
+ _content_type: Optional[StrictStr] = None,
363
+ _headers: Optional[Dict[StrictStr, Any]] = None,
364
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
365
+ ) -> List[WorkflowEvent]:
366
+ """Returns the available events for a task
367
+
368
+ Operation for retrieving an array of events available for the specified task
369
+
370
+ :param id: ID of the workflow task (required)
371
+ :type id: str
372
+ :param context: ID of the context in which to perform the operation (required)
373
+ :type context: str
374
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
375
+ :type workspace: str
376
+ :param _request_timeout: timeout setting for this request. If one
377
+ number provided, it will be total request
378
+ timeout. It can also be a pair (tuple) of
379
+ (connection, read) timeouts.
380
+ :type _request_timeout: int, tuple(int, int), optional
381
+ :param _request_auth: set to override the auth_settings for an a single
382
+ request; this effectively ignores the
383
+ authentication in the spec for a single request.
384
+ :type _request_auth: dict, optional
385
+ :param _content_type: force content-type for the request.
386
+ :type _content_type: str, Optional
387
+ :param _headers: set to override the headers for a single
388
+ request; this effectively ignores the headers
389
+ in the spec for a single request.
390
+ :type _headers: dict, optional
391
+ :param _host_index: set to override the host_index for a single
392
+ request; this effectively ignores the host_index
393
+ in the spec for a single request.
394
+ :type _host_index: int, optional
395
+ :return: Returns the result object.
396
+ """ # noqa: E501
397
+
398
+ _param = self._workflow_tasks_id_events_get_serialize(
399
+ id=id,
400
+ context=context,
401
+ workspace=workspace,
402
+ _request_auth=_request_auth,
403
+ _content_type=_content_type,
404
+ _headers=_headers,
405
+ _host_index=_host_index
406
+ )
407
+
408
+ _response_types_map: Dict[str, Optional[str]] = {
409
+ '200': "List[WorkflowEvent]",
410
+ '400': "Error",
411
+ '404': "Error",
412
+ }
413
+ response_data = self.api_client.call_api(
414
+ *_param,
415
+ _request_timeout=_request_timeout
416
+ )
417
+ response_data.read()
418
+ return self.api_client.response_deserialize(
419
+ response_data=response_data,
420
+ response_types_map=_response_types_map,
421
+ ).data
422
+
423
+
424
+ @validate_call
425
+ def workflow_tasks_id_events_get_with_http_info(
426
+ self,
427
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
428
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
429
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
430
+ _request_timeout: Union[
431
+ None,
432
+ Annotated[StrictFloat, Field(gt=0)],
433
+ Tuple[
434
+ Annotated[StrictFloat, Field(gt=0)],
435
+ Annotated[StrictFloat, Field(gt=0)]
436
+ ]
437
+ ] = None,
438
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
439
+ _content_type: Optional[StrictStr] = None,
440
+ _headers: Optional[Dict[StrictStr, Any]] = None,
441
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
442
+ ) -> ApiResponse[List[WorkflowEvent]]:
443
+ """Returns the available events for a task
444
+
445
+ Operation for retrieving an array of events available for the specified task
446
+
447
+ :param id: ID of the workflow task (required)
448
+ :type id: str
449
+ :param context: ID of the context in which to perform the operation (required)
450
+ :type context: str
451
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
452
+ :type workspace: str
453
+ :param _request_timeout: timeout setting for this request. If one
454
+ number provided, it will be total request
455
+ timeout. It can also be a pair (tuple) of
456
+ (connection, read) timeouts.
457
+ :type _request_timeout: int, tuple(int, int), optional
458
+ :param _request_auth: set to override the auth_settings for an a single
459
+ request; this effectively ignores the
460
+ authentication in the spec for a single request.
461
+ :type _request_auth: dict, optional
462
+ :param _content_type: force content-type for the request.
463
+ :type _content_type: str, Optional
464
+ :param _headers: set to override the headers for a single
465
+ request; this effectively ignores the headers
466
+ in the spec for a single request.
467
+ :type _headers: dict, optional
468
+ :param _host_index: set to override the host_index for a single
469
+ request; this effectively ignores the host_index
470
+ in the spec for a single request.
471
+ :type _host_index: int, optional
472
+ :return: Returns the result object.
473
+ """ # noqa: E501
474
+
475
+ _param = self._workflow_tasks_id_events_get_serialize(
476
+ id=id,
477
+ context=context,
478
+ workspace=workspace,
479
+ _request_auth=_request_auth,
480
+ _content_type=_content_type,
481
+ _headers=_headers,
482
+ _host_index=_host_index
483
+ )
484
+
485
+ _response_types_map: Dict[str, Optional[str]] = {
486
+ '200': "List[WorkflowEvent]",
487
+ '400': "Error",
488
+ '404': "Error",
489
+ }
490
+ response_data = self.api_client.call_api(
491
+ *_param,
492
+ _request_timeout=_request_timeout
493
+ )
494
+ response_data.read()
495
+ return self.api_client.response_deserialize(
496
+ response_data=response_data,
497
+ response_types_map=_response_types_map,
498
+ )
499
+
500
+
501
+ @validate_call
502
+ def workflow_tasks_id_events_get_without_preload_content(
503
+ self,
504
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
505
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
506
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
507
+ _request_timeout: Union[
508
+ None,
509
+ Annotated[StrictFloat, Field(gt=0)],
510
+ Tuple[
511
+ Annotated[StrictFloat, Field(gt=0)],
512
+ Annotated[StrictFloat, Field(gt=0)]
513
+ ]
514
+ ] = None,
515
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
516
+ _content_type: Optional[StrictStr] = None,
517
+ _headers: Optional[Dict[StrictStr, Any]] = None,
518
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
519
+ ) -> RESTResponseType:
520
+ """Returns the available events for a task
521
+
522
+ Operation for retrieving an array of events available for the specified task
523
+
524
+ :param id: ID of the workflow task (required)
525
+ :type id: str
526
+ :param context: ID of the context in which to perform the operation (required)
527
+ :type context: str
528
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
529
+ :type workspace: str
530
+ :param _request_timeout: timeout setting for this request. If one
531
+ number provided, it will be total request
532
+ timeout. It can also be a pair (tuple) of
533
+ (connection, read) timeouts.
534
+ :type _request_timeout: int, tuple(int, int), optional
535
+ :param _request_auth: set to override the auth_settings for an a single
536
+ request; this effectively ignores the
537
+ authentication in the spec for a single request.
538
+ :type _request_auth: dict, optional
539
+ :param _content_type: force content-type for the request.
540
+ :type _content_type: str, Optional
541
+ :param _headers: set to override the headers for a single
542
+ request; this effectively ignores the headers
543
+ in the spec for a single request.
544
+ :type _headers: dict, optional
545
+ :param _host_index: set to override the host_index for a single
546
+ request; this effectively ignores the host_index
547
+ in the spec for a single request.
548
+ :type _host_index: int, optional
549
+ :return: Returns the result object.
550
+ """ # noqa: E501
551
+
552
+ _param = self._workflow_tasks_id_events_get_serialize(
553
+ id=id,
554
+ context=context,
555
+ workspace=workspace,
556
+ _request_auth=_request_auth,
557
+ _content_type=_content_type,
558
+ _headers=_headers,
559
+ _host_index=_host_index
560
+ )
561
+
562
+ _response_types_map: Dict[str, Optional[str]] = {
563
+ '200': "List[WorkflowEvent]",
564
+ '400': "Error",
565
+ '404': "Error",
566
+ }
567
+ response_data = self.api_client.call_api(
568
+ *_param,
569
+ _request_timeout=_request_timeout
570
+ )
571
+ return response_data.response
572
+
573
+
574
+ def _workflow_tasks_id_events_get_serialize(
575
+ self,
576
+ id,
577
+ context,
578
+ workspace,
579
+ _request_auth,
580
+ _content_type,
581
+ _headers,
582
+ _host_index,
583
+ ) -> RequestSerialized:
584
+
585
+ _host = None
586
+
587
+ _collection_formats: Dict[str, str] = {
588
+ }
589
+
590
+ _path_params: Dict[str, str] = {}
591
+ _query_params: List[Tuple[str, str]] = []
592
+ _header_params: Dict[str, Optional[str]] = _headers or {}
593
+ _form_params: List[Tuple[str, str]] = []
594
+ _files: Dict[
595
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
596
+ ] = {}
597
+ _body_params: Optional[bytes] = None
598
+
599
+ # process the path parameters
600
+ if id is not None:
601
+ _path_params['id'] = id
602
+ # process the query parameters
603
+ if context is not None:
604
+
605
+ _query_params.append(('context', context))
606
+
607
+ if workspace is not None:
608
+
609
+ _query_params.append(('workspace', workspace))
610
+
611
+ # process the header parameters
612
+ # process the form parameters
613
+ # process the body parameter
614
+
615
+
616
+ # set the HTTP header `Accept`
617
+ if 'Accept' not in _header_params:
618
+ _header_params['Accept'] = self.api_client.select_header_accept(
619
+ [
620
+ 'application/json'
621
+ ]
622
+ )
623
+
624
+
625
+ # authentication setting
626
+ _auth_settings: List[str] = [
627
+ 'basicAuth'
628
+ ]
629
+
630
+ return self.api_client.param_serialize(
631
+ method='GET',
632
+ resource_path='/workflow-tasks/{id}/events',
633
+ path_params=_path_params,
634
+ query_params=_query_params,
635
+ header_params=_header_params,
636
+ body=_body_params,
637
+ post_params=_form_params,
638
+ files=_files,
639
+ auth_settings=_auth_settings,
640
+ collection_formats=_collection_formats,
641
+ _host=_host,
642
+ _request_auth=_request_auth
643
+ )
644
+
645
+
646
+
647
+
648
+ @validate_call
649
+ def workflow_tasks_id_get(
650
+ self,
651
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
652
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
653
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
654
+ _request_timeout: Union[
655
+ None,
656
+ Annotated[StrictFloat, Field(gt=0)],
657
+ Tuple[
658
+ Annotated[StrictFloat, Field(gt=0)],
659
+ Annotated[StrictFloat, Field(gt=0)]
660
+ ]
661
+ ] = None,
662
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
663
+ _content_type: Optional[StrictStr] = None,
664
+ _headers: Optional[Dict[StrictStr, Any]] = None,
665
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
666
+ ) -> WorkflowTask:
667
+ """Returns the workflow task with the specified ID
668
+
669
+ TODO
670
+
671
+ :param id: ID of the workflow task (required)
672
+ :type id: str
673
+ :param context: ID of the context in which to perform the operation (required)
674
+ :type context: str
675
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
676
+ :type workspace: str
677
+ :param _request_timeout: timeout setting for this request. If one
678
+ number provided, it will be total request
679
+ timeout. It can also be a pair (tuple) of
680
+ (connection, read) timeouts.
681
+ :type _request_timeout: int, tuple(int, int), optional
682
+ :param _request_auth: set to override the auth_settings for an a single
683
+ request; this effectively ignores the
684
+ authentication in the spec for a single request.
685
+ :type _request_auth: dict, optional
686
+ :param _content_type: force content-type for the request.
687
+ :type _content_type: str, Optional
688
+ :param _headers: set to override the headers for a single
689
+ request; this effectively ignores the headers
690
+ in the spec for a single request.
691
+ :type _headers: dict, optional
692
+ :param _host_index: set to override the host_index for a single
693
+ request; this effectively ignores the host_index
694
+ in the spec for a single request.
695
+ :type _host_index: int, optional
696
+ :return: Returns the result object.
697
+ """ # noqa: E501
698
+
699
+ _param = self._workflow_tasks_id_get_serialize(
700
+ id=id,
701
+ context=context,
702
+ workspace=workspace,
703
+ _request_auth=_request_auth,
704
+ _content_type=_content_type,
705
+ _headers=_headers,
706
+ _host_index=_host_index
707
+ )
708
+
709
+ _response_types_map: Dict[str, Optional[str]] = {
710
+ '200': "WorkflowTask",
711
+ '400': "Error",
712
+ '404': "Error",
713
+ }
714
+ response_data = self.api_client.call_api(
715
+ *_param,
716
+ _request_timeout=_request_timeout
717
+ )
718
+ response_data.read()
719
+ return self.api_client.response_deserialize(
720
+ response_data=response_data,
721
+ response_types_map=_response_types_map,
722
+ ).data
723
+
724
+
725
+ @validate_call
726
+ def workflow_tasks_id_get_with_http_info(
727
+ self,
728
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
729
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
730
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
731
+ _request_timeout: Union[
732
+ None,
733
+ Annotated[StrictFloat, Field(gt=0)],
734
+ Tuple[
735
+ Annotated[StrictFloat, Field(gt=0)],
736
+ Annotated[StrictFloat, Field(gt=0)]
737
+ ]
738
+ ] = None,
739
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
740
+ _content_type: Optional[StrictStr] = None,
741
+ _headers: Optional[Dict[StrictStr, Any]] = None,
742
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
743
+ ) -> ApiResponse[WorkflowTask]:
744
+ """Returns the workflow task with the specified ID
745
+
746
+ TODO
747
+
748
+ :param id: ID of the workflow task (required)
749
+ :type id: str
750
+ :param context: ID of the context in which to perform the operation (required)
751
+ :type context: str
752
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
753
+ :type workspace: str
754
+ :param _request_timeout: timeout setting for this request. If one
755
+ number provided, it will be total request
756
+ timeout. It can also be a pair (tuple) of
757
+ (connection, read) timeouts.
758
+ :type _request_timeout: int, tuple(int, int), optional
759
+ :param _request_auth: set to override the auth_settings for an a single
760
+ request; this effectively ignores the
761
+ authentication in the spec for a single request.
762
+ :type _request_auth: dict, optional
763
+ :param _content_type: force content-type for the request.
764
+ :type _content_type: str, Optional
765
+ :param _headers: set to override the headers for a single
766
+ request; this effectively ignores the headers
767
+ in the spec for a single request.
768
+ :type _headers: dict, optional
769
+ :param _host_index: set to override the host_index for a single
770
+ request; this effectively ignores the host_index
771
+ in the spec for a single request.
772
+ :type _host_index: int, optional
773
+ :return: Returns the result object.
774
+ """ # noqa: E501
775
+
776
+ _param = self._workflow_tasks_id_get_serialize(
777
+ id=id,
778
+ context=context,
779
+ workspace=workspace,
780
+ _request_auth=_request_auth,
781
+ _content_type=_content_type,
782
+ _headers=_headers,
783
+ _host_index=_host_index
784
+ )
785
+
786
+ _response_types_map: Dict[str, Optional[str]] = {
787
+ '200': "WorkflowTask",
788
+ '400': "Error",
789
+ '404': "Error",
790
+ }
791
+ response_data = self.api_client.call_api(
792
+ *_param,
793
+ _request_timeout=_request_timeout
794
+ )
795
+ response_data.read()
796
+ return self.api_client.response_deserialize(
797
+ response_data=response_data,
798
+ response_types_map=_response_types_map,
799
+ )
800
+
801
+
802
+ @validate_call
803
+ def workflow_tasks_id_get_without_preload_content(
804
+ self,
805
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
806
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
807
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
808
+ _request_timeout: Union[
809
+ None,
810
+ Annotated[StrictFloat, Field(gt=0)],
811
+ Tuple[
812
+ Annotated[StrictFloat, Field(gt=0)],
813
+ Annotated[StrictFloat, Field(gt=0)]
814
+ ]
815
+ ] = None,
816
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
817
+ _content_type: Optional[StrictStr] = None,
818
+ _headers: Optional[Dict[StrictStr, Any]] = None,
819
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
820
+ ) -> RESTResponseType:
821
+ """Returns the workflow task with the specified ID
822
+
823
+ TODO
824
+
825
+ :param id: ID of the workflow task (required)
826
+ :type id: str
827
+ :param context: ID of the context in which to perform the operation (required)
828
+ :type context: str
829
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
830
+ :type workspace: str
831
+ :param _request_timeout: timeout setting for this request. If one
832
+ number provided, it will be total request
833
+ timeout. It can also be a pair (tuple) of
834
+ (connection, read) timeouts.
835
+ :type _request_timeout: int, tuple(int, int), optional
836
+ :param _request_auth: set to override the auth_settings for an a single
837
+ request; this effectively ignores the
838
+ authentication in the spec for a single request.
839
+ :type _request_auth: dict, optional
840
+ :param _content_type: force content-type for the request.
841
+ :type _content_type: str, Optional
842
+ :param _headers: set to override the headers for a single
843
+ request; this effectively ignores the headers
844
+ in the spec for a single request.
845
+ :type _headers: dict, optional
846
+ :param _host_index: set to override the host_index for a single
847
+ request; this effectively ignores the host_index
848
+ in the spec for a single request.
849
+ :type _host_index: int, optional
850
+ :return: Returns the result object.
851
+ """ # noqa: E501
852
+
853
+ _param = self._workflow_tasks_id_get_serialize(
854
+ id=id,
855
+ context=context,
856
+ workspace=workspace,
857
+ _request_auth=_request_auth,
858
+ _content_type=_content_type,
859
+ _headers=_headers,
860
+ _host_index=_host_index
861
+ )
862
+
863
+ _response_types_map: Dict[str, Optional[str]] = {
864
+ '200': "WorkflowTask",
865
+ '400': "Error",
866
+ '404': "Error",
867
+ }
868
+ response_data = self.api_client.call_api(
869
+ *_param,
870
+ _request_timeout=_request_timeout
871
+ )
872
+ return response_data.response
873
+
874
+
875
+ def _workflow_tasks_id_get_serialize(
876
+ self,
877
+ id,
878
+ context,
879
+ workspace,
880
+ _request_auth,
881
+ _content_type,
882
+ _headers,
883
+ _host_index,
884
+ ) -> RequestSerialized:
885
+
886
+ _host = None
887
+
888
+ _collection_formats: Dict[str, str] = {
889
+ }
890
+
891
+ _path_params: Dict[str, str] = {}
892
+ _query_params: List[Tuple[str, str]] = []
893
+ _header_params: Dict[str, Optional[str]] = _headers or {}
894
+ _form_params: List[Tuple[str, str]] = []
895
+ _files: Dict[
896
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
897
+ ] = {}
898
+ _body_params: Optional[bytes] = None
899
+
900
+ # process the path parameters
901
+ if id is not None:
902
+ _path_params['id'] = id
903
+ # process the query parameters
904
+ if context is not None:
905
+
906
+ _query_params.append(('context', context))
907
+
908
+ if workspace is not None:
909
+
910
+ _query_params.append(('workspace', workspace))
911
+
912
+ # process the header parameters
913
+ # process the form parameters
914
+ # process the body parameter
915
+
916
+
917
+ # set the HTTP header `Accept`
918
+ if 'Accept' not in _header_params:
919
+ _header_params['Accept'] = self.api_client.select_header_accept(
920
+ [
921
+ 'application/json'
922
+ ]
923
+ )
924
+
925
+
926
+ # authentication setting
927
+ _auth_settings: List[str] = [
928
+ 'basicAuth'
929
+ ]
930
+
931
+ return self.api_client.param_serialize(
932
+ method='GET',
933
+ resource_path='/workflow-tasks/{id}',
934
+ path_params=_path_params,
935
+ query_params=_query_params,
936
+ header_params=_header_params,
937
+ body=_body_params,
938
+ post_params=_form_params,
939
+ files=_files,
940
+ auth_settings=_auth_settings,
941
+ collection_formats=_collection_formats,
942
+ _host=_host,
943
+ _request_auth=_request_auth
944
+ )
945
+
946
+
947
+
948
+
949
+ @validate_call
950
+ def workflow_tasks_id_release_post(
951
+ self,
952
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
953
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
954
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
955
+ _request_timeout: Union[
956
+ None,
957
+ Annotated[StrictFloat, Field(gt=0)],
958
+ Tuple[
959
+ Annotated[StrictFloat, Field(gt=0)],
960
+ Annotated[StrictFloat, Field(gt=0)]
961
+ ]
962
+ ] = None,
963
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
964
+ _content_type: Optional[StrictStr] = None,
965
+ _headers: Optional[Dict[StrictStr, Any]] = None,
966
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
967
+ ) -> None:
968
+ """Releases a task
969
+
970
+ Operation for releasing a workflow task. Can only be called if the task currently is assigned to the user invoking the operation. When a task is released it is assigned back to the previously assigned group or the default assignee for the workflow state.
971
+
972
+ :param id: ID of the workflow task (required)
973
+ :type id: str
974
+ :param context: ID of the context in which to perform the operation (required)
975
+ :type context: str
976
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
977
+ :type workspace: str
978
+ :param _request_timeout: timeout setting for this request. If one
979
+ number provided, it will be total request
980
+ timeout. It can also be a pair (tuple) of
981
+ (connection, read) timeouts.
982
+ :type _request_timeout: int, tuple(int, int), optional
983
+ :param _request_auth: set to override the auth_settings for an a single
984
+ request; this effectively ignores the
985
+ authentication in the spec for a single request.
986
+ :type _request_auth: dict, optional
987
+ :param _content_type: force content-type for the request.
988
+ :type _content_type: str, Optional
989
+ :param _headers: set to override the headers for a single
990
+ request; this effectively ignores the headers
991
+ in the spec for a single request.
992
+ :type _headers: dict, optional
993
+ :param _host_index: set to override the host_index for a single
994
+ request; this effectively ignores the host_index
995
+ in the spec for a single request.
996
+ :type _host_index: int, optional
997
+ :return: Returns the result object.
998
+ """ # noqa: E501
999
+
1000
+ _param = self._workflow_tasks_id_release_post_serialize(
1001
+ id=id,
1002
+ context=context,
1003
+ workspace=workspace,
1004
+ _request_auth=_request_auth,
1005
+ _content_type=_content_type,
1006
+ _headers=_headers,
1007
+ _host_index=_host_index
1008
+ )
1009
+
1010
+ _response_types_map: Dict[str, Optional[str]] = {
1011
+ '200': None,
1012
+ '400': "Error",
1013
+ '404': "Error",
1014
+ }
1015
+ response_data = self.api_client.call_api(
1016
+ *_param,
1017
+ _request_timeout=_request_timeout
1018
+ )
1019
+ response_data.read()
1020
+ return self.api_client.response_deserialize(
1021
+ response_data=response_data,
1022
+ response_types_map=_response_types_map,
1023
+ ).data
1024
+
1025
+
1026
+ @validate_call
1027
+ def workflow_tasks_id_release_post_with_http_info(
1028
+ self,
1029
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
1030
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1031
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1032
+ _request_timeout: Union[
1033
+ None,
1034
+ Annotated[StrictFloat, Field(gt=0)],
1035
+ Tuple[
1036
+ Annotated[StrictFloat, Field(gt=0)],
1037
+ Annotated[StrictFloat, Field(gt=0)]
1038
+ ]
1039
+ ] = None,
1040
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1041
+ _content_type: Optional[StrictStr] = None,
1042
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1043
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1044
+ ) -> ApiResponse[None]:
1045
+ """Releases a task
1046
+
1047
+ Operation for releasing a workflow task. Can only be called if the task currently is assigned to the user invoking the operation. When a task is released it is assigned back to the previously assigned group or the default assignee for the workflow state.
1048
+
1049
+ :param id: ID of the workflow task (required)
1050
+ :type id: str
1051
+ :param context: ID of the context in which to perform the operation (required)
1052
+ :type context: str
1053
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1054
+ :type workspace: str
1055
+ :param _request_timeout: timeout setting for this request. If one
1056
+ number provided, it will be total request
1057
+ timeout. It can also be a pair (tuple) of
1058
+ (connection, read) timeouts.
1059
+ :type _request_timeout: int, tuple(int, int), optional
1060
+ :param _request_auth: set to override the auth_settings for an a single
1061
+ request; this effectively ignores the
1062
+ authentication in the spec for a single request.
1063
+ :type _request_auth: dict, optional
1064
+ :param _content_type: force content-type for the request.
1065
+ :type _content_type: str, Optional
1066
+ :param _headers: set to override the headers for a single
1067
+ request; this effectively ignores the headers
1068
+ in the spec for a single request.
1069
+ :type _headers: dict, optional
1070
+ :param _host_index: set to override the host_index for a single
1071
+ request; this effectively ignores the host_index
1072
+ in the spec for a single request.
1073
+ :type _host_index: int, optional
1074
+ :return: Returns the result object.
1075
+ """ # noqa: E501
1076
+
1077
+ _param = self._workflow_tasks_id_release_post_serialize(
1078
+ id=id,
1079
+ context=context,
1080
+ workspace=workspace,
1081
+ _request_auth=_request_auth,
1082
+ _content_type=_content_type,
1083
+ _headers=_headers,
1084
+ _host_index=_host_index
1085
+ )
1086
+
1087
+ _response_types_map: Dict[str, Optional[str]] = {
1088
+ '200': None,
1089
+ '400': "Error",
1090
+ '404': "Error",
1091
+ }
1092
+ response_data = self.api_client.call_api(
1093
+ *_param,
1094
+ _request_timeout=_request_timeout
1095
+ )
1096
+ response_data.read()
1097
+ return self.api_client.response_deserialize(
1098
+ response_data=response_data,
1099
+ response_types_map=_response_types_map,
1100
+ )
1101
+
1102
+
1103
+ @validate_call
1104
+ def workflow_tasks_id_release_post_without_preload_content(
1105
+ self,
1106
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
1107
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1108
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1109
+ _request_timeout: Union[
1110
+ None,
1111
+ Annotated[StrictFloat, Field(gt=0)],
1112
+ Tuple[
1113
+ Annotated[StrictFloat, Field(gt=0)],
1114
+ Annotated[StrictFloat, Field(gt=0)]
1115
+ ]
1116
+ ] = None,
1117
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1118
+ _content_type: Optional[StrictStr] = None,
1119
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1120
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1121
+ ) -> RESTResponseType:
1122
+ """Releases a task
1123
+
1124
+ Operation for releasing a workflow task. Can only be called if the task currently is assigned to the user invoking the operation. When a task is released it is assigned back to the previously assigned group or the default assignee for the workflow state.
1125
+
1126
+ :param id: ID of the workflow task (required)
1127
+ :type id: str
1128
+ :param context: ID of the context in which to perform the operation (required)
1129
+ :type context: str
1130
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1131
+ :type workspace: str
1132
+ :param _request_timeout: timeout setting for this request. If one
1133
+ number provided, it will be total request
1134
+ timeout. It can also be a pair (tuple) of
1135
+ (connection, read) timeouts.
1136
+ :type _request_timeout: int, tuple(int, int), optional
1137
+ :param _request_auth: set to override the auth_settings for an a single
1138
+ request; this effectively ignores the
1139
+ authentication in the spec for a single request.
1140
+ :type _request_auth: dict, optional
1141
+ :param _content_type: force content-type for the request.
1142
+ :type _content_type: str, Optional
1143
+ :param _headers: set to override the headers for a single
1144
+ request; this effectively ignores the headers
1145
+ in the spec for a single request.
1146
+ :type _headers: dict, optional
1147
+ :param _host_index: set to override the host_index for a single
1148
+ request; this effectively ignores the host_index
1149
+ in the spec for a single request.
1150
+ :type _host_index: int, optional
1151
+ :return: Returns the result object.
1152
+ """ # noqa: E501
1153
+
1154
+ _param = self._workflow_tasks_id_release_post_serialize(
1155
+ id=id,
1156
+ context=context,
1157
+ workspace=workspace,
1158
+ _request_auth=_request_auth,
1159
+ _content_type=_content_type,
1160
+ _headers=_headers,
1161
+ _host_index=_host_index
1162
+ )
1163
+
1164
+ _response_types_map: Dict[str, Optional[str]] = {
1165
+ '200': None,
1166
+ '400': "Error",
1167
+ '404': "Error",
1168
+ }
1169
+ response_data = self.api_client.call_api(
1170
+ *_param,
1171
+ _request_timeout=_request_timeout
1172
+ )
1173
+ return response_data.response
1174
+
1175
+
1176
+ def _workflow_tasks_id_release_post_serialize(
1177
+ self,
1178
+ id,
1179
+ context,
1180
+ workspace,
1181
+ _request_auth,
1182
+ _content_type,
1183
+ _headers,
1184
+ _host_index,
1185
+ ) -> RequestSerialized:
1186
+
1187
+ _host = None
1188
+
1189
+ _collection_formats: Dict[str, str] = {
1190
+ }
1191
+
1192
+ _path_params: Dict[str, str] = {}
1193
+ _query_params: List[Tuple[str, str]] = []
1194
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1195
+ _form_params: List[Tuple[str, str]] = []
1196
+ _files: Dict[
1197
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1198
+ ] = {}
1199
+ _body_params: Optional[bytes] = None
1200
+
1201
+ # process the path parameters
1202
+ if id is not None:
1203
+ _path_params['id'] = id
1204
+ # process the query parameters
1205
+ if context is not None:
1206
+
1207
+ _query_params.append(('context', context))
1208
+
1209
+ if workspace is not None:
1210
+
1211
+ _query_params.append(('workspace', workspace))
1212
+
1213
+ # process the header parameters
1214
+ # process the form parameters
1215
+ # process the body parameter
1216
+
1217
+
1218
+ # set the HTTP header `Accept`
1219
+ if 'Accept' not in _header_params:
1220
+ _header_params['Accept'] = self.api_client.select_header_accept(
1221
+ [
1222
+ 'application/json'
1223
+ ]
1224
+ )
1225
+
1226
+
1227
+ # authentication setting
1228
+ _auth_settings: List[str] = [
1229
+ 'basicAuth'
1230
+ ]
1231
+
1232
+ return self.api_client.param_serialize(
1233
+ method='POST',
1234
+ resource_path='/workflow-tasks/{id}/release',
1235
+ path_params=_path_params,
1236
+ query_params=_query_params,
1237
+ header_params=_header_params,
1238
+ body=_body_params,
1239
+ post_params=_form_params,
1240
+ files=_files,
1241
+ auth_settings=_auth_settings,
1242
+ collection_formats=_collection_formats,
1243
+ _host=_host,
1244
+ _request_auth=_request_auth
1245
+ )
1246
+
1247
+
1248
+
1249
+
1250
+ @validate_call
1251
+ def workflow_tasks_id_trigger_event_post(
1252
+ self,
1253
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
1254
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1255
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1256
+ trigger_workflow_event: Optional[TriggerWorkflowEvent] = None,
1257
+ _request_timeout: Union[
1258
+ None,
1259
+ Annotated[StrictFloat, Field(gt=0)],
1260
+ Tuple[
1261
+ Annotated[StrictFloat, Field(gt=0)],
1262
+ Annotated[StrictFloat, Field(gt=0)]
1263
+ ]
1264
+ ] = None,
1265
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1266
+ _content_type: Optional[StrictStr] = None,
1267
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1268
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1269
+ ) -> WorkflowInstance:
1270
+ """Triggers an event for a task
1271
+
1272
+ Operation for triggering an event for a specific task. That is, completing the workflow task.
1273
+
1274
+ :param id: ID of the workflow task (required)
1275
+ :type id: str
1276
+ :param context: ID of the context in which to perform the operation (required)
1277
+ :type context: str
1278
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1279
+ :type workspace: str
1280
+ :param trigger_workflow_event:
1281
+ :type trigger_workflow_event: TriggerWorkflowEvent
1282
+ :param _request_timeout: timeout setting for this request. If one
1283
+ number provided, it will be total request
1284
+ timeout. It can also be a pair (tuple) of
1285
+ (connection, read) timeouts.
1286
+ :type _request_timeout: int, tuple(int, int), optional
1287
+ :param _request_auth: set to override the auth_settings for an a single
1288
+ request; this effectively ignores the
1289
+ authentication in the spec for a single request.
1290
+ :type _request_auth: dict, optional
1291
+ :param _content_type: force content-type for the request.
1292
+ :type _content_type: str, Optional
1293
+ :param _headers: set to override the headers for a single
1294
+ request; this effectively ignores the headers
1295
+ in the spec for a single request.
1296
+ :type _headers: dict, optional
1297
+ :param _host_index: set to override the host_index for a single
1298
+ request; this effectively ignores the host_index
1299
+ in the spec for a single request.
1300
+ :type _host_index: int, optional
1301
+ :return: Returns the result object.
1302
+ """ # noqa: E501
1303
+
1304
+ _param = self._workflow_tasks_id_trigger_event_post_serialize(
1305
+ id=id,
1306
+ context=context,
1307
+ workspace=workspace,
1308
+ trigger_workflow_event=trigger_workflow_event,
1309
+ _request_auth=_request_auth,
1310
+ _content_type=_content_type,
1311
+ _headers=_headers,
1312
+ _host_index=_host_index
1313
+ )
1314
+
1315
+ _response_types_map: Dict[str, Optional[str]] = {
1316
+ '200': "WorkflowInstance",
1317
+ '400': "Error",
1318
+ '404': "Error",
1319
+ }
1320
+ response_data = self.api_client.call_api(
1321
+ *_param,
1322
+ _request_timeout=_request_timeout
1323
+ )
1324
+ response_data.read()
1325
+ return self.api_client.response_deserialize(
1326
+ response_data=response_data,
1327
+ response_types_map=_response_types_map,
1328
+ ).data
1329
+
1330
+
1331
+ @validate_call
1332
+ def workflow_tasks_id_trigger_event_post_with_http_info(
1333
+ self,
1334
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
1335
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1336
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1337
+ trigger_workflow_event: Optional[TriggerWorkflowEvent] = None,
1338
+ _request_timeout: Union[
1339
+ None,
1340
+ Annotated[StrictFloat, Field(gt=0)],
1341
+ Tuple[
1342
+ Annotated[StrictFloat, Field(gt=0)],
1343
+ Annotated[StrictFloat, Field(gt=0)]
1344
+ ]
1345
+ ] = None,
1346
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1347
+ _content_type: Optional[StrictStr] = None,
1348
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1349
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1350
+ ) -> ApiResponse[WorkflowInstance]:
1351
+ """Triggers an event for a task
1352
+
1353
+ Operation for triggering an event for a specific task. That is, completing the workflow task.
1354
+
1355
+ :param id: ID of the workflow task (required)
1356
+ :type id: str
1357
+ :param context: ID of the context in which to perform the operation (required)
1358
+ :type context: str
1359
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1360
+ :type workspace: str
1361
+ :param trigger_workflow_event:
1362
+ :type trigger_workflow_event: TriggerWorkflowEvent
1363
+ :param _request_timeout: timeout setting for this request. If one
1364
+ number provided, it will be total request
1365
+ timeout. It can also be a pair (tuple) of
1366
+ (connection, read) timeouts.
1367
+ :type _request_timeout: int, tuple(int, int), optional
1368
+ :param _request_auth: set to override the auth_settings for an a single
1369
+ request; this effectively ignores the
1370
+ authentication in the spec for a single request.
1371
+ :type _request_auth: dict, optional
1372
+ :param _content_type: force content-type for the request.
1373
+ :type _content_type: str, Optional
1374
+ :param _headers: set to override the headers for a single
1375
+ request; this effectively ignores the headers
1376
+ in the spec for a single request.
1377
+ :type _headers: dict, optional
1378
+ :param _host_index: set to override the host_index for a single
1379
+ request; this effectively ignores the host_index
1380
+ in the spec for a single request.
1381
+ :type _host_index: int, optional
1382
+ :return: Returns the result object.
1383
+ """ # noqa: E501
1384
+
1385
+ _param = self._workflow_tasks_id_trigger_event_post_serialize(
1386
+ id=id,
1387
+ context=context,
1388
+ workspace=workspace,
1389
+ trigger_workflow_event=trigger_workflow_event,
1390
+ _request_auth=_request_auth,
1391
+ _content_type=_content_type,
1392
+ _headers=_headers,
1393
+ _host_index=_host_index
1394
+ )
1395
+
1396
+ _response_types_map: Dict[str, Optional[str]] = {
1397
+ '200': "WorkflowInstance",
1398
+ '400': "Error",
1399
+ '404': "Error",
1400
+ }
1401
+ response_data = self.api_client.call_api(
1402
+ *_param,
1403
+ _request_timeout=_request_timeout
1404
+ )
1405
+ response_data.read()
1406
+ return self.api_client.response_deserialize(
1407
+ response_data=response_data,
1408
+ response_types_map=_response_types_map,
1409
+ )
1410
+
1411
+
1412
+ @validate_call
1413
+ def workflow_tasks_id_trigger_event_post_without_preload_content(
1414
+ self,
1415
+ id: Annotated[StrictStr, Field(description="ID of the workflow task")],
1416
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1417
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1418
+ trigger_workflow_event: Optional[TriggerWorkflowEvent] = None,
1419
+ _request_timeout: Union[
1420
+ None,
1421
+ Annotated[StrictFloat, Field(gt=0)],
1422
+ Tuple[
1423
+ Annotated[StrictFloat, Field(gt=0)],
1424
+ Annotated[StrictFloat, Field(gt=0)]
1425
+ ]
1426
+ ] = None,
1427
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1428
+ _content_type: Optional[StrictStr] = None,
1429
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1430
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1431
+ ) -> RESTResponseType:
1432
+ """Triggers an event for a task
1433
+
1434
+ Operation for triggering an event for a specific task. That is, completing the workflow task.
1435
+
1436
+ :param id: ID of the workflow task (required)
1437
+ :type id: str
1438
+ :param context: ID of the context in which to perform the operation (required)
1439
+ :type context: str
1440
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1441
+ :type workspace: str
1442
+ :param trigger_workflow_event:
1443
+ :type trigger_workflow_event: TriggerWorkflowEvent
1444
+ :param _request_timeout: timeout setting for this request. If one
1445
+ number provided, it will be total request
1446
+ timeout. It can also be a pair (tuple) of
1447
+ (connection, read) timeouts.
1448
+ :type _request_timeout: int, tuple(int, int), optional
1449
+ :param _request_auth: set to override the auth_settings for an a single
1450
+ request; this effectively ignores the
1451
+ authentication in the spec for a single request.
1452
+ :type _request_auth: dict, optional
1453
+ :param _content_type: force content-type for the request.
1454
+ :type _content_type: str, Optional
1455
+ :param _headers: set to override the headers for a single
1456
+ request; this effectively ignores the headers
1457
+ in the spec for a single request.
1458
+ :type _headers: dict, optional
1459
+ :param _host_index: set to override the host_index for a single
1460
+ request; this effectively ignores the host_index
1461
+ in the spec for a single request.
1462
+ :type _host_index: int, optional
1463
+ :return: Returns the result object.
1464
+ """ # noqa: E501
1465
+
1466
+ _param = self._workflow_tasks_id_trigger_event_post_serialize(
1467
+ id=id,
1468
+ context=context,
1469
+ workspace=workspace,
1470
+ trigger_workflow_event=trigger_workflow_event,
1471
+ _request_auth=_request_auth,
1472
+ _content_type=_content_type,
1473
+ _headers=_headers,
1474
+ _host_index=_host_index
1475
+ )
1476
+
1477
+ _response_types_map: Dict[str, Optional[str]] = {
1478
+ '200': "WorkflowInstance",
1479
+ '400': "Error",
1480
+ '404': "Error",
1481
+ }
1482
+ response_data = self.api_client.call_api(
1483
+ *_param,
1484
+ _request_timeout=_request_timeout
1485
+ )
1486
+ return response_data.response
1487
+
1488
+
1489
+ def _workflow_tasks_id_trigger_event_post_serialize(
1490
+ self,
1491
+ id,
1492
+ context,
1493
+ workspace,
1494
+ trigger_workflow_event,
1495
+ _request_auth,
1496
+ _content_type,
1497
+ _headers,
1498
+ _host_index,
1499
+ ) -> RequestSerialized:
1500
+
1501
+ _host = None
1502
+
1503
+ _collection_formats: Dict[str, str] = {
1504
+ }
1505
+
1506
+ _path_params: Dict[str, str] = {}
1507
+ _query_params: List[Tuple[str, str]] = []
1508
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1509
+ _form_params: List[Tuple[str, str]] = []
1510
+ _files: Dict[
1511
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1512
+ ] = {}
1513
+ _body_params: Optional[bytes] = None
1514
+
1515
+ # process the path parameters
1516
+ if id is not None:
1517
+ _path_params['id'] = id
1518
+ # process the query parameters
1519
+ if context is not None:
1520
+
1521
+ _query_params.append(('context', context))
1522
+
1523
+ if workspace is not None:
1524
+
1525
+ _query_params.append(('workspace', workspace))
1526
+
1527
+ # process the header parameters
1528
+ # process the form parameters
1529
+ # process the body parameter
1530
+ if trigger_workflow_event is not None:
1531
+ _body_params = trigger_workflow_event
1532
+
1533
+
1534
+ # set the HTTP header `Accept`
1535
+ if 'Accept' not in _header_params:
1536
+ _header_params['Accept'] = self.api_client.select_header_accept(
1537
+ [
1538
+ 'application/json'
1539
+ ]
1540
+ )
1541
+
1542
+ # set the HTTP header `Content-Type`
1543
+ if _content_type:
1544
+ _header_params['Content-Type'] = _content_type
1545
+ else:
1546
+ _default_content_type = (
1547
+ self.api_client.select_header_content_type(
1548
+ [
1549
+ 'application/json'
1550
+ ]
1551
+ )
1552
+ )
1553
+ if _default_content_type is not None:
1554
+ _header_params['Content-Type'] = _default_content_type
1555
+
1556
+ # authentication setting
1557
+ _auth_settings: List[str] = [
1558
+ 'basicAuth'
1559
+ ]
1560
+
1561
+ return self.api_client.param_serialize(
1562
+ method='POST',
1563
+ resource_path='/workflow-tasks/{id}/trigger-event',
1564
+ path_params=_path_params,
1565
+ query_params=_query_params,
1566
+ header_params=_header_params,
1567
+ body=_body_params,
1568
+ post_params=_form_params,
1569
+ files=_files,
1570
+ auth_settings=_auth_settings,
1571
+ collection_formats=_collection_formats,
1572
+ _host=_host,
1573
+ _request_auth=_request_auth
1574
+ )
1575
+
1576
+
1577
+
1578
+
1579
+ @validate_call
1580
+ def workflow_tasks_search_post(
1581
+ self,
1582
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1583
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1584
+ workflow_task_query: Optional[WorkflowTaskQuery] = None,
1585
+ _request_timeout: Union[
1586
+ None,
1587
+ Annotated[StrictFloat, Field(gt=0)],
1588
+ Tuple[
1589
+ Annotated[StrictFloat, Field(gt=0)],
1590
+ Annotated[StrictFloat, Field(gt=0)]
1591
+ ]
1592
+ ] = None,
1593
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1594
+ _content_type: Optional[StrictStr] = None,
1595
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1596
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1597
+ ) -> List[str]:
1598
+ """Search for / query workflow tasks
1599
+
1600
+ Operation for querying workflow tasks. Resource operation will return a maximum of 1000 results.
1601
+
1602
+ :param context: ID of the context in which to perform the operation (required)
1603
+ :type context: str
1604
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1605
+ :type workspace: str
1606
+ :param workflow_task_query:
1607
+ :type workflow_task_query: WorkflowTaskQuery
1608
+ :param _request_timeout: timeout setting for this request. If one
1609
+ number provided, it will be total request
1610
+ timeout. It can also be a pair (tuple) of
1611
+ (connection, read) timeouts.
1612
+ :type _request_timeout: int, tuple(int, int), optional
1613
+ :param _request_auth: set to override the auth_settings for an a single
1614
+ request; this effectively ignores the
1615
+ authentication in the spec for a single request.
1616
+ :type _request_auth: dict, optional
1617
+ :param _content_type: force content-type for the request.
1618
+ :type _content_type: str, Optional
1619
+ :param _headers: set to override the headers for a single
1620
+ request; this effectively ignores the headers
1621
+ in the spec for a single request.
1622
+ :type _headers: dict, optional
1623
+ :param _host_index: set to override the host_index for a single
1624
+ request; this effectively ignores the host_index
1625
+ in the spec for a single request.
1626
+ :type _host_index: int, optional
1627
+ :return: Returns the result object.
1628
+ """ # noqa: E501
1629
+
1630
+ _param = self._workflow_tasks_search_post_serialize(
1631
+ context=context,
1632
+ workspace=workspace,
1633
+ workflow_task_query=workflow_task_query,
1634
+ _request_auth=_request_auth,
1635
+ _content_type=_content_type,
1636
+ _headers=_headers,
1637
+ _host_index=_host_index
1638
+ )
1639
+
1640
+ _response_types_map: Dict[str, Optional[str]] = {
1641
+ '200': "List[str]",
1642
+ '400': "Error",
1643
+ }
1644
+ response_data = self.api_client.call_api(
1645
+ *_param,
1646
+ _request_timeout=_request_timeout
1647
+ )
1648
+ response_data.read()
1649
+ return self.api_client.response_deserialize(
1650
+ response_data=response_data,
1651
+ response_types_map=_response_types_map,
1652
+ ).data
1653
+
1654
+
1655
+ @validate_call
1656
+ def workflow_tasks_search_post_with_http_info(
1657
+ self,
1658
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1659
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1660
+ workflow_task_query: Optional[WorkflowTaskQuery] = None,
1661
+ _request_timeout: Union[
1662
+ None,
1663
+ Annotated[StrictFloat, Field(gt=0)],
1664
+ Tuple[
1665
+ Annotated[StrictFloat, Field(gt=0)],
1666
+ Annotated[StrictFloat, Field(gt=0)]
1667
+ ]
1668
+ ] = None,
1669
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1670
+ _content_type: Optional[StrictStr] = None,
1671
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1672
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1673
+ ) -> ApiResponse[List[str]]:
1674
+ """Search for / query workflow tasks
1675
+
1676
+ Operation for querying workflow tasks. Resource operation will return a maximum of 1000 results.
1677
+
1678
+ :param context: ID of the context in which to perform the operation (required)
1679
+ :type context: str
1680
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1681
+ :type workspace: str
1682
+ :param workflow_task_query:
1683
+ :type workflow_task_query: WorkflowTaskQuery
1684
+ :param _request_timeout: timeout setting for this request. If one
1685
+ number provided, it will be total request
1686
+ timeout. It can also be a pair (tuple) of
1687
+ (connection, read) timeouts.
1688
+ :type _request_timeout: int, tuple(int, int), optional
1689
+ :param _request_auth: set to override the auth_settings for an a single
1690
+ request; this effectively ignores the
1691
+ authentication in the spec for a single request.
1692
+ :type _request_auth: dict, optional
1693
+ :param _content_type: force content-type for the request.
1694
+ :type _content_type: str, Optional
1695
+ :param _headers: set to override the headers for a single
1696
+ request; this effectively ignores the headers
1697
+ in the spec for a single request.
1698
+ :type _headers: dict, optional
1699
+ :param _host_index: set to override the host_index for a single
1700
+ request; this effectively ignores the host_index
1701
+ in the spec for a single request.
1702
+ :type _host_index: int, optional
1703
+ :return: Returns the result object.
1704
+ """ # noqa: E501
1705
+
1706
+ _param = self._workflow_tasks_search_post_serialize(
1707
+ context=context,
1708
+ workspace=workspace,
1709
+ workflow_task_query=workflow_task_query,
1710
+ _request_auth=_request_auth,
1711
+ _content_type=_content_type,
1712
+ _headers=_headers,
1713
+ _host_index=_host_index
1714
+ )
1715
+
1716
+ _response_types_map: Dict[str, Optional[str]] = {
1717
+ '200': "List[str]",
1718
+ '400': "Error",
1719
+ }
1720
+ response_data = self.api_client.call_api(
1721
+ *_param,
1722
+ _request_timeout=_request_timeout
1723
+ )
1724
+ response_data.read()
1725
+ return self.api_client.response_deserialize(
1726
+ response_data=response_data,
1727
+ response_types_map=_response_types_map,
1728
+ )
1729
+
1730
+
1731
+ @validate_call
1732
+ def workflow_tasks_search_post_without_preload_content(
1733
+ self,
1734
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1735
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1736
+ workflow_task_query: Optional[WorkflowTaskQuery] = None,
1737
+ _request_timeout: Union[
1738
+ None,
1739
+ Annotated[StrictFloat, Field(gt=0)],
1740
+ Tuple[
1741
+ Annotated[StrictFloat, Field(gt=0)],
1742
+ Annotated[StrictFloat, Field(gt=0)]
1743
+ ]
1744
+ ] = None,
1745
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1746
+ _content_type: Optional[StrictStr] = None,
1747
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1748
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1749
+ ) -> RESTResponseType:
1750
+ """Search for / query workflow tasks
1751
+
1752
+ Operation for querying workflow tasks. Resource operation will return a maximum of 1000 results.
1753
+
1754
+ :param context: ID of the context in which to perform the operation (required)
1755
+ :type context: str
1756
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1757
+ :type workspace: str
1758
+ :param workflow_task_query:
1759
+ :type workflow_task_query: WorkflowTaskQuery
1760
+ :param _request_timeout: timeout setting for this request. If one
1761
+ number provided, it will be total request
1762
+ timeout. It can also be a pair (tuple) of
1763
+ (connection, read) timeouts.
1764
+ :type _request_timeout: int, tuple(int, int), optional
1765
+ :param _request_auth: set to override the auth_settings for an a single
1766
+ request; this effectively ignores the
1767
+ authentication in the spec for a single request.
1768
+ :type _request_auth: dict, optional
1769
+ :param _content_type: force content-type for the request.
1770
+ :type _content_type: str, Optional
1771
+ :param _headers: set to override the headers for a single
1772
+ request; this effectively ignores the headers
1773
+ in the spec for a single request.
1774
+ :type _headers: dict, optional
1775
+ :param _host_index: set to override the host_index for a single
1776
+ request; this effectively ignores the host_index
1777
+ in the spec for a single request.
1778
+ :type _host_index: int, optional
1779
+ :return: Returns the result object.
1780
+ """ # noqa: E501
1781
+
1782
+ _param = self._workflow_tasks_search_post_serialize(
1783
+ context=context,
1784
+ workspace=workspace,
1785
+ workflow_task_query=workflow_task_query,
1786
+ _request_auth=_request_auth,
1787
+ _content_type=_content_type,
1788
+ _headers=_headers,
1789
+ _host_index=_host_index
1790
+ )
1791
+
1792
+ _response_types_map: Dict[str, Optional[str]] = {
1793
+ '200': "List[str]",
1794
+ '400': "Error",
1795
+ }
1796
+ response_data = self.api_client.call_api(
1797
+ *_param,
1798
+ _request_timeout=_request_timeout
1799
+ )
1800
+ return response_data.response
1801
+
1802
+
1803
+ def _workflow_tasks_search_post_serialize(
1804
+ self,
1805
+ context,
1806
+ workspace,
1807
+ workflow_task_query,
1808
+ _request_auth,
1809
+ _content_type,
1810
+ _headers,
1811
+ _host_index,
1812
+ ) -> RequestSerialized:
1813
+
1814
+ _host = None
1815
+
1816
+ _collection_formats: Dict[str, str] = {
1817
+ }
1818
+
1819
+ _path_params: Dict[str, str] = {}
1820
+ _query_params: List[Tuple[str, str]] = []
1821
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1822
+ _form_params: List[Tuple[str, str]] = []
1823
+ _files: Dict[
1824
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1825
+ ] = {}
1826
+ _body_params: Optional[bytes] = None
1827
+
1828
+ # process the path parameters
1829
+ # process the query parameters
1830
+ if context is not None:
1831
+
1832
+ _query_params.append(('context', context))
1833
+
1834
+ if workspace is not None:
1835
+
1836
+ _query_params.append(('workspace', workspace))
1837
+
1838
+ # process the header parameters
1839
+ # process the form parameters
1840
+ # process the body parameter
1841
+ if workflow_task_query is not None:
1842
+ _body_params = workflow_task_query
1843
+
1844
+
1845
+ # set the HTTP header `Accept`
1846
+ if 'Accept' not in _header_params:
1847
+ _header_params['Accept'] = self.api_client.select_header_accept(
1848
+ [
1849
+ 'application/json'
1850
+ ]
1851
+ )
1852
+
1853
+ # set the HTTP header `Content-Type`
1854
+ if _content_type:
1855
+ _header_params['Content-Type'] = _content_type
1856
+ else:
1857
+ _default_content_type = (
1858
+ self.api_client.select_header_content_type(
1859
+ [
1860
+ 'application/json'
1861
+ ]
1862
+ )
1863
+ )
1864
+ if _default_content_type is not None:
1865
+ _header_params['Content-Type'] = _default_content_type
1866
+
1867
+ # authentication setting
1868
+ _auth_settings: List[str] = [
1869
+ 'basicAuth'
1870
+ ]
1871
+
1872
+ return self.api_client.param_serialize(
1873
+ method='POST',
1874
+ resource_path='/workflow-tasks/search',
1875
+ path_params=_path_params,
1876
+ query_params=_query_params,
1877
+ header_params=_header_params,
1878
+ body=_body_params,
1879
+ post_params=_form_params,
1880
+ files=_files,
1881
+ auth_settings=_auth_settings,
1882
+ collection_formats=_collection_formats,
1883
+ _host=_host,
1884
+ _request_auth=_request_auth
1885
+ )
1886
+
1887
+