kodexa 7.4.413228679383__py3-none-any.whl → 7.4.413229965531__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- kodexa/platform/client.py +72 -6
- {kodexa-7.4.413228679383.dist-info → kodexa-7.4.413229965531.dist-info}/METADATA +1 -1
- {kodexa-7.4.413228679383.dist-info → kodexa-7.4.413229965531.dist-info}/RECORD +5 -5
- {kodexa-7.4.413228679383.dist-info → kodexa-7.4.413229965531.dist-info}/LICENSE +0 -0
- {kodexa-7.4.413228679383.dist-info → kodexa-7.4.413229965531.dist-info}/WHEEL +0 -0
kodexa/platform/client.py
CHANGED
@@ -1337,6 +1337,11 @@ class TaskTagsEndpoint(EntitiesEndpoint):
|
|
1337
1337
|
return PageTaskTagEndpoint
|
1338
1338
|
|
1339
1339
|
|
1340
|
+
class PageTaskTemplateEndpoint(PageTask, PageEndpoint):
|
1341
|
+
def get_type(self) -> Optional[str]:
|
1342
|
+
return "taskTemplate"
|
1343
|
+
|
1344
|
+
|
1340
1345
|
class PageRetainedGuidanceEndpoint(PageRetainedGuidance, PageEndpoint):
|
1341
1346
|
"""Represents a page retained guidance endpoint.
|
1342
1347
|
|
@@ -2705,6 +2710,21 @@ class WorkspaceEndpoint(EntityEndpoint, Workspace):
|
|
2705
2710
|
raise ValueError("Workspace has no channel")
|
2706
2711
|
|
2707
2712
|
|
2713
|
+
class TaskTemplateEndpoint(EntityEndpoint, Task):
|
2714
|
+
"""Represents a task endpoint.
|
2715
|
+
|
2716
|
+
This class is used to interact with the task endpoint of the API.
|
2717
|
+
"""
|
2718
|
+
|
2719
|
+
def get_type(self) -> str:
|
2720
|
+
"""Get the type of the endpoint.
|
2721
|
+
|
2722
|
+
Returns:
|
2723
|
+
str: The type of the endpoint, in this case "projects".
|
2724
|
+
"""
|
2725
|
+
return "taskTemplates"
|
2726
|
+
|
2727
|
+
|
2708
2728
|
class TaskEndpoint(EntityEndpoint, Task):
|
2709
2729
|
"""Represents a task endpoint.
|
2710
2730
|
|
@@ -3065,6 +3085,37 @@ class AssistantsEndpoint(EntitiesEndpoint):
|
|
3065
3085
|
return PageAssistantEndpoint
|
3066
3086
|
|
3067
3087
|
|
3088
|
+
class TaskTemplatesEndpoint(EntitiesEndpoint):
|
3089
|
+
"""Represents a projects endpoint"""
|
3090
|
+
|
3091
|
+
def get_type(self) -> str:
|
3092
|
+
"""
|
3093
|
+
Get the type of the endpoint.
|
3094
|
+
|
3095
|
+
Returns:
|
3096
|
+
str: The type of the endpoint.
|
3097
|
+
"""
|
3098
|
+
return "taskTemplates"
|
3099
|
+
|
3100
|
+
def get_instance_class(self, object_dict=None):
|
3101
|
+
"""
|
3102
|
+
Get the instance class of the endpoint.
|
3103
|
+
|
3104
|
+
Returns:
|
3105
|
+
ProjectEndpoint: The instance class of the endpoint.
|
3106
|
+
"""
|
3107
|
+
return TaskTemplateEndpoint
|
3108
|
+
|
3109
|
+
def get_page_class(self, object_dict=None):
|
3110
|
+
"""
|
3111
|
+
Get the page class of the endpoint.
|
3112
|
+
|
3113
|
+
Returns:
|
3114
|
+
PageProjectEndpoint: The page class of the endpoint.
|
3115
|
+
"""
|
3116
|
+
return PageTaskTemplateEndpoint
|
3117
|
+
|
3118
|
+
|
3068
3119
|
class TasksEndpoint(EntitiesEndpoint):
|
3069
3120
|
"""Represents a projects endpoint"""
|
3070
3121
|
|
@@ -4775,11 +4826,11 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
4775
4826
|
url = f"/api/documentFamilies/{self.id}/externalData"
|
4776
4827
|
response = self.client.put(url, body=external_data)
|
4777
4828
|
return response.json()
|
4778
|
-
|
4829
|
+
|
4779
4830
|
def get_json(
|
4780
4831
|
self,
|
4781
4832
|
project_id: str,
|
4782
|
-
friendly_names=False,
|
4833
|
+
friendly_names=False,
|
4783
4834
|
) -> str:
|
4784
4835
|
"""Get the JSON export for the document family
|
4785
4836
|
|
@@ -4794,7 +4845,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
4794
4845
|
raise Exception(
|
4795
4846
|
f"Project ID is required"
|
4796
4847
|
)
|
4797
|
-
|
4848
|
+
|
4798
4849
|
url = f"/api/stores/{self.store_ref.replace(':', '/')}/families/{self.id}/dataObjects"
|
4799
4850
|
params = {
|
4800
4851
|
"format": "json",
|
@@ -4857,9 +4908,9 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
4857
4908
|
"Waiting for mixin and/or label to be available on document family %s",
|
4858
4909
|
self.id,
|
4859
4910
|
)
|
4860
|
-
if polling_delay_in_seconds < 5:
|
4911
|
+
if polling_delay_in_seconds < 5:
|
4861
4912
|
polling_delay_in_seconds = 5
|
4862
|
-
|
4913
|
+
|
4863
4914
|
start = time.time()
|
4864
4915
|
while time.time() - start < timeout:
|
4865
4916
|
url = f"/api/stores/{self.store_ref.replace(':', '/')}/families/{self.id}"
|
@@ -5015,6 +5066,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
5015
5066
|
params=params,
|
5016
5067
|
files={"file": document.to_kddb()},
|
5017
5068
|
)
|
5069
|
+
|
5018
5070
|
def export_as_zip(self) -> bytes:
|
5019
5071
|
"""
|
5020
5072
|
Export the document family as bytes.
|
@@ -5331,7 +5383,7 @@ class DataStoreEndpoint(StoreEndpoint):
|
|
5331
5383
|
|
5332
5384
|
response = self.client.get(url, params=params)
|
5333
5385
|
return response.text
|
5334
|
-
|
5386
|
+
|
5335
5387
|
def get_taxonomies(self) -> List[Taxonomy]:
|
5336
5388
|
"""Get the taxonomies of the store
|
5337
5389
|
|
@@ -6545,6 +6597,20 @@ OBJECT_TYPES = {
|
|
6545
6597
|
"global": True,
|
6546
6598
|
"endpoint": MembershipsEndpoint,
|
6547
6599
|
},
|
6600
|
+
"tasks": {
|
6601
|
+
"name": "task",
|
6602
|
+
"plural": "tasks",
|
6603
|
+
"type": TaskEndpoint,
|
6604
|
+
"global": True,
|
6605
|
+
"endpoint": TasksEndpoint,
|
6606
|
+
},
|
6607
|
+
"taskTemplates": {
|
6608
|
+
"name": "taskTemplate",
|
6609
|
+
"plural": "taskTemplates",
|
6610
|
+
"type": TaskTemplateEndpoint,
|
6611
|
+
"global": True,
|
6612
|
+
"endpoint": TaskTemplatesEndpoint,
|
6613
|
+
}
|
6548
6614
|
}
|
6549
6615
|
|
6550
6616
|
|
@@ -19,7 +19,7 @@ kodexa/model/utils.py,sha256=6R-3rFiW9irBwj0Mq5yhp7EDXkNUFaeFhr3bWmnlW4g,2961
|
|
19
19
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
20
20
|
kodexa/pipeline/pipeline.py,sha256=Z4O6UwoISeP_HMlxm6l6kbcvFBDw3Glm7lT4cUibri4,25461
|
21
21
|
kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
|
22
|
-
kodexa/platform/client.py,sha256=
|
22
|
+
kodexa/platform/client.py,sha256=odEggW0k-Y8R4jOcY3gSiDzrHnfcTihIQTMs0hhtcso,235436
|
23
23
|
kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
|
24
24
|
kodexa/platform/kodexa.py,sha256=tPXHO500q3S75GhKGDcaxO51Viq2PNlHmAzpBZlahgo,34857
|
25
25
|
kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
|
@@ -44,7 +44,7 @@ kodexa/testing/test_utils.py,sha256=v44p__gE7ia67W7WeHN2HBFCWSCUrCZt7G4xBNCmwf8,
|
|
44
44
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
45
45
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
46
|
kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
|
47
|
-
kodexa-7.4.
|
48
|
-
kodexa-7.4.
|
49
|
-
kodexa-7.4.
|
50
|
-
kodexa-7.4.
|
47
|
+
kodexa-7.4.413229965531.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
48
|
+
kodexa-7.4.413229965531.dist-info/METADATA,sha256=Hp1AzXcktjapvukfwkTv9nEzon8dlaiDZxxzhyUMSv0,3528
|
49
|
+
kodexa-7.4.413229965531.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
50
|
+
kodexa-7.4.413229965531.dist-info/RECORD,,
|
File without changes
|
File without changes
|