n8n-nodes-lexgrid 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/README.md +94 -2
- package/dist/credentials/LexGridApi.credentials.d.ts +7 -0
- package/dist/credentials/LexGridApi.credentials.js +30 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -0
- package/dist/nodes/LexGrid/LexGrid.node.d.ts +5 -0
- package/dist/nodes/LexGrid/LexGrid.node.js +752 -0
- package/dist/nodes/LexGrid/LexGrid.node.json +18 -0
- package/dist/nodes/LexGrid/lexgrid.svg +4 -0
- package/package.json +48 -4
package/README.md
CHANGED
|
@@ -1,3 +1,95 @@
|
|
|
1
|
-
#
|
|
1
|
+
# n8n-nodes-lexgrid 🏛️⚡
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Official n8n community node for NovaPixel LexGrid — Sovereign EU Compliance, 20 Vertical Suites & 90 Deterministic Tools.**
|
|
4
|
+
|
|
5
|
+
Integrate deterministic European regulatory verification, public procurement anomaly calculations, crisis default prediction, and official statutory audit certificates into your **n8n** automation workflows in 1 click.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📦 Installation
|
|
10
|
+
|
|
11
|
+
### In your n8n instance:
|
|
12
|
+
1. Go to **Settings** > **Community Nodes**.
|
|
13
|
+
2. Click **Install**.
|
|
14
|
+
3. Enter `n8n-nodes-lexgrid`.
|
|
15
|
+
4. Click **Install** and accept the community node notice.
|
|
16
|
+
|
|
17
|
+
Alternatively, if running n8n via Docker or npm:
|
|
18
|
+
```bash
|
|
19
|
+
npm install n8n-nodes-lexgrid
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 🔑 Authentication
|
|
25
|
+
|
|
26
|
+
Create a new credential under **LexGrid API**:
|
|
27
|
+
- **API Key**: Enter your LexGrid API key from your Polar/Stripe dashboard (or leave blank to use the daily free trial quota).
|
|
28
|
+
- **Base URL**: `https://lexgrid.novapixel.it` (or your private enterprise appliance URL).
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 🛠️ Supported Resources & Operations
|
|
33
|
+
|
|
34
|
+
### ⚡ 1. Universal Tool Runner (`universalTool`)
|
|
35
|
+
Execute **any of the 90 deterministic tools across all 20 European statutory suites** by providing dynamic JSON parameters:
|
|
36
|
+
- **Suite**: Select any of the 20 vertical domains (`eu-tax`, `gov-appalti`, `dora-nis2`, `customs-cbam`, `fin-esg`, etc.)
|
|
37
|
+
- **Tool Name**: Target endpoint (e.g. `vies_gleif_kyb_verify`, `anomalia_offerte_calculator`, `incident_severity_triage`)
|
|
38
|
+
- **Parameters (JSON)**: Full arbitrary payload evaluated statelessly in volatile RAM (< 50ms).
|
|
39
|
+
|
|
40
|
+
### 🏛️ 2. Dedicated Operations
|
|
41
|
+
|
|
42
|
+
#### 01. EU Tax & KYB (`euTax`)
|
|
43
|
+
- **Verify VIES VAT**: Validates European VAT numbers on official VIES with local Shadow Mirror resilience (works even when EU national tax portals are down).
|
|
44
|
+
- **Validate SEPA IBAN**: Real-time ISO 7064 Modulo 97 checksum and BIC directory lookup.
|
|
45
|
+
- **Audit e-Invoice XML**: Full schema verification of Italian SDI FatturaPA 1.2.2 and Peppol BIS 3.0 XML files.
|
|
46
|
+
- **Audit Codice Fiscale**: Validates Italian tax code checksums, omocodia characters, and demographic consistency.
|
|
47
|
+
|
|
48
|
+
#### 02. Appalti Pubblici & ANAC (`govAppalti`)
|
|
49
|
+
- **Calculate Anomaly Threshold**: Computes deterministic anomaly exclusion thresholds under **D.Lgs. 36/2023 Art. 110** (Metodo A & Metodo B) with zero human cognitive bias.
|
|
50
|
+
- **Audit Cascade Subcontract**: Checks subcontract limits and anti-mafia declarations.
|
|
51
|
+
- **Validate CIG & CUP**: Format verification of ANAC SmartCIG and public investment CUP alphanumeric strings.
|
|
52
|
+
|
|
53
|
+
#### 03. Financial & ESG Forensics (`finEsg`)
|
|
54
|
+
- **Predict Default (Altman Z-Score)**: Calculates insolvency probability under the Italian Crisis Code (CCII) with **Pre-Flight Balance Sheet Sanity Checks** (Total Assets == Total Liabilities + Equity).
|
|
55
|
+
- **Audit Trend Anomaly**: Detects manipulation using Beneish M-Score and Benford's Law Chi-Square distribution.
|
|
56
|
+
- **Calculate CSRD VSME GHG**: Direct Scope 1 and Scope 2 calculation under EFRAG VSME ESRS E1.
|
|
57
|
+
|
|
58
|
+
#### 04. Statutory Audit Certificate (`auditCertificate`)
|
|
59
|
+
- **Get Certificate Verification**: Retrieves official cryptographic verification proof by Certificate ID (`LG-2026-XXXX`).
|
|
60
|
+
- **Recheck Hash Match**: Validates whether candidate JSON data exactly matches the certified SHA-256 hash.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 🌐 The 20 Vertical European Compliance Suites
|
|
65
|
+
|
|
66
|
+
| Suite ID | Subdomain | Primary Focus |
|
|
67
|
+
| :--- | :--- | :--- |
|
|
68
|
+
| `eu-tax` | `tax-mcp.novapixel.it` | VIES VAT, FatturaPA, Peppol BIS 3.0, SEPA IBAN |
|
|
69
|
+
| `fin-esg` | `fin-mcp.novapixel.it` | Altman Z-Score, Beneish M-Score, CSRD VSME E1 |
|
|
70
|
+
| `net-sec` | `sec-mcp.novapixel.it` | SPF, DKIM, DMARC, BIMI, TLS 1.3, RDAP Intel |
|
|
71
|
+
| `web-gdpr` | `gdpr-mcp.novapixel.it` | Cookie CMP, Google Consent Mode v2, EU AI Act |
|
|
72
|
+
| `gov-appalti` | `appalti-mcp.novapixel.it` | ANAC CIG/CUP, D.Lgs 36/2023, Offerte Anomale |
|
|
73
|
+
| `dora-nis2` | `dora-mcp.novapixel.it` | DORA ICT Contracts, NIS2 Criticality, TLPT Scope |
|
|
74
|
+
| `customs-cbam` | `dogane-mcp.novapixel.it` | CBAM Embedded Emissions, TARIC HS, Incoterms |
|
|
75
|
+
| `hr-labour` | `lavoro-mcp.novapixel.it` | Total Employer Cost, IRPEF 2026, CCNL Minimums |
|
|
76
|
+
| `materials-dpp` | `materials-mcp.novapixel.it` | Digital Product Passport, Construction CPR, CRMA |
|
|
77
|
+
| `energy-epbd` | `energy-mcp.novapixel.it` | Case Green EPBD IV, ETS 2 Carbon Tax, CER GSE |
|
|
78
|
+
| `sovereign-pii` | `pii-mcp.novapixel.it` | In-memory PII Scrubber, AI Act Technical Dossier |
|
|
79
|
+
| `xbrl-fin` | `xbrl-mcp.novapixel.it` | ESEF iXBRL, BRIS Corporate Lookup, EU Taxonomy |
|
|
80
|
+
| `einvoice-vida` | `peppol-mcp.novapixel.it` | Universal Peppol BIS 3.0, XRechnung, ViDA DRR |
|
|
81
|
+
| `grants-funding` | `grants-mcp.novapixel.it` | Transizione 5.0, De Minimis €300k, Horizon Europe |
|
|
82
|
+
| `carbon-factors` | `carbon-mcp.novapixel.it` | ISPRA / DEFRA Emission Factors, Scope 1-2-3 |
|
|
83
|
+
| `ted-procurement`| `ted-mcp.novapixel.it` | TED eForms Reg. 2019/1780, CPV Classifier |
|
|
84
|
+
| `chemicals-reach`| `reach-mcp.novapixel.it` | REACH SVHC Candidate List, RoHS 3, CLP UFI |
|
|
85
|
+
| `aml-compliance` | `aml-mcp.novapixel.it` | AMLA Single Rulebook, PEP Screening, Cash Limit |
|
|
86
|
+
| `agri-food-eudr` | `eudr-mcp.novapixel.it` | EUDR Deforestation Polygons, Food Allergens FIC |
|
|
87
|
+
| `pharma-medical-mdr` | `mdr-mcp.novapixel.it` | MDR Device Classification, EUDAMED UDI, FMD |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 🛡️ Zero-Data-Retention & Compliance
|
|
92
|
+
|
|
93
|
+
- **Stateless in-memory execution**: Payload data is processed strictly in volatile RAM (< 50ms) and destroyed upon response.
|
|
94
|
+
- **DPO Policy**: [https://lexgrid.novapixel.it/compliance-policy](https://lexgrid.novapixel.it/compliance-policy)
|
|
95
|
+
- **Official Portal**: [https://lexgrid.novapixel.it](https://lexgrid.novapixel.it)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LexGridApi = void 0;
|
|
4
|
+
class LexGridApi {
|
|
5
|
+
name = 'lexgridApi';
|
|
6
|
+
displayName = 'LexGrid API';
|
|
7
|
+
documentationUrl = 'https://lexgrid.novapixel.it/compliance-policy';
|
|
8
|
+
properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'API Key',
|
|
11
|
+
name: 'apiKey',
|
|
12
|
+
type: 'string',
|
|
13
|
+
typeOptions: {
|
|
14
|
+
password: true,
|
|
15
|
+
},
|
|
16
|
+
default: '',
|
|
17
|
+
description: 'Your LexGrid API Key (leave empty to use daily free trial quota)',
|
|
18
|
+
required: false,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Base URL',
|
|
22
|
+
name: 'baseUrl',
|
|
23
|
+
type: 'string',
|
|
24
|
+
default: 'https://lexgrid.novapixel.it',
|
|
25
|
+
description: 'The LexGrid Sovereign Core Server URL (or custom private cloud appliance)',
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
exports.LexGridApi = LexGridApi;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./nodes/LexGrid/LexGrid.node.js"), exports);
|
|
18
|
+
__exportStar(require("./credentials/LexGridApi.credentials.js"), exports);
|
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LexGrid = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class LexGrid {
|
|
6
|
+
description = {
|
|
7
|
+
displayName: 'LexGrid EU Compliance',
|
|
8
|
+
name: 'lexGrid',
|
|
9
|
+
icon: 'file:lexgrid.svg',
|
|
10
|
+
group: ['transform'],
|
|
11
|
+
version: 1,
|
|
12
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
13
|
+
description: 'Sovereign EU Compliance, 20 Vertical Suites & 90 Deterministic Tools',
|
|
14
|
+
defaults: {
|
|
15
|
+
name: 'LexGrid EU Compliance',
|
|
16
|
+
},
|
|
17
|
+
inputs: ['main'],
|
|
18
|
+
outputs: ['main'],
|
|
19
|
+
credentials: [
|
|
20
|
+
{
|
|
21
|
+
name: 'lexgridApi',
|
|
22
|
+
required: false,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
properties: [
|
|
26
|
+
// 1. Top-Level Resource Selector (All 20 Suites + Universal Tool + Audit Certificate)
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Resource',
|
|
29
|
+
name: 'resource',
|
|
30
|
+
type: 'options',
|
|
31
|
+
noDataExpression: true,
|
|
32
|
+
options: [
|
|
33
|
+
{
|
|
34
|
+
name: '⚡ Universal Tool Runner (All 20 Suites & 90 Tools)',
|
|
35
|
+
value: 'universalTool',
|
|
36
|
+
description: 'Execute any deterministic tool across all 20 European statutory suites with dynamic JSON input',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: '01. EU Tax & KYB (VIES, SDI, Peppol, IBAN)',
|
|
40
|
+
value: 'euTax',
|
|
41
|
+
description: 'VIES VAT verification, SEPA IBAN fraud detection & e-Invoicing XML auditing',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: '02. Financial & ESG Forensics (Altman Z, CSRD VSME)',
|
|
45
|
+
value: 'finEsg',
|
|
46
|
+
description: 'Altman Z-Score CCII default predictor, Beneish M-Score & CSRD Scope 1-2 GHG',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: '03. NetSec & Deliverability (DMARC, SPF, TLS)',
|
|
50
|
+
value: 'netSec',
|
|
51
|
+
description: 'DNSSEC, SPF, DKIM, DMARC, BIMI email deliverability, TLS audit & RDAP intel',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: '04. Web GDPR & Consent (CMP, AI Act, B2B)',
|
|
55
|
+
value: 'webGdpr',
|
|
56
|
+
description: 'GDPR Cookie consent banner audit, Google Consent Mode v2 & EU AI Act classification',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: '05. Appalti Pubblici & ANAC (D.Lgs. 36/2023)',
|
|
60
|
+
value: 'govAppalti',
|
|
61
|
+
description: 'Tender anomaly calculation (Metodo A/B), CIG/CUP validator & subcontract limits',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: '06. DORA & NIS2 ICT Resilience',
|
|
65
|
+
value: 'doraNis2',
|
|
66
|
+
description: 'DORA third-party risk clauses, NIS2 criticality classifier & incident severity triage',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: '07. Customs & CBAM (Carbon Border, TARIC)',
|
|
70
|
+
value: 'customsCbam',
|
|
71
|
+
description: 'CBAM embedded emissions, TARIC HS code lookup, Incoterms & dual-use export control',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: '08. HR & Labour Law (CCNL, IRPEF 2026)',
|
|
75
|
+
value: 'hrLabour',
|
|
76
|
+
description: 'Total employer cost simulation, gross-to-net salary & CCNL statutory minimums',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: '09. Materials DPP & CPR (Battery, ESPR)',
|
|
80
|
+
value: 'materialsDpp',
|
|
81
|
+
description: 'Digital Product Passport (DPP) validation, Construction CPR & Critical Raw Materials',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: '10. Energy Decarbonization (EPBD Case Green, ETS2)',
|
|
85
|
+
value: 'energyEpbd',
|
|
86
|
+
description: 'EPBD IV Case Green building milestones, ETS2 carbon tax projection & CER GSE yields',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: '11. Sovereign PII Scrubber & AI Act Governance',
|
|
90
|
+
value: 'sovereignPii',
|
|
91
|
+
description: 'In-memory PII prompt scrubber, synthetic test data generator & AI Act technical dossier',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: '12. Pan-European Registry, XBRL & EU Taxonomy',
|
|
95
|
+
value: 'xbrlFin',
|
|
96
|
+
description: 'ESEF iXBRL normalizer, BRIS corporate lookup, EU Green Taxonomy & UBO beneficial owners',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: '13. Universal e-Invoicing, ViDA & Peppol BIS 3.0',
|
|
100
|
+
value: 'einvoiceVida',
|
|
101
|
+
description: 'OpenPEPPOL schematron validation, XRechnung compiler, ViDA 2-day reporting & SDI sanitizer',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: '14. EU Grants, State Aid & Transizione 5.0',
|
|
105
|
+
value: 'grantsFunding',
|
|
106
|
+
description: 'Piano Transizione 5.0 tax credits, De Minimis €300k ceiling & Horizon Europe cost models',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: '15. Carbon Accounting, Scope 1-2-3 GHG & CSRD',
|
|
110
|
+
value: 'carbonFactors',
|
|
111
|
+
description: 'Official ISPRA / DEFRA grid factors, stationary combustion & Scope 3 spend-based EEIO',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: '16. European Public Tenders (TED eForms, CPV)',
|
|
115
|
+
value: 'tedProcurement',
|
|
116
|
+
description: 'TED eForms validation under Reg. 2019/1780, CPV matcher & statutory tender deadlines',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: '17. Chemicals, REACH, RoHS 3 & CLP Poison Centers',
|
|
120
|
+
value: 'chemicalsReach',
|
|
121
|
+
description: 'REACH SVHC candidate list screener, RoHS 3 hazardous limits & CLP UFI code validator',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: '18. AML, FIU & Financial Crime Prevention',
|
|
125
|
+
value: 'amlCompliance',
|
|
126
|
+
description: 'AMLA customer risk scoring, PEP risk assessment, EU €10k cash limit & FIU red flags',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: '19. Agri-Food, EUDR Deforestation & FIC Allergens',
|
|
130
|
+
value: 'agriFoodEudr',
|
|
131
|
+
description: 'EUDR deforestation polygon due diligence, FIC Regulation 1169/2011 allergens & DOP/IGP',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: '20. Medical Devices MDR, EUDAMED & FMD Serialization',
|
|
135
|
+
value: 'pharmaMedicalMdr',
|
|
136
|
+
description: 'MDR device classification (Classes I-III), EUDAMED Basic UDI-DI & FMD serialization',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: '📜 Statutory Audit Certificate & Verification Portal',
|
|
140
|
+
value: 'auditCertificate',
|
|
141
|
+
description: 'Verify cryptographic authenticity of official LexGrid certificates and SHA-256 hashes',
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
default: 'universalTool',
|
|
145
|
+
},
|
|
146
|
+
// ==========================================
|
|
147
|
+
// Universal Tool Runner Parameters
|
|
148
|
+
// ==========================================
|
|
149
|
+
{
|
|
150
|
+
displayName: 'Suite',
|
|
151
|
+
name: 'suiteId',
|
|
152
|
+
type: 'options',
|
|
153
|
+
required: true,
|
|
154
|
+
default: 'eu-tax',
|
|
155
|
+
displayOptions: {
|
|
156
|
+
show: {
|
|
157
|
+
resource: ['universalTool'],
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
options: [
|
|
161
|
+
{ name: '01. EU Tax, KYB & e-Invoicing (eu-tax)', value: 'eu-tax' },
|
|
162
|
+
{ name: '02. Financial & ESG Forensics (fin-esg)', value: 'fin-esg' },
|
|
163
|
+
{ name: '03. NetSec & Deliverability (net-sec)', value: 'net-sec' },
|
|
164
|
+
{ name: '04. Web GDPR & Consent (web-gdpr)', value: 'web-gdpr' },
|
|
165
|
+
{ name: '05. Appalti Pubblici & ANAC (gov-appalti)', value: 'gov-appalti' },
|
|
166
|
+
{ name: '06. DORA & NIS2 ICT Resilience (dora-nis2)', value: 'dora-nis2' },
|
|
167
|
+
{ name: '07. Customs & CBAM (customs-cbam)', value: 'customs-cbam' },
|
|
168
|
+
{ name: '08. HR & Labour Law (hr-labour)', value: 'hr-labour' },
|
|
169
|
+
{ name: '09. Materials DPP & CPR (materials-dpp)', value: 'materials-dpp' },
|
|
170
|
+
{ name: '10. Energy Decarbonization (energy-epbd)', value: 'energy-epbd' },
|
|
171
|
+
{ name: '11. Sovereign PII & AI Act (sovereign-pii)', value: 'sovereign-pii' },
|
|
172
|
+
{ name: '12. XBRL & EU Taxonomy (xbrl-fin)', value: 'xbrl-fin' },
|
|
173
|
+
{ name: '13. Universal e-Invoicing & ViDA (einvoice-vida)', value: 'einvoice-vida' },
|
|
174
|
+
{ name: '14. EU Grants & State Aid (grants-funding)', value: 'grants-funding' },
|
|
175
|
+
{ name: '15. Carbon Accounting Scope 1-2-3 (carbon-factors)', value: 'carbon-factors' },
|
|
176
|
+
{ name: '16. TED eForms Procurement (ted-procurement)', value: 'ted-procurement' },
|
|
177
|
+
{ name: '17. Chemicals REACH & RoHS (chemicals-reach)', value: 'chemicals-reach' },
|
|
178
|
+
{ name: '18. AML & Financial Crime (aml-compliance)', value: 'aml-compliance' },
|
|
179
|
+
{ name: '19. Agri-Food & EUDR (agri-food-eudr)', value: 'agri-food-eudr' },
|
|
180
|
+
{ name: '20. Medical Devices MDR & Pharma (pharma-medical-mdr)', value: 'pharma-medical-mdr' },
|
|
181
|
+
],
|
|
182
|
+
description: 'Select the specialized European compliance suite',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
displayName: 'Tool Name / Endpoint',
|
|
186
|
+
name: 'toolName',
|
|
187
|
+
type: 'string',
|
|
188
|
+
required: true,
|
|
189
|
+
default: 'vies_gleif_kyb_verify',
|
|
190
|
+
placeholder: 'e.g. vies_gleif_kyb_verify or anomalia_offerte_calculator',
|
|
191
|
+
displayOptions: {
|
|
192
|
+
show: {
|
|
193
|
+
resource: ['universalTool'],
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
description: 'Canonical MCP tool name or REST endpoint slug',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
displayName: 'Parameters (JSON)',
|
|
200
|
+
name: 'payloadJson',
|
|
201
|
+
type: 'json',
|
|
202
|
+
required: true,
|
|
203
|
+
default: '{\n "countryCode": "IT",\n "vatNumber": "01234567890"\n}',
|
|
204
|
+
displayOptions: {
|
|
205
|
+
show: {
|
|
206
|
+
resource: ['universalTool'],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
description: 'JSON object payload passed into the deterministic statutory calculation engine',
|
|
210
|
+
},
|
|
211
|
+
// ==========================================
|
|
212
|
+
// Dedicated Pre-Configured Operations
|
|
213
|
+
// ==========================================
|
|
214
|
+
// EU Tax Operations
|
|
215
|
+
{
|
|
216
|
+
displayName: 'Operation',
|
|
217
|
+
name: 'operation',
|
|
218
|
+
type: 'options',
|
|
219
|
+
noDataExpression: true,
|
|
220
|
+
displayOptions: {
|
|
221
|
+
show: {
|
|
222
|
+
resource: ['euTax'],
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
options: [
|
|
226
|
+
{
|
|
227
|
+
name: 'Verify VIES VAT (KYB)',
|
|
228
|
+
value: 'verifyVies',
|
|
229
|
+
description: 'Check European VAT with Local Shadow Mirror resilience',
|
|
230
|
+
action: 'Verify European VAT number on VIES',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: 'Validate SEPA IBAN',
|
|
234
|
+
value: 'validateIban',
|
|
235
|
+
description: 'Validate IBAN checksum and retrieve bank directory info',
|
|
236
|
+
action: 'Validate SEPA IBAN checksum',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'Audit e-Invoice XML (SDI / Peppol)',
|
|
240
|
+
value: 'auditEInvoice',
|
|
241
|
+
description: 'Audit FatturaPA / Peppol XML against official XSD schemas',
|
|
242
|
+
action: 'Audit e-Invoice XML against official XSD',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'Audit Italian Codice Fiscale',
|
|
246
|
+
value: 'auditCodiceFiscale',
|
|
247
|
+
description: 'Verify Codice Fiscale checksum, omocodia characters & demographic data',
|
|
248
|
+
action: 'Audit Codice Fiscale checksum and omocodia',
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
default: 'verifyVies',
|
|
252
|
+
},
|
|
253
|
+
// Gov Appalti Operations
|
|
254
|
+
{
|
|
255
|
+
displayName: 'Operation',
|
|
256
|
+
name: 'operation',
|
|
257
|
+
type: 'options',
|
|
258
|
+
noDataExpression: true,
|
|
259
|
+
displayOptions: {
|
|
260
|
+
show: {
|
|
261
|
+
resource: ['govAppalti'],
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
options: [
|
|
265
|
+
{
|
|
266
|
+
name: 'Calculate Anomaly Threshold',
|
|
267
|
+
value: 'calculateAnomaly',
|
|
268
|
+
description: 'Calculate tender anomaly threshold ex D.Lgs. 36/2023 Art. 110',
|
|
269
|
+
action: 'Calculate public tender anomaly threshold',
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: 'Audit Cascade Subcontract',
|
|
273
|
+
value: 'auditSubcontract',
|
|
274
|
+
description: 'Verify cascade subcontract limits and mandatory declarations',
|
|
275
|
+
action: 'Audit cascade subcontract limits',
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: 'Validate CIG & CUP',
|
|
279
|
+
value: 'validateCigCup',
|
|
280
|
+
description: 'Validate ANAC SmartCIG and public investment CUP alphanumeric format',
|
|
281
|
+
action: 'Validate ANAC CIG and CUP format',
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
default: 'calculateAnomaly',
|
|
285
|
+
},
|
|
286
|
+
// Fin ESG Operations
|
|
287
|
+
{
|
|
288
|
+
displayName: 'Operation',
|
|
289
|
+
name: 'operation',
|
|
290
|
+
type: 'options',
|
|
291
|
+
noDataExpression: true,
|
|
292
|
+
displayOptions: {
|
|
293
|
+
show: {
|
|
294
|
+
resource: ['finEsg'],
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
options: [
|
|
298
|
+
{
|
|
299
|
+
name: 'Predict Default (Altman Z-Score)',
|
|
300
|
+
value: 'predictDefault',
|
|
301
|
+
description: 'Calculate insolvency risk with Pre-Flight Balance Sheet Sanity check',
|
|
302
|
+
action: 'Predict corporate default risk using Altman Z-Score',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'Audit Trend Anomaly (Beneish / Benford)',
|
|
306
|
+
value: 'detectTrendAnomaly',
|
|
307
|
+
description: 'Detect financial statement manipulation and Benford anomalies',
|
|
308
|
+
action: 'Audit financial statements for manipulation',
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: 'Calculate CSRD VSME GHG (Scope 1 & 2)',
|
|
312
|
+
value: 'calculateCsrdVsme',
|
|
313
|
+
description: 'Direct Scope 1 and Scope 2 calculation under EFRAG VSME ESRS E1',
|
|
314
|
+
action: 'Calculate CSRD VSME GHG emissions',
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
default: 'predictDefault',
|
|
318
|
+
},
|
|
319
|
+
// Statutory Audit Certificate Operations
|
|
320
|
+
{
|
|
321
|
+
displayName: 'Operation',
|
|
322
|
+
name: 'operation',
|
|
323
|
+
type: 'options',
|
|
324
|
+
noDataExpression: true,
|
|
325
|
+
displayOptions: {
|
|
326
|
+
show: {
|
|
327
|
+
resource: ['auditCertificate'],
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
options: [
|
|
331
|
+
{
|
|
332
|
+
name: 'Get Certificate Verification',
|
|
333
|
+
value: 'getCertificate',
|
|
334
|
+
description: 'Retrieve official cryptographic verification proof by Certificate ID',
|
|
335
|
+
action: 'Retrieve official statutory verification proof',
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: 'Recheck Hash Match',
|
|
339
|
+
value: 'recheckHash',
|
|
340
|
+
description: 'Verify if candidate JSON data matches the certified SHA-256 fingerprint',
|
|
341
|
+
action: 'Recheck candidate payload hash match',
|
|
342
|
+
},
|
|
343
|
+
],
|
|
344
|
+
default: 'getCertificate',
|
|
345
|
+
},
|
|
346
|
+
// Parameters for EU Tax
|
|
347
|
+
{
|
|
348
|
+
displayName: 'Country Code',
|
|
349
|
+
name: 'countryCode',
|
|
350
|
+
type: 'string',
|
|
351
|
+
default: 'IT',
|
|
352
|
+
displayOptions: {
|
|
353
|
+
show: {
|
|
354
|
+
resource: ['euTax'],
|
|
355
|
+
operation: ['verifyVies'],
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
description: '2-letter European member state code (e.g. IT, DE, FR, ES)',
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
displayName: 'VAT Number',
|
|
362
|
+
name: 'vatId',
|
|
363
|
+
type: 'string',
|
|
364
|
+
required: true,
|
|
365
|
+
default: '',
|
|
366
|
+
placeholder: '01234567890',
|
|
367
|
+
displayOptions: {
|
|
368
|
+
show: {
|
|
369
|
+
resource: ['euTax'],
|
|
370
|
+
operation: ['verifyVies'],
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
description: 'European VAT number without country prefix',
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
displayName: 'Company Name (Optional)',
|
|
377
|
+
name: 'companyName',
|
|
378
|
+
type: 'string',
|
|
379
|
+
default: '',
|
|
380
|
+
displayOptions: {
|
|
381
|
+
show: {
|
|
382
|
+
resource: ['euTax'],
|
|
383
|
+
operation: ['verifyVies'],
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
description: 'Optional company name for cross-check and LEI lookup',
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
displayName: 'IBAN',
|
|
390
|
+
name: 'iban',
|
|
391
|
+
type: 'string',
|
|
392
|
+
required: true,
|
|
393
|
+
default: '',
|
|
394
|
+
placeholder: 'IT60X0542811101000000123456',
|
|
395
|
+
displayOptions: {
|
|
396
|
+
show: {
|
|
397
|
+
resource: ['euTax'],
|
|
398
|
+
operation: ['validateIban'],
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
description: 'SEPA International Bank Account Number',
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
displayName: 'e-Invoice XML Content',
|
|
405
|
+
name: 'xmlContent',
|
|
406
|
+
type: 'string',
|
|
407
|
+
typeOptions: {
|
|
408
|
+
rows: 6,
|
|
409
|
+
},
|
|
410
|
+
required: true,
|
|
411
|
+
default: '',
|
|
412
|
+
placeholder: '<?xml version="1.0" encoding="UTF-8"?>...',
|
|
413
|
+
displayOptions: {
|
|
414
|
+
show: {
|
|
415
|
+
resource: ['euTax'],
|
|
416
|
+
operation: ['auditEInvoice'],
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
description: 'Raw XML string of FatturaPA 1.2.2 or Peppol BIS 3.0 invoice',
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
displayName: 'Codice Fiscale',
|
|
423
|
+
name: 'codiceFiscale',
|
|
424
|
+
type: 'string',
|
|
425
|
+
required: true,
|
|
426
|
+
default: '',
|
|
427
|
+
placeholder: 'RSSMRA80A01H501U',
|
|
428
|
+
displayOptions: {
|
|
429
|
+
show: {
|
|
430
|
+
resource: ['euTax'],
|
|
431
|
+
operation: ['auditCodiceFiscale'],
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
description: 'Italian 16-character alphanumeric Codice Fiscale',
|
|
435
|
+
},
|
|
436
|
+
// Parameters for Gov Appalti
|
|
437
|
+
{
|
|
438
|
+
displayName: 'Bids (Comma-separated discounts %)',
|
|
439
|
+
name: 'bids',
|
|
440
|
+
type: 'string',
|
|
441
|
+
required: true,
|
|
442
|
+
default: '12.5, 14.2, 10.8, 15.0, 13.9, 11.4',
|
|
443
|
+
displayOptions: {
|
|
444
|
+
show: {
|
|
445
|
+
resource: ['govAppalti'],
|
|
446
|
+
operation: ['calculateAnomaly'],
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
description: 'List of percentage bid discounts, comma-separated',
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
displayName: 'Calculation Method',
|
|
453
|
+
name: 'method',
|
|
454
|
+
type: 'options',
|
|
455
|
+
options: [
|
|
456
|
+
{ name: 'Metodo A (D.Lgs. 36/2023 Allegato II.2)', value: 'METODO_A' },
|
|
457
|
+
{ name: 'Metodo B (D.Lgs. 36/2023 Allegato II.2)', value: 'METODO_B' },
|
|
458
|
+
],
|
|
459
|
+
default: 'METODO_A',
|
|
460
|
+
displayOptions: {
|
|
461
|
+
show: {
|
|
462
|
+
resource: ['govAppalti'],
|
|
463
|
+
operation: ['calculateAnomaly'],
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
displayName: 'Contract Amount (€)',
|
|
469
|
+
name: 'contractAmount',
|
|
470
|
+
type: 'number',
|
|
471
|
+
required: true,
|
|
472
|
+
default: 500000,
|
|
473
|
+
displayOptions: {
|
|
474
|
+
show: {
|
|
475
|
+
resource: ['govAppalti'],
|
|
476
|
+
operation: ['auditSubcontract'],
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
displayName: 'Subcontract Amount (€)',
|
|
482
|
+
name: 'subcontractAmount',
|
|
483
|
+
type: 'number',
|
|
484
|
+
required: true,
|
|
485
|
+
default: 150000,
|
|
486
|
+
displayOptions: {
|
|
487
|
+
show: {
|
|
488
|
+
resource: ['govAppalti'],
|
|
489
|
+
operation: ['auditSubcontract'],
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
displayName: 'Category',
|
|
495
|
+
name: 'category',
|
|
496
|
+
type: 'string',
|
|
497
|
+
default: 'OG1',
|
|
498
|
+
displayOptions: {
|
|
499
|
+
show: {
|
|
500
|
+
resource: ['govAppalti'],
|
|
501
|
+
operation: ['auditSubcontract'],
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
displayName: 'CIG',
|
|
507
|
+
name: 'cig',
|
|
508
|
+
type: 'string',
|
|
509
|
+
default: '',
|
|
510
|
+
placeholder: '9876543210',
|
|
511
|
+
displayOptions: {
|
|
512
|
+
show: {
|
|
513
|
+
resource: ['govAppalti'],
|
|
514
|
+
operation: ['validateCigCup'],
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
displayName: 'CUP',
|
|
520
|
+
name: 'cup',
|
|
521
|
+
type: 'string',
|
|
522
|
+
default: '',
|
|
523
|
+
placeholder: 'J12B23000010001',
|
|
524
|
+
displayOptions: {
|
|
525
|
+
show: {
|
|
526
|
+
resource: ['govAppalti'],
|
|
527
|
+
operation: ['validateCigCup'],
|
|
528
|
+
},
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
// Parameters for Fin ESG (Altman Z-Score)
|
|
532
|
+
{
|
|
533
|
+
displayName: 'Total Assets (€)',
|
|
534
|
+
name: 'totalAssets',
|
|
535
|
+
type: 'number',
|
|
536
|
+
required: true,
|
|
537
|
+
default: 1000000,
|
|
538
|
+
displayOptions: {
|
|
539
|
+
show: {
|
|
540
|
+
resource: ['finEsg'],
|
|
541
|
+
operation: ['predictDefault'],
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
displayName: 'Total Liabilities (€)',
|
|
547
|
+
name: 'totalLiabilities',
|
|
548
|
+
type: 'number',
|
|
549
|
+
required: true,
|
|
550
|
+
default: 600000,
|
|
551
|
+
displayOptions: {
|
|
552
|
+
show: {
|
|
553
|
+
resource: ['finEsg'],
|
|
554
|
+
operation: ['predictDefault'],
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
displayName: 'Equity (€)',
|
|
560
|
+
name: 'equity',
|
|
561
|
+
type: 'number',
|
|
562
|
+
required: true,
|
|
563
|
+
default: 400000,
|
|
564
|
+
displayOptions: {
|
|
565
|
+
show: {
|
|
566
|
+
resource: ['finEsg'],
|
|
567
|
+
operation: ['predictDefault'],
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
description: 'Pre-flight sanity check requires Total Assets == Total Liabilities + Equity',
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
displayName: 'Retained Earnings (€)',
|
|
574
|
+
name: 'retainedEarnings',
|
|
575
|
+
type: 'number',
|
|
576
|
+
required: true,
|
|
577
|
+
default: 150000,
|
|
578
|
+
displayOptions: {
|
|
579
|
+
show: {
|
|
580
|
+
resource: ['finEsg'],
|
|
581
|
+
operation: ['predictDefault'],
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
displayName: 'EBIT (€)',
|
|
587
|
+
name: 'ebit',
|
|
588
|
+
type: 'number',
|
|
589
|
+
required: true,
|
|
590
|
+
default: 95000,
|
|
591
|
+
displayOptions: {
|
|
592
|
+
show: {
|
|
593
|
+
resource: ['finEsg'],
|
|
594
|
+
operation: ['predictDefault'],
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
displayName: 'Revenue (€)',
|
|
600
|
+
name: 'revenue',
|
|
601
|
+
type: 'number',
|
|
602
|
+
required: true,
|
|
603
|
+
default: 1200000,
|
|
604
|
+
displayOptions: {
|
|
605
|
+
show: {
|
|
606
|
+
resource: ['finEsg'],
|
|
607
|
+
operation: ['predictDefault'],
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
// Parameter: Certificate ID
|
|
612
|
+
{
|
|
613
|
+
displayName: 'Certificate ID',
|
|
614
|
+
name: 'certificateId',
|
|
615
|
+
type: 'string',
|
|
616
|
+
required: true,
|
|
617
|
+
default: '',
|
|
618
|
+
placeholder: 'LG-2026-B81C-9E4F-2A7D',
|
|
619
|
+
displayOptions: {
|
|
620
|
+
show: {
|
|
621
|
+
resource: ['auditCertificate'],
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
description: 'Official LexGrid statutory certificate protocol string',
|
|
625
|
+
},
|
|
626
|
+
],
|
|
627
|
+
};
|
|
628
|
+
async execute() {
|
|
629
|
+
const items = this.getInputData();
|
|
630
|
+
const returnData = [];
|
|
631
|
+
const credentials = (await this.getCredentials('lexgridApi').catch(() => ({})));
|
|
632
|
+
const apiKey = credentials?.apiKey || '';
|
|
633
|
+
const baseUrl = (credentials?.baseUrl || 'https://lexgrid.novapixel.it').replace(/\/$/, '');
|
|
634
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
635
|
+
for (let i = 0; i < items.length; i++) {
|
|
636
|
+
try {
|
|
637
|
+
let endpoint = '';
|
|
638
|
+
let payload = {};
|
|
639
|
+
let httpMethod = 'POST';
|
|
640
|
+
if (resource === 'universalTool') {
|
|
641
|
+
const suiteId = this.getNodeParameter('suiteId', i);
|
|
642
|
+
const toolName = this.getNodeParameter('toolName', i).trim();
|
|
643
|
+
const rawPayload = this.getNodeParameter('payloadJson', i, {});
|
|
644
|
+
payload = typeof rawPayload === 'string' ? JSON.parse(rawPayload) : rawPayload;
|
|
645
|
+
endpoint = `${baseUrl}/v1/${suiteId}/${toolName}`;
|
|
646
|
+
}
|
|
647
|
+
else if (resource === 'euTax') {
|
|
648
|
+
const operation = this.getNodeParameter('operation', i);
|
|
649
|
+
if (operation === 'verifyVies') {
|
|
650
|
+
endpoint = `${baseUrl}/v1/eu-tax/vies-gleif-kyb`;
|
|
651
|
+
payload = {
|
|
652
|
+
countryCode: this.getNodeParameter('countryCode', i, 'IT'),
|
|
653
|
+
vatNumber: this.getNodeParameter('vatId', i),
|
|
654
|
+
companyName: this.getNodeParameter('companyName', i, '') || undefined,
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
else if (operation === 'validateIban') {
|
|
658
|
+
endpoint = `${baseUrl}/v1/eu-tax/iban-sepa-antifraud`;
|
|
659
|
+
payload = { iban: this.getNodeParameter('iban', i) };
|
|
660
|
+
}
|
|
661
|
+
else if (operation === 'auditEInvoice') {
|
|
662
|
+
endpoint = `${baseUrl}/v1/eu-tax/einvoice-xml-auditor`;
|
|
663
|
+
payload = { xmlContent: this.getNodeParameter('xmlContent', i), mode: 'audit' };
|
|
664
|
+
}
|
|
665
|
+
else if (operation === 'auditCodiceFiscale') {
|
|
666
|
+
endpoint = `${baseUrl}/v1/eu-tax/codice-fiscale-audit`;
|
|
667
|
+
payload = { codiceFiscale: this.getNodeParameter('codiceFiscale', i) };
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
else if (resource === 'govAppalti') {
|
|
671
|
+
const operation = this.getNodeParameter('operation', i);
|
|
672
|
+
if (operation === 'calculateAnomaly') {
|
|
673
|
+
endpoint = `${baseUrl}/v1/gov-appalti/anomalia-offerte`;
|
|
674
|
+
const rawBids = this.getNodeParameter('bids', i);
|
|
675
|
+
const parsedBids = rawBids.split(',').map((s) => parseFloat(s.trim())).filter((n) => !isNaN(n));
|
|
676
|
+
payload = {
|
|
677
|
+
ribassiPercentuali: parsedBids,
|
|
678
|
+
metodoCalcolo: this.getNodeParameter('method', i),
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
else if (operation === 'auditSubcontract') {
|
|
682
|
+
endpoint = `${baseUrl}/v1/gov-appalti/subappalto-limiter`;
|
|
683
|
+
payload = {
|
|
684
|
+
importoContrattoPrincipaleEur: this.getNodeParameter('contractAmount', i),
|
|
685
|
+
importoSubappaltoRichiestoEur: this.getNodeParameter('subcontractAmount', i),
|
|
686
|
+
categoriaLavori: this.getNodeParameter('category', i),
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
else if (operation === 'validateCigCup') {
|
|
690
|
+
endpoint = `${baseUrl}/v1/gov-appalti/cig-cup-validator`;
|
|
691
|
+
payload = {
|
|
692
|
+
cig: this.getNodeParameter('cig', i, '') || undefined,
|
|
693
|
+
cup: this.getNodeParameter('cup', i, '') || undefined,
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
else if (resource === 'finEsg') {
|
|
698
|
+
const operation = this.getNodeParameter('operation', i);
|
|
699
|
+
if (operation === 'predictDefault') {
|
|
700
|
+
endpoint = `${baseUrl}/v1/fin-esg/default-predictor`;
|
|
701
|
+
payload = {
|
|
702
|
+
financialData: {
|
|
703
|
+
totalAssets: this.getNodeParameter('totalAssets', i),
|
|
704
|
+
totalLiabilities: this.getNodeParameter('totalLiabilities', i),
|
|
705
|
+
equity: this.getNodeParameter('equity', i),
|
|
706
|
+
retainedEarnings: this.getNodeParameter('retainedEarnings', i),
|
|
707
|
+
ebit: this.getNodeParameter('ebit', i),
|
|
708
|
+
revenue: this.getNodeParameter('revenue', i),
|
|
709
|
+
},
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
else if (resource === 'auditCertificate') {
|
|
714
|
+
const certId = this.getNodeParameter('certificateId', i).trim().toUpperCase();
|
|
715
|
+
const operation = this.getNodeParameter('operation', i);
|
|
716
|
+
if (operation === 'getCertificate') {
|
|
717
|
+
endpoint = `${baseUrl}/verify/${certId}?format=json`;
|
|
718
|
+
httpMethod = 'GET';
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
const headers = {
|
|
722
|
+
Accept: 'application/json',
|
|
723
|
+
'User-Agent': 'n8n-nodes-lexgrid/1.0.0',
|
|
724
|
+
};
|
|
725
|
+
if (apiKey) {
|
|
726
|
+
headers['X-API-Key'] = apiKey;
|
|
727
|
+
}
|
|
728
|
+
if (httpMethod === 'POST') {
|
|
729
|
+
headers['Content-Type'] = 'application/json';
|
|
730
|
+
}
|
|
731
|
+
const requestOptions = {
|
|
732
|
+
method: httpMethod,
|
|
733
|
+
url: endpoint,
|
|
734
|
+
headers,
|
|
735
|
+
json: true,
|
|
736
|
+
body: httpMethod === 'POST' ? payload : undefined,
|
|
737
|
+
};
|
|
738
|
+
const responseData = await this.helpers.httpRequest(requestOptions);
|
|
739
|
+
returnData.push({ json: responseData });
|
|
740
|
+
}
|
|
741
|
+
catch (error) {
|
|
742
|
+
if (this.continueOnFail()) {
|
|
743
|
+
returnData.push({ json: { error: error.message, details: error.response?.body || error } });
|
|
744
|
+
continue;
|
|
745
|
+
}
|
|
746
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
return [returnData];
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
exports.LexGrid = LexGrid;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-lexgrid.lexGrid",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": [
|
|
6
|
+
"Development",
|
|
7
|
+
"Finance & Accounting",
|
|
8
|
+
"Legal & Compliance",
|
|
9
|
+
"AI & Data"
|
|
10
|
+
],
|
|
11
|
+
"resources": {
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://lexgrid.novapixel.it"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="#0b192c" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/>
|
|
3
|
+
<circle cx="12" cy="12" r="2" fill="#2563eb" stroke="none"/>
|
|
4
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-lexgrid",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Official n8n community node for NovaPixel LexGrid — Sovereign EU Compliance, VIES KYB, ANAC Public Tenders & Financial Forensics",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"lexgrid",
|
|
8
|
+
"compliance",
|
|
9
|
+
"vies",
|
|
10
|
+
"anac",
|
|
11
|
+
"altman-z-score",
|
|
12
|
+
"gdpr",
|
|
13
|
+
"appalti",
|
|
14
|
+
"fiscale",
|
|
15
|
+
"mcp"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"homepage": "https://lexgrid.novapixel.it",
|
|
19
|
+
"author": {
|
|
20
|
+
"name": "NovaPixel",
|
|
21
|
+
"email": "lexgrid@novapixel.it",
|
|
22
|
+
"url": "https://lexgrid.novapixel.it"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://lexgrid.novapixel.it/compliance-policy",
|
|
26
|
+
"email": "lexgrid@novapixel.it"
|
|
27
|
+
},
|
|
28
|
+
"main": "dist/index.js",
|
|
29
|
+
"type": "module",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc && node scripts/copy-assets.js",
|
|
32
|
+
"prepublishOnly": "npm run build"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"n8n": {
|
|
38
|
+
"n8nNodesApiVersion": 1,
|
|
39
|
+
"credentials": [
|
|
40
|
+
"dist/credentials/LexGridApi.credentials.js"
|
|
41
|
+
],
|
|
42
|
+
"nodes": [
|
|
43
|
+
"dist/nodes/LexGrid/LexGrid.node.js"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"n8n-workflow": "^1.76.0",
|
|
48
|
+
"typescript": "^5.7.0"
|
|
49
|
+
}
|
|
50
|
+
}
|