@oliveiratco1/n8n-nodes-grid402 0.0.0-stage → 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.
- package/LICENSE +21 -0
- package/README.md +51 -2
- package/dist/credentials/Grid402Api.credentials.js +74 -0
- package/dist/nodes/Grid402/Grid402.node.js +364 -0
- package/dist/nodes/Grid402/grid402.svg +5 -0
- package/index.js +9 -0
- package/package.json +52 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Grid402 Network Intelligence (https://grid402.online)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @oliveiratco1/n8n-nodes-grid402 ⚡
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Conector oficial de **Community Node para n8n** do **Grid402** (`https://grid402.online`) — Hub de 25 Micro-Serviços de Dados Públicos Abertos, KYB Brasil (Receita Federal CNPJ, Simples/MEI, Sanções CGU CEIS/CNEP, Dossiê 360º com Veredito IA), Dias Úteis Bancários ANBIMA, Extração Web-to-Markdown e Verificação Zero-PII de E-mails Corporativos.
|
|
4
|
+
|
|
5
|
+
100% em conformidade com a **LGPD (Art. 1º)**, **GDPR (Recital 14)** e **Lei de Acesso à Informação (Lei nº 12.527/2011 - LAI)**: processa exclusivamente registros públicos de Pessoas Jurídicas e fatos técnicos de rede, com descarte estrito de dados pessoais (Zero-PII e Zero-Retention) e assinatura criptográfica de autenticidade (`_oracle_proof` ECDSA `secp256k1`).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🚀 Como Instalar no seu n8n
|
|
10
|
+
|
|
11
|
+
No painel do seu n8n:
|
|
12
|
+
1. Vá em **Settings** → **Community Nodes** → **Install**.
|
|
13
|
+
2. Digite **`@oliveiratco1/n8n-nodes-grid402`** e clique em **Install**.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🔑 Como Autenticar (Teste Grátis ou Pix Instantâneo em 10s)
|
|
18
|
+
|
|
19
|
+
1. **Modo Sandbox Gratuito (Zero Configuração):**
|
|
20
|
+
- Funciona imediatamente após instalar com **3 consultas grátis por dia** (`X-Payment: demo`).
|
|
21
|
+
2. **Session Pass Pré-Pago (`<15ms`, Pix, Cartão ou Multi-Chain USDC):**
|
|
22
|
+
- Adquira um passe instantâneo a partir de **R$ 12,00 (400 créditos)** em:
|
|
23
|
+
👉 `https://grid402.online/pass?tier=starter&autopix=1`
|
|
24
|
+
- Cole o token `pass_g402_...` gerado na credencial **Grid402 API** dentro do n8n.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 🛠️ Operações Incluídas (25 Micro-Serviços + Gestão de Saldo)
|
|
29
|
+
|
|
30
|
+
- **KYB Brasil e Compliance Corporativo (Zero-PII):**
|
|
31
|
+
- `Dossiê 360º KYB Brasil + Veredito IA` (`APPROVED`, `FLAGGED`, `REJECTED` + Score 0-100 + Receita Federal + Simples/MEI + CGU CEIS/CNEP)
|
|
32
|
+
- `Consultar CNPJ Receita Federal`
|
|
33
|
+
- `Simples Nacional e MEI por CNPJ`
|
|
34
|
+
- `Sanções CGU CEIS e CNEP por CNPJ`
|
|
35
|
+
- `Compliance Score 360 por CNPJ`
|
|
36
|
+
- `Auditoria KYB Global (CNPJ + OFAC + GLEIF LEI)`
|
|
37
|
+
- **Automação B2B, IA e RAG:**
|
|
38
|
+
- `Verificar E-mail Corporativo B2B Zero-PII` (Sintaxe RFC, MX, SPF, DMARC, disposable e score 0-100)
|
|
39
|
+
- `Extrair Site para Markdown Limpo / RAG` (Conversão anti-SSRF de páginas web para Markdown)
|
|
40
|
+
- **Financeiro, Calendário Bancário ANBIMA e Endereçamento:**
|
|
41
|
+
- `Dias Úteis Bancários ANBIMA (D+N)`
|
|
42
|
+
- `Feriados Nacionais e Bancários ANBIMA`
|
|
43
|
+
- `Indicadores BCB (Selic, CDI e IPCA)`
|
|
44
|
+
- `Câmbio PTAX BCB (USD, EUR, GBP para BRL)`
|
|
45
|
+
- `Preços Cripto Spot (BTC, ETH, SOL, USDC)`
|
|
46
|
+
- `Panorama Financeiro Consolidado (Market Snapshot)`
|
|
47
|
+
- `Mercados Globais e 30+ Moedas BCE`
|
|
48
|
+
- `Consultar CEP Brasileiro + Código IBGE`
|
|
49
|
+
- **Rede, Segurança e Identidade Global:**
|
|
50
|
+
- `Resolução DNS Autoritativa`, `Inspeção TLS/SSL`, `Inteligência BGP/ASN`, `Auditoria Completa de Domínio`, `GLEIF LEI`, `OFAC SDN / ONU` e `Notarização Criptográfica SHA-256 + ECDSA`.
|
|
51
|
+
|
|
52
|
+
Licença MIT • Grid402 Network Intelligence (`https://grid402.online`)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class Grid402Api {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.name = 'grid402Api';
|
|
6
|
+
this.displayName = 'Grid402 API (Session Pass Pix / RapidAPI / Sandbox)';
|
|
7
|
+
this.documentationUrl = 'https://grid402.online/pass?tier=starter&autopix=1';
|
|
8
|
+
this.properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Modo de Autenticação',
|
|
11
|
+
name: 'authMode',
|
|
12
|
+
type: 'options',
|
|
13
|
+
default: 'sessionPass',
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
name: 'Session Pass Pré-Pago (Pix / Cartão / USDC — <15ms)',
|
|
17
|
+
value: 'sessionPass',
|
|
18
|
+
description: 'Usa um token pass_g402_... adquirido em https://grid402.online/pass (a partir de R$ 12 = 400 créditos)',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Sandbox Gratuito (3 consultas/dia por IP)',
|
|
22
|
+
value: 'sandbox',
|
|
23
|
+
description: 'Envia X-Payment: demo para testar fluxos gratuitamente (limite de 3 consultas/dia por IP)',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'RapidAPI Hub (X-RapidAPI-Key)',
|
|
27
|
+
value: 'rapidApi',
|
|
28
|
+
description: 'Autentica via assinatura mensal em USD no RapidAPI Hub',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Session Pass Token (pass_g402_...)',
|
|
34
|
+
name: 'sessionPass',
|
|
35
|
+
type: 'string',
|
|
36
|
+
typeOptions: {
|
|
37
|
+
password: true,
|
|
38
|
+
},
|
|
39
|
+
default: '',
|
|
40
|
+
placeholder: 'pass_g402_...',
|
|
41
|
+
description: 'Adquira em 10 segundos via Pix (R$ 12 = 400 créditos) em https://grid402.online/pass?tier=starter&autopix=1',
|
|
42
|
+
displayOptions: {
|
|
43
|
+
show: {
|
|
44
|
+
authMode: ['sessionPass'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'RapidAPI Key',
|
|
50
|
+
name: 'rapidApiKey',
|
|
51
|
+
type: 'string',
|
|
52
|
+
typeOptions: {
|
|
53
|
+
password: true,
|
|
54
|
+
},
|
|
55
|
+
default: '',
|
|
56
|
+
description: 'Chave X-RapidAPI-Key da sua assinatura no RapidAPI Hub',
|
|
57
|
+
displayOptions: {
|
|
58
|
+
show: {
|
|
59
|
+
authMode: ['rapidApi'],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
displayName: 'Endpoint Base',
|
|
65
|
+
name: 'baseUrl',
|
|
66
|
+
type: 'string',
|
|
67
|
+
default: 'https://grid402.online',
|
|
68
|
+
description: 'URL base do gateway Grid402',
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = { Grid402Api };
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class Grid402 {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.description = {
|
|
6
|
+
displayName: 'Grid402 (CNPJ, KYB 360, ANBIMA, Web & Network)',
|
|
7
|
+
name: 'grid402',
|
|
8
|
+
icon: 'file:grid402.svg',
|
|
9
|
+
group: ['transform'],
|
|
10
|
+
version: 1,
|
|
11
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
12
|
+
description: '25 APIs públicas verificáveis (Zero-PII): Dossiê KYB 360 IA, Receita Federal CNPJ, Simples/MEI, Sanções CGU, Dias Úteis ANBIMA, CEP, Câmbio PTAX, Web-to-Markdown, Email Verify B2B, GLEIF LEI, OFAC e DNS/SSL.',
|
|
13
|
+
defaults: {
|
|
14
|
+
name: 'Grid402',
|
|
15
|
+
},
|
|
16
|
+
inputs: ['main'],
|
|
17
|
+
outputs: ['main'],
|
|
18
|
+
usableAsTool: true,
|
|
19
|
+
credentials: [
|
|
20
|
+
{
|
|
21
|
+
name: 'grid402Api',
|
|
22
|
+
required: false,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operação',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
default: 'dossier',
|
|
32
|
+
options: [
|
|
33
|
+
{ name: 'Dossiê 360º KYB Brasil + Veredito IA (10 cr)', value: 'dossier', description: 'Receita Federal CNPJ + Simples/MEI + Sanções CGU CEIS/CNEP + Score 0-100 e Veredito IA (APPROVED/FLAGGED/REJECTED)' },
|
|
34
|
+
{ name: 'Consultar CNPJ Receita Federal (4 cr)', value: 'cnpj', description: 'Dados cadastrais públicos de Pessoa Jurídica (Zero-PII: sem QSA/CPF)' },
|
|
35
|
+
{ name: 'Simples Nacional e MEI por CNPJ (2 cr)', value: 'simples', description: 'Verifica opção pelo Simples Nacional e enquadramento SIMEI (MEI)' },
|
|
36
|
+
{ name: 'Sanções CGU CEIS e CNEP por CNPJ (2 cr)', value: 'sanctions', description: 'Consulta Cadastro de Empresas Inidôneas e Suspensas (CEIS) e Punidas (CNEP)' },
|
|
37
|
+
{ name: 'Compliance Score 360 por CNPJ (6 cr)', value: 'compliance', description: 'Score de integridade corporativa 0-100 cruzando Receita Federal e CGU' },
|
|
38
|
+
{ name: 'Auditoria KYB Global: CNPJ + OFAC + LEI (4 cr)', value: 'kyb-audit', description: 'Receita Federal CNPJ + Sanções OFAC/ONU + Identidade Global GLEIF LEI' },
|
|
39
|
+
{ name: 'Verificar E-mail Corporativo B2B Zero-PII (1 cr)', value: 'email-verify', description: 'Valida sintaxe RFC, DNS MX, SPF, DMARC, domínio descartável e score 0-100 sem reter PII' },
|
|
40
|
+
{ name: 'Extrair Site para Markdown Limpo / RAG (1 cr)', value: 'extract', description: 'Converte URL pública HTTP/HTTPS em Markdown limpo para LLMs com proteção anti-SSRF' },
|
|
41
|
+
{ name: 'Consultar CEP Brasileiro + Código IBGE (1 cr)', value: 'cep', description: 'Logradouro, bairro, município, UF e código oficial IBGE' },
|
|
42
|
+
{ name: 'Dias Úteis Bancários ANBIMA D+N (1 cr)', value: 'workdays', description: 'Calcula dias úteis financeiros ou projeta vencimentos na convenção ANBIMA' },
|
|
43
|
+
{ name: 'Feriados Nacionais e Bancários ANBIMA (1 cr)', value: 'holidays', description: 'Calendário oficial de feriados nacionais e bancários por ano' },
|
|
44
|
+
{ name: 'Indicadores BCB: Selic, CDI e IPCA (1 cr)', value: 'indicators', description: 'Taxas oficiais Selic meta/diária, CDI anual/diário e IPCA 12m/mensal' },
|
|
45
|
+
{ name: 'Câmbio PTAX BCB: USD, EUR, GBP para BRL (1 cr)', value: 'forex', description: 'Cotações oficiais de câmbio com variação diária' },
|
|
46
|
+
{ name: 'Preços Cripto Spot: BTC, ETH, SOL, USDC (1 cr)', value: 'crypto', description: 'Preços spot em tempo real em USD e BRL' },
|
|
47
|
+
{ name: 'Panorama Financeiro Consolidado (3 cr)', value: 'market-snapshot', description: 'Câmbio PTAX + Cripto Spot + Selic/CDI/IPCA + Calendário ANBIMA em 1 chamada' },
|
|
48
|
+
{ name: 'Mercados Globais e 30+ Moedas BCE (1 cr)', value: 'global-markets', description: 'Calendário NYSE, TARGET2, LSE, B3 e taxas de referência do Banco Central Europeu' },
|
|
49
|
+
{ name: 'Resolução DNS Autoritativa (1 cr)', value: 'dns', description: 'Registros A, AAAA, MX, TXT, NS e CNAME de um domínio' },
|
|
50
|
+
{ name: 'Inspeção de Certificado TLS/SSL (1 cr)', value: 'ssl', description: 'Emissor, validade, SANs e dias restantes até expirar na porta 443' },
|
|
51
|
+
{ name: 'Inteligência BGP e ASN de IP (1 cr)', value: 'asn', description: 'Número ASN, bloco CIDR, organização e país de origem' },
|
|
52
|
+
{ name: 'Auditoria Completa de Domínio: DNS + SSL + ASN (3 cr)', value: 'domain-audit', description: 'Auditoria técnica consolidada de domínio em 1 chamada' },
|
|
53
|
+
{ name: 'Identidade Corporativa Global GLEIF LEI (4 cr)', value: 'lei', description: 'Consulta código ISO 17442 LEI em 200+ jurisdições (CC0 1.0)' },
|
|
54
|
+
{ name: 'Triagem Global OFAC SDN / ONU e AML Web3 (4 cr)', value: 'ofac', description: 'Triagem de sanções internacionais para carteiras 0x ou entidades' },
|
|
55
|
+
{ name: 'Notarização Criptográfica SHA-256 + ECDSA (1 cr)', value: 'notarize', description: 'Carimbo do tempo M2M e prova de existência Zero-Retention' },
|
|
56
|
+
{ name: 'Consultar Saldo do Session Pass (Gratuito)', value: 'pass-balance', description: 'Verifica créditos restantes, validade e Spend Controls do seu pass_g402_...' },
|
|
57
|
+
{ name: 'Status Geral dos 25 Serviços (Gratuito)', value: 'summary', description: 'Resumo de saúde e latência de todos os 25 serviços do Grid402' },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
displayName: 'CNPJ',
|
|
62
|
+
name: 'cnpj',
|
|
63
|
+
type: 'string',
|
|
64
|
+
default: '',
|
|
65
|
+
placeholder: '00.000.000/0001-91',
|
|
66
|
+
description: 'CNPJ de 14 dígitos (com ou sem pontuação)',
|
|
67
|
+
displayOptions: {
|
|
68
|
+
show: {
|
|
69
|
+
operation: ['dossier', 'cnpj', 'simples', 'sanctions', 'compliance', 'kyb-audit'],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'E-mail Corporativo',
|
|
75
|
+
name: 'email',
|
|
76
|
+
type: 'string',
|
|
77
|
+
default: '',
|
|
78
|
+
placeholder: 'contato@empresa.com.br',
|
|
79
|
+
description: 'Endereço de e-mail para auditoria Zero-PII de entregabilidade (MX/SPF/DMARC)',
|
|
80
|
+
displayOptions: {
|
|
81
|
+
show: {
|
|
82
|
+
operation: ['email-verify'],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'URL Pública (HTTP/HTTPS)',
|
|
88
|
+
name: 'url',
|
|
89
|
+
type: 'string',
|
|
90
|
+
default: '',
|
|
91
|
+
placeholder: 'https://empresa.com.br',
|
|
92
|
+
description: 'Página pública a ser convertida em Markdown limpo para IA/RAG',
|
|
93
|
+
displayOptions: {
|
|
94
|
+
show: {
|
|
95
|
+
operation: ['extract'],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Limite Máximo de Caracteres',
|
|
101
|
+
name: 'maxChars',
|
|
102
|
+
type: 'number',
|
|
103
|
+
default: 12000,
|
|
104
|
+
description: 'Tamanho máximo do Markdown retornado (500 a 25000)',
|
|
105
|
+
displayOptions: {
|
|
106
|
+
show: {
|
|
107
|
+
operation: ['extract'],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
displayName: 'CEP',
|
|
113
|
+
name: 'code',
|
|
114
|
+
type: 'string',
|
|
115
|
+
default: '',
|
|
116
|
+
placeholder: '01310100',
|
|
117
|
+
description: 'CEP brasileiro de 8 dígitos',
|
|
118
|
+
displayOptions: {
|
|
119
|
+
show: {
|
|
120
|
+
operation: ['cep'],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
displayName: 'Domínio ou Host',
|
|
126
|
+
name: 'domain',
|
|
127
|
+
type: 'string',
|
|
128
|
+
default: '',
|
|
129
|
+
placeholder: 'github.com',
|
|
130
|
+
description: 'Domínio ou hostname alvo',
|
|
131
|
+
displayOptions: {
|
|
132
|
+
show: {
|
|
133
|
+
operation: ['dns', 'ssl', 'domain-audit'],
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
displayName: 'Endereço IP (IPv4 ou IPv6)',
|
|
139
|
+
name: 'ip',
|
|
140
|
+
type: 'string',
|
|
141
|
+
default: '1.1.1.1',
|
|
142
|
+
description: 'Endereço IP para consulta de ASN/BGP',
|
|
143
|
+
displayOptions: {
|
|
144
|
+
show: {
|
|
145
|
+
operation: ['asn'],
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
displayName: 'Data Inicial (AAAA-MM-DD)',
|
|
151
|
+
name: 'startDate',
|
|
152
|
+
type: 'string',
|
|
153
|
+
default: '',
|
|
154
|
+
placeholder: '2026-11-21',
|
|
155
|
+
description: 'Data de início para cálculo ou projeção de dias úteis ANBIMA',
|
|
156
|
+
displayOptions: {
|
|
157
|
+
show: {
|
|
158
|
+
operation: ['workdays'],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
displayName: 'Data Final (AAAA-MM-DD) — Opcional',
|
|
164
|
+
name: 'endDate',
|
|
165
|
+
type: 'string',
|
|
166
|
+
default: '',
|
|
167
|
+
placeholder: '2026-12-31',
|
|
168
|
+
description: 'Preencha para contar dias úteis entre Data Inicial e Data Final',
|
|
169
|
+
displayOptions: {
|
|
170
|
+
show: {
|
|
171
|
+
operation: ['workdays'],
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
displayName: 'Dias Úteis a Projetar (D+N) — Opcional',
|
|
177
|
+
name: 'days',
|
|
178
|
+
type: 'number',
|
|
179
|
+
default: 5,
|
|
180
|
+
description: 'Quantidade de dias úteis a somar à Data Inicial (usado quando Data Final está vazia)',
|
|
181
|
+
displayOptions: {
|
|
182
|
+
show: {
|
|
183
|
+
operation: ['workdays'],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
displayName: 'Ano Calendário',
|
|
189
|
+
name: 'year',
|
|
190
|
+
type: 'number',
|
|
191
|
+
default: 2026,
|
|
192
|
+
description: 'Ano de 4 dígitos para consulta de feriados ANBIMA',
|
|
193
|
+
displayOptions: {
|
|
194
|
+
show: {
|
|
195
|
+
operation: ['holidays'],
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
displayName: 'Código LEI (ISO 17442)',
|
|
201
|
+
name: 'lei',
|
|
202
|
+
type: 'string',
|
|
203
|
+
default: '',
|
|
204
|
+
placeholder: '5493006MHB84DD0ZWV18',
|
|
205
|
+
description: 'Código LEI de 20 caracteres alfanuméricos',
|
|
206
|
+
displayOptions: {
|
|
207
|
+
show: {
|
|
208
|
+
operation: ['lei'],
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
displayName: 'Alvo OFAC (Carteira 0x ou Razão Social)',
|
|
214
|
+
name: 'target',
|
|
215
|
+
type: 'string',
|
|
216
|
+
default: '',
|
|
217
|
+
placeholder: '0xa592625adbceb8e025ac383f1a3fd8ebb6a63f90',
|
|
218
|
+
description: 'Carteira EVM ou nome da entidade para triagem OFAC SDN / ONU',
|
|
219
|
+
displayOptions: {
|
|
220
|
+
show: {
|
|
221
|
+
operation: ['ofac'],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
displayName: 'Conteúdo ou Hash SHA-256 para Notarizar',
|
|
227
|
+
name: 'content',
|
|
228
|
+
type: 'string',
|
|
229
|
+
default: '',
|
|
230
|
+
description: 'Texto ou hash SHA-256 para carimbo do tempo ECDSA Zero-Retention',
|
|
231
|
+
displayOptions: {
|
|
232
|
+
show: {
|
|
233
|
+
operation: ['notarize'],
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
displayName: 'Mercado Global (US, EU, UK, BR)',
|
|
239
|
+
name: 'market',
|
|
240
|
+
type: 'string',
|
|
241
|
+
default: 'US',
|
|
242
|
+
displayOptions: {
|
|
243
|
+
show: {
|
|
244
|
+
operation: ['global-markets'],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
async execute() {
|
|
253
|
+
const items = this.getInputData ? this.getInputData() : [{}];
|
|
254
|
+
const returnData = [];
|
|
255
|
+
|
|
256
|
+
let creds = {};
|
|
257
|
+
if (this.getCredentials) {
|
|
258
|
+
try {
|
|
259
|
+
creds = (await this.getCredentials('grid402Api')) || {};
|
|
260
|
+
} catch (_) {
|
|
261
|
+
creds = {};
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const baseUrl = String(creds.baseUrl || 'https://grid402.online').replace(/\/$/, '');
|
|
266
|
+
const authMode = creds.authMode || (creds.sessionPass ? 'sessionPass' : 'sandbox');
|
|
267
|
+
|
|
268
|
+
for (let i = 0; i < items.length; i++) {
|
|
269
|
+
const getParam = (name, fallback = '') => {
|
|
270
|
+
if (this.getNodeParameter) {
|
|
271
|
+
try {
|
|
272
|
+
return this.getNodeParameter(name, i, fallback);
|
|
273
|
+
} catch (_) {
|
|
274
|
+
return fallback;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return items[i][name] !== undefined ? items[i][name] : fallback;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
const operation = getParam('operation', 'dossier');
|
|
281
|
+
const qs = new URLSearchParams();
|
|
282
|
+
let path = `/api/v1/${operation}`;
|
|
283
|
+
|
|
284
|
+
if (operation === 'summary') {
|
|
285
|
+
path = '/status';
|
|
286
|
+
} else if (operation === 'pass-balance') {
|
|
287
|
+
path = '/api/v1/pass/balance';
|
|
288
|
+
if (creds.sessionPass) qs.set('token', String(creds.sessionPass).trim());
|
|
289
|
+
} else if (['dossier', 'cnpj', 'simples', 'sanctions', 'compliance', 'kyb-audit'].includes(operation)) {
|
|
290
|
+
const cleanCnpj = String(getParam('cnpj', '')).replace(/\D/g, '');
|
|
291
|
+
qs.set('cnpj', cleanCnpj);
|
|
292
|
+
} else if (operation === 'email-verify') {
|
|
293
|
+
qs.set('email', String(getParam('email', '')).trim());
|
|
294
|
+
} else if (operation === 'extract') {
|
|
295
|
+
qs.set('url', String(getParam('url', '')).trim());
|
|
296
|
+
const maxChars = getParam('maxChars', 12000);
|
|
297
|
+
if (maxChars) qs.set('max_chars', String(maxChars));
|
|
298
|
+
} else if (operation === 'cep') {
|
|
299
|
+
qs.set('code', String(getParam('code', '')).replace(/\D/g, ''));
|
|
300
|
+
} else if (operation === 'dns' || operation === 'domain-audit') {
|
|
301
|
+
qs.set('domain', String(getParam('domain', '')).trim());
|
|
302
|
+
} else if (operation === 'ssl') {
|
|
303
|
+
qs.set('host', String(getParam('domain', '')).trim());
|
|
304
|
+
} else if (operation === 'asn') {
|
|
305
|
+
const ip = String(getParam('ip', '')).trim();
|
|
306
|
+
if (ip) qs.set('ip', ip);
|
|
307
|
+
} else if (operation === 'workdays') {
|
|
308
|
+
const startDate = String(getParam('startDate', '')).trim();
|
|
309
|
+
const endDate = String(getParam('endDate', '')).trim();
|
|
310
|
+
const days = getParam('days', 5);
|
|
311
|
+
if (startDate) qs.set('start_date', startDate);
|
|
312
|
+
if (endDate) {
|
|
313
|
+
qs.set('end_date', endDate);
|
|
314
|
+
} else if (days !== '' && days !== null && days !== undefined) {
|
|
315
|
+
qs.set('days', String(days));
|
|
316
|
+
}
|
|
317
|
+
} else if (operation === 'holidays') {
|
|
318
|
+
const year = getParam('year', 2026);
|
|
319
|
+
if (year) qs.set('year', String(year));
|
|
320
|
+
} else if (operation === 'lei') {
|
|
321
|
+
qs.set('lei', String(getParam('lei', '')).trim());
|
|
322
|
+
} else if (operation === 'ofac') {
|
|
323
|
+
qs.set('target', String(getParam('target', '')).trim());
|
|
324
|
+
} else if (operation === 'notarize') {
|
|
325
|
+
qs.set('content', String(getParam('content', '')));
|
|
326
|
+
} else if (operation === 'global-markets') {
|
|
327
|
+
qs.set('market', String(getParam('market', 'US')).trim());
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const queryString = qs.toString();
|
|
331
|
+
const fullUrl = `${baseUrl}${path}${queryString ? '?' + queryString : ''}`;
|
|
332
|
+
|
|
333
|
+
const headers = {
|
|
334
|
+
'Accept': 'application/json',
|
|
335
|
+
'User-Agent': 'n8n-nodes-grid402/1.0.0',
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
if (authMode === 'sessionPass' && creds.sessionPass) {
|
|
339
|
+
headers['X-Payment'] = String(creds.sessionPass).trim();
|
|
340
|
+
} else if (authMode === 'rapidApi' && creds.rapidApiKey) {
|
|
341
|
+
headers['X-RapidAPI-Key'] = String(creds.rapidApiKey).trim();
|
|
342
|
+
} else {
|
|
343
|
+
headers['X-Payment'] = 'demo';
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const response = await fetch(fullUrl, { method: 'GET', headers });
|
|
347
|
+
const data = await response.json().catch(() => ({ status: response.status }));
|
|
348
|
+
|
|
349
|
+
if (response.status === 402 || response.status === 429) {
|
|
350
|
+
data._n8n_upgrade_instructions = {
|
|
351
|
+
pix_instant_10s_brl: 'https://grid402.online/pass?tier=starter&autopix=1 (R$ 12 = 400 créditos)',
|
|
352
|
+
rapidapi_card_usd: 'https://rapidapi.com/oliveiratc/api/grid402-open-data-kyb-ai-utilities',
|
|
353
|
+
how_to_configure: 'Copie seu token pass_g402_... após pagar o Pix e cole na credencial Grid402 API do n8n.',
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
returnData.push({ json: data });
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return [returnData];
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
module.exports = { Grid402 };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#060B19"/>
|
|
3
|
+
<rect x="2" y="2" width="60" height="60" rx="12" fill="none" stroke="#00F0FF" stroke-width="2.5"/>
|
|
4
|
+
<path d="M35 12L17 36h13l-3 16 20-25H34l1-15z" fill="#00F0FF"/>
|
|
5
|
+
</svg>
|
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliveiratco1/n8n-nodes-grid402",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
}
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "Official n8n Community Node for Grid402 - 25 Verifiable Public Data, Brazil KYB 360 (CNPJ, Simples/MEI, CGU Sanctions), ANBIMA Workdays, Web-to-Markdown, Zero-PII Email Verify, GLEIF LEI, OFAC and Network Utility APIs with Session Pass (Pix/Card/USDC) and ECDSA Oracle Proof.",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"n8n-community-node-package",
|
|
10
|
+
"n8n",
|
|
11
|
+
"grid402",
|
|
12
|
+
"cnpj",
|
|
13
|
+
"kyb",
|
|
14
|
+
"receita-federal",
|
|
15
|
+
"simples-nacional",
|
|
16
|
+
"cgu",
|
|
17
|
+
"anbima",
|
|
18
|
+
"cep",
|
|
19
|
+
"ptax",
|
|
20
|
+
"email-verify",
|
|
21
|
+
"markdown",
|
|
22
|
+
"x402",
|
|
23
|
+
"ai-agent"
|
|
24
|
+
],
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"homepage": "https://grid402.online",
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "Grid402 Team",
|
|
29
|
+
"email": "contato@grid402.online"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/oliveiratc/Grid402.git"
|
|
34
|
+
},
|
|
35
|
+
"main": "index.js",
|
|
36
|
+
"files": [
|
|
37
|
+
"index.js",
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"test": "node test_n8n_node.cjs"
|
|
44
|
+
},
|
|
45
|
+
"n8n": {
|
|
46
|
+
"n8nNodesApiVersion": 1,
|
|
47
|
+
"credentials": [
|
|
48
|
+
"dist/credentials/Grid402Api.credentials.js"
|
|
49
|
+
],
|
|
50
|
+
"nodes": [
|
|
51
|
+
"dist/nodes/Grid402/Grid402.node.js"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|