@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
package/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NexaOmni
4
+
5
+ Portions derived from @clubmega/n8n-nodes-mega (MIT) — see upstream/LICENSE.upstream.md.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # @nexaomni/n8n-nodes-nexachat
2
+
3
+ Nodes do **NexaChat** para o n8n: conversas, contatos, WhatsApp, Kanban CRM, Captain (IA),
4
+ agenda, Help Center e mais — e, na Fase 2, os módulos próprios da NexaOmni
5
+ (Instagram, Anúncios, Formulários).
6
+
7
+ ## Guia para clientes
8
+ Ver [`docs/GUIA-DO-CLIENTE.md`](docs/GUIA-DO-CLIENTE.md) (cliente-safe: instalação, credencial, exemplos, erros).
9
+
10
+ ## Instalação (n8n self-hosted)
11
+
12
+ **Settings → Community Nodes → Install** → `@nexaomni/n8n-nodes-nexachat`
13
+
14
+ Credencial **NexaChat API**:
15
+ - **URL**: `https://chat.nexaomni.com.br`
16
+ - **Access Token**: Perfil → Configurações → Token de acesso
17
+
18
+ ## Como o pacote é feito
19
+
20
+ ```
21
+ @clubmega/n8n-nodes-mega (npm, MIT) ← node oficial do MEGA, por Nestor Davalos
22
+ │ scripts/sync-upstream.mjs
23
+ │ 1. npm pack <versão> + confere integridade com upstream.lock.json
24
+ │ 2. de-para MEGA → NexaChat (rebrand/rules.mjs), só em strings, via AST
25
+ │ 3. guarda: falha se sobrar MEGA/Chatwoot/WAHA/Evolution/UAZAPI em texto
26
+ ▼
27
+ upstream/ (versionado — o diff do PR mostra o que mudou na release)
28
+ │ scripts/build.mjs
29
+ ▼
30
+ dist/ = upstream/ + src/ (nodes próprios NexaOmni, TypeScript — Fase 2)
31
+ ```
32
+
33
+ | Comando | O quê |
34
+ |---|---|
35
+ | `npm run sync` | Reaplica o de-para na versão do `upstream.lock.json` (após mudar regras) |
36
+ | `npm run sync:latest` | Puxa a última versão do Nestor |
37
+ | `npm test` | Build + testes (carrega nodes como o n8n, procura vazamento de marca) |
38
+
39
+ ### Quando o Nestor lançar versão nova
40
+ Automático: o workflow `sync-upstream` roda todo dia às 08:00, e abre **PR** (de-para ok) ou
41
+ **issue** (frase nova com marca → precisa de regra). Manual: `npm run sync:latest && npm test`.
42
+
43
+ Se o guarda falhar, adicione em `rebrand/rules.mjs`:
44
+ - texto de tela → `PHRASES` (trecho) ou `EXACT` (string inteira);
45
+ - valor interno enviado à API (não aparece na tela) → `ALLOWLIST`, com comentário justificando.
46
+
47
+ ### Publicar
48
+ `npm version <minor|patch>` → push → `git tag vX.Y.Z && git push --tags` (workflow `publish`, precisa do secret `NPM_TOKEN`).
49
+
50
+ ## Nodes próprios NexaOmni (Fase 2 — `src/`)
51
+
52
+ | Node | Operações |
53
+ |---|---|
54
+ | **NexaChat Instagram** | Comentários: listar, responder, DM, ocultar, resolver · Leads · Posts: agendar, agendados, publicados, métricas · Mídia: upload · Conta: crescimento |
55
+ | **NexaChat Instagram Trigger** | Novo comentário / novo lead (polling, cursor `after_id`) |
56
+ | **NexaChat Forms** | Formulários: listar · Respostas: listar (filtro por data/busca) |
57
+ | **NexaChat Forms Trigger** | Dispara a cada nova resposta de um formulário (polling) |
58
+ | **NexaChat Ads** | Status · Insights · Atribuição (ROAS) · Funil · Vendas por anúncio · Origens · Saúde da CAPI · **Enviar conversão** (POST /mkt/events) |
59
+ | **NexaChat Ads Trigger** | Novo lead vindo de anúncio (polling, conjunto de conversas já vistas) |
60
+
61
+ Usam a **mesma credencial NexaChat API**. Falam com o backend dos módulos
62
+ (`https://engagement.nexaomni.com.br/n8n/v1`, repo `nexa-social`), que valida o Access Token no
63
+ NexaChat, exige que o usuário seja membro da conta e aplica as mesmas permissões da tela. Só uma
64
+ lista branca de rotas é exposta (`backend/routes/n8n.js` no nexa-social) — nada destrutivo, de
65
+ configuração ou de conexão com a Meta. Homologação: `NEXACHAT_MODULES_URL` no servidor n8n.
66
+
67
+ Rota nova = liberar em `ALLOWED` (nexa-social) + operação no node aqui.
68
+
69
+ ## O que o de-para muda
70
+ - Nome/ícone/descrições: MEGA → **NexaChat**; ícone `icons/nexachat.svg`.
71
+ - Tipos: `nexaChat`, `nexaChatTrigger`; credenciais `nexaChatApi`, `nexaChatPlatformApi`.
72
+ - Provedores de WhatsApp não oficiais aparecem como **"QR Code"** (nunca WAHA/Evolution/UAZAPI).
73
+ - **Captain → NexaAI** em todo texto de tela (mesmo de-para do DS `nexaai-captain-renamer`); rotas/ids `captain*` minúsculos intactos.
74
+ - Remove os aliases legacy `Chatwoot` / `Chatwoot Trigger`.
75
+ - **Remove a Platform API** (contas, usuários da plataforma, banners globais, agent bots da plataforma) e a credencial Platform: conta só se cria/suspende pelo ERP. Feito em `src/nodes/NexaChat/NexaChat.node.ts`, que estende o node do upstream e lê a lista de recursos Platform da própria definição dele.
76
+ - Texto de contexto pra agentes de IA (n8n MCP/AI Builder) reescrito sem citar MEGA/Chatwoot.
77
+ - Valores de API (`whatsapp_waha`, rotas etc.) ficam intactos — o comportamento é idêntico ao original.
78
+
79
+ ## Licença
80
+ MIT. Derivado de [`@clubmega/n8n-nodes-mega`](https://www.npmjs.com/package/@clubmega/n8n-nodes-mega) (MIT) —
81
+ licença original em `upstream/LICENSE.upstream.md` (copiada para `dist/`).
@@ -0,0 +1,19 @@
1
+ Copyright 2022 n8n
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MegaApi = void 0;
4
+ class MegaApi {
5
+ constructor() {
6
+ this.name = "nexaChatApi";
7
+ this.displayName = "NexaChat API";
8
+ this.documentationUrl = "https://nexaomni.com.br";
9
+ this.properties = [
10
+ {
11
+ displayName: "NexaChat API URL",
12
+ name: 'url',
13
+ type: 'string',
14
+ default: '',
15
+ required: true,
16
+ placeholder: "https://chat.nexaomni.com.br",
17
+ description: "Base URL of your NexaChat instance. E.g.: https://chat.nexaomni.com.br",
18
+ },
19
+ {
20
+ displayName: "Use the URL of your NexaChat workspace and an Access Token from your profile. Need help? <a href=\"https://nexaomni.com.br\" target=\"_blank\">nexaomni.com.br</a>",
21
+ name: 'apiNotice',
22
+ type: 'notice',
23
+ default: '',
24
+ },
25
+ {
26
+ displayName: 'Access Token',
27
+ name: 'accessToken',
28
+ type: 'string',
29
+ default: '',
30
+ required: true,
31
+ placeholder: 'your-access-token',
32
+ typeOptions: {
33
+ password: true,
34
+ },
35
+ description: "Personal Access Token from your NexaChat profile (Profile settings > Access Token) or an Agent Bot access token. Agent Bot tokens only work with the conversation, message, contact, agent and team operations NexaChat allows for bots.",
36
+ },
37
+ ];
38
+ this.authenticate = {
39
+ type: 'generic',
40
+ properties: {
41
+ headers: {
42
+ 'Api-Access-Token': '={{$credentials.accessToken}}',
43
+ },
44
+ },
45
+ };
46
+ this.icon = { light: "file:../icons/nexachat.svg", dark: "file:../icons/nexachat.svg" };
47
+ }
48
+ }
49
+ exports.MegaApi = MegaApi;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MegaPlatformApi = void 0;
4
+ class MegaPlatformApi {
5
+ constructor() {
6
+ this.name = "nexaChatPlatformApi";
7
+ this.displayName = "NexaChat Platform API";
8
+ this.documentationUrl = "https://nexaomni.com.br";
9
+ this.properties = [
10
+ {
11
+ displayName: "NexaChat API URL",
12
+ name: 'url',
13
+ type: 'string',
14
+ default: '',
15
+ required: true,
16
+ placeholder: "https://chat.nexaomni.com.br",
17
+ description: "Base URL of your NexaChat instance. E.g.: https://chat.nexaomni.com.br",
18
+ },
19
+ {
20
+ displayName: 'Platform API tokens are for superadmin-level operations like managing platform banners, users, and accounts across the entire platform.',
21
+ name: 'platformApiNotice',
22
+ type: 'notice',
23
+ default: '',
24
+ },
25
+ {
26
+ displayName: 'Platform Access Token',
27
+ name: 'platformAccessToken',
28
+ type: 'string',
29
+ default: '',
30
+ required: true,
31
+ placeholder: 'your-platform-access-token',
32
+ typeOptions: {
33
+ password: true,
34
+ },
35
+ description: "Platform API Access Token from your NexaChat platform app. Generate it in Super Admin > Platform Apps.",
36
+ },
37
+ ];
38
+ this.authenticate = {
39
+ type: 'generic',
40
+ properties: {
41
+ headers: {
42
+ 'api_access_token': '={{$credentials.platformAccessToken}}',
43
+ },
44
+ },
45
+ };
46
+ this.test = {
47
+ request: {
48
+ baseURL: '={{$credentials.url}}',
49
+ url: '/platform/api/v1/platform_banners',
50
+ },
51
+ };
52
+ this.icon = { light: "file:../icons/nexachat.svg", dark: "file:../icons/nexachat.svg" };
53
+ }
54
+ }
55
+ exports.MegaPlatformApi = MegaPlatformApi;
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Camada_1" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 350 350">
3
+ <!-- Generator: Adobe Illustrator 29.8.2, SVG Export Plug-In . SVG Version: 2.1.1 Build 3) -->
4
+ <defs>
5
+ <style>
6
+ .st0 {
7
+ fill: #00e0c7;
8
+ }
9
+
10
+ .st1 {
11
+ fill: #e045ff;
12
+ }
13
+
14
+ .st2 {
15
+ fill: none;
16
+ stroke: url(#Gradiente_sem_nome);
17
+ stroke-width: 41px;
18
+ }
19
+ </style>
20
+ <linearGradient id="Gradiente_sem_nome" data-name="Gradiente sem nome" x1="-1642.62" y1="317.49" x2="-1637.71" y2="312.59" gradientTransform="translate(124824.77 24121) scale(76 -76)" gradientUnits="userSpaceOnUse">
21
+ <stop offset="0" stop-color="#1565ff"/>
22
+ <stop offset="1" stop-color="#00e0c7"/>
23
+ </linearGradient>
24
+ </defs>
25
+ <circle class="st2" cx="172.04" cy="177.8" r="119.67"/>
26
+ <circle class="st1" cx="291.71" cy="177.8" r="31.91"/>
27
+ <circle class="st0" cx="109.84" cy="77.64" r="31.91"/>
28
+ <circle class="st0" cx="109.84" cy="278.36" r="31.91"/>
29
+ </svg>