kuflow-rest 3.2.2__tar.gz → 3.3.0__tar.gz
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.
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/PKG-INFO +1 -1
- kuflow_rest-3.3.0/VERSION +1 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/__init__.py +2 -2
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/_client.py +8 -1
- {kuflow_rest-3.2.2/kuflow_rest/_generated/models → kuflow_rest-3.3.0/kuflow_rest/_generated}/_patch.py +1 -3
- kuflow_rest-3.3.0/kuflow_rest/_generated/_utils/__init__.py +30 -0
- kuflow_rest-3.2.2/kuflow_rest/_generated/_serialization.py → kuflow_rest-3.3.0/kuflow_rest/_generated/_utils/serialization.py +45 -30
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/_version.py +1 -1
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/_client.py +8 -1
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/_patch.py +1 -3
- {kuflow_rest-3.2.2/kuflow_rest/_generated → kuflow_rest-3.3.0/kuflow_rest/_generated/aio}/operations/__init__.py +2 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_authentication_operations.py +8 -9
- kuflow_rest-3.3.0/kuflow_rest/_generated/aio/operations/_business_artifact_operations.py +1225 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_group_operations.py +15 -12
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_kms_operations.py +8 -9
- {kuflow_rest-3.2.2/kuflow_rest/_generated → kuflow_rest-3.3.0/kuflow_rest/_generated/aio/operations}/_patch.py +1 -3
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_principal_operations.py +19 -13
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_process_item_operations.py +443 -39
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_process_operations.py +150 -46
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_robot_operations.py +26 -16
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_tenant_operations.py +14 -12
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_tenant_user_operations.py +20 -14
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/operations/_worker_operations.py +8 -9
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/models/__init__.py +50 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/models/_enums.py +26 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/models/_models.py +1135 -58
- {kuflow_rest-3.2.2/kuflow_rest/_generated/aio/operations → kuflow_rest-3.3.0/kuflow_rest/_generated/models}/_patch.py +1 -3
- {kuflow_rest-3.2.2/kuflow_rest/_generated/aio → kuflow_rest-3.3.0/kuflow_rest/_generated}/operations/__init__.py +2 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_authentication_operations.py +9 -10
- kuflow_rest-3.3.0/kuflow_rest/_generated/operations/_business_artifact_operations.py +1513 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_group_operations.py +22 -16
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_kms_operations.py +9 -10
- kuflow_rest-3.3.0/kuflow_rest/_generated/operations/_patch.py +44 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_principal_operations.py +26 -17
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_process_item_operations.py +527 -46
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_process_operations.py +191 -49
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_robot_operations.py +29 -19
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_tenant_operations.py +17 -15
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_tenant_user_operations.py +28 -19
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/operations/_worker_operations.py +9 -10
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_kuflow_rest_client.py +4 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/models/__init__.py +50 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/models/_models.py +3 -3
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/__init__.py +2 -0
- kuflow_rest-3.3.0/kuflow_rest/operations/_business_artifact_operations.py +320 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_group_operations.py +16 -1
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_principal_operations.py +14 -1
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_process_item_operations.py +79 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_process_operations.py +49 -4
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_tenant_user_operations.py +9 -1
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/pyproject.toml +1 -1
- kuflow_rest-3.2.2/VERSION +0 -1
- kuflow_rest-3.2.2/kuflow_rest/_generated/operations/_patch.py +0 -46
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/README.md +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/__init__.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/_configuration.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/__init__.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/aio/_configuration.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/_generated/py.typed +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_authentication_operations.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_kms_operations.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_robot_operations.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_tenant_operations.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/operations/_worker_operations.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/utils/__init__.py +0 -0
- {kuflow_rest-3.2.2 → kuflow_rest-3.3.0}/kuflow_rest/utils/_parser.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.3.0
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
# SOFTWARE.
|
|
23
23
|
#
|
|
24
24
|
|
|
25
|
-
from ._generated.
|
|
25
|
+
from ._generated._utils.serialization import Deserializer, Model, Serializer
|
|
26
26
|
from ._kuflow_rest_client import KuBotTokenCredential, KuFlowRestClient
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
__all__ = ["Deserializer", "KuBotTokenCredential", "KuFlowRestClient", "Model", "Serializer"]
|
|
30
|
-
__version__ = "3.
|
|
30
|
+
__version__ = "3.3.0"
|
|
@@ -40,9 +40,10 @@ from azure.core.rest import HttpRequest, HttpResponse
|
|
|
40
40
|
|
|
41
41
|
from . import models as _models
|
|
42
42
|
from ._configuration import KuFlowRestClientConfiguration
|
|
43
|
-
from .
|
|
43
|
+
from ._utils.serialization import Deserializer, Serializer
|
|
44
44
|
from .operations import (
|
|
45
45
|
AuthenticationOperations,
|
|
46
|
+
BusinessArtifactOperations,
|
|
46
47
|
GroupOperations,
|
|
47
48
|
KmsOperations,
|
|
48
49
|
PrincipalOperations,
|
|
@@ -126,6 +127,8 @@ class KuFlowRestClient: # pylint: disable=client-accepts-api-version-keyword,to
|
|
|
126
127
|
:vartype process: kuflow.rest.operations.ProcessOperations
|
|
127
128
|
:ivar process_item: ProcessItemOperations operations
|
|
128
129
|
:vartype process_item: kuflow.rest.operations.ProcessItemOperations
|
|
130
|
+
:ivar business_artifact: BusinessArtifactOperations operations
|
|
131
|
+
:vartype business_artifact: kuflow.rest.operations.BusinessArtifactOperations
|
|
129
132
|
:ivar worker: WorkerOperations operations
|
|
130
133
|
:vartype worker: kuflow.rest.operations.WorkerOperations
|
|
131
134
|
:ivar robot: RobotOperations operations
|
|
@@ -140,6 +143,7 @@ class KuFlowRestClient: # pylint: disable=client-accepts-api-version-keyword,to
|
|
|
140
143
|
self, credential: "TokenCredential", *, endpoint: str = "https://api.kuflow.com/v2024-06-14", **kwargs: Any
|
|
141
144
|
) -> None:
|
|
142
145
|
self._config = KuFlowRestClientConfiguration(credential=credential, **kwargs)
|
|
146
|
+
|
|
143
147
|
_policies = kwargs.pop("policies", None)
|
|
144
148
|
if _policies is None:
|
|
145
149
|
_policies = [
|
|
@@ -171,6 +175,9 @@ class KuFlowRestClient: # pylint: disable=client-accepts-api-version-keyword,to
|
|
|
171
175
|
self.tenant_user = TenantUserOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
172
176
|
self.process = ProcessOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
173
177
|
self.process_item = ProcessItemOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
178
|
+
self.business_artifact = BusinessArtifactOperations(
|
|
179
|
+
self._client, self._config, self._serialize, self._deserialize
|
|
180
|
+
)
|
|
174
181
|
self.worker = WorkerOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
175
182
|
self.robot = RobotOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
176
183
|
|
|
@@ -32,9 +32,7 @@
|
|
|
32
32
|
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
|
35
|
+
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level
|
|
38
36
|
|
|
39
37
|
|
|
40
38
|
def patch_sdk():
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# --------------------------------------------------------------------------
|
|
2
|
+
#
|
|
3
|
+
# MIT License
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2022 KuFlow
|
|
6
|
+
#
|
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
# furnished to do so, subject to the following conditions:
|
|
13
|
+
#
|
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
# copies or substantial portions of the Software.
|
|
16
|
+
#
|
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
# SOFTWARE.
|
|
24
|
+
#
|
|
25
|
+
# --------------------------------------------------------------------------
|
|
26
|
+
#
|
|
27
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
|
28
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
29
|
+
#
|
|
30
|
+
# --------------------------------------------------------------------------
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
+
# coding=utf-8
|
|
1
2
|
# --------------------------------------------------------------------------
|
|
2
3
|
#
|
|
3
|
-
#
|
|
4
|
+
# MIT License
|
|
4
5
|
#
|
|
5
|
-
#
|
|
6
|
+
# Copyright (c) 2022 KuFlow
|
|
6
7
|
#
|
|
7
8
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
# of this software and associated documentation files (the "
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
9
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
# in the Software without restriction, including without limitation the rights
|
|
11
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
12
13
|
# furnished to do so, subject to the following conditions:
|
|
13
14
|
#
|
|
14
|
-
# The above copyright notice and this permission notice shall be included in
|
|
15
|
-
#
|
|
15
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
# copies or substantial portions of the Software.
|
|
16
17
|
#
|
|
17
|
-
# THE SOFTWARE IS PROVIDED
|
|
18
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
19
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
20
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
21
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
22
|
-
#
|
|
23
|
-
#
|
|
22
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
# SOFTWARE.
|
|
25
|
+
#
|
|
26
|
+
# --------------------------------------------------------------------------
|
|
27
|
+
#
|
|
28
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
|
29
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
24
30
|
#
|
|
25
31
|
# --------------------------------------------------------------------------
|
|
26
32
|
|
|
@@ -38,7 +44,6 @@ import re
|
|
|
38
44
|
import sys
|
|
39
45
|
import codecs
|
|
40
46
|
from typing import (
|
|
41
|
-
Dict,
|
|
42
47
|
Any,
|
|
43
48
|
cast,
|
|
44
49
|
Optional,
|
|
@@ -48,7 +53,6 @@ from typing import (
|
|
|
48
53
|
Mapping,
|
|
49
54
|
Callable,
|
|
50
55
|
MutableMapping,
|
|
51
|
-
List,
|
|
52
56
|
)
|
|
53
57
|
|
|
54
58
|
try:
|
|
@@ -244,12 +248,12 @@ class Model:
|
|
|
244
248
|
serialization and deserialization.
|
|
245
249
|
"""
|
|
246
250
|
|
|
247
|
-
_subtype_map:
|
|
248
|
-
_attribute_map:
|
|
249
|
-
_validation:
|
|
251
|
+
_subtype_map: dict[str, dict[str, Any]] = {}
|
|
252
|
+
_attribute_map: dict[str, dict[str, Any]] = {}
|
|
253
|
+
_validation: dict[str, dict[str, Any]] = {}
|
|
250
254
|
|
|
251
255
|
def __init__(self, **kwargs: Any) -> None:
|
|
252
|
-
self.additional_properties: Optional[
|
|
256
|
+
self.additional_properties: Optional[dict[str, Any]] = {}
|
|
253
257
|
for k in kwargs: # pylint: disable=consider-using-dict-items
|
|
254
258
|
if k not in self._attribute_map:
|
|
255
259
|
_LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__)
|
|
@@ -326,7 +330,7 @@ class Model:
|
|
|
326
330
|
def as_dict(
|
|
327
331
|
self,
|
|
328
332
|
keep_readonly: bool = True,
|
|
329
|
-
key_transformer: Callable[[str,
|
|
333
|
+
key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer,
|
|
330
334
|
**kwargs: Any,
|
|
331
335
|
) -> JSON:
|
|
332
336
|
"""Return a dict that can be serialized using json.dump.
|
|
@@ -395,7 +399,7 @@ class Model:
|
|
|
395
399
|
def from_dict(
|
|
396
400
|
cls,
|
|
397
401
|
data: Any,
|
|
398
|
-
key_extractors: Optional[Callable[[str,
|
|
402
|
+
key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None,
|
|
399
403
|
content_type: Optional[str] = None,
|
|
400
404
|
) -> Self:
|
|
401
405
|
"""Parse a dict using given key extractor return a model.
|
|
@@ -408,7 +412,7 @@ class Model:
|
|
|
408
412
|
:param function key_extractors: A key extractor function.
|
|
409
413
|
:param str content_type: JSON by default, set application/xml if XML.
|
|
410
414
|
:returns: An instance of this model
|
|
411
|
-
:raises
|
|
415
|
+
:raises DeserializationError: if something went wrong
|
|
412
416
|
:rtype: Self
|
|
413
417
|
"""
|
|
414
418
|
deserializer = Deserializer(cls._infer_class_models())
|
|
@@ -429,7 +433,7 @@ class Model:
|
|
|
429
433
|
return {}
|
|
430
434
|
result = dict(cls._subtype_map[key])
|
|
431
435
|
for valuetype in cls._subtype_map[key].values():
|
|
432
|
-
result
|
|
436
|
+
result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access
|
|
433
437
|
return result
|
|
434
438
|
|
|
435
439
|
@classmethod
|
|
@@ -543,7 +547,7 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
|
543
547
|
"[]": self.serialize_iter,
|
|
544
548
|
"{}": self.serialize_dict,
|
|
545
549
|
}
|
|
546
|
-
self.dependencies:
|
|
550
|
+
self.dependencies: dict[str, type] = dict(classes) if classes else {}
|
|
547
551
|
self.key_transformer = full_restapi_key_transformer
|
|
548
552
|
self.client_side_validation = True
|
|
549
553
|
|
|
@@ -594,7 +598,7 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
|
594
598
|
|
|
595
599
|
if attr_name == "additional_properties" and attr_desc["key"] == "":
|
|
596
600
|
if target_obj.additional_properties is not None:
|
|
597
|
-
serialized
|
|
601
|
+
serialized |= target_obj.additional_properties
|
|
598
602
|
continue
|
|
599
603
|
try:
|
|
600
604
|
orig_attr = getattr(target_obj, attr)
|
|
@@ -803,7 +807,7 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
|
803
807
|
|
|
804
808
|
# If dependencies is empty, try with current data class
|
|
805
809
|
# It has to be a subclass of Enum anyway
|
|
806
|
-
enum_type = self.dependencies.get(data_type, data.__class__)
|
|
810
|
+
enum_type = self.dependencies.get(data_type, cast(type, data.__class__))
|
|
807
811
|
if issubclass(enum_type, Enum):
|
|
808
812
|
return Serializer.serialize_enum(data, enum_obj=enum_type)
|
|
809
813
|
|
|
@@ -837,13 +841,20 @@ class Serializer: # pylint: disable=too-many-public-methods
|
|
|
837
841
|
:param str data_type: Type of object in the iterable.
|
|
838
842
|
:rtype: str, int, float, bool
|
|
839
843
|
:return: serialized object
|
|
844
|
+
:raises TypeError: raise if data_type is not one of str, int, float, bool.
|
|
840
845
|
"""
|
|
841
846
|
custom_serializer = cls._get_custom_serializers(data_type, **kwargs)
|
|
842
847
|
if custom_serializer:
|
|
843
848
|
return custom_serializer(data)
|
|
844
849
|
if data_type == "str":
|
|
845
850
|
return cls.serialize_unicode(data)
|
|
846
|
-
|
|
851
|
+
if data_type == "int":
|
|
852
|
+
return int(data)
|
|
853
|
+
if data_type == "float":
|
|
854
|
+
return float(data)
|
|
855
|
+
if data_type == "bool":
|
|
856
|
+
return bool(data)
|
|
857
|
+
raise TypeError("Unknown basic data type: {}".format(data_type))
|
|
847
858
|
|
|
848
859
|
@classmethod
|
|
849
860
|
def serialize_unicode(cls, data):
|
|
@@ -1198,7 +1209,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen
|
|
|
1198
1209
|
|
|
1199
1210
|
while "." in key:
|
|
1200
1211
|
# Need the cast, as for some reasons "split" is typed as list[str | Any]
|
|
1201
|
-
dict_keys = cast(
|
|
1212
|
+
dict_keys = cast(list[str], _FLATTEN.split(key))
|
|
1202
1213
|
if len(dict_keys) == 1:
|
|
1203
1214
|
key = _decode_attribute_map_key(dict_keys[0])
|
|
1204
1215
|
break
|
|
@@ -1400,7 +1411,7 @@ class Deserializer:
|
|
|
1400
1411
|
"duration": (isodate.Duration, datetime.timedelta),
|
|
1401
1412
|
"iso-8601": (datetime.datetime),
|
|
1402
1413
|
}
|
|
1403
|
-
self.dependencies:
|
|
1414
|
+
self.dependencies: dict[str, type] = dict(classes) if classes else {}
|
|
1404
1415
|
self.key_extractors = [rest_key_extractor, xml_key_extractor]
|
|
1405
1416
|
# Additional properties only works if the "rest_key_extractor" is used to
|
|
1406
1417
|
# extract the keys. Making it to work whatever the key extractor is too much
|
|
@@ -1773,7 +1784,7 @@ class Deserializer:
|
|
|
1773
1784
|
:param str data_type: deserialization data type.
|
|
1774
1785
|
:return: Deserialized basic type.
|
|
1775
1786
|
:rtype: str, int, float or bool
|
|
1776
|
-
:raises TypeError: if string format is not valid.
|
|
1787
|
+
:raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool.
|
|
1777
1788
|
"""
|
|
1778
1789
|
# If we're here, data is supposed to be a basic type.
|
|
1779
1790
|
# If it's still an XML node, take the text
|
|
@@ -1799,7 +1810,11 @@ class Deserializer:
|
|
|
1799
1810
|
|
|
1800
1811
|
if data_type == "str":
|
|
1801
1812
|
return self.deserialize_unicode(attr)
|
|
1802
|
-
|
|
1813
|
+
if data_type == "int":
|
|
1814
|
+
return int(attr)
|
|
1815
|
+
if data_type == "float":
|
|
1816
|
+
return float(attr)
|
|
1817
|
+
raise TypeError("Unknown basic data type: {}".format(data_type))
|
|
1803
1818
|
|
|
1804
1819
|
@staticmethod
|
|
1805
1820
|
def deserialize_unicode(data):
|
|
@@ -39,10 +39,11 @@ from azure.core.pipeline import policies
|
|
|
39
39
|
from azure.core.rest import AsyncHttpResponse, HttpRequest
|
|
40
40
|
|
|
41
41
|
from .. import models as _models
|
|
42
|
-
from ..
|
|
42
|
+
from .._utils.serialization import Deserializer, Serializer
|
|
43
43
|
from ._configuration import KuFlowRestClientConfiguration
|
|
44
44
|
from .operations import (
|
|
45
45
|
AuthenticationOperations,
|
|
46
|
+
BusinessArtifactOperations,
|
|
46
47
|
GroupOperations,
|
|
47
48
|
KmsOperations,
|
|
48
49
|
PrincipalOperations,
|
|
@@ -126,6 +127,8 @@ class KuFlowRestClient: # pylint: disable=client-accepts-api-version-keyword,to
|
|
|
126
127
|
:vartype process: kuflow.rest.aio.operations.ProcessOperations
|
|
127
128
|
:ivar process_item: ProcessItemOperations operations
|
|
128
129
|
:vartype process_item: kuflow.rest.aio.operations.ProcessItemOperations
|
|
130
|
+
:ivar business_artifact: BusinessArtifactOperations operations
|
|
131
|
+
:vartype business_artifact: kuflow.rest.aio.operations.BusinessArtifactOperations
|
|
129
132
|
:ivar worker: WorkerOperations operations
|
|
130
133
|
:vartype worker: kuflow.rest.aio.operations.WorkerOperations
|
|
131
134
|
:ivar robot: RobotOperations operations
|
|
@@ -140,6 +143,7 @@ class KuFlowRestClient: # pylint: disable=client-accepts-api-version-keyword,to
|
|
|
140
143
|
self, credential: "AsyncTokenCredential", *, endpoint: str = "https://api.kuflow.com/v2024-06-14", **kwargs: Any
|
|
141
144
|
) -> None:
|
|
142
145
|
self._config = KuFlowRestClientConfiguration(credential=credential, **kwargs)
|
|
146
|
+
|
|
143
147
|
_policies = kwargs.pop("policies", None)
|
|
144
148
|
if _policies is None:
|
|
145
149
|
_policies = [
|
|
@@ -171,6 +175,9 @@ class KuFlowRestClient: # pylint: disable=client-accepts-api-version-keyword,to
|
|
|
171
175
|
self.tenant_user = TenantUserOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
172
176
|
self.process = ProcessOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
173
177
|
self.process_item = ProcessItemOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
178
|
+
self.business_artifact = BusinessArtifactOperations(
|
|
179
|
+
self._client, self._config, self._serialize, self._deserialize
|
|
180
|
+
)
|
|
174
181
|
self.worker = WorkerOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
175
182
|
self.robot = RobotOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
176
183
|
|
|
@@ -32,9 +32,7 @@
|
|
|
32
32
|
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
|
35
|
+
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level
|
|
38
36
|
|
|
39
37
|
|
|
40
38
|
def patch_sdk():
|
|
@@ -44,6 +44,7 @@ from ._tenant_operations import TenantOperations # type: ignore
|
|
|
44
44
|
from ._tenant_user_operations import TenantUserOperations # type: ignore
|
|
45
45
|
from ._process_operations import ProcessOperations # type: ignore
|
|
46
46
|
from ._process_item_operations import ProcessItemOperations # type: ignore
|
|
47
|
+
from ._business_artifact_operations import BusinessArtifactOperations # type: ignore
|
|
47
48
|
from ._worker_operations import WorkerOperations # type: ignore
|
|
48
49
|
from ._robot_operations import RobotOperations # type: ignore
|
|
49
50
|
|
|
@@ -60,6 +61,7 @@ __all__ = [
|
|
|
60
61
|
"TenantUserOperations",
|
|
61
62
|
"ProcessOperations",
|
|
62
63
|
"ProcessItemOperations",
|
|
64
|
+
"BusinessArtifactOperations",
|
|
63
65
|
"WorkerOperations",
|
|
64
66
|
"RobotOperations",
|
|
65
67
|
]
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
30
30
|
#
|
|
31
31
|
# --------------------------------------------------------------------------
|
|
32
|
+
from collections.abc import MutableMapping
|
|
32
33
|
from io import IOBase
|
|
33
|
-
import
|
|
34
|
-
from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
|
|
34
|
+
from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
|
|
35
35
|
|
|
36
36
|
from azure.core import AsyncPipelineClient
|
|
37
37
|
from azure.core.exceptions import (
|
|
@@ -48,16 +48,12 @@ from azure.core.tracing.decorator_async import distributed_trace_async
|
|
|
48
48
|
from azure.core.utils import case_insensitive_dict
|
|
49
49
|
|
|
50
50
|
from ... import models as _models
|
|
51
|
-
from ...
|
|
51
|
+
from ..._utils.serialization import Deserializer, Serializer
|
|
52
52
|
from ...operations._authentication_operations import build_create_authentication_request
|
|
53
53
|
from .._configuration import KuFlowRestClientConfiguration
|
|
54
54
|
|
|
55
|
-
if sys.version_info >= (3, 9):
|
|
56
|
-
from collections.abc import MutableMapping
|
|
57
|
-
else:
|
|
58
|
-
from typing import MutableMapping # type: ignore
|
|
59
55
|
T = TypeVar("T")
|
|
60
|
-
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T,
|
|
56
|
+
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
|
|
61
57
|
|
|
62
58
|
|
|
63
59
|
class AuthenticationOperations:
|
|
@@ -174,7 +170,10 @@ class AuthenticationOperations:
|
|
|
174
170
|
|
|
175
171
|
if response.status_code not in [200]:
|
|
176
172
|
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
|
177
|
-
error = self._deserialize.failsafe_deserialize(
|
|
173
|
+
error = self._deserialize.failsafe_deserialize(
|
|
174
|
+
_models.DefaultError,
|
|
175
|
+
pipeline_response,
|
|
176
|
+
)
|
|
178
177
|
raise HttpResponseError(response=response, model=error)
|
|
179
178
|
|
|
180
179
|
deserialized = self._deserialize("Authentication", pipeline_response.http_response)
|