@ironfang/n8n-nodes-ironfang 0.2.3 → 0.3.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 (39) hide show
  1. package/README.md +164 -100
  2. package/dist/credentials/IronfangApi.credentials.js +6 -1
  3. package/dist/credentials/IronfangS3.credentials.d.ts +8 -0
  4. package/dist/credentials/IronfangS3.credentials.js +15 -0
  5. package/dist/credentials/IronfangWebhookApi.credentials.d.ts +8 -0
  6. package/dist/credentials/IronfangWebhookApi.credentials.js +14 -0
  7. package/dist/nodes/Ironfang/Ironfang.node.d.ts +7 -10
  8. package/dist/nodes/Ironfang/Ironfang.node.js +36 -535
  9. package/dist/nodes/Ironfang/IronfangTrigger.node.d.ts +11 -0
  10. package/dist/nodes/Ironfang/IronfangTrigger.node.js +56 -0
  11. package/dist/nodes/Ironfang/catalog.d.ts +2 -0
  12. package/dist/nodes/Ironfang/catalog.js +1806 -0
  13. package/dist/nodes/Ironfang/credentialTest.js +24 -14
  14. package/dist/nodes/Ironfang/destinationCredentialTest.d.ts +2 -0
  15. package/dist/nodes/Ironfang/destinationCredentialTest.js +12 -0
  16. package/dist/nodes/Ironfang/execute.d.ts +2 -0
  17. package/dist/nodes/Ironfang/execute.js +205 -0
  18. package/dist/nodes/Ironfang/files.d.ts +10 -0
  19. package/dist/nodes/Ironfang/files.js +50 -0
  20. package/dist/nodes/Ironfang/parameters.d.ts +2 -0
  21. package/dist/nodes/Ironfang/parameters.js +50 -0
  22. package/dist/nodes/Ironfang/renderOptions.d.ts +2 -0
  23. package/dist/nodes/Ironfang/renderOptions.js +8 -0
  24. package/dist/nodes/Ironfang/renderwolf.d.ts +19 -0
  25. package/dist/nodes/Ironfang/renderwolf.js +556 -0
  26. package/dist/nodes/Ironfang/templates.d.ts +2 -0
  27. package/dist/nodes/Ironfang/templates.js +15 -0
  28. package/dist/nodes/Ironfang/transport.d.ts +3 -1
  29. package/dist/nodes/Ironfang/transport.js +20 -5
  30. package/dist/nodes/Ironfang/types.d.ts +31 -0
  31. package/dist/nodes/Ironfang/types.js +2 -0
  32. package/dist/nodes/Ironfang/webhook.d.ts +4 -0
  33. package/dist/nodes/Ironfang/webhook.js +39 -0
  34. package/docs/operations.md +1046 -0
  35. package/docs/validation.md +58 -0
  36. package/examples/audit-polling.json +223 -0
  37. package/examples/invoice-generation-storage.json +83 -0
  38. package/examples/invoice-validation.json +54 -0
  39. package/package.json +16 -7
package/README.md CHANGED
@@ -1,112 +1,176 @@
1
- <p align="center">
2
- <img src="nodes/Ironfang/ironfang.svg" width="110" alt="Ironfang">
3
- </p>
1
+ <p align="center"><img src="nodes/Ironfang/ironfang.svg" width="110" alt="Ironfang"></p>
4
2
 
5
3
  # @ironfang/n8n-nodes-ironfang
6
4
 
7
- Community node for using [Ironfang](https://ironfang.uk) APIs in n8n
8
- workflows. Pick a product under Resource, then an operation within it.
5
+ Use Renderwolf, Financewolf, Auditwolf and Ironfang's public developer tools in
6
+ n8n. The Ironfang action node has **103 operations**, grouped by product. Ironfang
7
+ Trigger receives signed Auditwolf and Renderwolf events.
9
8
 
10
- Renderwolf is the first product. It turns URLs, HTML and stored templates
11
- into screenshots, PDFs, social images and short video clips, hosted on
12
- infrastructure Ironfang operates in the UK.
9
+ **Release: 0.3.0.** This version includes the product expansion and signed event
10
+ trigger described below, plus the maintenance fixes from 0.2.3.
13
11
 
14
- ## Install
12
+ ## Installation and credentials
15
13
 
16
- On self-hosted n8n, open Settings, then Community Nodes, choose Install and enter
17
- `@ironfang/n8n-nodes-ironfang`.
14
+ On self-hosted n8n, open **Settings Community Nodes Install** and enter
15
+ `@ironfang/n8n-nodes-ironfang`. The old `@ironfang/n8n-nodes-renderwolf` package
16
+ is deprecated. n8n Cloud installation requires n8n's manual package verification;
17
+ npm publishing and automated checks do not establish that approval.
18
18
 
19
- n8n Cloud installation requires the package to be verified by n8n. npm publishing
20
- and automated scanning do not establish manual verification status.
19
+ Create an `if_live_` platform API key at [portal.ironfang.uk](https://portal.ironfang.uk)
20
+ with the scopes your workflow needs, then select an Ironfang API credential.
21
+ Existing `rw_live_` Renderwolf keys and both origin-only and `/renderwolf` base
22
+ URLs remain supported. Other product bases and custom gateway prefixes work too.
23
+ A successful credential test confirms authentication by a product, including
24
+ an explicit scope refusal; it does not grant other operation permissions.
21
25
 
22
- You'll need an API key from [portal.ironfang.uk](https://portal.ironfang.uk).
23
- Use a new `if_live_` platform key; existing `rw_live_` Renderwolf keys still
24
- work. Paste it into an Ironfang API credential. The connection test distinguishes
25
- invalid keys from valid keys lacking usage-read permission.
26
+ Public tools need no credential. Financewolf validation, generation and ruleset
27
+ reads offer an explicit **Public** mode; saved results require authentication.
28
+ An invalid API key never falls back to public access. Public Financewolf calls
29
+ cannot use idempotency keys or access an organisation's retained results.
26
30
 
27
- Renderwolf's free plan gives **250 credits per month**, with no card required.
28
- Screenshots and template images cost 1 credit, PDFs 2, and QR codes 0. Clip costs
29
- vary with duration and output size. Cache hits cost 0. This is a Renderwolf
30
- allowance; other Ironfang products have their own usage policies. Free output carries a small Renderwolf
31
- badge in the corner, which any paid plan removes.
31
+ ## Products and operations
32
32
 
33
- ## Renderwolf operations
34
-
35
- Screenshot captures a URL or raw HTML as a PNG, JPEG or WebP. It supports
36
- viewport sizing, full-page capture, capturing a single element by CSS
37
- selector, dark mode and a settle delay for late-painting pages. The Device
38
- option applies a phone or tablet viewport, pixel density, mobile flag and
39
- user agent together, so a mobile capture is a mobile capture rather than a
40
- narrow desktop one.
41
-
42
- PDF prints a URL or raw HTML. Landscape, printed backgrounds, header and
43
- footer templates and page scale are all options.
44
-
45
- Template Image renders a stored template with your variables, built for OG
46
- images and social cards.
47
-
48
- Video Clip renders a short MP4: a background image, video or solid colour,
49
- caption cards that appear and disappear on a schedule, and optionally your
50
- own watermark and an audio bed. Clips run up to sixty seconds, and cost
51
- scales with length and canvas size - vertical for Reels and Shorts, square,
52
- landscape, or 720p when the pixels matter less than the price.
53
-
54
- All four of the above put the rendered file on the item as binary data,
55
- ready for the next node in the workflow.
56
-
57
- Signed URL mints a stable render URL you can drop straight into an `<img>`
58
- tag or `og:image` meta tag, and Usage reports the current period's
59
- consumption against your plan cap. Both return JSON.
60
-
61
- Identical requests are served from cache and don't count against your plan.
62
- Renders are capped at 120 a minute per account, and 60 a minute per site
63
- being rendered, counted across everyone. Bot protection is never bypassed:
64
- a challenge page is captured as a challenge page.
65
-
66
- ## Links
67
-
68
- - [API reference](https://ironfang.uk/renderwolf/docs)
69
- - [OpenAPI spec](https://api.ironfang.uk/openapi.yaml)
70
- - [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
71
-
72
- ## License
73
-
74
- MIT
75
-
76
- ## Permissions and outputs
77
-
78
- | Operations | Key scope |
33
+ | Resource | Operations |
34
+ | --- | --- |
35
+ | Renderwolf | Screenshot, PDF, template image, video clip, signed URL, usage, QR, site preview, templates, jobs, batches, capabilities, request history, destinations and deliveries |
36
+ | Financewolf | Validate XML; generate a validated UBL invoice or credit note; list/get rulesets; list/get/delete saved results |
37
+ | Auditwolf | Sites, audits, pages, findings and decisions, rules and rule packs, monitors, changes and comparisons, evidence, artifacts, export destinations/jobs, webhooks and deliveries, events and usage |
38
+ | Public Tool | Image conversion, favicon ZIP, QR generation and verification, UUID generation and inspection, free screenshot |
39
+
40
+ The [operation reference](docs/operations.md) lists each action's endpoint,
41
+ permission, query fields and request example. Complex API bodies use a JSON
42
+ editor so nested fields remain available. Replace the example values before
43
+ running a write operation. Request definitions are available in the product
44
+ specifications: [Renderwolf](https://api.ironfang.uk/renderwolf/openapi.yaml),
45
+ [Financewolf](https://api.ironfang.uk/financewolf/openapi.yaml),
46
+ [Auditwolf](https://api.ironfang.uk/auditwolf/openapi.yaml).
47
+
48
+ Screenshots support PNG/JPEG/WebP and phone/tablet device presets. Advanced
49
+ Render Options accepts waits, blocking, selectors, request headers, cookies,
50
+ user agent and pixel density. For PDFs it also accepts `paper_format` and
51
+ `margin` (numeric inches); screenshot region capture uses `clip`. For template images it accepts
52
+ inline `qr` variables. The source and template variables have their own fields.
53
+ The template picker loads pages without HTML and requires template-read scope;
54
+ entering a template ID directly needs only render scope.
55
+
56
+ Job and batch submission require a stable idempotency key. Get the returned ID,
57
+ use n8n's Wait node between status checks, then Download Job Result. Signed result
58
+ URLs are validated against the configured Renderwolf endpoint and downloaded
59
+ without an API key. Site Preview returns the MP4 in the selected binary field
60
+ and a JPEG in `poster`. A result download can return this same two-file bundle.
61
+
62
+ Financewolf Validate accepts XML text or an n8n binary field, including filesystem
63
+ and external binary storage. A standards-invalid invoice is a normal result:
64
+ branch on `outcome`, rather than treating HTTP 200 as an invoice approval.
65
+ Generation requires explicit ruleset/profile selectors and preserves decimal
66
+ strings. It returns validation metadata and XML binary data after checking the
67
+ artifact's byte count and SHA-256. Authenticated artifacts/findings are retained
68
+ by Financewolf for 30 days; deletion does not remove n8n's own execution records.
69
+
70
+ Paginated templates, jobs, deliveries, request history, Financewolf results,
71
+ Auditwolf findings and page observations have Return All, Limit and starting
72
+ cursor/offset controls. Each row becomes an output item with its input link.
73
+ Other list actions retain the API's JSON envelope and API-imposed result caps.
74
+ Pagination stops at 1,000 pages and refuses repeated cursors.
75
+
76
+ S3 destination creation reads secret fields from an **Ironfang S3 Destination**
77
+ credential. Do not put them in Request Body JSON. Its connection check validates
78
+ that fields are present; the product's Test Destination operation verifies
79
+ actual S3 access once the bucket/region are registered. One-time webhook secrets
80
+ returned by creation/rotation need to be saved securely; n8n execution retention
81
+ also applies to these outputs.
82
+
83
+ ## Permissions and usage
84
+
85
+ | Actions | API key scopes |
79
86
  | --- | --- |
80
- | Screenshot, PDF, Template Image, Video Clip | `renderwolf:render` |
87
+ | Renderwolf rendering, jobs/batches, delivery reads | `renderwolf:render` |
81
88
  | Signed URL | `renderwolf:sign` |
82
- | Usage | `renderwolf:usage:read` |
83
-
84
- Choose only the scopes the workflow uses. Authentication succeeding does not
85
- grant permissions for other operations. Requests stay in the key's organisation.
86
-
87
- New nodes use version 1.1: binary outputs include numeric `bytes` and
88
- `byteLength`; `_ironfang` includes `requestId`, `creditsCharged`, `cacheStatus`
89
- when supplied, and HTTP `statusCode`. Continue On Fail returns a structured
90
- `error` with the item index and available problem/retry details. Existing
91
- version 1 nodes retain string `bytes` and `error` fields; exact byte length and
92
- structured metadata are additive. The binary field defaults to `data`.
93
-
94
- Requests have a 30-second JSON or 120-second rendering timeout. No automatic
95
- retry repeats a render. For 429 responses, use the returned retry information
96
- or n8n's wait/retry settings deliberately. The node preserves item linking.
97
-
98
- ## Examples and development
99
-
100
- Import [Template image](examples/template-image.json), select your credential
101
- and replace the template ID with an existing template from the portal. The
102
- rendered file is available as binary `data` for a storage or messaging node.
103
-
104
- Run `npm ci --ignore-scripts` and `npm run check`. Checks include n8n's actual
105
- lint rules, TypeScript, execution regressions and package metadata/icons.
106
- The development dependency baseline is `n8n-workflow` 2.39.0; runtime helpers
107
- come from the host n8n installation. No external runtime dependency is bundled.
108
-
109
- Run `bash scripts/check-runtime.sh` with Docker to import credentials and execute
110
- seven operations in n8n 2.38.1 against a local fixture API. This checks authenticated
111
- requests, legacy/new outputs and exact files in n8n's filesystem binary storage.
112
- CI runs the same runtime check before publishing. No paid API calls are made.
89
+ | Templates | `renderwolf:templates:read` / `renderwolf:templates:write` |
90
+ | Usage and request history | `renderwolf:usage:read` |
91
+ | Destinations and redelivery | `renderwolf:destinations` |
92
+ | Financewolf validation/generation/result deletion | `financewolf:einvoices:write` |
93
+ | Financewolf saved result reads | `financewolf:einvoices:read` |
94
+ | Financewolf authenticated ruleset reads | `financewolf:einvoices:rulesets:read` |
95
+ | Auditwolf reads / running audits / managing resources | `auditwolf:read` / `auditwolf:run` / `auditwolf:manage` |
96
+ | Auditwolf evidence and artifacts | `auditwolf:evidence` |
97
+ | Auditwolf webhooks and exports | `auditwolf:integrations` |
98
+
99
+ Renderwolf includes **250 free credits each month**, with no card required.
100
+ A screenshot or template image costs 1 credit, a PDF 2, and QR codes 0. Clip
101
+ costs depend on duration and output size. Cache hits consume no credits.
102
+ Free renders can carry a Renderwolf badge; QR codes never carry one. This
103
+ allowance belongs to Renderwolf; other products have their own usage policies.
104
+
105
+ Public tools use no account credits and share a 60/minute/address limit. The
106
+ public screenshot service also has a 20/hour/address limit and a shared daily
107
+ ceiling. Shared n8n egress addresses share these limits. Use authenticated
108
+ Renderwolf rendering for account-based automation.
109
+
110
+ Billing changes, administration, unreleased Peppol transport/registration,
111
+ Financewolf PDFs and Financial Promotions are outside this package.
112
+
113
+ ## Signed event trigger
114
+
115
+ 1. Add **Ironfang Trigger** and copy its production webhook URL.
116
+ 2. Use Auditwolf Create Webhook or Renderwolf Create Destination to register
117
+ that URL and the events you want.
118
+ 3. Save the returned secret in an **Ironfang Webhook API** credential. Select
119
+ its product, attach it to the trigger, and activate the workflow.
120
+ 4. Run Test Webhook/Test Destination to send a signed test event.
121
+
122
+ The trigger verifies HMAC-SHA256 over the timestamp and exact body bytes using
123
+ constant-time comparison, accepts timestamps within five minutes, and rejects
124
+ invalid signatures before starting a workflow. Renderwolf secrets are decoded
125
+ from hex; Auditwolf secrets are used as returned. The signed event ID, rather
126
+ than the unsigned header ID, is used for duplicate detection.
127
+
128
+ Duplicate state covers seven days/up to 10,000 IDs in n8n workflow static data.
129
+ It persists for active workflows and is tested across a restart. Static data
130
+ is not an atomic shared store across workers: use the event ID as a durable
131
+ idempotency key for consequential downstream writes. Failed workflow execution
132
+ and n8n's retry/retention settings also affect delivery processing.
133
+
134
+ Endpoints are registered explicitly and remain customer-owned. Deactivating or
135
+ deleting the n8n workflow removes its local listener; disable/delete the product
136
+ endpoint separately to stop deliveries. Rotating an endpoint secret requires
137
+ updating the n8n credential.
138
+
139
+ ## Outputs, examples and compatibility
140
+
141
+ Existing Renderwolf version 1 workflows retain string `bytes` and `error`
142
+ fields. Version 1.1 uses numeric `bytes` and structured errors. Both expose exact
143
+ `byteLength`, item links and `_ironfang` response metadata when available:
144
+ request ID, HTTP status, cache status and charged credits. Continued errors
145
+ include available problem codes and retry information. New file operations use
146
+ numeric sizes; the output binary field defaults to `data`.
147
+
148
+ Requests have explicit timeouts: 30 seconds for JSON and 120 seconds for binary
149
+ rendering. The node does not automatically repeat a paid operation. Reuse the
150
+ same idempotency key only for an identical business operation and respect
151
+ returned retry information when configuring n8n retries.
152
+
153
+ Import the [template render](examples/template-image.json),
154
+ [invoice validation](examples/invoice-validation.json),
155
+ [invoice generation to storage](examples/invoice-generation-storage.json), or
156
+ [audit status polling](examples/audit-polling.json) workflow. Select credentials
157
+ and replace placeholder IDs, bucket names and example invoice data before running.
158
+ All examples are inactive on import.
159
+
160
+ The tested n8n runtime is **2.38.1**, using its filesystem binary storage.
161
+ Compilation/lint/unit checks run under Node.js 22 and 24. Saved version 1 and
162
+ 1.1 workflows are exercised; older n8n host releases are not certified by this
163
+ matrix. The published node has no external runtime dependencies.
164
+
165
+ ## Development and releases
166
+
167
+ Run `npm ci --ignore-scripts` and `npm run check`. With Docker, run
168
+ `bash scripts/check-runtime.sh` and `bash scripts/check-webhook-runtime.sh`.
169
+ These execute local fixtures, including multipart/file handling and signed
170
+ webhooks; they make no paid API calls. CI requires both before release.
171
+
172
+ To refresh the catalogue from an Ironfang source checkout, use
173
+ `python3 scripts/sync-contracts.py /path/to/ironfang` (development-only PyYAML).
174
+ Review endpoint handlers alongside OpenAPI changes. See [RELEASING.md](RELEASING.md)
175
+ and the [validation record](docs/validation.md) for the release procedure and
176
+ qualification of automated checks. License: MIT.
@@ -21,7 +21,12 @@ class IronfangApi {
21
21
  name: 'baseUrl',
22
22
  type: 'string',
23
23
  default: 'https://api.ironfang.uk/renderwolf',
24
- description: 'Only change this if you are pointing at a non-production instance. Credentials created before Renderwolf moved under /renderwolf still hold https://api.ironfang.uk and keep working - the API serves both.',
24
+ description: 'API origin or product base URL. Both legacy origin-only and /renderwolf credentials remain valid; the node selects the requested product path.',
25
+ },
26
+ {
27
+ displayName: 'Test Product', name: 'testProduct', type: 'options', default: 'auto',
28
+ options: [{ name: 'Auto', value: 'auto' }, { name: 'Auditwolf', value: 'auditwolf' }, { name: 'Financewolf', value: 'financewolf' }, { name: 'Renderwolf', value: 'renderwolf' }],
29
+ description: 'Choose a product for the read-only connection check, or discover which product accepts the key',
25
30
  },
26
31
  ];
27
32
  authenticate = {
@@ -0,0 +1,8 @@
1
+ import type { ICredentialType, Icon, INodeProperties } from 'n8n-workflow';
2
+ export declare class IronfangS3 implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IronfangS3 = void 0;
4
+ class IronfangS3 {
5
+ name = 'ironfangS3';
6
+ displayName = 'Ironfang S3 Destination';
7
+ icon = { light: 'file:ironfang.svg', dark: 'file:ironfang.dark.svg' };
8
+ documentationUrl = 'https://ironfang.uk/renderwolf/docs';
9
+ properties = [
10
+ { displayName: 'Access Key', name: 'accessKey', type: 'string', default: '', required: true },
11
+ { displayName: 'Secret Key', name: 'secretKey', type: 'string', typeOptions: { password: true }, default: '', required: true },
12
+ { displayName: 'Session Token', name: 'sessionToken', type: 'string', typeOptions: { password: true }, default: '' },
13
+ ];
14
+ }
15
+ exports.IronfangS3 = IronfangS3;
@@ -0,0 +1,8 @@
1
+ import type { ICredentialType, Icon, INodeProperties } from 'n8n-workflow';
2
+ export declare class IronfangWebhookApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IronfangWebhookApi = void 0;
4
+ class IronfangWebhookApi {
5
+ name = 'ironfangWebhookApi';
6
+ displayName = 'Ironfang Webhook API';
7
+ icon = { light: 'file:ironfang.svg', dark: 'file:ironfang.dark.svg' };
8
+ documentationUrl = 'https://ironfang.uk/auditwolf/docs';
9
+ properties = [
10
+ { displayName: 'Product', name: 'product', type: 'options', default: 'auditwolf', options: [{ name: 'Auditwolf', value: 'auditwolf' }, { name: 'Renderwolf', value: 'renderwolf' }] },
11
+ { displayName: 'Signing Secret', name: 'signingSecret', type: 'string', typeOptions: { password: true }, default: '', required: true, description: 'The one-time secret returned when creating the webhook endpoint or destination. This is not an API key.' },
12
+ ];
13
+ }
14
+ exports.IronfangWebhookApi = IronfangWebhookApi;
@@ -1,18 +1,15 @@
1
1
  import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- import { credentialTest } from './credentialTest';
3
- /**
4
- * Ironfang node. One node per vendor: pick a product with Resource, then an
5
- * operation within it. Renderwolf (https://ironfang.uk/renderwolf/docs) is the
6
- * first product; later ones are added as further resources rather than as
7
- * separate nodes.
8
- *
9
- * Render operations return binary data; sign and usage return JSON.
10
- */
2
+ import { searchTemplates } from './templates';
3
+ import { destinationCredentialTest } from './destinationCredentialTest';
11
4
  export declare class Ironfang implements INodeType {
12
5
  description: INodeTypeDescription;
13
6
  methods: {
14
7
  credentialTest: {
15
- ironfangApiTest: typeof credentialTest;
8
+ ironfangS3Test: typeof destinationCredentialTest;
9
+ ironfangApiTest: typeof import("./credentialTest").credentialTest;
10
+ };
11
+ listSearch: {
12
+ searchTemplates: typeof searchTemplates;
16
13
  };
17
14
  };
18
15
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;