kodexa 7.0.9017589911__py3-none-any.whl → 7.0.9018094045__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 +44 -8
- {kodexa-7.0.9017589911.dist-info → kodexa-7.0.9018094045.dist-info}/METADATA +1 -1
- {kodexa-7.0.9017589911.dist-info → kodexa-7.0.9018094045.dist-info}/RECORD +5 -5
- {kodexa-7.0.9017589911.dist-info → kodexa-7.0.9018094045.dist-info}/LICENSE +0 -0
- {kodexa-7.0.9017589911.dist-info → kodexa-7.0.9018094045.dist-info}/WHEEL +0 -0
kodexa/platform/client.py
CHANGED
@@ -2461,7 +2461,7 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2461
2461
|
data_forms: List["DataFormEndpoint"] = None,
|
2462
2462
|
guidance: List["GuidanceSetEndpoint"] = None,
|
2463
2463
|
dashboards: List["DashboardEndpoint"] = None,
|
2464
|
-
)
|
2464
|
+
):
|
2465
2465
|
"""Update the resources of the project.
|
2466
2466
|
|
2467
2467
|
Args:
|
@@ -2470,9 +2470,6 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2470
2470
|
data_forms (List["DataFormEndpoint"], optional): List of data form endpoints to update.
|
2471
2471
|
guidance (List["GuidanceSetEndpoint"], optional): List of guidance set endpoints to update.
|
2472
2472
|
dashboards (List["DashboardEndpoint"], optional): List of dashboard endpoints to update.
|
2473
|
-
|
2474
|
-
Returns:
|
2475
|
-
ProjectEndpoint: The updated project endpoint.
|
2476
2473
|
"""
|
2477
2474
|
project_resources_update = ProjectResourcesUpdate()
|
2478
2475
|
project_resources_update.store_refs = []
|
@@ -2501,7 +2498,7 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2501
2498
|
dashboard.ref for dashboard in dashboards
|
2502
2499
|
]
|
2503
2500
|
|
2504
|
-
|
2501
|
+
self.client.put(
|
2505
2502
|
f"/api/projects/{self.id}/resources",
|
2506
2503
|
body=json.loads(project_resources_update.json(by_alias=True)),
|
2507
2504
|
)
|
@@ -2585,6 +2582,43 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2585
2582
|
return [ProjectTag.model_validate(tag) for tag in response.json()]
|
2586
2583
|
|
2587
2584
|
|
2585
|
+
class GuidanceSetsEndpoint(EntitiesEndpoint):
|
2586
|
+
"""Represents a message endpoint"""
|
2587
|
+
|
2588
|
+
def get_type(self) -> str:
|
2589
|
+
"""
|
2590
|
+
Get the type of the endpoint.
|
2591
|
+
|
2592
|
+
Returns:
|
2593
|
+
str: The type of the endpoint, in this case "guidance".
|
2594
|
+
"""
|
2595
|
+
return "guidance"
|
2596
|
+
|
2597
|
+
def get_instance_class(self, object_dict=None):
|
2598
|
+
"""
|
2599
|
+
Get the instance class of the endpoint.
|
2600
|
+
|
2601
|
+
Args:
|
2602
|
+
object_dict (dict, optional): An optional dictionary object. Defaults to None.
|
2603
|
+
|
2604
|
+
Returns:
|
2605
|
+
GuidanceSetEndpoint: The instance class of the endpoint.
|
2606
|
+
"""
|
2607
|
+
return GuidanceSetEndpoint
|
2608
|
+
|
2609
|
+
def get_page_class(self, object_dict=None):
|
2610
|
+
"""
|
2611
|
+
Get the page class of the endpoint.
|
2612
|
+
|
2613
|
+
Args:
|
2614
|
+
object_dict (dict, optional): An optional dictionary object. Defaults to None.
|
2615
|
+
|
2616
|
+
Returns:
|
2617
|
+
PageGuidanceSetEndpoint: The page class of the endpoint.
|
2618
|
+
"""
|
2619
|
+
return PageGuidanceSetEndpoint
|
2620
|
+
|
2621
|
+
|
2588
2622
|
class MessagesEndpoint(EntitiesEndpoint):
|
2589
2623
|
"""Represents a message endpoint"""
|
2590
2624
|
|
@@ -2787,12 +2821,13 @@ class ProjectsEndpoint(EntitiesEndpoint):
|
|
2787
2821
|
"""
|
2788
2822
|
return PageProjectEndpoint
|
2789
2823
|
|
2790
|
-
def find_by_name(self, project_name: str) -> Optional[ProjectEndpoint]:
|
2824
|
+
def find_by_name(self, project_name: str, organization: Optional[Organization] = None) -> Optional[ProjectEndpoint]:
|
2791
2825
|
"""
|
2792
2826
|
Find a project by name.
|
2793
2827
|
|
2794
2828
|
Args:
|
2795
2829
|
project_name (str): The name of the project to find.
|
2830
|
+
organization (Organization, optional): The organization to search in. Defaults to None.
|
2796
2831
|
|
2797
2832
|
Returns:
|
2798
2833
|
Optional[ProjectEndpoint]: The project endpoint if found, None otherwise.
|
@@ -2800,8 +2835,8 @@ class ProjectsEndpoint(EntitiesEndpoint):
|
|
2800
2835
|
|
2801
2836
|
url = f"/api/{self.get_type()}"
|
2802
2837
|
filters = {"filter": [f"name: '{project_name}'"]}
|
2803
|
-
if
|
2804
|
-
filters["filter"].append(f"organization.id: '{
|
2838
|
+
if organization is not None:
|
2839
|
+
filters["filter"].append(f"organization.id: '{organization.id}'")
|
2805
2840
|
get_response = self.client.get(url, params=filters)
|
2806
2841
|
if len(get_response.json()["content"]) > 0:
|
2807
2842
|
return ProjectEndpoint.model_validate(
|
@@ -6228,6 +6263,7 @@ class KodexaClient:
|
|
6228
6263
|
self.messages = MessagesEndpoint(self)
|
6229
6264
|
from kodexa.model.entities.product import ProductsEndpoint
|
6230
6265
|
self.products = ProductsEndpoint(self)
|
6266
|
+
self.guidance_sets = GuidanceSetsEndpoint(self)
|
6231
6267
|
|
6232
6268
|
@staticmethod
|
6233
6269
|
def login(url, token):
|
@@ -14,7 +14,7 @@ kodexa/model/persistence.py,sha256=sx5FwTSsWMdAZpAs0-6PqyULHkQyNQClApUKJZ-ly8M,6
|
|
14
14
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
15
15
|
kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,25221
|
16
16
|
kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
|
17
|
-
kodexa/platform/client.py,sha256=
|
17
|
+
kodexa/platform/client.py,sha256=xWwujMJ47MSnQ9r_U__mVh1_mT0Z-5fwb0MUjc1bIQU,218158
|
18
18
|
kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
|
19
19
|
kodexa/platform/kodexa.py,sha256=Bvf6x43FWsFuAuQ4N8TvjSZq6niEtBTESmFCWVPASeQ,34024
|
20
20
|
kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
|
@@ -38,7 +38,7 @@ kodexa/testing/test_components.py,sha256=g5lP-GY0nTHuH5cIEw45vIejEeBaWkPKQGHL36j
|
|
38
38
|
kodexa/testing/test_utils.py,sha256=DrLCkHxdb6AbZ-X3WmTMbQmnVIm55VEBL8MjtUK9POs,14021
|
39
39
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
40
40
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
|
-
kodexa-7.0.
|
42
|
-
kodexa-7.0.
|
43
|
-
kodexa-7.0.
|
44
|
-
kodexa-7.0.
|
41
|
+
kodexa-7.0.9018094045.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
42
|
+
kodexa-7.0.9018094045.dist-info/METADATA,sha256=S3B6CXW_85yp8yqjrl-3caZcnJ_tH7pM44FWJH8exTI,3493
|
43
|
+
kodexa-7.0.9018094045.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
44
|
+
kodexa-7.0.9018094045.dist-info/RECORD,,
|
File without changes
|
File without changes
|