kodexa 7.0.1a9196805101__tar.gz → 7.0.1a9971685034__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.
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/PKG-INFO +2 -1
- kodexa-7.0.1a9971685034/kodexa/model/entities/check_response.py +133 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/model.py +7 -3
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/objects.py +52 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/platform/client.py +119 -6
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/pyproject.toml +3 -2
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/LICENSE +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/README.md +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/base.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/persistence.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/core.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/steps/common.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/training/__init__.py +0 -0
- {kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/training/train_utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: kodexa
|
3
|
-
Version: 7.0.
|
3
|
+
Version: 7.0.1a9971685034
|
4
4
|
Summary: Python SDK for the Kodexa Platform
|
5
5
|
Author: Austin Redenbaugh
|
6
6
|
Author-email: austin@kodexa.com
|
@@ -16,6 +16,7 @@ Classifier: Topic :: Software Development :: Libraries
|
|
16
16
|
Requires-Dist: addict (>=2.4.0,<3.0.0)
|
17
17
|
Requires-Dist: appdirs (>=1.4.4,<2.0.0)
|
18
18
|
Requires-Dist: better-exceptions (>=0.3.3,<0.4.0)
|
19
|
+
Requires-Dist: certifi (>=2024.7.4,<2025.0.0)
|
19
20
|
Requires-Dist: chevron (>=0.14.0,<0.15.0)
|
20
21
|
Requires-Dist: deepdiff (>=7.0.1,<8.0.0)
|
21
22
|
Requires-Dist: msgpack (>=1.0.6,<2.0.0)
|
@@ -0,0 +1,133 @@
|
|
1
|
+
from typing import Optional, List
|
2
|
+
|
3
|
+
from pydantic import BaseModel, ConfigDict, Field
|
4
|
+
from kodexa.model.base import StandardDateTime
|
5
|
+
from kodexa.model.objects import User
|
6
|
+
from kodexa.platform.client import EntityEndpoint, PageEndpoint, EntitiesEndpoint
|
7
|
+
|
8
|
+
from enum import Enum
|
9
|
+
|
10
|
+
|
11
|
+
class CheckStatus(Enum):
|
12
|
+
""" Check Status ENUM: OPEN, CLOSED, IN_PROGRESS """
|
13
|
+
open = "OPEN"
|
14
|
+
closed = "CLOSED"
|
15
|
+
in_progress = "IN_PROGRESS"
|
16
|
+
|
17
|
+
|
18
|
+
class CheckResponse(BaseModel):
|
19
|
+
"""
|
20
|
+
Entity of check response
|
21
|
+
"""
|
22
|
+
model_config = ConfigDict(
|
23
|
+
populate_by_name=True,
|
24
|
+
use_enum_values=True,
|
25
|
+
arbitrary_types_allowed=True,
|
26
|
+
protected_namespaces=("model_config",),
|
27
|
+
)
|
28
|
+
|
29
|
+
id: Optional[str] = Field(None)
|
30
|
+
uuid: Optional[str] = None
|
31
|
+
change_sequence: Optional[int] = Field(None, alias="changeSequence")
|
32
|
+
created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
|
33
|
+
updated_on: Optional[StandardDateTime] = Field(None, alias="updatedOn")
|
34
|
+
title: Optional[str] = None
|
35
|
+
description: Optional[str] = None
|
36
|
+
status: Optional[CheckStatus] = None
|
37
|
+
confidence: Optional[float] = None
|
38
|
+
approver: Optional[User] = None
|
39
|
+
data_object_id: Optional[str] = Field(None, alias="dataObjectId")
|
40
|
+
|
41
|
+
|
42
|
+
class PageCheckResponse(BaseModel):
|
43
|
+
"""
|
44
|
+
A page pydantic for check response
|
45
|
+
"""
|
46
|
+
|
47
|
+
model_config = ConfigDict(
|
48
|
+
populate_by_name=True,
|
49
|
+
use_enum_values=True,
|
50
|
+
arbitrary_types_allowed=True,
|
51
|
+
protected_namespaces=("model_config",),
|
52
|
+
)
|
53
|
+
total_pages: Optional[int] = Field(None, alias="totalPages")
|
54
|
+
total_elements: Optional[int] = Field(None, alias="totalElements")
|
55
|
+
size: Optional[int] = None
|
56
|
+
content: Optional[List[CheckResponse]] = None
|
57
|
+
number: Optional[int] = None
|
58
|
+
number_of_elements: Optional[int] = Field(None, alias="numberOfElements")
|
59
|
+
first: Optional[bool] = None
|
60
|
+
last: Optional[bool] = None
|
61
|
+
empty: Optional[bool] = None
|
62
|
+
|
63
|
+
|
64
|
+
class PageCheckResponseEndpoint(PageCheckResponse, PageEndpoint):
|
65
|
+
"""
|
66
|
+
Represents a page check response endpoint
|
67
|
+
|
68
|
+
This class is used to represent the endpoints of a page check response. It inherits from
|
69
|
+
the PageCheckResponse and PageEndpoint classes.
|
70
|
+
|
71
|
+
Methods:
|
72
|
+
get_type: Returns the type of the endpoint.
|
73
|
+
"""
|
74
|
+
|
75
|
+
def get_type(self) -> str:
|
76
|
+
"""Get the type of the endpoint
|
77
|
+
|
78
|
+
This method is used to get the type of the endpoint. In this case, it will always
|
79
|
+
return "workspace".
|
80
|
+
|
81
|
+
Returns:
|
82
|
+
str: The type of the endpoint, "workspace".
|
83
|
+
"""
|
84
|
+
return "checkResponse"
|
85
|
+
|
86
|
+
|
87
|
+
class CheckResponseEndpoint(CheckResponse, EntityEndpoint):
|
88
|
+
"""Represents a Check Response endpoint"""
|
89
|
+
|
90
|
+
def get_type(self) -> str:
|
91
|
+
"""
|
92
|
+
Get the type of endpoint
|
93
|
+
|
94
|
+
:return: The type of endpoint
|
95
|
+
"""
|
96
|
+
return "checkResponses"
|
97
|
+
|
98
|
+
|
99
|
+
class CheckResponsesEndpoint(EntitiesEndpoint):
|
100
|
+
""" Represents check responses endpoint """
|
101
|
+
|
102
|
+
def get_type(self) -> str:
|
103
|
+
"""
|
104
|
+
Get the type of endpoint
|
105
|
+
:return: The type of endpoint
|
106
|
+
"""
|
107
|
+
return "checkResponses"
|
108
|
+
|
109
|
+
def get_instance_class(self, object_dict=None) -> CheckResponseEndpoint:
|
110
|
+
"""Get the instance class of the endpoint
|
111
|
+
|
112
|
+
This method is used to get the instance class of the endpoint.
|
113
|
+
|
114
|
+
Args:
|
115
|
+
object_dict (dict, optional): A dictionary containing the object data.
|
116
|
+
|
117
|
+
Returns:
|
118
|
+
CheckResponseEndpoint: The instance class of the endpoint.
|
119
|
+
"""
|
120
|
+
return CheckResponseEndpoint
|
121
|
+
|
122
|
+
def get_page_class(self, object_dict=None) -> PageCheckResponseEndpoint:
|
123
|
+
"""Get the page class of the endpoint
|
124
|
+
|
125
|
+
This method is used to get the page class of the endpoint.
|
126
|
+
|
127
|
+
Args:
|
128
|
+
object_dict (dict, optional): A dictionary containing the object data.
|
129
|
+
|
130
|
+
Returns:
|
131
|
+
PageCheckResponseEndpoint: The page class of the endpoint.
|
132
|
+
"""
|
133
|
+
return PageCheckResponseEndpoint
|
@@ -559,9 +559,13 @@ class ContentNode(object):
|
|
559
559
|
>>> new_page.add_feature('pagination','pageNum',1)
|
560
560
|
"""
|
561
561
|
if self.has_feature(feature_type, name):
|
562
|
-
|
563
|
-
|
564
|
-
|
562
|
+
existing_feature = self.get_feature(feature_type, name)
|
563
|
+
if isinstance(existing_feature.value, list):
|
564
|
+
existing_feature.value.append(value)
|
565
|
+
else:
|
566
|
+
existing_feature.value = [existing_feature.value, value]
|
567
|
+
self.update_feature(existing_feature)
|
568
|
+
return existing_feature
|
565
569
|
|
566
570
|
# Make sure that we treat the value as list all the time
|
567
571
|
new_feature = ContentFeature(
|
@@ -1732,6 +1732,7 @@ class ProjectResourcesUpdate(BaseModel):
|
|
1732
1732
|
store_refs: Optional[List[str]] = Field(None, alias="storeRefs")
|
1733
1733
|
dashboard_refs: Optional[List[str]] = Field(None, alias="dashboardRefs")
|
1734
1734
|
data_form_refs: Optional[List[str]] = Field(None, alias="dataFormRefs")
|
1735
|
+
guidance_set_refs: Optional[List[str]] = Field(None, alias="guidanceRefs")
|
1735
1736
|
|
1736
1737
|
|
1737
1738
|
class Role1(Enum):
|
@@ -3850,6 +3851,18 @@ class DocumentEmbedding(BaseModel):
|
|
3850
3851
|
node_uuid: Optional[str] = Field(None, alias="nodeUuid")
|
3851
3852
|
|
3852
3853
|
|
3854
|
+
class DocumentExternalData(BaseModel):
|
3855
|
+
model_config = ConfigDict(
|
3856
|
+
populate_by_name=True,
|
3857
|
+
use_enum_values=True,
|
3858
|
+
arbitrary_types_allowed=True,
|
3859
|
+
protected_namespaces=("model_config",),
|
3860
|
+
)
|
3861
|
+
|
3862
|
+
external_data: Optional[Dict[str, Any]] = Field(None, alias="externalData")
|
3863
|
+
document_family: Optional[DocumentFamily] = Field(None, alias="documentFamily")
|
3864
|
+
|
3865
|
+
|
3853
3866
|
class DocumentFamily(BaseModel):
|
3854
3867
|
"""
|
3855
3868
|
|
@@ -5071,6 +5084,13 @@ class ModelContentMetadata(BaseModel):
|
|
5071
5084
|
alias="additionalTaxonOptions",
|
5072
5085
|
description="This are additional properties that can be set on a label when the model is part of the project",
|
5073
5086
|
)
|
5087
|
+
|
5088
|
+
taxon_features: Optional[List[TaxonFeatures]] = Field(
|
5089
|
+
None,
|
5090
|
+
alias="taxonFeatures",
|
5091
|
+
description="This are additional properties that can be set as part of the taxon in the taxonomy (not a label but at the taxon level) they will be stored under the type_features",
|
5092
|
+
)
|
5093
|
+
|
5074
5094
|
contents: Optional[List[str]] = Field(
|
5075
5095
|
None,
|
5076
5096
|
description="A list of the paths (with wildcards) that hold the content of this model",
|
@@ -5101,6 +5121,33 @@ class Action(ExtensionPackProvided):
|
|
5101
5121
|
metadata: Optional[ObjectMetadata] = None
|
5102
5122
|
|
5103
5123
|
|
5124
|
+
class TaxonFeatures(BaseModel):
|
5125
|
+
"""
|
5126
|
+
|
5127
|
+
"""
|
5128
|
+
model_config = ConfigDict(
|
5129
|
+
populate_by_name=True,
|
5130
|
+
use_enum_values=True,
|
5131
|
+
arbitrary_types_allowed=True,
|
5132
|
+
protected_namespaces=("model_config",),
|
5133
|
+
)
|
5134
|
+
"""
|
5135
|
+
A Custom Event allows you to define an subtype of assistant event with options
|
5136
|
+
"""
|
5137
|
+
|
5138
|
+
taxonPath: Optional[str] = Field(
|
5139
|
+
None, description="The path of the taxon to add the features to", pattern=r"^[a-zA-Z0-9\-_]{0,40}$"
|
5140
|
+
)
|
5141
|
+
options: Optional[List[Option]] = Field(
|
5142
|
+
None, description="The options to add as type features to the taxon"
|
5143
|
+
)
|
5144
|
+
group_only: Optional[bool] = Field(
|
5145
|
+
None,
|
5146
|
+
alias="groupOnly",
|
5147
|
+
description="If true, the features will only be added to the group taxon",
|
5148
|
+
)
|
5149
|
+
|
5150
|
+
|
5104
5151
|
class AssistantDefinition(ExtensionPackProvided):
|
5105
5152
|
"""
|
5106
5153
|
|
@@ -5136,6 +5183,11 @@ class AssistantDefinition(ExtensionPackProvided):
|
|
5136
5183
|
alias="additionalTaxonOptions",
|
5137
5184
|
description="This are additional properties that can be set on a label when the assistant is part of the project",
|
5138
5185
|
)
|
5186
|
+
taxon_features: Optional[List[TaxonFeatures]] = Field(
|
5187
|
+
None,
|
5188
|
+
alias="taxonFeatures",
|
5189
|
+
description="This are additional properties that can be set as part of the taxon in the taxonomy (not a label but at the taxon level) they will be stored under the type_features",
|
5190
|
+
)
|
5139
5191
|
event_types: Optional[List[CustomEvent]] = Field(
|
5140
5192
|
None,
|
5141
5193
|
alias="eventTypes",
|
@@ -86,6 +86,7 @@ from kodexa.model.objects import (
|
|
86
86
|
PageExtensionPack,
|
87
87
|
PageOrganization,
|
88
88
|
DocumentFamilyStatistics, MessageContext, PagePrompt, Prompt, GuidanceSet, PageGuidanceSet, DocumentEmbedding,
|
89
|
+
DocumentExternalData,
|
89
90
|
)
|
90
91
|
|
91
92
|
logger = logging.getLogger()
|
@@ -2081,6 +2082,38 @@ class ProjectDocumentStoresEndpoint(ProjectResourceEndpoint):
|
|
2081
2082
|
return DocumentStoreEndpoint
|
2082
2083
|
|
2083
2084
|
|
2085
|
+
class ProjectDashboardsEndpoint(ProjectResourceEndpoint):
|
2086
|
+
"""Represents a project dashboards endpoint.
|
2087
|
+
|
2088
|
+
This class is used to represent a project document stores endpoint in the system.
|
2089
|
+
"""
|
2090
|
+
|
2091
|
+
"""Represents a project document stores endpoint"""
|
2092
|
+
|
2093
|
+
def get_type(self) -> str:
|
2094
|
+
"""Get the type of the endpoint.
|
2095
|
+
|
2096
|
+
This method is used to get the type of the endpoint.
|
2097
|
+
|
2098
|
+
Returns:
|
2099
|
+
str: The type of the endpoint.
|
2100
|
+
"""
|
2101
|
+
return "dashboards"
|
2102
|
+
|
2103
|
+
def get_instance_class(self, object_dict=None):
|
2104
|
+
"""Get the instance class of the project document stores endpoint.
|
2105
|
+
|
2106
|
+
This method is used to get the instance class of the project document stores endpoint.
|
2107
|
+
|
2108
|
+
Args:
|
2109
|
+
object_dict (dict, optional): The object dictionary. Defaults to None.
|
2110
|
+
|
2111
|
+
Returns:
|
2112
|
+
DocumentStoreEndpoint: The instance class of the project document stores endpoint.
|
2113
|
+
"""
|
2114
|
+
return DashboardEndpoint
|
2115
|
+
|
2116
|
+
|
2084
2117
|
class GuidanceSetEndpoint(ComponentInstanceEndpoint, GuidanceSet):
|
2085
2118
|
|
2086
2119
|
def get_type(self) -> str:
|
@@ -2133,6 +2166,38 @@ class PagePromptEndpoint(PagePrompt, PageEndpoint):
|
|
2133
2166
|
pass
|
2134
2167
|
|
2135
2168
|
|
2169
|
+
class ProjectDataFormsEndpoint(ProjectResourceEndpoint):
|
2170
|
+
"""Represents a project data forms endpoint.
|
2171
|
+
|
2172
|
+
This class is used to represent a project taxonomies endpoint in the system.
|
2173
|
+
"""
|
2174
|
+
|
2175
|
+
"""Represents a project taxonomies endpoint"""
|
2176
|
+
|
2177
|
+
def get_type(self) -> str:
|
2178
|
+
"""Get the type of the endpoint.
|
2179
|
+
|
2180
|
+
This method is used to get the type of the endpoint.
|
2181
|
+
|
2182
|
+
Returns:
|
2183
|
+
str: The type of the endpoint.
|
2184
|
+
"""
|
2185
|
+
return "dataForms"
|
2186
|
+
|
2187
|
+
def get_instance_class(self, object_dict=None):
|
2188
|
+
"""Get the instance class of the project data form endpoint.
|
2189
|
+
|
2190
|
+
This method is used to get the instance class of the project dataform endpoint.
|
2191
|
+
|
2192
|
+
Args:
|
2193
|
+
object_dict (dict, optional): The object dictionary. Defaults to None.
|
2194
|
+
|
2195
|
+
Returns:
|
2196
|
+
TaxonomyEndpoint: The instance class of the project taxonomies endpoint.
|
2197
|
+
"""
|
2198
|
+
return DataFormEndpoint
|
2199
|
+
|
2200
|
+
|
2136
2201
|
class ProjectTaxonomiesEndpoint(ProjectResourceEndpoint):
|
2137
2202
|
"""Represents a project taxonomies endpoint.
|
2138
2203
|
|
@@ -2171,7 +2236,7 @@ class ProjectGuidanceSetsEndpoint(ProjectResourceEndpoint):
|
|
2171
2236
|
return "guidance"
|
2172
2237
|
|
2173
2238
|
def get_instance_class(self, object_dict=None):
|
2174
|
-
return
|
2239
|
+
return GuidanceSetEndpoint
|
2175
2240
|
|
2176
2241
|
|
2177
2242
|
class ProjectDataFormEndpoint(ProjectResourceEndpoint):
|
@@ -2473,7 +2538,7 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2473
2538
|
stores: List["StoreEndpoint"] = None,
|
2474
2539
|
taxonomies: List["TaxonomyEndpoint"] = None,
|
2475
2540
|
data_forms: List["DataFormEndpoint"] = None,
|
2476
|
-
guidance: List["
|
2541
|
+
guidance: List["GuidanceSetEndpoint"] = None,
|
2477
2542
|
dashboards: List["DashboardEndpoint"] = None,
|
2478
2543
|
):
|
2479
2544
|
"""Update the resources of the project.
|
@@ -2517,6 +2582,15 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2517
2582
|
body=json.loads(project_resources_update.json(by_alias=True)),
|
2518
2583
|
)
|
2519
2584
|
|
2585
|
+
@property
|
2586
|
+
def dashboards(self) -> ProjectDashboardsEndpoint:
|
2587
|
+
"""Get the document stores endpoint of the project.
|
2588
|
+
|
2589
|
+
Returns:
|
2590
|
+
ProjectDocumentStoresEndpoint: The document stores endpoint of the project.
|
2591
|
+
"""
|
2592
|
+
return ProjectDashboardsEndpoint().set_client(self.client).set_project(self)
|
2593
|
+
|
2520
2594
|
@property
|
2521
2595
|
def document_stores(self) -> ProjectDocumentStoresEndpoint:
|
2522
2596
|
"""Get the document stores endpoint of the project.
|
@@ -2554,13 +2628,22 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2554
2628
|
return ProjectTaxonomiesEndpoint().set_client(self.client).set_project(self)
|
2555
2629
|
|
2556
2630
|
@property
|
2557
|
-
def guidance(self) -> "
|
2631
|
+
def guidance(self) -> "ProjectGuidanceSetsEndpoint":
|
2558
2632
|
"""Get the guidance sets endpoint of the project.
|
2559
2633
|
|
2560
2634
|
Returns:
|
2561
2635
|
GuidanceSetsEndpoint: The guidance sets endpoint of the project.
|
2562
2636
|
"""
|
2563
|
-
return
|
2637
|
+
return ProjectGuidanceSetsEndpoint().set_client(self.client).set_project(self)
|
2638
|
+
|
2639
|
+
@property
|
2640
|
+
def data_forms(self) -> "ProjectDataFormsEndpoint":
|
2641
|
+
"""Get the guidance sets endpoint of the project.
|
2642
|
+
|
2643
|
+
Returns:
|
2644
|
+
GuidanceSetsEndpoint: The guidance sets endpoint of the project.
|
2645
|
+
"""
|
2646
|
+
return ProjectDataFormsEndpoint().set_client(self.client).set_project(self)
|
2564
2647
|
|
2565
2648
|
@property
|
2566
2649
|
def assistants(self) -> ProjectAssistantsEndpoint:
|
@@ -2596,7 +2679,6 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2596
2679
|
return [ProjectTag.model_validate(tag) for tag in response.json()]
|
2597
2680
|
|
2598
2681
|
|
2599
|
-
|
2600
2682
|
class MessagesEndpoint(EntitiesEndpoint):
|
2601
2683
|
"""Represents a message endpoint"""
|
2602
2684
|
|
@@ -4375,6 +4457,28 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
4375
4457
|
response = self.client.get(url)
|
4376
4458
|
process_response(response)
|
4377
4459
|
|
4460
|
+
def get_external_data(self) -> DocumentExternalData:
|
4461
|
+
"""
|
4462
|
+
Get the external data of the document family.
|
4463
|
+
|
4464
|
+
Returns:
|
4465
|
+
DocumentExternalData: The external data of the document family.
|
4466
|
+
"""
|
4467
|
+
url = f"/api/documentFamilies/{self.id}/externalData"
|
4468
|
+
response = self.client.get(url)
|
4469
|
+
return DocumentExternalData.model_validate(response.json())
|
4470
|
+
|
4471
|
+
def update_external_data(self, external_data: DocumentExternalData):
|
4472
|
+
"""
|
4473
|
+
Update the external data of the document family.
|
4474
|
+
|
4475
|
+
Args:
|
4476
|
+
external_data (DocumentExternalData): The external data to update.
|
4477
|
+
"""
|
4478
|
+
url = f"/api/documentFamilies/{self.id}/externalData"
|
4479
|
+
response = self.client.put(url, body=external_data.model_dump(mode="json", by_alias=True))
|
4480
|
+
process_response(response)
|
4481
|
+
|
4378
4482
|
def export(self) -> bytes:
|
4379
4483
|
"""
|
4380
4484
|
Export the document family as bytes.
|
@@ -5351,19 +5455,21 @@ class DocumentStoreEndpoint(StoreEndpoint):
|
|
5351
5455
|
document_family_response.json()
|
5352
5456
|
).set_client(self.client)
|
5353
5457
|
|
5354
|
-
def stream_query(self, query: str = "*", sort=None):
|
5458
|
+
def stream_query(self, query: str = "*", sort=None, limit=None):
|
5355
5459
|
"""
|
5356
5460
|
Stream the query for the document family.
|
5357
5461
|
|
5358
5462
|
Args:
|
5359
5463
|
query (str, optional): The query to run. Defaults to "*".
|
5360
5464
|
sort (str, optional): Sorting order of the query. Defaults to None.
|
5465
|
+
limit (int, optional): The maximum number of items to return. Defaults to None.
|
5361
5466
|
|
5362
5467
|
Returns:
|
5363
5468
|
generator: A generator of the document families.
|
5364
5469
|
"""
|
5365
5470
|
page_size = 5
|
5366
5471
|
page = 1
|
5472
|
+
number_of_items = 0
|
5367
5473
|
|
5368
5474
|
if not sort:
|
5369
5475
|
sort = "id"
|
@@ -5375,7 +5481,12 @@ class DocumentStoreEndpoint(StoreEndpoint):
|
|
5375
5481
|
if not page_response.content:
|
5376
5482
|
break
|
5377
5483
|
for document_family in page_response.content:
|
5484
|
+
number_of_items += 1
|
5485
|
+
if limit and number_of_items > limit:
|
5486
|
+
break
|
5487
|
+
|
5378
5488
|
yield document_family
|
5489
|
+
|
5379
5490
|
page += 1
|
5380
5491
|
|
5381
5492
|
def query(
|
@@ -6813,6 +6924,7 @@ class KodexaClient:
|
|
6813
6924
|
|
6814
6925
|
from kodexa.model.entities.product import ProductEndpoint
|
6815
6926
|
from kodexa.model.entities.product_subscription import ProductSubscriptionEndpoint
|
6927
|
+
from kodexa.model.entities.check_response import CheckResponseEndpoint
|
6816
6928
|
known_components = {
|
6817
6929
|
"taxonomy": TaxonomyEndpoint,
|
6818
6930
|
"pipeline": PipelineEndpoint,
|
@@ -6838,6 +6950,7 @@ class KodexaClient:
|
|
6838
6950
|
"channel": ChannelEndpoint,
|
6839
6951
|
"product": ProductEndpoint,
|
6840
6952
|
"productSubscription": ProductSubscriptionEndpoint,
|
6953
|
+
"checkResponse": CheckResponseEndpoint
|
6841
6954
|
}
|
6842
6955
|
|
6843
6956
|
if component_type in known_components:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.0.
|
3
|
+
version = "7.0.1a9971685034"
|
4
4
|
description = "Python SDK for the Kodexa Platform"
|
5
5
|
authors = ["Austin Redenbaugh <austin@kodexa.com>", "Philip Dodds <philip@kodexa.com>", "Romar Cablao <rcablao@kodexa.com>", "Amadea Paula Dodds <amadeapaula@kodexa.com>"]
|
6
6
|
readme = "README.md"
|
@@ -35,6 +35,7 @@ semver = "^3.0.1"
|
|
35
35
|
chevron = "^0.14.0"
|
36
36
|
addict = "^2.4.0"
|
37
37
|
simpleeval = "^0.9.13"
|
38
|
+
certifi = "^2024.7.4"
|
38
39
|
|
39
40
|
[tool.poetry.group.dev.dependencies]
|
40
41
|
mkdocs-material = "^9.0.3"
|
@@ -43,7 +44,7 @@ pytest-runner = "^6.0.0"
|
|
43
44
|
mypy = "^1.10.0"
|
44
45
|
flake8 = "^7.0.0"
|
45
46
|
pandas = "2.2.2"
|
46
|
-
setuptools = "^
|
47
|
+
setuptools = "^70"
|
47
48
|
black = ">=23.7,<25.0"
|
48
49
|
mkdocstrings = "^0.22.0"
|
49
50
|
mkdocstrings-python = "^1.5.1"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.0.1a9196805101 → kodexa-7.0.1a9971685034}/kodexa/model/entities/product_subscription.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|