n8n-nodes-confirm8 0.5.0 β†’ 0.7.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.
package/README.md ADDED
@@ -0,0 +1,162 @@
1
+ # βœ… n8n-nodes-confirm8 - CORRIGIDO
2
+
3
+ ## πŸ”΄ Problemas Encontrados e Corrigidos
4
+
5
+ ### 1. **Nomenclatura dos Arquivos** βŒβ†’βœ…
6
+ Os arquivos enviados tinham **underscore** em vez de **ponto**:
7
+
8
+ **ANTES (Incorreto):**
9
+ ```
10
+ ApiCustom_node.ts
11
+ ApiAgentNode_node.ts
12
+ ApiAgentTool_node.ts
13
+ ApiCustomCredentials_credentials.ts
14
+ ```
15
+
16
+ **DEPOIS (Correto):**
17
+ ```
18
+ ApiCustom.node.ts βœ“
19
+ ApiAgentNode.node.ts βœ“
20
+ ApiAgentTool.node.ts βœ“
21
+ ApiCustomCredentials.credentials.ts βœ“
22
+ ```
23
+
24
+ ### 2. **Erro CrΓ­tico nas Credenciais** βŒβ†’βœ…
25
+
26
+ O mΓ©todo `authenticate()` estava usando `credentials.apiKey` que **nΓ£o existe**!
27
+
28
+ **ANTES (Incorreto):**
29
+ ```typescript
30
+ async authenticate(credentials, requestOptions) {
31
+ requestOptions.headers.Authorization = `Bearer ${credentials.apiKey}`; // ❌ apiKey não existe!
32
+ return requestOptions;
33
+ }
34
+ ```
35
+
36
+ **DEPOIS (Correto):**
37
+ ```typescript
38
+ async authenticate(credentials, requestOptions) {
39
+ requestOptions.headers = requestOptions.headers || {};
40
+ requestOptions.headers.Authorization = `Bearer ${credentials.bearerToken}`; // βœ“
41
+ requestOptions.headers['X-API-DOMAIN'] = credentials.apiDomain as string; // βœ“
42
+ requestOptions.headers['X-APIKEY-TOKEN'] = credentials.apiKeyToken as string; // βœ“
43
+ return requestOptions;
44
+ }
45
+ ```
46
+
47
+ ### 3. **Index.ts Incorreto** βŒβ†’βœ…
48
+
49
+ O arquivo `nodes/index.ts` tinha imports errados.
50
+
51
+ ---
52
+
53
+ ## πŸ“ Estrutura Final Correta
54
+
55
+ ```
56
+ n8n-nodes-confirm8/
57
+ β”œβ”€β”€ nodes/
58
+ β”‚ β”œβ”€β”€ ApiCustom/
59
+ β”‚ β”‚ β”œβ”€β”€ ApiCustom.node.ts βœ“
60
+ β”‚ β”‚ β”œβ”€β”€ ApiAgentNode.node.ts βœ“
61
+ β”‚ β”‚ β”œβ”€β”€ ApiAgentTool.node.ts βœ“
62
+ β”‚ β”‚ β”œβ”€β”€ api.svg
63
+ β”‚ β”‚ └── api-agent.svg
64
+ β”‚ └── index.ts βœ“
65
+ β”œβ”€β”€ credentials/
66
+ β”‚ β”œβ”€β”€ ApiCustomCredentials.credentials.ts βœ“
67
+ β”‚ └── index.ts βœ“
68
+ β”œβ”€β”€ index.ts βœ“
69
+ β”œβ”€β”€ package.json
70
+ β”œβ”€β”€ tsconfig.json
71
+ β”œβ”€β”€ gulpfile.js
72
+ └── LICENSE
73
+ ```
74
+
75
+ ---
76
+
77
+ ## πŸš€ Como Usar Este Pacote Corrigido
78
+
79
+ ### 1. Instalar DependΓͺncias
80
+ ```bash
81
+ npm install
82
+ ```
83
+
84
+ ### 2. Compilar
85
+ ```bash
86
+ npm run build
87
+ ```
88
+
89
+ ### 3. Verificar se compilou corretamente
90
+ ```bash
91
+ ls -la dist/
92
+ ```
93
+
94
+ VocΓͺ deve ver:
95
+ ```
96
+ dist/
97
+ β”œβ”€β”€ credentials/
98
+ β”‚ β”œβ”€β”€ ApiCustomCredentials.credentials.js
99
+ β”‚ └── ApiCustomCredentials.credentials.d.ts
100
+ β”œβ”€β”€ nodes/
101
+ β”‚ └── ApiCustom/
102
+ β”‚ β”œβ”€β”€ ApiCustom.node.js
103
+ β”‚ β”œβ”€β”€ ApiAgentNode.node.js
104
+ β”‚ └── ApiAgentTool.node.js
105
+ └── index.js
106
+ ```
107
+
108
+ ### 4. Publicar no NPM
109
+ ```bash
110
+ npm login
111
+ npm publish
112
+ ```
113
+
114
+ ### 5. Instalar no n8n
115
+ ```bash
116
+ # Via interface do n8n
117
+ Settings β†’ Community Nodes β†’ Install β†’ n8n-nodes-confirm8
118
+
119
+ # OU via CLI
120
+ npm install n8n-nodes-confirm8
121
+
122
+ # IMPORTANTE: Sempre reinicie o n8n apΓ³s instalar!
123
+ ```
124
+
125
+ ---
126
+
127
+ ## ⚠️ Por que deu erro antes?
128
+
129
+ 1. **Nomenclatura:** n8n procura por `.node.ts`, nΓ£o `_node.ts`
130
+ 2. **Credenciais:** O mΓ©todo authenticate estava chamando um campo que nΓ£o existia
131
+ 3. **Imports:** Os paths estavam incorretos no index.ts
132
+
133
+ ---
134
+
135
+ ## ✨ O que foi corrigido:
136
+
137
+ βœ… Renomeado: `_node.ts` β†’ `.node.ts`
138
+ βœ… Renomeado: `_credentials.ts` β†’ `.credentials.ts`
139
+ βœ… Corrigido: mΓ©todo `authenticate()` nas credenciais
140
+ βœ… Corrigido: todos os arquivos `index.ts`
141
+ βœ… Verificado: estrutura de pastas
142
+
143
+ ---
144
+
145
+ ## πŸ“ž Teste Final
146
+
147
+ ApΓ³s build, verifique:
148
+ ```bash
149
+ node -e "const pkg = require('./dist/index.js'); console.log('Nodes:', pkg.nodes.length); console.log('Credentials:', pkg.credentials.length);"
150
+ ```
151
+
152
+ Deve retornar:
153
+ ```
154
+ Nodes: 3
155
+ Credentials: 1
156
+ ```
157
+
158
+ ---
159
+
160
+ ## πŸŽ‰ Pronto!
161
+
162
+ Agora seu pacote estΓ‘ 100% correto e pronto para ser publicado no NPM!
@@ -59,7 +59,9 @@ class ApiCustomCredentials {
59
59
  }
60
60
  async authenticate(credentials, requestOptions) {
61
61
  requestOptions.headers = requestOptions.headers || {};
62
- requestOptions.headers.Authorization = `Bearer ${credentials.apiKey}`;
62
+ requestOptions.headers.Authorization = `Bearer ${credentials.bearerToken}`;
63
+ requestOptions.headers['X-API-DOMAIN'] = credentials.apiDomain;
64
+ requestOptions.headers['X-APIKEY-TOKEN'] = credentials.apiKeyToken;
63
65
  return requestOptions;
64
66
  }
65
67
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- import { ApiCustomNode } from './nodes/ApiCustom/ApiCustom.node';
2
- import { ApiCustomCredentials } from './credentials/ApiCustomCredentials.credentials';
1
+ export * from "./nodes/ApiCustom/ApiCustom.node";
2
+ export * from "./nodes/ApiCustom/ApiAgentNode.node";
3
+ export * from "./nodes/ApiCustom/ApiAgentTool.node";
4
+ export * from "./credentials/ApiCustomCredentials.credentials";
5
+ import { ApiCustomNode } from "./nodes/ApiCustom/ApiCustom.node";
6
+ import { ApiCustomCredentials } from "./credentials/ApiCustomCredentials.credentials";
3
7
  export declare const nodes: (typeof ApiCustomNode)[];
4
8
  export declare const credentials: (typeof ApiCustomCredentials)[];
package/dist/index.js CHANGED
@@ -1,6 +1,24 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.credentials = exports.nodes = void 0;
18
+ __exportStar(require("./nodes/ApiCustom/ApiCustom.node"), exports);
19
+ __exportStar(require("./nodes/ApiCustom/ApiAgentNode.node"), exports);
20
+ __exportStar(require("./nodes/ApiCustom/ApiAgentTool.node"), exports);
21
+ __exportStar(require("./credentials/ApiCustomCredentials.credentials"), exports);
4
22
  const ApiCustom_node_1 = require("./nodes/ApiCustom/ApiCustom.node");
5
23
  const ApiAgentNode_node_1 = require("./nodes/ApiCustom/ApiAgentNode.node");
6
24
  const ApiAgentTool_node_1 = require("./nodes/ApiCustom/ApiAgentTool.node");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-confirm8",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "confirm8 nodes for n8n + AI Agent integration",
5
5
  "license": "MIT",
6
6
  "author": "Bill hebert",