kodexa 6.3.37304149165__py3-none-any.whl → 6.3.37314935435__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
@@ -619,7 +619,10 @@ class EntityEndpoint(ClientEndpoint):
619
619
  raise Exception("Can't create as it already exists")
620
620
 
621
621
  url = f"/api/{self.get_type()}"
622
- self.client.post(url, self.model_dump(mode="json", by_alias=True))
622
+ response = self.client.post(url, self.model_dump(mode="json", by_alias=True))
623
+
624
+ # We need to update the id
625
+ self.id = response.json()["id"]
623
626
 
624
627
  def update(self):
625
628
  """
@@ -2175,6 +2178,25 @@ class ChannelEndpoint(EntityEndpoint, Channel):
2175
2178
  new_message.message_type = "TEXT"
2176
2179
  return new_message.create()
2177
2180
 
2181
+ def send_message(self, message: Message) -> MessageEndpoint:
2182
+ """Send a message.
2183
+
2184
+ This method is used to send a message through the channel endpoint. It sets the client, channel,
2185
+ and message type, and then creates the message.
2186
+
2187
+ Args:
2188
+ message (Message): The message to be sent.
2189
+ """
2190
+
2191
+ # We need to convert the Message into a MessageEndpoint
2192
+ message_endpoint = MessageEndpoint().set_client(self.client)
2193
+ message_endpoint.channel = self.detach()
2194
+ message_endpoint.message_type = message.message_type
2195
+ message_endpoint.content = message.content
2196
+ message_endpoint.message_blocks = message.message_blocks
2197
+ message_endpoint.message_feedback = message.message_feedback
2198
+ return message_endpoint.create()
2199
+
2178
2200
 
2179
2201
  class WorkspaceEndpoint(EntityEndpoint, Workspace):
2180
2202
  """Represents a workspace endpoint"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 6.3.37304149165
3
+ Version: 6.3.37314935435
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=TajtXfHp7dL85R5ui9A2h6rLMecDUr6OYZHVgm8CVJw,5
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=nWChYnbiebLX2gsAK4Cr30BLCMlwNz_vHnE3CPtUdmA,202774
14
+ kodexa/platform/client.py,sha256=0-z8t1o2LuvmLzAhtsssCW5_7e7SjvAw_52upCb0Rb0,203668
15
15
  kodexa/platform/kodexa.py,sha256=g9Vcp2CtPn6haCQLc7TEmQmROQ1x8Bdpxfx1iK1KTqU,32292
16
16
  kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
17
17
  kodexa/selectors/ast.py,sha256=gG-1st841IntgBE5V7p3Cq9azaym2jV5lB_AIywQTCI,13269
@@ -34,7 +34,7 @@ kodexa/testing/test_components.py,sha256=4BnzCCOA5v__82mB1TIBPHfNIGJbkZz9PiTZiNK
34
34
  kodexa/testing/test_utils.py,sha256=IWLKBvMHATzrsoO9PQFGcwoGcuZykhAS3QRddfzb_XE,14043
35
35
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
36
36
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- kodexa-6.3.37304149165.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
38
- kodexa-6.3.37304149165.dist-info/METADATA,sha256=uGdl69OxsTzoQzcRaH_BvArJWnWrjy4f7ATFlN_dKrk,4003
39
- kodexa-6.3.37304149165.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
40
- kodexa-6.3.37304149165.dist-info/RECORD,,
37
+ kodexa-6.3.37314935435.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
38
+ kodexa-6.3.37314935435.dist-info/METADATA,sha256=YS9ukHzvr2QyulRcG4NTwT4t_-Zbb19P3BQwIHl2YAw,4003
39
+ kodexa-6.3.37314935435.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
40
+ kodexa-6.3.37314935435.dist-info/RECORD,,