kodexa 6.2.25190248240__py3-none-any.whl → 6.2.25191410465__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 CHANGED
@@ -28,10 +28,10 @@ from kodexa.model.objects import PageStore, PageTaxonomy, PageProject, PageOrgan
28
28
  PlatformOverview, DocumentFamily, DocumentContentMetadata, ModelContentMetadata, ExtensionPack, Pipeline, \
29
29
  AssistantDefinition, Action, ModelRuntime, CredentialDefinition, Execution, PageAssistantDefinition, \
30
30
  PageCredentialDefinition, \
31
- PageProjectTemplate, PageUser, User, FeatureSet, ContentObject, Taxon, SlugBasedMetadata, DataObject, \
31
+ PageProjectTemplate, PageUser, User, ContentObject, Taxon, SlugBasedMetadata, DataObject, \
32
32
  PageDataObject, Assistant, ProjectTemplate, PageExtensionPack, DeploymentOptions, PageMembership, Membership, \
33
33
  PageDocumentFamily, ProjectResourcesUpdate, DataAttribute, PageNote, PageDataForm, DataForm, Store, PageExecution, \
34
- Dashboard, PageAction, PagePipeline, DocumentStatus, ModelTraining, PageModelTraining, ContentException, Option, \
34
+ Dashboard, PageAction, PagePipeline, DocumentStatus, ModelTraining, PageModelTraining, ContentException, \
35
35
  CustomEvent, ProjectTag, PageDataException, DataException, ReprocessRequest, PageWorkspace, Workspace, PageChannel, \
36
36
  PageMessage, Message, Channel, PageDashboard
37
37
 
@@ -737,6 +737,7 @@ class ComponentInstanceEndpoint(ClientEndpoint, SlugBasedMetadata):
737
737
  raise Exception("Can't create as it already exists")
738
738
  url = f"/api/{self.get_type()}/{self.org_slug}"
739
739
  self.client.post(url, self.to_dict())
740
+ return self
740
741
 
741
742
  def update(self):
742
743
  """Update the component instance"""
@@ -745,6 +746,7 @@ class ComponentInstanceEndpoint(ClientEndpoint, SlugBasedMetadata):
745
746
  if not exists:
746
747
  raise Exception("Can't update as it doesn't exist?")
747
748
  self.client.put(url, self.to_dict())
749
+ return self
748
750
 
749
751
  def delete(self):
750
752
  """Delete the component instance"""
@@ -951,20 +953,27 @@ class ProjectModelStoresEndpoint(ProjectResourceEndpoint):
951
953
  return ModelStoreEndpoint
952
954
 
953
955
 
954
- class ChannelEndpoint(EntityEndpoint, Channel):
955
- """Represents a channel endpoint"""
956
+ class MessageEndpoint(EntityEndpoint, Message):
957
+ """Represents a message endpoint"""
956
958
 
957
959
  def get_type(self) -> str:
958
960
  """Get the type of the endpoint"""
959
- return "channels"
961
+ return "messages"
960
962
 
961
963
 
962
- class MessageEndpoint(EntityEndpoint, Message):
963
- """Represents a message endpoint"""
964
+ class ChannelEndpoint(EntityEndpoint, Channel):
965
+ """Represents a channel endpoint"""
964
966
 
965
967
  def get_type(self) -> str:
966
968
  """Get the type of the endpoint"""
967
- return "messages"
969
+ return "channels"
970
+
971
+ def send_text_message(self, content: str) -> MessageEndpoint:
972
+ new_message = MessageEndpoint().set_client(self.client)
973
+ new_message.channel = self
974
+ new_message.content = content
975
+ new_message.type = "TEXT"
976
+ return new_message.create()
968
977
 
969
978
 
970
979
  class WorkspaceEndpoint(EntityEndpoint, Workspace):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 6.2.25190248240
3
+ Version: 6.2.25191410465
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -11,7 +11,7 @@ kodexa/model/persistence.py,sha256=ZWESzXS-jkGbp-NlPuQzQFxmZeRup7uNJjrUkGaYIOk,3
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=FiL53vyApYB5e5akT8vFhpN4JUFtGfE569JadE-1DL8,111036
14
+ kodexa/platform/client.py,sha256=HgTYJk_hvD_JNYSYbb0pnZxRj0LZv82iJ5eMRI32iPM,111330
15
15
  kodexa/platform/kodexa.py,sha256=4aGg2n9joDLyPckkRu5iynd99Ph8YxGOeX3hk_xDtMk,26888
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.2.25190248240.dist-info/METADATA,sha256=1NLNBj425ksGVTd1SBgiwo0e9i_IaUAh35yaT0qAxoY,4158
38
- kodexa-6.2.25190248240.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
39
- kodexa-6.2.25190248240.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
40
- kodexa-6.2.25190248240.dist-info/RECORD,,
37
+ kodexa-6.2.25191410465.dist-info/METADATA,sha256=Sxi9pOKVYpWyKXOQ5uy8QXoOjrHKiQ9HzzxTfeXbBeQ,4158
38
+ kodexa-6.2.25191410465.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
39
+ kodexa-6.2.25191410465.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
40
+ kodexa-6.2.25191410465.dist-info/RECORD,,