kodexa 6.0.193__py3-none-any.whl → 6.0.195__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.
- kodexa/model/objects.py +45 -0
- kodexa/platform/client.py +59 -2
- {kodexa-6.0.193.dist-info → kodexa-6.0.195.dist-info}/METADATA +1 -1
- {kodexa-6.0.193.dist-info → kodexa-6.0.195.dist-info}/RECORD +6 -6
- {kodexa-6.0.193.dist-info → kodexa-6.0.195.dist-info}/LICENSE +0 -0
- {kodexa-6.0.193.dist-info → kodexa-6.0.195.dist-info}/WHEEL +0 -0
kodexa/model/objects.py
CHANGED
@@ -1649,6 +1649,38 @@ class FeatureSet(KodexaBaseModel):
|
|
1649
1649
|
node_features: Optional[List[NodeFeatures]] = Field(None, alias='nodeFeatures')
|
1650
1650
|
|
1651
1651
|
|
1652
|
+
class DocumentViewState(KodexaBaseModel):
|
1653
|
+
id: Optional[str] = Field(None, description='The ID of the document view')
|
1654
|
+
index: Optional[int] = None
|
1655
|
+
document_family_id: Optional[str] = Field(None, alias='documentFamilyId')
|
1656
|
+
properties: Optional[Dict[str, Any]] = None
|
1657
|
+
|
1658
|
+
|
1659
|
+
class DataFormState(KodexaBaseModel):
|
1660
|
+
id: Optional[str] = Field(None, description='The ID of the document view')
|
1661
|
+
index: Optional[int] = None
|
1662
|
+
properties: Optional[Dict[str, Any]] = None
|
1663
|
+
|
1664
|
+
data_form_ref: Optional[str] = Field(None, alias='dataFormRef')
|
1665
|
+
document_family_ids: Optional[List[str]] = Field(None, alias='documentFamilyIds')
|
1666
|
+
data_object_ids: Optional[List[str]] = Field(None, alias='dataObjectIds')
|
1667
|
+
|
1668
|
+
|
1669
|
+
class WorkspaceStorage(KodexaBaseModel):
|
1670
|
+
document_view_states: Optional[List[DocumentViewState]] = Field(None, alias='documentViewStates')
|
1671
|
+
data_form_states: Optional[List[DataFormState]] = Field(None, alias='dataFormStates')
|
1672
|
+
|
1673
|
+
|
1674
|
+
class Workspace(KodexaBaseModel):
|
1675
|
+
id: Optional[str] = Field(None, description='The ID of the workspace')
|
1676
|
+
uuid: Optional[str] = None
|
1677
|
+
created_on: Optional[datetime] = Field(None, alias='createdOn')
|
1678
|
+
updated_on: Optional[datetime] = Field(None, alias='updatedOn')
|
1679
|
+
project: Optional[Project] = None
|
1680
|
+
name: Optional[str] = None
|
1681
|
+
description: Optional[str] = None
|
1682
|
+
|
1683
|
+
|
1652
1684
|
class DataAttribute(KodexaBaseModel):
|
1653
1685
|
id: Optional[str] = Field(None, description='The ID of the object')
|
1654
1686
|
uuid: Optional[str] = None
|
@@ -1835,6 +1867,19 @@ class PageProject(KodexaBaseModel):
|
|
1835
1867
|
empty: Optional[bool] = None
|
1836
1868
|
|
1837
1869
|
|
1870
|
+
class PageWorkspace(KodexaBaseModel):
|
1871
|
+
total_pages: Optional[int] = Field(None, alias='totalPages')
|
1872
|
+
total_elements: Optional[int] = Field(None, alias='totalElements')
|
1873
|
+
size: Optional[int] = None
|
1874
|
+
content: Optional[List[Workspace]] = None
|
1875
|
+
number: Optional[int] = None
|
1876
|
+
pageable: Optional[PageableObject] = None
|
1877
|
+
number_of_elements: Optional[int] = Field(None, alias='numberOfElements')
|
1878
|
+
first: Optional[bool] = None
|
1879
|
+
last: Optional[bool] = None
|
1880
|
+
empty: Optional[bool] = None
|
1881
|
+
|
1882
|
+
|
1838
1883
|
class PageOrganization(KodexaBaseModel):
|
1839
1884
|
total_pages: Optional[int] = Field(None, alias='totalPages')
|
1840
1885
|
total_elements: Optional[int] = Field(None, alias='totalElements')
|
kodexa/platform/client.py
CHANGED
@@ -32,7 +32,7 @@ from kodexa.model.objects import PageStore, PageTaxonomy, PageProject, PageOrgan
|
|
32
32
|
PageDataObject, Assistant, ProjectTemplate, PageExtensionPack, DeploymentOptions, PageMembership, Membership, \
|
33
33
|
PageDocumentFamily, ProjectResourcesUpdate, DataAttribute, PageNote, PageDataForm, DataForm, Store, PageExecution, \
|
34
34
|
Dashboard, PageAction, PagePipeline, DocumentStatus, ModelTraining, PageModelTraining, ContentException, Option, \
|
35
|
-
CustomEvent, ProjectTag, PageDataException, DataException, ReprocessRequest
|
35
|
+
CustomEvent, ProjectTag, PageDataException, DataException, ReprocessRequest, PageWorkspace, Workspace
|
36
36
|
|
37
37
|
logger = logging.getLogger()
|
38
38
|
|
@@ -587,6 +587,14 @@ class PageProjectEndpoint(PageProject, PageEndpoint):
|
|
587
587
|
return "project"
|
588
588
|
|
589
589
|
|
590
|
+
class PageWorkspaceEndpoint(PageWorkspace, PageEndpoint):
|
591
|
+
"""Represents a page workspace endpoints"""
|
592
|
+
|
593
|
+
def get_type(self) -> Optional[str]:
|
594
|
+
"""Get the type of the endpoint"""
|
595
|
+
return "workspace"
|
596
|
+
|
597
|
+
|
590
598
|
class PageProjectTemplateEndpoint(PageProjectTemplate, PageEndpoint):
|
591
599
|
pass
|
592
600
|
|
@@ -929,6 +937,30 @@ class ProjectModelStoresEndpoint(ProjectResourceEndpoint):
|
|
929
937
|
return ModelStoreEndpoint
|
930
938
|
|
931
939
|
|
940
|
+
class WorkspaceEndpoint(EntityEndpoint, Workspace):
|
941
|
+
"""Represents a workspace endpoint"""
|
942
|
+
|
943
|
+
def get_type(self) -> str:
|
944
|
+
"""Get the type of the endpoint"""
|
945
|
+
return "workspaces"
|
946
|
+
|
947
|
+
def add_document_family(self, document_family: DocumentFamily):
|
948
|
+
url = f"/api/workspaces/{self.id}/documentFamilies"
|
949
|
+
response = self.client.post(url, body=document_family.to_dict())
|
950
|
+
process_response(response)
|
951
|
+
|
952
|
+
def remove_document_family(self, document_family: DocumentFamily):
|
953
|
+
url = f"/api/workspaces/{self.id}/documentFamilies/{document_family.id}"
|
954
|
+
response = self.client.delete(url)
|
955
|
+
process_response(response)
|
956
|
+
|
957
|
+
def list_document_families(self, page_size=10, page=1) -> PageDocumentFamilyEndpoint:
|
958
|
+
url = f"/api/workspaces/{self.id}/documentFamilies"
|
959
|
+
response = self.client.get(url, {"pageSize": page_size, "page": page})
|
960
|
+
process_response(response)
|
961
|
+
return PageDocumentFamilyEndpoint.parse_obj(response.json()).set_client(self.client)
|
962
|
+
|
963
|
+
|
932
964
|
class ProjectEndpoint(EntityEndpoint, Project):
|
933
965
|
"""Represents a project endpoint"""
|
934
966
|
|
@@ -990,6 +1022,22 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
990
1022
|
return [ProjectTag.parse_obj(tag) for tag in response.json()]
|
991
1023
|
|
992
1024
|
|
1025
|
+
class WorkspacesEndpoint(EntitiesEndpoint):
|
1026
|
+
"""Represents a workspaces endpoint"""
|
1027
|
+
|
1028
|
+
def get_type(self) -> str:
|
1029
|
+
"""Get the type of the endpoint"""
|
1030
|
+
return f"workspaces"
|
1031
|
+
|
1032
|
+
def get_instance_class(self, object_dict=None) -> Type[BaseModel]:
|
1033
|
+
"""Get the instance class of the endpoint"""
|
1034
|
+
return WorkspaceEndpoint
|
1035
|
+
|
1036
|
+
def get_page_class(self, object_dict=None) -> Type[BaseModel]:
|
1037
|
+
"""Get the page class of the endpoint"""
|
1038
|
+
return PageWorkspaceEndpoint
|
1039
|
+
|
1040
|
+
|
993
1041
|
class ProjectsEndpoint(EntitiesEndpoint):
|
994
1042
|
"""Represents a projects endpoint"""
|
995
1043
|
|
@@ -2418,6 +2466,13 @@ OBJECT_TYPES = {
|
|
2418
2466
|
"endpoint": ProjectsEndpoint,
|
2419
2467
|
"global": True
|
2420
2468
|
},
|
2469
|
+
"workspaces": {
|
2470
|
+
"name": "workspace",
|
2471
|
+
"plural": "workspaces",
|
2472
|
+
"type": WorkspaceEndpoint,
|
2473
|
+
"endpoint": WorkspacesEndpoint,
|
2474
|
+
"global": True
|
2475
|
+
},
|
2421
2476
|
"projectTemplates": {
|
2422
2477
|
"name": "projectTemplate",
|
2423
2478
|
"plural": "projectTemplates",
|
@@ -2511,6 +2566,7 @@ class KodexaClient:
|
|
2511
2566
|
self.access_token = access_token if access_token is not None else KodexaPlatform.get_access_token()
|
2512
2567
|
self.organizations = OrganizationsEndpoint(self)
|
2513
2568
|
self.projects = ProjectsEndpoint(self)
|
2569
|
+
self.workspaces = WorkspacesEndpoint(self)
|
2514
2570
|
self.users = UsersEndpoint(self)
|
2515
2571
|
self.memberships = MembershipsEndpoint(self)
|
2516
2572
|
self.executions = ExecutionsEndpoint(self)
|
@@ -2778,7 +2834,8 @@ class KodexaClient:
|
|
2778
2834
|
"dashboard": DashboardEndpoint,
|
2779
2835
|
"execution": ExecutionEndpoint,
|
2780
2836
|
"assistant": AssistantDefinitionEndpoint,
|
2781
|
-
"exception": DataExceptionEndpoint
|
2837
|
+
"exception": DataExceptionEndpoint,
|
2838
|
+
"workspace": WorkspaceEndpoint,
|
2782
2839
|
}
|
2783
2840
|
|
2784
2841
|
if component_type in known_components:
|
@@ -6,12 +6,12 @@ kodexa/connectors/connectors.py,sha256=25-TffyGDjxHyp9ITug0qgr1nhqMAekmV5NVvbPGs
|
|
6
6
|
kodexa/model/__init__.py,sha256=DyCgkJU7rOfd4SMvPRLaPdklCNlkqCRRWiVPwjYn2GE,720
|
7
7
|
kodexa/model/base.py,sha256=6IraEK3RomjPgFpPYkxjuLUriF958AusgJO21Dcopeg,753
|
8
8
|
kodexa/model/model.py,sha256=A9v5CRLe-Y28tj0C-oe8L1Gvu3m6bYfPvQQK89tCFzw,88524
|
9
|
-
kodexa/model/objects.py,sha256=
|
9
|
+
kodexa/model/objects.py,sha256=jnFIsHUH2GVISwF3zjjekxK8FbXkGVfhRxLl1PU0-P8,115962
|
10
10
|
kodexa/model/persistence.py,sha256=rRBY_onLcSTFlZZmitU8_FLffP7elDHhcmF8yYT94HE,37655
|
11
11
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
12
12
|
kodexa/pipeline/pipeline.py,sha256=uzxe7HuSW1CKDZOrnV_LRHj3SHhbs14lvmMGJ_DIVdw,19763
|
13
13
|
kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
|
14
|
-
kodexa/platform/client.py,sha256=
|
14
|
+
kodexa/platform/client.py,sha256=FQmxDxrS0wobQ1hLQjS9tCzXbwFftOS0SRvVpA132wA,108476
|
15
15
|
kodexa/platform/kodexa.py,sha256=HcwQh1NKkwSzkngKLp_kEsLW0N_JlzORszoknSDFLT0,27604
|
16
16
|
kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
|
17
17
|
kodexa/selectors/ast.py,sha256=mTAcX_pjDiDy99ELxbMMwAAkzezOqz5uCyui9qz7Q4A,13499
|
@@ -34,7 +34,7 @@ kodexa/testing/test_components.py,sha256=i_9M6-bfUBdR1uYAzZZzWiW0M1DGKzE5mkNuHq4
|
|
34
34
|
kodexa/testing/test_utils.py,sha256=HXM3S5FDzarzS6R7jkOHps6d6Ox2UtNqymoK6VCw8Zg,13596
|
35
35
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
36
36
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
-
kodexa-6.0.
|
38
|
-
kodexa-6.0.
|
39
|
-
kodexa-6.0.
|
40
|
-
kodexa-6.0.
|
37
|
+
kodexa-6.0.195.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
38
|
+
kodexa-6.0.195.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
39
|
+
kodexa-6.0.195.dist-info/METADATA,sha256=THs9Jglsjh0wKYTL1q1SRIxKzGLCRfB31pYz6KIKMUQ,3602
|
40
|
+
kodexa-6.0.195.dist-info/RECORD,,
|
File without changes
|
File without changes
|