@nexaomni/n8n-nodes-nexachat 1.0.0

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 (180) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +81 -0
  3. package/dist/LICENSE.upstream.md +19 -0
  4. package/dist/credentials/MegaApi.credentials.js +49 -0
  5. package/dist/credentials/MegaPlatformApi.credentials.js +55 -0
  6. package/dist/icons/nexachat.svg +29 -0
  7. package/dist/nodes/Mega/Mega.node.js +603 -0
  8. package/dist/nodes/Mega/Mega.node.json +17 -0
  9. package/dist/nodes/Mega/MegaTrigger.node.js +330 -0
  10. package/dist/nodes/Mega/actions/account/index.js +361 -0
  11. package/dist/nodes/Mega/actions/account/operations.js +94 -0
  12. package/dist/nodes/Mega/actions/accountTask/endpointActions.js +159 -0
  13. package/dist/nodes/Mega/actions/accountTask/index.js +8 -0
  14. package/dist/nodes/Mega/actions/accountTask/operations.js +6 -0
  15. package/dist/nodes/Mega/actions/accountUser/index.js +85 -0
  16. package/dist/nodes/Mega/actions/accountUser/operations.js +35 -0
  17. package/dist/nodes/Mega/actions/activityType/endpointActions.js +37 -0
  18. package/dist/nodes/Mega/actions/activityType/index.js +8 -0
  19. package/dist/nodes/Mega/actions/activityType/operations.js +6 -0
  20. package/dist/nodes/Mega/actions/agent/helpers.js +26 -0
  21. package/dist/nodes/Mega/actions/agent/index.js +187 -0
  22. package/dist/nodes/Mega/actions/agent/operations.js +109 -0
  23. package/dist/nodes/Mega/actions/agentBot/index.js +158 -0
  24. package/dist/nodes/Mega/actions/agentBot/operations.js +85 -0
  25. package/dist/nodes/Mega/actions/agentBotAccount/endpointActions.js +13 -0
  26. package/dist/nodes/Mega/actions/agentBotAccount/index.js +419 -0
  27. package/dist/nodes/Mega/actions/agentBotAccount/operations.js +312 -0
  28. package/dist/nodes/Mega/actions/agentCapacityPolicy/index.js +7 -0
  29. package/dist/nodes/Mega/actions/agentCapacityPolicy/operations.js +5 -0
  30. package/dist/nodes/Mega/actions/appliedSla/endpointActions.js +26 -0
  31. package/dist/nodes/Mega/actions/appliedSla/index.js +8 -0
  32. package/dist/nodes/Mega/actions/appliedSla/operations.js +6 -0
  33. package/dist/nodes/Mega/actions/assignmentPolicy/index.js +7 -0
  34. package/dist/nodes/Mega/actions/assignmentPolicy/operations.js +5 -0
  35. package/dist/nodes/Mega/actions/auditLog/endpointActions.js +23 -0
  36. package/dist/nodes/Mega/actions/auditLog/index.js +8 -0
  37. package/dist/nodes/Mega/actions/auditLog/operations.js +6 -0
  38. package/dist/nodes/Mega/actions/automationRule/index.js +562 -0
  39. package/dist/nodes/Mega/actions/automationRule/operations.js +170 -0
  40. package/dist/nodes/Mega/actions/calendarEvent/endpointActions.js +66 -0
  41. package/dist/nodes/Mega/actions/calendarEvent/index.js +8 -0
  42. package/dist/nodes/Mega/actions/calendarEvent/operations.js +6 -0
  43. package/dist/nodes/Mega/actions/campaign/index.js +291 -0
  44. package/dist/nodes/Mega/actions/campaign/operations.js +103 -0
  45. package/dist/nodes/Mega/actions/cannedResponse/index.js +149 -0
  46. package/dist/nodes/Mega/actions/cannedResponse/operations.js +57 -0
  47. package/dist/nodes/Mega/actions/captainAssistant/endpointActions.js +87 -0
  48. package/dist/nodes/Mega/actions/captainAssistant/index.js +8 -0
  49. package/dist/nodes/Mega/actions/captainAssistant/operations.js +6 -0
  50. package/dist/nodes/Mega/actions/captainCopilot/endpointActions.js +53 -0
  51. package/dist/nodes/Mega/actions/captainCopilot/index.js +8 -0
  52. package/dist/nodes/Mega/actions/captainCopilot/operations.js +6 -0
  53. package/dist/nodes/Mega/actions/captainDocument/endpointActions.js +38 -0
  54. package/dist/nodes/Mega/actions/captainDocument/index.js +8 -0
  55. package/dist/nodes/Mega/actions/captainDocument/operations.js +6 -0
  56. package/dist/nodes/Mega/actions/captainFaq/endpointActions.js +52 -0
  57. package/dist/nodes/Mega/actions/captainFaq/index.js +8 -0
  58. package/dist/nodes/Mega/actions/captainFaq/operations.js +6 -0
  59. package/dist/nodes/Mega/actions/captainScenario/endpointActions.js +44 -0
  60. package/dist/nodes/Mega/actions/captainScenario/index.js +8 -0
  61. package/dist/nodes/Mega/actions/captainScenario/operations.js +6 -0
  62. package/dist/nodes/Mega/actions/captainTask/endpointActions.js +70 -0
  63. package/dist/nodes/Mega/actions/captainTask/index.js +8 -0
  64. package/dist/nodes/Mega/actions/captainTask/operations.js +6 -0
  65. package/dist/nodes/Mega/actions/chatRoom/index.js +341 -0
  66. package/dist/nodes/Mega/actions/chatRoom/operations.js +166 -0
  67. package/dist/nodes/Mega/actions/company/endpointActions.js +67 -0
  68. package/dist/nodes/Mega/actions/company/index.js +8 -0
  69. package/dist/nodes/Mega/actions/company/operations.js +6 -0
  70. package/dist/nodes/Mega/actions/contact/endpointActions.js +69 -0
  71. package/dist/nodes/Mega/actions/contact/index.js +1113 -0
  72. package/dist/nodes/Mega/actions/contact/operations.js +282 -0
  73. package/dist/nodes/Mega/actions/contactNote/index.js +99 -0
  74. package/dist/nodes/Mega/actions/contactNote/operations.js +53 -0
  75. package/dist/nodes/Mega/actions/conversation/endpointActions.js +257 -0
  76. package/dist/nodes/Mega/actions/conversation/index.js +1368 -0
  77. package/dist/nodes/Mega/actions/conversation/operations.js +952 -0
  78. package/dist/nodes/Mega/actions/conversation/templateHelpers.js +563 -0
  79. package/dist/nodes/Mega/actions/csatResponse/endpointActions.js +37 -0
  80. package/dist/nodes/Mega/actions/csatResponse/index.js +8 -0
  81. package/dist/nodes/Mega/actions/csatResponse/operations.js +6 -0
  82. package/dist/nodes/Mega/actions/customAttribute/index.js +177 -0
  83. package/dist/nodes/Mega/actions/customAttribute/operations.js +84 -0
  84. package/dist/nodes/Mega/actions/customFilter/index.js +7 -0
  85. package/dist/nodes/Mega/actions/customFilter/operations.js +5 -0
  86. package/dist/nodes/Mega/actions/customRole/index.js +178 -0
  87. package/dist/nodes/Mega/actions/customRole/operations.js +56 -0
  88. package/dist/nodes/Mega/actions/dashboardApp/index.js +7 -0
  89. package/dist/nodes/Mega/actions/dashboardApp/operations.js +5 -0
  90. package/dist/nodes/Mega/actions/googleCalendarIntegration/endpointActions.js +74 -0
  91. package/dist/nodes/Mega/actions/googleCalendarIntegration/index.js +8 -0
  92. package/dist/nodes/Mega/actions/googleCalendarIntegration/operations.js +6 -0
  93. package/dist/nodes/Mega/actions/googleCalendarSync/endpointActions.js +59 -0
  94. package/dist/nodes/Mega/actions/googleCalendarSync/index.js +8 -0
  95. package/dist/nodes/Mega/actions/googleCalendarSync/operations.js +6 -0
  96. package/dist/nodes/Mega/actions/helpCenterArticle/endpointActions.js +74 -0
  97. package/dist/nodes/Mega/actions/helpCenterArticle/index.js +8 -0
  98. package/dist/nodes/Mega/actions/helpCenterArticle/operations.js +6 -0
  99. package/dist/nodes/Mega/actions/helpCenterCategory/endpointActions.js +59 -0
  100. package/dist/nodes/Mega/actions/helpCenterCategory/index.js +8 -0
  101. package/dist/nodes/Mega/actions/helpCenterCategory/operations.js +6 -0
  102. package/dist/nodes/Mega/actions/inbox/endpointActions.js +80 -0
  103. package/dist/nodes/Mega/actions/inbox/index.js +311 -0
  104. package/dist/nodes/Mega/actions/inbox/operations.js +205 -0
  105. package/dist/nodes/Mega/actions/kanbanAutomation/index.js +184 -0
  106. package/dist/nodes/Mega/actions/kanbanAutomation/operations.js +100 -0
  107. package/dist/nodes/Mega/actions/kanbanConfig/index.js +104 -0
  108. package/dist/nodes/Mega/actions/kanbanConfig/operations.js +55 -0
  109. package/dist/nodes/Mega/actions/kanbanFunnel/index.js +234 -0
  110. package/dist/nodes/Mega/actions/kanbanFunnel/operations.js +158 -0
  111. package/dist/nodes/Mega/actions/kanbanItem/index.js +971 -0
  112. package/dist/nodes/Mega/actions/kanbanItem/operations.js +659 -0
  113. package/dist/nodes/Mega/actions/kanbanStage/index.js +138 -0
  114. package/dist/nodes/Mega/actions/kanbanStage/operations.js +81 -0
  115. package/dist/nodes/Mega/actions/label/index.js +125 -0
  116. package/dist/nodes/Mega/actions/label/operations.js +52 -0
  117. package/dist/nodes/Mega/actions/macro/endpointActions.js +19 -0
  118. package/dist/nodes/Mega/actions/macro/index.js +8 -0
  119. package/dist/nodes/Mega/actions/macro/operations.js +6 -0
  120. package/dist/nodes/Mega/actions/messageTemplate/index.js +373 -0
  121. package/dist/nodes/Mega/actions/messageTemplate/operations.js +142 -0
  122. package/dist/nodes/Mega/actions/node.type.js +2 -0
  123. package/dist/nodes/Mega/actions/notification/endpointActions.js +52 -0
  124. package/dist/nodes/Mega/actions/notification/index.js +8 -0
  125. package/dist/nodes/Mega/actions/notification/operations.js +6 -0
  126. package/dist/nodes/Mega/actions/offer/index.js +7 -0
  127. package/dist/nodes/Mega/actions/offer/operations.js +5 -0
  128. package/dist/nodes/Mega/actions/outboundMessage/index.js +60 -0
  129. package/dist/nodes/Mega/actions/outboundMessage/operations.js +75 -0
  130. package/dist/nodes/Mega/actions/platformBanner/index.js +61 -0
  131. package/dist/nodes/Mega/actions/platformBanner/operations.js +23 -0
  132. package/dist/nodes/Mega/actions/platformBannerPlatform/index.js +321 -0
  133. package/dist/nodes/Mega/actions/platformBannerPlatform/operations.js +162 -0
  134. package/dist/nodes/Mega/actions/portal/index.js +7 -0
  135. package/dist/nodes/Mega/actions/portal/operations.js +5 -0
  136. package/dist/nodes/Mega/actions/profile/index.js +47 -0
  137. package/dist/nodes/Mega/actions/profile/operations.js +18 -0
  138. package/dist/nodes/Mega/actions/report/index.js +19 -0
  139. package/dist/nodes/Mega/actions/report/operations.js +23 -0
  140. package/dist/nodes/Mega/actions/scheduledMessage/index.js +346 -0
  141. package/dist/nodes/Mega/actions/scheduledMessage/operations.js +269 -0
  142. package/dist/nodes/Mega/actions/scheduledOutboundMessage/index.js +54 -0
  143. package/dist/nodes/Mega/actions/scheduledOutboundMessage/operations.js +164 -0
  144. package/dist/nodes/Mega/actions/search/endpointActions.js +34 -0
  145. package/dist/nodes/Mega/actions/search/index.js +8 -0
  146. package/dist/nodes/Mega/actions/search/operations.js +6 -0
  147. package/dist/nodes/Mega/actions/slaPolicy/index.js +7 -0
  148. package/dist/nodes/Mega/actions/slaPolicy/operations.js +5 -0
  149. package/dist/nodes/Mega/actions/team/index.js +141 -0
  150. package/dist/nodes/Mega/actions/team/operations.js +62 -0
  151. package/dist/nodes/Mega/actions/user/index.js +183 -0
  152. package/dist/nodes/Mega/actions/user/operations.js +57 -0
  153. package/dist/nodes/Mega/actions/webhook/index.js +162 -0
  154. package/dist/nodes/Mega/actions/webhook/operations.js +93 -0
  155. package/dist/nodes/Mega/actions/whatsappGroup/endpointActions.js +131 -0
  156. package/dist/nodes/Mega/actions/whatsappGroup/index.js +8 -0
  157. package/dist/nodes/Mega/actions/whatsappGroup/operations.js +6 -0
  158. package/dist/nodes/Mega/api-contracts.js +96 -0
  159. package/dist/nodes/Mega/methods/credentialTest.js +45 -0
  160. package/dist/nodes/Mega/methods/index.js +40 -0
  161. package/dist/nodes/Mega/methods/listSearch.js +906 -0
  162. package/dist/nodes/Mega/methods/loadOptions.js +195 -0
  163. package/dist/nodes/Mega/methods/resourceMapping.js +42 -0
  164. package/dist/nodes/Mega/shared/accountResource.js +72 -0
  165. package/dist/nodes/Mega/shared/descriptions.js +166 -0
  166. package/dist/nodes/Mega/shared/endpointActions.js +335 -0
  167. package/dist/nodes/Mega/shared/listSearchHelpers.js +9 -0
  168. package/dist/nodes/Mega/shared/nodeIdentity.js +21 -0
  169. package/dist/nodes/Mega/shared/transport.js +227 -0
  170. package/dist/nodes/Mega/shared/webhookSubscriptions.js +60 -0
  171. package/dist/nodes/NexaChat/NexaChat.node.js +34 -0
  172. package/dist/nodes/NexaChat/NexaChat.node.json +17 -0
  173. package/dist/nodes/NexaChatAds/NexaChatAds.node.js +191 -0
  174. package/dist/nodes/NexaChatAds/NexaChatAdsTrigger.node.js +61 -0
  175. package/dist/nodes/NexaChatForms/NexaChatForms.node.js +140 -0
  176. package/dist/nodes/NexaChatForms/NexaChatFormsTrigger.node.js +93 -0
  177. package/dist/nodes/NexaChatInstagram/NexaChatInstagram.node.js +345 -0
  178. package/dist/nodes/NexaChatInstagram/NexaChatInstagramTrigger.node.js +149 -0
  179. package/dist/shared/api.js +91 -0
  180. package/package.json +58 -0
@@ -0,0 +1,603 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Mega = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const profile_1 = require("./actions/profile");
6
+ const account_1 = require("./actions/account");
7
+ const accountUser_1 = require("./actions/accountUser");
8
+ const agent_1 = require("./actions/agent");
9
+ const agentBot_1 = require("./actions/agentBot");
10
+ const agentBotAccount_1 = require("./actions/agentBotAccount");
11
+ const automationRule_1 = require("./actions/automationRule");
12
+ const cannedResponse_1 = require("./actions/cannedResponse");
13
+ const campaign_1 = require("./actions/campaign");
14
+ const chatRoom_1 = require("./actions/chatRoom");
15
+ const inbox_1 = require("./actions/inbox");
16
+ const kanbanAutomation_1 = require("./actions/kanbanAutomation");
17
+ const kanbanConfig_1 = require("./actions/kanbanConfig");
18
+ const kanbanFunnel_1 = require("./actions/kanbanFunnel");
19
+ const kanbanItem_1 = require("./actions/kanbanItem");
20
+ const kanbanStage_1 = require("./actions/kanbanStage");
21
+ const contact_1 = require("./actions/contact");
22
+ const contactNote_1 = require("./actions/contactNote");
23
+ const conversation_1 = require("./actions/conversation");
24
+ const customAttribute_1 = require("./actions/customAttribute");
25
+ const customRole_1 = require("./actions/customRole");
26
+ const label_1 = require("./actions/label");
27
+ const messageTemplate_1 = require("./actions/messageTemplate");
28
+ const platformBanner_1 = require("./actions/platformBanner");
29
+ const platformBannerPlatform_1 = require("./actions/platformBannerPlatform");
30
+ const team_1 = require("./actions/team");
31
+ const user_1 = require("./actions/user");
32
+ const scheduledMessage_1 = require("./actions/scheduledMessage");
33
+ const webhook_1 = require("./actions/webhook");
34
+ const company_1 = require("./actions/company");
35
+ const macro_1 = require("./actions/macro");
36
+ const notification_1 = require("./actions/notification");
37
+ const report_1 = require("./actions/report");
38
+ const slaPolicy_1 = require("./actions/slaPolicy");
39
+ const agentCapacityPolicy_1 = require("./actions/agentCapacityPolicy");
40
+ const assignmentPolicy_1 = require("./actions/assignmentPolicy");
41
+ const portal_1 = require("./actions/portal");
42
+ const dashboardApp_1 = require("./actions/dashboardApp");
43
+ const customFilter_1 = require("./actions/customFilter");
44
+ const offer_1 = require("./actions/offer");
45
+ const outboundMessage_1 = require("./actions/outboundMessage");
46
+ const scheduledOutboundMessage_1 = require("./actions/scheduledOutboundMessage");
47
+ const whatsappGroup_1 = require("./actions/whatsappGroup");
48
+ const search_1 = require("./actions/search");
49
+ const calendarEvent_1 = require("./actions/calendarEvent");
50
+ const accountTask_1 = require("./actions/accountTask");
51
+ const activityType_1 = require("./actions/activityType");
52
+ const csatResponse_1 = require("./actions/csatResponse");
53
+ const appliedSla_1 = require("./actions/appliedSla");
54
+ const auditLog_1 = require("./actions/auditLog");
55
+ const helpCenterArticle_1 = require("./actions/helpCenterArticle");
56
+ const helpCenterCategory_1 = require("./actions/helpCenterCategory");
57
+ const googleCalendarIntegration_1 = require("./actions/googleCalendarIntegration");
58
+ const googleCalendarSync_1 = require("./actions/googleCalendarSync");
59
+ const captainAssistant_1 = require("./actions/captainAssistant");
60
+ const captainFaq_1 = require("./actions/captainFaq");
61
+ const captainDocument_1 = require("./actions/captainDocument");
62
+ const captainScenario_1 = require("./actions/captainScenario");
63
+ const captainTask_1 = require("./actions/captainTask");
64
+ const captainCopilot_1 = require("./actions/captainCopilot");
65
+ const methods_1 = require("./methods");
66
+ const nodeIdentity_1 = require("./shared/nodeIdentity");
67
+ class Mega {
68
+ constructor() {
69
+ this.description = {
70
+ displayName: "NexaChat",
71
+ name: "nexaChat",
72
+ icon: { light: "file:../../icons/nexachat.svg", dark: "file:../../icons/nexachat.svg" },
73
+ group: ['transform'],
74
+ version: 1,
75
+ subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
76
+ description: "Manage conversations, contacts, WhatsApp, Kanban CRM and NexaAI AI in NexaChat",
77
+ defaults: {
78
+ name: "NexaChat",
79
+ },
80
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
81
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
82
+ credentials: [
83
+ {
84
+ name: "nexaChatApi",
85
+ required: true,
86
+ testedBy: "nexaChatApiCredentialTest",
87
+ displayOptions: {
88
+ show: {
89
+ resource: [
90
+ 'agent', 'agentBotAccount', 'automationRule', 'campaign', 'cannedResponse',
91
+ 'chatRoom', 'contact', 'contactNote', 'conversation', 'customAttribute',
92
+ 'customRole', 'inbox', 'kanbanAutomation', 'kanbanConfig', 'kanbanFunnel',
93
+ 'kanbanItem', 'kanbanStage', 'label', 'messageTemplate', 'platformBanner',
94
+ 'profile', 'scheduledMessage', 'team', 'webhook', 'company', 'macro',
95
+ 'notification', 'report', 'slaPolicy', 'agentCapacityPolicy',
96
+ 'assignmentPolicy', 'portal', 'dashboardApp', 'customFilter', 'offer', 'outboundMessage', 'scheduledOutboundMessage',
97
+ 'whatsappGroup',
98
+ 'search',
99
+ 'calendarEvent',
100
+ 'accountTask',
101
+ 'activityType',
102
+ 'csatResponse',
103
+ 'appliedSla',
104
+ 'auditLog',
105
+ 'helpCenterArticle',
106
+ 'helpCenterCategory',
107
+ 'googleCalendarIntegration',
108
+ 'googleCalendarSync',
109
+ 'captainAssistant',
110
+ 'captainFaq',
111
+ 'captainDocument',
112
+ 'captainScenario',
113
+ 'captainTask',
114
+ 'captainCopilot',
115
+ ],
116
+ },
117
+ },
118
+ },
119
+ {
120
+ name: "nexaChatPlatformApi",
121
+ required: true,
122
+ displayOptions: {
123
+ show: {
124
+ resource: ['account', 'accountUser', 'agentBot', 'platformBannerPlatform', 'user'],
125
+ },
126
+ },
127
+ },
128
+ ],
129
+ codex: {
130
+ categories: ['Communication', 'Utility'],
131
+ },
132
+ usableAsTool: true,
133
+ builderHint: { searchHint: nodeIdentity_1.MEGA_AI_HINT },
134
+ properties: [
135
+ {
136
+ displayName: 'Resource',
137
+ name: 'resource',
138
+ type: 'options',
139
+ noDataExpression: true,
140
+ options: [
141
+ {
142
+ name: '🌐 Platform: Account',
143
+ value: 'account',
144
+ description: '[Platform API] Create, update, delete accounts across the platform',
145
+ },
146
+ {
147
+ name: '🌐 Platform: Account User',
148
+ value: 'accountUser',
149
+ description: '[Platform API] Associate users to accounts',
150
+ },
151
+ {
152
+ name: '🌐 Platform: Agent Bot',
153
+ value: 'agentBot',
154
+ description: '[Platform API] Manage global agent bots',
155
+ },
156
+ {
157
+ name: '🌐 Platform: Banner',
158
+ value: 'platformBannerPlatform',
159
+ description: '[Platform API] Create and manage platform-wide banners',
160
+ },
161
+ {
162
+ name: '🌐 Platform: User',
163
+ value: 'user',
164
+ description: '[Platform API] Create, update, delete users across the platform',
165
+ },
166
+ {
167
+ name: 'Agent',
168
+ value: 'agent',
169
+ description: 'Manage agents in your account',
170
+ },
171
+ {
172
+ name: 'Agent Bot (Account)',
173
+ value: 'agentBotAccount',
174
+ description: 'Manage agent bots assigned to your account',
175
+ },
176
+ {
177
+ name: 'Automation Rule',
178
+ value: 'automationRule',
179
+ description: 'Manage automation rules',
180
+ },
181
+ {
182
+ name: 'Campaign',
183
+ value: 'campaign',
184
+ description: 'Manage campaigns',
185
+ },
186
+ {
187
+ name: 'Canned Response',
188
+ value: 'cannedResponse',
189
+ description: 'Manage canned responses (quick reply templates)',
190
+ },
191
+ {
192
+ name: 'Chat Room',
193
+ value: 'chatRoom',
194
+ description: 'Manage chat rooms, members, and messages',
195
+ },
196
+ {
197
+ name: 'Contact',
198
+ value: 'contact',
199
+ description: 'Manage contacts',
200
+ },
201
+ {
202
+ name: 'Contact Note',
203
+ value: 'contactNote',
204
+ description: 'Manage notes on contacts',
205
+ },
206
+ {
207
+ name: 'Conversation',
208
+ value: 'conversation',
209
+ description: 'Manage conversations',
210
+ },
211
+ {
212
+ name: 'Custom Attribute',
213
+ value: 'customAttribute',
214
+ description: 'Manage custom attributes on contacts and conversations',
215
+ },
216
+ {
217
+ name: 'Custom Role',
218
+ value: 'customRole',
219
+ description: 'Manage custom roles and permissions',
220
+ },
221
+ {
222
+ name: 'Inbox',
223
+ value: 'inbox',
224
+ description: 'Manage inboxes',
225
+ },
226
+ {
227
+ name: 'Kanban Automation',
228
+ value: 'kanbanAutomation',
229
+ description: 'Manage Kanban automations (account and legacy global endpoints)',
230
+ },
231
+ {
232
+ name: 'Kanban Config',
233
+ value: 'kanbanConfig',
234
+ description: 'Manage Kanban configuration and webhook tests',
235
+ },
236
+ {
237
+ name: 'Kanban Funnel',
238
+ value: 'kanbanFunnel',
239
+ description: 'Manage Kanban funnels and stage stats',
240
+ },
241
+ {
242
+ name: 'Kanban Item',
243
+ value: 'kanbanItem',
244
+ description: 'Manage Kanban items, checklist, notes, bulk actions, import/export, and attachments',
245
+ },
246
+ {
247
+ name: 'Kanban Stage',
248
+ value: 'kanbanStage',
249
+ description: 'Manage Kanban stages',
250
+ },
251
+ {
252
+ name: 'Label',
253
+ value: 'label',
254
+ description: 'Manage labels',
255
+ },
256
+ {
257
+ name: 'Message Template',
258
+ value: 'messageTemplate',
259
+ description: 'Manage WhatsApp message templates',
260
+ },
261
+ {
262
+ name: 'Platform Banner',
263
+ value: 'platformBanner',
264
+ description: 'View and dismiss platform banners for your user',
265
+ },
266
+ {
267
+ name: 'Profile',
268
+ value: 'profile',
269
+ description: 'Access your user profile and authentication info',
270
+ },
271
+ {
272
+ name: 'Scheduled Message',
273
+ value: 'scheduledMessage',
274
+ description: 'Manage scheduled messages',
275
+ },
276
+ {
277
+ name: 'Scheduled Outbound Message',
278
+ value: 'scheduledOutboundMessage',
279
+ description: 'Schedule a message for a recipient without a prior conversation',
280
+ },
281
+ {
282
+ name: 'Team',
283
+ value: 'team',
284
+ description: 'Manage teams and team members',
285
+ },
286
+ {
287
+ name: 'Webhook',
288
+ value: 'webhook',
289
+ description: 'Manage outgoing account webhooks',
290
+ },
291
+ { name: 'Agent Capacity Policy', value: 'agentCapacityPolicy', description: 'Manage agent capacity policies' },
292
+ { name: 'Assignment Policy', value: 'assignmentPolicy', description: 'Manage assignment policies' },
293
+ { name: 'Company', value: 'company', description: 'Manage companies' },
294
+ { name: 'Custom Filter', value: 'customFilter', description: 'Manage custom filters' },
295
+ { name: 'Dashboard App', value: 'dashboardApp', description: 'Manage dashboard apps' },
296
+ { name: 'Macro', value: 'macro', description: 'Manage macros' },
297
+ { name: 'Notification', value: 'notification', description: 'Manage notifications' },
298
+ { name: 'Offer', value: 'offer', description: 'Manage offers' },
299
+ { name: 'Outbound Message', value: 'outboundMessage', description: 'Send a message to a recipient without a prior conversation' },
300
+ { name: 'Portal', value: 'portal', description: 'Manage help center portals' },
301
+ { name: 'Report', value: 'report', description: 'Read analytics reports' },
302
+ { name: 'SLA Policy', value: 'slaPolicy', description: 'Manage SLA policies' },
303
+ { name: 'Google Calendar Sync', value: 'googleCalendarSync', description: 'Sync Kanban items with Google Calendar and check sync health' },
304
+ { name: 'Google Calendar Integration', value: 'googleCalendarIntegration', description: "Connect Google Calendar and choose the calendar NexaChat syncs with" },
305
+ { name: "NexaAI: Copilot", value: 'captainCopilot', description: 'Ask Copilot questions in threads' },
306
+ { name: "NexaAI: AI Task", value: 'captainTask', description: 'Summarize conversations, suggest replies and labels, and rewrite text' },
307
+ { name: "NexaAI: Scenario", value: 'captainScenario', description: "Manage how a NexaAI assistant handles specific situations" },
308
+ { name: "NexaAI: Document", value: 'captainDocument', description: "Manage the web pages NexaAI learns from" },
309
+ { name: "NexaAI: FAQ", value: 'captainFaq', description: "Manage the questions and answers NexaAI assistants use" },
310
+ { name: "NexaAI: Assistant", value: 'captainAssistant', description: "Manage NexaAI AI assistants, ask them questions and connect inboxes" },
311
+ { name: 'Help Center Category', value: 'helpCenterCategory', description: 'Manage help center categories' },
312
+ { name: 'Help Center Article', value: 'helpCenterArticle', description: 'Manage help center articles' },
313
+ { name: 'Audit Log', value: 'auditLog', description: 'Read account audit logs' },
314
+ { name: 'Applied SLA', value: 'appliedSla', description: 'Read applied SLAs and their metrics' },
315
+ { name: 'CSAT Response', value: 'csatResponse', description: 'Read CSAT survey responses and metrics' },
316
+ { name: 'Activity Type', value: 'activityType', description: 'Manage the activity types used by tasks' },
317
+ { name: 'Task', value: 'accountTask', description: 'Manage tasks (activities) and task reports' },
318
+ { name: 'Calendar Event', value: 'calendarEvent', description: 'Manage calendar events and their Google Calendar sync' },
319
+ { name: 'Search', value: 'search', description: 'Search contacts, conversations, messages and articles' },
320
+ { name: 'WhatsApp Group', value: 'whatsappGroup', description: 'Manage WhatsApp group members, subject, picture and invite link' },
321
+ ],
322
+ default: 'conversation',
323
+ },
324
+ ...profile_1.profileDescription,
325
+ ...account_1.accountDescription,
326
+ ...accountUser_1.accountUserDescription,
327
+ ...agent_1.agentDescription,
328
+ ...agentBot_1.agentBotDescription,
329
+ ...agentBotAccount_1.agentBotAccountDescription,
330
+ ...automationRule_1.automationRuleDescription,
331
+ ...cannedResponse_1.cannedResponseDescription,
332
+ ...campaign_1.campaignDescription,
333
+ ...chatRoom_1.chatRoomDescription,
334
+ ...inbox_1.inboxDescription,
335
+ ...kanbanAutomation_1.kanbanAutomationDescription,
336
+ ...kanbanConfig_1.kanbanConfigDescription,
337
+ ...kanbanFunnel_1.kanbanFunnelDescription,
338
+ ...kanbanItem_1.kanbanItemDescription,
339
+ ...kanbanStage_1.kanbanStageDescription,
340
+ ...contact_1.contactDescription,
341
+ ...contactNote_1.contactNoteDescription,
342
+ ...conversation_1.conversationDescription,
343
+ ...customAttribute_1.customAttributeDescription,
344
+ ...customRole_1.customRoleDescription,
345
+ ...label_1.labelDescription,
346
+ ...messageTemplate_1.messageTemplateDescription,
347
+ ...platformBanner_1.platformBannerDescription,
348
+ ...platformBannerPlatform_1.platformBannerPlatformDescription,
349
+ ...scheduledMessage_1.scheduledMessageDescription,
350
+ ...team_1.teamDescription,
351
+ ...user_1.userDescription,
352
+ ...webhook_1.webhookDescription,
353
+ ...company_1.companyDescription, ...macro_1.macroDescription, ...notification_1.notificationDescription, ...report_1.reportDescription,
354
+ ...slaPolicy_1.slaPolicyDescription, ...agentCapacityPolicy_1.agentCapacityPolicyDescription, ...assignmentPolicy_1.assignmentPolicyDescription,
355
+ ...portal_1.portalDescription, ...dashboardApp_1.dashboardAppDescription, ...customFilter_1.customFilterDescription, ...offer_1.offerDescription,
356
+ ...outboundMessage_1.outboundMessageDescription, ...scheduledOutboundMessage_1.scheduledOutboundMessageDescription,
357
+ ...whatsappGroup_1.whatsappGroupDescription,
358
+ ...search_1.searchDescription,
359
+ ...calendarEvent_1.calendarEventDescription,
360
+ ...accountTask_1.accountTaskDescription,
361
+ ...activityType_1.activityTypeDescription,
362
+ ...csatResponse_1.csatResponseDescription,
363
+ ...appliedSla_1.appliedSlaDescription,
364
+ ...auditLog_1.auditLogDescription,
365
+ ...helpCenterArticle_1.helpCenterArticleDescription,
366
+ ...helpCenterCategory_1.helpCenterCategoryDescription,
367
+ ...googleCalendarIntegration_1.googleCalendarIntegrationDescription,
368
+ ...googleCalendarSync_1.googleCalendarSyncDescription,
369
+ ...captainAssistant_1.captainAssistantDescription,
370
+ ...captainFaq_1.captainFaqDescription,
371
+ ...captainDocument_1.captainDocumentDescription,
372
+ ...captainScenario_1.captainScenarioDescription,
373
+ ...captainTask_1.captainTaskDescription,
374
+ ...captainCopilot_1.captainCopilotDescription,
375
+ ],
376
+ };
377
+ this.methods = {
378
+ credentialTest: methods_1.credentialTest,
379
+ listSearch: methods_1.listSearch,
380
+ loadOptions: methods_1.loadOptions,
381
+ resourceMapping: methods_1.resourceMapping,
382
+ };
383
+ }
384
+ async execute() {
385
+ const items = this.getInputData();
386
+ const returnData = [];
387
+ const resource = this.getNodeParameter('resource', 0);
388
+ const operation = this.getNodeParameter('operation', 0);
389
+ const isToolMode = this.getNode().type.endsWith('Tool');
390
+ for (let i = 0; i < items.length; i++) {
391
+ try {
392
+ let responseData;
393
+ switch (resource) {
394
+ case 'profile':
395
+ responseData = await (0, profile_1.executeProfileOperation)(this, operation);
396
+ break;
397
+ case 'account':
398
+ responseData = await (0, account_1.executeAccountOperation)(this, operation, i);
399
+ break;
400
+ case 'accountUser':
401
+ responseData = await (0, accountUser_1.executeAccountUserOperation)(this, operation, i);
402
+ break;
403
+ case 'agent':
404
+ responseData = await (0, agent_1.executeAgentOperation)(this, operation, i);
405
+ break;
406
+ case 'agentBot':
407
+ responseData = await (0, agentBot_1.executeAgentBotOperation)(this, operation, i);
408
+ break;
409
+ case 'agentBotAccount':
410
+ responseData = await (0, agentBotAccount_1.executeAgentBotAccountOperation)(this, operation, i);
411
+ break;
412
+ case 'automationRule':
413
+ responseData = await (0, automationRule_1.executeAutomationRuleOperation)(this, operation, i);
414
+ break;
415
+ case 'cannedResponse':
416
+ responseData = await (0, cannedResponse_1.executeCannedResponseOperation)(this, operation, i);
417
+ break;
418
+ case 'campaign':
419
+ responseData = await (0, campaign_1.executeCampaignOperation)(this, operation, i);
420
+ break;
421
+ case 'chatRoom':
422
+ responseData = await (0, chatRoom_1.executeChatRoomOperation)(this, operation, i);
423
+ break;
424
+ case 'inbox':
425
+ responseData = await (0, inbox_1.executeInboxOperation)(this, operation, i);
426
+ break;
427
+ case 'kanbanAutomation':
428
+ responseData = await (0, kanbanAutomation_1.executeKanbanAutomationOperation)(this, operation, i);
429
+ break;
430
+ case 'kanbanConfig':
431
+ responseData = await (0, kanbanConfig_1.executeKanbanConfigOperation)(this, operation, i);
432
+ break;
433
+ case 'kanbanFunnel':
434
+ responseData = await (0, kanbanFunnel_1.executeKanbanFunnelOperation)(this, operation, i);
435
+ break;
436
+ case 'kanbanItem':
437
+ responseData = await (0, kanbanItem_1.executeKanbanItemOperation)(this, operation, i);
438
+ break;
439
+ case 'kanbanStage':
440
+ responseData = await (0, kanbanStage_1.executeKanbanStageOperation)(this, operation, i);
441
+ break;
442
+ case 'contact':
443
+ responseData = await (0, contact_1.executeContactOperation)(this, operation, i);
444
+ break;
445
+ case 'contactNote':
446
+ responseData = await (0, contactNote_1.executeContactNoteOperation)(this, operation, i);
447
+ break;
448
+ case 'conversation':
449
+ responseData = await (0, conversation_1.executeConversationOperation)(this, operation, i);
450
+ break;
451
+ case 'customAttribute':
452
+ responseData = await (0, customAttribute_1.executeCustomAttributeOperation)(this, operation, i);
453
+ break;
454
+ case 'customRole':
455
+ responseData = await (0, customRole_1.executeCustomRoleOperation)(this, operation, i);
456
+ break;
457
+ case 'label':
458
+ responseData = await (0, label_1.executeLabelOperation)(this, operation, i);
459
+ break;
460
+ case 'messageTemplate':
461
+ responseData = await (0, messageTemplate_1.executeMessageTemplateOperation)(this, operation, i);
462
+ break;
463
+ case 'platformBanner':
464
+ responseData = await (0, platformBanner_1.executePlatformBannerOperation)(this, operation, i);
465
+ break;
466
+ case 'platformBannerPlatform':
467
+ responseData = await (0, platformBannerPlatform_1.executePlatformBannerPlatformOperation)(this, operation, i);
468
+ break;
469
+ case 'scheduledMessage':
470
+ responseData = await (0, scheduledMessage_1.executeScheduledMessageOperation)(this, operation, i);
471
+ break;
472
+ case 'team':
473
+ responseData = await (0, team_1.executeTeamOperation)(this, operation, i);
474
+ break;
475
+ case 'user':
476
+ responseData = await (0, user_1.executeUserOperation)(this, operation, i);
477
+ break;
478
+ case 'webhook':
479
+ responseData = await (0, webhook_1.executeWebhookOperation)(this, operation, i);
480
+ break;
481
+ case 'company':
482
+ responseData = await (0, company_1.executeCompanyOperation)(this, operation, i);
483
+ break;
484
+ case 'macro':
485
+ responseData = await (0, macro_1.executeMacroOperation)(this, operation, i);
486
+ break;
487
+ case 'notification':
488
+ responseData = await (0, notification_1.executeNotificationOperation)(this, operation, i);
489
+ break;
490
+ case 'report':
491
+ responseData = await (0, report_1.executeReportOperation)(this, operation, i);
492
+ break;
493
+ case 'slaPolicy':
494
+ responseData = await (0, slaPolicy_1.executeSlaPolicyOperation)(this, operation, i);
495
+ break;
496
+ case 'agentCapacityPolicy':
497
+ responseData = await (0, agentCapacityPolicy_1.executeAgentCapacityPolicyOperation)(this, operation, i);
498
+ break;
499
+ case 'assignmentPolicy':
500
+ responseData = await (0, assignmentPolicy_1.executeAssignmentPolicyOperation)(this, operation, i);
501
+ break;
502
+ case 'portal':
503
+ responseData = await (0, portal_1.executePortalOperation)(this, operation, i);
504
+ break;
505
+ case 'dashboardApp':
506
+ responseData = await (0, dashboardApp_1.executeDashboardAppOperation)(this, operation, i);
507
+ break;
508
+ case 'customFilter':
509
+ responseData = await (0, customFilter_1.executeCustomFilterOperation)(this, operation, i);
510
+ break;
511
+ case 'offer':
512
+ responseData = await (0, offer_1.executeOfferOperation)(this, operation, i);
513
+ break;
514
+ case 'outboundMessage':
515
+ responseData = await (0, outboundMessage_1.executeOutboundMessageOperation)(this, operation, i);
516
+ break;
517
+ case 'scheduledOutboundMessage':
518
+ responseData = await (0, scheduledOutboundMessage_1.executeScheduledOutboundMessageOperation)(this, operation, i);
519
+ break;
520
+ case 'whatsappGroup':
521
+ responseData = await (0, whatsappGroup_1.executeWhatsappGroupOperation)(this, operation, i);
522
+ break;
523
+ case 'search':
524
+ responseData = await (0, search_1.executeSearchOperation)(this, operation, i);
525
+ break;
526
+ case 'calendarEvent':
527
+ responseData = await (0, calendarEvent_1.executeCalendarEventOperation)(this, operation, i);
528
+ break;
529
+ case 'accountTask':
530
+ responseData = await (0, accountTask_1.executeAccountTaskOperation)(this, operation, i);
531
+ break;
532
+ case 'activityType':
533
+ responseData = await (0, activityType_1.executeActivityTypeOperation)(this, operation, i);
534
+ break;
535
+ case 'csatResponse':
536
+ responseData = await (0, csatResponse_1.executeCsatResponseOperation)(this, operation, i);
537
+ break;
538
+ case 'appliedSla':
539
+ responseData = await (0, appliedSla_1.executeAppliedSlaOperation)(this, operation, i);
540
+ break;
541
+ case 'auditLog':
542
+ responseData = await (0, auditLog_1.executeAuditLogOperation)(this, operation, i);
543
+ break;
544
+ case 'helpCenterArticle':
545
+ responseData = await (0, helpCenterArticle_1.executeHelpCenterArticleOperation)(this, operation, i);
546
+ break;
547
+ case 'helpCenterCategory':
548
+ responseData = await (0, helpCenterCategory_1.executeHelpCenterCategoryOperation)(this, operation, i);
549
+ break;
550
+ case 'googleCalendarIntegration':
551
+ responseData = await (0, googleCalendarIntegration_1.executeGoogleCalendarIntegrationOperation)(this, operation, i);
552
+ break;
553
+ case 'googleCalendarSync':
554
+ responseData = await (0, googleCalendarSync_1.executeGoogleCalendarSyncOperation)(this, operation, i);
555
+ break;
556
+ case 'captainAssistant':
557
+ responseData = await (0, captainAssistant_1.executeCaptainAssistantOperation)(this, operation, i);
558
+ break;
559
+ case 'captainFaq':
560
+ responseData = await (0, captainFaq_1.executeCaptainFaqOperation)(this, operation, i);
561
+ break;
562
+ case 'captainDocument':
563
+ responseData = await (0, captainDocument_1.executeCaptainDocumentOperation)(this, operation, i);
564
+ break;
565
+ case 'captainScenario':
566
+ responseData = await (0, captainScenario_1.executeCaptainScenarioOperation)(this, operation, i);
567
+ break;
568
+ case 'captainTask':
569
+ responseData = await (0, captainTask_1.executeCaptainTaskOperation)(this, operation, i);
570
+ break;
571
+ case 'captainCopilot':
572
+ responseData = await (0, captainCopilot_1.executeCaptainCopilotOperation)(this, operation, i);
573
+ break;
574
+ }
575
+ if (Array.isArray(responseData)) {
576
+ returnData.push(...responseData);
577
+ }
578
+ else {
579
+ returnData.push(responseData);
580
+ }
581
+ }
582
+ catch (error) {
583
+ if (isToolMode) {
584
+ returnData.push({
585
+ json: { error: `There was an error: "${error.message}"` },
586
+ pairedItem: { item: i },
587
+ });
588
+ continue;
589
+ }
590
+ if (this.continueOnFail()) {
591
+ returnData.push({
592
+ json: { error: error.message },
593
+ pairedItem: { item: i },
594
+ });
595
+ continue;
596
+ }
597
+ throw error;
598
+ }
599
+ }
600
+ return [returnData];
601
+ }
602
+ }
603
+ exports.Mega = Mega;
@@ -0,0 +1,17 @@
1
+ {
2
+ "node": "@nexaomni/n8n-nodes-nexachat.nexaChat",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": [
6
+ "Communication",
7
+ "Sales",
8
+ "Utility"
9
+ ],
10
+ "resources": {
11
+ "credentialDocumentation": [
12
+ {
13
+ "url": "https://nexaomni.com.br"
14
+ }
15
+ ]
16
+ }
17
+ }