n8n-nodes-nfe 0.1.0 → 0.2.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 (123) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/README.md +163 -150
  3. package/dist/credentials/NfeApi.credentials.d.ts +2 -2
  4. package/dist/credentials/NfeApi.credentials.js +33 -11
  5. package/dist/credentials/NfeApi.credentials.js.map +1 -1
  6. package/dist/nodes/Nfe/Nfe.node.d.ts +8 -1
  7. package/dist/nodes/Nfe/Nfe.node.js +107 -20
  8. package/dist/nodes/Nfe/Nfe.node.js.map +1 -1
  9. package/dist/nodes/Nfe/Nfe.node.json +4 -4
  10. package/dist/nodes/Nfe/actions/company/index.d.ts +4 -0
  11. package/dist/nodes/Nfe/actions/company/index.js +96 -0
  12. package/dist/nodes/Nfe/actions/company/index.js.map +1 -0
  13. package/dist/nodes/Nfe/actions/lookup/index.d.ts +4 -0
  14. package/dist/nodes/Nfe/actions/lookup/index.js +143 -0
  15. package/dist/nodes/Nfe/actions/lookup/index.js.map +1 -0
  16. package/dist/nodes/Nfe/actions/serviceInvoice/cancel.d.ts +3 -0
  17. package/dist/nodes/Nfe/actions/serviceInvoice/cancel.js +43 -0
  18. package/dist/nodes/Nfe/actions/serviceInvoice/cancel.js.map +1 -0
  19. package/dist/nodes/Nfe/actions/serviceInvoice/common.d.ts +13 -0
  20. package/dist/nodes/Nfe/actions/serviceInvoice/common.js +71 -0
  21. package/dist/nodes/Nfe/actions/serviceInvoice/common.js.map +1 -0
  22. package/dist/nodes/Nfe/actions/serviceInvoice/download.d.ts +3 -0
  23. package/dist/nodes/Nfe/actions/serviceInvoice/download.js +67 -0
  24. package/dist/nodes/Nfe/actions/serviceInvoice/download.js.map +1 -0
  25. package/dist/nodes/Nfe/actions/serviceInvoice/get.d.ts +3 -0
  26. package/dist/nodes/Nfe/actions/serviceInvoice/get.js +14 -0
  27. package/dist/nodes/Nfe/actions/serviceInvoice/get.js.map +1 -0
  28. package/dist/nodes/Nfe/actions/serviceInvoice/getAll.d.ts +4 -0
  29. package/dist/nodes/Nfe/actions/serviceInvoice/getAll.js +98 -0
  30. package/dist/nodes/Nfe/actions/serviceInvoice/getAll.js.map +1 -0
  31. package/dist/nodes/Nfe/actions/serviceInvoice/getByExternalId.d.ts +3 -0
  32. package/dist/nodes/Nfe/actions/serviceInvoice/getByExternalId.js +46 -0
  33. package/dist/nodes/Nfe/actions/serviceInvoice/getByExternalId.js.map +1 -0
  34. package/dist/nodes/Nfe/actions/serviceInvoice/index.d.ts +4 -0
  35. package/dist/nodes/Nfe/actions/serviceInvoice/index.js +134 -0
  36. package/dist/nodes/Nfe/actions/serviceInvoice/index.js.map +1 -0
  37. package/dist/nodes/Nfe/actions/serviceInvoice/issue.d.ts +8 -0
  38. package/dist/nodes/Nfe/actions/serviceInvoice/issue.js +889 -0
  39. package/dist/nodes/Nfe/actions/serviceInvoice/issue.js.map +1 -0
  40. package/dist/nodes/Nfe/actions/serviceInvoice/sendEmail.d.ts +3 -0
  41. package/dist/nodes/Nfe/actions/serviceInvoice/sendEmail.js +15 -0
  42. package/dist/nodes/Nfe/actions/serviceInvoice/sendEmail.js.map +1 -0
  43. package/dist/nodes/Nfe/actions/types.d.ts +2 -0
  44. package/dist/nodes/Nfe/actions/types.js +3 -0
  45. package/dist/nodes/Nfe/actions/types.js.map +1 -0
  46. package/dist/nodes/Nfe/methods/listSearch.d.ts +3 -0
  47. package/dist/nodes/Nfe/methods/listSearch.js +71 -0
  48. package/dist/nodes/Nfe/methods/listSearch.js.map +1 -0
  49. package/dist/nodes/Nfe/shared/company.d.ts +6 -0
  50. package/dist/nodes/Nfe/shared/company.js +46 -0
  51. package/dist/nodes/Nfe/shared/company.js.map +1 -0
  52. package/dist/nodes/Nfe/shared/constants.d.ts +10 -0
  53. package/dist/nodes/Nfe/shared/constants.js +14 -0
  54. package/dist/nodes/Nfe/shared/constants.js.map +1 -0
  55. package/dist/nodes/Nfe/shared/output.d.ts +12 -0
  56. package/dist/nodes/Nfe/shared/output.js +140 -0
  57. package/dist/nodes/Nfe/shared/output.js.map +1 -0
  58. package/dist/nodes/Nfe/shared/poll.d.ts +11 -0
  59. package/dist/nodes/Nfe/shared/poll.js +36 -0
  60. package/dist/nodes/Nfe/shared/poll.js.map +1 -0
  61. package/dist/nodes/Nfe/shared/validators.d.ts +16 -0
  62. package/dist/nodes/Nfe/shared/validators.js +182 -0
  63. package/dist/nodes/Nfe/shared/validators.js.map +1 -0
  64. package/dist/nodes/Nfe/transport/download.d.ts +15 -0
  65. package/dist/nodes/Nfe/transport/download.js +114 -0
  66. package/dist/nodes/Nfe/transport/download.js.map +1 -0
  67. package/dist/nodes/Nfe/transport/errors.d.ts +20 -0
  68. package/dist/nodes/Nfe/transport/errors.js +189 -0
  69. package/dist/nodes/Nfe/transport/errors.js.map +1 -0
  70. package/dist/nodes/Nfe/transport/public.d.ts +12 -0
  71. package/dist/nodes/Nfe/transport/public.js +56 -0
  72. package/dist/nodes/Nfe/transport/public.js.map +1 -0
  73. package/dist/nodes/Nfe/transport/request.d.ts +37 -0
  74. package/dist/nodes/Nfe/transport/request.js +101 -0
  75. package/dist/nodes/Nfe/transport/request.js.map +1 -0
  76. package/dist/nodes/NfeTrigger/NfeTrigger.node.d.ts +25 -0
  77. package/dist/nodes/NfeTrigger/NfeTrigger.node.js +300 -0
  78. package/dist/nodes/NfeTrigger/NfeTrigger.node.js.map +1 -0
  79. package/dist/nodes/NfeTrigger/NfeTrigger.node.json +18 -0
  80. package/dist/nodes/NfeTrigger/delivery.d.ts +12 -0
  81. package/dist/nodes/NfeTrigger/delivery.js +65 -0
  82. package/dist/nodes/NfeTrigger/delivery.js.map +1 -0
  83. package/dist/nodes/NfeTrigger/events.d.ts +15 -0
  84. package/dist/nodes/NfeTrigger/events.js +260 -0
  85. package/dist/nodes/NfeTrigger/events.js.map +1 -0
  86. package/dist/nodes/NfeTrigger/nfe.dark.svg +2 -0
  87. package/dist/nodes/NfeTrigger/nfe.svg +2 -0
  88. package/dist/nodes/NfeTrigger/signature.d.ts +2 -0
  89. package/dist/nodes/NfeTrigger/signature.js +19 -0
  90. package/dist/nodes/NfeTrigger/signature.js.map +1 -0
  91. package/package.json +78 -54
  92. package/dist/nodes/Nfe/resources/serviceInvoice/cancel.d.ts +0 -2
  93. package/dist/nodes/Nfe/resources/serviceInvoice/cancel.js +0 -21
  94. package/dist/nodes/Nfe/resources/serviceInvoice/cancel.js.map +0 -1
  95. package/dist/nodes/Nfe/resources/serviceInvoice/downloadPdf.d.ts +0 -2
  96. package/dist/nodes/Nfe/resources/serviceInvoice/downloadPdf.js +0 -21
  97. package/dist/nodes/Nfe/resources/serviceInvoice/downloadPdf.js.map +0 -1
  98. package/dist/nodes/Nfe/resources/serviceInvoice/downloadXml.d.ts +0 -2
  99. package/dist/nodes/Nfe/resources/serviceInvoice/downloadXml.js +0 -21
  100. package/dist/nodes/Nfe/resources/serviceInvoice/downloadXml.js.map +0 -1
  101. package/dist/nodes/Nfe/resources/serviceInvoice/get.d.ts +0 -2
  102. package/dist/nodes/Nfe/resources/serviceInvoice/get.js +0 -21
  103. package/dist/nodes/Nfe/resources/serviceInvoice/get.js.map +0 -1
  104. package/dist/nodes/Nfe/resources/serviceInvoice/getAll.d.ts +0 -2
  105. package/dist/nodes/Nfe/resources/serviceInvoice/getAll.js +0 -127
  106. package/dist/nodes/Nfe/resources/serviceInvoice/getAll.js.map +0 -1
  107. package/dist/nodes/Nfe/resources/serviceInvoice/getByExternalId.d.ts +0 -2
  108. package/dist/nodes/Nfe/resources/serviceInvoice/getByExternalId.js +0 -21
  109. package/dist/nodes/Nfe/resources/serviceInvoice/getByExternalId.js.map +0 -1
  110. package/dist/nodes/Nfe/resources/serviceInvoice/index.d.ts +0 -5
  111. package/dist/nodes/Nfe/resources/serviceInvoice/index.js +0 -170
  112. package/dist/nodes/Nfe/resources/serviceInvoice/index.js.map +0 -1
  113. package/dist/nodes/Nfe/resources/serviceInvoice/issue.d.ts +0 -2
  114. package/dist/nodes/Nfe/resources/serviceInvoice/issue.js +0 -620
  115. package/dist/nodes/Nfe/resources/serviceInvoice/issue.js.map +0 -1
  116. package/dist/nodes/Nfe/resources/serviceInvoice/sendEmail.d.ts +0 -2
  117. package/dist/nodes/Nfe/resources/serviceInvoice/sendEmail.js +0 -21
  118. package/dist/nodes/Nfe/resources/serviceInvoice/sendEmail.js.map +0 -1
  119. package/dist/nodes/Nfe/utils/errorParser.d.ts +0 -22
  120. package/dist/nodes/Nfe/utils/errorParser.js +0 -144
  121. package/dist/nodes/Nfe/utils/errorParser.js.map +0 -1
  122. package/dist/package.json +0 -56
  123. package/dist/tsconfig.tsbuildinfo +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,73 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.2.0] - Unreleased
9
+
10
+ A rewrite of the NFE.io node with the NFS-e API V3 and the tax reform fields, plus a trigger node and lookups. See [Migrating from 0.1](README.md#migrating-from-01).
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ - The **NFE.io** node is now node version 2 and only version 2. Workflows built with 0.1 must replace each NFE.io node by a new one. A node saved by 0.1 stops the execution with "This node was created with version 0.1 of n8n-nodes-nfe" and sends nothing to NFE.io.
15
+ - Service invoices use the NFS-e API V3 instead of V1. CPF and CNPJ values come back as strings.
16
+ - **Issue** has new fields: borrower by fields or JSON, optional groups for ISS, federal withholdings and the tax reform (IBS/CBS). The 0.1 fields `borrowerSource`, `borrowerData`, `taxation`, `withholdings` and `advancedOptions` no longer exist.
17
+ - **Issue** waits for the city to authorize the invoice by default (60 seconds, up to 300) and returns the authorized invoice. A rejected invoice fails the node; a timeout returns the invoice with `waitTimedOut: true`.
18
+ - **Issue** always sends an External ID (yours or one created by the node). An External ID that already exists returns that invoice with `alreadyExisted: true`.
19
+ - Operations that return invoices or companies return **Simplified** output by default. Choose **Raw** for the full object.
20
+ - **Download PDF** and **Download XML** return binary files.
21
+ - The **Company** field is a list of your companies (or an ID) instead of free text.
22
+
23
+ ### Added
24
+
25
+ - **NFE.io Trigger** node: starts a workflow from NFE.io webhook events (every event type of the API or All Events), with an optional company filter and signature check. The webhook is registered and removed by the node. After the node replaces its webhook, deliveries signed with the previous secret are accepted on the same URL for 5 minutes (NFE.io keeps signing with it for a short time).
26
+ - Tax reform group (IBS/CBS) in **Issue**: Operation Indicator and Classification Code, with optional overrides and recipient. NFE.io calculates IBS and CBS.
27
+ - **Download Cancellation XML** operation (national environment).
28
+ - **Company** resource: Get and Get Many.
29
+ - **Lookup** resource: company by CNPJ (numeric and alphanumeric), state registration, address by postal code (billable, need the Data API Key) and IBGE city code by postal code (free).
30
+ - **Data API Key** field in the NFE.io API credential, used only for the lookups.
31
+ - **Output** option (Simplified, Raw, Selected Fields).
32
+ - **Cancel** can wait for the cancellation.
33
+ - Get Many filters by accrual date and creation date.
34
+ - Safe issue: after a timeout, network failure or 5xx answer, the node looks for the invoice by External ID and never sends it again.
35
+ - Error messages with the NFE.io Request ID.
36
+ - Example workflows in `examples/`.
37
+
38
+ ### Changed
39
+
40
+ - Taxes are sent only when you add them. Otherwise NFE.io calculates them from the company settings.
41
+ - The credential test calls `GET https://api.nfse.io/v2/companies`.
42
+ - Requests have finite timeouts. Read requests are retried on network failures, 429 and 502–504; issue, cancel, email and the billable lookups are never retried automatically.
43
+ - Built with `@n8n/node-cli` and checked by the n8n community package scanner. Published from GitHub Actions with npm provenance.
44
+
45
+ ### Fixed
46
+
47
+ - **Issue** sent every tax field, including the ones left at 0, which replaced the automatic tax calculation.
48
+ - **Get by External ID** failed for every ID.
49
+ - **Get Many** returned one item with the first page only.
50
+ - **Download PDF** returned a corrupted PDF as text.
51
+
52
+ ### Removed
53
+
54
+ - Node version 1 of the NFE.io node.
55
+
56
+ ## [0.1.0] - 2026-03-01
57
+
58
+ ### Added
59
+
60
+ - Initial release of the **NFe.io** community nodes for n8n.
61
+ - `NFe.io` node with **Service Invoice** resource.
62
+ - Support for the following operations against the NFe.io API:
63
+ - **Issue** a new service invoice (NFS-e).
64
+ - **Get** a service invoice by ID.
65
+ - **Get Many** service invoices for a company.
66
+ - **Get by External ID**.
67
+ - **Cancel** a service invoice.
68
+ - **Download PDF** of a service invoice.
69
+ - **Download XML** of a service invoice.
70
+ - **Send Email** with the service invoice to the borrower.
71
+
72
+ [0.2.0]: https://github.com/nfe/n8n-nodes-nfe/compare/v0.1.0...0.2.0
73
+ [0.1.0]: https://github.com/nfe/n8n-nodes-nfe/tree/v0.1.0
package/README.md CHANGED
@@ -1,229 +1,242 @@
1
- ## NFe.io n8n Community Nodes
1
+ # n8n-nodes-nfe
2
2
 
3
- Community nodes for integrating [NFe.io](https://nfe.io/) with [n8n](https://n8n.io/).
3
+ [n8n](https://n8n.io/) community nodes for [NFE.io](https://nfe.io/): issue and manage Brazilian service invoices (NFS-e) with the tax reform fields (IBS/CBS), start workflows from NFE.io webhook events and look up CNPJ and postal codes (CEP).
4
4
 
5
- These nodes let you issue and manage Brazilian electronic service invoices (NFS-e) via the NFe.io API directly from your n8n workflows.
5
+ | Node | What it does |
6
+ |---|---|
7
+ | **NFE.io** | Service invoices (issue, get, list, cancel, download PDF and XML, send by email), companies of your account, CNPJ, state registration, postal code and IBGE city code lookups. Can also be used as a tool by the n8n AI Agent. |
8
+ | **NFE.io Trigger** | Starts a workflow when NFE.io sends a webhook event, for example "service invoice issued". |
6
9
 
7
- > Note: This is a community package. It is not officially maintained by n8n GmbH.
10
+ This is a community package maintained by NFE.io. It is not maintained by n8n GmbH.
8
11
 
9
- ---
10
-
11
- ## Features
12
-
13
- Current version focuses on the **Service Invoice** resource and supports:
14
-
15
- - **Issue** a new service invoice (NFS-e)
16
- - **Get** a specific service invoice by ID
17
- - **Get Many** service invoices for a company
18
- - **Get by External ID** using your own external identifier
19
- - **Cancel** an issued service invoice
20
- - **Download PDF** representation of an invoice
21
- - **Download XML** representation of an invoice
22
- - **Send Email** with the invoice to the borrower
23
-
24
- All requests are made against the official NFe.io REST API and use a shared error-handling layer to surface API errors clearly inside n8n.
25
-
26
- ---
12
+ - [Installation](#installation)
13
+ - [Credentials](#credentials)
14
+ - [NFE.io node](#nfeio-node)
15
+ - [NFE.io Trigger node](#nfeio-trigger-node)
16
+ - [Examples](#examples)
17
+ - [Limitations](#limitations)
18
+ - [Migrating from 0.1](#migrating-from-01)
19
+ - [Security](#security)
27
20
 
28
21
  ## Requirements
29
22
 
30
- Before using this package you will need:
23
+ - An NFE.io account ([create one](https://nfe.io/docs/documentacao/nossa-plataforma/criar-conta/)) with at least one company. Issuing invoices also needs the company's digital certificate ([upload](https://nfe.io/docs/documentacao/nossa-plataforma/upload-do-certificado-digital/)).
24
+ - n8n with community nodes enabled. The package is tested with n8n 2.43.
25
+ - For the trigger: an n8n instance reachable from the internet over HTTPS.
31
26
 
32
- - A running **n8n instance** that supports Community Nodes (n8n v1+)
33
- - An active **NFe.io account**
34
- - At least one configured **company** in NFe.io
35
- - An **NFe.io API key** with permission to access the desired company
27
+ ## Installation
36
28
 
37
- Please refer to the official NFe.io documentation for details on account and company setup: <https://nfe.io/docs/>
29
+ ### From the n8n editor
38
30
 
39
- ---
31
+ 1. Go to **Settings > Community Nodes** and select **Install**.
32
+ 2. Enter `n8n-nodes-nfe`, accept the risk notice and select **Install**.
40
33
 
41
- ## Installation
34
+ The **NFE.io** and **NFE.io Trigger** nodes then show up in the nodes panel. See the n8n guide: [Install community nodes from the GUI](https://docs.n8n.io/integrations/community-nodes/installation-and-management/gui-installation/).
42
35
 
43
- ### Install via n8n Community Nodes (recommended)
36
+ ### Self-hosted, manual installation
44
37
 
45
- 1. Open your n8n editor UI.
46
- 2. Go to **Settings → Community Nodes**.
47
- 3. Click **Install**.
48
- 4. Enter the package name `n8n-nodes-nfe`.
49
- 5. Confirm the installation and restart n8n if requested.
38
+ Use this for queue mode or when the editor installation is turned off:
50
39
 
51
- After installation, the **NFe.io** node will be available in the node picker.
40
+ ```bash
41
+ # inside the n8n container or host, as the user that runs n8n
42
+ mkdir -p ~/.n8n/nodes
43
+ cd ~/.n8n/nodes
44
+ npm install n8n-nodes-nfe
45
+ ```
52
46
 
53
- ### Self-hosted / manual installation
47
+ Restart n8n afterwards. With Docker, open a shell first with `docker exec -it <container> sh`. See [Manual installation](https://docs.n8n.io/integrations/community-nodes/installation-and-management/manual-installation/). In queue mode, install the package on the main instance and on every worker.
54
48
 
55
- If you manage n8n as a local or self-hosted instance and prefer manual installation:
49
+ The package has no runtime dependencies.
56
50
 
57
- 1. Navigate to your n8n installation directory.
58
- 2. Install the package:
51
+ ## Credentials
59
52
 
60
- ```bash
61
- npm install n8n-nodes-nfe
62
- ```
53
+ Create a credential of type **NFE.io API**. It has two fields:
63
54
 
64
- 3. Restart your n8n instance so it can load the new nodes.
55
+ | Field | Required | Used for |
56
+ |---|---|---|
57
+ | **API Key** | Yes | Service invoices, companies and webhooks (the "Nota Fiscal" key of your account) |
58
+ | **Data API Key** | Only for the billable lookups | CNPJ, state registration and postal code lookups (the "Dados" key of your account) |
65
59
 
66
- For more details, see the official n8n documentation on Community Nodes: <https://docs.n8n.io/integrations/community-nodes/>
60
+ Both keys are in the NFE.io account app: open your subscription and the **Chaves de acesso** tab ([how to find them](https://nfe.io/docs/documentacao/nossa-plataforma/chaves-de-autenticacao/)). The node sends the right key to each NFE.io service, so one credential covers every operation. The credential test lists one company of the account with the API Key.
67
61
 
68
- ---
62
+ The free IBGE city code lookup needs no key.
69
63
 
70
- ## Credentials
64
+ ## NFE.io node
71
65
 
72
- The nodes use a dedicated **Nfe API** credential type.
66
+ ### Resources and operations
73
67
 
74
- 1. In n8n, go to **Settings → Credentials**.
75
- 2. Click **New** and search for **Nfe API**.
76
- 3. Paste your **NFe.io API Key** into the **API Key** field.
77
- 4. Save the credential.
68
+ | Resource | Operation | Notes |
69
+ |---|---|---|
70
+ | Service Invoice | **Issue** | Issues an NFS-e. Waits for the city to authorize it by default. |
71
+ | | **Get** | By NFE.io invoice ID |
72
+ | | **Get by External ID** | By the ID you sent at issue time. Returns no item when nothing is found, or fails with **Fail If Not Found**. |
73
+ | | **Get Many** | All invoices of a company, page by page, with **Return All** or a **Limit**. Filters: accrual date (competência) and creation date. |
74
+ | | **Cancel** | Requests the cancellation and waits for it by default |
75
+ | | **Download PDF** | Binary file |
76
+ | | **Download XML** | Binary file |
77
+ | | **Download Cancellation XML** | Binary file with the cancellation event. Only for invoices of the national environment (Ambiente Nacional). |
78
+ | | **Send Email** | Sends the invoice to the borrower's email. Returns `{ "sent": true, "invoiceId": "..." }`. |
79
+ | Company | **Get**, **Get Many** | Companies of your NFE.io account |
80
+ | Lookup | **Get Company by CNPJ** | Registration data of a company. Numeric and alphanumeric CNPJ. **Billable.** |
81
+ | | **Get State Registration** | State registrations (inscrição estadual) of a CNPJ in a state. **Billable.** |
82
+ | | **Get Address by Postal Code** | Address of a CEP. **Billable.** |
83
+ | | **Get City Code by Postal Code** | IBGE city code and name of a CEP. Free, no key. |
78
84
 
79
- Under the hood, requests are authenticated using the `Authorization` header with your API key. A quick test request is performed against `https://api.nfe.io/v1/companies` to validate the credential.
85
+ The **Company** field lists the companies of your account (**From List**, searchable) or takes an ID (**By ID**, accepts expressions).
80
86
 
81
- Once configured, select this credential in the **NFe.io** node under the *Credentials* section.
87
+ Service invoices use the NFE.io NFS-e API V3, which also handles companies with an alphanumeric CNPJ. CPF and CNPJ values are returned as strings, so leading zeros are kept.
82
88
 
83
- ---
89
+ ### Output
84
90
 
85
- ## Node Overview
91
+ Operations that return invoices or companies have an **Output** option:
86
92
 
87
- ### Node: NFe.io
93
+ - **Simplified** (default): the 10 main fields of an invoice (`id`, `externalId`, `number`, `status`, `flowStatus`, `flowMessage`, `issuedOn`, `servicesAmount`, `borrowerName`, `borrowerFederalTaxNumber`) or the main fields of a company.
94
+ - **Raw**: the full object sent by NFE.io.
95
+ - **Selected Fields**: a comma-separated list such as `number,status,borrower.name`.
88
96
 
89
- - **Display name:** NFe.io
90
- - **Resource:** `Service Invoice`
91
- - **Inputs:** Main
92
- - **Outputs:** Main
97
+ Issue also adds `externalId`, `alreadyExisted` and, when it waited, `waitTimedOut` to the item, whatever the output mode.
93
98
 
94
- Each operation requires a **Company ID** field, which is the identifier of the company in NFe.io that owns the invoices.
99
+ ### Issuing an invoice
95
100
 
96
- ### Supported Operations (Service Invoice)
101
+ Required fields: **Company**, **City Service Code** (the service code of the company's city), **Description** and **Services Amount**.
97
102
 
98
- - **Issue**
99
- - Create a new service invoice (NFS-e) for a given company.
100
- - Uses `POST /v1/companies/{companyId}/serviceinvoices`.
103
+ - **Borrower** (the customer): fill in the fields (name, CPF or CNPJ, email, address) or send the `borrower` object of the API as JSON. The type (person or company) is detected from the tax number.
104
+ - **Taxes are optional.** Leave them out and NFE.io calculates ISS, rates and withholdings from the company settings. A value you add replaces the automatic calculation. Only the fields you add are sent: an empty group sends nothing.
105
+ - **Federal Withholdings**: withheld PIS and COFINS go in this group. They are not the PIS and COFINS of the company's own tax.
101
106
 
102
- - **Get**
103
- - Retrieve full details for a single invoice by its NFe.io invoice ID.
104
- - Uses `GET /v1/companies/{companyId}/serviceinvoices/{invoiceId}`.
107
+ #### Tax reform (IBS/CBS)
105
108
 
106
- - **Get Many**
107
- - List multiple invoices for a company, optionally with filters (date ranges, status, pagination, etc., depending on the configured fields).
108
- - Uses `GET /v1/companies/{companyId}/serviceinvoices`.
109
+ Add **Operation Indicator** and **Classification Code** in the **Tax Reform (IBS/CBS)** group to send the `ibsCbs` group of the invoice. These are the only two required values, each with six digits:
109
110
 
110
- - **Get by External ID**
111
- - Retrieve an invoice using your own external ID that was associated when issuing the invoice.
112
- - Uses `GET /v1/companies/{companyId}/serviceinvoices/externalId/{externalId}`.
111
+ - **Operation Indicator** (`cIndOp`) defines where IBS/CBS is due and which address the invoice needs. For example, `100301` (services such as consulting or software development) uses the borrower's address, so add it with the IBGE city code. See the [indicator table](https://nfe.io/docs/documentacao/reforma-tributaria/conceitos-funcionais/tabelas-de-referencia/tabela-referencia-indicador-operacao/).
112
+ - **Classification Code** (`cClassTrib`), for example `000001`.
113
113
 
114
- - **Cancel**
115
- - Cancel an issued invoice, where allowed by the municipality and NFe.io rules.
116
- - Uses `DELETE /v1/companies/{companyId}/serviceinvoices/{invoiceId}`.
114
+ NFE.io calculates IBS and CBS. Use **Overrides (JSON)** only to replace the calculation or to send other fields of the group, and **Recipient (JSON)** when the destination is different from the borrower. The field reference is in the [NFS-e layout with the tax reform](https://nfe.io/docs/documentacao/reforma-tributaria/conceitos-funcionais/nota-fiscal-de-servico/documentacao-layout-nfse-rtc/). Ask your accountant which codes apply to your services.
117
115
 
118
- - **Download PDF**
119
- - Download the PDF representation of an invoice.
120
- - Uses `GET /v1/companies/{companyId}/serviceinvoices/{invoiceId}/pdf`.
116
+ #### Waiting for authorization
121
117
 
122
- - **Download XML**
123
- - Download the XML representation of an invoice.
124
- - Uses `GET /v1/companies/{companyId}/serviceinvoices/{invoiceId}/xml`.
118
+ NFE.io accepts the invoice right away and the city authorizes it later (seconds to minutes, depending on the city). With **Wait for Authorization** on (default), the node checks the invoice every 2 seconds until it is issued or rejected, up to **Timeout (Seconds)** (60 by default, at most 300):
125
119
 
126
- - **Send Email**
127
- - Trigger an email with the invoice to be sent to the borrower.
128
- - Uses `PUT /v1/companies/{companyId}/serviceinvoices/{invoiceId}/sendemail`.
120
+ - Issued: the item has the final invoice (`flowStatus: "Issued"`), ready for the PDF.
121
+ - Rejected by the city (`IssueFailed`): the node fails with the reason sent by the city.
122
+ - Timeout: the item has the invoice as it is, with `waitTimedOut: true`. Check it later with **Get**, or follow up from the **NFE.io Trigger**.
129
123
 
130
- All operations share a common error parser so API validation and business errors from NFe.io are exposed clearly to your workflow.
124
+ For large batches, turn the wait off and use the trigger: n8n keeps the execution running while it waits. **Cancel** has the same option.
131
125
 
132
- ---
126
+ #### External ID and safe re-runs
133
127
 
134
- ## Usage Examples
128
+ Every invoice is sent with an **External ID**, your unique ID for it, such as the order number.
135
129
 
136
- Here are some common ways to use the **NFe.io** node inside n8n:
130
+ - Issuing again with an External ID that already exists returns the existing invoice with `alreadyExisted: true` instead of issuing a second one. Re-running a workflow for the same order is safe.
131
+ - When NFE.io does not answer clearly (timeout, network failure, 5xx), the node **never sends the invoice again**. It looks for it by External ID for 30 seconds; if it is not found, the node fails with the External ID so you can check before trying again.
132
+ - If you leave External ID empty, the node creates one per execution, node run and item. It protects **Retry On Fail** inside the same execution only: retrying a failed execution, or running the workflow again, creates a new ID and can issue a second invoice. Use an ID from your own system whenever the same sale can reach the node twice.
137
133
 
138
- ### 1. Issue an invoice from an order
134
+ ### Files
139
135
 
140
- 1. Receive order data from your e-commerce/ERP system (e.g. via webhook or database node).
141
- 2. Map the customer and service details into the **Issue** operation fields of the **NFe.io** node.
142
- 3. Store the returned NFe.io invoice ID or external ID in your system for later reference.
136
+ **Download PDF**, **Download XML** and **Download Cancellation XML** put the file in a binary field (`data` by default, see **Put Output File in Field**) with the file name and MIME type, ready for an email, storage or messaging node. The PDF can take a few seconds to be available after the authorization; the node tries again for a short time.
143
137
 
144
- ### 2. Send the invoice by email automatically
138
+ ### Lookups
145
139
 
146
- 1. After issuing an invoice, add another **NFe.io** node with the **Send Email** operation.
147
- 2. Use the `invoiceId` returned by the previous step.
148
- 3. Optionally combine with other n8n nodes (e.g. Slack, email, CRM) to notify internal teams.
140
+ CNPJ, state registration and postal code lookups are **billable per call** and need the **Data API Key**. The node validates the input (CNPJ check digits, 8-digit CEP, state) before calling, and makes **one call per run**: it does not retry them automatically, because a lookup that timed out on our side may already be billed. **Get City Code by Postal Code** is free and uses the open NFE.io endpoint.
149
141
 
150
- ### 3. Periodic invoice sync
142
+ ### Use as an AI agent tool
151
143
 
152
- 1. Use a **Cron** node to trigger a workflow periodically.
153
- 2. Add an **NFe.io** node with the **Get Many** operation to list recent invoices.
154
- 3. Upsert the invoice data into your internal database or analytics tooling.
144
+ The NFE.io node can be connected to the **AI Agent** as a tool. Each tool node runs one operation; use [`$fromAI()`](https://docs.n8n.io/build/integrate-ai/ai-examples/use-ai-for-parameters/) to let the model fill fields such as the invoice ID or the CNPJ, and keep **Output** on **Simplified** so the model gets the main fields only.
155
145
 
156
- For request/response formats and advanced parameters, always refer to the official NFe.io API reference: <https://nfe.io/docs/rest-api/>.
146
+ - **Issue** sends a real fiscal document. Put it behind [human review for tools](https://docs.n8n.io/build/integrate-ai/ai-examples/human-in-the-loop-for-tools/) so a person approves each call, and give the model an External ID that comes from your system.
147
+ - Lookups are billable: say in the system message when the agent may call them. An agent can call a tool more often than you expect.
148
+ - Fix the company in the tool node (By ID) instead of letting the model choose it.
157
149
 
158
- ---
150
+ See [`examples/ai-agent-invoice-assistant.json`](examples/ai-agent-invoice-assistant.json).
159
151
 
160
- ## Limitations and Notes
152
+ ### Errors
161
153
 
162
- - These nodes currently support only the **Service Invoice** (NFS-e) resource.
163
- - NFe.io is specific to Brazilian tax regulations and municipalities; some behaviors may vary by city.
164
- - You must have your company and services correctly configured in NFe.io for issuing invoices to succeed.
165
- - Network connectivity and NFe.io availability are required for all operations.
154
+ Messages say what happened and how to fix it, and include the NFE.io **Request ID** (`x-request-id`) to share with NFE.io support. With **Continue On Fail**, each failed item becomes an output item with the error, and the other items go on.
166
155
 
167
- Future versions may add additional resources and operations as needed.
156
+ ## NFE.io Trigger node
168
157
 
169
- ---
158
+ The trigger registers a webhook in your NFE.io account when the workflow is activated (or when you select **Listen for test event**) and removes it when the workflow is deactivated (or after the test event).
170
159
 
171
- ## Development
160
+ - **Events**: every event type offered by the NFE.io API, loaded when you open the node (with a built-in list when the API cannot be reached), plus **All Events**. Service invoice events include issued successfully, issue failed, cancelled successfully and cancellation failed; the list also has product (NF-e), consumer (NFC-e), received (inbound) documents, product tax and tax payment events. See the [event catalog](https://nfe.io/docs/webhooks/catalogo-de-eventos/).
161
+ - **Company** (optional): only start the workflow for events of this company. NFE.io webhooks belong to the whole account, so without this filter the workflow starts for events of every company of the account. Events with no company in them (for example product tax events) always start the workflow.
162
+ - **Signature**: every delivery is checked against the `X-Hub-Signature` header (HMAC-SHA1 of the raw body with a secret the trigger creates). Deliveries with an invalid signature get HTTP 401 and do not start the workflow.
172
163
 
173
- If you want to work on this package locally:
164
+ Each event becomes one item:
174
165
 
175
- 1. Clone the repository:
166
+ ```json
167
+ {
168
+ "event": "service_invoice.issued_successfully",
169
+ "resource": "service_invoice",
170
+ "action": "issued_successfully",
171
+ "companyId": "...",
172
+ "deliveryId": "...",
173
+ "payload": { "id": "...", "number": "...", "flowStatus": "Issued", "borrower": { "name": "..." } }
174
+ }
175
+ ```
176
176
 
177
- ```bash
178
- git clone https://github.com/nfeio/n8n-nodes-nfe.git
179
- cd n8n-nodes-nfe
180
- ```
177
+ `payload` is the document sent by NFE.io (for service invoices, the invoice). `companyId` is `null` when the event does not say which company it belongs to. `deliveryId` is the delivery ID sent by NFE.io (`X-Hook-Id`).
181
178
 
182
- 2. Install dependencies:
179
+ ## Examples
183
180
 
184
- ```bash
185
- npm install
186
- ```
181
+ Importable workflows are in [`examples/`](examples/):
187
182
 
188
- 3. Run in development mode:
183
+ - Issue an NFS-e with IBS/CBS for a paid order, wait for the authorization, download the PDF and email it.
184
+ - When an NFS-e is issued, download the PDF and send it to Telegram.
185
+ - An AI agent that finds invoices, looks up a CNPJ and issues an NFS-e only after a person approves it.
189
186
 
190
- ```bash
191
- npm run dev
192
- ```
187
+ ## Limitations
193
188
 
194
- This uses the `@n8n/node-cli` to run the node in a local n8n environment.
189
+ - **Each test listen and each activation creates a webhook in your NFE.io account.** It is removed when you stop the listen, when the first test event arrives or when you deactivate the workflow.
190
+ - **Before registering, the trigger reads the webhook list of the account** and removes webhooks with exactly its own URL. They are leftovers of this same node: a test listen started again without stopping the previous one (n8n replaces the listen and the node loses track of the previous webhook) or a creation that timed out. Webhooks with any other URL are never changed. A leftover of an old n8n URL that the node no longer tracks stays in the account: webhooks created by this node have `source=n8n-nodes-nfe` in their URL, and you can list and remove them with the [NFE.io webhooks API](https://nfe.io/docs/documentacao/webhooks/integracao/).
191
+ - **NFE.io takes a moment to notice a new webhook.** In our tests, an event right after a new webhook was created was not delivered. After activating a workflow for the first time, wait two minutes before relying on events, and use **Get Many** with a date filter to catch up on events of that window.
192
+ - **After publishing, deliveries signed with the previous webhook secret are accepted for 5 minutes.** For a short time after the trigger replaces its webhook (deactivate and activate again, publish a change, change the events), NFE.io still signs events with the secret of the removed webhook. The trigger accepts that secret on the same URL for 5 minutes, then refuses it with 401. Test listens do not keep it: n8n starts each listen with empty data, so an event signed with the secret of an earlier listen gets 401.
193
+ - **Repeated deliveries are not removed.** NFE.io delivers an event again when your n8n does not answer with success (a redelivery keeps the same `deliveryId`; each webhook has its own). Use `deliveryId` to skip repeats (for example, keep the processed IDs in a data table).
194
+ - **The format of events other than service invoices comes from the NFE.io documentation.** Service invoice events were checked against real deliveries; the other families were built from the event catalog. The trigger passes their body as `payload` without changing it.
195
+ - **CNPJ, state registration and postal code lookups are billable and not retried.** If one fails with a timeout, run it again yourself.
196
+ - **The automatic External ID only protects retries inside the same execution.** See [External ID and safe re-runs](#external-id-and-safe-re-runs).
197
+ - With **All Events** and no company filter, the workflow receives the events of every company of the account.
198
+ - IBS/CBS: the node sends the group as documented and NFE.io calculates the values. How the city prints them depends on the company's tax regime and the city.
199
+ - Operations for product (NF-e) and consumer (NFC-e) invoices are not in the action node yet; the trigger already receives their events.
195
200
 
196
- 4. Build the production bundle:
201
+ ## Migrating from 0.1
197
202
 
198
- ```bash
199
- npm run build
200
- ```
203
+ Version 0.2.0 is a new node. **Workflows built with 0.1 do not run on 0.2**: replace each old NFE.io node by a new one and set its fields again. Until you do, an old node stops the execution with "This node was created with version 0.1 of n8n-nodes-nfe" and sends nothing to NFE.io, including in active workflows.
201
204
 
202
- 5. Lint the code:
205
+ | | 0.1 | 0.2 |
206
+ |---|---|---|
207
+ | Node | `NFe.io`, node version 1 | `NFE.io`, node version 2. Nodes saved with version 1 do not run and must be added again. |
208
+ | API | NFS-e V1 | NFS-e V3 (alphanumeric CNPJ, tax reform fields) |
209
+ | Company | Free text | List of your companies or ID |
210
+ | Issue fields | Fixed groups that sent every tax field, including the ones left at 0 | Optional groups: only what you add is sent; NFE.io calculates the rest |
211
+ | Issue result | The first answer of NFE.io (invoice still processing) | The authorized invoice (Wait for Authorization, on by default) |
212
+ | External ID | Optional | Always sent (yours or automatic); a repeated ID returns the existing invoice |
213
+ | Get by External ID | Failed for every ID | Fixed |
214
+ | Get Many | One item with the first page | One item per invoice, every page with Return All |
215
+ | Download PDF and XML | Text in the JSON (the PDF was corrupted) | Binary files |
216
+ | Output | Raw | Simplified, Raw or Selected Fields |
217
+ | Credential | API Key | Same credential type (`nfeApi`); existing credentials keep working. Add the Data API Key for the lookups. |
218
+ | New | | Company resource, Lookup resource, Download Cancellation XML, NFE.io Trigger |
203
219
 
204
- ```bash
205
- npm run lint
206
- # or
207
- npm run lint:fix
208
- ```
220
+ To keep a 0.1 workflow running while you migrate, stay on version 0.1.0 of the package.
209
221
 
210
- For publishing a new version to npm, follow the usual `n8n-node` release flow using the `npm run release` script.
222
+ ## Security
211
223
 
212
- ---
224
+ Report security issues privately to [hackers@nfe.io](mailto:hackers@nfe.io). Please do not open a public issue for them.
213
225
 
214
- ## Support & Issues
226
+ - Keys are stored only in the n8n credential and are never written to the output or to error messages.
227
+ - Download links of PDF and XML files are followed without the API key and never appear in the output.
228
+ - The webhook secret is kept in the workflow static data, as n8n triggers do. People who can open the workflow in n8n can read it. When the trigger replaces its webhook, the previous secret stays there too and is still accepted for 5 minutes on the same URL; it is never written to the output.
215
229
 
216
- If you run into problems using these nodes:
230
+ ## Support
217
231
 
218
- - Check the NFe.io API status and documentation: <https://status.nfe.io/> and <https://nfe.io/docs/>
219
- - Open an issue in this repository: <https://github.com/nfeio/n8n-nodes-nfe/issues>
232
+ - Status of the NFE.io services: <https://status.nfe.io/>
233
+ - NFE.io documentation: <https://nfe.io/docs/>
234
+ - Bugs and feature requests: [GitHub issues](https://github.com/nfe/n8n-nodes-nfe/issues)
220
235
 
221
- Bug reports and feature requests are welcome.
236
+ ## Development
222
237
 
223
- ---
238
+ See [docs/development.md](docs/development.md) and [CHANGELOG.md](CHANGELOG.md).
224
239
 
225
240
  ## License
226
241
 
227
- This project is licensed under the **MIT License**.
228
-
229
- See the package metadata and repository for full license details.
242
+ [MIT](LICENSE)
@@ -1,4 +1,4 @@
1
- import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
1
+ import type { ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, IHttpRequestOptions, INodeProperties } from 'n8n-workflow';
2
2
  export declare class NfeApi implements ICredentialType {
3
3
  name: string;
4
4
  displayName: string;
@@ -8,6 +8,6 @@ export declare class NfeApi implements ICredentialType {
8
8
  };
9
9
  documentationUrl: string;
10
10
  properties: INodeProperties[];
11
- authenticate: IAuthenticateGeneric;
11
+ authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
12
12
  test: ICredentialTestRequest;
13
13
  }
@@ -1,10 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NfeApi = void 0;
4
+ const DATA_API_HOSTS = ['legalentity.api.nfe.io', 'address.api.nfe.io'];
5
+ function requestHost(requestOptions) {
6
+ try {
7
+ return new URL(requestOptions.url, requestOptions.baseURL).hostname.toLowerCase();
8
+ }
9
+ catch {
10
+ return '';
11
+ }
12
+ }
4
13
  class NfeApi {
5
14
  constructor() {
6
15
  this.name = 'nfeApi';
7
- this.displayName = 'Nfe API';
16
+ this.displayName = 'NFE.io API';
8
17
  this.icon = { light: 'file:nfe.svg', dark: 'file:nfe.svg' };
9
18
  this.documentationUrl = 'https://github.com/nfe/n8n-nodes-nfe?tab=readme-ov-file#credentials';
10
19
  this.properties = [
@@ -15,20 +24,33 @@ class NfeApi {
15
24
  typeOptions: { password: true },
16
25
  required: true,
17
26
  default: '',
27
+ description: 'Main key of the NFE.io account, used for service invoices, companies and webhooks',
18
28
  },
19
- ];
20
- this.authenticate = {
21
- type: 'generic',
22
- properties: {
23
- headers: {
24
- Authorization: '={{$credentials.apiKey}}',
25
- },
29
+ {
30
+ displayName: 'Data API Key',
31
+ name: 'dataApiKey',
32
+ type: 'string',
33
+ typeOptions: { password: true },
34
+ default: '',
35
+ description: 'Key for the data services (CNPJ, state registration and postal code lookups). Only needed for the Lookup operations.',
26
36
  },
27
- };
37
+ ];
28
38
  this.test = {
29
39
  request: {
30
- baseURL: 'https://api.nfe.io',
31
- url: '/v1/companies',
40
+ baseURL: 'https://api.nfse.io',
41
+ url: '/v2/companies',
42
+ qs: { limit: 1 },
43
+ },
44
+ };
45
+ }
46
+ async authenticate(credentials, requestOptions) {
47
+ const useDataKey = DATA_API_HOSTS.includes(requestHost(requestOptions));
48
+ const key = useDataKey ? credentials.dataApiKey : credentials.apiKey;
49
+ return {
50
+ ...requestOptions,
51
+ headers: {
52
+ ...requestOptions.headers,
53
+ Authorization: typeof key === 'string' ? key : '',
32
54
  },
33
55
  };
34
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NfeApi.credentials.js","sourceRoot":"","sources":["../../credentials/NfeApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,MAAM;IAAnB;QACC,SAAI,GAAG,QAAQ,CAAC;QAEhB,gBAAW,GAAG,SAAS,CAAC;QAExB,SAAI,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAW,CAAC;QAGhE,qBAAgB,GAAG,qEAAqE,CAAC;QAEzF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;aACX;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,0BAA0B;iBACzC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,oBAAoB;gBAC7B,GAAG,EAAE,eAAe;aACpB;SACD,CAAC;IACH,CAAC;CAAA;AApCD,wBAoCC"}
1
+ {"version":3,"file":"NfeApi.credentials.js","sourceRoot":"","sources":["../../credentials/NfeApi.credentials.ts"],"names":[],"mappings":";;;AASA,MAAM,cAAc,GAAG,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC;AAExE,SAAS,WAAW,CAAC,cAAmC;IACvD,IAAI,CAAC;QACJ,OAAO,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IACnF,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,EAAE,CAAC;IACX,CAAC;AACF,CAAC;AAED,MAAa,MAAM;IAAnB;QACC,SAAI,GAAG,QAAQ,CAAC;QAEhB,gBAAW,GAAG,YAAY,CAAC;QAE3B,SAAI,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAW,CAAC;QAEhE,qBAAgB,GAAG,qEAAqE,CAAC;QAEzF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,mFAAmF;aACpF;YACD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,sHAAsH;aACvH;SACD,CAAC;QAiBF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,qBAAqB;gBAC9B,GAAG,EAAE,eAAe;gBACpB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;aAChB;SACD,CAAC;IACH,CAAC;IAtBA,KAAK,CAAC,YAAY,CACjB,WAA2C,EAC3C,cAAmC;QAEnC,MAAM,UAAU,GAAG,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC;QACxE,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC;QACrE,OAAO;YACN,GAAG,cAAc;YACjB,OAAO,EAAE;gBACR,GAAG,cAAc,CAAC,OAAO;gBACzB,aAAa,EAAE,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;aACjD;SACD,CAAC;IACH,CAAC;CASD;AArDD,wBAqDC"}
@@ -1,4 +1,11 @@
1
- import { type INodeType, type INodeTypeDescription } from 'n8n-workflow';
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ import { getCompanies } from './methods/listSearch';
2
3
  export declare class Nfe implements INodeType {
3
4
  description: INodeTypeDescription;
5
+ methods: {
6
+ listSearch: {
7
+ getCompanies: typeof getCompanies;
8
+ };
9
+ };
10
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
4
11
  }