@limetech/n8n-nodes-lime 2.6.0 → 3.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.
Files changed (133) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/credentials/index.ts +0 -1
  3. package/dist/credentials/index.d.ts +0 -1
  4. package/dist/credentials/index.js +0 -1
  5. package/dist/credentials/index.js.map +1 -1
  6. package/dist/nodes/index.d.ts +0 -1
  7. package/dist/nodes/index.js +0 -1
  8. package/dist/nodes/index.js.map +1 -1
  9. package/dist/nodes/lime-forms/LimeFormsTrigger.node.js +3 -3
  10. package/dist/nodes/lime-forms/LimeFormsTrigger.node.js.map +1 -1
  11. package/dist/nodes/lime-forms/assets/lime-crm.svg +1 -0
  12. package/dist/package.json +0 -8
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/nodes/index.ts +0 -1
  15. package/nodes/lime-forms/LimeFormsTrigger.node.ts +3 -3
  16. package/nodes/lime-forms/assets/lime-crm.svg +1 -0
  17. package/package.json +1 -9
  18. package/credentials/FortnoxApi.credentials.ts +0 -61
  19. package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
  20. package/dist/credentials/FortnoxApi.credentials.js +0 -57
  21. package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
  22. package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
  23. package/dist/nodes/fortnox/Fortnox.node.js +0 -95
  24. package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
  25. package/dist/nodes/fortnox/Fortnox.node.json +0 -18
  26. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
  27. package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
  28. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
  29. package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  30. package/dist/nodes/fortnox/commons.d.ts +0 -25
  31. package/dist/nodes/fortnox/commons.js +0 -44
  32. package/dist/nodes/fortnox/commons.js.map +0 -1
  33. package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
  34. package/dist/nodes/fortnox/index.d.ts +0 -6
  35. package/dist/nodes/fortnox/index.js +0 -23
  36. package/dist/nodes/fortnox/index.js.map +0 -1
  37. package/dist/nodes/fortnox/model.d.ts +0 -20
  38. package/dist/nodes/fortnox/model.js +0 -3
  39. package/dist/nodes/fortnox/model.js.map +0 -1
  40. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
  41. package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
  42. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
  43. package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -7
  44. package/dist/nodes/fortnox/resources/customers/index.js +0 -85
  45. package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
  46. package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
  47. package/dist/nodes/fortnox/resources/customers/model.js +0 -3
  48. package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
  49. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -10
  50. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -281
  51. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
  52. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -9
  53. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -38
  54. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
  55. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -10
  56. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -38
  57. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
  58. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -10
  59. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
  60. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
  61. package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +0 -5
  62. package/dist/nodes/fortnox/resources/customers/operations/index.js +0 -42
  63. package/dist/nodes/fortnox/resources/customers/operations/index.js.map +0 -1
  64. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -10
  65. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -261
  66. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
  67. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
  68. package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
  69. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
  70. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
  71. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
  72. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
  73. package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -7
  74. package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
  75. package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
  76. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
  77. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
  78. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
  79. package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -147
  80. package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
  81. package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
  82. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -10
  83. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
  84. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
  85. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -10
  86. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -37
  87. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
  88. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -10
  89. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
  90. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
  91. package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +0 -4
  92. package/dist/nodes/fortnox/resources/invoice/operations/index.js +0 -41
  93. package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +0 -1
  94. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -10
  95. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -64
  96. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
  97. package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
  98. package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
  99. package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
  100. package/dist/nodes/fortnox/transport/index.d.ts +0 -3
  101. package/dist/nodes/fortnox/transport/index.js +0 -76
  102. package/dist/nodes/fortnox/transport/index.js.map +0 -1
  103. package/dist/nodes/lime-forms/lime-forms.svg +0 -6
  104. package/nodes/fortnox/Fortnox.node.json +0 -18
  105. package/nodes/fortnox/Fortnox.node.ts +0 -102
  106. package/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  107. package/nodes/fortnox/FortnoxTrigger.node.ts +0 -196
  108. package/nodes/fortnox/commons.ts +0 -94
  109. package/nodes/fortnox/fortnoxLogo.svg +0 -15
  110. package/nodes/fortnox/index.ts +0 -6
  111. package/nodes/fortnox/model.ts +0 -25
  112. package/nodes/fortnox/resources/customers/filterParameters.ts +0 -47
  113. package/nodes/fortnox/resources/customers/index.ts +0 -53
  114. package/nodes/fortnox/resources/customers/model.ts +0 -107
  115. package/nodes/fortnox/resources/customers/operations/create.operation.ts +0 -307
  116. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +0 -49
  117. package/nodes/fortnox/resources/customers/operations/get.operation.ts +0 -50
  118. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +0 -79
  119. package/nodes/fortnox/resources/customers/operations/index.ts +0 -5
  120. package/nodes/fortnox/resources/customers/operations/update.operation.ts +0 -288
  121. package/nodes/fortnox/resources/customers/sortParameters.ts +0 -32
  122. package/nodes/fortnox/resources/invoice/filterParameters.ts +0 -88
  123. package/nodes/fortnox/resources/invoice/index.ts +0 -49
  124. package/nodes/fortnox/resources/invoice/invoiceParameters.ts +0 -214
  125. package/nodes/fortnox/resources/invoice/model.ts +0 -156
  126. package/nodes/fortnox/resources/invoice/operations/create.operation.ts +0 -71
  127. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +0 -50
  128. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +0 -100
  129. package/nodes/fortnox/resources/invoice/operations/index.ts +0 -4
  130. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +0 -79
  131. package/nodes/fortnox/transport/errorCodes.ts +0 -62
  132. package/nodes/fortnox/transport/index.ts +0 -106
  133. package/nodes/lime-forms/lime-forms.svg +0 -6
package/nodes/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './response';
2
2
  export * from './lime-crm';
3
- export * from './fortnox';
4
3
  export * from './modules';
5
4
  export * from './lime-forms';
@@ -29,11 +29,11 @@ const FORMS_OBSERVABLE_WEBHOOK_NAME_PREFIX = 'N8N';
29
29
 
30
30
  export class LimeFormsTrigger implements INodeType {
31
31
  description: INodeTypeDescription = {
32
- displayName: 'Lime Forms Trigger',
33
- name: 'limeFormsTrigger',
32
+ displayName: 'Lime CRM Forms Trigger',
33
+ name: 'limeCrmFormsTrigger',
34
34
  group: ['trigger'],
35
35
  version: 1,
36
- icon: 'file:lime-forms.svg',
36
+ icon: 'file:assets/lime-crm.svg',
37
37
  description: 'Handle webhooks from Lime Forms',
38
38
  defaults: {
39
39
  name: 'Lime Forms',
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 1024 1025" xmlns="http://www.w3.org/2000/svg" xml:space="preserve"><clipPath id="a"><path d="M0 .03h1024v1024H0z"/></clipPath><g clip-path="url(#a)"><path d="M92.399 480.888c0-257.059 208.719-465.779 465.78-465.779C815.28 15.109 1024 223.829 1024 480.888c0 133.713-55.806 271.139-193.403 385.355-166.779 138.45-390.39 157.35-736.15 134.525-102.653-6.785-117.502-24.319-64.468-63.444 166.694-123.047 62.42-217.167 62.42-456.436Z" style="fill:#bee034"/><clipPath id="b"><path d="M92.399 480.888c0-257.059 208.719-465.779 465.78-465.779C815.28 15.109 1024 223.829 1024 480.888c0 133.713-55.806 271.139-193.403 385.355-166.779 138.45-390.39 157.35-736.15 134.525-102.653-6.785-117.502-24.319-64.468-63.444 166.694-123.047 62.42-217.167 62.42-456.436Z"/></clipPath><g clip-path="url(#b)"><path d="M1023-361.59c0 784.587-711.326 1420.62-1588.79 1420.62C-1402.638-283.55 1023-1146.18 1023-361.59Z" style="fill:#a6efff;filter:blur(200px)"/></g><path d="M433.85 723.911c-24.702-12.757-47.23-29.226-66.813-48.596-9.088-9.002-23.765-8.959-32.768.129-9.001 9.087-8.916 23.763.171 32.766 22.911 22.698 49.236 41.941 78.121 56.873 11.392 5.888 25.385 1.409 31.231-9.94 5.888-11.349 1.409-25.344-9.942-31.232Zm367.266-363.98a270.163 270.163 0 0 1 25.556 78.547c2.048 12.629 13.952 21.206 26.581 19.158 12.586-2.006 21.204-13.951 19.156-26.539a316.387 316.387 0 0 0-29.907-92.029c-5.803-11.434-19.754-15.999-31.146-10.24-11.393 5.76-16 19.713-10.24 31.103Zm-51.497 315.384c-19.584 19.37-42.069 35.839-66.815 48.596-11.349 5.888-15.786 19.883-9.94 31.232 5.887 11.349 19.881 15.828 31.229 9.94 28.929-14.932 55.253-34.175 78.164-56.873 9.045-9.003 9.131-23.679.128-32.766-9.002-9.088-23.678-9.131-32.766-.129ZM517.006 213.546a274.904 274.904 0 0 1 41.343-3.114c14.036 0 27.861 1.066 41.343 3.114 12.629 1.919 24.448-6.784 26.367-19.413 1.962-12.628-6.741-24.446-19.371-26.409a322.626 322.626 0 0 0-48.339-3.627 322.201 322.201 0 0 0-48.34 3.627c-12.672 1.963-21.332 13.781-19.413 26.409 1.92 12.629 13.739 21.332 26.41 19.413Zm41.343 490.355c-40.489 0-73.385 32.853-73.385 73.342s32.896 73.385 73.385 73.385c40.489 0 73.342-32.896 73.342-73.385 0-40.489-32.853-73.342-73.342-73.342ZM290.025 438.478c4.481-27.818 13.227-54.227 25.514-78.547 5.761-11.39 1.195-25.343-10.239-31.103-11.392-5.759-25.343-1.194-31.104 10.24a313.893 313.893 0 0 0-29.908 92.029c-2.048 12.588 6.527 24.533 19.157 26.539 12.629 2.048 24.532-6.529 26.58-19.158Zm479.092 112.254c-12.501 38.527 8.618 79.955 47.102 92.456 38.528 12.502 79.956-8.618 92.457-47.104 12.501-38.525-8.619-79.953-47.103-92.455-38.527-12.501-79.955 8.619-92.456 47.103Zm-80.51-247.802c32.766 23.808 78.675 16.554 102.482-16.212 23.808-32.767 16.512-78.675-16.256-102.482-32.723-23.809-78.675-16.512-102.439 16.254-23.808 32.725-16.555 78.633 16.213 102.44Zm-260.558 0c32.766-23.807 40.063-69.715 16.254-102.44-23.807-32.766-69.715-40.063-102.482-16.254-32.766 23.807-40.02 69.715-16.255 102.482 23.806 32.766 69.758 40.02 102.483 16.212Zm-80.51 247.802c-12.501-38.484-53.929-59.604-92.415-47.103-38.526 12.502-59.645 53.93-47.102 92.455 12.501 38.486 53.929 59.606 92.413 47.104 38.528-12.501 59.605-53.929 47.104-92.456Z" style="fill:#fff"/></g></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/n8n-nodes-lime",
3
- "version": "2.6.0",
3
+ "version": "3.0.0",
4
4
  "description": "n8n node to connect to Lime CRM",
5
5
  "license": "Apache-2.0",
6
6
  "main": "nodes/index.ts",
@@ -31,14 +31,11 @@
31
31
  "n8nNodesApiVersion": 1,
32
32
  "credentials": [
33
33
  "dist/credentials/LimeCrmApi.credentials.js",
34
- "dist/credentials/FortnoxApi.credentials.js",
35
34
  "dist/credentials/LimeFormsApi.credentials.js"
36
35
  ],
37
36
  "nodes": [
38
37
  "dist/nodes/lime-crm/LimeCrmNode.node.js",
39
38
  "dist/nodes/lime-crm/LimeCrmTrigger.node.js",
40
- "dist/nodes/fortnox/Fortnox.node.js",
41
- "dist/nodes/fortnox/FortnoxTrigger.node.js",
42
39
  "dist/nodes/lime-forms/LimeFormsTrigger.node.js"
43
40
  ]
44
41
  },
@@ -48,7 +45,6 @@
48
45
  "@semantic-release/git": "^10.0.1",
49
46
  "@types/jest": "^30.0.0",
50
47
  "@types/node": "^24.10.1",
51
- "@types/ws": "^8.18.1",
52
48
  "concurrently": "^9.2.1",
53
49
  "copyfiles": "^2.4.1",
54
50
  "eslint": "^9.39.1",
@@ -61,10 +57,6 @@
61
57
  "typedoc": "^0.28.14",
62
58
  "typescript": "^5.9.3"
63
59
  },
64
- "dependencies": {
65
- "currency-codes": "^2.2.0",
66
- "ws": "^8.18.3"
67
- },
68
60
  "peerDependencies": {
69
61
  "n8n-workflow": "^1.109.0"
70
62
  },
@@ -1,61 +0,0 @@
1
- import {
2
- ICredentialType,
3
- INodeProperties,
4
- IHttpRequestMethods,
5
- IAuthenticate,
6
- ICredentialTestRequest,
7
- } from 'n8n-workflow';
8
- import { FORTNOX_API_CREDENTIAL_KEY } from '../nodes/fortnox/commons';
9
- import { FORTNOX_BASE_URL } from '../nodes/fortnox/transport';
10
-
11
- export class FortnoxApi implements ICredentialType {
12
- name = FORTNOX_API_CREDENTIAL_KEY;
13
- displayName = 'Fortnox API';
14
- documentationUrl = 'https://www.fortnox.se/developer';
15
- properties: INodeProperties[] = [
16
- {
17
- displayName: 'Token',
18
- name: 'token',
19
- type: 'string',
20
- typeOptions: {
21
- password: true,
22
- },
23
- default: '',
24
- required: true,
25
- description: 'Token for authentication with the Fortnox API',
26
- },
27
- {
28
- displayName: 'Client Secret',
29
- name: 'clientSecret',
30
- type: 'string',
31
- typeOptions: {
32
- password: true,
33
- },
34
- default: '',
35
- description:
36
- 'Unique key provided when you register your Fortnox integration',
37
- },
38
- ];
39
-
40
- authenticate: IAuthenticate = {
41
- type: 'generic',
42
- properties: {
43
- headers: {
44
- Authorization: '=Bearer {{$credentials.token}}',
45
- Accept: 'application/json',
46
- 'Content-Type': 'application/json',
47
- },
48
- },
49
- };
50
-
51
- test: ICredentialTestRequest = {
52
- request: {
53
- baseURL: FORTNOX_BASE_URL,
54
- url: 'invoices',
55
- method: 'GET' as IHttpRequestMethods,
56
- headers: {
57
- Authorization: '=Bearer {{$credentials.token}}',
58
- },
59
- },
60
- };
61
- }
@@ -1,9 +0,0 @@
1
- import { ICredentialType, INodeProperties, IAuthenticate, ICredentialTestRequest } from 'n8n-workflow';
2
- export declare class FortnoxApi implements ICredentialType {
3
- name: string;
4
- displayName: string;
5
- documentationUrl: string;
6
- properties: INodeProperties[];
7
- authenticate: IAuthenticate;
8
- test: ICredentialTestRequest;
9
- }
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FortnoxApi = void 0;
4
- const commons_1 = require("../nodes/fortnox/commons");
5
- const transport_1 = require("../nodes/fortnox/transport");
6
- class FortnoxApi {
7
- constructor() {
8
- this.name = commons_1.FORTNOX_API_CREDENTIAL_KEY;
9
- this.displayName = 'Fortnox API';
10
- this.documentationUrl = 'https://www.fortnox.se/developer';
11
- this.properties = [
12
- {
13
- displayName: 'Token',
14
- name: 'token',
15
- type: 'string',
16
- typeOptions: {
17
- password: true,
18
- },
19
- default: '',
20
- required: true,
21
- description: 'Token for authentication with the Fortnox API',
22
- },
23
- {
24
- displayName: 'Client Secret',
25
- name: 'clientSecret',
26
- type: 'string',
27
- typeOptions: {
28
- password: true,
29
- },
30
- default: '',
31
- description: 'Unique key provided when you register your Fortnox integration',
32
- },
33
- ];
34
- this.authenticate = {
35
- type: 'generic',
36
- properties: {
37
- headers: {
38
- Authorization: '=Bearer {{$credentials.token}}',
39
- Accept: 'application/json',
40
- 'Content-Type': 'application/json',
41
- },
42
- },
43
- };
44
- this.test = {
45
- request: {
46
- baseURL: transport_1.FORTNOX_BASE_URL,
47
- url: 'invoices',
48
- method: 'GET',
49
- headers: {
50
- Authorization: '=Bearer {{$credentials.token}}',
51
- },
52
- },
53
- };
54
- }
55
- }
56
- exports.FortnoxApi = FortnoxApi;
57
- //# sourceMappingURL=FortnoxApi.credentials.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FortnoxApi.credentials.js","sourceRoot":"","sources":["../../credentials/FortnoxApi.credentials.ts"],"names":[],"mappings":";;;AAOA,sDAAsE;AACtE,0DAA8D;AAE9D,MAAa,UAAU;IAAvB;QACI,SAAI,GAAG,oCAA0B,CAAC;QAClC,gBAAW,GAAG,aAAa,CAAC;QAC5B,qBAAgB,GAAG,kCAAkC,CAAC;QACtD,eAAU,GAAsB;YAC5B;gBACI,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACT,QAAQ,EAAE,IAAI;iBACjB;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,+CAA+C;aAC/D;YACD;gBACI,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACT,QAAQ,EAAE,IAAI;iBACjB;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EACP,gEAAgE;aACvE;SACJ,CAAC;QAEF,iBAAY,GAAkB;YAC1B,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACR,OAAO,EAAE;oBACL,aAAa,EAAE,gCAAgC;oBAC/C,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBACrC;aACJ;SACJ,CAAC;QAEF,SAAI,GAA2B;YAC3B,OAAO,EAAE;gBACL,OAAO,EAAE,4BAAgB;gBACzB,GAAG,EAAE,UAAU;gBACf,MAAM,EAAE,KAA4B;gBACpC,OAAO,EAAE;oBACL,aAAa,EAAE,gCAAgC;iBAClD;aACJ;SACJ,CAAC;IACN,CAAC;CAAA;AAlDD,gCAkDC"}
@@ -1,5 +0,0 @@
1
- import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- export declare class Fortnox implements INodeType {
3
- description: INodeTypeDescription;
4
- execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
- }
@@ -1,95 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Fortnox = void 0;
4
- const n8n_workflow_1 = require("n8n-workflow");
5
- const invoice_1 = require("./resources/invoice");
6
- const commons_1 = require("./commons");
7
- const customers_1 = require("./resources/customers");
8
- class Fortnox {
9
- constructor() {
10
- this.description = {
11
- displayName: 'Fortnox',
12
- name: 'fortnox',
13
- icon: 'file:fortnoxLogo.svg',
14
- group: ['transform'],
15
- version: 1,
16
- subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
17
- description: 'Consume the Fortnox API',
18
- defaults: {
19
- name: 'Fortnox',
20
- },
21
- inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
22
- outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
23
- credentials: [
24
- {
25
- name: commons_1.FORTNOX_API_CREDENTIAL_KEY,
26
- required: true,
27
- },
28
- ],
29
- properties: [
30
- {
31
- displayName: 'Resource',
32
- name: 'resource',
33
- type: 'options',
34
- noDataExpression: true,
35
- options: [
36
- {
37
- name: 'Customer',
38
- value: 'customer',
39
- description: 'Work with customers',
40
- },
41
- {
42
- name: 'Invoice',
43
- value: 'invoice',
44
- description: 'Work with invoices',
45
- },
46
- ],
47
- default: 'customer',
48
- },
49
- ...customers_1.customerProperties,
50
- ...invoice_1.invoiceProperties,
51
- ],
52
- };
53
- }
54
- async execute() {
55
- const items = this.getInputData();
56
- const returnData = [];
57
- let responseData;
58
- const resource = this.getNodeParameter('resource', 0);
59
- const operation = this.getNodeParameter('operation', 0);
60
- for (let i = 0; i < items.length; i++) {
61
- if (resource === 'customer') {
62
- responseData = await customers_1.customerOperations.call(this, {
63
- operation,
64
- i,
65
- });
66
- }
67
- else if (resource === 'invoice') {
68
- responseData = await invoice_1.invoiceOperations.call(this, {
69
- operation,
70
- i,
71
- });
72
- }
73
- else {
74
- const errorLog = `The resource "${resource}" is not supported!`;
75
- if (this.continueOnFail()) {
76
- returnData.push({
77
- error: errorLog,
78
- json: { error: errorLog },
79
- });
80
- continue;
81
- }
82
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), errorLog);
83
- }
84
- if (Array.isArray(responseData)) {
85
- returnData.push(...responseData);
86
- }
87
- else if (responseData !== undefined && responseData !== null) {
88
- returnData.push(responseData);
89
- }
90
- }
91
- return [this.helpers.returnJsonArray(returnData)];
92
- }
93
- }
94
- exports.Fortnox = Fortnox;
95
- //# sourceMappingURL=Fortnox.node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Fortnox.node.js","sourceRoot":"","sources":["../../../nodes/fortnox/Fortnox.node.ts"],"names":[],"mappings":";;;AAAA,+CAUsB;AAEtB,iDAA2E;AAC3E,uCAAuD;AACvD,qDAA+E;AAE/E,MAAa,OAAO;IAApB;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EACJ,8DAA8D;YAClE,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE;gBACN,IAAI,EAAE,SAAS;aAClB;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,oCAA0B;oBAChC,QAA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Q,GAAG,iBAAiB,QAAQ,qBAAqB,CAAC;gBAChE,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBACxB,UAAU,CAAC,IAAI,CAAC;wBACZ,KAAK,EAAE,QAAQ;wBACf,IAAI,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE;qBAC5B,CAAC,CAAC;oBACH,SAAS;gBACb,CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;YAC3D,CAAC;YAED,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC9B,UAAU,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;YACrC,CAAC;iBAAM,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;gBAC7D,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAClC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAA2B,CAAC,CAAC,CAAC;IACvE,CAAC;CACJ;AArFD,0BAqFC"}
@@ -1,18 +0,0 @@
1
- {
2
- "node": "n8n-nodes-base.fortnox",
3
- "nodeVersion": "1.0",
4
- "codexVersion": "1.0",
5
- "categories": ["Finance & Accounting"],
6
- "resources": {
7
- "credentialDocumentation": [
8
- {
9
- "url": "https://api.fortnox.se/developer/authorization"
10
- }
11
- ],
12
- "primaryDocumentation": [
13
- {
14
- "url": "https://api.fortnox.se/apidocs"
15
- }
16
- ]
17
- }
18
- }
@@ -1,5 +0,0 @@
1
- import { INodeType, INodeTypeDescription, ITriggerFunctions, ITriggerResponse } from 'n8n-workflow';
2
- export declare class FortnoxTrigger implements INodeType {
3
- description: INodeTypeDescription;
4
- trigger(this: ITriggerFunctions): Promise<ITriggerResponse>;
5
- }
@@ -1,155 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FortnoxTrigger = void 0;
7
- const n8n_workflow_1 = require("n8n-workflow");
8
- const ws_1 = __importDefault(require("ws"));
9
- const commons_1 = require("./commons");
10
- class FortnoxTrigger {
11
- constructor() {
12
- this.description = {
13
- displayName: 'Fortnox Trigger',
14
- name: 'fortnoxTrigger',
15
- icon: 'file:fortnoxLogo.svg',
16
- group: ['trigger'],
17
- version: 1,
18
- description: "Triggers workflows in real time by subscribing to Fortnox's WebSocket API for updates " +
19
- 'on selected topics like invoices or customers.',
20
- defaults: {
21
- name: 'Fortnox Trigger',
22
- },
23
- inputs: [],
24
- outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
25
- credentials: [
26
- {
27
- name: commons_1.FORTNOX_API_CREDENTIAL_KEY,
28
- required: true,
29
- },
30
- ],
31
- properties: [
32
- {
33
- displayName: 'Include Child Tenants',
34
- name: 'includeChildTenants',
35
- type: 'boolean',
36
- required: true,
37
- default: false,
38
- },
39
- {
40
- displayName: 'Topics',
41
- name: 'topicCollection',
42
- required: true,
43
- type: 'fixedCollection',
44
- typeOptions: {
45
- multipleValues: true,
46
- },
47
- default: {},
48
- placeholder: 'Add Topics',
49
- description: 'Topics to subscribe to',
50
- options: [
51
- {
52
- name: 'topics',
53
- displayName: 'Topics',
54
- values: [
55
- {
56
- displayName: 'Topic',
57
- name: 'topic',
58
- type: 'options',
59
- required: true,
60
- default: 'customers',
61
- options: [
62
- {
63
- name: 'Customers',
64
- value: 'customers',
65
- },
66
- {
67
- name: 'Invoices',
68
- value: 'invoices',
69
- },
70
- {
71
- name: 'Orders',
72
- value: 'orders',
73
- },
74
- ],
75
- description: 'Topic to subscribe to',
76
- },
77
- {
78
- displayName: 'Offset',
79
- name: 'offset',
80
- type: 'string',
81
- default: '',
82
- description: 'Offset to supply in order to get events replayed up to 14 days back',
83
- },
84
- ],
85
- },
86
- ],
87
- },
88
- ],
89
- };
90
- }
91
- async trigger() {
92
- const includeChildTenants = this.getNodeParameter('includeChildTenants');
93
- const topicCollection = this.getNodeParameter('topicCollection', {});
94
- const credentials = await this.getCredentials('fortnoxApi');
95
- if (!credentials.clientSecret) {
96
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Credential 'Client Secret' must be provided for the node to work properly");
97
- }
98
- const socket = new ws_1.default('wss://ws.fortnox.se/topics-v1');
99
- const startSocket = async () => {
100
- const commands = {
101
- 'Add Tenants': 'add-tenants-v1',
102
- 'Add Topics': 'add-topics-v1',
103
- Subscribe: 'subscribe-v1',
104
- };
105
- socket.on('open', () => {
106
- socket.send(JSON.stringify({
107
- command: commands['Add Tenants'],
108
- includeChildTenants: includeChildTenants,
109
- clientSecret: credentials.clientSecret,
110
- accessTokens: [`Bearer ${credentials.token}`],
111
- }));
112
- const data = JSON.stringify({
113
- command: commands['Add Topics'],
114
- topics: topicCollection.topics,
115
- });
116
- socket.send(data);
117
- socket.send(JSON.stringify({
118
- command: commands['Subscribe'],
119
- }));
120
- });
121
- socket.on('message', (data) => {
122
- const message = JSON.parse(data);
123
- if (Object.values(commands).includes(message.response)) {
124
- if (message.result != 'ok') {
125
- this.emitError(new n8n_workflow_1.NodeOperationError(this.getNode(), `Unexpected response from Fortnox: ${JSON.stringify(message)}`));
126
- }
127
- }
128
- else {
129
- this.emit([this.helpers.returnJsonArray(message)]);
130
- }
131
- });
132
- socket.on('error', (error) => {
133
- this.emitError(new n8n_workflow_1.NodeOperationError(this.getNode(), 'Websocket Error: ' + error.message));
134
- });
135
- };
136
- const closeFunction = async () => {
137
- socket.close();
138
- };
139
- if (this.getMode() === 'manual') {
140
- async function manualTriggerFunction() {
141
- await startSocket();
142
- }
143
- return {
144
- closeFunction,
145
- manualTriggerFunction,
146
- };
147
- }
148
- else {
149
- await startSocket();
150
- return { closeFunction };
151
- }
152
- }
153
- }
154
- exports.FortnoxTrigger = FortnoxTrigger;
155
- //# sourceMappingURL=FortnoxTrigger.node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FortnoxTrigger.node.js","sourceRoot":"","sources":["../../../nodes/fortnox/FortnoxTrigger.node.ts"],"names":[],"mappings":";;;;;;AAAA,+CAOsB;AACtB,4CAA2B;AAC3B,uCAAuD;AAWvD,MAAa,cAAc;IAA3B;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,WAAW,EACP,wFAAwF;gBACxF,gDAAgD;YACpD,QAAQ,EAAE;gBACN,IAAI,EAAE,iBAAiB;aAC1B;YACD,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,oCAA0B;oBAChC,QAAQ,EAAE,IAAI;iBACjB;aACJ;YACD,UAAU,EAAE;gBACR;oBACI,WAAW,EAAE,uBAAuB;oBACpC,IAAI,EAAE,qBAAqB;oBAC3B,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,KAAK;iBACjB;gBACD;oBACI,WAAW,EAAE,QAAQ;oBACrB,IAAI,EAAE,iBAAiB;oBACvB,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE,iBAAiB;oBACvB,WAAW,EAAE;wBACT,cAAc,EAAE,IAAI;qBACvB;oBACD,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,YAAY;oBACzB,WAAW,EAAE,wBAAwB;oBACrC,OAAO,EAAE;wBACL;4BACI,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,QAAQ;4BACrB,MAAM,EAAE;gCACJ;oCACI,WAAW,EAAE,OAAO;oCACpB,IAAI,EAAE,OAAO;oCACb,IAAI,EAAE,SAAS;oCACf,QAAQ,EAAE,IAAI;oCACd,OAAO,EAAE,WAAW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AAC,OAAO,EAAE,EACd,mBAAmB,GAAG,KAAK,CAAC,OAAO,CACtC,CACJ,CAAC;YACN,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QAEF,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;YAC7B,MAAM,CAAC,KAAK,EAAE,CAAC;QACnB,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;YAC9B,KAAK,UAAU,qBAAqB;gBAChC,MAAM,WAAW,EAAE,CAAC;YACxB,CAAC;YACD,OAAO;gBACH,aAAa;gBACb,qBAAqB;aACxB,CAAC;QACN,CAAC;aAAM,CAAC;YACJ,MAAM,WAAW,EAAE,CAAC;YACpB,OAAO,EAAE,aAAa,EAAE,CAAC;QAC7B,CAAC;IACL,CAAC;CACJ;AA/KD,wCA+KC"}
@@ -1,18 +0,0 @@
1
- {
2
- "node": "n8n-nodes-base.fortnoxTrigger",
3
- "nodeVersion": "1.0",
4
- "codexVersion": "1.0",
5
- "categories": ["Finance & Accounting"],
6
- "resources": {
7
- "credentialDocumentation": [
8
- {
9
- "url": "https://api.fortnox.se/developer/authorization"
10
- }
11
- ],
12
- "primaryDocumentation": [
13
- {
14
- "url": "https://www.fortnox.se/developer/guides-and-good-to-know/websockets"
15
- }
16
- ]
17
- }
18
- }
@@ -1,25 +0,0 @@
1
- import { INodeProperties, INodePropertyTypeOptions } from 'n8n-workflow';
2
- export declare const FORTNOX_API_CREDENTIAL_KEY = "fortnoxApi";
3
- export type ParameterTypes = 'string' | 'boolean' | 'number';
4
- export type ParameterDefaultValueTypes = string | boolean | number;
5
- export type ParameterDefinition = [
6
- displayName: string,
7
- name: string,
8
- parameterType: ParameterTypes,
9
- defaultValue: ParameterDefaultValueTypes,
10
- typeOptions: INodePropertyTypeOptions
11
- ];
12
- export type OptionParameterDefinition = {
13
- displayName: string;
14
- name: string;
15
- parameters: Array<[string, string]>;
16
- };
17
- export type CollectionParameterDefinition = {
18
- displayName: string;
19
- name: string;
20
- parameters: ParameterDefinition[];
21
- multipleValues: boolean;
22
- };
23
- export declare const createParameter: (displayName: string, name: string, parameterType: ParameterTypes, defaultValue: ParameterDefaultValueTypes, typeOptions: INodePropertyTypeOptions) => INodeProperties;
24
- export declare function createOptionParameter(option: OptionParameterDefinition): INodeProperties;
25
- export declare function createCollectionParameter(collection: CollectionParameterDefinition): INodeProperties;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createParameter = exports.FORTNOX_API_CREDENTIAL_KEY = void 0;
4
- exports.createOptionParameter = createOptionParameter;
5
- exports.createCollectionParameter = createCollectionParameter;
6
- exports.FORTNOX_API_CREDENTIAL_KEY = 'fortnoxApi';
7
- const createParameter = (displayName, name, parameterType, defaultValue, typeOptions) => ({
8
- displayName: displayName,
9
- name: name,
10
- type: parameterType,
11
- default: defaultValue,
12
- typeOptions: typeOptions,
13
- });
14
- exports.createParameter = createParameter;
15
- function createOptionParameter(option) {
16
- const parameters = option.parameters.map(([parameterName, parameterValue]) => {
17
- return {
18
- name: parameterName,
19
- value: parameterValue,
20
- };
21
- });
22
- return {
23
- displayName: option.displayName,
24
- name: option.name,
25
- type: 'options',
26
- noDataExpression: true,
27
- options: parameters,
28
- default: parameters[0].value,
29
- };
30
- }
31
- function createCollectionParameter(collection) {
32
- const parameters = collection.parameters.map(([displayName, name, parameterType, defaultValue, typeOptions]) => (0, exports.createParameter)(displayName, name, parameterType, defaultValue, typeOptions));
33
- return {
34
- displayName: collection.displayName,
35
- typeOptions: {
36
- multipleValues: collection.multipleValues,
37
- },
38
- name: collection.name,
39
- default: {},
40
- type: 'collection',
41
- options: parameters,
42
- };
43
- }
44
- //# sourceMappingURL=commons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commons.js","sourceRoot":"","sources":["../../../nodes/fortnox/commons.ts"],"names":[],"mappings":";;;AA+CA,sDAoBC;AAED,8DAwBC;AAvFY,QAAA,0BAA0B,GAA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AAY;QAClB,OAAO,EAAE,UAAU;KACtB,CAAC;AACN,CAAC"}
@@ -1,15 +0,0 @@
1
- <svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1550 1550" width="1550" height="1550">
2
- <title>fortnox-brand-symbol-svg</title>
3
- <style>
4
- .s0 { fill: #003824 }
5
- .s1 { fill: #007533 }
6
- .s2 { fill: #ffc200 }
7
- .s3 { fill: #00db33 }
8
- </style>
9
- <path class="s0" d="m774.4 302.8h243.3c17.6 0 27.1 9.5 27.1 27.1v129.8c0 17.5-9.4 26.9-27.1 26.9h-243.3c-56.7 0-94.5 37.9-94.5 94.6v177h337.8c17.6 0 27.1 9.5 27.1 27v129.8c0 17.6-9.4 27.1-27.1 27.1h-337.8v252.6c0 17.6-9.5 27.1-27.1 27.1h-135.1c-17.6 0-27.1-9.4-27.1-27.1v-608.1c0-168.9 114.9-283.9 283.8-283.9"/>
10
- <g>
11
- <path class="s1" d="m774.8 1549.9c-148.3 0-294.9-42.5-421.6-124.7-157-101.7-271.7-256.7-323.1-436.3-51-177.8-36.9-367.9 39.6-535.2 12.3-26.8 44-38.6 70.8-26.3 26.7 12.2 38.6 43.9 26.2 70.7-65.9 144.2-78 308.2-34.1 461.5 44.3 154.8 143.3 288.5 278.6 376.2 160.5 104.1 358.5 134.3 543.2 82.8 28.4-7.8 57.8 8.8 65.7 37.1 7.8 28.4-8.8 57.8-37.1 65.6-68.5 19.2-138.5 28.5-208.3 28.5z"/>
12
- <path class="s2" d="m1162.9 1436.8c-17.6 0-34.9-8.8-45-24.8-15.8-24.8-8.5-57.8 16.3-73.6 81.1-51.7 148.9-118.8 201.3-199.7 200.5-309.2 112.1-723.8-197-924.3-10.1-6.6-21.2-13.2-34.7-20.9-25.6-14.5-34.7-47-20.1-72.7 14.5-25.6 47-34.7 72.7-20.1 15.5 8.7 28.3 16.4 40.2 24.1 358.5 232.5 460.9 713.4 228.4 1071.9-60.8 93.8-139.4 171.7-233.5 231.6-8.9 5.7-18.8 8.4-28.6 8.4z"/>
13
- <path class="s3" d="m234 350.8c-12.5 0-25.2-4.3-35.2-13.2-22.2-19.5-24.3-53.2-4.8-75.3 186.3-211.8 473.6-305.2 749.4-243.7 28.8 6.4 46.9 34.9 40.5 63.7-6.4 28.7-34.9 46.8-63.7 40.4-237.9-53-485.5 27.6-646.3 210-10.5 11.9-25.2 18.1-39.9 18.1z"/>
14
- </g>
15
- </svg>
@@ -1,6 +0,0 @@
1
- export * from './commons';
2
- export * from './Fortnox.node';
3
- export * from './FortnoxTrigger.node';
4
- export * from './model';
5
- export * from './resources/invoice';
6
- export * from './resources/customers';
@@ -1,23 +0,0 @@
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("./commons"), exports);
18
- __exportStar(require("./Fortnox.node"), exports);
19
- __exportStar(require("./FortnoxTrigger.node"), exports);
20
- __exportStar(require("./model"), exports);
21
- __exportStar(require("./resources/invoice"), exports);
22
- __exportStar(require("./resources/customers"), exports);
23
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../nodes/fortnox/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,iDAA+B;AAC/B,wDAAsC;AACtC,0CAAwB;AACxB,sDAAoC;AACpC,wDAAsC"}