kodexa 7.0.8801100838__tar.gz → 7.0.8897197016__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.
Files changed (44) hide show
  1. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/PKG-INFO +1 -1
  2. kodexa-7.0.8897197016/kodexa/model/entities/product.py +126 -0
  3. kodexa-7.0.8897197016/kodexa/model/entities/product_subscription.py +122 -0
  4. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/model/model.py +2 -2
  5. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/model/objects.py +36 -39
  6. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/platform/client.py +80 -0
  7. kodexa-7.0.8897197016/kodexa/training/train_utils.py +0 -0
  8. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/pyproject.toml +1 -1
  9. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/LICENSE +0 -0
  10. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/README.md +0 -0
  11. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/__init__.py +0 -0
  12. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/assistant/__init__.py +0 -0
  13. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/assistant/assistant.py +0 -0
  14. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/connectors/__init__.py +0 -0
  15. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/connectors/connectors.py +0 -0
  16. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/model/__init__.py +0 -0
  17. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/model/base.py +0 -0
  18. {kodexa-7.0.8801100838/kodexa/spatial → kodexa-7.0.8897197016/kodexa/model/entities}/__init__.py +0 -0
  19. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/model/persistence.py +0 -0
  20. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/pipeline/__init__.py +0 -0
  21. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/pipeline/pipeline.py +0 -0
  22. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/platform/__init__.py +0 -0
  23. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/platform/interaction.py +0 -0
  24. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/platform/kodexa.py +0 -0
  25. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/__init__.py +0 -0
  26. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/ast.py +0 -0
  27. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/core.py +0 -0
  28. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/lexrules.py +0 -0
  29. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/lextab.py +0 -0
  30. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/lextab.pyi +0 -0
  31. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/parserules.py +0 -0
  32. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/parserules.pyi +0 -0
  33. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/parsetab.py +0 -0
  34. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/selectors/parsetab.pyi +0 -0
  35. /kodexa-7.0.8801100838/kodexa/training/train_utils.py → /kodexa-7.0.8897197016/kodexa/spatial/__init__.py +0 -0
  36. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/spatial/azure_models.py +0 -0
  37. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/spatial/bbox_common.py +0 -0
  38. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/spatial/table_form_common.py +0 -0
  39. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/steps/__init__.py +0 -0
  40. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/steps/common.py +0 -0
  41. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/testing/__init__.py +0 -0
  42. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/testing/test_components.py +0 -0
  43. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/testing/test_utils.py +0 -0
  44. {kodexa-7.0.8801100838 → kodexa-7.0.8897197016}/kodexa/training/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.8801100838
3
+ Version: 7.0.8897197016
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -0,0 +1,126 @@
1
+ from typing import Optional, List
2
+
3
+ from pydantic import BaseModel, ConfigDict, Field
4
+ from kodexa.model.base import StandardDateTime
5
+ from kodexa.platform.client import EntityEndpoint, PageEndpoint, EntitiesEndpoint
6
+
7
+
8
+ class Product(BaseModel):
9
+ """
10
+
11
+ """
12
+ model_config = ConfigDict(
13
+ populate_by_name=True,
14
+ use_enum_values=True,
15
+ arbitrary_types_allowed=True,
16
+ protected_namespaces=("model_config",),
17
+ )
18
+ """
19
+ A product
20
+ """
21
+
22
+
23
+ id: Optional[str] = None
24
+ uuid: Optional[str] = None
25
+ change_sequence: Optional[int] = Field(None, alias="changeSequence")
26
+ created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
27
+ updated_on: Optional[StandardDateTime] = Field(None, alias="updatedOn")
28
+ name: str
29
+ description: Optional[str] = None
30
+ overview_markdown: Optional[str] = Field(None, alias="overviewMarkdown")
31
+
32
+
33
+ class ProductEndpoint(Product, EntityEndpoint):
34
+ """Handles the endpoint for a product
35
+
36
+ This class is a combination of DataException and EntityEndpoint. It is used
37
+ to manage the endpoint for data exceptions.
38
+
39
+ Methods:
40
+ get_type: Returns the type of the endpoint.
41
+ """
42
+
43
+ def get_type(self) -> str:
44
+ """Gets the type of the endpoint.
45
+
46
+ This method returns the type of the endpoint which is "exceptions".
47
+
48
+ Returns:
49
+ str: The type of the endpoint.
50
+ """
51
+ return "products"
52
+
53
+
54
+ class PageProduct(BaseModel):
55
+ """
56
+
57
+ """
58
+ model_config = ConfigDict(
59
+ populate_by_name=True,
60
+ use_enum_values=True,
61
+ arbitrary_types_allowed=True,
62
+ protected_namespaces=("model_config",),
63
+ )
64
+ total_pages: Optional[int] = Field(None, alias="totalPages")
65
+ total_elements: Optional[int] = Field(None, alias="totalElements")
66
+ size: Optional[int] = None
67
+ content: Optional[List[Product]] = None
68
+ number: Optional[int] = None
69
+
70
+ number_of_elements: Optional[int] = Field(None, alias="numberOfElements")
71
+ first: Optional[bool] = None
72
+ last: Optional[bool] = None
73
+ empty: Optional[bool] = None
74
+
75
+
76
+ class PageProductEndpoint(PageProduct, PageEndpoint):
77
+ def get_type(self) -> Optional[str]:
78
+ return "product"
79
+
80
+
81
+ class ProductsEndpoint(EntitiesEndpoint):
82
+ """Represents the products endpoint
83
+
84
+ This class is used to represent the products endpoint in the system.
85
+
86
+ Attributes:
87
+ object_dict: A dictionary containing the object data.
88
+ """
89
+
90
+ """Represents a assistants endpoint"""
91
+
92
+ def get_type(self) -> str:
93
+ """Get the type of the endpoint
94
+
95
+ This method is used to get the type of the endpoint.
96
+
97
+ Returns:
98
+ str: The type of the endpoint.
99
+ """
100
+ return "products"
101
+
102
+ def get_instance_class(self, object_dict=None):
103
+ """Get the instance class of the endpoint
104
+
105
+ This method is used to get the instance class of the endpoint.
106
+
107
+ Args:
108
+ object_dict (dict, optional): A dictionary containing the object data.
109
+
110
+ Returns:
111
+ AssistantEndpoint: The instance class of the endpoint.
112
+ """
113
+ return ProductEndpoint
114
+
115
+ def get_page_class(self, object_dict=None):
116
+ """Get the page class of the endpoint
117
+
118
+ This method is used to get the page class of the endpoint.
119
+
120
+ Args:
121
+ object_dict (dict, optional): A dictionary containing the object data.
122
+
123
+ Returns:
124
+ PageAssistantEndpoint: The page class of the endpoint.
125
+ """
126
+ return PageProductEndpoint
@@ -0,0 +1,122 @@
1
+ from typing import Optional, List
2
+
3
+ from pydantic import BaseModel, ConfigDict, Field
4
+
5
+ from kodexa.model.base import StandardDateTime
6
+ from kodexa.model.entities.product import Product
7
+ from kodexa.model.objects import Organization
8
+ from kodexa.platform.client import EntityEndpoint, PageEndpoint, EntitiesEndpoint
9
+
10
+
11
+ class ProductSubscription(BaseModel):
12
+ """
13
+ A product subscription
14
+ """
15
+ model_config = ConfigDict(
16
+ populate_by_name=True,
17
+ use_enum_values=True,
18
+ arbitrary_types_allowed=True,
19
+ protected_namespaces=("model_config",),
20
+ )
21
+
22
+ id: Optional[str] = Field(None)
23
+ uuid: Optional[str] = None
24
+ change_sequence: Optional[int] = Field(None, alias="changeSequence")
25
+ created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
26
+ updated_on: Optional[StandardDateTime] = Field(None, alias="updatedOn")
27
+ product: Optional[Product] = None
28
+ organization: Optional[Organization] = None
29
+
30
+
31
+ class ProductSubscriptionEndpoint(ProductSubscription, EntityEndpoint):
32
+ """Handles the endpoint for a product subscription
33
+
34
+ This class is a combination of ProductSubscription and EntityEndpoint. It is used
35
+ to manage the endpoint for product subscriptions.
36
+
37
+ Methods:
38
+ get_type: Returns the type of the endpoint.
39
+ """
40
+
41
+ def get_type(self) -> str:
42
+ """Gets the type of the endpoint.
43
+
44
+ This method returns the type of the endpoint which is "product_subscriptions".
45
+
46
+ Returns:
47
+ str: The type of the endpoint.
48
+ """
49
+ return "product_subscriptions"
50
+
51
+
52
+ class PageProductSubscription(BaseModel):
53
+ """
54
+ A page of product subscriptions
55
+ """
56
+ model_config = ConfigDict(
57
+ populate_by_name=True,
58
+ use_enum_values=True,
59
+ arbitrary_types_allowed=True,
60
+ protected_namespaces=("model_config",),
61
+ )
62
+ total_pages: Optional[int] = Field(None, alias="totalPages")
63
+ total_elements: Optional[int] = Field(None, alias="totalElements")
64
+ size: Optional[int] = None
65
+ content: Optional[List[ProductSubscription]] = None
66
+ number: Optional[int] = None
67
+
68
+ number_of_elements: Optional[int] = Field(None, alias="numberOfElements")
69
+ first: Optional[bool] = None
70
+ last: Optional[bool] = None
71
+ empty: Optional[bool] = None
72
+
73
+
74
+ class PageProductSubscriptionEndpoint(PageProductSubscription, PageEndpoint):
75
+ def get_type(self) -> Optional[str]:
76
+ return "product_subscription"
77
+
78
+
79
+ class ProductSubscriptionsEndpoint(EntitiesEndpoint):
80
+ """Represents the product subscriptions endpoint
81
+
82
+ This class is used to represent the product subscriptions endpoint in the system.
83
+
84
+ Attributes:
85
+ object_dict: A dictionary containing the object data.
86
+ """
87
+
88
+ def get_type(self) -> str:
89
+ """Get the type of the endpoint
90
+
91
+ This method is used to get the type of the endpoint.
92
+
93
+ Returns:
94
+ str: The type of the endpoint.
95
+ """
96
+ return "product_subscriptions"
97
+
98
+ def get_instance_class(self, object_dict=None):
99
+ """Get the instance class of the endpoint
100
+
101
+ This method is used to get the instance class of the endpoint.
102
+
103
+ Args:
104
+ object_dict (dict, optional): A dictionary containing the object data.
105
+
106
+ Returns:
107
+ ProductSubscriptionEndpoint: The instance class of the endpoint.
108
+ """
109
+ return ProductSubscriptionEndpoint
110
+
111
+ def get_page_class(self, object_dict=None):
112
+ """Get the page class of the endpoint
113
+
114
+ This method is used to get the page class of the endpoint.
115
+
116
+ Args:
117
+ object_dict (dict, optional): A dictionary containing the object data.
118
+
119
+ Returns:
120
+ PageProductSubscriptionEndpoint: The page class of the endpoint.
121
+ """
122
+ return PageProductSubscriptionEndpoint
@@ -2631,7 +2631,7 @@ class Document(object):
2631
2631
  return self
2632
2632
 
2633
2633
  @classmethod
2634
- def from_text(cls, text, separator=None):
2634
+ def from_text(cls, text, separator=None, inmemory=False):
2635
2635
  """Creates a new Document from the text provided.
2636
2636
 
2637
2637
  Args:
@@ -2642,7 +2642,7 @@ class Document(object):
2642
2642
  the document
2643
2643
 
2644
2644
  """
2645
- new_document = Document()
2645
+ new_document = Document(inmemory=inmemory)
2646
2646
  new_document.source.original_filename = f"text-{uuid.uuid4()}"
2647
2647
  new_document.content_node = new_document.create_node(node_type="text", index=0)
2648
2648
  if text:
@@ -218,7 +218,7 @@ class Organization(BaseModel):
218
218
  arbitrary_types_allowed=True,
219
219
  protected_namespaces=("model_config",),
220
220
  )
221
- id: Optional[str] = Field(None, description="The ID of the object")
221
+ id: Optional[str] = Field(None)
222
222
  uuid: Optional[str] = None
223
223
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
224
224
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -240,7 +240,7 @@ class Team(BaseModel):
240
240
  arbitrary_types_allowed=True,
241
241
  protected_namespaces=("model_config",),
242
242
  )
243
- id: Optional[str] = Field(None, description="The ID of the object")
243
+ id: Optional[str] = Field(None)
244
244
  uuid: Optional[str] = None
245
245
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
246
246
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -675,9 +675,8 @@ class StorePurpose(Enum):
675
675
 
676
676
 
677
677
  class ProjectStoreFile(BaseModel):
678
-
679
678
  url: Optional[str] = None
680
- metadata: Optional[Dict[str,str]] = None
679
+ metadata: Optional[Dict[str, str]] = None
681
680
 
682
681
 
683
682
  class ProjectStore(BaseModel):
@@ -1116,7 +1115,7 @@ class AttributeStatus(BaseModel):
1116
1115
  arbitrary_types_allowed=True,
1117
1116
  protected_namespaces=("model_config",),
1118
1117
  )
1119
- id: Optional[str] = Field(None, description="The ID of the object")
1118
+ id: Optional[str] = Field(None)
1120
1119
  uuid: Optional[str] = None
1121
1120
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
1122
1121
  updated_on: Optional[StandardDateTime] = Field(None, alias="updatedOn")
@@ -1203,7 +1202,7 @@ class DocumentStatus(BaseModel):
1203
1202
  arbitrary_types_allowed=True,
1204
1203
  protected_namespaces=("model_config",),
1205
1204
  )
1206
- id: Optional[str] = Field(None, description="The ID of the object")
1205
+ id: Optional[str] = Field(None)
1207
1206
  uuid: Optional[str] = None
1208
1207
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
1209
1208
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -1238,7 +1237,7 @@ class DocumentTransition(BaseModel):
1238
1237
  Provides the definition of a transition for a document, where a change was applied by an assistant, user or external process
1239
1238
  """
1240
1239
 
1241
- id: Optional[str] = Field(None, description="The ID of the object")
1240
+ id: Optional[str] = Field(None)
1242
1241
  uuid: Optional[str] = None
1243
1242
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
1244
1243
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -1418,7 +1417,7 @@ class Label(BaseModel):
1418
1417
  The labels from the latest content object in the family
1419
1418
  """
1420
1419
 
1421
- id: Optional[str] = Field(None, description="The ID of the object")
1420
+ id: Optional[str] = Field(None)
1422
1421
  uuid: Optional[str] = None
1423
1422
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
1424
1423
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -1442,7 +1441,7 @@ class ProjectTag(BaseModel):
1442
1441
  A project tag
1443
1442
  """
1444
1443
 
1445
- id: Optional[str] = Field(None, description="The ID of the object")
1444
+ id: Optional[str] = Field(None)
1446
1445
  name: str
1447
1446
  color: Optional[str] = None
1448
1447
 
@@ -1520,7 +1519,7 @@ class Session(BaseModel):
1520
1519
  arbitrary_types_allowed=True,
1521
1520
  protected_namespaces=("model_config",),
1522
1521
  )
1523
- id: Optional[str] = Field(None, description="The ID of the object")
1522
+ id: Optional[str] = Field(None)
1524
1523
  uuid: Optional[str] = None
1525
1524
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
1526
1525
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -1579,7 +1578,7 @@ class ValidationError(BaseModel):
1579
1578
  arbitrary_types_allowed=True,
1580
1579
  protected_namespaces=("model_config",),
1581
1580
  )
1582
- id: Optional[str] = Field(None, description="The ID of the object")
1581
+ id: Optional[str] = Field(None)
1583
1582
  uuid: Optional[str] = None
1584
1583
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
1585
1584
  updated_on: Optional[StandardDateTime] = Field(None, alias="updatedOn")
@@ -1673,7 +1672,7 @@ class DataException(BaseModel):
1673
1672
  A data exception
1674
1673
  """
1675
1674
 
1676
- id: Optional[str] = Field(None, description="The ID of the object")
1675
+ id: Optional[str] = Field(None)
1677
1676
  uuid: Optional[str] = None
1678
1677
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
1679
1678
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -1772,6 +1771,7 @@ class DeploymentOptions(BaseModel):
1772
1771
  cpu: Optional[str] = None
1773
1772
  pod_match_labels: Optional[List[MatchLabel]] = Field(None, alias="podMatchLabels")
1774
1773
  child_process: Optional[bool] = Field(None, alias="childProcess")
1774
+ layers: Optional[List[str]] = None
1775
1775
 
1776
1776
 
1777
1777
  class SourceType(Enum):
@@ -1822,7 +1822,7 @@ class PlatformConfiguration(BaseModel):
1822
1822
  arbitrary_types_allowed=True,
1823
1823
  protected_namespaces=("model_config",),
1824
1824
  )
1825
- id: Optional[str] = Field(None, description="The ID of the object")
1825
+ id: Optional[str] = Field(None)
1826
1826
  uuid: Optional[str] = None
1827
1827
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
1828
1828
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -1874,7 +1874,7 @@ class ModelTraining(BaseModel):
1874
1874
  arbitrary_types_allowed=True,
1875
1875
  protected_namespaces=("model_config",),
1876
1876
  )
1877
- id: Optional[str] = Field(None, description="The ID of the object")
1877
+ id: Optional[str] = Field(None)
1878
1878
  uuid: Optional[str] = None
1879
1879
  name: Optional[str] = None
1880
1880
  state: Optional[str] = None
@@ -1967,7 +1967,7 @@ class ExecutionLogEntry(BaseModel):
1967
1967
  arbitrary_types_allowed=True,
1968
1968
  protected_namespaces=("model_config",),
1969
1969
  )
1970
- id: Optional[str] = Field(None, description="The ID of the object")
1970
+ id: Optional[str] = Field(None)
1971
1971
  uuid: Optional[str] = None
1972
1972
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
1973
1973
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -2194,7 +2194,7 @@ class User(BaseModel):
2194
2194
  A user within the Kodexa platform
2195
2195
  """
2196
2196
 
2197
- id: Optional[str] = Field(None, description="The ID of the object")
2197
+ id: Optional[str] = Field(None)
2198
2198
  uuid: Optional[str] = None
2199
2199
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
2200
2200
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -2490,7 +2490,6 @@ class ProjectAssistant(BaseModel):
2490
2490
 
2491
2491
 
2492
2492
  class TaxonConditionalFormat(BaseModel):
2493
-
2494
2493
  model_config = ConfigDict(
2495
2494
  populate_by_name=True,
2496
2495
  use_enum_values=True,
@@ -2504,7 +2503,6 @@ class TaxonConditionalFormat(BaseModel):
2504
2503
 
2505
2504
 
2506
2505
  class TaxonCardinality(Enum):
2507
-
2508
2506
  once_per_document = "ONCE_PER_DOCUMENT"
2509
2507
  multiple_per_document = "MULTIPLE_PER_DOCUMENT"
2510
2508
  once_per_segment = "ONCE_PER_SEGMENT"
@@ -2686,7 +2684,7 @@ class ContentObject(BaseModel):
2686
2684
  arbitrary_types_allowed=True,
2687
2685
  protected_namespaces=("model_config",),
2688
2686
  )
2689
- id: Optional[str] = Field(None, description="The ID of the object")
2687
+ id: Optional[str] = Field(None)
2690
2688
  uuid: Optional[str] = None
2691
2689
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
2692
2690
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -2720,7 +2718,7 @@ class DocumentAssignment(BaseModel):
2720
2718
  A list of the assignments to users for this document
2721
2719
  """
2722
2720
 
2723
- id: Optional[str] = Field(None, description="The ID of the object")
2721
+ id: Optional[str] = Field(None)
2724
2722
  uuid: Optional[str] = None
2725
2723
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
2726
2724
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -2797,7 +2795,7 @@ class ProjectStatus(BaseModel):
2797
2795
  arbitrary_types_allowed=True,
2798
2796
  protected_namespaces=("model_config",),
2799
2797
  )
2800
- id: Optional[str] = Field(None, description="The ID of the object")
2798
+ id: Optional[str] = Field(None)
2801
2799
  uuid: Optional[str] = None
2802
2800
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
2803
2801
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -2809,7 +2807,6 @@ class ProjectStatus(BaseModel):
2809
2807
 
2810
2808
 
2811
2809
  class ProjectOptions(BaseModel):
2812
-
2813
2810
  model_config = ConfigDict(
2814
2811
  populate_by_name=True,
2815
2812
  use_enum_values=True,
@@ -2828,7 +2825,7 @@ class Project(BaseModel):
2828
2825
  arbitrary_types_allowed=True,
2829
2826
  protected_namespaces=("model_config",),
2830
2827
  )
2831
- id: Optional[str] = Field(None, description="The ID of the object")
2828
+ id: Optional[str] = Field(None)
2832
2829
  uuid: Optional[str] = None
2833
2830
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
2834
2831
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -3122,7 +3119,7 @@ class DataAttribute(BaseModel):
3122
3119
  arbitrary_types_allowed=True,
3123
3120
  protected_namespaces=("model_config",),
3124
3121
  )
3125
- id: Optional[str] = Field(None, description="The ID of the object")
3122
+ id: Optional[str] = Field(None)
3126
3123
  uuid: Optional[str] = None
3127
3124
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
3128
3125
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -3167,7 +3164,7 @@ class Role(BaseModel):
3167
3164
  A role that can be used to manage rights
3168
3165
  """
3169
3166
 
3170
- id: Optional[str] = Field(None, description="The ID of the object")
3167
+ id: Optional[str] = Field(None)
3171
3168
  uuid: Optional[str] = None
3172
3169
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
3173
3170
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -3187,7 +3184,7 @@ class Membership(BaseModel):
3187
3184
  arbitrary_types_allowed=True,
3188
3185
  protected_namespaces=("model_config",),
3189
3186
  )
3190
- id: Optional[str] = Field(None, description="The ID of the object")
3187
+ id: Optional[str] = Field(None)
3191
3188
  uuid: Optional[str] = None
3192
3189
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
3193
3190
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -3617,7 +3614,7 @@ class ContentException(BaseModel):
3617
3614
  A list of the content exceptions from the content objects
3618
3615
  """
3619
3616
 
3620
- id: Optional[str] = Field(None, description="The ID of the object")
3617
+ id: Optional[str] = Field(None)
3621
3618
  uuid: Optional[str] = None
3622
3619
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
3623
3620
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -3696,7 +3693,7 @@ class Execution(BaseModel):
3696
3693
  arbitrary_types_allowed=True,
3697
3694
  protected_namespaces=("model_config",),
3698
3695
  )
3699
- id: Optional[str] = Field(None, description="The ID of the object")
3696
+ id: Optional[str] = Field(None)
3700
3697
  uuid: Optional[str] = None
3701
3698
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
3702
3699
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -3731,7 +3728,7 @@ class ExecutionSnapshot(BaseModel):
3731
3728
  arbitrary_types_allowed=True,
3732
3729
  protected_namespaces=("model_config",),
3733
3730
  )
3734
- id: Optional[str] = Field(None, description="The ID of the object")
3731
+ id: Optional[str] = Field(None)
3735
3732
  uuid: Optional[str] = None
3736
3733
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
3737
3734
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -3840,7 +3837,6 @@ class LabelStatistics(BaseModel):
3840
3837
 
3841
3838
 
3842
3839
  class DocumentEmbedding(BaseModel):
3843
-
3844
3840
  model_config = ConfigDict(
3845
3841
  populate_by_name=True,
3846
3842
  use_enum_values=True,
@@ -3868,7 +3864,7 @@ class DocumentFamily(BaseModel):
3868
3864
  A document family is the representation of a single piece of external content (ie. a PDF) and all the related document representations of that file
3869
3865
  """
3870
3866
 
3871
- id: Optional[str] = Field(None, description="The ID of the object")
3867
+ id: Optional[str] = Field(None)
3872
3868
  uuid: Optional[str] = None
3873
3869
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
3874
3870
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -3967,7 +3963,7 @@ class ExecutionAssistant(BaseModel):
3967
3963
  arbitrary_types_allowed=True,
3968
3964
  protected_namespaces=("model_config",),
3969
3965
  )
3970
- id: Optional[str] = Field(None, description="The ID of the object")
3966
+ id: Optional[str] = Field(None)
3971
3967
  uuid: Optional[str] = None
3972
3968
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
3973
3969
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -4014,7 +4010,7 @@ class DataObject(BaseModel):
4014
4010
  arbitrary_types_allowed=True,
4015
4011
  protected_namespaces=("model_config",),
4016
4012
  )
4017
- id: Optional[str] = Field(None, description="The ID of the object")
4013
+ id: Optional[str] = Field(None)
4018
4014
  uuid: Optional[str] = None
4019
4015
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
4020
4016
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -4046,7 +4042,7 @@ class Assistant(BaseModel):
4046
4042
  arbitrary_types_allowed=True,
4047
4043
  protected_namespaces=("model_config",),
4048
4044
  )
4049
- id: Optional[str] = Field(None, description="The ID of the object")
4045
+ id: Optional[str] = Field(None)
4050
4046
  uuid: Optional[str] = None
4051
4047
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
4052
4048
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -4074,6 +4070,7 @@ class Assistant(BaseModel):
4074
4070
  chat_enabled: Optional[bool] = Field(None, alias="chatEnabled")
4075
4071
  assistant_role: Optional[str] = Field(None, alias="assistantRole")
4076
4072
 
4073
+
4077
4074
  class AssistantExecution(BaseModel):
4078
4075
  """
4079
4076
 
@@ -4251,7 +4248,7 @@ class ExecutionEvent(BaseModel):
4251
4248
  arbitrary_types_allowed=True,
4252
4249
  protected_namespaces=("model_config",),
4253
4250
  )
4254
- id: Optional[str] = Field(None, description="The ID of the object")
4251
+ id: Optional[str] = Field(None)
4255
4252
  uuid: Optional[str] = None
4256
4253
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
4257
4254
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -4339,6 +4336,7 @@ class Guidance(BaseModel):
4339
4336
 
4340
4337
  guidance_options: Optional[List[Option]] = Field(None, alias="guidanceOptions")
4341
4338
 
4339
+
4342
4340
  class GuidanceSet(ExtensionPackProvided):
4343
4341
  """
4344
4342
 
@@ -4478,7 +4476,7 @@ class SearchContent(BaseModel):
4478
4476
  A document family is the representation of a single peice of external content (ie. a PDF) and all the related document representations of that file
4479
4477
  """
4480
4478
 
4481
- id: Optional[str] = Field(None, description="The ID of the object")
4479
+ id: Optional[str] = Field(None)
4482
4480
  uuid: Optional[str] = None
4483
4481
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
4484
4482
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -4562,7 +4560,7 @@ class PlatformEvent(BaseModel):
4562
4560
  arbitrary_types_allowed=True,
4563
4561
  protected_namespaces=("model_config",),
4564
4562
  )
4565
- id: Optional[str] = Field(None, description="The ID of the object")
4563
+ id: Optional[str] = Field(None)
4566
4564
  uuid: Optional[str] = None
4567
4565
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
4568
4566
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -4619,7 +4617,7 @@ class AuditEvent(BaseModel):
4619
4617
  An audit event captures a data to a data structure or document
4620
4618
  """
4621
4619
 
4622
- id: Optional[str] = Field(None, description="The ID of the object")
4620
+ id: Optional[str] = Field(None)
4623
4621
  uuid: Optional[str] = None
4624
4622
  change_sequence: Optional[int] = Field(None, alias="changeSequence")
4625
4623
  created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
@@ -5262,7 +5260,6 @@ class Pipeline(ExtensionPackProvided):
5262
5260
 
5263
5261
 
5264
5262
  class ProjectTemplate(ExtensionPackProvided):
5265
-
5266
5263
  stores: Optional[List[ProjectStore]] = Field(
5267
5264
  None, description="The stores that will be created with the project template"
5268
5265
  )
@@ -888,6 +888,44 @@ class OrganizationsEndpoint(EntitiesEndpoint):
888
888
  return None
889
889
  return organizations.content[0]
890
890
 
891
+ def get_subscriptions(self, page: int = 1, page_size: int = 10) -> "PageProductSubscriptionEndpoint":
892
+ """
893
+ Get the subscriptions of the organization.
894
+
895
+ Returns:
896
+ The subscriptions of the organization.
897
+ """
898
+ url = f"/api/productSubscriptions"
899
+ params = {
900
+ filter: f"organization.id: '{self.organization.id}'",
901
+ }
902
+ response = self.client.get(url, params=params)
903
+
904
+ from kodexa.model.entities.product_subscription import PageProductSubscriptionEndpoint
905
+ return PageProductSubscriptionEndpoint.model_validate(response.json()).set_client(self.client)
906
+
907
+ def remove_subscription(self, subscription_id: str) -> None:
908
+ """
909
+ Remove a subscription from the organization.
910
+
911
+ Args:
912
+ subscription_id (str): The id of the subscription to remove.
913
+ """
914
+ url = f"/api/productSubscriptions/{subscription_id}"
915
+ self.client.delete(url)
916
+
917
+ def add_subscription(self, product: "Product") -> None:
918
+ """
919
+ Add a subscription to the organization.
920
+
921
+ Args:
922
+ product (Product): The product to subscribe to.
923
+ """
924
+ url = f"/api/productSubscriptions"
925
+ from kodexa.model.entities.product_subscription import ProductSubscription
926
+ new_product_subscription = ProductSubscription(organization=self.organization, product=product)
927
+ self.client.post(url, body=new_product_subscription.model_dump_json(by_alias=True))
928
+
891
929
 
892
930
  class PageEndpoint(ClientEndpoint):
893
931
  """
@@ -1598,6 +1636,42 @@ class OrganizationEndpoint(Organization, EntityEndpoint):
1598
1636
  """
1599
1637
  return TaxonomiesEndpoint().set_client(self.client).set_organization(self)
1600
1638
 
1639
+ @property
1640
+ def available_templates(self, page=1, page_size=10, query="*"):
1641
+ """
1642
+ Get the available templates for the organization.
1643
+
1644
+ Returns:
1645
+ MarketplaceEndpoint: The marketplace endpoint of the organization.
1646
+ """
1647
+ url = f"/api/organizations/{self.id}/availableTemplates"
1648
+ response = self.client.get(url, params={"page": page, "pageSize": page_size, "query": query})
1649
+ return PageProjectTemplateEndpoint.model_validate(response.json()).set_client(self.client)
1650
+
1651
+ @property
1652
+ def available_models(self, page=1, page_size=10, query="*"):
1653
+ """
1654
+ Get the available models for the organization.
1655
+
1656
+ Returns:
1657
+ MarketplaceEndpoint: The marketplace endpoint of the organization.
1658
+ """
1659
+ url = f"/api/organizations/{self.id}/availableModels"
1660
+ response = self.client.get(url, params={"page": page, "pageSize": page_size, "query": query})
1661
+ return PageStoreEndpoint.model_validate(response.json()).set_client(self.client)
1662
+
1663
+ @property
1664
+ def available_assistants(self, page=1, page_size=10, query="*"):
1665
+ """
1666
+ Get the available assistants for the organization.
1667
+
1668
+ Returns:
1669
+ MarketplaceEndpoint: The marketplace endpoint of the organization.
1670
+ """
1671
+ url = f"/api/organizations/{self.id}/availableAssistants"
1672
+ response = self.client.get(url, params={"page": page, "pageSize": page_size, "query": query})
1673
+ return PageAssistantDefinitionEndpoint.model_validate(response.json()).set_client(self.client)
1674
+
1601
1675
 
1602
1676
  class ComponentsEndpoint(ClientEndpoint):
1603
1677
  """
@@ -6148,6 +6222,8 @@ class KodexaClient:
6148
6222
  self.channels = ChannelsEndpoint(self)
6149
6223
  self.assistants = AssistantsEndpoint(self)
6150
6224
  self.messages = MessagesEndpoint(self)
6225
+ from kodexa.model.entities.product import ProductsEndpoint
6226
+ self.products = ProductsEndpoint(self)
6151
6227
 
6152
6228
  @staticmethod
6153
6229
  def login(url, token):
@@ -6697,6 +6773,8 @@ class KodexaClient:
6697
6773
 
6698
6774
  raise Exception("A store must have a storeType")
6699
6775
 
6776
+ from kodexa.model.entities.product import ProductEndpoint
6777
+ from kodexa.model.entities.product_subscription import ProductSubscriptionEndpoint
6700
6778
  known_components = {
6701
6779
  "taxonomy": TaxonomyEndpoint,
6702
6780
  "pipeline": PipelineEndpoint,
@@ -6720,6 +6798,8 @@ class KodexaClient:
6720
6798
  "prompt": PromptEndpoint,
6721
6799
  "guidance": GuidanceSetEndpoint,
6722
6800
  "channel": ChannelEndpoint,
6801
+ "product": ProductEndpoint,
6802
+ "productSubscription": ProductSubscriptionEndpoint,
6723
6803
  }
6724
6804
 
6725
6805
  if component_type in known_components:
File without changes
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kodexa"
3
- version = "7.0.08801100838"
3
+ version = "7.0.08897197016"
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"
File without changes