n8n-nodes-afipsdk 1.1.1 → 1.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 (37) hide show
  1. package/README.md +31 -10
  2. package/dist/credentials/AfipSdkApi.credentials.js +10 -1
  3. package/dist/credentials/AfipSdkApi.credentials.js.map +1 -1
  4. package/dist/nodes/AfipSdk/AfipSdk.node.js +51 -2
  5. package/dist/nodes/AfipSdk/AfipSdk.node.js.map +1 -1
  6. package/dist/nodes/AfipSdk/facturasdk/resources/certificate.d.ts +4 -0
  7. package/dist/nodes/AfipSdk/facturasdk/resources/certificate.js +113 -0
  8. package/dist/nodes/AfipSdk/facturasdk/resources/certificate.js.map +1 -0
  9. package/dist/nodes/AfipSdk/facturasdk/resources/invoice.d.ts +4 -0
  10. package/dist/nodes/AfipSdk/facturasdk/resources/invoice.js +153 -0
  11. package/dist/nodes/AfipSdk/facturasdk/resources/invoice.js.map +1 -0
  12. package/dist/nodes/AfipSdk/facturasdk/resources/issuer.d.ts +4 -0
  13. package/dist/nodes/AfipSdk/facturasdk/resources/issuer.js +193 -0
  14. package/dist/nodes/AfipSdk/facturasdk/resources/issuer.js.map +1 -0
  15. package/dist/nodes/AfipSdk/facturasdk/resources/webhookEndpoint.d.ts +4 -0
  16. package/dist/nodes/AfipSdk/facturasdk/resources/webhookEndpoint.js +124 -0
  17. package/dist/nodes/AfipSdk/facturasdk/resources/webhookEndpoint.js.map +1 -0
  18. package/dist/nodes/AfipSdk/facturasdk/shared/fields.d.ts +5 -0
  19. package/dist/nodes/AfipSdk/facturasdk/shared/fields.js +81 -0
  20. package/dist/nodes/AfipSdk/facturasdk/shared/fields.js.map +1 -0
  21. package/dist/nodes/AfipSdk/facturasdk/shared/request.d.ts +16 -0
  22. package/dist/nodes/AfipSdk/facturasdk/shared/request.js +160 -0
  23. package/dist/nodes/AfipSdk/facturasdk/shared/request.js.map +1 -0
  24. package/dist/nodes/AfipSdk/facturasdk/shared/signature.d.ts +1 -0
  25. package/dist/nodes/AfipSdk/facturasdk/shared/signature.js +30 -0
  26. package/dist/nodes/AfipSdk/facturasdk/shared/signature.js.map +1 -0
  27. package/dist/nodes/AfipSdk/resources/getAutomationResult/execute.js +16 -7
  28. package/dist/nodes/AfipSdk/resources/getAutomationResult/execute.js.map +1 -1
  29. package/dist/nodes/AfipSdk/resources/getAutomationResult/index.js +14 -0
  30. package/dist/nodes/AfipSdk/resources/getAutomationResult/index.js.map +1 -1
  31. package/dist/nodes/AfipSdkTrigger/AfipSdkTrigger.node.d.ts +12 -0
  32. package/dist/nodes/AfipSdkTrigger/AfipSdkTrigger.node.js +190 -0
  33. package/dist/nodes/AfipSdkTrigger/AfipSdkTrigger.node.js.map +1 -0
  34. package/dist/nodes/AfipSdkTrigger/AfipSdkTrigger.node.json +13 -0
  35. package/dist/package.json +4 -3
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +4 -3
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.verifyWebhookSignature = verifyWebhookSignature;
4
+ const crypto_1 = require("crypto");
5
+ function verifyWebhookSignature(signature, body, secret, toleranceSeconds = 300) {
6
+ var _a, _b;
7
+ if (typeof signature !== 'string' || !secret) {
8
+ return false;
9
+ }
10
+ const parts = {};
11
+ for (const part of signature.split(',')) {
12
+ const [name, ...rest] = part.split('=');
13
+ parts[name] = rest.join('=');
14
+ }
15
+ if (!/^\d{1,18}$/.test((_a = parts.t) !== null && _a !== void 0 ? _a : '')) {
16
+ return false;
17
+ }
18
+ const timestamp = Number(parts.t);
19
+ const received = (_b = parts.v1) !== null && _b !== void 0 ? _b : '';
20
+ const payload = Buffer.isBuffer(body) ? body : Buffer.from(body, 'utf8');
21
+ const expected = (0, crypto_1.createHmac)('sha256', secret)
22
+ .update(`${timestamp}.`)
23
+ .update(payload)
24
+ .digest('hex');
25
+ const fresh = Math.abs(Math.floor(Date.now() / 1000) - timestamp) <= toleranceSeconds;
26
+ return (fresh &&
27
+ received.length === expected.length &&
28
+ (0, crypto_1.timingSafeEqual)(Buffer.from(received), Buffer.from(expected)));
29
+ }
30
+ //# sourceMappingURL=signature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../../nodes/AfipSdk/facturasdk/shared/signature.ts"],"names":[],"mappings":";;AASA,wDAqCC;AA9CD,mCAAqD;AASrD,SAAgB,sBAAsB,CACrC,SAA6B,EAC7B,IAAqB,EACrB,MAAc,EACd,gBAAgB,GAAG,GAAG;;IAEtB,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,KAAK,GAA2B,EAAE,CAAC;IAEzC,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACzC,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAA,KAAK,CAAC,CAAC,mCAAI,EAAE,CAAC,EAAE,CAAC;QACvC,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClC,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,EAAE,mCAAI,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAEzE,MAAM,QAAQ,GAAG,IAAA,mBAAU,EAAC,QAAQ,EAAE,MAAM,CAAC;SAC3C,MAAM,CAAC,GAAG,SAAS,GAAG,CAAC;SACvB,MAAM,CAAC,OAAO,CAAC;SACf,MAAM,CAAC,KAAK,CAAC,CAAC;IAEhB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,gBAAgB,CAAC;IAEtF,OAAO,CACN,KAAK;QACL,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QACnC,IAAA,wBAAe,EAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAC7D,CAAC;AACH,CAAC"}
@@ -12,21 +12,30 @@ async function getAutomationResultExecute() {
12
12
  if (operation !== 'getAutomationResult') {
13
13
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Operation "${operation}" not supported`);
14
14
  }
15
+ const getAutomation = async (automationId) => this.helpers.httpRequestWithAuthentication.call(this, 'afipSdkApi', {
16
+ method: 'GET',
17
+ url: `${baseUrl}/automations/${automationId}`,
18
+ json: true,
19
+ });
20
+ const pushResult = (result, itemIndex) => {
21
+ const responseItems = this.helpers.returnJsonArray(result);
22
+ returnData.push(...responseItems.map((item) => ({ ...item, pairedItem: { item: itemIndex } })));
23
+ };
15
24
  for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
16
25
  try {
17
26
  const automationId = this.getNodeParameter('automationId', itemIndex);
27
+ const wait = this.getNodeParameter('wait', itemIndex, true);
28
+ if (!wait) {
29
+ pushResult(await getAutomation(automationId), itemIndex);
30
+ continue;
31
+ }
18
32
  const secondsToWait = this.getNodeParameter('secondsToWait', itemIndex) * 1000;
19
33
  let resolved = false;
20
34
  for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
21
35
  await (0, n8n_workflow_1.sleep)(secondsToWait);
22
- const result = await this.helpers.httpRequestWithAuthentication.call(this, 'afipSdkApi', {
23
- method: 'GET',
24
- url: `${baseUrl}/automations/${automationId}`,
25
- json: true,
26
- });
36
+ const result = await getAutomation(automationId);
27
37
  if (result.status !== 'in_process') {
28
- const responseItems = this.helpers.returnJsonArray(result);
29
- returnData.push(...responseItems.map((item) => ({ ...item, pairedItem: { item: itemIndex } })));
38
+ pushResult(result, itemIndex);
30
39
  resolved = true;
31
40
  break;
32
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/AfipSdk/resources/getAutomationResult/execute.ts"],"names":[],"mappings":";;AAMA,gEAyDC;AA9DD,+CAAyD;AACzD,mDAAmD;AAEnD,MAAM,YAAY,GAAG,EAAE,CAAC;AAEjB,KAAK,UAAU,0BAA0B;IAG/C,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;IAClE,MAAM,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,OAAiB,CAAC;IAC5E,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;IAClC,MAAM,UAAU,GAAyB,EAAE,CAAC;IAE5C,IAAI,SAAS,KAAK,qBAAqB,EAAE,CAAC;QACzC,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,cAAc,SAAS,iBAAiB,CAAC,CAAC;IACxF,CAAC;IAED,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;QAC/D,IAAI,CAAC;YACJ,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,SAAS,CAAW,CAAC;YAChF,MAAM,aAAa,GAAI,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,SAAS,CAAY,GAAG,IAAI,CAAC;YAE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AAY,GAAG,aAAa,GAAG,EACxE,EAAE,SAAS,EAAE,CACb,CAAC;YACH,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE;oBACzC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;iBAC/B,CAAC,CAAC;gBACH,SAAS;YACV,CAAC;YAED,MAAM,IAAA,kBAAS,EAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QACnD,CAAC;IACF,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;AACrB,CAAC"}
@@ -14,6 +14,19 @@ exports.getAutomationResultFields = [
14
14
  },
15
15
  },
16
16
  },
17
+ {
18
+ displayName: 'Wait For Result',
19
+ name: 'wait',
20
+ type: 'boolean',
21
+ default: true,
22
+ description: 'Whether to check the automation until it finishes, or to return its current state at once',
23
+ displayOptions: {
24
+ show: {
25
+ resource: ['automation'],
26
+ operation: ['getAutomationResult'],
27
+ },
28
+ },
29
+ },
17
30
  {
18
31
  displayName: 'Seconds To Wait',
19
32
  name: 'secondsToWait',
@@ -23,6 +36,7 @@ exports.getAutomationResultFields = [
23
36
  show: {
24
37
  resource: ['automation'],
25
38
  operation: ['getAutomationResult'],
39
+ wait: [true],
26
40
  },
27
41
  },
28
42
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/AfipSdk/resources/getAutomationResult/index.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,qBAAqB,CAAC;aAClC;SACD;KACD;IACD;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,qBAAqB,CAAC;aAClC;SACD;KACD;CACD,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/AfipSdk/resources/getAutomationResult/index.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,qBAAqB,CAAC;aAClC;SACD;KACD;IACD;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,WAAW,EACV,2FAA2F;QAC5F,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,qBAAqB,CAAC;aAClC;SACD;KACD;IACD;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,qBAAqB,CAAC;gBAClC,IAAI,EAAE,CAAC,IAAI,CAAC;aACZ;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { IHookFunctions, INodeType, INodeTypeDescription, IWebhookFunctions, IWebhookResponseData } from 'n8n-workflow';
2
+ export declare class AfipSdkTrigger implements INodeType {
3
+ description: INodeTypeDescription;
4
+ webhookMethods: {
5
+ default: {
6
+ checkExists(this: IHookFunctions): Promise<boolean>;
7
+ create(this: IHookFunctions): Promise<boolean>;
8
+ delete(this: IHookFunctions): Promise<boolean>;
9
+ };
10
+ };
11
+ webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
12
+ }
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AfipSdkTrigger = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const request_1 = require("../AfipSdk/facturasdk/shared/request");
6
+ const signature_1 = require("../AfipSdk/facturasdk/shared/signature");
7
+ class AfipSdkTrigger {
8
+ constructor() {
9
+ this.description = {
10
+ displayName: 'Afip SDK Trigger',
11
+ name: 'afipSdkTrigger',
12
+ icon: {
13
+ light: 'file:../../icons/afipsdk.svg',
14
+ dark: 'file:../../icons/afipsdk.dark.svg',
15
+ },
16
+ group: ['trigger'],
17
+ version: 1,
18
+ subtitle: '={{ $parameter["events"].join(", ") }}',
19
+ description: 'Starts the workflow when Factura SDK sends the result of an invoice (approved, rejected or failed)',
20
+ defaults: {
21
+ name: 'Afip SDK Trigger',
22
+ },
23
+ inputs: [],
24
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
25
+ credentials: [
26
+ {
27
+ name: 'afipSdkApi',
28
+ required: true,
29
+ },
30
+ ],
31
+ webhooks: [
32
+ {
33
+ name: 'default',
34
+ httpMethod: 'POST',
35
+ responseMode: 'onReceived',
36
+ path: 'webhook',
37
+ },
38
+ ],
39
+ properties: [
40
+ {
41
+ displayName: 'When the workflow is activated, the node registers its URL as the webhook endpoint of the environment of the credential and keeps the secret that signs every event. Factura SDK accepts one active endpoint per environment: if another one is active, point it to this URL or deactivate it first.',
42
+ name: 'notice',
43
+ type: 'notice',
44
+ default: '',
45
+ },
46
+ {
47
+ displayName: 'Events',
48
+ name: 'events',
49
+ type: 'multiOptions',
50
+ options: [
51
+ {
52
+ name: 'Invoice Approved',
53
+ value: 'invoice.approved',
54
+ description: 'ARCA approved the invoice, with or without observations',
55
+ },
56
+ {
57
+ name: 'Invoice Failed',
58
+ value: 'invoice.failed',
59
+ description: 'The invoice could not be authorized: retries ran out or there is a configuration error',
60
+ },
61
+ {
62
+ name: 'Invoice Rejected',
63
+ value: 'invoice.rejected',
64
+ description: 'ARCA rejected the invoice, with the reasons in errors',
65
+ },
66
+ {
67
+ name: 'Test',
68
+ value: 'test',
69
+ description: 'The test event sent from the dashboard or with the Factura SDK node',
70
+ },
71
+ ],
72
+ default: ['invoice.approved', 'invoice.rejected', 'invoice.failed'],
73
+ required: true,
74
+ },
75
+ ],
76
+ };
77
+ this.webhookMethods = {
78
+ default: {
79
+ async checkExists() {
80
+ const webhookUrl = this.getNodeWebhookUrl('default');
81
+ const staticData = this.getWorkflowStaticData('node');
82
+ const endpoints = await listEndpoints(this, { status: 'active' });
83
+ const endpoint = endpoints.find((item) => item.url === webhookUrl);
84
+ if (!endpoint) {
85
+ return false;
86
+ }
87
+ if (staticData.endpointId !== endpoint.id) {
88
+ staticData.endpointId = endpoint.id;
89
+ delete staticData.endpointSecret;
90
+ }
91
+ if (!staticData.endpointSecret && !(await credentialSecret(this))) {
92
+ staticData.endpointSecret = await rotateSecret(this, endpoint.id);
93
+ }
94
+ return true;
95
+ },
96
+ async create() {
97
+ const webhookUrl = this.getNodeWebhookUrl('default');
98
+ const staticData = this.getWorkflowStaticData('node');
99
+ const endpoints = await listEndpoints(this);
100
+ const active = endpoints.find((item) => item.status === 'active');
101
+ if (active && active.url !== webhookUrl) {
102
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Factura SDK already has an active webhook endpoint in this environment: ${active.url}`, {
103
+ description: 'Factura SDK accepts one active endpoint per environment. Change the URL of that endpoint to the URL of this node, or deactivate it, and activate the workflow again. To test the trigger while the workflow is active, use a credential with a sandbox token.',
104
+ });
105
+ }
106
+ const existing = active !== null && active !== void 0 ? active : endpoints.find((item) => item.url === webhookUrl);
107
+ if (existing) {
108
+ if (existing.status !== 'active') {
109
+ await (0, request_1.facturaSdkRequest)(this, 'PUT', `webhook-endpoints/${existing.id}`, {
110
+ body: { status: 'active' },
111
+ });
112
+ }
113
+ staticData.endpointId = existing.id;
114
+ staticData.endpointSecret = await rotateSecret(this, existing.id);
115
+ return true;
116
+ }
117
+ const created = await (0, request_1.facturaSdkRequest)(this, 'POST', 'webhook-endpoints', {
118
+ body: { url: webhookUrl },
119
+ });
120
+ if (typeof created.id !== 'string' || typeof created.secret !== 'string') {
121
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Factura SDK did not answer the ID and the secret of the new webhook endpoint');
122
+ }
123
+ staticData.endpointId = created.id;
124
+ staticData.endpointSecret = created.secret;
125
+ return true;
126
+ },
127
+ async delete() {
128
+ const staticData = this.getWorkflowStaticData('node');
129
+ if (staticData.endpointId) {
130
+ try {
131
+ await (0, request_1.facturaSdkRequest)(this, 'PUT', `webhook-endpoints/${staticData.endpointId}`, {
132
+ body: { status: 'inactive' },
133
+ });
134
+ }
135
+ catch (error) {
136
+ this.logger.error('Afip SDK Trigger could not deactivate its webhook endpoint', {
137
+ endpointId: staticData.endpointId,
138
+ error,
139
+ });
140
+ return false;
141
+ }
142
+ delete staticData.endpointId;
143
+ delete staticData.endpointSecret;
144
+ }
145
+ return true;
146
+ },
147
+ },
148
+ };
149
+ }
150
+ async webhook() {
151
+ var _a, _b;
152
+ const staticData = this.getWorkflowStaticData('node');
153
+ const secrets = [(_a = staticData.endpointSecret) !== null && _a !== void 0 ? _a : '', await credentialSecret(this)].filter((secret) => secret !== '');
154
+ if (secrets.length === 0) {
155
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'There is no secret to verify the events: activate the workflow again so the node registers the endpoint, or set the webhook secret in the Factura SDK credential');
156
+ }
157
+ const request = this.getRequestObject();
158
+ const body = (_b = request.rawBody) !== null && _b !== void 0 ? _b : Buffer.from(JSON.stringify(this.getBodyData()), 'utf8');
159
+ const signature = this.getHeaderData()['x-facturasdk-signature'];
160
+ if (!secrets.some((secret) => (0, signature_1.verifyWebhookSignature)(signature, body, secret))) {
161
+ const response = this.getResponseObject();
162
+ response.status(400).json({ message: 'Invalid signature' });
163
+ return { noWebhookResponse: true };
164
+ }
165
+ const event = JSON.parse(body.toString('utf8'));
166
+ const events = this.getNodeParameter('events');
167
+ if (!events.includes(event.type)) {
168
+ return {};
169
+ }
170
+ return {
171
+ workflowData: [this.helpers.returnJsonArray(event)],
172
+ };
173
+ }
174
+ }
175
+ exports.AfipSdkTrigger = AfipSdkTrigger;
176
+ async function credentialSecret(context) {
177
+ const secret = (await context.getCredentials('afipSdkApi')).webhookSecret;
178
+ return typeof secret === 'string' ? secret : '';
179
+ }
180
+ async function listEndpoints(context, filters = {}) {
181
+ return (await (0, request_1.listAll)(context, 'webhook-endpoints', filters, true, 0));
182
+ }
183
+ async function rotateSecret(context, endpointId) {
184
+ const rotated = await (0, request_1.facturaSdkRequest)(context, 'POST', `webhook-endpoints/${endpointId}/rotate`);
185
+ if (typeof rotated.secret !== 'string' || rotated.secret === '') {
186
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Factura SDK did not answer the new secret of the webhook endpoint');
187
+ }
188
+ return rotated.secret;
189
+ }
190
+ //# sourceMappingURL=AfipSdkTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AfipSdkTrigger.node.js","sourceRoot":"","sources":["../../../nodes/AfipSdkTrigger/AfipSdkTrigger.node.ts"],"names":[],"mappings":";;;AAQA,+CAAuE;AACvE,kEAAkF;AAClF,sEAAgF;AAiBhF,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE;gBACL,KAAK,EAAE,8B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YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;IAE1E,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AACjD,CAAC;AAED,KAAK,UAAU,aAAa,CAC3B,OAAuB,EACvB,UAAuB,EAAE;IAEzB,OAAO,CAAC,MAAM,IAAA,iBAAO,EAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAe,CAAC;AACtF,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,OAAuB,EAAE,UAAkB;IACtE,MAAM,OAAO,GAAG,MAAM,IAAA,2BAAiB,EACtC,OAAO,EACP,MAAM,EACN,qBAAqB,UAAU,SAAS,CACxC,CAAC;IAEF,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;QACjE,MAAM,IAAI,iCAAkB,CAC3B,OAAO,CAAC,OAAO,EAAE,EACjB,mEAAmE,CACnE,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,CAAC;AACvB,CAAC"}
@@ -0,0 +1,13 @@
1
+ {
2
+ "node": "n8n-nodes-afipsdk.afipSdkTrigger",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Finance & Accounting"],
6
+ "resources": {
7
+ "primaryDocumentation": [
8
+ {
9
+ "url": "https://afipsdk.com/docs/facturasdk/webhooks"
10
+ }
11
+ ]
12
+ }
13
+ }
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "n8n-nodes-afipsdk",
3
- "version": "1.1.1",
4
- "description": "n8n nodes for Afip SDK integration.",
3
+ "version": "1.2.0",
4
+ "description": "n8n nodes for Afip SDK: ARCA web services, automations, PDFs and electronic invoicing with Factura SDK.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/AfipSDK/n8n-nodes-afipsdk",
7
7
  "keywords": [
@@ -37,7 +37,8 @@
37
37
  "dist/credentials/AfipSdkApi.credentials.js"
38
38
  ],
39
39
  "nodes": [
40
- "dist/nodes/AfipSdk/AfipSdk.node.js"
40
+ "dist/nodes/AfipSdk/AfipSdk.node.js",
41
+ "dist/nodes/AfipSdkTrigger/AfipSdkTrigger.node.js"
41
42
  ]
42
43
  },
43
44
  "devDependencies": {