@limetech/n8n-nodes-lime 0.4.0 → 2.3.1-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 (330) hide show
  1. package/.github/workflows/lint.yml +3 -1
  2. package/.github/workflows/release.yml +2 -49
  3. package/.github/workflows/test-and-build.yml +1 -1
  4. package/.prettierignore +3 -1
  5. package/.releaserc.json +2 -1
  6. package/CHANGELOG.md +215 -0
  7. package/README.md +2 -9
  8. package/credentials/LimeCrmApi.credentials.ts +44 -7
  9. package/credentials/index.ts +2 -0
  10. package/eslint.config.mjs +2 -1
  11. package/knip.json +9 -0
  12. package/nodes/fortnox/Fortnox.node.ts +3 -3
  13. package/nodes/fortnox/FortnoxTrigger.node.ts +2 -2
  14. package/nodes/fortnox/index.ts +6 -0
  15. package/nodes/fortnox/resources/customers/index.ts +18 -22
  16. package/nodes/fortnox/resources/customers/operations/create.operation.ts +12 -8
  17. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +10 -15
  18. package/nodes/fortnox/resources/customers/operations/get.operation.ts +10 -15
  19. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +1 -2
  20. package/nodes/fortnox/resources/customers/operations/index.ts +5 -0
  21. package/nodes/fortnox/resources/customers/operations/update.operation.ts +30 -30
  22. package/nodes/fortnox/resources/invoice/index.ts +16 -18
  23. package/nodes/fortnox/resources/invoice/model.ts +0 -4
  24. package/nodes/fortnox/resources/invoice/operations/create.operation.ts +1 -2
  25. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +10 -15
  26. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +1 -2
  27. package/nodes/fortnox/resources/invoice/operations/index.ts +4 -0
  28. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +11 -16
  29. package/nodes/fortnox/transport/index.ts +14 -11
  30. package/nodes/index.ts +4 -0
  31. package/nodes/lime-crm/LimeCrmNode.node.ts +126 -69
  32. package/nodes/lime-crm/LimeCrmTrigger.node.ts +86 -53
  33. package/nodes/lime-crm/index.ts +9 -0
  34. package/nodes/lime-crm/methods/getLimetypeProperties.ts +110 -0
  35. package/nodes/lime-crm/methods/getLimetypes.ts +26 -0
  36. package/nodes/lime-crm/methods/index.ts +7 -3
  37. package/nodes/lime-crm/models/constants.ts +73 -0
  38. package/nodes/lime-crm/models/index.ts +21 -0
  39. package/nodes/lime-crm/models/limeobject.ts +13 -0
  40. package/nodes/lime-crm/models/limetype.ts +47 -0
  41. package/nodes/lime-crm/models/propertyTypes.ts +13 -0
  42. package/nodes/lime-crm/models/users.ts +46 -0
  43. package/nodes/lime-crm/models/webhook.ts +61 -0
  44. package/nodes/lime-crm/resources/admin/index.ts +89 -0
  45. package/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.ts +166 -0
  46. package/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.ts +113 -0
  47. package/nodes/lime-crm/resources/admin/operations/index.ts +8 -0
  48. package/nodes/lime-crm/resources/data/index.ts +117 -0
  49. package/nodes/lime-crm/resources/data/operations/createSingleObject.operation.ts +231 -0
  50. package/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.ts +83 -0
  51. package/nodes/lime-crm/resources/data/operations/getManyObjects.operation.ts +499 -0
  52. package/nodes/lime-crm/resources/data/operations/getSingleFile.operation.ts +162 -0
  53. package/nodes/lime-crm/resources/data/operations/getSingleObject.operation.ts +116 -0
  54. package/nodes/lime-crm/resources/data/operations/index.ts +24 -0
  55. package/nodes/lime-crm/resources/{limeObject/operations/update.operation.ts → data/operations/updateSingleObject.operation.ts} +91 -25
  56. package/nodes/lime-crm/resources/metadata/index.ts +97 -0
  57. package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +28 -0
  58. package/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.ts +147 -0
  59. package/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.ts +58 -0
  60. package/nodes/lime-crm/resources/metadata/operations/index.ts +12 -0
  61. package/nodes/lime-crm/transport/commons.ts +97 -27
  62. package/nodes/lime-crm/transport/files.ts +220 -0
  63. package/nodes/lime-crm/transport/index.ts +38 -13
  64. package/nodes/lime-crm/transport/limeQuery.ts +44 -10
  65. package/nodes/lime-crm/transport/limeobjects.ts +126 -168
  66. package/nodes/lime-crm/transport/limetypes.ts +169 -57
  67. package/nodes/lime-crm/transport/users.ts +264 -0
  68. package/nodes/lime-crm/transport/webhooks.ts +96 -37
  69. package/nodes/lime-crm/utils/files.ts +198 -0
  70. package/nodes/lime-crm/utils/hmac.ts +35 -0
  71. package/nodes/lime-crm/utils/index.ts +10 -0
  72. package/nodes/lime-crm/utils/propertyAdapters.ts +75 -0
  73. package/nodes/lime-crm/utils/webhook.ts +81 -0
  74. package/nodes/modules.ts +44 -0
  75. package/nodes/response.ts +16 -0
  76. package/package.json +21 -29
  77. package/restore_script/README +42 -0
  78. package/restore_script/api_key_download.txt +0 -0
  79. package/restore_script/api_key_upload.txt +0 -0
  80. package/restore_script/cli.py +73 -0
  81. package/restore_script/download.py +73 -0
  82. package/restore_script/main.py +19 -0
  83. package/restore_script/poetry.lock +162 -0
  84. package/restore_script/pyproject.toml +15 -0
  85. package/restore_script/transfer.py +41 -0
  86. package/restore_script/upload.py +66 -0
  87. package/restore_script/utils.py +42 -0
  88. package/tests/nodes/lime-crm/utils.spec.ts +238 -0
  89. package/typedoc.css +9 -0
  90. package/typedoc.json +19 -0
  91. package/.dockerignore +0 -1
  92. package/Dockerfile +0 -21
  93. package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
  94. package/dist/credentials/FortnoxApi.credentials.js +0 -57
  95. package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
  96. package/dist/credentials/LimeCrmApi.credentials.d.ts +0 -9
  97. package/dist/credentials/LimeCrmApi.credentials.js +0 -66
  98. package/dist/credentials/LimeCrmApi.credentials.js.map +0 -1
  99. package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
  100. package/dist/nodes/fortnox/Fortnox.node.js +0 -95
  101. package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
  102. package/dist/nodes/fortnox/Fortnox.node.json +0 -18
  103. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
  104. package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
  105. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
  106. package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  107. package/dist/nodes/fortnox/commons.d.ts +0 -25
  108. package/dist/nodes/fortnox/commons.js +0 -44
  109. package/dist/nodes/fortnox/commons.js.map +0 -1
  110. package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
  111. package/dist/nodes/fortnox/model.d.ts +0 -20
  112. package/dist/nodes/fortnox/model.js +0 -3
  113. package/dist/nodes/fortnox/model.js.map +0 -1
  114. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
  115. package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
  116. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
  117. package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -20
  118. package/dist/nodes/fortnox/resources/customers/index.js +0 -87
  119. package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
  120. package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
  121. package/dist/nodes/fortnox/resources/customers/model.js +0 -3
  122. package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
  123. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -12
  124. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -283
  125. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
  126. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -10
  127. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -45
  128. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
  129. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -11
  130. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -45
  131. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
  132. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -11
  133. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
  134. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
  135. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -12
  136. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -276
  137. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
  138. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
  139. package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
  140. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
  141. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
  142. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
  143. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
  144. package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -20
  145. package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
  146. package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
  147. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
  148. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
  149. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
  150. package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -150
  151. package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
  152. package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
  153. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -11
  154. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
  155. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
  156. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -11
  157. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -44
  158. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
  159. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -11
  160. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
  161. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
  162. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -11
  163. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -71
  164. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
  165. package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
  166. package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
  167. package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
  168. package/dist/nodes/fortnox/transport/index.d.ts +0 -4
  169. package/dist/nodes/fortnox/transport/index.js +0 -77
  170. package/dist/nodes/fortnox/transport/index.js.map +0 -1
  171. package/dist/nodes/lime-crm/LimeCrm.node.json +0 -18
  172. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +0 -14
  173. package/dist/nodes/lime-crm/LimeCrmNode.node.js +0 -126
  174. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +0 -1
  175. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +0 -18
  176. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +0 -215
  177. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +0 -1
  178. package/dist/nodes/lime-crm/assets/lime-crm.svg +0 -1
  179. package/dist/nodes/lime-crm/commons/constants.d.ts +0 -5
  180. package/dist/nodes/lime-crm/commons/constants.js +0 -9
  181. package/dist/nodes/lime-crm/commons/constants.js.map +0 -1
  182. package/dist/nodes/lime-crm/commons/hmac.d.ts +0 -1
  183. package/dist/nodes/lime-crm/commons/hmac.js +0 -11
  184. package/dist/nodes/lime-crm/commons/hmac.js.map +0 -1
  185. package/dist/nodes/lime-crm/commons/index.d.ts +0 -3
  186. package/dist/nodes/lime-crm/commons/index.js +0 -12
  187. package/dist/nodes/lime-crm/commons/index.js.map +0 -1
  188. package/dist/nodes/lime-crm/commons/limetype.d.ts +0 -10
  189. package/dist/nodes/lime-crm/commons/limetype.js +0 -3
  190. package/dist/nodes/lime-crm/commons/limetype.js.map +0 -1
  191. package/dist/nodes/lime-crm/commons/task.d.ts +0 -14
  192. package/dist/nodes/lime-crm/commons/task.js +0 -48
  193. package/dist/nodes/lime-crm/commons/task.js.map +0 -1
  194. package/dist/nodes/lime-crm/commons/webhook.d.ts +0 -20
  195. package/dist/nodes/lime-crm/commons/webhook.js +0 -30
  196. package/dist/nodes/lime-crm/commons/webhook.js.map +0 -1
  197. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +0 -5
  198. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +0 -11
  199. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +0 -1
  200. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +0 -2
  201. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +0 -20
  202. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +0 -1
  203. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +0 -2
  204. package/dist/nodes/lime-crm/methods/getLimeTypes.js +0 -20
  205. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +0 -1
  206. package/dist/nodes/lime-crm/methods/index.d.ts +0 -3
  207. package/dist/nodes/lime-crm/methods/index.js +0 -10
  208. package/dist/nodes/lime-crm/methods/index.js.map +0 -1
  209. package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +0 -23
  210. package/dist/nodes/lime-crm/resources/erpConnector/index.js +0 -67
  211. package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +0 -1
  212. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +0 -26
  213. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +0 -65
  214. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +0 -1
  215. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +0 -9
  216. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +0 -220
  217. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +0 -1
  218. package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +0 -15
  219. package/dist/nodes/lime-crm/resources/erpConnector/transform.js +0 -11
  220. package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +0 -1
  221. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +0 -4
  222. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +0 -7
  223. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +0 -1
  224. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +0 -37
  225. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +0 -124
  226. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +0 -1
  227. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +0 -1
  228. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +0 -6
  229. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +0 -1
  230. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +0 -14
  231. package/dist/nodes/lime-crm/resources/limeObject/index.js +0 -88
  232. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +0 -1
  233. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +0 -9
  234. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +0 -139
  235. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +0 -1
  236. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +0 -9
  237. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +0 -51
  238. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +0 -1
  239. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.d.ts +0 -9
  240. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js +0 -103
  241. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js.map +0 -1
  242. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +0 -9
  243. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +0 -51
  244. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +0 -1
  245. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +0 -9
  246. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +0 -103
  247. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +0 -1
  248. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +0 -9
  249. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +0 -149
  250. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +0 -1
  251. package/dist/nodes/lime-crm/resources/limeQuery/index.d.ts +0 -6
  252. package/dist/nodes/lime-crm/resources/limeQuery/index.js +0 -66
  253. package/dist/nodes/lime-crm/resources/limeQuery/index.js.map +0 -1
  254. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.d.ts +0 -9
  255. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js +0 -191
  256. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js.map +0 -1
  257. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +0 -20
  258. package/dist/nodes/lime-crm/resources/limeType/index.js +0 -81
  259. package/dist/nodes/lime-crm/resources/limeType/index.js.map +0 -1
  260. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +0 -11
  261. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +0 -36
  262. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +0 -1
  263. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +0 -9
  264. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +0 -36
  265. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +0 -1
  266. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +0 -10
  267. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +0 -15
  268. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +0 -1
  269. package/dist/nodes/lime-crm/transport/commons.d.ts +0 -5
  270. package/dist/nodes/lime-crm/transport/commons.js +0 -33
  271. package/dist/nodes/lime-crm/transport/commons.js.map +0 -1
  272. package/dist/nodes/lime-crm/transport/erpConnector.d.ts +0 -9
  273. package/dist/nodes/lime-crm/transport/erpConnector.js +0 -11
  274. package/dist/nodes/lime-crm/transport/erpConnector.js.map +0 -1
  275. package/dist/nodes/lime-crm/transport/index.d.ts +0 -6
  276. package/dist/nodes/lime-crm/transport/index.js +0 -24
  277. package/dist/nodes/lime-crm/transport/index.js.map +0 -1
  278. package/dist/nodes/lime-crm/transport/limeQuery.d.ts +0 -10
  279. package/dist/nodes/lime-crm/transport/limeQuery.js +0 -15
  280. package/dist/nodes/lime-crm/transport/limeQuery.js.map +0 -1
  281. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +0 -7
  282. package/dist/nodes/lime-crm/transport/limeobjects.js +0 -134
  283. package/dist/nodes/lime-crm/transport/limeobjects.js.map +0 -1
  284. package/dist/nodes/lime-crm/transport/limetypes.d.ts +0 -6
  285. package/dist/nodes/lime-crm/transport/limetypes.js +0 -54
  286. package/dist/nodes/lime-crm/transport/limetypes.js.map +0 -1
  287. package/dist/nodes/lime-crm/transport/task.d.ts +0 -13
  288. package/dist/nodes/lime-crm/transport/task.js +0 -13
  289. package/dist/nodes/lime-crm/transport/task.js.map +0 -1
  290. package/dist/nodes/lime-crm/transport/webhooks.d.ts +0 -16
  291. package/dist/nodes/lime-crm/transport/webhooks.js +0 -43
  292. package/dist/nodes/lime-crm/transport/webhooks.js.map +0 -1
  293. package/dist/nodes/nodeResponse.d.ts +0 -12
  294. package/dist/nodes/nodeResponse.js +0 -3
  295. package/dist/nodes/nodeResponse.js.map +0 -1
  296. package/dist/package.json +0 -75
  297. package/dist/tsconfig.tsbuildinfo +0 -1
  298. package/docker-compose.yml +0 -46
  299. package/nodes/lime-crm/commons/constants.ts +0 -10
  300. package/nodes/lime-crm/commons/hmac.ts +0 -13
  301. package/nodes/lime-crm/commons/index.ts +0 -10
  302. package/nodes/lime-crm/commons/limetype.ts +0 -11
  303. package/nodes/lime-crm/commons/task.ts +0 -55
  304. package/nodes/lime-crm/commons/webhook.ts +0 -56
  305. package/nodes/lime-crm/methods/getEntitiesForErpSystem.ts +0 -11
  306. package/nodes/lime-crm/methods/getLimeTypeProperties.ts +0 -27
  307. package/nodes/lime-crm/methods/getLimeTypes.ts +0 -23
  308. package/nodes/lime-crm/resources/erpConnector/index.ts +0 -43
  309. package/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.ts +0 -69
  310. package/nodes/lime-crm/resources/erpConnector/operations/transform.operation.ts +0 -274
  311. package/nodes/lime-crm/resources/erpConnector/transform.ts +0 -49
  312. package/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.ts +0 -18
  313. package/nodes/lime-crm/resources/erpConnector/transformers/fortnox.ts +0 -201
  314. package/nodes/lime-crm/resources/erpConnector/transformers/index.ts +0 -1
  315. package/nodes/lime-crm/resources/limeObject/index.ts +0 -64
  316. package/nodes/lime-crm/resources/limeObject/operations/create.operation.ts +0 -152
  317. package/nodes/lime-crm/resources/limeObject/operations/delete.operation.ts +0 -55
  318. package/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.ts +0 -112
  319. package/nodes/lime-crm/resources/limeObject/operations/get.operation.ts +0 -54
  320. package/nodes/lime-crm/resources/limeQuery/index.ts +0 -40
  321. package/nodes/lime-crm/resources/limeQuery/operations/query.operation.ts +0 -222
  322. package/nodes/lime-crm/resources/limeType/index.ts +0 -58
  323. package/nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts +0 -42
  324. package/nodes/lime-crm/resources/limeType/operations/getType.operation.ts +0 -36
  325. package/nodes/lime-crm/resources/limeType/operations/listTypes.operation.ts +0 -18
  326. package/nodes/lime-crm/transport/erpConnector.ts +0 -21
  327. package/nodes/lime-crm/transport/task.ts +0 -32
  328. package/nodes/nodeResponse.ts +0 -13
  329. package/tests/fixtures/fortnox.ts +0 -182
  330. package/tests/transform.spec.ts +0 -187
@@ -13,9 +13,11 @@ jobs:
13
13
  - uses: actions/checkout@v4
14
14
  - uses: actions/setup-node@v4
15
15
  with:
16
- node-version: 21
16
+ node-version: 24
17
17
  - run: npm ci
18
18
  - name: Run eslint
19
19
  run: npm run lint
20
20
  - name: Run prettier
21
21
  run: npm run format
22
+ - name: Run knip
23
+ run: npm run knip
@@ -19,7 +19,7 @@ jobs:
19
19
 
20
20
  - uses: actions/setup-node@v3
21
21
  with:
22
- node-version: 21
22
+ node-version: 24
23
23
 
24
24
  - run: npm ci
25
25
 
@@ -32,51 +32,4 @@ jobs:
32
32
  echo "version=$VERSION" >> $GITHUB_OUTPUT
33
33
  env:
34
34
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
-
36
- push-to-ecr:
37
- name: Push images to ECR
38
- runs-on: ubuntu-latest
39
- needs: release
40
- permissions:
41
- id-token: write
42
- contents: read
43
- steps:
44
- - name: Checkout repository
45
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
46
-
47
- - name: Set up Docker Buildx
48
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1
49
-
50
- - name: Configure AWS credentials
51
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a #v4.3.1
52
- with:
53
- role-to-assume: ${{ secrets.AWS_ECR_PUSH_ROLE_SHARED_ACCOUNT_ARN }}
54
- role-session-name: GitHubActions-ECR-Push
55
- aws-region: ${{ secrets.AWS_REGION_SHARED }}
56
-
57
- - name: Login to Amazon ECR
58
- id: login-ecr
59
- uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 #v2.0.1
60
-
61
- - name: Create ECR repository if it does not exist
62
- shell: bash
63
- run: |
64
- if [ -z "$(aws ecr describe-repositories --repository-names lime-cloud-n8n)" ]; then
65
- aws ecr create-repository --repository-name lime-cloud-n8n
66
- fi
67
-
68
- - name: Set environment variables
69
- id: vars
70
- run: |
71
- echo "ECR_REPO=lime-cloud-n8n" >> $GITHUB_ENV
72
- echo "ECR_URI=${{ steps.login-ecr.outputs.registry }}/lime-cloud-n8n" >> $GITHUB_ENV
73
- echo "IMAGE_TAG=${{ needs.release.outputs.version }}" >> $GITHUB_ENV
74
-
75
- - name: Build Docker image
76
- run: |
77
- docker build -t $ECR_URI:$IMAGE_TAG .
78
-
79
- - name: Push Docker image to ECR
80
- run: |
81
- echo "Pushing image to: $ECR_URI:$IMAGE_TAG"
82
- docker push $ECR_URI:$IMAGE_TAG
35
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -20,7 +20,7 @@ jobs:
20
20
  - name: Set up Node.js
21
21
  uses: actions/setup-node@v3
22
22
  with:
23
- node-version: 21
23
+ node-version: 24
24
24
 
25
25
  - name: Install dependencies
26
26
  run: npm install
package/.prettierignore CHANGED
@@ -1,4 +1,6 @@
1
1
  dist/
2
2
  node_modules/
3
+ restore_script/
3
4
  package-lock.json
4
- CHANGELOG.md
5
+ CHANGELOG.md
6
+ README
package/.releaserc.json CHANGED
@@ -29,6 +29,7 @@
29
29
  "__note": "DO NOT CHANGE - this command is used in Release action"
30
30
  }
31
31
  ],
32
- "@semantic-release/github"
32
+ "@semantic-release/github",
33
+ "@semantic-release/npm"
33
34
  ]
34
35
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,218 @@
1
+ ## [2.3.1-dev.1](https://github.com/Lundalogik/lime-n8n/compare/v2.3.0...v2.3.1-dev.1) (2025-12-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * create an npm package out of repo ([ec68ddc](https://github.com/Lundalogik/lime-n8n/commit/ec68ddc0fa6c5bf0e9b4302877c1fe64599ea01a))
7
+
8
+ # [2.3.0](https://github.com/Lundalogik/lime-n8n/compare/v2.2.0...v2.3.0) (2025-11-21)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * remove dangerous triggers ([6116763](https://github.com/Lundalogik/lime-n8n/commit/611676364fa1b4e25b97add808f7e7a6d292c9ab))
14
+
15
+
16
+ ### Features
17
+
18
+ * add module handler to simplify module operations in main resource files ([1c7e54b](https://github.com/Lundalogik/lime-n8n/commit/1c7e54b1c1603039d2c16c58b445def98560bd21))
19
+
20
+ # [2.2.0](https://github.com/Lundalogik/lime-n8n/compare/v2.1.0...v2.2.0) (2025-11-21)
21
+
22
+
23
+ ### Features
24
+
25
+ * **LimeCRM data:** Return limetype properties with database names ([d7f6d38](https://github.com/Lundalogik/lime-n8n/commit/d7f6d380f94a7b1c6e82d6410a0028da1b389064))
26
+ * **LimeCRM data:** Return limetypes with database names ([57c6e01](https://github.com/Lundalogik/lime-n8n/commit/57c6e01ec18096fed23077392cb5ec9ba3c8b4d5))
27
+
28
+ # [2.1.0](https://github.com/Lundalogik/lime-n8n/compare/v2.0.0...v2.1.0) (2025-11-21)
29
+
30
+
31
+ ### Features
32
+
33
+ * **UserNode:** Get user by related limeobject id ([a0726de](https://github.com/Lundalogik/lime-n8n/commit/a0726de32eb3833fcb88afe8817fcf77e59dbcd0))
34
+ * **UserNode:** Return multiple items with a single user ([a5cb2f2](https://github.com/Lundalogik/lime-n8n/commit/a5cb2f2646a313042cb534bac50a2f55e0daf5a7))
35
+ * **UserNode:** Return multiple users with or without related coworker ([c2ccbe2](https://github.com/Lundalogik/lime-n8n/commit/c2ccbe2c95bd3e872e35a93dc236e88d3c8cdd73))
36
+ * **UserNode:** Return single user with or without related coworker ([d88227a](https://github.com/Lundalogik/lime-n8n/commit/d88227abca12bd70c192a173e633da73e41489a1))
37
+ * **UserNodes:** Move user nodes under Admin resource ([971ff7c](https://github.com/Lundalogik/lime-n8n/commit/971ff7c7fe2359568a4ce0828381d170e91dc418))
38
+
39
+ # [2.0.0](https://github.com/Lundalogik/lime-n8n/compare/v1.19.0...v2.0.0) (2025-11-20)
40
+
41
+
42
+ ### Features
43
+
44
+ * remove NodeResponse ([3a4293a](https://github.com/Lundalogik/lime-n8n/commit/3a4293afae5a5197e80d2b04c9432c6ab43d3f9e))
45
+
46
+
47
+ ### BREAKING CHANGES
48
+
49
+ * success flag is removed
50
+
51
+ # [1.19.0](https://github.com/Lundalogik/lime-n8n/compare/v1.18.2...v1.19.0) (2025-11-14)
52
+
53
+
54
+ ### Features
55
+
56
+ * **QueryNode:** Return multiple items with a single object ([b080e0e](https://github.com/Lundalogik/lime-n8n/commit/b080e0e2598c250cf3a53e35633913dfd3605de3))
57
+
58
+ ## [1.18.2](https://github.com/Lundalogik/lime-n8n/compare/v1.18.1...v1.18.2) (2025-11-13)
59
+
60
+
61
+ ### Bug Fixes
62
+
63
+ * fix package.lock main file ([5942075](https://github.com/Lundalogik/lime-n8n/commit/5942075cb876265e2ff862ac76cd3e12679f5336))
64
+
65
+ ## [1.18.1](https://github.com/Lundalogik/lime-n8n/compare/v1.18.0...v1.18.1) (2025-11-13)
66
+
67
+
68
+ ### Bug Fixes
69
+
70
+ * **lime-crm:** exclude hasmany proeprties from create and update nodes ([0e9f171](https://github.com/Lundalogik/lime-n8n/commit/0e9f171ee4b39059aad714f9505267ef6e3a9be2))
71
+
72
+ # [1.18.0](https://github.com/Lundalogik/lime-n8n/compare/v1.17.1...v1.18.0) (2025-11-13)
73
+
74
+
75
+ ### Features
76
+
77
+ * add knip ([10f4541](https://github.com/Lundalogik/lime-n8n/commit/10f4541b8e42e6454faecdeee54c8f05c2a5b6fd))
78
+ * add knip to CI ([9579d1f](https://github.com/Lundalogik/lime-n8n/commit/9579d1f9b99c0daa68c1709e312cc7c82b8fff08))
79
+
80
+ ## [1.17.1](https://github.com/Lundalogik/lime-n8n/compare/v1.17.0...v1.17.1) (2025-11-12)
81
+
82
+
83
+ ### Bug Fixes
84
+
85
+ * **lime-crm:** remove unused arguments and async from getFilePropertiesNames ([5f74ac3](https://github.com/Lundalogik/lime-n8n/commit/5f74ac3e86340df7facd4c8c1996fdb043da52e0))
86
+
87
+ # [1.17.0](https://github.com/Lundalogik/lime-n8n/compare/v1.16.1...v1.17.0) (2025-11-12)
88
+
89
+
90
+ ### Features
91
+
92
+ * update n8n ([d147c31](https://github.com/Lundalogik/lime-n8n/commit/d147c31dc85162061398834dfd13cf7908ed2fb4))
93
+
94
+ ## [1.16.1](https://github.com/Lundalogik/lime-n8n/compare/v1.16.0...v1.16.1) (2025-11-12)
95
+
96
+
97
+ ### Bug Fixes
98
+
99
+ * add property adapters and logic for boolean fields ([c6c6d93](https://github.com/Lundalogik/lime-n8n/commit/c6c6d93dae035877a3defbdda0782155fa8a7e8a))
100
+
101
+ # [1.16.0](https://github.com/Lundalogik/lime-n8n/compare/v1.15.0...v1.16.0) (2025-11-07)
102
+
103
+
104
+ ### Features
105
+
106
+ * **lime-crm:** make `LimeCrmNode` AI Agent tool compatible ([1bd4df7](https://github.com/Lundalogik/lime-n8n/commit/1bd4df70b5399a7e35525eae8b8028f667ce1990))
107
+
108
+ # [1.15.0](https://github.com/Lundalogik/lime-n8n/compare/v1.14.1...v1.15.0) (2025-11-07)
109
+
110
+
111
+ ### Features
112
+
113
+ * add get many users node ([f9978e6](https://github.com/Lundalogik/lime-n8n/commit/f9978e62f8db3d9236ae6b0cfab16c314ab29f7d))
114
+ * get single user node ([af91b02](https://github.com/Lundalogik/lime-n8n/commit/af91b02b7977333973dc0624219c7539724f4103))
115
+
116
+ ## [1.14.1](https://github.com/Lundalogik/lime-n8n/compare/v1.14.0...v1.14.1) (2025-11-06)
117
+
118
+
119
+ ### Bug Fixes
120
+
121
+ * **lime-crm:** return `NodeResponse` from the `Get Single File Metadata` node ([b1158df](https://github.com/Lundalogik/lime-n8n/commit/b1158df9742c12d14c38f6fdb07afac59cfc0537))
122
+
123
+ # [1.14.0](https://github.com/Lundalogik/lime-n8n/compare/v1.13.0...v1.14.0) (2025-10-29)
124
+
125
+
126
+ ### Features
127
+
128
+ * **LimeCrm:** Add property option selection on Order by field ([88e283a](https://github.com/Lundalogik/lime-n8n/commit/88e283af52cfced9396e29bf8b14254f0aacd83d))
129
+ * **LimeCrm:** Add selection between form fields and json input to Order By field ([0c31e7a](https://github.com/Lundalogik/lime-n8n/commit/0c31e7af84b1d82fb952a0a6921bf923b8fdca00))
130
+ * **LimeCrm:** Fetch Limeobjects in batches ([72e3535](https://github.com/Lundalogik/lime-n8n/commit/72e3535fc7455724cc4da9b5e55bebfbbd7bd47e))
131
+ * **LimeCrm:** Remove Active Object field ([f6e7bd5](https://github.com/Lundalogik/lime-n8n/commit/f6e7bd5db44e129fc755f6f0561e292ddc2a1c88))
132
+ * **LimeCrm:** Remove Active Object field ([73de594](https://github.com/Lundalogik/lime-n8n/commit/73de5947a83c7722ca9e48ba6f4ef92d9af0c5a8))
133
+ * **LimeCrm:** Switch between code and UI response format build ([f440439](https://github.com/Lundalogik/lime-n8n/commit/f4404396e2db2c92a8570f5e53d729f0f0205215))
134
+
135
+ # [1.13.0](https://github.com/Lundalogik/lime-n8n/compare/v1.12.0...v1.13.0) (2025-10-29)
136
+
137
+
138
+ ### Features
139
+
140
+ * **lime-crm:** return file content and file metadata ([7bdbb8d](https://github.com/Lundalogik/lime-n8n/commit/7bdbb8d142ffb897855b49fc15165ad71c54cb01))
141
+ * **lime-crm:** show file properties only ([fa6442f](https://github.com/Lundalogik/lime-n8n/commit/fa6442fad0f0e79d92d41b022caf185cc01fe26b))
142
+
143
+ # [1.12.0](https://github.com/Lundalogik/lime-n8n/compare/v1.11.1...v1.12.0) (2025-10-29)
144
+
145
+
146
+ ### Features
147
+
148
+ * add env variables to display logs in console ([601883b](https://github.com/Lundalogik/lime-n8n/commit/601883b6a74187e188c4294b5c0fc860850f34cf))
149
+
150
+ ## [1.11.1](https://github.com/Lundalogik/lime-n8n/compare/v1.11.0...v1.11.1) (2025-10-27)
151
+
152
+
153
+ ### Bug Fixes
154
+
155
+ * **lime-crm:** return file as binary ([671389c](https://github.com/Lundalogik/lime-n8n/commit/671389ca47d1054dd81a33d84d18e4e97b7fe583))
156
+
157
+ # [1.11.0](https://github.com/Lundalogik/lime-n8n/compare/v1.10.2...v1.11.0) (2025-10-24)
158
+
159
+
160
+ ### Features
161
+
162
+ * add script to restore workflows from n8n instance ([ec107b3](https://github.com/Lundalogik/lime-n8n/commit/ec107b34592e6b49cf9e3e1438f7dc5d7cd89515))
163
+
164
+ ## [1.10.2](https://github.com/Lundalogik/lime-n8n/compare/v1.10.1...v1.10.2) (2025-10-24)
165
+
166
+
167
+ ### Bug Fixes
168
+
169
+ * hide ERP connector nodes ([b582ecc](https://github.com/Lundalogik/lime-n8n/commit/b582eccef29f3e6299a27964c7247bf150747d51))
170
+
171
+ ## [1.10.1](https://github.com/Lundalogik/lime-n8n/compare/v1.10.0...v1.10.1) (2025-10-23)
172
+
173
+
174
+ ### Bug Fixes
175
+
176
+ * **credentials:** fix papercuts in the credential dialog ([dd0f8fd](https://github.com/Lundalogik/lime-n8n/commit/dd0f8fde121ead202a340b6038279cd8f2e11170))
177
+
178
+ # [1.10.0](https://github.com/Lundalogik/lime-n8n/compare/v1.9.0...v1.10.0) (2025-10-23)
179
+
180
+
181
+ ### Features
182
+
183
+ * **lime-crm:** create limeobject with file ([f82e3cc](https://github.com/Lundalogik/lime-n8n/commit/f82e3ccbb6e63c18bf138f66974697b25a868ffc))
184
+
185
+ # [1.9.0](https://github.com/Lundalogik/lime-n8n/compare/v1.8.3...v1.9.0) (2025-10-22)
186
+
187
+
188
+ ### Features
189
+
190
+ * **limeFile:** get file context ([9c74c09](https://github.com/Lundalogik/lime-n8n/commit/9c74c091f4d80a7f704174944f193abc9696d5f2))
191
+ * **limeFile:** get file metadata ([53ca6d6](https://github.com/Lundalogik/lime-n8n/commit/53ca6d6528e98b2d96427d92106106efb9cfba67))
192
+
193
+ ## [1.8.3](https://github.com/Lundalogik/lime-n8n/compare/v1.8.2...v1.8.3) (2025-10-16)
194
+
195
+
196
+ ### Bug Fixes
197
+
198
+ * update n8n-workflow version ([c6ef87f](https://github.com/Lundalogik/lime-n8n/commit/c6ef87f5a783c172650a90d281f5051e7b8d9d59))
199
+
200
+ ## [1.8.2](https://github.com/Lundalogik/lime-n8n/compare/v1.8.1...v1.8.2) (2025-10-13)
201
+
202
+
203
+ ### Bug Fixes
204
+
205
+ * **lime-crm:** add fallbackValue to limit and offset parameters ([ab5ea07](https://github.com/Lundalogik/lime-n8n/commit/ab5ea07df63d8d239a959b764a0865b07e32117c))
206
+
207
+ ## [1.8.1](https://github.com/Lundalogik/lime-n8n/compare/v1.8.0...v1.8.1) (2025-10-10)
208
+
209
+
210
+ ### Bug Fixes
211
+
212
+ * remove _links from limeobjects ([6b98b70](https://github.com/Lundalogik/lime-n8n/commit/6b98b7005035633389995d2e428f7a33dbfc1200))
213
+ * remove _links from limetypes ([54b7598](https://github.com/Lundalogik/lime-n8n/commit/54b75983a59d9ff3d3b85f313bdc3b61c2ec1af1))
214
+ * use localnames in limetype dropdown ([239dc79](https://github.com/Lundalogik/lime-n8n/commit/239dc792482d1c049f9b46781a24a41031bfd22e))
215
+
1
216
  # [1.8.0](https://github.com/Lundalogik/lime-n8n/compare/v1.7.2...v1.8.0) (2025-10-10)
2
217
 
3
218
 
package/README.md CHANGED
@@ -9,14 +9,7 @@ This repository contains configuration to run n8n locally using Docker.
9
9
 
10
10
  ## Getting Started
11
11
 
12
- 1. Build nodes
13
-
14
- ```bash
15
- npm i
16
- npm run build
17
- ```
18
-
19
- 2. Start n8n and PostgreSQL:
12
+ 1. Start n8n and PostgreSQL:
20
13
 
21
14
  ```bash
22
15
  docker-compose up -d
@@ -75,7 +68,7 @@ docker-compose restart n8n
75
68
 
76
69
  ### Creating a New Custom Node
77
70
 
78
- 1. Create a new directory in the `custom-nodes` directory
71
+ 1. Create a new directory in the `nodes` directory
79
72
  2. Add your node's TypeScript files and package.json
80
73
  3. Build the nodes using the build script
81
74
  4. Restart n8n
@@ -5,9 +5,47 @@ import {
5
5
  IAuthenticate,
6
6
  ICredentialTestRequest,
7
7
  } from 'n8n-workflow';
8
+ import crypto from 'node:crypto';
8
9
 
9
- import { LIME_CRM_API_CREDENTIAL_KEY } from '../nodes/lime-crm/commons';
10
+ import { LIME_CRM_API_CREDENTIAL_KEY } from '../nodes';
10
11
 
12
+ /**
13
+ * LimeCrmApi Credential
14
+ * ---------------------
15
+ * This credential type allows n8n nodes to authenticate and interact with the Lime CRM API.
16
+ *
17
+ * ## Authentication
18
+ * The Lime CRM API uses a custom header (`X-API-Key`) for authentication. Once configured,
19
+ * n8n automatically injects the API key into all HTTP requests made using this credential.
20
+ *
21
+ * **Header used:**
22
+ * ```
23
+ * X-API-Key: <your-api-key>
24
+ * ```
25
+ *
26
+ * ## Required Fields
27
+ * - **Server URL:** The base URL of your Lime CRM instance.
28
+ * - Example: `https://instance.lime-crm.com/instance-name`
29
+ *
30
+ * - **API Key:** The API key generated in Lime CRM.
31
+ * - You can obtain it from Lime Admin.
32
+ *
33
+ * ## Additional Fields
34
+ * - **Webhook Secret:** A hidden, automatically generated secret (32-byte hex string) used to
35
+ * authenticate incoming webhook requests between Lime CRM and n8n. This ensures secure event
36
+ * communication.
37
+ *
38
+ * ## Testing Connection
39
+ * The `test` property verifies credentials by sending a `GET` request to the `/api/v1/` endpoint
40
+ * of the provided Lime CRM instance. If the response is successful (HTTP 200), the credentials
41
+ * are valid.
42
+ *
43
+ * ## Related Documentation
44
+ * - Lime CRM API Docs: https://lime-crm.com/api-docs/
45
+ * - n8n Credentials Guide: https://docs.n8n.io/integrations/credentials/
46
+ *
47
+ * @public
48
+ */
11
49
  export class LimeCrmApi implements ICredentialType {
12
50
  name = LIME_CRM_API_CREDENTIAL_KEY;
13
51
  displayName = 'Lime CRM API';
@@ -18,10 +56,9 @@ export class LimeCrmApi implements ICredentialType {
18
56
  name: 'url',
19
57
  type: 'string',
20
58
  default: '',
21
- placeholder: 'https://instance.lime-crm.com',
59
+ placeholder: 'https://instance.lime-crm.com/instance-name',
22
60
  required: true,
23
- description:
24
- 'The URL of your Lime CRM instance (without trailing slash)',
61
+ description: 'The URL of your Lime CRM instance',
25
62
  },
26
63
  {
27
64
  displayName: 'API Key',
@@ -37,11 +74,11 @@ export class LimeCrmApi implements ICredentialType {
37
74
  {
38
75
  displayName: 'Webhook secret',
39
76
  name: 'webhookSecret',
40
- type: 'string',
77
+ type: 'hidden',
41
78
  typeOptions: {
42
79
  password: true,
43
80
  },
44
- default: '',
81
+ default: crypto.randomBytes(32).toString('hex'),
45
82
  required: false,
46
83
  description:
47
84
  'A secret to authenticate webhook used in communication' +
@@ -61,7 +98,7 @@ export class LimeCrmApi implements ICredentialType {
61
98
 
62
99
  test: ICredentialTestRequest = {
63
100
  request: {
64
- baseURL: '={{$credentials.url}}',
101
+ baseURL: '={{$credentials.url}}'.replace('/+$', ''),
65
102
  url: '/api/v1/',
66
103
  method: 'GET' as IHttpRequestMethods,
67
104
  headers: {
@@ -0,0 +1,2 @@
1
+ export * from './LimeCrmApi.credentials';
2
+ export * from './FortnoxApi.credentials';
package/eslint.config.mjs CHANGED
@@ -10,6 +10,7 @@ export default [
10
10
  'jsdoc/require-jsdoc': 'off',
11
11
  // N8N prefers the upper camel case for file names
12
12
  'unicorn/filename-case': 'off',
13
+ 'unicorn/prefer-spread': 'off',
13
14
  'no-unused-vars': 'off',
14
15
  '@typescript-eslint/no-unused-vars': [
15
16
  'warn',
@@ -22,6 +23,6 @@ export default [
22
23
  },
23
24
  },
24
25
  {
25
- ignores: ['jest.config.js'],
26
+ ignores: ['jest.config.js', 'docs'],
26
27
  },
27
28
  ];
package/knip.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://unpkg.com/knip@5/schema.json",
3
+ "ignoreExportsUsedInFile": {
4
+ "interface": true,
5
+ "type": true
6
+ },
7
+ "tags": ["-lintignore"],
8
+ "entry": ["credentials/index.{js,ts}", "nodes/index.{js,ts}"]
9
+ }
@@ -5,7 +5,7 @@ import {
5
5
  INodeProperties,
6
6
  INodeType,
7
7
  INodeTypeDescription,
8
- NodeConnectionType,
8
+ NodeConnectionTypes,
9
9
  NodeOperationError,
10
10
  NodePropertyTypes,
11
11
  } from 'n8n-workflow';
@@ -27,8 +27,8 @@ export class Fortnox implements INodeType {
27
27
  defaults: {
28
28
  name: 'Fortnox',
29
29
  },
30
- inputs: [NodeConnectionType.Main],
31
- outputs: [NodeConnectionType.Main],
30
+ inputs: [NodeConnectionTypes.Main],
31
+ outputs: [NodeConnectionTypes.Main],
32
32
  credentials: [
33
33
  {
34
34
  name: FORTNOX_API_CREDENTIAL_KEY,
@@ -3,7 +3,7 @@ import {
3
3
  INodeTypeDescription,
4
4
  ITriggerFunctions,
5
5
  ITriggerResponse,
6
- NodeConnectionType,
6
+ NodeConnectionTypes,
7
7
  NodeOperationError,
8
8
  } from 'n8n-workflow';
9
9
  import WebSocket from 'ws';
@@ -32,7 +32,7 @@ export class FortnoxTrigger implements INodeType {
32
32
  name: 'Fortnox Trigger',
33
33
  },
34
34
  inputs: [],
35
- outputs: [NodeConnectionType.Main],
35
+ outputs: [NodeConnectionTypes.Main],
36
36
  credentials: [
37
37
  {
38
38
  name: FORTNOX_API_CREDENTIAL_KEY,
@@ -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';
@@ -4,11 +4,16 @@ import {
4
4
  NodePropertyTypes,
5
5
  } from 'n8n-workflow';
6
6
 
7
- import * as get from './operations/get.operation';
8
- import * as getAll from './operations/getAll.operation';
9
- import * as create from './operations/create.operation';
10
- import * as update from './operations/update.operation';
11
- import * as delete_ from './operations/delete.operation';
7
+ import * as operations from './operations';
8
+ import { N8NOperationModuleHandler } from '../../../modules';
9
+
10
+ const moduleHandler = new N8NOperationModuleHandler([
11
+ operations.getManyCustomers,
12
+ operations.getSingleCustomer,
13
+ operations.createSingleCustomer,
14
+ operations.updateSingleCustomer,
15
+ operations.deleteSingleCustomer,
16
+ ]);
12
17
 
13
18
  export const customerProperties: INodeProperties[] = [
14
19
  {
@@ -21,20 +26,10 @@ export const customerProperties: INodeProperties[] = [
21
26
  resource: ['customer'],
22
27
  },
23
28
  },
24
- options: [
25
- get.description,
26
- getAll.description,
27
- create.description,
28
- update.description,
29
- delete_.description,
30
- ],
29
+ options: moduleHandler.getDescriptions(),
31
30
  default: 'getAll',
32
31
  },
33
- ...get.properties,
34
- ...getAll.properties,
35
- ...create.properties,
36
- ...update.properties,
37
- ...delete_.properties,
32
+ ...moduleHandler.getProperties(),
38
33
  ];
39
34
 
40
35
  export async function customerOperations(
@@ -42,16 +37,17 @@ export async function customerOperations(
42
37
  { operation, i }: { operation: string; i: number }
43
38
  ) {
44
39
  if (operation === 'get') {
45
- return await get.execute.call(this, i);
40
+ return await operations.getSingleCustomer.execute.call(this, i);
46
41
  } else if (operation === 'getAll') {
47
- return await getAll.execute.call(this, i);
42
+ return await operations.getManyCustomers.execute.call(this, i);
48
43
  } else if (operation === 'create') {
49
- return await create.execute.call(this, i);
44
+ return await operations.createSingleCustomer.execute.call(this, i);
50
45
  } else if (operation === 'update') {
51
- return await update.execute.call(this, i);
46
+ return await operations.updateSingleCustomer.execute.call(this, i);
52
47
  } else if (operation === 'delete') {
53
- return await delete_.execute.call(this, i);
48
+ return await operations.deleteSingleCustomer.execute.call(this, i);
54
49
  }
55
50
 
56
51
  return null;
57
52
  }
53
+ export * from './operations';
@@ -1,8 +1,12 @@
1
- import { IExecuteFunctions, INodeProperties, IDataObject } from 'n8n-workflow';
1
+ import {
2
+ IExecuteFunctions,
3
+ INodeProperties,
4
+ IDataObject,
5
+ NodeOperationError,
6
+ } from 'n8n-workflow';
2
7
  import { apiRequest } from '../../../transport';
3
8
  import { code as currencyCode } from 'currency-codes';
4
9
  import { CustomerResponse } from '../model';
5
- import { NodeResponse } from '../../../../nodeResponse';
6
10
 
7
11
  export const description = {
8
12
  name: 'Create Customer',
@@ -11,7 +15,7 @@ export const description = {
11
15
  action: 'Create a customer',
12
16
  };
13
17
 
14
- export const createProperties: INodeProperties[] = [
18
+ const createProperties: INodeProperties[] = [
15
19
  {
16
20
  displayName: 'Address 1',
17
21
  name: 'Address1',
@@ -257,7 +261,7 @@ export const properties: INodeProperties[] = [
257
261
  export async function execute(
258
262
  this: IExecuteFunctions,
259
263
  i: number
260
- ): Promise<NodeResponse<CustomerResponse>> {
264
+ ): Promise<CustomerResponse> {
261
265
  const name = this.getNodeParameter('Name', i) as string;
262
266
  let currency = this.getNodeParameter('Currency', i) as string;
263
267
  currency = currency.toUpperCase();
@@ -276,10 +280,10 @@ export async function execute(
276
280
  ) as IDataObject;
277
281
 
278
282
  if (currencyCode(currency) === undefined) {
279
- return {
280
- success: false,
281
- error: `Invalid currency code: ${currency}. Use ISO 4217 currency code.`,
282
- };
283
+ throw new NodeOperationError(
284
+ this.getNode(),
285
+ `Invalid currency code: ${currency}. Use ISO 4217 currency code.`
286
+ );
283
287
  }
284
288
 
285
289
  const body = {
@@ -1,6 +1,5 @@
1
1
  import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
2
  import { apiRequest } from '../../../transport';
3
- import { NodeResponse } from '../../../../nodeResponse';
4
3
 
5
4
  export const description = {
6
5
  name: 'Delete Customer',
@@ -29,7 +28,7 @@ export const properties: INodeProperties[] = [
29
28
  export async function execute(
30
29
  this: IExecuteFunctions,
31
30
  i: number
32
- ): Promise<NodeResponse<null>> {
31
+ ): Promise<null> {
33
32
  const customerNumber = this.getNodeParameter(
34
33
  'customerNumber',
35
34
  i,
@@ -37,18 +36,14 @@ export async function execute(
37
36
  ) as string;
38
37
 
39
38
  const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
40
- const response = await apiRequest<null>(this, {
41
- method: 'DELETE',
42
- endpoint,
43
- });
44
-
45
- if (response.success) return response;
46
-
47
- return {
48
- ...response,
49
- metadata: {
50
- ...response.metadata,
51
- id: customerNumber,
39
+ return await apiRequest<null>(
40
+ this,
41
+ {
42
+ method: 'DELETE',
43
+ endpoint,
52
44
  },
53
- };
45
+ {
46
+ id: customerNumber,
47
+ }
48
+ );
54
49
  }