kodexa 6.2.25187940582__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
 
@@ -49,60 +49,6 @@ class Notifier:
49
49
  print("Done")
50
50
 
51
51
 
52
- # Define the columns that we want for different component types when we
53
- # are printing the listing of them
54
-
55
- DEFAULT_COLUMNS = {
56
- 'extensionPacks': [
57
- 'ref',
58
- 'name',
59
- 'description',
60
- 'type',
61
- 'status'
62
- ],
63
- 'projects': [
64
- 'id',
65
- 'organization.name',
66
- 'name',
67
- 'description'
68
- ],
69
- 'assistants': [
70
- 'ref',
71
- 'name',
72
- 'description',
73
- 'template'
74
- ],
75
- 'executions': [
76
- 'id',
77
- 'startDate',
78
- 'endDate',
79
- 'status',
80
- 'assistant.name',
81
- 'documentFamily.path'
82
- ],
83
- 'memberships': [
84
- 'organization.slug',
85
- 'organization.name'
86
- ],
87
-
88
- 'stores': [
89
- 'ref',
90
- 'name',
91
- 'description',
92
- 'storeType',
93
- 'storePurpose',
94
- 'template'
95
- ],
96
- 'default': [
97
- 'ref',
98
- 'name',
99
- 'description',
100
- 'type',
101
- 'template'
102
- ]
103
- }
104
-
105
-
106
52
  #
107
53
  # Declare all the endpoints that we will have
108
54
  #
@@ -791,6 +737,7 @@ class ComponentInstanceEndpoint(ClientEndpoint, SlugBasedMetadata):
791
737
  raise Exception("Can't create as it already exists")
792
738
  url = f"/api/{self.get_type()}/{self.org_slug}"
793
739
  self.client.post(url, self.to_dict())
740
+ return self
794
741
 
795
742
  def update(self):
796
743
  """Update the component instance"""
@@ -799,6 +746,7 @@ class ComponentInstanceEndpoint(ClientEndpoint, SlugBasedMetadata):
799
746
  if not exists:
800
747
  raise Exception("Can't update as it doesn't exist?")
801
748
  self.client.put(url, self.to_dict())
749
+ return self
802
750
 
803
751
  def delete(self):
804
752
  """Delete the component instance"""
@@ -1005,20 +953,27 @@ class ProjectModelStoresEndpoint(ProjectResourceEndpoint):
1005
953
  return ModelStoreEndpoint
1006
954
 
1007
955
 
1008
- class ChannelEndpoint(EntityEndpoint, Channel):
1009
- """Represents a channel endpoint"""
956
+ class MessageEndpoint(EntityEndpoint, Message):
957
+ """Represents a message endpoint"""
1010
958
 
1011
959
  def get_type(self) -> str:
1012
960
  """Get the type of the endpoint"""
1013
- return "channels"
961
+ return "messages"
1014
962
 
1015
963
 
1016
- class MessageEndpoint(EntityEndpoint, Message):
1017
- """Represents a message endpoint"""
964
+ class ChannelEndpoint(EntityEndpoint, Channel):
965
+ """Represents a channel endpoint"""
1018
966
 
1019
967
  def get_type(self) -> str:
1020
968
  """Get the type of the endpoint"""
1021
- 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()
1022
977
 
1023
978
 
1024
979
  class WorkspaceEndpoint(EntityEndpoint, Workspace):
kodexa/platform/kodexa.py CHANGED
@@ -74,57 +74,6 @@ def save_config(config_obj):
74
74
  with open(path, 'w') as outfile:
75
75
  json.dump(config_obj, outfile)
76
76
 
77
-
78
- DEFAULT_COLUMNS = {
79
- 'extensionPacks': [
80
- 'ref',
81
- 'name',
82
- 'description',
83
- 'type',
84
- 'status'
85
- ],
86
- 'projects': [
87
- 'id',
88
- 'organization.name',
89
- 'name',
90
- 'description'
91
- ],
92
- 'assistants': [
93
- 'ref',
94
- 'name',
95
- 'description',
96
- 'template'
97
- ],
98
- 'executions': [
99
- 'id',
100
- 'startDate',
101
- 'endDate',
102
- 'status',
103
- 'assistant.name',
104
- 'documentFamily.path'
105
- ],
106
- 'memberships': [
107
- 'organization.slug',
108
- 'organization.name'
109
- ],
110
-
111
- 'stores': [
112
- 'ref',
113
- 'name',
114
- 'description',
115
- 'storeType',
116
- 'storePurpose',
117
- 'template'
118
- ],
119
- 'default': [
120
- 'ref',
121
- 'name',
122
- 'description',
123
- 'type',
124
- 'template'
125
- ]
126
- }
127
-
128
77
  OBJECT_TYPES = {
129
78
  "extensionPacks": {
130
79
  "name": "extension pack",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 6.2.25187940582
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,8 +11,8 @@ 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=j2bcg0rT0WoI3-IAFzqqf0isf2DIv8IKKNCdP9gzn08,111986
15
- kodexa/platform/kodexa.py,sha256=1p3jswNVGnnv23DjOB9ix_As5RGAiilsXHcZkbYPi0Q,27730
14
+ kodexa/platform/client.py,sha256=HgTYJk_hvD_JNYSYbb0pnZxRj0LZv82iJ5eMRI32iPM,111330
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
18
18
  kodexa/selectors/core.py,sha256=FxrKEQNqCRBSyC37ymt6kTvv4O-dj6SN71UGLocxWWA,3698
@@ -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.25187940582.dist-info/METADATA,sha256=-d6ZEGFq8-ngCYZCKwVjzW9aBeifln_FqFwqFrF1At0,4158
38
- kodexa-6.2.25187940582.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
39
- kodexa-6.2.25187940582.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
40
- kodexa-6.2.25187940582.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,,