@limetech/n8n-nodes-lime 2.5.3 → 2.5.5-dev.1

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 (252) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
  3. package/dist/credentials/FortnoxApi.credentials.js +57 -0
  4. package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
  5. package/dist/credentials/LimeCrmApi.credentials.d.ts +9 -0
  6. package/dist/credentials/LimeCrmApi.credentials.js +70 -0
  7. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -0
  8. package/dist/credentials/index.d.ts +2 -0
  9. package/dist/credentials/index.js +19 -0
  10. package/dist/credentials/index.js.map +1 -0
  11. package/dist/nodes/errorHandling.d.ts +11 -0
  12. package/dist/nodes/errorHandling.js +20 -0
  13. package/dist/nodes/errorHandling.js.map +1 -0
  14. package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
  15. package/dist/nodes/fortnox/Fortnox.node.js +95 -0
  16. package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
  17. package/dist/nodes/fortnox/Fortnox.node.json +18 -0
  18. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
  19. package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
  20. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
  21. package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
  22. package/dist/nodes/fortnox/commons.d.ts +25 -0
  23. package/dist/nodes/fortnox/commons.js +44 -0
  24. package/dist/nodes/fortnox/commons.js.map +1 -0
  25. package/dist/nodes/fortnox/fortnoxLogo.svg +15 -0
  26. package/dist/nodes/fortnox/index.d.ts +6 -0
  27. package/dist/nodes/fortnox/index.js +23 -0
  28. package/dist/nodes/fortnox/index.js.map +1 -0
  29. package/dist/nodes/fortnox/model.d.ts +20 -0
  30. package/dist/nodes/fortnox/model.js +3 -0
  31. package/dist/nodes/fortnox/model.js.map +1 -0
  32. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
  33. package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
  34. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
  35. package/dist/nodes/fortnox/resources/customers/index.d.ts +7 -0
  36. package/dist/nodes/fortnox/resources/customers/index.js +85 -0
  37. package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
  38. package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
  39. package/dist/nodes/fortnox/resources/customers/model.js +3 -0
  40. package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
  41. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +10 -0
  42. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +281 -0
  43. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
  44. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +9 -0
  45. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +38 -0
  46. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
  47. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +10 -0
  48. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +38 -0
  49. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
  50. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +10 -0
  51. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
  52. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
  53. package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +5 -0
  54. package/dist/nodes/fortnox/resources/customers/operations/index.js +42 -0
  55. package/dist/nodes/fortnox/resources/customers/operations/index.js.map +1 -0
  56. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +10 -0
  57. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +261 -0
  58. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
  59. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
  60. package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
  61. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
  62. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
  63. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
  64. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
  65. package/dist/nodes/fortnox/resources/invoice/index.d.ts +7 -0
  66. package/dist/nodes/fortnox/resources/invoice/index.js +81 -0
  67. package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
  68. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
  69. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
  70. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
  71. package/dist/nodes/fortnox/resources/invoice/model.d.ts +147 -0
  72. package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
  73. package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
  74. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +10 -0
  75. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
  76. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
  77. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +10 -0
  78. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +37 -0
  79. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
  80. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +10 -0
  81. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
  82. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
  83. package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +4 -0
  84. package/dist/nodes/fortnox/resources/invoice/operations/index.js +41 -0
  85. package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +1 -0
  86. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +10 -0
  87. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +64 -0
  88. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
  89. package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
  90. package/dist/nodes/fortnox/transport/errorCodes.js +50 -0
  91. package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
  92. package/dist/nodes/fortnox/transport/index.d.ts +3 -0
  93. package/dist/nodes/fortnox/transport/index.js +76 -0
  94. package/dist/nodes/fortnox/transport/index.js.map +1 -0
  95. package/dist/nodes/index.d.ts +4 -0
  96. package/dist/nodes/index.js +21 -0
  97. package/dist/nodes/index.js.map +1 -0
  98. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  99. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +19 -0
  100. package/dist/nodes/lime-crm/LimeCrmNode.node.js +122 -0
  101. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  102. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
  103. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +215 -0
  104. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  105. package/dist/nodes/lime-crm/assets/lime-crm.svg +1 -0
  106. package/dist/nodes/lime-crm/index.d.ts +9 -0
  107. package/dist/nodes/lime-crm/index.js +26 -0
  108. package/dist/nodes/lime-crm/index.js.map +1 -0
  109. package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +5 -0
  110. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +47 -0
  111. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -0
  112. package/dist/nodes/lime-crm/methods/getLimetypes.d.ts +2 -0
  113. package/dist/nodes/lime-crm/methods/getLimetypes.js +20 -0
  114. package/dist/nodes/lime-crm/methods/getLimetypes.js.map +1 -0
  115. package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
  116. package/dist/nodes/lime-crm/methods/index.js +15 -0
  117. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  118. package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +4 -0
  119. package/dist/nodes/lime-crm/methods/resourceMapping.js +71 -0
  120. package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -0
  121. package/dist/nodes/lime-crm/models/constants.d.ts +9 -0
  122. package/dist/nodes/lime-crm/models/constants.js +10 -0
  123. package/dist/nodes/lime-crm/models/constants.js.map +1 -0
  124. package/dist/nodes/lime-crm/models/index.d.ts +6 -0
  125. package/dist/nodes/lime-crm/models/index.js +13 -0
  126. package/dist/nodes/lime-crm/models/index.js.map +1 -0
  127. package/dist/nodes/lime-crm/models/limeobject.d.ts +4 -0
  128. package/dist/nodes/lime-crm/models/limeobject.js +3 -0
  129. package/dist/nodes/lime-crm/models/limeobject.js.map +1 -0
  130. package/dist/nodes/lime-crm/models/limetype.d.ts +24 -0
  131. package/dist/nodes/lime-crm/models/limetype.js +3 -0
  132. package/dist/nodes/lime-crm/models/limetype.js.map +1 -0
  133. package/dist/nodes/lime-crm/models/propertyTypes.d.ts +4 -0
  134. package/dist/nodes/lime-crm/models/propertyTypes.js +5 -0
  135. package/dist/nodes/lime-crm/models/propertyTypes.js.map +1 -0
  136. package/dist/nodes/lime-crm/models/users.d.ts +13 -0
  137. package/dist/nodes/lime-crm/models/users.js +3 -0
  138. package/dist/nodes/lime-crm/models/users.js.map +1 -0
  139. package/dist/nodes/lime-crm/models/webhook.d.ts +18 -0
  140. package/dist/nodes/lime-crm/models/webhook.js +3 -0
  141. package/dist/nodes/lime-crm/models/webhook.js.map +1 -0
  142. package/dist/nodes/lime-crm/resources/admin/index.d.ts +7 -0
  143. package/dist/nodes/lime-crm/resources/admin/index.js +89 -0
  144. package/dist/nodes/lime-crm/resources/admin/index.js.map +1 -0
  145. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.d.ts +11 -0
  146. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js +123 -0
  147. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js.map +1 -0
  148. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.d.ts +11 -0
  149. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js +87 -0
  150. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js.map +1 -0
  151. package/dist/nodes/lime-crm/resources/admin/operations/index.d.ts +2 -0
  152. package/dist/nodes/lime-crm/resources/admin/operations/index.js +39 -0
  153. package/dist/nodes/lime-crm/resources/admin/operations/index.js.map +1 -0
  154. package/dist/nodes/lime-crm/resources/data/index.d.ts +7 -0
  155. package/dist/nodes/lime-crm/resources/data/index.js +108 -0
  156. package/dist/nodes/lime-crm/resources/data/index.js.map +1 -0
  157. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.d.ts +11 -0
  158. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js +124 -0
  159. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js.map +1 -0
  160. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.d.ts +10 -0
  161. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js +52 -0
  162. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js.map +1 -0
  163. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.d.ts +11 -0
  164. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js +299 -0
  165. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js.map +1 -0
  166. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.d.ts +9 -0
  167. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js +125 -0
  168. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js.map +1 -0
  169. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.d.ts +11 -0
  170. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js +79 -0
  171. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js.map +1 -0
  172. package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +6 -0
  173. package/dist/nodes/lime-crm/resources/data/operations/index.js +43 -0
  174. package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -0
  175. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.d.ts +11 -0
  176. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js +146 -0
  177. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js.map +1 -0
  178. package/dist/nodes/lime-crm/resources/metadata/index.d.ts +7 -0
  179. package/dist/nodes/lime-crm/resources/metadata/index.js +93 -0
  180. package/dist/nodes/lime-crm/resources/metadata/index.js.map +1 -0
  181. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.d.ts +10 -0
  182. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js +16 -0
  183. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js.map +1 -0
  184. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.d.ts +11 -0
  185. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js +113 -0
  186. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js.map +1 -0
  187. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.d.ts +11 -0
  188. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js +37 -0
  189. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js.map +1 -0
  190. package/dist/nodes/lime-crm/resources/metadata/operations/index.d.ts +3 -0
  191. package/dist/nodes/lime-crm/resources/metadata/operations/index.js +40 -0
  192. package/dist/nodes/lime-crm/resources/metadata/operations/index.js.map +1 -0
  193. package/dist/nodes/lime-crm/transport/commons.d.ts +14 -0
  194. package/dist/nodes/lime-crm/transport/commons.js +52 -0
  195. package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
  196. package/dist/nodes/lime-crm/transport/files.d.ts +26 -0
  197. package/dist/nodes/lime-crm/transport/files.js +96 -0
  198. package/dist/nodes/lime-crm/transport/files.js.map +1 -0
  199. package/dist/nodes/lime-crm/transport/index.d.ts +7 -0
  200. package/dist/nodes/lime-crm/transport/index.js +32 -0
  201. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  202. package/dist/nodes/lime-crm/transport/limeQuery.d.ts +10 -0
  203. package/dist/nodes/lime-crm/transport/limeQuery.js +18 -0
  204. package/dist/nodes/lime-crm/transport/limeQuery.js.map +1 -0
  205. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +16 -0
  206. package/dist/nodes/lime-crm/transport/limeobjects.js +76 -0
  207. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
  208. package/dist/nodes/lime-crm/transport/limetypes.d.ts +33 -0
  209. package/dist/nodes/lime-crm/transport/limetypes.js +85 -0
  210. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
  211. package/dist/nodes/lime-crm/transport/users.d.ts +6 -0
  212. package/dist/nodes/lime-crm/transport/users.js +159 -0
  213. package/dist/nodes/lime-crm/transport/users.js.map +1 -0
  214. package/dist/nodes/lime-crm/transport/webhooks.d.ts +14 -0
  215. package/dist/nodes/lime-crm/transport/webhooks.js +51 -0
  216. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
  217. package/dist/nodes/lime-crm/utils/files.d.ts +8 -0
  218. package/dist/nodes/lime-crm/utils/files.js +103 -0
  219. package/dist/nodes/lime-crm/utils/files.js.map +1 -0
  220. package/dist/nodes/lime-crm/utils/hmac.d.ts +1 -0
  221. package/dist/nodes/lime-crm/utils/hmac.js +11 -0
  222. package/dist/nodes/lime-crm/utils/hmac.js.map +1 -0
  223. package/dist/nodes/lime-crm/utils/index.d.ts +4 -0
  224. package/dist/nodes/lime-crm/utils/index.js +16 -0
  225. package/dist/nodes/lime-crm/utils/index.js.map +1 -0
  226. package/dist/nodes/lime-crm/utils/webhook.d.ts +2 -0
  227. package/dist/nodes/lime-crm/utils/webhook.js +34 -0
  228. package/dist/nodes/lime-crm/utils/webhook.js.map +1 -0
  229. package/dist/nodes/modules.d.ts +12 -0
  230. package/dist/nodes/modules.js +16 -0
  231. package/dist/nodes/modules.js.map +1 -0
  232. package/dist/nodes/response.d.ts +18 -0
  233. package/dist/nodes/response.js +3 -0
  234. package/dist/nodes/response.js.map +1 -0
  235. package/dist/package.json +69 -0
  236. package/dist/tsconfig.tsbuildinfo +1 -0
  237. package/package.json +1 -2
  238. package/.github/workflows/lint.yml +0 -23
  239. package/.github/workflows/mark-stale.yml +0 -21
  240. package/.github/workflows/release.yml +0 -35
  241. package/.github/workflows/test-and-build.yml +0 -32
  242. package/.prettierrc.mjs +0 -1
  243. package/.releaserc.json +0 -35
  244. package/Dockerfile +0 -0
  245. package/eslint.config.mjs +0 -28
  246. package/jest.config.js +0 -11
  247. package/knip.json +0 -9
  248. package/tests/nodes/lime-crm/methods.spec.ts +0 -91
  249. package/tests/nodes/lime-crm/utils.spec.ts +0 -273
  250. package/tsconfig.json +0 -30
  251. package/typedoc.css +0 -9
  252. package/typedoc.json +0 -19
@@ -0,0 +1,15 @@
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>
@@ -0,0 +1,6 @@
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';
@@ -0,0 +1,23 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,20 @@
1
+ import { IDataObject } from 'n8n-workflow';
2
+ export interface ErrorInformationModel {
3
+ code?: number;
4
+ Code?: number;
5
+ error?: number;
6
+ Error?: number;
7
+ message?: string;
8
+ Message?: string;
9
+ }
10
+ export interface ErrorResponseModel extends IDataObject {
11
+ ErrorInformation: ErrorInformationModel;
12
+ }
13
+ export interface MetaInformationModel {
14
+ '@TotalResources': number;
15
+ '@TotalPages': number;
16
+ '@CurrentPage': number;
17
+ }
18
+ export interface ResponseModel extends IDataObject {
19
+ MetaInformation: MetaInformationModel;
20
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../nodes/fortnox/model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const filterParameters: INodeProperties[];
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.filterParameters = void 0;
4
+ const commons_1 = require("../../commons");
5
+ const optionParametersDefinitions = [
6
+ {
7
+ displayName: 'Activity',
8
+ name: 'filter',
9
+ parameters: [
10
+ ['Active', 'active'],
11
+ ['Inactive', 'inactive'],
12
+ ],
13
+ },
14
+ ];
15
+ const parametersDefinitions = [
16
+ ['Customer Number', 'customernumber', 'string', '', {}],
17
+ ['Name', 'name', 'string', '', {}],
18
+ ['ZIP Code', 'zipcode', 'string', '', {}],
19
+ ['City', 'city', 'string', '', {}],
20
+ ['Email', 'email', 'string', '', {}],
21
+ ['Phone', 'phone', 'string', '', {}],
22
+ ['Organisation Number', 'organisationnumber', 'string', '', {}],
23
+ ['GLN', 'gln', 'string', '', {}],
24
+ ['GLN Delivery', 'glndelivery', 'string', '', {}],
25
+ ['Last Modified', 'lastmodified', 'string', '', {}],
26
+ ];
27
+ exports.filterParameters = [
28
+ ...optionParametersDefinitions.map((option) => (0, commons_1.createOptionParameter)(option)),
29
+ ...parametersDefinitions.map(([displayName, name, filterType, defaultValue, typeOptions]) => (0, commons_1.createParameter)(displayName, name, filterType, defaultValue, typeOptions)),
30
+ ];
31
+ //# sourceMappingURL=filterParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterParameters.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/filterParameters.ts"],"names":[],"mappings":";;;AACA,2CAKuB;AAEvB,MAAM,2BAA2B,GAAgC;IAC7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X,WAAW,EACX,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,WAAW,CACd,CACR;CACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const customerProperties: INodeProperties[];
3
+ export declare function customerOperations(this: IExecuteFunctions, { operation, i }: {
4
+ operation: string;
5
+ i: number;
6
+ }): Promise<import("./model").CustomersResponse | import("./model").CustomerResponse | null>;
7
+ export * from './operations';
@@ -0,0 +1,85 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.customerProperties = void 0;
40
+ exports.customerOperations = customerOperations;
41
+ const operations = __importStar(require("./operations"));
42
+ const modules_1 = require("../../../modules");
43
+ const moduleHandler = new modules_1.N8NOperationModuleHandler([
44
+ operations.getManyCustomers,
45
+ operations.getSingleCustomer,
46
+ operations.createSingleCustomer,
47
+ operations.updateSingleCustomer,
48
+ operations.deleteSingleCustomer,
49
+ ]);
50
+ exports.customerProperties = [
51
+ {
52
+ displayName: 'Operation',
53
+ name: 'operation',
54
+ type: 'options',
55
+ noDataExpression: true,
56
+ displayOptions: {
57
+ show: {
58
+ resource: ['customer'],
59
+ },
60
+ },
61
+ options: moduleHandler.getDescriptions(),
62
+ default: 'getAll',
63
+ },
64
+ ...moduleHandler.getProperties(),
65
+ ];
66
+ async function customerOperations({ operation, i }) {
67
+ if (operation === 'get') {
68
+ return await operations.getSingleCustomer.execute.call(this, i);
69
+ }
70
+ else if (operation === 'getAll') {
71
+ return await operations.getManyCustomers.execute.call(this, i);
72
+ }
73
+ else if (operation === 'create') {
74
+ return await operations.createSingleCustomer.execute.call(this, i);
75
+ }
76
+ else if (operation === 'update') {
77
+ return await operations.updateSingleCustomer.execute.call(this, i);
78
+ }
79
+ else if (operation === 'delete') {
80
+ return await operations.deleteSingleCustomer.execute.call(this, i);
81
+ }
82
+ return null;
83
+ }
84
+ __exportStar(require("./operations"), exports);
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,gDAiBC;AA7CD,yDAA2C;AAC3C,8CAA6D;AAE7D,MAAM,aAAa,GAAG,IAAI,mCAAyB,CAAC;IAChD,UAAU,CAAC,gBAAgB;IAC3B,UAAU,CAAC,iBAAiB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AAI,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AACD,+CAA6B"}
@@ -0,0 +1,99 @@
1
+ import { ResponseModel } from '../../model';
2
+ export interface CustomerBase {
3
+ '@url': string;
4
+ Address1: string | null;
5
+ Address2: string | null;
6
+ City: string | null;
7
+ CustomerNumber: number;
8
+ Email: string | null;
9
+ Name: string;
10
+ OrganisationNumber: string;
11
+ Phone: string | null;
12
+ ZipCode: number | string | null;
13
+ }
14
+ export type DeliveryType = 'PRINT' | 'EMAIL' | 'PRINTSERVICE';
15
+ export interface DefaultDeliveryTypes {
16
+ Invoice: DeliveryType;
17
+ Order: DeliveryType;
18
+ Offer: DeliveryType;
19
+ }
20
+ export interface DefaultTemplates {
21
+ Order: string | null;
22
+ Offer: string | null;
23
+ Invoice: string | null;
24
+ CashInvoice: string | null;
25
+ }
26
+ export interface CustomerDetails {
27
+ Address1: string | null;
28
+ Address2: string | null;
29
+ City: string | null;
30
+ Country: string | null;
31
+ Comments: string | null;
32
+ Currency: string;
33
+ CostCenter: string | null;
34
+ CountryCode: string | null;
35
+ Active: boolean;
36
+ CustomerNumber: string;
37
+ DefaultDeliveryTypes: DefaultDeliveryTypes;
38
+ DefaultTemplates: DefaultTemplates;
39
+ DeliveryAddress1: string | null;
40
+ DeliveryAddress2: string | null;
41
+ DeliveryCity: string | null;
42
+ DeliveryCountry: string | null;
43
+ DeliveryCountryCode: string | null;
44
+ DeliveryFax: string | null;
45
+ DeliveryName: string | null;
46
+ DeliveryPhone1: string | null;
47
+ DeliveryPhone2: string | null;
48
+ DeliveryZipCode: string | null;
49
+ Email: string | null;
50
+ EmailInvoice: string | null;
51
+ EmailInvoiceBCC: string | null;
52
+ EmailInvoiceCC: string | null;
53
+ EmailOffer: string | null;
54
+ EmailOfferBCC: string | null;
55
+ EmailOfferCC: string | null;
56
+ EmailOrder: string | null;
57
+ EmailOrderBCC: string | null;
58
+ EmailOrderCC: string | null;
59
+ ExternalReference: string | null;
60
+ Fax: string | null;
61
+ GLN: string | null;
62
+ GLNDelivery: string | null;
63
+ InvoiceAdministrationFee: number | null;
64
+ InvoiceDiscount: number | null;
65
+ InvoiceFreight: number | null;
66
+ InvoiceRemark: string | null;
67
+ Name: string;
68
+ OrganisationNumber: string;
69
+ OurReference: string | null;
70
+ Phone1: string | null;
71
+ Phone2: string | null;
72
+ PriceList: string | null;
73
+ Project: string | null;
74
+ SalesAccount: string | null;
75
+ ShowPriceVATIncluded: boolean;
76
+ TermsOfDelivery: string | null;
77
+ TermsOfPayment: string | null;
78
+ Type: 'PRIVATE' | 'COMPANY';
79
+ VATNumber: string | null;
80
+ VATType: 'SEVAT' | 'SEREVERSEDVAT' | 'EUREVERSEDVAT' | 'EUVAT' | 'EXPORT';
81
+ VisitingAddress: string | null;
82
+ VisitingCity: string | null;
83
+ VisitingCountry: string | null;
84
+ VisitingCountryCode: string | null;
85
+ VisitingZipCode: string | null;
86
+ WayOfDelivery: string | null;
87
+ WWW: string | null;
88
+ YourReference: string | null;
89
+ ZipCode: string | null;
90
+ }
91
+ export interface Customer extends CustomerDetails {
92
+ '@url': string;
93
+ }
94
+ export interface CustomersResponse extends ResponseModel {
95
+ Customers: CustomerBase[];
96
+ }
97
+ export interface CustomerResponse {
98
+ Customer: Customer;
99
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { CustomerResponse } from '../model';
3
+ export declare const description: {
4
+ name: string;
5
+ value: string;
6
+ description: string;
7
+ action: string;
8
+ };
9
+ export declare const properties: INodeProperties[];
10
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomerResponse>;
@@ -0,0 +1,281 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const transport_1 = require("../../../transport");
7
+ const currency_codes_1 = require("currency-codes");
8
+ exports.description = {
9
+ name: 'Create Customer',
10
+ value: 'create',
11
+ description: 'Create a new customer',
12
+ action: 'Create a customer',
13
+ };
14
+ const createProperties = [
15
+ {
16
+ displayName: 'Address 1',
17
+ name: 'Address1',
18
+ type: 'string',
19
+ default: '',
20
+ description: "Customer's primary address",
21
+ },
22
+ {
23
+ displayName: 'Address 2',
24
+ name: 'Address2',
25
+ type: 'string',
26
+ default: '',
27
+ description: "Customer's secondary address",
28
+ },
29
+ {
30
+ displayName: 'City',
31
+ name: 'City',
32
+ type: 'string',
33
+ default: '',
34
+ description: "Customer's city",
35
+ },
36
+ {
37
+ displayName: 'Comments',
38
+ name: 'Comments',
39
+ type: 'string',
40
+ default: '',
41
+ description: 'Comments about the customer',
42
+ },
43
+ {
44
+ displayName: 'Cost Center',
45
+ name: 'CostCenter',
46
+ type: 'string',
47
+ default: '',
48
+ description: "Customer's cost center",
49
+ },
50
+ {
51
+ displayName: 'Country',
52
+ name: 'Country',
53
+ type: 'string',
54
+ default: '',
55
+ description: "Customer's country",
56
+ },
57
+ {
58
+ displayName: 'Country Code',
59
+ name: 'CountryCode',
60
+ type: 'string',
61
+ default: '',
62
+ description: "Customer's country code",
63
+ },
64
+ {
65
+ displayName: 'Email',
66
+ name: 'Email',
67
+ type: 'string',
68
+ default: '',
69
+ description: "Customer's email address",
70
+ },
71
+ {
72
+ displayName: 'External Reference',
73
+ name: 'ExternalReference',
74
+ type: 'string',
75
+ default: '',
76
+ description: 'External reference for the customer',
77
+ },
78
+ {
79
+ displayName: 'Fax',
80
+ name: 'Fax',
81
+ type: 'string',
82
+ default: '',
83
+ description: "Customer's fax number",
84
+ },
85
+ {
86
+ displayName: 'GLN',
87
+ name: 'GLN',
88
+ type: 'string',
89
+ default: '',
90
+ description: 'Global Location Number',
91
+ },
92
+ {
93
+ displayName: 'Organisation Number',
94
+ name: 'OrganisationNumber',
95
+ type: 'string',
96
+ default: '',
97
+ description: "Customer's organisation number",
98
+ },
99
+ {
100
+ displayName: 'Phone 1',
101
+ name: 'Phone1',
102
+ type: 'string',
103
+ default: '',
104
+ description: "Customer's primary phone number",
105
+ },
106
+ {
107
+ displayName: 'Phone 2',
108
+ name: 'Phone2',
109
+ type: 'string',
110
+ default: '',
111
+ description: "Customer's secondary phone number",
112
+ },
113
+ {
114
+ displayName: 'VAT Number',
115
+ name: 'VATNumber',
116
+ type: 'string',
117
+ default: '',
118
+ description: "Customer's VAT number",
119
+ },
120
+ {
121
+ displayName: 'Website',
122
+ name: 'WWW',
123
+ type: 'string',
124
+ default: '',
125
+ description: "Customer's website URL",
126
+ },
127
+ {
128
+ displayName: 'ZIP Code',
129
+ name: 'ZipCode',
130
+ type: 'string',
131
+ default: '',
132
+ description: "Customer's ZIP/postal code",
133
+ },
134
+ ];
135
+ exports.properties = [
136
+ {
137
+ displayName: 'Name',
138
+ name: 'Name',
139
+ type: 'string',
140
+ required: true,
141
+ default: '',
142
+ description: 'Customer name',
143
+ displayOptions: {
144
+ show: {
145
+ resource: ['customer'],
146
+ operation: ['create'],
147
+ },
148
+ },
149
+ },
150
+ {
151
+ displayName: 'Active',
152
+ name: 'Active',
153
+ type: 'boolean',
154
+ required: true,
155
+ default: true,
156
+ description: 'Whether the customer is active',
157
+ displayOptions: {
158
+ show: {
159
+ resource: ['customer'],
160
+ operation: ['create'],
161
+ },
162
+ },
163
+ },
164
+ {
165
+ displayName: 'Currency',
166
+ name: 'Currency',
167
+ type: 'string',
168
+ required: true,
169
+ default: 'SEK',
170
+ description: 'Currency',
171
+ displayOptions: {
172
+ show: {
173
+ resource: ['customer'],
174
+ operation: ['create'],
175
+ },
176
+ },
177
+ },
178
+ {
179
+ displayName: 'Type',
180
+ name: 'Type',
181
+ type: 'options',
182
+ required: true,
183
+ options: [
184
+ {
185
+ name: 'Private',
186
+ value: 'PRIVATE',
187
+ },
188
+ {
189
+ name: 'Company',
190
+ value: 'COMPANY',
191
+ },
192
+ ],
193
+ default: 'COMPANY',
194
+ description: 'Type of customer',
195
+ displayOptions: {
196
+ show: {
197
+ resource: ['customer'],
198
+ operation: ['create'],
199
+ },
200
+ },
201
+ },
202
+ {
203
+ displayName: 'VAT Type',
204
+ name: 'VATType',
205
+ type: 'options',
206
+ required: true,
207
+ options: [
208
+ {
209
+ name: 'SE VAT',
210
+ value: 'SEVAT',
211
+ },
212
+ {
213
+ name: 'SE Reversed VAT',
214
+ value: 'SEREVERSEDVAT',
215
+ },
216
+ {
217
+ name: 'EU Reversed VAT',
218
+ value: 'EUREVERSEDVAT',
219
+ },
220
+ {
221
+ name: 'EU VAT',
222
+ value: 'EUVAT',
223
+ },
224
+ {
225
+ name: 'Export',
226
+ value: 'EXPORT',
227
+ },
228
+ ],
229
+ default: 'SEVAT',
230
+ description: 'Type of VAT applied',
231
+ displayOptions: {
232
+ show: {
233
+ resource: ['customer'],
234
+ operation: ['create'],
235
+ },
236
+ },
237
+ },
238
+ {
239
+ displayName: 'Additional Fields',
240
+ name: 'additionalFields',
241
+ type: 'collection',
242
+ placeholder: 'Add Field',
243
+ default: {},
244
+ displayOptions: {
245
+ show: {
246
+ resource: ['customer'],
247
+ operation: ['create'],
248
+ },
249
+ },
250
+ options: [...createProperties],
251
+ },
252
+ ];
253
+ async function execute(i) {
254
+ const name = this.getNodeParameter('Name', i);
255
+ let currency = this.getNodeParameter('Currency', i);
256
+ currency = currency.toUpperCase();
257
+ const active = this.getNodeParameter('Active', i);
258
+ const type = this.getNodeParameter('Type', i);
259
+ const vatType = this.getNodeParameter('VATType', i);
260
+ const additionalFields = this.getNodeParameter('additionalFields', i, {});
261
+ if ((0, currency_codes_1.code)(currency) === undefined) {
262
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid currency code: ${currency}. Use ISO 4217 currency code.`);
263
+ }
264
+ const body = {
265
+ Customer: {
266
+ Name: name,
267
+ Currency: currency,
268
+ Active: active,
269
+ Type: type,
270
+ VATType: vatType,
271
+ ...additionalFields,
272
+ },
273
+ };
274
+ const endpoint = `/customers`;
275
+ return await (0, transport_1.apiRequest)(this, {
276
+ method: 'POST',
277
+ endpoint: endpoint,
278
+ body: body,
279
+ });
280
+ }
281
+ //# sourceMappingURL=create.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/create.operation.ts"],"names":[],"mappings":";;;AAoQA,0BA8CC;AAlTD,+CAKsB;AACtB,kDAAgD;AAChD,mDAAsD;AAGzC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,uBAAuB;IACpC,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEF,MAAM,gBAAgB,GAAsB;IACxC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;KAC5C;IACD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;KAC9C;IACD;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iBAAiB;KACjC;IACD;QACI,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6BAA6B;KAC7C;IACD;QACI,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,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MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: {
3
+ name: string;
4
+ value: string;
5
+ description: string;
6
+ action: string;
7
+ };
8
+ export declare const properties: INodeProperties[];
9
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<null>;