hatchet-sdk 1.9.1__py3-none-any.whl → 1.10.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hatchet-sdk might be problematic. Click here for more details.
- hatchet_sdk/__init__.py +5 -1
- hatchet_sdk/client.py +2 -0
- hatchet_sdk/clients/admin.py +2 -6
- hatchet_sdk/clients/dispatcher/action_listener.py +43 -23
- hatchet_sdk/clients/events.py +58 -8
- hatchet_sdk/clients/rest/__init__.py +11 -0
- hatchet_sdk/clients/rest/api/__init__.py +1 -0
- hatchet_sdk/clients/rest/api/event_api.py +335 -0
- hatchet_sdk/clients/rest/api/filter_api.py +1305 -0
- hatchet_sdk/clients/rest/api/task_api.py +51 -0
- hatchet_sdk/clients/rest/api/workflow_runs_api.py +34 -0
- hatchet_sdk/clients/rest/models/__init__.py +10 -0
- hatchet_sdk/clients/rest/models/create_event_request.py +16 -2
- hatchet_sdk/clients/rest/models/v1_create_filter_request.py +99 -0
- hatchet_sdk/clients/rest/models/v1_event.py +142 -0
- hatchet_sdk/clients/rest/models/v1_event_list.py +110 -0
- hatchet_sdk/clients/rest/models/v1_event_workflow_run_summary.py +101 -0
- hatchet_sdk/clients/rest/models/v1_filter.py +127 -0
- hatchet_sdk/clients/rest/models/v1_filter_list.py +110 -0
- hatchet_sdk/clients/rest/models/v1_log_line.py +21 -2
- hatchet_sdk/clients/rest/models/v1_task_event.py +12 -0
- hatchet_sdk/clients/rest/models/v1_task_summary.py +12 -0
- hatchet_sdk/clients/rest/models/v1_task_timing.py +19 -0
- hatchet_sdk/clients/rest/models/workflow.py +5 -0
- hatchet_sdk/config.py +42 -0
- hatchet_sdk/context/context.py +1 -0
- hatchet_sdk/contracts/events_pb2.py +20 -20
- hatchet_sdk/contracts/events_pb2.pyi +14 -6
- hatchet_sdk/features/cron.py +1 -1
- hatchet_sdk/features/filters.py +181 -0
- hatchet_sdk/features/runs.py +7 -1
- hatchet_sdk/features/scheduled.py +1 -1
- hatchet_sdk/features/workflows.py +1 -1
- hatchet_sdk/hatchet.py +82 -71
- hatchet_sdk/opentelemetry/instrumentor.py +7 -2
- hatchet_sdk/runnables/standalone.py +6 -0
- hatchet_sdk/runnables/workflow.py +29 -2
- hatchet_sdk/utils/opentelemetry.py +19 -0
- hatchet_sdk/worker/worker.py +1 -1
- {hatchet_sdk-1.9.1.dist-info → hatchet_sdk-1.10.1.dist-info}/METADATA +1 -1
- {hatchet_sdk-1.9.1.dist-info → hatchet_sdk-1.10.1.dist-info}/RECORD +43 -34
- {hatchet_sdk-1.9.1.dist-info → hatchet_sdk-1.10.1.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.9.1.dist-info → hatchet_sdk-1.10.1.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,1305 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hatchet API
|
|
5
|
+
|
|
6
|
+
The Hatchet API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.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 typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
|
|
17
|
+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from hatchet_sdk.clients.rest.api_client import ApiClient, RequestSerialized
|
|
21
|
+
from hatchet_sdk.clients.rest.api_response import ApiResponse
|
|
22
|
+
from hatchet_sdk.clients.rest.models.v1_create_filter_request import (
|
|
23
|
+
V1CreateFilterRequest,
|
|
24
|
+
)
|
|
25
|
+
from hatchet_sdk.clients.rest.models.v1_filter import V1Filter
|
|
26
|
+
from hatchet_sdk.clients.rest.models.v1_filter_list import V1FilterList
|
|
27
|
+
from hatchet_sdk.clients.rest.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class FilterApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def v1_filter_create(
|
|
44
|
+
self,
|
|
45
|
+
tenant: Annotated[
|
|
46
|
+
str,
|
|
47
|
+
Field(
|
|
48
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
49
|
+
),
|
|
50
|
+
],
|
|
51
|
+
v1_create_filter_request: Annotated[
|
|
52
|
+
V1CreateFilterRequest, Field(description="The input to the filter creation")
|
|
53
|
+
],
|
|
54
|
+
_request_timeout: Union[
|
|
55
|
+
None,
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Tuple[
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
+
],
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> V1Filter:
|
|
66
|
+
"""Create a filter
|
|
67
|
+
|
|
68
|
+
Create a new filter
|
|
69
|
+
|
|
70
|
+
:param tenant: The tenant id (required)
|
|
71
|
+
:type tenant: str
|
|
72
|
+
:param v1_create_filter_request: The input to the filter creation (required)
|
|
73
|
+
:type v1_create_filter_request: V1CreateFilterRequest
|
|
74
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
75
|
+
number provided, it will be total request
|
|
76
|
+
timeout. It can also be a pair (tuple) of
|
|
77
|
+
(connection, read) timeouts.
|
|
78
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
79
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
80
|
+
request; this effectively ignores the
|
|
81
|
+
authentication in the spec for a single request.
|
|
82
|
+
:type _request_auth: dict, optional
|
|
83
|
+
:param _content_type: force content-type for the request.
|
|
84
|
+
:type _content_type: str, Optional
|
|
85
|
+
:param _headers: set to override the headers for a single
|
|
86
|
+
request; this effectively ignores the headers
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _headers: dict, optional
|
|
89
|
+
:param _host_index: set to override the host_index for a single
|
|
90
|
+
request; this effectively ignores the host_index
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _host_index: int, optional
|
|
93
|
+
:return: Returns the result object.
|
|
94
|
+
""" # noqa: E501
|
|
95
|
+
|
|
96
|
+
_param = self._v1_filter_create_serialize(
|
|
97
|
+
tenant=tenant,
|
|
98
|
+
v1_create_filter_request=v1_create_filter_request,
|
|
99
|
+
_request_auth=_request_auth,
|
|
100
|
+
_content_type=_content_type,
|
|
101
|
+
_headers=_headers,
|
|
102
|
+
_host_index=_host_index,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
106
|
+
"200": "V1Filter",
|
|
107
|
+
"400": "APIErrors",
|
|
108
|
+
"403": "APIErrors",
|
|
109
|
+
"404": "APIErrors",
|
|
110
|
+
}
|
|
111
|
+
response_data = self.api_client.call_api(
|
|
112
|
+
*_param, _request_timeout=_request_timeout
|
|
113
|
+
)
|
|
114
|
+
response_data.read()
|
|
115
|
+
return self.api_client.response_deserialize(
|
|
116
|
+
response_data=response_data,
|
|
117
|
+
response_types_map=_response_types_map,
|
|
118
|
+
).data
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def v1_filter_create_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
tenant: Annotated[
|
|
124
|
+
str,
|
|
125
|
+
Field(
|
|
126
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
127
|
+
),
|
|
128
|
+
],
|
|
129
|
+
v1_create_filter_request: Annotated[
|
|
130
|
+
V1CreateFilterRequest, Field(description="The input to the filter creation")
|
|
131
|
+
],
|
|
132
|
+
_request_timeout: Union[
|
|
133
|
+
None,
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
135
|
+
Tuple[
|
|
136
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
137
|
+
],
|
|
138
|
+
] = None,
|
|
139
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
140
|
+
_content_type: Optional[StrictStr] = None,
|
|
141
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
142
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
143
|
+
) -> ApiResponse[V1Filter]:
|
|
144
|
+
"""Create a filter
|
|
145
|
+
|
|
146
|
+
Create a new filter
|
|
147
|
+
|
|
148
|
+
:param tenant: The tenant id (required)
|
|
149
|
+
:type tenant: str
|
|
150
|
+
:param v1_create_filter_request: The input to the filter creation (required)
|
|
151
|
+
:type v1_create_filter_request: V1CreateFilterRequest
|
|
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._v1_filter_create_serialize(
|
|
175
|
+
tenant=tenant,
|
|
176
|
+
v1_create_filter_request=v1_create_filter_request,
|
|
177
|
+
_request_auth=_request_auth,
|
|
178
|
+
_content_type=_content_type,
|
|
179
|
+
_headers=_headers,
|
|
180
|
+
_host_index=_host_index,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
184
|
+
"200": "V1Filter",
|
|
185
|
+
"400": "APIErrors",
|
|
186
|
+
"403": "APIErrors",
|
|
187
|
+
"404": "APIErrors",
|
|
188
|
+
}
|
|
189
|
+
response_data = self.api_client.call_api(
|
|
190
|
+
*_param, _request_timeout=_request_timeout
|
|
191
|
+
)
|
|
192
|
+
response_data.read()
|
|
193
|
+
return self.api_client.response_deserialize(
|
|
194
|
+
response_data=response_data,
|
|
195
|
+
response_types_map=_response_types_map,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
@validate_call
|
|
199
|
+
def v1_filter_create_without_preload_content(
|
|
200
|
+
self,
|
|
201
|
+
tenant: Annotated[
|
|
202
|
+
str,
|
|
203
|
+
Field(
|
|
204
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
205
|
+
),
|
|
206
|
+
],
|
|
207
|
+
v1_create_filter_request: Annotated[
|
|
208
|
+
V1CreateFilterRequest, Field(description="The input to the filter creation")
|
|
209
|
+
],
|
|
210
|
+
_request_timeout: Union[
|
|
211
|
+
None,
|
|
212
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
213
|
+
Tuple[
|
|
214
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
215
|
+
],
|
|
216
|
+
] = None,
|
|
217
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
218
|
+
_content_type: Optional[StrictStr] = None,
|
|
219
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
220
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
221
|
+
) -> RESTResponseType:
|
|
222
|
+
"""Create a filter
|
|
223
|
+
|
|
224
|
+
Create a new filter
|
|
225
|
+
|
|
226
|
+
:param tenant: The tenant id (required)
|
|
227
|
+
:type tenant: str
|
|
228
|
+
:param v1_create_filter_request: The input to the filter creation (required)
|
|
229
|
+
:type v1_create_filter_request: V1CreateFilterRequest
|
|
230
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
231
|
+
number provided, it will be total request
|
|
232
|
+
timeout. It can also be a pair (tuple) of
|
|
233
|
+
(connection, read) timeouts.
|
|
234
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
235
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
236
|
+
request; this effectively ignores the
|
|
237
|
+
authentication in the spec for a single request.
|
|
238
|
+
:type _request_auth: dict, optional
|
|
239
|
+
:param _content_type: force content-type for the request.
|
|
240
|
+
:type _content_type: str, Optional
|
|
241
|
+
:param _headers: set to override the headers for a single
|
|
242
|
+
request; this effectively ignores the headers
|
|
243
|
+
in the spec for a single request.
|
|
244
|
+
:type _headers: dict, optional
|
|
245
|
+
:param _host_index: set to override the host_index for a single
|
|
246
|
+
request; this effectively ignores the host_index
|
|
247
|
+
in the spec for a single request.
|
|
248
|
+
:type _host_index: int, optional
|
|
249
|
+
:return: Returns the result object.
|
|
250
|
+
""" # noqa: E501
|
|
251
|
+
|
|
252
|
+
_param = self._v1_filter_create_serialize(
|
|
253
|
+
tenant=tenant,
|
|
254
|
+
v1_create_filter_request=v1_create_filter_request,
|
|
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": "V1Filter",
|
|
263
|
+
"400": "APIErrors",
|
|
264
|
+
"403": "APIErrors",
|
|
265
|
+
"404": "APIErrors",
|
|
266
|
+
}
|
|
267
|
+
response_data = self.api_client.call_api(
|
|
268
|
+
*_param, _request_timeout=_request_timeout
|
|
269
|
+
)
|
|
270
|
+
return response_data.response
|
|
271
|
+
|
|
272
|
+
def _v1_filter_create_serialize(
|
|
273
|
+
self,
|
|
274
|
+
tenant,
|
|
275
|
+
v1_create_filter_request,
|
|
276
|
+
_request_auth,
|
|
277
|
+
_content_type,
|
|
278
|
+
_headers,
|
|
279
|
+
_host_index,
|
|
280
|
+
) -> RequestSerialized:
|
|
281
|
+
|
|
282
|
+
_host = None
|
|
283
|
+
|
|
284
|
+
_collection_formats: Dict[str, str] = {}
|
|
285
|
+
|
|
286
|
+
_path_params: Dict[str, str] = {}
|
|
287
|
+
_query_params: List[Tuple[str, str]] = []
|
|
288
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
289
|
+
_form_params: List[Tuple[str, str]] = []
|
|
290
|
+
_files: Dict[
|
|
291
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
292
|
+
] = {}
|
|
293
|
+
_body_params: Optional[bytes] = None
|
|
294
|
+
|
|
295
|
+
# process the path parameters
|
|
296
|
+
if tenant is not None:
|
|
297
|
+
_path_params["tenant"] = tenant
|
|
298
|
+
# process the query parameters
|
|
299
|
+
# process the header parameters
|
|
300
|
+
# process the form parameters
|
|
301
|
+
# process the body parameter
|
|
302
|
+
if v1_create_filter_request is not None:
|
|
303
|
+
_body_params = v1_create_filter_request
|
|
304
|
+
|
|
305
|
+
# set the HTTP header `Accept`
|
|
306
|
+
if "Accept" not in _header_params:
|
|
307
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
308
|
+
["application/json"]
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
# set the HTTP header `Content-Type`
|
|
312
|
+
if _content_type:
|
|
313
|
+
_header_params["Content-Type"] = _content_type
|
|
314
|
+
else:
|
|
315
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
316
|
+
["application/json"]
|
|
317
|
+
)
|
|
318
|
+
if _default_content_type is not None:
|
|
319
|
+
_header_params["Content-Type"] = _default_content_type
|
|
320
|
+
|
|
321
|
+
# authentication setting
|
|
322
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
323
|
+
|
|
324
|
+
return self.api_client.param_serialize(
|
|
325
|
+
method="POST",
|
|
326
|
+
resource_path="/api/v1/stable/tenants/{tenant}/filters",
|
|
327
|
+
path_params=_path_params,
|
|
328
|
+
query_params=_query_params,
|
|
329
|
+
header_params=_header_params,
|
|
330
|
+
body=_body_params,
|
|
331
|
+
post_params=_form_params,
|
|
332
|
+
files=_files,
|
|
333
|
+
auth_settings=_auth_settings,
|
|
334
|
+
collection_formats=_collection_formats,
|
|
335
|
+
_host=_host,
|
|
336
|
+
_request_auth=_request_auth,
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
@validate_call
|
|
340
|
+
def v1_filter_delete(
|
|
341
|
+
self,
|
|
342
|
+
tenant: Annotated[
|
|
343
|
+
str,
|
|
344
|
+
Field(
|
|
345
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
346
|
+
),
|
|
347
|
+
],
|
|
348
|
+
v1_filter: Annotated[
|
|
349
|
+
str,
|
|
350
|
+
Field(
|
|
351
|
+
min_length=36,
|
|
352
|
+
strict=True,
|
|
353
|
+
max_length=36,
|
|
354
|
+
description="The filter id to delete",
|
|
355
|
+
),
|
|
356
|
+
],
|
|
357
|
+
_request_timeout: Union[
|
|
358
|
+
None,
|
|
359
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
360
|
+
Tuple[
|
|
361
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
362
|
+
],
|
|
363
|
+
] = None,
|
|
364
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
365
|
+
_content_type: Optional[StrictStr] = None,
|
|
366
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
367
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
368
|
+
) -> V1Filter:
|
|
369
|
+
"""v1_filter_delete
|
|
370
|
+
|
|
371
|
+
Delete a filter
|
|
372
|
+
|
|
373
|
+
:param tenant: The tenant id (required)
|
|
374
|
+
:type tenant: str
|
|
375
|
+
:param v1_filter: The filter id to delete (required)
|
|
376
|
+
:type v1_filter: str
|
|
377
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
378
|
+
number provided, it will be total request
|
|
379
|
+
timeout. It can also be a pair (tuple) of
|
|
380
|
+
(connection, read) timeouts.
|
|
381
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
382
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
383
|
+
request; this effectively ignores the
|
|
384
|
+
authentication in the spec for a single request.
|
|
385
|
+
:type _request_auth: dict, optional
|
|
386
|
+
:param _content_type: force content-type for the request.
|
|
387
|
+
:type _content_type: str, Optional
|
|
388
|
+
:param _headers: set to override the headers for a single
|
|
389
|
+
request; this effectively ignores the headers
|
|
390
|
+
in the spec for a single request.
|
|
391
|
+
:type _headers: dict, optional
|
|
392
|
+
:param _host_index: set to override the host_index for a single
|
|
393
|
+
request; this effectively ignores the host_index
|
|
394
|
+
in the spec for a single request.
|
|
395
|
+
:type _host_index: int, optional
|
|
396
|
+
:return: Returns the result object.
|
|
397
|
+
""" # noqa: E501
|
|
398
|
+
|
|
399
|
+
_param = self._v1_filter_delete_serialize(
|
|
400
|
+
tenant=tenant,
|
|
401
|
+
v1_filter=v1_filter,
|
|
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": "V1Filter",
|
|
410
|
+
"400": "APIErrors",
|
|
411
|
+
"403": "APIErrors",
|
|
412
|
+
"404": "APIErrors",
|
|
413
|
+
}
|
|
414
|
+
response_data = self.api_client.call_api(
|
|
415
|
+
*_param, _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
|
+
@validate_call
|
|
424
|
+
def v1_filter_delete_with_http_info(
|
|
425
|
+
self,
|
|
426
|
+
tenant: Annotated[
|
|
427
|
+
str,
|
|
428
|
+
Field(
|
|
429
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
430
|
+
),
|
|
431
|
+
],
|
|
432
|
+
v1_filter: Annotated[
|
|
433
|
+
str,
|
|
434
|
+
Field(
|
|
435
|
+
min_length=36,
|
|
436
|
+
strict=True,
|
|
437
|
+
max_length=36,
|
|
438
|
+
description="The filter id to delete",
|
|
439
|
+
),
|
|
440
|
+
],
|
|
441
|
+
_request_timeout: Union[
|
|
442
|
+
None,
|
|
443
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
444
|
+
Tuple[
|
|
445
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
446
|
+
],
|
|
447
|
+
] = None,
|
|
448
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
449
|
+
_content_type: Optional[StrictStr] = None,
|
|
450
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
451
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
452
|
+
) -> ApiResponse[V1Filter]:
|
|
453
|
+
"""v1_filter_delete
|
|
454
|
+
|
|
455
|
+
Delete a filter
|
|
456
|
+
|
|
457
|
+
:param tenant: The tenant id (required)
|
|
458
|
+
:type tenant: str
|
|
459
|
+
:param v1_filter: The filter id to delete (required)
|
|
460
|
+
:type v1_filter: str
|
|
461
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
462
|
+
number provided, it will be total request
|
|
463
|
+
timeout. It can also be a pair (tuple) of
|
|
464
|
+
(connection, read) timeouts.
|
|
465
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
466
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
467
|
+
request; this effectively ignores the
|
|
468
|
+
authentication in the spec for a single request.
|
|
469
|
+
:type _request_auth: dict, optional
|
|
470
|
+
:param _content_type: force content-type for the request.
|
|
471
|
+
:type _content_type: str, Optional
|
|
472
|
+
:param _headers: set to override the headers for a single
|
|
473
|
+
request; this effectively ignores the headers
|
|
474
|
+
in the spec for a single request.
|
|
475
|
+
:type _headers: dict, optional
|
|
476
|
+
:param _host_index: set to override the host_index for a single
|
|
477
|
+
request; this effectively ignores the host_index
|
|
478
|
+
in the spec for a single request.
|
|
479
|
+
:type _host_index: int, optional
|
|
480
|
+
:return: Returns the result object.
|
|
481
|
+
""" # noqa: E501
|
|
482
|
+
|
|
483
|
+
_param = self._v1_filter_delete_serialize(
|
|
484
|
+
tenant=tenant,
|
|
485
|
+
v1_filter=v1_filter,
|
|
486
|
+
_request_auth=_request_auth,
|
|
487
|
+
_content_type=_content_type,
|
|
488
|
+
_headers=_headers,
|
|
489
|
+
_host_index=_host_index,
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
493
|
+
"200": "V1Filter",
|
|
494
|
+
"400": "APIErrors",
|
|
495
|
+
"403": "APIErrors",
|
|
496
|
+
"404": "APIErrors",
|
|
497
|
+
}
|
|
498
|
+
response_data = self.api_client.call_api(
|
|
499
|
+
*_param, _request_timeout=_request_timeout
|
|
500
|
+
)
|
|
501
|
+
response_data.read()
|
|
502
|
+
return self.api_client.response_deserialize(
|
|
503
|
+
response_data=response_data,
|
|
504
|
+
response_types_map=_response_types_map,
|
|
505
|
+
)
|
|
506
|
+
|
|
507
|
+
@validate_call
|
|
508
|
+
def v1_filter_delete_without_preload_content(
|
|
509
|
+
self,
|
|
510
|
+
tenant: Annotated[
|
|
511
|
+
str,
|
|
512
|
+
Field(
|
|
513
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
514
|
+
),
|
|
515
|
+
],
|
|
516
|
+
v1_filter: Annotated[
|
|
517
|
+
str,
|
|
518
|
+
Field(
|
|
519
|
+
min_length=36,
|
|
520
|
+
strict=True,
|
|
521
|
+
max_length=36,
|
|
522
|
+
description="The filter id to delete",
|
|
523
|
+
),
|
|
524
|
+
],
|
|
525
|
+
_request_timeout: Union[
|
|
526
|
+
None,
|
|
527
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
528
|
+
Tuple[
|
|
529
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
530
|
+
],
|
|
531
|
+
] = None,
|
|
532
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
533
|
+
_content_type: Optional[StrictStr] = None,
|
|
534
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
535
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
536
|
+
) -> RESTResponseType:
|
|
537
|
+
"""v1_filter_delete
|
|
538
|
+
|
|
539
|
+
Delete a filter
|
|
540
|
+
|
|
541
|
+
:param tenant: The tenant id (required)
|
|
542
|
+
:type tenant: str
|
|
543
|
+
:param v1_filter: The filter id to delete (required)
|
|
544
|
+
:type v1_filter: str
|
|
545
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
546
|
+
number provided, it will be total request
|
|
547
|
+
timeout. It can also be a pair (tuple) of
|
|
548
|
+
(connection, read) timeouts.
|
|
549
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
550
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
551
|
+
request; this effectively ignores the
|
|
552
|
+
authentication in the spec for a single request.
|
|
553
|
+
:type _request_auth: dict, optional
|
|
554
|
+
:param _content_type: force content-type for the request.
|
|
555
|
+
:type _content_type: str, Optional
|
|
556
|
+
:param _headers: set to override the headers for a single
|
|
557
|
+
request; this effectively ignores the headers
|
|
558
|
+
in the spec for a single request.
|
|
559
|
+
:type _headers: dict, optional
|
|
560
|
+
:param _host_index: set to override the host_index for a single
|
|
561
|
+
request; this effectively ignores the host_index
|
|
562
|
+
in the spec for a single request.
|
|
563
|
+
:type _host_index: int, optional
|
|
564
|
+
:return: Returns the result object.
|
|
565
|
+
""" # noqa: E501
|
|
566
|
+
|
|
567
|
+
_param = self._v1_filter_delete_serialize(
|
|
568
|
+
tenant=tenant,
|
|
569
|
+
v1_filter=v1_filter,
|
|
570
|
+
_request_auth=_request_auth,
|
|
571
|
+
_content_type=_content_type,
|
|
572
|
+
_headers=_headers,
|
|
573
|
+
_host_index=_host_index,
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
577
|
+
"200": "V1Filter",
|
|
578
|
+
"400": "APIErrors",
|
|
579
|
+
"403": "APIErrors",
|
|
580
|
+
"404": "APIErrors",
|
|
581
|
+
}
|
|
582
|
+
response_data = self.api_client.call_api(
|
|
583
|
+
*_param, _request_timeout=_request_timeout
|
|
584
|
+
)
|
|
585
|
+
return response_data.response
|
|
586
|
+
|
|
587
|
+
def _v1_filter_delete_serialize(
|
|
588
|
+
self,
|
|
589
|
+
tenant,
|
|
590
|
+
v1_filter,
|
|
591
|
+
_request_auth,
|
|
592
|
+
_content_type,
|
|
593
|
+
_headers,
|
|
594
|
+
_host_index,
|
|
595
|
+
) -> RequestSerialized:
|
|
596
|
+
|
|
597
|
+
_host = None
|
|
598
|
+
|
|
599
|
+
_collection_formats: Dict[str, str] = {}
|
|
600
|
+
|
|
601
|
+
_path_params: Dict[str, str] = {}
|
|
602
|
+
_query_params: List[Tuple[str, str]] = []
|
|
603
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
604
|
+
_form_params: List[Tuple[str, str]] = []
|
|
605
|
+
_files: Dict[
|
|
606
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
607
|
+
] = {}
|
|
608
|
+
_body_params: Optional[bytes] = None
|
|
609
|
+
|
|
610
|
+
# process the path parameters
|
|
611
|
+
if tenant is not None:
|
|
612
|
+
_path_params["tenant"] = tenant
|
|
613
|
+
if v1_filter is not None:
|
|
614
|
+
_path_params["v1-filter"] = v1_filter
|
|
615
|
+
# process the query parameters
|
|
616
|
+
# process the header parameters
|
|
617
|
+
# process the form parameters
|
|
618
|
+
# process the body parameter
|
|
619
|
+
|
|
620
|
+
# set the HTTP header `Accept`
|
|
621
|
+
if "Accept" not in _header_params:
|
|
622
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
623
|
+
["application/json"]
|
|
624
|
+
)
|
|
625
|
+
|
|
626
|
+
# authentication setting
|
|
627
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
628
|
+
|
|
629
|
+
return self.api_client.param_serialize(
|
|
630
|
+
method="DELETE",
|
|
631
|
+
resource_path="/api/v1/stable/tenants/{tenant}/filters/{v1-filter}",
|
|
632
|
+
path_params=_path_params,
|
|
633
|
+
query_params=_query_params,
|
|
634
|
+
header_params=_header_params,
|
|
635
|
+
body=_body_params,
|
|
636
|
+
post_params=_form_params,
|
|
637
|
+
files=_files,
|
|
638
|
+
auth_settings=_auth_settings,
|
|
639
|
+
collection_formats=_collection_formats,
|
|
640
|
+
_host=_host,
|
|
641
|
+
_request_auth=_request_auth,
|
|
642
|
+
)
|
|
643
|
+
|
|
644
|
+
@validate_call
|
|
645
|
+
def v1_filter_get(
|
|
646
|
+
self,
|
|
647
|
+
tenant: Annotated[
|
|
648
|
+
str,
|
|
649
|
+
Field(
|
|
650
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
651
|
+
),
|
|
652
|
+
],
|
|
653
|
+
v1_filter: Annotated[
|
|
654
|
+
str,
|
|
655
|
+
Field(
|
|
656
|
+
min_length=36, strict=True, max_length=36, description="The filter id"
|
|
657
|
+
),
|
|
658
|
+
],
|
|
659
|
+
_request_timeout: Union[
|
|
660
|
+
None,
|
|
661
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
662
|
+
Tuple[
|
|
663
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
664
|
+
],
|
|
665
|
+
] = None,
|
|
666
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
667
|
+
_content_type: Optional[StrictStr] = None,
|
|
668
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
669
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
670
|
+
) -> V1Filter:
|
|
671
|
+
"""Get a filter
|
|
672
|
+
|
|
673
|
+
Get a filter by its id
|
|
674
|
+
|
|
675
|
+
:param tenant: The tenant id (required)
|
|
676
|
+
:type tenant: str
|
|
677
|
+
:param v1_filter: The filter id (required)
|
|
678
|
+
:type v1_filter: str
|
|
679
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
680
|
+
number provided, it will be total request
|
|
681
|
+
timeout. It can also be a pair (tuple) of
|
|
682
|
+
(connection, read) timeouts.
|
|
683
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
684
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
685
|
+
request; this effectively ignores the
|
|
686
|
+
authentication in the spec for a single request.
|
|
687
|
+
:type _request_auth: dict, optional
|
|
688
|
+
:param _content_type: force content-type for the request.
|
|
689
|
+
:type _content_type: str, Optional
|
|
690
|
+
:param _headers: set to override the headers for a single
|
|
691
|
+
request; this effectively ignores the headers
|
|
692
|
+
in the spec for a single request.
|
|
693
|
+
:type _headers: dict, optional
|
|
694
|
+
:param _host_index: set to override the host_index for a single
|
|
695
|
+
request; this effectively ignores the host_index
|
|
696
|
+
in the spec for a single request.
|
|
697
|
+
:type _host_index: int, optional
|
|
698
|
+
:return: Returns the result object.
|
|
699
|
+
""" # noqa: E501
|
|
700
|
+
|
|
701
|
+
_param = self._v1_filter_get_serialize(
|
|
702
|
+
tenant=tenant,
|
|
703
|
+
v1_filter=v1_filter,
|
|
704
|
+
_request_auth=_request_auth,
|
|
705
|
+
_content_type=_content_type,
|
|
706
|
+
_headers=_headers,
|
|
707
|
+
_host_index=_host_index,
|
|
708
|
+
)
|
|
709
|
+
|
|
710
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
711
|
+
"200": "V1Filter",
|
|
712
|
+
"400": "APIErrors",
|
|
713
|
+
"403": "APIErrors",
|
|
714
|
+
}
|
|
715
|
+
response_data = self.api_client.call_api(
|
|
716
|
+
*_param, _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
|
+
@validate_call
|
|
725
|
+
def v1_filter_get_with_http_info(
|
|
726
|
+
self,
|
|
727
|
+
tenant: Annotated[
|
|
728
|
+
str,
|
|
729
|
+
Field(
|
|
730
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
731
|
+
),
|
|
732
|
+
],
|
|
733
|
+
v1_filter: Annotated[
|
|
734
|
+
str,
|
|
735
|
+
Field(
|
|
736
|
+
min_length=36, strict=True, max_length=36, description="The filter id"
|
|
737
|
+
),
|
|
738
|
+
],
|
|
739
|
+
_request_timeout: Union[
|
|
740
|
+
None,
|
|
741
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
742
|
+
Tuple[
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
744
|
+
],
|
|
745
|
+
] = None,
|
|
746
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
747
|
+
_content_type: Optional[StrictStr] = None,
|
|
748
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
749
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
750
|
+
) -> ApiResponse[V1Filter]:
|
|
751
|
+
"""Get a filter
|
|
752
|
+
|
|
753
|
+
Get a filter by its id
|
|
754
|
+
|
|
755
|
+
:param tenant: The tenant id (required)
|
|
756
|
+
:type tenant: str
|
|
757
|
+
:param v1_filter: The filter id (required)
|
|
758
|
+
:type v1_filter: str
|
|
759
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
760
|
+
number provided, it will be total request
|
|
761
|
+
timeout. It can also be a pair (tuple) of
|
|
762
|
+
(connection, read) timeouts.
|
|
763
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
764
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
765
|
+
request; this effectively ignores the
|
|
766
|
+
authentication in the spec for a single request.
|
|
767
|
+
:type _request_auth: dict, optional
|
|
768
|
+
:param _content_type: force content-type for the request.
|
|
769
|
+
:type _content_type: str, Optional
|
|
770
|
+
:param _headers: set to override the headers for a single
|
|
771
|
+
request; this effectively ignores the headers
|
|
772
|
+
in the spec for a single request.
|
|
773
|
+
:type _headers: dict, optional
|
|
774
|
+
:param _host_index: set to override the host_index for a single
|
|
775
|
+
request; this effectively ignores the host_index
|
|
776
|
+
in the spec for a single request.
|
|
777
|
+
:type _host_index: int, optional
|
|
778
|
+
:return: Returns the result object.
|
|
779
|
+
""" # noqa: E501
|
|
780
|
+
|
|
781
|
+
_param = self._v1_filter_get_serialize(
|
|
782
|
+
tenant=tenant,
|
|
783
|
+
v1_filter=v1_filter,
|
|
784
|
+
_request_auth=_request_auth,
|
|
785
|
+
_content_type=_content_type,
|
|
786
|
+
_headers=_headers,
|
|
787
|
+
_host_index=_host_index,
|
|
788
|
+
)
|
|
789
|
+
|
|
790
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
791
|
+
"200": "V1Filter",
|
|
792
|
+
"400": "APIErrors",
|
|
793
|
+
"403": "APIErrors",
|
|
794
|
+
}
|
|
795
|
+
response_data = self.api_client.call_api(
|
|
796
|
+
*_param, _request_timeout=_request_timeout
|
|
797
|
+
)
|
|
798
|
+
response_data.read()
|
|
799
|
+
return self.api_client.response_deserialize(
|
|
800
|
+
response_data=response_data,
|
|
801
|
+
response_types_map=_response_types_map,
|
|
802
|
+
)
|
|
803
|
+
|
|
804
|
+
@validate_call
|
|
805
|
+
def v1_filter_get_without_preload_content(
|
|
806
|
+
self,
|
|
807
|
+
tenant: Annotated[
|
|
808
|
+
str,
|
|
809
|
+
Field(
|
|
810
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
811
|
+
),
|
|
812
|
+
],
|
|
813
|
+
v1_filter: Annotated[
|
|
814
|
+
str,
|
|
815
|
+
Field(
|
|
816
|
+
min_length=36, strict=True, max_length=36, description="The filter id"
|
|
817
|
+
),
|
|
818
|
+
],
|
|
819
|
+
_request_timeout: Union[
|
|
820
|
+
None,
|
|
821
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
822
|
+
Tuple[
|
|
823
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
824
|
+
],
|
|
825
|
+
] = None,
|
|
826
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
827
|
+
_content_type: Optional[StrictStr] = None,
|
|
828
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
829
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
830
|
+
) -> RESTResponseType:
|
|
831
|
+
"""Get a filter
|
|
832
|
+
|
|
833
|
+
Get a filter by its id
|
|
834
|
+
|
|
835
|
+
:param tenant: The tenant id (required)
|
|
836
|
+
:type tenant: str
|
|
837
|
+
:param v1_filter: The filter id (required)
|
|
838
|
+
:type v1_filter: str
|
|
839
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
840
|
+
number provided, it will be total request
|
|
841
|
+
timeout. It can also be a pair (tuple) of
|
|
842
|
+
(connection, read) timeouts.
|
|
843
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
844
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
845
|
+
request; this effectively ignores the
|
|
846
|
+
authentication in the spec for a single request.
|
|
847
|
+
:type _request_auth: dict, optional
|
|
848
|
+
:param _content_type: force content-type for the request.
|
|
849
|
+
:type _content_type: str, Optional
|
|
850
|
+
:param _headers: set to override the headers for a single
|
|
851
|
+
request; this effectively ignores the headers
|
|
852
|
+
in the spec for a single request.
|
|
853
|
+
:type _headers: dict, optional
|
|
854
|
+
:param _host_index: set to override the host_index for a single
|
|
855
|
+
request; this effectively ignores the host_index
|
|
856
|
+
in the spec for a single request.
|
|
857
|
+
:type _host_index: int, optional
|
|
858
|
+
:return: Returns the result object.
|
|
859
|
+
""" # noqa: E501
|
|
860
|
+
|
|
861
|
+
_param = self._v1_filter_get_serialize(
|
|
862
|
+
tenant=tenant,
|
|
863
|
+
v1_filter=v1_filter,
|
|
864
|
+
_request_auth=_request_auth,
|
|
865
|
+
_content_type=_content_type,
|
|
866
|
+
_headers=_headers,
|
|
867
|
+
_host_index=_host_index,
|
|
868
|
+
)
|
|
869
|
+
|
|
870
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
871
|
+
"200": "V1Filter",
|
|
872
|
+
"400": "APIErrors",
|
|
873
|
+
"403": "APIErrors",
|
|
874
|
+
}
|
|
875
|
+
response_data = self.api_client.call_api(
|
|
876
|
+
*_param, _request_timeout=_request_timeout
|
|
877
|
+
)
|
|
878
|
+
return response_data.response
|
|
879
|
+
|
|
880
|
+
def _v1_filter_get_serialize(
|
|
881
|
+
self,
|
|
882
|
+
tenant,
|
|
883
|
+
v1_filter,
|
|
884
|
+
_request_auth,
|
|
885
|
+
_content_type,
|
|
886
|
+
_headers,
|
|
887
|
+
_host_index,
|
|
888
|
+
) -> RequestSerialized:
|
|
889
|
+
|
|
890
|
+
_host = None
|
|
891
|
+
|
|
892
|
+
_collection_formats: Dict[str, str] = {}
|
|
893
|
+
|
|
894
|
+
_path_params: Dict[str, str] = {}
|
|
895
|
+
_query_params: List[Tuple[str, str]] = []
|
|
896
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
897
|
+
_form_params: List[Tuple[str, str]] = []
|
|
898
|
+
_files: Dict[
|
|
899
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
900
|
+
] = {}
|
|
901
|
+
_body_params: Optional[bytes] = None
|
|
902
|
+
|
|
903
|
+
# process the path parameters
|
|
904
|
+
if tenant is not None:
|
|
905
|
+
_path_params["tenant"] = tenant
|
|
906
|
+
if v1_filter is not None:
|
|
907
|
+
_path_params["v1-filter"] = v1_filter
|
|
908
|
+
# process the query parameters
|
|
909
|
+
# process the header parameters
|
|
910
|
+
# process the form parameters
|
|
911
|
+
# process the body parameter
|
|
912
|
+
|
|
913
|
+
# set the HTTP header `Accept`
|
|
914
|
+
if "Accept" not in _header_params:
|
|
915
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
916
|
+
["application/json"]
|
|
917
|
+
)
|
|
918
|
+
|
|
919
|
+
# authentication setting
|
|
920
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
921
|
+
|
|
922
|
+
return self.api_client.param_serialize(
|
|
923
|
+
method="GET",
|
|
924
|
+
resource_path="/api/v1/stable/tenants/{tenant}/filters/{v1-filter}",
|
|
925
|
+
path_params=_path_params,
|
|
926
|
+
query_params=_query_params,
|
|
927
|
+
header_params=_header_params,
|
|
928
|
+
body=_body_params,
|
|
929
|
+
post_params=_form_params,
|
|
930
|
+
files=_files,
|
|
931
|
+
auth_settings=_auth_settings,
|
|
932
|
+
collection_formats=_collection_formats,
|
|
933
|
+
_host=_host,
|
|
934
|
+
_request_auth=_request_auth,
|
|
935
|
+
)
|
|
936
|
+
|
|
937
|
+
@validate_call
|
|
938
|
+
def v1_filter_list(
|
|
939
|
+
self,
|
|
940
|
+
tenant: Annotated[
|
|
941
|
+
str,
|
|
942
|
+
Field(
|
|
943
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
944
|
+
),
|
|
945
|
+
],
|
|
946
|
+
offset: Annotated[
|
|
947
|
+
Optional[StrictInt], Field(description="The number to skip")
|
|
948
|
+
] = None,
|
|
949
|
+
limit: Annotated[
|
|
950
|
+
Optional[StrictInt], Field(description="The number to limit by")
|
|
951
|
+
] = None,
|
|
952
|
+
workflow_ids: Annotated[
|
|
953
|
+
Optional[
|
|
954
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
955
|
+
],
|
|
956
|
+
Field(description="The workflow ids to filter by"),
|
|
957
|
+
] = None,
|
|
958
|
+
scopes: Annotated[
|
|
959
|
+
Optional[List[StrictStr]],
|
|
960
|
+
Field(description="The scopes to subset candidate filters by"),
|
|
961
|
+
] = None,
|
|
962
|
+
_request_timeout: Union[
|
|
963
|
+
None,
|
|
964
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
965
|
+
Tuple[
|
|
966
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
967
|
+
],
|
|
968
|
+
] = None,
|
|
969
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
970
|
+
_content_type: Optional[StrictStr] = None,
|
|
971
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
972
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
973
|
+
) -> V1FilterList:
|
|
974
|
+
"""List filters
|
|
975
|
+
|
|
976
|
+
Lists all filters for a tenant.
|
|
977
|
+
|
|
978
|
+
:param tenant: The tenant id (required)
|
|
979
|
+
:type tenant: str
|
|
980
|
+
:param offset: The number to skip
|
|
981
|
+
:type offset: int
|
|
982
|
+
:param limit: The number to limit by
|
|
983
|
+
:type limit: int
|
|
984
|
+
:param workflow_ids: The workflow ids to filter by
|
|
985
|
+
:type workflow_ids: List[str]
|
|
986
|
+
:param scopes: The scopes to subset candidate filters by
|
|
987
|
+
:type scopes: List[str]
|
|
988
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
989
|
+
number provided, it will be total request
|
|
990
|
+
timeout. It can also be a pair (tuple) of
|
|
991
|
+
(connection, read) timeouts.
|
|
992
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
993
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
994
|
+
request; this effectively ignores the
|
|
995
|
+
authentication in the spec for a single request.
|
|
996
|
+
:type _request_auth: dict, optional
|
|
997
|
+
:param _content_type: force content-type for the request.
|
|
998
|
+
:type _content_type: str, Optional
|
|
999
|
+
:param _headers: set to override the headers for a single
|
|
1000
|
+
request; this effectively ignores the headers
|
|
1001
|
+
in the spec for a single request.
|
|
1002
|
+
:type _headers: dict, optional
|
|
1003
|
+
:param _host_index: set to override the host_index for a single
|
|
1004
|
+
request; this effectively ignores the host_index
|
|
1005
|
+
in the spec for a single request.
|
|
1006
|
+
:type _host_index: int, optional
|
|
1007
|
+
:return: Returns the result object.
|
|
1008
|
+
""" # noqa: E501
|
|
1009
|
+
|
|
1010
|
+
_param = self._v1_filter_list_serialize(
|
|
1011
|
+
tenant=tenant,
|
|
1012
|
+
offset=offset,
|
|
1013
|
+
limit=limit,
|
|
1014
|
+
workflow_ids=workflow_ids,
|
|
1015
|
+
scopes=scopes,
|
|
1016
|
+
_request_auth=_request_auth,
|
|
1017
|
+
_content_type=_content_type,
|
|
1018
|
+
_headers=_headers,
|
|
1019
|
+
_host_index=_host_index,
|
|
1020
|
+
)
|
|
1021
|
+
|
|
1022
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1023
|
+
"200": "V1FilterList",
|
|
1024
|
+
"400": "APIErrors",
|
|
1025
|
+
"403": "APIErrors",
|
|
1026
|
+
}
|
|
1027
|
+
response_data = self.api_client.call_api(
|
|
1028
|
+
*_param, _request_timeout=_request_timeout
|
|
1029
|
+
)
|
|
1030
|
+
response_data.read()
|
|
1031
|
+
return self.api_client.response_deserialize(
|
|
1032
|
+
response_data=response_data,
|
|
1033
|
+
response_types_map=_response_types_map,
|
|
1034
|
+
).data
|
|
1035
|
+
|
|
1036
|
+
@validate_call
|
|
1037
|
+
def v1_filter_list_with_http_info(
|
|
1038
|
+
self,
|
|
1039
|
+
tenant: Annotated[
|
|
1040
|
+
str,
|
|
1041
|
+
Field(
|
|
1042
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1043
|
+
),
|
|
1044
|
+
],
|
|
1045
|
+
offset: Annotated[
|
|
1046
|
+
Optional[StrictInt], Field(description="The number to skip")
|
|
1047
|
+
] = None,
|
|
1048
|
+
limit: Annotated[
|
|
1049
|
+
Optional[StrictInt], Field(description="The number to limit by")
|
|
1050
|
+
] = None,
|
|
1051
|
+
workflow_ids: Annotated[
|
|
1052
|
+
Optional[
|
|
1053
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
1054
|
+
],
|
|
1055
|
+
Field(description="The workflow ids to filter by"),
|
|
1056
|
+
] = None,
|
|
1057
|
+
scopes: Annotated[
|
|
1058
|
+
Optional[List[StrictStr]],
|
|
1059
|
+
Field(description="The scopes to subset candidate filters by"),
|
|
1060
|
+
] = None,
|
|
1061
|
+
_request_timeout: Union[
|
|
1062
|
+
None,
|
|
1063
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1064
|
+
Tuple[
|
|
1065
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1066
|
+
],
|
|
1067
|
+
] = None,
|
|
1068
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1069
|
+
_content_type: Optional[StrictStr] = None,
|
|
1070
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1071
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1072
|
+
) -> ApiResponse[V1FilterList]:
|
|
1073
|
+
"""List filters
|
|
1074
|
+
|
|
1075
|
+
Lists all filters for a tenant.
|
|
1076
|
+
|
|
1077
|
+
:param tenant: The tenant id (required)
|
|
1078
|
+
:type tenant: str
|
|
1079
|
+
:param offset: The number to skip
|
|
1080
|
+
:type offset: int
|
|
1081
|
+
:param limit: The number to limit by
|
|
1082
|
+
:type limit: int
|
|
1083
|
+
:param workflow_ids: The workflow ids to filter by
|
|
1084
|
+
:type workflow_ids: List[str]
|
|
1085
|
+
:param scopes: The scopes to subset candidate filters by
|
|
1086
|
+
:type scopes: List[str]
|
|
1087
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1088
|
+
number provided, it will be total request
|
|
1089
|
+
timeout. It can also be a pair (tuple) of
|
|
1090
|
+
(connection, read) timeouts.
|
|
1091
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1092
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1093
|
+
request; this effectively ignores the
|
|
1094
|
+
authentication in the spec for a single request.
|
|
1095
|
+
:type _request_auth: dict, optional
|
|
1096
|
+
:param _content_type: force content-type for the request.
|
|
1097
|
+
:type _content_type: str, Optional
|
|
1098
|
+
:param _headers: set to override the headers for a single
|
|
1099
|
+
request; this effectively ignores the headers
|
|
1100
|
+
in the spec for a single request.
|
|
1101
|
+
:type _headers: dict, optional
|
|
1102
|
+
:param _host_index: set to override the host_index for a single
|
|
1103
|
+
request; this effectively ignores the host_index
|
|
1104
|
+
in the spec for a single request.
|
|
1105
|
+
:type _host_index: int, optional
|
|
1106
|
+
:return: Returns the result object.
|
|
1107
|
+
""" # noqa: E501
|
|
1108
|
+
|
|
1109
|
+
_param = self._v1_filter_list_serialize(
|
|
1110
|
+
tenant=tenant,
|
|
1111
|
+
offset=offset,
|
|
1112
|
+
limit=limit,
|
|
1113
|
+
workflow_ids=workflow_ids,
|
|
1114
|
+
scopes=scopes,
|
|
1115
|
+
_request_auth=_request_auth,
|
|
1116
|
+
_content_type=_content_type,
|
|
1117
|
+
_headers=_headers,
|
|
1118
|
+
_host_index=_host_index,
|
|
1119
|
+
)
|
|
1120
|
+
|
|
1121
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1122
|
+
"200": "V1FilterList",
|
|
1123
|
+
"400": "APIErrors",
|
|
1124
|
+
"403": "APIErrors",
|
|
1125
|
+
}
|
|
1126
|
+
response_data = self.api_client.call_api(
|
|
1127
|
+
*_param, _request_timeout=_request_timeout
|
|
1128
|
+
)
|
|
1129
|
+
response_data.read()
|
|
1130
|
+
return self.api_client.response_deserialize(
|
|
1131
|
+
response_data=response_data,
|
|
1132
|
+
response_types_map=_response_types_map,
|
|
1133
|
+
)
|
|
1134
|
+
|
|
1135
|
+
@validate_call
|
|
1136
|
+
def v1_filter_list_without_preload_content(
|
|
1137
|
+
self,
|
|
1138
|
+
tenant: Annotated[
|
|
1139
|
+
str,
|
|
1140
|
+
Field(
|
|
1141
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1142
|
+
),
|
|
1143
|
+
],
|
|
1144
|
+
offset: Annotated[
|
|
1145
|
+
Optional[StrictInt], Field(description="The number to skip")
|
|
1146
|
+
] = None,
|
|
1147
|
+
limit: Annotated[
|
|
1148
|
+
Optional[StrictInt], Field(description="The number to limit by")
|
|
1149
|
+
] = None,
|
|
1150
|
+
workflow_ids: Annotated[
|
|
1151
|
+
Optional[
|
|
1152
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
1153
|
+
],
|
|
1154
|
+
Field(description="The workflow ids to filter by"),
|
|
1155
|
+
] = None,
|
|
1156
|
+
scopes: Annotated[
|
|
1157
|
+
Optional[List[StrictStr]],
|
|
1158
|
+
Field(description="The scopes to subset candidate filters by"),
|
|
1159
|
+
] = None,
|
|
1160
|
+
_request_timeout: Union[
|
|
1161
|
+
None,
|
|
1162
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1163
|
+
Tuple[
|
|
1164
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1165
|
+
],
|
|
1166
|
+
] = None,
|
|
1167
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1168
|
+
_content_type: Optional[StrictStr] = None,
|
|
1169
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1170
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1171
|
+
) -> RESTResponseType:
|
|
1172
|
+
"""List filters
|
|
1173
|
+
|
|
1174
|
+
Lists all filters for a tenant.
|
|
1175
|
+
|
|
1176
|
+
:param tenant: The tenant id (required)
|
|
1177
|
+
:type tenant: str
|
|
1178
|
+
:param offset: The number to skip
|
|
1179
|
+
:type offset: int
|
|
1180
|
+
:param limit: The number to limit by
|
|
1181
|
+
:type limit: int
|
|
1182
|
+
:param workflow_ids: The workflow ids to filter by
|
|
1183
|
+
:type workflow_ids: List[str]
|
|
1184
|
+
:param scopes: The scopes to subset candidate filters by
|
|
1185
|
+
:type scopes: List[str]
|
|
1186
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1187
|
+
number provided, it will be total request
|
|
1188
|
+
timeout. It can also be a pair (tuple) of
|
|
1189
|
+
(connection, read) timeouts.
|
|
1190
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1191
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1192
|
+
request; this effectively ignores the
|
|
1193
|
+
authentication in the spec for a single request.
|
|
1194
|
+
:type _request_auth: dict, optional
|
|
1195
|
+
:param _content_type: force content-type for the request.
|
|
1196
|
+
:type _content_type: str, Optional
|
|
1197
|
+
:param _headers: set to override the headers for a single
|
|
1198
|
+
request; this effectively ignores the headers
|
|
1199
|
+
in the spec for a single request.
|
|
1200
|
+
:type _headers: dict, optional
|
|
1201
|
+
:param _host_index: set to override the host_index for a single
|
|
1202
|
+
request; this effectively ignores the host_index
|
|
1203
|
+
in the spec for a single request.
|
|
1204
|
+
:type _host_index: int, optional
|
|
1205
|
+
:return: Returns the result object.
|
|
1206
|
+
""" # noqa: E501
|
|
1207
|
+
|
|
1208
|
+
_param = self._v1_filter_list_serialize(
|
|
1209
|
+
tenant=tenant,
|
|
1210
|
+
offset=offset,
|
|
1211
|
+
limit=limit,
|
|
1212
|
+
workflow_ids=workflow_ids,
|
|
1213
|
+
scopes=scopes,
|
|
1214
|
+
_request_auth=_request_auth,
|
|
1215
|
+
_content_type=_content_type,
|
|
1216
|
+
_headers=_headers,
|
|
1217
|
+
_host_index=_host_index,
|
|
1218
|
+
)
|
|
1219
|
+
|
|
1220
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1221
|
+
"200": "V1FilterList",
|
|
1222
|
+
"400": "APIErrors",
|
|
1223
|
+
"403": "APIErrors",
|
|
1224
|
+
}
|
|
1225
|
+
response_data = self.api_client.call_api(
|
|
1226
|
+
*_param, _request_timeout=_request_timeout
|
|
1227
|
+
)
|
|
1228
|
+
return response_data.response
|
|
1229
|
+
|
|
1230
|
+
def _v1_filter_list_serialize(
|
|
1231
|
+
self,
|
|
1232
|
+
tenant,
|
|
1233
|
+
offset,
|
|
1234
|
+
limit,
|
|
1235
|
+
workflow_ids,
|
|
1236
|
+
scopes,
|
|
1237
|
+
_request_auth,
|
|
1238
|
+
_content_type,
|
|
1239
|
+
_headers,
|
|
1240
|
+
_host_index,
|
|
1241
|
+
) -> RequestSerialized:
|
|
1242
|
+
|
|
1243
|
+
_host = None
|
|
1244
|
+
|
|
1245
|
+
_collection_formats: Dict[str, str] = {
|
|
1246
|
+
"workflowIds": "multi",
|
|
1247
|
+
"scopes": "multi",
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
_path_params: Dict[str, str] = {}
|
|
1251
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1252
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1253
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1254
|
+
_files: Dict[
|
|
1255
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1256
|
+
] = {}
|
|
1257
|
+
_body_params: Optional[bytes] = None
|
|
1258
|
+
|
|
1259
|
+
# process the path parameters
|
|
1260
|
+
if tenant is not None:
|
|
1261
|
+
_path_params["tenant"] = tenant
|
|
1262
|
+
# process the query parameters
|
|
1263
|
+
if offset is not None:
|
|
1264
|
+
|
|
1265
|
+
_query_params.append(("offset", offset))
|
|
1266
|
+
|
|
1267
|
+
if limit is not None:
|
|
1268
|
+
|
|
1269
|
+
_query_params.append(("limit", limit))
|
|
1270
|
+
|
|
1271
|
+
if workflow_ids is not None:
|
|
1272
|
+
|
|
1273
|
+
_query_params.append(("workflowIds", workflow_ids))
|
|
1274
|
+
|
|
1275
|
+
if scopes is not None:
|
|
1276
|
+
|
|
1277
|
+
_query_params.append(("scopes", scopes))
|
|
1278
|
+
|
|
1279
|
+
# process the header parameters
|
|
1280
|
+
# process the form parameters
|
|
1281
|
+
# process the body parameter
|
|
1282
|
+
|
|
1283
|
+
# set the HTTP header `Accept`
|
|
1284
|
+
if "Accept" not in _header_params:
|
|
1285
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1286
|
+
["application/json"]
|
|
1287
|
+
)
|
|
1288
|
+
|
|
1289
|
+
# authentication setting
|
|
1290
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1291
|
+
|
|
1292
|
+
return self.api_client.param_serialize(
|
|
1293
|
+
method="GET",
|
|
1294
|
+
resource_path="/api/v1/stable/tenants/{tenant}/filters",
|
|
1295
|
+
path_params=_path_params,
|
|
1296
|
+
query_params=_query_params,
|
|
1297
|
+
header_params=_header_params,
|
|
1298
|
+
body=_body_params,
|
|
1299
|
+
post_params=_form_params,
|
|
1300
|
+
files=_files,
|
|
1301
|
+
auth_settings=_auth_settings,
|
|
1302
|
+
collection_formats=_collection_formats,
|
|
1303
|
+
_host=_host,
|
|
1304
|
+
_request_auth=_request_auth,
|
|
1305
|
+
)
|