n8n-nodes-aib 0.3.2 → 0.4.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.
@@ -23,6 +23,7 @@ function contaQs(ctx, i) {
23
23
  class AibDigital {
24
24
  description = {
25
25
  displayName: "AIB Digital",
26
+ icon: "file:aibdigital.svg",
26
27
  name: "aibDigital",
27
28
  group: ["output"],
28
29
  version: 1,
@@ -44,23 +45,79 @@ class AibDigital {
44
45
  default: "",
45
46
  description: "O cliente. Com chave de agência, escolha aqui; com chave de conta, deixe vazio.",
46
47
  },
48
+ // ── Recurso → Operação, como no nó do Chatwoot ──────────────
49
+ {
50
+ displayName: "Recurso",
51
+ name: "recurso",
52
+ type: "options",
53
+ noDataExpression: true,
54
+ default: "conversa",
55
+ options: [
56
+ { name: "Conta", value: "conta" },
57
+ { name: "Conversa", value: "conversa" },
58
+ { name: "Mensagem", value: "mensagem" },
59
+ { name: "Contato", value: "contato" },
60
+ { name: "Funil (Kanban)", value: "funil" },
61
+ ],
62
+ },
47
63
  {
48
64
  displayName: "Operação",
49
65
  name: "operation",
50
66
  type: "options",
51
67
  noDataExpression: true,
52
- default: "enviarMensagem",
68
+ default: "selecionarConta",
69
+ displayOptions: { show: { recurso: ["conta"] } },
53
70
  options: [
54
71
  { name: "Selecionar conta", value: "selecionarConta", action: "Selecionar a conta (âncora do fluxo)" },
55
- { name: "Enviar mensagem", value: "enviarMensagem", action: "Enviar mensagem de texto" },
72
+ ],
73
+ },
74
+ {
75
+ displayName: "Operação",
76
+ name: "operation",
77
+ type: "options",
78
+ noDataExpression: true,
79
+ default: "listarConversas",
80
+ displayOptions: { show: { recurso: ["conversa"] } },
81
+ options: [
56
82
  { name: "Listar conversas", value: "listarConversas", action: "Listar conversas" },
57
83
  { name: "Buscar conversa", value: "buscarConversa", action: "Buscar uma conversa" },
58
- { name: "Listar mensagens", value: "listarMensagens", action: "Listar mensagens da conversa" },
59
84
  { name: "Mover etapa (Kanban)", value: "moverEtapa", action: "Mover card no funil" },
60
85
  { name: "Pausar/religar IA", value: "mudarIa", action: "Pausar ou religar a IA na conversa" },
61
86
  { name: "Atribuir atendente", value: "atribuirAtendente", action: "Atribuir a conversa a uma pessoa" },
62
- { name: "Atualizar contato", value: "atualizarContato", action: "Atualizar dados do contato" },
63
87
  { name: "Etiquetas da conversa", value: "mudarEtiquetas", action: "Adicionar/remover etiquetas na conversa" },
88
+ ],
89
+ },
90
+ {
91
+ displayName: "Operação",
92
+ name: "operation",
93
+ type: "options",
94
+ noDataExpression: true,
95
+ default: "enviarMensagem",
96
+ displayOptions: { show: { recurso: ["mensagem"] } },
97
+ options: [
98
+ { name: "Enviar mensagem", value: "enviarMensagem", action: "Enviar mensagem de texto" },
99
+ { name: "Listar mensagens", value: "listarMensagens", action: "Listar mensagens da conversa" },
100
+ ],
101
+ },
102
+ {
103
+ displayName: "Operação",
104
+ name: "operation",
105
+ type: "options",
106
+ noDataExpression: true,
107
+ default: "atualizarContato",
108
+ displayOptions: { show: { recurso: ["contato"] } },
109
+ options: [
110
+ { name: "Atualizar contato", value: "atualizarContato", action: "Atualizar dados do contato" },
111
+ ],
112
+ },
113
+ {
114
+ displayName: "Operação",
115
+ name: "operation",
116
+ type: "options",
117
+ noDataExpression: true,
118
+ default: "criarFunil",
119
+ displayOptions: { show: { recurso: ["funil"] } },
120
+ options: [
64
121
  { name: "Criar funil", value: "criarFunil", action: "Criar funil com etapas" },
65
122
  { name: "Criar etapa", value: "criarEtapa", action: "Criar etapa num funil" },
66
123
  ],
@@ -28,6 +28,7 @@ async function apiHook(ctx, method, path, body, qs) {
28
28
  class AibDigitalTrigger {
29
29
  description = {
30
30
  displayName: "AIB Digital Trigger",
31
+ icon: "file:aibdigital.svg",
31
32
  name: "aibDigitalTrigger",
32
33
  group: ["trigger"],
33
34
  version: 1,
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60">
2
+ <rect width="60" height="60" rx="13" fill="#0D141C"/>
3
+ <rect x="1.5" y="1.5" width="57" height="57" rx="11.5" fill="none" stroke="#37BFDB" stroke-opacity=".35" stroke-width="3"/>
4
+ <path d="M14 42 L24 18 h4 L38 42 h-6 l-2-5 H22 l-2 5 Z M24 32 h4.5 L26.2 25 Z" fill="#37BFDB"/>
5
+ <circle cx="43" cy="21" r="4" fill="#57B98A"/>
6
+ <rect x="39" y="29" width="8" height="13" rx="2.5" fill="#E8EEF3" opacity=".85"/>
7
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-aib",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Nós do Sistema AIB Digital para n8n: gatilho de mensagens do WhatsApp (via AIB Inbox) e ações — enviar mensagem, mover card no funil, pausar IA — escolhendo conta e caixa por dropdown.",
5
5
  "license": "MIT",
6
6
  "author": "AIB Digital",
@@ -16,7 +16,7 @@
16
16
  "dist"
17
17
  ],
18
18
  "scripts": {
19
- "build": "tsc"
19
+ "build": "tsc && cp nodes/AibDigital/aibdigital.svg dist/nodes/AibDigital/"
20
20
  },
21
21
  "n8n": {
22
22
  "n8nNodesApiVersion": 1,