@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
@@ -0,0 +1,116 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+
3
+ import { getLimeobject, getProperties } from '../../../transport';
4
+ import { DATA_RESOURCE } from '../../../models';
5
+ import { getFilePropertiesNames, processFileResponse } from '../../../utils';
6
+
7
+ /**
8
+ * Description and metadata for the "Get Single Object" operation in Lime CRM.
9
+ *
10
+ * @public
11
+ */
12
+ export const description = {
13
+ name: 'Get Single Object',
14
+ value: 'getSingleObject',
15
+ description: 'Get one specific object',
16
+ action: 'Get single object',
17
+ };
18
+
19
+ /**
20
+ * Node properties for the "Get Single Object" operation.
21
+ *
22
+ * @param {string} limetype - The type of entity to retrieve. Loaded from available Limetypes
23
+ * @param {string} objectId - The ID of the object to retrieve
24
+ * @param {boolean} includeFileContent - Whether to include file binary data for Limetypes that have file properties. Ignored for Limetypes without file properties
25
+ *
26
+ * @public
27
+ */
28
+ export const properties: INodeProperties[] = [
29
+ {
30
+ displayName: 'Limetype',
31
+ name: 'limetype',
32
+ type: 'options',
33
+ typeOptions: {
34
+ loadOptionsMethod: 'getLimetypes',
35
+ },
36
+ required: true,
37
+ default: '',
38
+ description: 'The type of entity to retrieve',
39
+ displayOptions: {
40
+ show: {
41
+ resource: [DATA_RESOURCE],
42
+ operation: ['getSingleObject'],
43
+ },
44
+ },
45
+ },
46
+
47
+ {
48
+ displayName: 'Object ID',
49
+ name: 'objectId',
50
+ type: 'string',
51
+ required: true,
52
+ default: '',
53
+ description: 'The ID of the object to retrieve',
54
+ displayOptions: {
55
+ show: {
56
+ resource: [DATA_RESOURCE],
57
+ operation: ['getSingleObject'],
58
+ },
59
+ },
60
+ },
61
+ {
62
+ displayName: 'Include file content',
63
+ name: 'includeFileContent',
64
+ type: 'boolean',
65
+ default: false,
66
+ description:
67
+ 'Include file binary data if the Limetype has any file properties. ' +
68
+ 'Keep performance in mind before activating this. ' +
69
+ 'For Limetypes without any file properties, this setting is ignored.',
70
+ displayOptions: {
71
+ show: {
72
+ resource: [DATA_RESOURCE],
73
+ operation: ['getSingleObject'],
74
+ },
75
+ },
76
+ },
77
+ ];
78
+
79
+ /**
80
+ * Execute the "Get Single Object" operation for Lime CRM.
81
+ *
82
+ * @remarks
83
+ * This method retrieves a single Lime CRM object identified by its object ID and Limetype.
84
+ * If `includeFileContent` is true, it also retrieves binary data for any file properties of the object.
85
+ *
86
+ * The method performs the following steps:
87
+ * 1. Retrieves the `limetype`, `objectId`, and `includeFileContent` from {@link properties}.
88
+ * 2. Calls {@link getLimeobject} to fetch the object from Lime CRM.
89
+ * 3. If the object has file properties and `includeFileContent` is true, it retrieves file data using {@link getFilePropertiesNames} and {@link processFileResponse}.
90
+ *
91
+ * @param i - The index of the current item in the workflow execution
92
+ *
93
+ * @returns The Lime object data, optionally including file binary content.
94
+ *
95
+ * @public
96
+ */
97
+ export async function execute(this: IExecuteFunctions, i: number) {
98
+ const limetype = this.getNodeParameter('limetype', i) as string;
99
+ const objectId = this.getNodeParameter('objectId', i) as string;
100
+ const includeFileContent = this.getNodeParameter(
101
+ 'includeFileContent',
102
+ i
103
+ ) as boolean;
104
+
105
+ const limeObjectResponse = await getLimeobject(this, limetype, objectId);
106
+
107
+ const propertiesResponse = await getProperties(this, limetype);
108
+
109
+ const fileProperties = getFilePropertiesNames(propertiesResponse);
110
+ return processFileResponse(
111
+ this,
112
+ fileProperties,
113
+ limeObjectResponse,
114
+ includeFileContent
115
+ );
116
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @group Resources
3
+ */
4
+ export * as createSingleObject from './createSingleObject.operation';
5
+ /**
6
+ * @group Resources
7
+ */
8
+ export * as getSingleObject from './getSingleObject.operation';
9
+ /**
10
+ * @group Resources
11
+ */
12
+ export * as updateSingleObject from './updateSingleObject.operation';
13
+ /**
14
+ * @group Resources
15
+ */
16
+ export * as deleteSingleObject from './deleteSingleObject.operation';
17
+ /**
18
+ * @group Resources
19
+ */
20
+ export * as getManyObjects from './getManyObjects.operation';
21
+ /**
22
+ * @group Resources
23
+ */
24
+ export * as getSingleFile from './getSingleFile.operation';
@@ -1,30 +1,52 @@
1
1
  import { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
- import { updateLimeObject } from '../../../transport';
3
- import { LIMEOBJECT_RESOURCE } from '../../../commons';
2
+ import { getProperties, updateLimeobject } from '../../../transport';
3
+ import { DATA_RESOURCE } from '../../../models';
4
+ import {
5
+ adaptProperty,
6
+ getFilePropertiesNames,
7
+ getPropertyType,
8
+ processFileResponse,
9
+ setFileProperties,
10
+ } from '../../../utils';
4
11
 
5
- // Input fields for update operation
12
+ /**
13
+ * Description and metadata for the "Update Single Object" operation in Lime CRM.
14
+ *
15
+ * @public
16
+ */
6
17
  export const description = {
7
- name: 'Update',
8
- value: 'update',
9
- description: 'Update an existing record',
10
- action: 'Update a record',
18
+ name: 'Update Single Object',
19
+ value: 'updateSingleObject',
20
+ description: 'Update one specific object',
21
+ action: 'Update single object',
11
22
  };
12
23
 
24
+ /**
25
+ * Node properties for the "Update Single Object" operation.
26
+ *
27
+ * @param {string} limetype - The type of entity to update. Loaded from available Limetypes
28
+ * @param {string} id - The ID of the object to update
29
+ * @param {'simple' | 'json'} inputType - How the object data is provided: 'simple' for form inputs, 'json' for raw JSON
30
+ * @param {IDataObject} simpleFields - Used if `inputType` is 'simple'. List of field name/value pairs to update
31
+ * @param {string} jsonData - Used if `inputType` is 'json'. Full object data in JSON format
32
+ *
33
+ * @public
34
+ */
13
35
  export const properties: INodeProperties[] = [
14
36
  {
15
- displayName: 'LimeType',
16
- name: 'limeType',
37
+ displayName: 'Limetype',
38
+ name: 'limetype',
17
39
  type: 'options',
18
40
  typeOptions: {
19
- loadOptionsMethod: 'getLimeTypes',
41
+ loadOptionsMethod: 'getLimetypes',
20
42
  },
21
43
  required: true,
22
44
  default: '',
23
45
  description: 'The type of entity to update',
24
46
  displayOptions: {
25
47
  show: {
26
- resource: [LIMEOBJECT_RESOURCE],
27
- operation: ['update'],
48
+ resource: [DATA_RESOURCE],
49
+ operation: ['updateSingleObject'],
28
50
  },
29
51
  },
30
52
  },
@@ -37,8 +59,8 @@ export const properties: INodeProperties[] = [
37
59
  description: 'ID of the record to update',
38
60
  displayOptions: {
39
61
  show: {
40
- resource: [LIMEOBJECT_RESOURCE],
41
- operation: ['update'],
62
+ resource: [DATA_RESOURCE],
63
+ operation: ['updateSingleObject'],
42
64
  },
43
65
  },
44
66
  },
@@ -62,8 +84,8 @@ export const properties: INodeProperties[] = [
62
84
  description: 'How to input the data',
63
85
  displayOptions: {
64
86
  show: {
65
- resource: [LIMEOBJECT_RESOURCE],
66
- operation: ['update'],
87
+ resource: [DATA_RESOURCE],
88
+ operation: ['updateSingleObject'],
67
89
  },
68
90
  },
69
91
  },
@@ -80,8 +102,8 @@ export const properties: INodeProperties[] = [
80
102
  },
81
103
  displayOptions: {
82
104
  show: {
83
- resource: [LIMEOBJECT_RESOURCE],
84
- operation: ['update'],
105
+ resource: [DATA_RESOURCE],
106
+ operation: ['updateSingleObject'],
85
107
  inputType: ['json'],
86
108
  },
87
109
  },
@@ -98,8 +120,8 @@ export const properties: INodeProperties[] = [
98
120
  default: {},
99
121
  displayOptions: {
100
122
  show: {
101
- resource: [LIMEOBJECT_RESOURCE],
102
- operation: ['update'],
123
+ resource: [DATA_RESOURCE],
124
+ operation: ['updateSingleObject'],
103
125
  inputType: ['simple'],
104
126
  },
105
127
  },
@@ -113,8 +135,8 @@ export const properties: INodeProperties[] = [
113
135
  name: 'fieldName',
114
136
  type: 'options',
115
137
  typeOptions: {
116
- loadOptionsMethod: 'getLimeTypeProperties',
117
- loadOptionsDependsOn: ['limeType'],
138
+ loadOptionsMethod: 'getNoHasManyProperties',
139
+ loadOptionsDependsOn: ['limetype'],
118
140
  },
119
141
  default: '',
120
142
  description: 'The name of the field',
@@ -132,13 +154,36 @@ export const properties: INodeProperties[] = [
132
154
  },
133
155
  ];
134
156
 
157
+ /**
158
+ * Execute the "Update Single Object" operation for Lime CRM.
159
+ *
160
+ * @remarks
161
+ * This method updates a single Lime CRM object identified by its ID and Limetype.
162
+ * It supports two input methods:
163
+ * - 'simple': key-value pairs provided via the UI
164
+ * - 'json': full object data in JSON format
165
+ *
166
+ * The method performs the following steps:
167
+ * 1. Retrieves the `limetype`, `id`, and input data from {@link properties}.
168
+ * 2. Collects and prepares any file properties using {@link getFilePropertiesNames} and {@link setFileProperties}.
169
+ * 3. Calls {@link updateLimeobject} to update the object in Lime CRM.
170
+ * 4. Processes the response, including file properties, using {@link processFileResponse}.
171
+ *
172
+ * @param i - The index of the current item in the workflow execution
173
+ *
174
+ * @returns The updated Lime object data, optionally including file binary content.
175
+ *
176
+ * @public
177
+ */
135
178
  export async function execute(this: IExecuteFunctions, i: number) {
136
- const limeType = this.getNodeParameter('limeType', i) as string;
179
+ const limetype = this.getNodeParameter('limetype', i) as string;
137
180
  const id = this.getNodeParameter('id', i) as string;
138
181
  const inputType = this.getNodeParameter('inputType', i) as string;
139
182
 
140
183
  let body: IDataObject = {};
141
184
 
185
+ const properties = await getProperties(this, limetype);
186
+
142
187
  if (inputType === 'json') {
143
188
  const jsonData = this.getNodeParameter('jsonData', i) as string;
144
189
  body = JSON.parse(jsonData);
@@ -149,9 +194,30 @@ export async function execute(this: IExecuteFunctions, i: number) {
149
194
  []
150
195
  ) as IDataObject[];
151
196
  for (const field of simpleFields) {
152
- body[field.fieldName as string] = field.fieldValue;
197
+ const fieldName = field.fieldName as string;
198
+ const fieldValue = field.fieldValue as string;
199
+ body[fieldName] = adaptProperty(
200
+ fieldValue,
201
+ getPropertyType(fieldName, properties)
202
+ );
153
203
  }
154
204
  }
155
205
 
156
- return updateLimeObject(this, limeType, id, body);
206
+ const fileProperties = getFilePropertiesNames(properties);
207
+
208
+ await setFileProperties(this, i, fileProperties, body);
209
+
210
+ const updateLimeobjectResponse = await updateLimeobject(
211
+ this,
212
+ limetype,
213
+ id,
214
+ body
215
+ );
216
+
217
+ const response = await processFileResponse(
218
+ this,
219
+ fileProperties,
220
+ updateLimeobjectResponse
221
+ );
222
+ return response.json;
157
223
  }
@@ -0,0 +1,97 @@
1
+ import {
2
+ INodeExecutionData,
3
+ IExecuteFunctions,
4
+ INodeProperties,
5
+ NodePropertyTypes,
6
+ NodeOperationError,
7
+ } from 'n8n-workflow';
8
+
9
+ import * as operations from './operations';
10
+ import { METADATA_RESOURCE } from '../../models';
11
+ import { N8NOperationModuleHandler } from '../../../modules';
12
+
13
+ const moduleHandler = new N8NOperationModuleHandler([
14
+ operations.getAllLimetypes,
15
+ operations.getSingleLimetype,
16
+ operations.getSingleFileMetadata,
17
+ ]);
18
+
19
+ /**
20
+ * Fields and operations for the **Metadata** resource in Lime CRM.
21
+ *
22
+ * @remarks
23
+ * - These fields are displayed in the n8n node UI when the resource is set to `Metadata`.
24
+ * - Each operation corresponds to fetching or inspecting metadata in Lime CRM.
25
+ *
26
+ * @group Resources
27
+ * @public
28
+ *
29
+ * @see {@link getAllLimetypes} - Operation to retrieve a list of all available Limetypes
30
+ * @see {@link getSingleLimetype} - Operation to retrieve details about a specific Limetype
31
+ * @see {@link getSingleFileMetadata} - Operation to fetch metadata for a specific file
32
+ */
33
+ export const metadataFields: INodeProperties[] = [
34
+ {
35
+ displayName: 'Operation',
36
+ name: 'operation',
37
+ type: 'options' as NodePropertyTypes,
38
+ noDataExpression: true,
39
+ displayOptions: {
40
+ show: {
41
+ resource: [METADATA_RESOURCE],
42
+ },
43
+ },
44
+ options: moduleHandler.getDescriptions(),
45
+ default: 'getAllLimetypes',
46
+ },
47
+
48
+ ...moduleHandler.getProperties(),
49
+ ];
50
+
51
+ /**
52
+ * Execute a specific **Metadata** operation on Lime CRM.
53
+ *
54
+ * @param args - Contextual parameters for the operation being executed
55
+ * @param args.operation - The operation to perform (e.g., `getAllLimetypes`, `getSingleLimetype`)
56
+ * @param args.i - The index of the input item to process
57
+ *
58
+ * @returns A promise resolving to the n8n object containing the result of the operation.
59
+ *
60
+ * @throws NodeOperationError if the operation is unsupported or fails.
61
+ *
62
+ * @public
63
+ * @group Resources
64
+ */
65
+ export async function metadataOperations(
66
+ this: IExecuteFunctions,
67
+ { operation, i }: { operation: string; i: number }
68
+ ): Promise<INodeExecutionData | INodeExecutionData[]> {
69
+ switch (operation) {
70
+ case 'getAllLimetypes': {
71
+ const results = await operations.getAllLimetypes.execute.call(this);
72
+ return results.map((limetype) => ({
73
+ json: limetype,
74
+ }));
75
+ }
76
+ case 'getSingleLimetype': {
77
+ return {
78
+ json: await operations.getSingleLimetype.execute.call(this, i),
79
+ };
80
+ }
81
+ case 'getSingleFileMetadata': {
82
+ return {
83
+ json: await operations.getSingleFileMetadata.execute.call(
84
+ this,
85
+ i
86
+ ),
87
+ };
88
+ }
89
+ }
90
+
91
+ throw new NodeOperationError(
92
+ this.getNode(),
93
+ `The operation "${operation}" is not supported!`
94
+ );
95
+ }
96
+
97
+ export * from './operations';
@@ -0,0 +1,28 @@
1
+ import { IExecuteFunctions } from 'n8n-workflow';
2
+
3
+ import { getLimetypesFromApi } from '../../../transport';
4
+ import { Limetype } from '../../../models';
5
+
6
+ /**
7
+ * Description and metadata for the "Get All Limetypes" operation in Lime CRM.
8
+ */
9
+ export const description = {
10
+ name: 'Get all Limetypes',
11
+ value: 'getAllLimetypes',
12
+ description: 'Get a list of all available Limetypes',
13
+ action: 'Get all Limetypes',
14
+ };
15
+
16
+ /**
17
+ * Retrieve a list of all available Limetypes from Lime CRM.
18
+ *
19
+ * This operation queries the Lime CRM API for all accessible Limetypes,
20
+ * such as company, person, deal, etc.
21
+ *
22
+ * @returns An array of Limetype objects
23
+ *
24
+ * @public
25
+ */
26
+ export async function execute(this: IExecuteFunctions): Promise<Limetype[]> {
27
+ return await getLimetypesFromApi(this);
28
+ }
@@ -0,0 +1,147 @@
1
+ import {
2
+ IExecuteFunctions,
3
+ INodeProperties,
4
+ NodeOperationError,
5
+ } from 'n8n-workflow';
6
+ import {
7
+ FileMetadata,
8
+ getFileMetadata,
9
+ getFileMetadataByLimeobject,
10
+ } from '../../../transport';
11
+ import { METADATA_RESOURCE } from '../../../models';
12
+
13
+ /**
14
+ * Description and metadata for the "Get Single File Metadata" operation in Lime CRM.
15
+ *
16
+ * @public
17
+ */
18
+ export const description = {
19
+ name: 'Get Single File Metadata',
20
+ value: 'getSingleFileMetadata',
21
+ description: 'Get the metadata for a single file',
22
+ action: 'Get single file metadata',
23
+ };
24
+
25
+ /**
26
+ * Node parameter definitions for the "Get Single File Metadata" operation.
27
+ *
28
+ * @param source - Determines whether the file is retrieved by its ID or by its associated Limeobject ID
29
+ * @param limetype - The Lime CRM entity type associated with the file (required when `source` is `byLimeobject`)
30
+ * @param identifier - The unique identifier of the file or Limeobject to retrieve metadata for
31
+ * @param property - The file property in the Limeobject containing the file reference (used when `source` is `byLimeobject`)
32
+ *
33
+ * @public
34
+ */
35
+ export const properties: INodeProperties[] = [
36
+ {
37
+ displayName: 'Get by',
38
+ name: 'source',
39
+ type: 'options',
40
+ required: true,
41
+ placeholder: 'Add Source',
42
+ displayOptions: {
43
+ show: {
44
+ resource: [METADATA_RESOURCE],
45
+ operation: ['getSingleFileMetadata'],
46
+ },
47
+ },
48
+ options: [
49
+ {
50
+ name: 'File ID',
51
+ value: 'byFile',
52
+ description: 'Get file by its ID',
53
+ },
54
+ {
55
+ name: 'Limeobject ID',
56
+ value: 'byLimeobject',
57
+ description: "Get file by it's associated Limeobject ID",
58
+ },
59
+ ],
60
+ default: 'byFile',
61
+ },
62
+ {
63
+ displayName: 'Limetype',
64
+ name: 'limetype',
65
+ type: 'options',
66
+ typeOptions: {
67
+ loadOptionsMethod: 'getLimetypes',
68
+ },
69
+ required: true,
70
+ default: '',
71
+ description: 'The type of entity associated with the file',
72
+ displayOptions: {
73
+ show: {
74
+ resource: [METADATA_RESOURCE],
75
+ operation: ['getSingleFileMetadata'],
76
+ source: ['byLimeobject'],
77
+ },
78
+ },
79
+ },
80
+ {
81
+ displayName: 'Identifier',
82
+ name: 'identifier',
83
+ type: 'string',
84
+ required: true,
85
+ default: '',
86
+ description: 'The ID of the file or Limeobject to retrieve',
87
+ displayOptions: {
88
+ show: {
89
+ resource: [METADATA_RESOURCE],
90
+ operation: ['getSingleFileMetadata'],
91
+ },
92
+ },
93
+ placeholder: 'e.g., 12345',
94
+ },
95
+ {
96
+ displayName: 'File type property',
97
+ name: 'property',
98
+ type: 'options',
99
+ typeOptions: {
100
+ loadOptionsMethod: 'getFileProperties',
101
+ loadOptionsDependsOn: ['limetype'],
102
+ },
103
+ required: true,
104
+ default: '',
105
+ description: 'The type of entity associated with the file',
106
+ displayOptions: {
107
+ show: {
108
+ resource: [METADATA_RESOURCE],
109
+ operation: ['getSingleFileMetadata'],
110
+ source: ['byLimeobject'],
111
+ },
112
+ },
113
+ },
114
+ ];
115
+
116
+ /**
117
+ * Execute the "Get Single File Metadata" operation.
118
+ *
119
+ * Retrieves file metadata either directly via its file ID, or through its associated Limeobject.
120
+ * The function dynamically calls the correct method depending on user configuration.
121
+ *
122
+ * @param i - The index of the current item being processed within the n8n execution loop.
123
+ * @returns File metadata
124
+ *
125
+ * @public
126
+ */
127
+ export async function execute(
128
+ this: IExecuteFunctions,
129
+ i: number
130
+ ): Promise<FileMetadata> {
131
+ const source = this.getNodeParameter('source', i) as string;
132
+ const id = this.getNodeParameter('identifier', i) as string;
133
+
134
+ if (source == 'byFile') {
135
+ return await getFileMetadata(this, id);
136
+ }
137
+ if (source == 'byLimeobject') {
138
+ const limetype = this.getNodeParameter('limetype', i) as string;
139
+ const property = this.getNodeParameter('property', i) as string;
140
+ return await getFileMetadataByLimeobject(this, limetype, id, property);
141
+ }
142
+
143
+ throw new NodeOperationError(
144
+ this.getNode(),
145
+ `The source "${source}" is not supported!`
146
+ );
147
+ }
@@ -0,0 +1,58 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { getLimetype } from '../../../transport/limetypes';
3
+ import { METADATA_RESOURCE } from '../../../models';
4
+
5
+ /**
6
+ * Description and metadata for the "Get Single Limetype" operation in Lime CRM.
7
+ *
8
+ * @public
9
+ */
10
+ export const description = {
11
+ name: 'Get Single Limetype',
12
+ value: 'getSingleLimetype',
13
+ description: 'Get details about a specific Limetype',
14
+ action: 'Get single Limetype',
15
+ };
16
+
17
+ /**
18
+ * Node parameter definitions for the "Get Single Limetype" operation.
19
+ *
20
+ * @param limetype - The name of the entity type (Limetype) to retrieve details for
21
+ *
22
+ * @public
23
+ */
24
+ export const properties: INodeProperties[] = [
25
+ {
26
+ displayName: 'Limetype',
27
+ name: 'limetype',
28
+ type: 'options',
29
+ typeOptions: {
30
+ loadOptionsMethod: 'getLimetypes',
31
+ },
32
+ required: true,
33
+ default: '',
34
+ description: 'The name of the entity type to get details for',
35
+ displayOptions: {
36
+ show: {
37
+ resource: [METADATA_RESOURCE],
38
+ operation: ['getSingleLimetype'],
39
+ },
40
+ },
41
+ },
42
+ ];
43
+
44
+ /**
45
+ * Execute the "Get Single Limetype" operation.
46
+ *
47
+ * Retrieves detailed information about a specific Limetype from Lime CRM.
48
+ *
49
+ * @param i - The index of the current item being processed within the n8n execution loop.
50
+ * @returns Limetype details as returned from the API.
51
+ *
52
+ * @public
53
+ */
54
+ export async function execute(this: IExecuteFunctions, i: number) {
55
+ const limetype = this.getNodeParameter('limetype', i) as string;
56
+
57
+ return getLimetype(this, limetype);
58
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @group Resources
3
+ */
4
+ export * as getSingleLimetype from './getSingleLimetype.operation';
5
+ /**
6
+ * @group Resources
7
+ */
8
+ export * as getAllLimetypes from './getAllLimetypes.operation';
9
+ /**
10
+ * @group Resources
11
+ */
12
+ export * as getSingleFileMetadata from './getSingleFileMetadata.operation';