kodexa 7.0.8172328526__py3-none-any.whl → 7.0.8187361589__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/platform/client.py +63 -9
- {kodexa-7.0.8172328526.dist-info → kodexa-7.0.8187361589.dist-info}/METADATA +1 -1
- {kodexa-7.0.8172328526.dist-info → kodexa-7.0.8187361589.dist-info}/RECORD +5 -5
- {kodexa-7.0.8172328526.dist-info → kodexa-7.0.8187361589.dist-info}/LICENSE +0 -0
- {kodexa-7.0.8172328526.dist-info → kodexa-7.0.8187361589.dist-info}/WHEEL +0 -0
kodexa/platform/client.py
CHANGED
@@ -491,9 +491,9 @@ class ComponentEndpoint(ClientEndpoint, OrganizationOwned):
|
|
491
491
|
# Yield each endpoint in the current page
|
492
492
|
for endpoint in (
|
493
493
|
self.get_page_class(list_response.json())
|
494
|
-
|
495
|
-
|
496
|
-
|
494
|
+
.model_validate(list_response.json())
|
495
|
+
.set_client(self.client)
|
496
|
+
.to_endpoints()
|
497
497
|
):
|
498
498
|
yield endpoint
|
499
499
|
|
@@ -2073,6 +2073,33 @@ class ProjectTaxonomiesEndpoint(ProjectResourceEndpoint):
|
|
2073
2073
|
return TaxonomyEndpoint
|
2074
2074
|
|
2075
2075
|
|
2076
|
+
class ProjectGuidanceEndpoint(ProjectResourceEndpoint):
|
2077
|
+
|
2078
|
+
def get_type(self) -> str:
|
2079
|
+
return "guidance"
|
2080
|
+
|
2081
|
+
def get_instance_class(self, object_dict=None):
|
2082
|
+
return GuidanceEndpoint
|
2083
|
+
|
2084
|
+
|
2085
|
+
class ProjectDataFormEndpoint(ProjectResourceEndpoint):
|
2086
|
+
|
2087
|
+
def get_type(self) -> str:
|
2088
|
+
return "dataForms"
|
2089
|
+
|
2090
|
+
def get_instance_class(self, object_dict=None):
|
2091
|
+
return DataFormEndpoint
|
2092
|
+
|
2093
|
+
|
2094
|
+
class ProjectDashboardEndpoint(ProjectResourceEndpoint):
|
2095
|
+
|
2096
|
+
def get_type(self) -> str:
|
2097
|
+
return "dashboards"
|
2098
|
+
|
2099
|
+
def get_instance_class(self, object_dict=None):
|
2100
|
+
return DashboardEndpoint
|
2101
|
+
|
2102
|
+
|
2076
2103
|
class ProjectStoresEndpoint(ProjectResourceEndpoint):
|
2077
2104
|
"""Represents a project stores endpoint"""
|
2078
2105
|
|
@@ -2353,12 +2380,18 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2353
2380
|
self,
|
2354
2381
|
stores: List["StoreEndpoint"] = None,
|
2355
2382
|
taxonomies: List["TaxonomyEndpoint"] = None,
|
2383
|
+
data_forms: List["DataFormEndpoint"] = None,
|
2384
|
+
guidance: List["GuidanceSetEndpoint"] = None,
|
2385
|
+
dashboards: List["DashboardEndpoint"] = None,
|
2356
2386
|
) -> "ProjectEndpoint":
|
2357
2387
|
"""Update the resources of the project.
|
2358
2388
|
|
2359
2389
|
Args:
|
2360
2390
|
stores (List["StoreEndpoint"], optional): List of store endpoints to update.
|
2361
2391
|
taxonomies (List["TaxonomyEndpoint"], optional): List of taxonomy endpoints to update.
|
2392
|
+
data_forms (List["DataFormEndpoint"], optional): List of data form endpoints to update.
|
2393
|
+
guidance (List["GuidanceSetEndpoint"], optional): List of guidance set endpoints to update.
|
2394
|
+
dashboards (List["DashboardEndpoint"], optional): List of dashboard endpoints to update.
|
2362
2395
|
|
2363
2396
|
Returns:
|
2364
2397
|
ProjectEndpoint: The updated project endpoint.
|
@@ -2367,6 +2400,8 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2367
2400
|
project_resources_update.store_refs = []
|
2368
2401
|
project_resources_update.taxonomy_refs = []
|
2369
2402
|
project_resources_update.dashboard_refs = []
|
2403
|
+
project_resources_update.data_form_refs = []
|
2404
|
+
project_resources_update.guidance_set_refs = []
|
2370
2405
|
|
2371
2406
|
if stores:
|
2372
2407
|
project_resources_update.store_refs = [store.ref for store in stores]
|
@@ -2375,8 +2410,20 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2375
2410
|
project_resources_update.taxonomy_refs = [
|
2376
2411
|
taxonomy.ref for taxonomy in taxonomies
|
2377
2412
|
]
|
2413
|
+
if data_forms:
|
2414
|
+
project_resources_update.data_form_refs = [
|
2415
|
+
data_form.ref for data_form in data_forms
|
2416
|
+
]
|
2417
|
+
if guidance:
|
2418
|
+
project_resources_update.guidance_set_refs = [
|
2419
|
+
guidance.ref for guidance in guidance
|
2420
|
+
]
|
2421
|
+
if dashboards:
|
2422
|
+
project_resources_update.dashboard_refs = [
|
2423
|
+
dashboard.ref for dashboard in dashboards
|
2424
|
+
]
|
2378
2425
|
|
2379
|
-
self.client.put(
|
2426
|
+
response = self.client.put(
|
2380
2427
|
f"/api/projects/{self.id}/resources",
|
2381
2428
|
body=json.loads(project_resources_update.json(by_alias=True)),
|
2382
2429
|
)
|
@@ -2417,6 +2464,16 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2417
2464
|
"""
|
2418
2465
|
return ProjectTaxonomiesEndpoint().set_client(self.client).set_project(self)
|
2419
2466
|
|
2467
|
+
@property
|
2468
|
+
def guidance(self) -> "GuidanceEndpoint":
|
2469
|
+
"""Get the guidance sets endpoint of the project.
|
2470
|
+
|
2471
|
+
Returns:
|
2472
|
+
GuidanceSetsEndpoint: The guidance sets endpoint of the project.
|
2473
|
+
"""
|
2474
|
+
return ProjectGuidanceEndpoint().set_client(self.client).set_project(self)
|
2475
|
+
|
2476
|
+
@property
|
2420
2477
|
@property
|
2421
2478
|
def assistants(self) -> ProjectAssistantsEndpoint:
|
2422
2479
|
"""Get the assistants endpoint of the project.
|
@@ -2842,6 +2899,7 @@ class GuidanceEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
|
|
2842
2899
|
It provides methods to get the type, page class, and instance class of the endpoint,
|
2843
2900
|
as well as to deploy an extension pack from a URL.
|
2844
2901
|
"""
|
2902
|
+
|
2845
2903
|
def get_type(self) -> str:
|
2846
2904
|
"""
|
2847
2905
|
Get the type of the endpoint.
|
@@ -2884,6 +2942,7 @@ class PromptsEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
|
|
2884
2942
|
It provides methods to get the type, page class, and instance class of the endpoint,
|
2885
2943
|
as well as to deploy an extension pack from a URL.
|
2886
2944
|
"""
|
2945
|
+
|
2887
2946
|
def get_type(self) -> str:
|
2888
2947
|
"""
|
2889
2948
|
Get the type of the endpoint.
|
@@ -5791,11 +5850,6 @@ def process_response(response) -> requests.Response:
|
|
5791
5850
|
|
5792
5851
|
return response
|
5793
5852
|
|
5794
|
-
#
|
5795
|
-
# The Kodexa Client is the way that brings everything together
|
5796
|
-
#
|
5797
|
-
#
|
5798
|
-
|
5799
5853
|
|
5800
5854
|
OBJECT_TYPES = {
|
5801
5855
|
"extensionPacks": {
|
@@ -11,7 +11,7 @@ kodexa/model/persistence.py,sha256=hhUnDUr4wc2bSN4V3sKug8ZIxSUl-pNc2OUQLnB71NA,6
|
|
11
11
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
12
12
|
kodexa/pipeline/pipeline.py,sha256=cIRFOoJkguIYgNzx6FYrODdBpcY25CM_SULsqSsHeXE,24323
|
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=ah_QRHgofoPfVe5tmY8bokKIUiZn_RoeH-hrWDaAz64,212796
|
15
15
|
kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
|
16
16
|
kodexa/platform/kodexa.py,sha256=Xfk6mL3ZpXqYe_cjnTfEik33EEZcaxM2J6i_T2W07Yk,33175
|
17
17
|
kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
|
@@ -35,7 +35,7 @@ kodexa/testing/test_components.py,sha256=g5lP-GY0nTHuH5cIEw45vIejEeBaWkPKQGHL36j
|
|
35
35
|
kodexa/testing/test_utils.py,sha256=DrLCkHxdb6AbZ-X3WmTMbQmnVIm55VEBL8MjtUK9POs,14021
|
36
36
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
37
37
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
|
-
kodexa-7.0.
|
39
|
-
kodexa-7.0.
|
40
|
-
kodexa-7.0.
|
41
|
-
kodexa-7.0.
|
38
|
+
kodexa-7.0.8187361589.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
39
|
+
kodexa-7.0.8187361589.dist-info/METADATA,sha256=sM3swt1mUJWAPZdwRftY3sjc4glWCNDdQEErcVSIZXo,3448
|
40
|
+
kodexa-7.0.8187361589.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
41
|
+
kodexa-7.0.8187361589.dist-info/RECORD,,
|
File without changes
|
File without changes
|