@limetech/n8n-nodes-lime 0.3.0 → 0.3.2

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 (190) hide show
  1. package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
  2. package/dist/credentials/FortnoxApi.credentials.js +57 -0
  3. package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
  4. package/dist/credentials/LimeCrmApi.credentials.js +3 -2
  5. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -1
  6. package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
  7. package/dist/nodes/fortnox/Fortnox.node.js +95 -0
  8. package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
  9. package/dist/nodes/fortnox/Fortnox.node.json +18 -0
  10. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
  11. package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
  12. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
  13. package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
  14. package/dist/nodes/fortnox/commons.d.ts +25 -0
  15. package/dist/nodes/fortnox/commons.js +44 -0
  16. package/dist/nodes/fortnox/commons.js.map +1 -0
  17. package/dist/nodes/fortnox/fortnoxLogo.svg +15 -0
  18. package/dist/nodes/fortnox/model.d.ts +20 -0
  19. package/dist/nodes/fortnox/model.js +3 -0
  20. package/dist/nodes/fortnox/model.js.map +1 -0
  21. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
  22. package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
  23. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
  24. package/dist/nodes/fortnox/resources/customers/index.d.ts +20 -0
  25. package/dist/nodes/fortnox/resources/customers/index.js +87 -0
  26. package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
  27. package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
  28. package/dist/nodes/fortnox/resources/customers/model.js +3 -0
  29. package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
  30. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +12 -0
  31. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +283 -0
  32. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
  33. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +10 -0
  34. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +36 -0
  35. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
  36. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +11 -0
  37. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +36 -0
  38. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
  39. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +11 -0
  40. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
  41. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
  42. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +12 -0
  43. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +267 -0
  44. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
  45. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
  46. package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
  47. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
  48. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
  49. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
  50. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
  51. package/dist/nodes/fortnox/resources/invoice/index.d.ts +20 -0
  52. package/dist/nodes/fortnox/resources/invoice/index.js +81 -0
  53. package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
  54. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
  55. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
  56. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
  57. package/dist/nodes/fortnox/resources/invoice/model.d.ts +150 -0
  58. package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
  59. package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
  60. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +11 -0
  61. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
  62. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
  63. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +11 -0
  64. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +35 -0
  65. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
  66. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +11 -0
  67. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
  68. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
  69. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +11 -0
  70. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +62 -0
  71. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
  72. package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
  73. package/dist/nodes/fortnox/transport/errorCodes.js +50 -0
  74. package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
  75. package/dist/nodes/fortnox/transport/index.d.ts +4 -0
  76. package/dist/nodes/fortnox/transport/index.js +72 -0
  77. package/dist/nodes/fortnox/transport/index.js.map +1 -0
  78. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  79. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +14 -0
  80. package/dist/nodes/lime-crm/LimeCrmNode.node.js +113 -0
  81. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  82. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
  83. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +200 -0
  84. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  85. package/dist/nodes/lime-crm/assets/lime-crm.svg +1 -0
  86. package/dist/nodes/lime-crm/commons/constants.d.ts +4 -0
  87. package/dist/nodes/lime-crm/commons/constants.js +8 -0
  88. package/dist/nodes/lime-crm/commons/constants.js.map +1 -0
  89. package/dist/nodes/lime-crm/commons/index.d.ts +3 -0
  90. package/dist/nodes/lime-crm/commons/index.js +11 -0
  91. package/dist/nodes/lime-crm/commons/index.js.map +1 -0
  92. package/dist/nodes/lime-crm/commons/limetype.d.ts +10 -0
  93. package/dist/nodes/lime-crm/commons/limetype.js +3 -0
  94. package/dist/nodes/lime-crm/commons/limetype.js.map +1 -0
  95. package/dist/nodes/lime-crm/commons/task.d.ts +14 -0
  96. package/dist/nodes/lime-crm/commons/task.js +48 -0
  97. package/dist/nodes/lime-crm/commons/task.js.map +1 -0
  98. package/dist/nodes/lime-crm/commons/webhook.d.ts +16 -0
  99. package/dist/nodes/lime-crm/commons/webhook.js +29 -0
  100. package/dist/nodes/lime-crm/commons/webhook.js.map +1 -0
  101. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +5 -0
  102. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +11 -0
  103. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +1 -0
  104. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +2 -0
  105. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +20 -0
  106. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +1 -0
  107. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +2 -0
  108. package/dist/nodes/lime-crm/methods/getLimeTypes.js +20 -0
  109. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +1 -0
  110. package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
  111. package/dist/nodes/lime-crm/methods/index.js +10 -0
  112. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  113. package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +23 -0
  114. package/dist/nodes/lime-crm/resources/erpConnector/index.js +67 -0
  115. package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +1 -0
  116. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +26 -0
  117. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +65 -0
  118. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +1 -0
  119. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +9 -0
  120. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +220 -0
  121. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +1 -0
  122. package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +15 -0
  123. package/dist/nodes/lime-crm/resources/erpConnector/transform.js +11 -0
  124. package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +1 -0
  125. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +4 -0
  126. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +7 -0
  127. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +1 -0
  128. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +37 -0
  129. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +124 -0
  130. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +1 -0
  131. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +1 -0
  132. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +6 -0
  133. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +1 -0
  134. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +14 -0
  135. package/dist/nodes/lime-crm/resources/limeObject/index.js +88 -0
  136. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +1 -0
  137. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +9 -0
  138. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +139 -0
  139. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +1 -0
  140. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +9 -0
  141. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +51 -0
  142. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +1 -0
  143. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +9 -0
  144. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +51 -0
  145. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +1 -0
  146. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +9 -0
  147. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +86 -0
  148. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -0
  149. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +9 -0
  150. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +149 -0
  151. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +1 -0
  152. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +20 -0
  153. package/dist/nodes/lime-crm/resources/limeType/index.js +81 -0
  154. package/dist/nodes/lime-crm/resources/limeType/index.js.map +1 -0
  155. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +11 -0
  156. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +36 -0
  157. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +1 -0
  158. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +9 -0
  159. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +36 -0
  160. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +1 -0
  161. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +10 -0
  162. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +15 -0
  163. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +1 -0
  164. package/dist/nodes/lime-crm/transport/commons.d.ts +5 -0
  165. package/dist/nodes/lime-crm/transport/commons.js +32 -0
  166. package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
  167. package/dist/nodes/lime-crm/transport/erpConnector.d.ts +9 -0
  168. package/dist/nodes/lime-crm/transport/erpConnector.js +11 -0
  169. package/dist/nodes/lime-crm/transport/erpConnector.js.map +1 -0
  170. package/dist/nodes/lime-crm/transport/index.d.ts +5 -0
  171. package/dist/nodes/lime-crm/transport/index.js +22 -0
  172. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  173. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +7 -0
  174. package/dist/nodes/lime-crm/transport/limeobjects.js +48 -0
  175. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
  176. package/dist/nodes/lime-crm/transport/limetypes.d.ts +6 -0
  177. package/dist/nodes/lime-crm/transport/limetypes.js +39 -0
  178. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
  179. package/dist/nodes/lime-crm/transport/task.d.ts +13 -0
  180. package/dist/nodes/lime-crm/transport/task.js +13 -0
  181. package/dist/nodes/lime-crm/transport/task.js.map +1 -0
  182. package/dist/nodes/lime-crm/transport/webhooks.d.ts +15 -0
  183. package/dist/nodes/lime-crm/transport/webhooks.js +32 -0
  184. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
  185. package/dist/nodes/nodeResponse.d.ts +12 -0
  186. package/dist/nodes/nodeResponse.js +3 -0
  187. package/dist/nodes/nodeResponse.js.map +1 -0
  188. package/dist/package.json +36 -16
  189. package/dist/tsconfig.tsbuildinfo +1 -1
  190. package/package.json +1 -1
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ const invoiceParameters_1 = require("../invoiceParameters");
7
+ exports.description = {
8
+ name: 'Update',
9
+ value: 'update',
10
+ description: 'Update the invoice',
11
+ action: 'Update the document',
12
+ };
13
+ exports.properties = [
14
+ {
15
+ displayName: 'Document Number',
16
+ name: 'documentNumber',
17
+ type: 'string',
18
+ required: true,
19
+ default: '',
20
+ displayOptions: {
21
+ show: {
22
+ resource: ['invoice'],
23
+ operation: ['update'],
24
+ },
25
+ },
26
+ },
27
+ {
28
+ displayName: 'Add Parameters',
29
+ name: 'createParameters',
30
+ type: 'collection',
31
+ placeholder: 'Add Parameter',
32
+ default: {},
33
+ displayOptions: {
34
+ show: {
35
+ resource: ['invoice'],
36
+ operation: ['update'],
37
+ },
38
+ },
39
+ options: invoiceParameters_1.invoiceParameters,
40
+ },
41
+ ];
42
+ async function execute(i) {
43
+ const documentNumber = this.getNodeParameter('documentNumber', i, {});
44
+ const updateParameters = this.getNodeParameter('invoiceParameters', i, {});
45
+ const body = {
46
+ Invoice: {},
47
+ };
48
+ if (updateParameters) {
49
+ for (const [key, value] of Object.entries(updateParameters)) {
50
+ if (value !== '' && value !== undefined && value !== null) {
51
+ body['Invoice'][key] = value;
52
+ }
53
+ }
54
+ }
55
+ const endpoint = `invoices/${encodeURIComponent(documentNumber)}`;
56
+ return await (0, transport_1.apiRequest)(this, {
57
+ method: 'PUT',
58
+ endpoint: endpoint,
59
+ body: body,
60
+ });
61
+ }
62
+ //# sourceMappingURL=update.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/invoice/operations/update.operation.ts"],"names":[],"mappings":";;;AA2CA,0BA8BC;AAxED,kDAAgD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AAK,IAAI,EAAE,CAAC;gBACvD,IAAI,CAAC,SAAS,CAAiB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAClD,CAAC;QACL,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;IAElE,OAAO,MAAM,IAAA,sBAAU,EAAwB,IAAI,EAAE;QACjD,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function translateErrorCode(errorCode: number): string;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.translateErrorCode = translateErrorCode;
4
+ const errorMessages = {
5
+ 1000003: 'System exception: Something went wrong on our end, please contact our support',
6
+ 1000030: 'Invalid response type: The provided response type(Accept) was invalid.',
7
+ 1000031: 'Invalid content type: The provided content type was invalid.',
8
+ 2000106: 'The value needs to be alphanumeric.',
9
+ 2000108: 'The value needs to be numeric.',
10
+ 2000134: 'The value needs to be boolean',
11
+ 2000310: 'The Client-Secret or the Access-Token is either missing or is incorrect.',
12
+ 2000311: 'The Client-Secret or the Access-Token is either missing or is incorrect.',
13
+ 2000359: 'The value contains invalid characters.',
14
+ 2000588: 'A parameter is invalid. Read more about parameters in the Parameters page.',
15
+ 2000637: 'Customer number 1 is/has already been used and is reserved even if it has been deleted.',
16
+ 2000729: 'A valid identifier was not provided.',
17
+ 2001103: 'The requested Fortnox account does not have a license to use the API.',
18
+ 2001392: 'The request body was empty or contained incorrect data.',
19
+ 2001740: 'The XML object contained an error.',
20
+ 2002115: 'The JSON object contained an error.',
21
+ 2001304: 'Could not find Account used in the request/attached to an element.',
22
+ 2001399: 'Invalid Field name',
23
+ 2001101: 'There is no active licens for the desired scope.',
24
+ 2000663: 'No access to the current scope.',
25
+ 2003095: 'Account is missing for Purchase SE reversed tax liability, in predefined accounts.',
26
+ 2000755: 'Supplier invoice debit and credit does not balance',
27
+ 2003115: 'Tax Rows for VAT type REVERSE must be marked with CODE',
28
+ 2003124: 'Only order that has been delivered can be marked as warehouseready',
29
+ 2003125: 'A document that has been set to warehouseready can not be modified.',
30
+ 2003126: 'Delviered date can not be later than todays date.',
31
+ 2003241: 'Migration has allready been started or finished.',
32
+ 2003275: 'Not authorized',
33
+ 2003277: 'Was not found in the warehouse module.',
34
+ 2003399: 'The document is voided in the warehouse module',
35
+ 2003127: 'An error has occured in the warehouse module',
36
+ 2000204: 'The customer in the request is not available in the customer resource.',
37
+ 2000433: 'The customer in the request is not available in the customer resource.',
38
+ 2001302: 'Could not find article used in request',
39
+ 2000428: 'Could not find article used in request',
40
+ 2000865: 'An incorrect sort field has been used.',
41
+ 2000587: 'An invalid filter has been used.',
42
+ 2001422: 'Invalid currency.',
43
+ 2004195: 'VAT number must be entered for selected VAT type.',
44
+ 2004194: 'Invalid VAT number.',
45
+ 2001314: 'Invalid cost center.',
46
+ };
47
+ function translateErrorCode(errorCode) {
48
+ return errorMessages[errorCode] || 'Unknown error code';
49
+ }
50
+ //# sourceMappingURL=errorCodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorCodes.js","sourceRoot":"","sources":["../../../../nodes/fortnox/transport/errorCodes.ts"],"names":[],"mappings":";;AA2DA,gDAEC;AA3DD,MAAM,aAAa,GAA8B;IAC7C,OAAO,EACH,+EAA+E;IACnF,OAAO,EACH,wEAAwE;IAC5E,OAAO,EAAE,8DAA8D;IACvE,OAAO,EAAE,qCAAqC;IAC9C,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,+BAA+B;IACxC,OAAO,EACH,0EAA0E;IAC9E,OAAO,EACH,0EAA0E;IAC9E,OAAO,EAAE,wCAAwC;IACjD,OAAO,EACH,4EAA4E;IAChF,OAAO,EACH,yFAAyF;IAC7F,OAAO,EAAE,sCAAsC;IAC/C,OAAO,EACH,uEAAuE;IAC3E,OAAO,EAAE,yDAAyD;IAClE,OAAO,EAAE,oCAAoC;IAC7C,OAAO,EAAE,qCAAqC;IAC9C,OAAO,EACH,oEAAoE;IACxE,OAAO,EAAE,oBAAoB;IAC7B,OAAO,EAAE,kDAAkD;IAC3D,OAAO,EAAE,iCAAiC;IAC1C,OAAO,EACH,oFAAoF;IACxF,OAAO,EAAE,oDAAoD;IAC7D,OAAO,EAAE,wDAAwD;IACjE,OAAO,EACH,oEAAoE;IACxE,OAAO,EACH,qEAAqE;IACzE,OAAO,EAAE,mDAAmD;IAC5D,OAAO,EAAE,kDAAkD;IAC3D,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,wCAAwC;IACjD,OAAO,EAAE,gDAAgD;IACzD,OAAO,EAAE,8CAA8C;IACvD,OAAO,EACH,wEAAwE;IAC5E,OAAO,EACH,wEAAwE;IAC5E,OAAO,EAAE,wCAAwC;IACjD,OAAO,EAAE,wCAAwC;IACjD,OAAO,EAAE,wCAAwC;IACjD,OAAO,EAAE,kCAAkC;IAC3C,OAAO,EAAE,mBAAmB;IAC5B,OAAO,EAAE,mDAAmD;IAC5D,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,sBAAsB;CAClC,CAAC;AAEF,SAAgB,kBAAkB,CAAC,SAAiB;IAChD,OAAO,aAAa,CAAC,SAAS,CAAC,IAAI,oBAAoB,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { IExecuteFunctions, ILoadOptionsFunctions, IDataObject } from 'n8n-workflow';
2
+ import { NodeResponse } from '../../nodeResponse';
3
+ export declare const FORTNOX_BASE_URL = "https://api.fortnox.se/3/";
4
+ export declare function apiRequest<T>(nodeContext: IExecuteFunctions | ILoadOptionsFunctions, options: IDataObject): Promise<NodeResponse<T>>;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FORTNOX_BASE_URL = void 0;
4
+ exports.apiRequest = apiRequest;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const errorCodes_1 = require("./errorCodes");
7
+ const commons_1 = require("../commons");
8
+ exports.FORTNOX_BASE_URL = 'https://api.fortnox.se/3/';
9
+ async function apiRequest(nodeContext, options) {
10
+ var _a;
11
+ const endpoint = options.endpoint;
12
+ const method = options.method;
13
+ const credentials = await nodeContext.getCredentials(commons_1.FORTNOX_API_CREDENTIAL_KEY);
14
+ const requestOptions = {
15
+ method: method,
16
+ uri: `${exports.FORTNOX_BASE_URL}${endpoint}`,
17
+ json: true,
18
+ headers: {
19
+ Authorization: `Bearer ${credentials.token}`,
20
+ Accept: 'application/json',
21
+ 'Content-Type': 'application/json',
22
+ },
23
+ };
24
+ if (options.qs && Object.keys(options.qs).length > 0) {
25
+ requestOptions.qs = options.qs;
26
+ }
27
+ if (options.body) {
28
+ requestOptions.body = options.body;
29
+ }
30
+ if (options.timeout) {
31
+ requestOptions.timeout = options.timeout;
32
+ }
33
+ const fullUrl = `${requestOptions.uri}${requestOptions.qs ? '?' + new URLSearchParams(requestOptions.qs).toString() : ''}`;
34
+ n8n_workflow_1.LoggerProxy.info(`URL: ${fullUrl}`);
35
+ try {
36
+ const response = await nodeContext.helpers.request.call(nodeContext, commons_1.FORTNOX_API_CREDENTIAL_KEY, requestOptions);
37
+ return {
38
+ success: true,
39
+ data: response,
40
+ };
41
+ }
42
+ catch (error) {
43
+ const errorResponse = error.error || {};
44
+ const errorInformation = (errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.ErrorInformation) && {
45
+ error: errorResponse.ErrorInformation.error ||
46
+ errorResponse.ErrorInformation.Error,
47
+ message: errorResponse.ErrorInformation.message ||
48
+ errorResponse.ErrorInformation.Message,
49
+ code: errorResponse.ErrorInformation.code ||
50
+ errorResponse.ErrorInformation.Code,
51
+ };
52
+ let message;
53
+ if (errorInformation) {
54
+ message = `API request failed [URL: ${fullUrl}][Method: ${method}]\n
55
+ [Error Information:\n
56
+ - Error: ${errorInformation.error || 'Unknown error'}\n
57
+ - Message: ${errorInformation.message || 'No message provided'}\n
58
+ - Code: ${errorInformation.code || 'No code provided'}\n
59
+ - Code Translation: ${(0, errorCodes_1.translateErrorCode)(errorInformation.code) || 'No translation available'}\n
60
+ ]`;
61
+ }
62
+ else {
63
+ message = `API request failed [URL: ${fullUrl}][Method: ${method}]: ${error.message}`;
64
+ }
65
+ return {
66
+ success: false,
67
+ error: message,
68
+ status: (_a = error === null || error === void 0 ? void 0 : error.cause) === null || _a === void 0 ? void 0 : _a.status,
69
+ };
70
+ }
71
+ }
72
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/fortnox/transport/index.ts"],"names":[],"mappings":";;;AAeA,gCAkFC;AAjGD,+CAOsB;AACtB,6CAAkD;AAElD,wCAAwD;AAG3C,QAAA,gBAAgB,GAAG,2BAA2B,CAAC;AAErD,KAAK,UAAU,UAAU,CAC5B,WAAsD,EACtD,OAAoB;;IAEpB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,MAAM,MAAM,GAAG,OAAO,CAAC,MAA6B,CAAC;IACrD,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,cAAc,CAChD,oCAA0B,CAC7B,CAAC;IAEF,MAAM,cAAc,GAAoB;QACpC,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,GAAG,wBAAgB,GAAG,QAAQ,EAAE;QACrC,IAAI,EAAE,IAAI;QACV,OAAO,EAAE;YACL,aAAa,EAAE,UAAU,WAAW,CAAC,KAAK,EAAE;YAC5C,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;SACrC;KACJ,CAAC;IAEF,IAAI,OAAO,CAAC,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnD,cAAc,CAAC,EAAE,GAAG,OAAO,CAAC,EAAiB,CAAC;IAClD,CAAC;IAED,I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B,OAAO,aAAa,MAAM;;+BAE7C,gBAAgB,CAAC,KAAK,IAAI,eAAe;iCACvC,gBAAgB,CAAC,OAAO,IAAI,qBAAqB;8BACpD,gBAAgB,CAAC,IAAI,IAAI,kBAAkB;0CAC/B,IAAA,+BAAkB,EAAC,gBAAgB,CAAC,IAAc,CAAC,IAAI,0BAA0B;kBACzG,CAAC;QACX,CAAC;aAAM,CAAC;YACJ,OAAO,GAAG,4BAA4B,OAAO,aAAa,MAAM,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QAC1F,CAAC;QACD,OAAO;YACH,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,MAAM;SAC/B,CAAC;IACN,CAAC;AACL,CAAC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-base.limeCrm",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["CRM"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "https://lime-crm.com/api-docs/"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "https://lime-crm.com/api-docs/"
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ import { getEntitiesForErpSystem, getLimeTypeProperties, getLimeTypes } from './methods';
3
+ export declare class LimeCrmNode implements INodeType {
4
+ description: INodeTypeDescription;
5
+ methods: {
6
+ loadOptions: {
7
+ getEntitiesForErpSystem: typeof getEntitiesForErpSystem;
8
+ getLimeTypes: typeof getLimeTypes;
9
+ getLimeTypeProperties: typeof getLimeTypeProperties;
10
+ };
11
+ };
12
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
13
+ }
14
+ export { LimeCrmTrigger } from './LimeCrmTrigger.node';
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LimeCrmTrigger = exports.LimeCrmNode = void 0;
4
+ const erpConnector_1 = require("./resources/erpConnector");
5
+ const limeType_1 = require("./resources/limeType");
6
+ const limeObject_1 = require("./resources/limeObject");
7
+ const commons_1 = require("./commons");
8
+ const methods_1 = require("./methods");
9
+ class LimeCrmNode {
10
+ constructor() {
11
+ this.description = {
12
+ displayName: 'Lime CRM',
13
+ name: 'limeCrm',
14
+ icon: 'file:assets/lime-crm.svg',
15
+ group: ['transform'],
16
+ version: 1,
17
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
18
+ description: 'Consume the Lime CRM API',
19
+ defaults: {
20
+ name: 'Lime CRM',
21
+ },
22
+ inputs: ["main"],
23
+ outputs: ["main"],
24
+ credentials: [
25
+ {
26
+ name: commons_1.LIME_CRM_API_CREDENTIAL_KEY,
27
+ required: true,
28
+ },
29
+ ],
30
+ properties: [
31
+ {
32
+ displayName: 'Resource',
33
+ name: 'resource',
34
+ type: 'options',
35
+ noDataExpression: true,
36
+ options: [
37
+ {
38
+ name: 'Lime Type',
39
+ value: commons_1.LIMETYPE_RESOURCE,
40
+ description: 'Work with entity type definitions',
41
+ },
42
+ {
43
+ name: 'Lime Object',
44
+ value: commons_1.LIMEOBJECT_RESOURCE,
45
+ description: 'Work with actual data records',
46
+ },
47
+ {
48
+ name: 'ERP Connector',
49
+ value: commons_1.ERP_CONNECTOR_RESOURCE,
50
+ description: 'Integrate data between ERP and Lime CRM',
51
+ },
52
+ ],
53
+ default: commons_1.LIMEOBJECT_RESOURCE,
54
+ },
55
+ ...limeType_1.limeTypeFields,
56
+ ...limeObject_1.limeObjectFields,
57
+ ...erpConnector_1.erpConnectorFields,
58
+ ],
59
+ };
60
+ this.methods = {
61
+ loadOptions: {
62
+ getEntitiesForErpSystem: methods_1.getEntitiesForErpSystem,
63
+ getLimeTypes: methods_1.getLimeTypes,
64
+ getLimeTypeProperties: methods_1.getLimeTypeProperties,
65
+ },
66
+ };
67
+ }
68
+ async execute() {
69
+ const items = this.getInputData();
70
+ const returnData = [];
71
+ const resource = this.getNodeParameter('resource', 0);
72
+ const operation = this.getNodeParameter('operation', 0);
73
+ for (let i = 0; i < items.length; i++) {
74
+ let responseData;
75
+ try {
76
+ if (resource === commons_1.LIMETYPE_RESOURCE) {
77
+ responseData = await limeType_1.limeTypeOperations.call(this, {
78
+ operation,
79
+ i,
80
+ });
81
+ }
82
+ else if (resource === commons_1.LIMEOBJECT_RESOURCE) {
83
+ responseData = await limeObject_1.limeObjectOperations.call(this, {
84
+ operation,
85
+ i,
86
+ });
87
+ }
88
+ else if (resource === commons_1.ERP_CONNECTOR_RESOURCE) {
89
+ responseData = await erpConnector_1.erpConnectorOperations.call(this, {
90
+ operation,
91
+ i,
92
+ });
93
+ }
94
+ returnData.push({ json: responseData });
95
+ }
96
+ catch (error) {
97
+ if (this.continueOnFail()) {
98
+ returnData.push({
99
+ error: error.message,
100
+ json: { error: error.message },
101
+ });
102
+ continue;
103
+ }
104
+ throw error;
105
+ }
106
+ }
107
+ return [this.helpers.returnJsonArray(returnData)];
108
+ }
109
+ }
110
+ exports.LimeCrmNode = LimeCrmNode;
111
+ var LimeCrmTrigger_node_1 = require("./LimeCrmTrigger.node");
112
+ Object.defineProperty(exports, "LimeCrmTrigger", { enumerable: true, get: function () { return LimeCrmTrigger_node_1.LimeCrmTrigger; } });
113
+ //# sourceMappingURL=LimeCrmNode.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LimeCrmNode.node.js","sourceRoot":"","sources":["../../../nodes/lime-crm/LimeCrmNode.node.ts"],"names":[],"mappings":";;;AAUA,2DAGkC;AAClC,mDAA0E;AAC1E,uDAAgF;AAEhF,uCAKmB;AAEnB,uCAImB;AAEnB,MAAa,WAAW;IAAxB;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,SAAS;YACf,IAAI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C,qHAAA,cAAc,OAAA"}
@@ -0,0 +1,18 @@
1
+ import { IHookFunctions, IWebhookFunctions, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
2
+ import { getLimeTypes } from './methods';
3
+ export declare class LimeCrmTrigger implements INodeType {
4
+ description: INodeTypeDescription;
5
+ methods: {
6
+ loadOptions: {
7
+ getLimeTypes: typeof getLimeTypes;
8
+ };
9
+ };
10
+ webhookMethods: {
11
+ default: {
12
+ checkExists(this: IHookFunctions): Promise<boolean>;
13
+ create(this: IHookFunctions): Promise<boolean>;
14
+ delete(this: IHookFunctions): Promise<boolean>;
15
+ };
16
+ };
17
+ webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
18
+ }
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LimeCrmTrigger = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const commons_1 = require("./commons");
6
+ const methods_1 = require("./methods");
7
+ const transport_1 = require("./transport");
8
+ class LimeCrmTrigger {
9
+ constructor() {
10
+ this.description = {
11
+ displayName: 'Lime CRM Trigger',
12
+ name: 'limeCrmTrigger',
13
+ icon: 'file:assets/lime-crm.svg',
14
+ group: ['trigger'],
15
+ version: 1,
16
+ description: 'Trigger which handles webhooks coming from Lime, e.g when ' +
17
+ 'LimeObject is updated',
18
+ defaults: {
19
+ name: 'Lime CRM Trigger',
20
+ },
21
+ inputs: [],
22
+ outputs: ["main"],
23
+ credentials: [
24
+ {
25
+ name: commons_1.LIME_CRM_API_CREDENTIAL_KEY,
26
+ required: true,
27
+ },
28
+ ],
29
+ webhooks: [
30
+ {
31
+ name: 'default',
32
+ httpMethod: 'POST',
33
+ responseMode: 'onReceived',
34
+ path: 'webhook',
35
+ },
36
+ ],
37
+ properties: [
38
+ {
39
+ displayName: 'Events',
40
+ name: 'events',
41
+ type: 'fixedCollection',
42
+ typeOptions: {
43
+ multipleValues: true,
44
+ required: true,
45
+ },
46
+ default: {},
47
+ placeholder: 'Add Event',
48
+ description: 'Events to subscribe to',
49
+ options: [
50
+ {
51
+ name: 'event',
52
+ displayName: 'Event',
53
+ values: [
54
+ {
55
+ displayName: 'Lime Type',
56
+ name: 'limeType',
57
+ type: 'options',
58
+ typeOptions: {
59
+ loadOptionsMethod: 'getLimeTypes',
60
+ },
61
+ default: '',
62
+ description: 'Lime Type to subscribe to events for',
63
+ },
64
+ {
65
+ displayName: 'Event Type',
66
+ name: 'eventType',
67
+ type: 'options',
68
+ options: [
69
+ {
70
+ name: 'New',
71
+ value: 'new',
72
+ description: 'When a new record is created',
73
+ },
74
+ {
75
+ name: 'Update',
76
+ value: 'update',
77
+ description: 'When a record is updated',
78
+ },
79
+ {
80
+ name: 'Delete',
81
+ value: 'delete',
82
+ description: 'When a record is deleted',
83
+ },
84
+ ],
85
+ default: 'new',
86
+ description: 'Type of event to subscribe to',
87
+ },
88
+ ],
89
+ },
90
+ ],
91
+ },
92
+ {
93
+ displayName: 'Name',
94
+ name: 'name',
95
+ type: 'string',
96
+ default: '',
97
+ placeholder: 'my-lime-webhook',
98
+ required: true,
99
+ description: 'Name for this webhook subscription',
100
+ },
101
+ ],
102
+ };
103
+ this.methods = {
104
+ loadOptions: {
105
+ getLimeTypes: methods_1.getLimeTypes,
106
+ },
107
+ };
108
+ this.webhookMethods = {
109
+ default: {
110
+ async checkExists() {
111
+ const webhook = (0, commons_1.getWebhook)(this);
112
+ if (!webhook.data.webhookId) {
113
+ return false;
114
+ }
115
+ const response = await (0, transport_1.getSubscription)(this, webhook);
116
+ if (!response.success) {
117
+ if (response.status === 404) {
118
+ delete webhook.data.webhookId;
119
+ delete webhook.data.webhookEvents;
120
+ return false;
121
+ }
122
+ n8n_workflow_1.LoggerProxy.warn(`There was en error while getting a webhook from Lime CRM: ${response.error}`);
123
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), response.error);
124
+ }
125
+ return true;
126
+ },
127
+ async create() {
128
+ const webhook = (0, commons_1.getWebhook)(this);
129
+ const webhookUrl = webhook.url;
130
+ if (!webhookUrl) {
131
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid Webhook URL. Please make sure that it is not localhost!');
132
+ }
133
+ const existingSubscriptionResponse = await (0, transport_1.listSubscriptionsWithExistingData)(this, webhook);
134
+ if (!existingSubscriptionResponse.success) {
135
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), existingSubscriptionResponse.error);
136
+ }
137
+ if (existingSubscriptionResponse.data.length === 0) {
138
+ const createSubscriptionResponse = await (0, transport_1.createSubscription)(this, webhook);
139
+ if (!createSubscriptionResponse.success) {
140
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), createSubscriptionResponse.error);
141
+ }
142
+ const subscriptionId = createSubscriptionResponse.data.id;
143
+ const events = createSubscriptionResponse.data.events;
144
+ webhook.data.webhookId = subscriptionId;
145
+ webhook.data.webhookEvents = events;
146
+ n8n_workflow_1.LoggerProxy.info(`Webhook with URL ${webhook.url}, ID ${subscriptionId} and events ${events} created!`);
147
+ return true;
148
+ }
149
+ else {
150
+ const limeWebhook = existingSubscriptionResponse.data[0];
151
+ webhook.data.webhookId = limeWebhook.id;
152
+ webhook.data.webhookEvents = limeWebhook.events;
153
+ n8n_workflow_1.LoggerProxy.info(`Webhook with URL ${webhook.url}, and events ${webhook.events} exists in Lime.
154
+ ID ${limeWebhook.id} set up to the N8N data.`);
155
+ return true;
156
+ }
157
+ },
158
+ async delete() {
159
+ const webhook = (0, commons_1.getWebhook)(this);
160
+ n8n_workflow_1.LoggerProxy.info(`Deleting webhook with ID: ${webhook.data.webhookId}`, { ...webhook });
161
+ if (webhook.data.webhookId !== undefined) {
162
+ const response = await (0, transport_1.deleteSubscription)(this, webhook);
163
+ if (!response.success) {
164
+ n8n_workflow_1.LoggerProxy.error(`Failed to delete webhook with ID: ${webhook.data.webhookId}`, {
165
+ ...webhook,
166
+ });
167
+ return false;
168
+ }
169
+ delete webhook.data.webhookId;
170
+ n8n_workflow_1.LoggerProxy.info('Webhook deleted successfully', { ...webhook });
171
+ return true;
172
+ }
173
+ return false;
174
+ },
175
+ },
176
+ };
177
+ }
178
+ async webhook() {
179
+ const webhook = (0, commons_1.getWebhook)(this);
180
+ n8n_workflow_1.LoggerProxy.info('Webhook received. Starting webhook processing...', {
181
+ ...webhook.context,
182
+ });
183
+ const bodyData = this.getBodyData();
184
+ if (!bodyData || !bodyData.event || !bodyData.body) {
185
+ n8n_workflow_1.LoggerProxy.warn('Webhook data is invalid. Missing event or body', {
186
+ ...webhook.context,
187
+ });
188
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Webhook data is invalid');
189
+ }
190
+ const returnData = [];
191
+ returnData.push({
192
+ body: bodyData,
193
+ headers: this.getHeaderData(),
194
+ query: this.getQueryData(),
195
+ });
196
+ return { workflowData: [this.helpers.returnJsonArray(returnData)] };
197
+ }
198
+ }
199
+ exports.LimeCrmTrigger = LimeCrmTrigger;
200
+ //# sourceMappingURL=LimeCrmTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LimeCrmTrigger.node.js","sourceRoot":"","sources":["../../../nodes/lime-crm/LimeCrmTrigger.node.ts"],"names":[],"mappings":";;;AAAA,+CAUsB;AAEtB,uCAAoE;AACpE,uCAAyC;AACzC,2CAKqB;AAErB,MAAa,cAAc;IAA3B;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,0BAA0B;YAChC,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,WAAW,EACP,4DAA4D;gBAC5D,uBAAuB;YAC3B,QAAQ,EAAE;gBACN,IAAI,EAAE,kBAAkB;aAC3B;YACD,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,qCAA2B;oBACjC,QAAQ,EAAE,IAAI;iBACjB;aACJ;YACD,QAAQ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BAAM,CAAC,IAAI,CAAC,gDAAgD,EAAE;gBAC1D,GAAG,OAAO,CAAC,OAAO;aACrB,CAAC,CAAC;YACH,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,yBAAyB,CAC5B,CAAC;QACN,CAAC;QAED,MAAM,UAAU,GAAkB,EAAE,CAAC;QAErC,UAAU,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE;YAC7B,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE;SAC7B,CAAC,CAAC;QAEH,OAAO,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;IACxE,CAAC;CACJ;AAjPD,wCAiPC"}
@@ -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>
@@ -0,0 +1,4 @@
1
+ export declare const LIME_CRM_API_CREDENTIAL_KEY = "limeCrmApi";
2
+ export declare const LIMEOBJECT_RESOURCE = "limeObject";
3
+ export declare const LIMETYPE_RESOURCE = "limeType";
4
+ export declare const ERP_CONNECTOR_RESOURCE = "erpConnector";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ERP_CONNECTOR_RESOURCE = exports.LIMETYPE_RESOURCE = exports.LIMEOBJECT_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
4
+ exports.LIME_CRM_API_CREDENTIAL_KEY = 'limeCrmApi';
5
+ exports.LIMEOBJECT_RESOURCE = 'limeObject';
6
+ exports.LIMETYPE_RESOURCE = 'limeType';
7
+ exports.ERP_CONNECTOR_RESOURCE = 'erpConnector';
8
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/commons/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,2BAA2B,GAAG,YAAY,CAAC;AAI3C,QAAA,mBAAmB,GAAG,YAAY,CAAC;AACnC,QAAA,iBAAiB,GAAG,UAAU,CAAC;AAC/B,QAAA,sBAAsB,GAAG,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { LIME_CRM_API_CREDENTIAL_KEY, LIMEOBJECT_RESOURCE, LIMETYPE_RESOURCE, ERP_CONNECTOR_RESOURCE, } from './constants';
2
+ export { Webhook, getWebhook } from './webhook';
3
+ export { LimeType, LimeTypeProperty } from './limetype';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getWebhook = exports.ERP_CONNECTOR_RESOURCE = exports.LIMETYPE_RESOURCE = exports.LIMEOBJECT_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
4
+ var constants_1 = require("./constants");
5
+ Object.defineProperty(exports, "LIME_CRM_API_CREDENTIAL_KEY", { enumerable: true, get: function () { return constants_1.LIME_CRM_API_CREDENTIAL_KEY; } });
6
+ Object.defineProperty(exports, "LIMEOBJECT_RESOURCE", { enumerable: true, get: function () { return constants_1.LIMEOBJECT_RESOURCE; } });
7
+ Object.defineProperty(exports, "LIMETYPE_RESOURCE", { enumerable: true, get: function () { return constants_1.LIMETYPE_RESOURCE; } });
8
+ Object.defineProperty(exports, "ERP_CONNECTOR_RESOURCE", { enumerable: true, get: function () { return constants_1.ERP_CONNECTOR_RESOURCE; } });
9
+ var webhook_1 = require("./webhook");
10
+ Object.defineProperty(exports, "getWebhook", { enumerable: true, get: function () { return webhook_1.getWebhook; } });
11
+ //# sourceMappingURL=index.js.map