@limetech/n8n-nodes-lime 0.5.0 → 2.5.0-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 (316) hide show
  1. package/.github/workflows/lint.yml +4 -2
  2. package/.github/workflows/release.yml +8 -41
  3. package/.github/workflows/test-and-build.yml +1 -16
  4. package/.releaserc.json +2 -1
  5. package/CHANGELOG.md +155 -0
  6. package/Dockerfile +0 -21
  7. package/README.md +1 -1
  8. package/credentials/LimeCrmApi.credentials.ts +38 -1
  9. package/credentials/index.ts +2 -0
  10. package/eslint.config.mjs +2 -1
  11. package/knip.json +9 -0
  12. package/nodes/errorHandling.ts +60 -0
  13. package/nodes/fortnox/index.ts +6 -0
  14. package/nodes/fortnox/resources/customers/index.ts +18 -22
  15. package/nodes/fortnox/resources/customers/operations/create.operation.ts +12 -8
  16. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +10 -15
  17. package/nodes/fortnox/resources/customers/operations/get.operation.ts +10 -15
  18. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +1 -2
  19. package/nodes/fortnox/resources/customers/operations/index.ts +5 -0
  20. package/nodes/fortnox/resources/customers/operations/update.operation.ts +30 -30
  21. package/nodes/fortnox/resources/invoice/index.ts +16 -18
  22. package/nodes/fortnox/resources/invoice/model.ts +0 -4
  23. package/nodes/fortnox/resources/invoice/operations/create.operation.ts +1 -2
  24. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +10 -15
  25. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +1 -2
  26. package/nodes/fortnox/resources/invoice/operations/index.ts +4 -0
  27. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +11 -16
  28. package/nodes/fortnox/transport/index.ts +14 -11
  29. package/nodes/index.ts +4 -0
  30. package/nodes/lime-crm/LimeCrmNode.node.ts +89 -11
  31. package/nodes/lime-crm/LimeCrmTrigger.node.ts +75 -21
  32. package/nodes/lime-crm/index.ts +9 -0
  33. package/nodes/lime-crm/methods/getLimetypeProperties.ts +53 -8
  34. package/nodes/lime-crm/methods/getLimetypes.ts +15 -9
  35. package/nodes/lime-crm/methods/index.ts +6 -1
  36. package/nodes/lime-crm/methods/resourceMapping.ts +141 -0
  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 +65 -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 +94 -0
  45. package/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.ts +174 -0
  46. package/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.ts +112 -0
  47. package/nodes/lime-crm/resources/admin/operations/index.ts +8 -0
  48. package/nodes/lime-crm/resources/data/index.ts +77 -31
  49. package/nodes/lime-crm/resources/data/operations/{createSingleObject.ts → createSingleObject.operation.ts} +64 -54
  50. package/nodes/lime-crm/resources/data/operations/{deleteSingleObject.ts → deleteSingleObject.operation.ts} +39 -6
  51. package/nodes/lime-crm/resources/data/operations/{getManyObjects.ts → getManyObjects.operation.ts} +195 -48
  52. package/nodes/lime-crm/resources/data/operations/{getSingleFile.ts → getSingleFile.operation.ts} +47 -11
  53. package/nodes/lime-crm/resources/data/operations/{getSingleObject.ts → getSingleObject.operation.ts} +50 -8
  54. package/nodes/lime-crm/resources/data/operations/index.ts +24 -0
  55. package/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.ts +83 -61
  56. package/nodes/lime-crm/resources/metadata/index.ts +60 -16
  57. package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +18 -4
  58. package/nodes/lime-crm/resources/metadata/operations/{getSingleFileMetadata.ts → getSingleFileMetadata.operation.ts} +46 -26
  59. package/nodes/lime-crm/resources/metadata/operations/{getSingleLimetype.ts → getSingleLimetype.operation.ts} +30 -3
  60. package/nodes/lime-crm/resources/metadata/operations/index.ts +12 -0
  61. package/nodes/lime-crm/transport/commons.ts +90 -18
  62. package/nodes/lime-crm/transport/files.ts +161 -71
  63. package/nodes/lime-crm/transport/index.ts +35 -17
  64. package/nodes/lime-crm/transport/limeQuery.ts +43 -7
  65. package/nodes/lime-crm/transport/limeobjects.ts +113 -178
  66. package/nodes/lime-crm/transport/limetypes.ts +125 -48
  67. package/nodes/lime-crm/transport/users.ts +300 -0
  68. package/nodes/lime-crm/transport/webhooks.ts +97 -37
  69. package/nodes/lime-crm/{commons → utils}/files.ts +79 -26
  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/webhook.ts +81 -0
  73. package/nodes/modules.ts +44 -0
  74. package/nodes/response.ts +54 -0
  75. package/package.json +21 -28
  76. package/tests/nodes/lime-crm/methods.spec.ts +91 -0
  77. package/tests/nodes/lime-crm/utils.spec.ts +273 -0
  78. package/typedoc.css +9 -0
  79. package/typedoc.json +19 -0
  80. package/.dockerignore +0 -1
  81. package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
  82. package/dist/credentials/FortnoxApi.credentials.js +0 -57
  83. package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
  84. package/dist/credentials/LimeCrmApi.credentials.d.ts +0 -9
  85. package/dist/credentials/LimeCrmApi.credentials.js +0 -66
  86. package/dist/credentials/LimeCrmApi.credentials.js.map +0 -1
  87. package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
  88. package/dist/nodes/fortnox/Fortnox.node.js +0 -95
  89. package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
  90. package/dist/nodes/fortnox/Fortnox.node.json +0 -18
  91. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
  92. package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
  93. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
  94. package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  95. package/dist/nodes/fortnox/commons.d.ts +0 -25
  96. package/dist/nodes/fortnox/commons.js +0 -44
  97. package/dist/nodes/fortnox/commons.js.map +0 -1
  98. package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
  99. package/dist/nodes/fortnox/model.d.ts +0 -20
  100. package/dist/nodes/fortnox/model.js +0 -3
  101. package/dist/nodes/fortnox/model.js.map +0 -1
  102. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
  103. package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
  104. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
  105. package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -20
  106. package/dist/nodes/fortnox/resources/customers/index.js +0 -87
  107. package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
  108. package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
  109. package/dist/nodes/fortnox/resources/customers/model.js +0 -3
  110. package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
  111. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -12
  112. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -283
  113. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
  114. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -10
  115. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -45
  116. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
  117. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -11
  118. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -45
  119. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
  120. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -11
  121. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
  122. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
  123. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -12
  124. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -276
  125. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
  126. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
  127. package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
  128. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
  129. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
  130. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
  131. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
  132. package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -20
  133. package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
  134. package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
  135. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
  136. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
  137. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
  138. package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -150
  139. package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
  140. package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
  141. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -11
  142. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
  143. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
  144. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -11
  145. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -44
  146. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
  147. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -11
  148. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
  149. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
  150. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -11
  151. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -71
  152. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
  153. package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
  154. package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
  155. package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
  156. package/dist/nodes/fortnox/transport/index.d.ts +0 -4
  157. package/dist/nodes/fortnox/transport/index.js +0 -77
  158. package/dist/nodes/fortnox/transport/index.js.map +0 -1
  159. package/dist/nodes/lime-crm/LimeCrm.node.json +0 -18
  160. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +0 -14
  161. package/dist/nodes/lime-crm/LimeCrmNode.node.js +0 -126
  162. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +0 -1
  163. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +0 -18
  164. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +0 -215
  165. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +0 -1
  166. package/dist/nodes/lime-crm/assets/lime-crm.svg +0 -1
  167. package/dist/nodes/lime-crm/commons/constants.d.ts +0 -5
  168. package/dist/nodes/lime-crm/commons/constants.js +0 -9
  169. package/dist/nodes/lime-crm/commons/constants.js.map +0 -1
  170. package/dist/nodes/lime-crm/commons/hmac.d.ts +0 -1
  171. package/dist/nodes/lime-crm/commons/hmac.js +0 -11
  172. package/dist/nodes/lime-crm/commons/hmac.js.map +0 -1
  173. package/dist/nodes/lime-crm/commons/index.d.ts +0 -3
  174. package/dist/nodes/lime-crm/commons/index.js +0 -12
  175. package/dist/nodes/lime-crm/commons/index.js.map +0 -1
  176. package/dist/nodes/lime-crm/commons/limetype.d.ts +0 -10
  177. package/dist/nodes/lime-crm/commons/limetype.js +0 -3
  178. package/dist/nodes/lime-crm/commons/limetype.js.map +0 -1
  179. package/dist/nodes/lime-crm/commons/task.d.ts +0 -14
  180. package/dist/nodes/lime-crm/commons/task.js +0 -48
  181. package/dist/nodes/lime-crm/commons/task.js.map +0 -1
  182. package/dist/nodes/lime-crm/commons/webhook.d.ts +0 -20
  183. package/dist/nodes/lime-crm/commons/webhook.js +0 -30
  184. package/dist/nodes/lime-crm/commons/webhook.js.map +0 -1
  185. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +0 -5
  186. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +0 -11
  187. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +0 -1
  188. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +0 -2
  189. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +0 -20
  190. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +0 -1
  191. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +0 -2
  192. package/dist/nodes/lime-crm/methods/getLimeTypes.js +0 -20
  193. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +0 -1
  194. package/dist/nodes/lime-crm/methods/index.d.ts +0 -3
  195. package/dist/nodes/lime-crm/methods/index.js +0 -10
  196. package/dist/nodes/lime-crm/methods/index.js.map +0 -1
  197. package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +0 -23
  198. package/dist/nodes/lime-crm/resources/erpConnector/index.js +0 -67
  199. package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +0 -1
  200. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +0 -26
  201. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +0 -65
  202. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +0 -1
  203. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +0 -9
  204. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +0 -220
  205. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +0 -1
  206. package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +0 -15
  207. package/dist/nodes/lime-crm/resources/erpConnector/transform.js +0 -11
  208. package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +0 -1
  209. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +0 -4
  210. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +0 -7
  211. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +0 -1
  212. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +0 -37
  213. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +0 -124
  214. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +0 -1
  215. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +0 -1
  216. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +0 -6
  217. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +0 -1
  218. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +0 -14
  219. package/dist/nodes/lime-crm/resources/limeObject/index.js +0 -88
  220. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +0 -1
  221. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +0 -9
  222. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +0 -139
  223. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +0 -1
  224. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +0 -9
  225. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +0 -51
  226. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +0 -1
  227. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.d.ts +0 -9
  228. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js +0 -103
  229. package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js.map +0 -1
  230. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +0 -9
  231. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +0 -51
  232. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +0 -1
  233. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +0 -9
  234. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +0 -103
  235. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +0 -1
  236. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +0 -9
  237. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +0 -149
  238. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +0 -1
  239. package/dist/nodes/lime-crm/resources/limeQuery/index.d.ts +0 -6
  240. package/dist/nodes/lime-crm/resources/limeQuery/index.js +0 -66
  241. package/dist/nodes/lime-crm/resources/limeQuery/index.js.map +0 -1
  242. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.d.ts +0 -9
  243. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js +0 -191
  244. package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js.map +0 -1
  245. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +0 -20
  246. package/dist/nodes/lime-crm/resources/limeType/index.js +0 -81
  247. package/dist/nodes/lime-crm/resources/limeType/index.js.map +0 -1
  248. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +0 -11
  249. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +0 -36
  250. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +0 -1
  251. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +0 -9
  252. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +0 -36
  253. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +0 -1
  254. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +0 -10
  255. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +0 -15
  256. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +0 -1
  257. package/dist/nodes/lime-crm/transport/commons.d.ts +0 -5
  258. package/dist/nodes/lime-crm/transport/commons.js +0 -33
  259. package/dist/nodes/lime-crm/transport/commons.js.map +0 -1
  260. package/dist/nodes/lime-crm/transport/erpConnector.d.ts +0 -9
  261. package/dist/nodes/lime-crm/transport/erpConnector.js +0 -11
  262. package/dist/nodes/lime-crm/transport/erpConnector.js.map +0 -1
  263. package/dist/nodes/lime-crm/transport/index.d.ts +0 -6
  264. package/dist/nodes/lime-crm/transport/index.js +0 -24
  265. package/dist/nodes/lime-crm/transport/index.js.map +0 -1
  266. package/dist/nodes/lime-crm/transport/limeQuery.d.ts +0 -10
  267. package/dist/nodes/lime-crm/transport/limeQuery.js +0 -15
  268. package/dist/nodes/lime-crm/transport/limeQuery.js.map +0 -1
  269. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +0 -7
  270. package/dist/nodes/lime-crm/transport/limeobjects.js +0 -134
  271. package/dist/nodes/lime-crm/transport/limeobjects.js.map +0 -1
  272. package/dist/nodes/lime-crm/transport/limetypes.d.ts +0 -6
  273. package/dist/nodes/lime-crm/transport/limetypes.js +0 -54
  274. package/dist/nodes/lime-crm/transport/limetypes.js.map +0 -1
  275. package/dist/nodes/lime-crm/transport/task.d.ts +0 -13
  276. package/dist/nodes/lime-crm/transport/task.js +0 -13
  277. package/dist/nodes/lime-crm/transport/task.js.map +0 -1
  278. package/dist/nodes/lime-crm/transport/webhooks.d.ts +0 -16
  279. package/dist/nodes/lime-crm/transport/webhooks.js +0 -43
  280. package/dist/nodes/lime-crm/transport/webhooks.js.map +0 -1
  281. package/dist/nodes/nodeResponse.d.ts +0 -12
  282. package/dist/nodes/nodeResponse.js +0 -3
  283. package/dist/nodes/nodeResponse.js.map +0 -1
  284. package/dist/package.json +0 -75
  285. package/dist/tsconfig.tsbuildinfo +0 -1
  286. package/docker-compose.yml +0 -52
  287. package/nodes/lime-crm/commons/constants.ts +0 -9
  288. package/nodes/lime-crm/commons/hmac.ts +0 -13
  289. package/nodes/lime-crm/commons/index.ts +0 -10
  290. package/nodes/lime-crm/commons/task.ts +0 -55
  291. package/nodes/lime-crm/commons/webhook.ts +0 -68
  292. package/nodes/lime-crm/methods/getEntitiesForErpSystem.ts +0 -11
  293. package/nodes/lime-crm/model.ts +0 -22
  294. package/nodes/lime-crm/resources/erpConnector/index.ts +0 -43
  295. package/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.ts +0 -69
  296. package/nodes/lime-crm/resources/erpConnector/operations/transform.operation.ts +0 -274
  297. package/nodes/lime-crm/resources/erpConnector/transform.ts +0 -49
  298. package/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.ts +0 -18
  299. package/nodes/lime-crm/resources/erpConnector/transformers/fortnox.ts +0 -201
  300. package/nodes/lime-crm/resources/erpConnector/transformers/index.ts +0 -1
  301. package/nodes/lime-crm/transport/erpConnector.ts +0 -21
  302. package/nodes/lime-crm/transport/task.ts +0 -32
  303. package/nodes/nodeResponse.ts +0 -13
  304. package/restore_script/README +0 -42
  305. package/restore_script/api_key_download.txt +0 -0
  306. package/restore_script/api_key_upload.txt +0 -0
  307. package/restore_script/cli.py +0 -73
  308. package/restore_script/download.py +0 -73
  309. package/restore_script/main.py +0 -19
  310. package/restore_script/poetry.lock +0 -162
  311. package/restore_script/pyproject.toml +0 -15
  312. package/restore_script/transfer.py +0 -41
  313. package/restore_script/upload.py +0 -66
  314. package/restore_script/utils.py +0 -42
  315. package/tests/fixtures/fortnox.ts +0 -182
  316. package/tests/transform.spec.ts +0 -187
@@ -8,9 +8,10 @@ import {
8
8
  NodeOperationError,
9
9
  LoggerProxy as Logger,
10
10
  NodeConnectionTypes,
11
+ NodeApiError,
11
12
  } from 'n8n-workflow';
12
13
 
13
- import { getWebhook, LIME_CRM_API_CREDENTIAL_KEY } from './commons';
14
+ import { LIME_CRM_API_CREDENTIAL_KEY } from './models';
14
15
  import { getLimetypes } from './methods';
15
16
  import {
16
17
  createSubscription,
@@ -19,9 +20,32 @@ import {
19
20
  listSubscriptionsWithExistingData,
20
21
  } from './transport';
21
22
 
22
- import { verifyHmac } from './commons';
23
+ import { getWebhook, verifyHmac } from './utils';
23
24
 
25
+ /**
26
+ * Trigger node for handling incoming webhooks from **Lime CRM**.
27
+ *
28
+ * This node subscribes to events in Lime (such as record creation, update, or deletion)
29
+ * and triggers workflows in n8n when those events occur.
30
+ *
31
+ * @remarks
32
+ * - Automatically manages webhook subscriptions in Lime CRM (create, check, delete).
33
+ * - Verifies incoming webhook authenticity using HMAC signatures.
34
+ * - Returns the received payload as JSON to connected nodes.
35
+ *
36
+ * @public
37
+ * @group Node Definition
38
+ *
39
+ * @see {@link getSubscription} - Fetches an existing webhook subscription
40
+ * @see {@link listSubscriptionsWithExistingData} - Checks for existing subscriptions matching the same target URL and events
41
+ * @see {@link createSubscription} - Creates a new webhook subscription in Lime
42
+ * @see {@link deleteSubscription} - Removes an existing webhook subscription
43
+ */
24
44
  export class LimeCrmTrigger implements INodeType {
45
+ /**
46
+ * Definition of the node’s metadata, input/output configuration,
47
+ * authentication requirements, and event subscription options.
48
+ */
25
49
  description: INodeTypeDescription = {
26
50
  displayName: 'Lime CRM Trigger',
27
51
  name: 'limeCrmTrigger',
@@ -112,12 +136,24 @@ export class LimeCrmTrigger implements INodeType {
112
136
  ],
113
137
  };
114
138
 
139
+ /**
140
+ * Methods used to dynamically load options in the node UI. For details, see:
141
+ *
142
+ * - {@link getLimetypes}
143
+ */
115
144
  methods = {
116
145
  loadOptions: {
117
146
  getLimetypes,
118
147
  },
119
148
  };
120
149
 
150
+ /**
151
+ * Webhook lifecycle management methods:
152
+ *
153
+ * - checkExists - Verifies whether the webhook already exists in Lime CRM
154
+ * - create - Creates a new webhook subscription in Lime CRM if one does not exist
155
+ * - delete - Deletes the existing webhook subscription in Lime CRM
156
+ */
121
157
  webhookMethods = {
122
158
  default: {
123
159
  async checkExists(this: IHookFunctions): Promise<boolean> {
@@ -127,20 +163,18 @@ export class LimeCrmTrigger implements INodeType {
127
163
  return false;
128
164
  }
129
165
 
130
- const response = await getSubscription(this, webhook);
131
- if (!response.success) {
132
- if (response.status === 404) {
166
+ try {
167
+ await getSubscription(this, webhook);
168
+ } catch (error) {
169
+ if (error.cause?.status === 404) {
133
170
  delete webhook.data.webhookId;
134
171
  delete webhook.data.webhookEvents;
135
172
  return false;
136
173
  }
137
174
  Logger.warn(
138
- `There was en error while getting a webhook from Lime CRM: ${response.error}`
139
- );
140
- throw new NodeOperationError(
141
- this.getNode(),
142
- response.error
175
+ `There was en error while getting a webhook from Lime CRM: ${error}`
143
176
  );
177
+ throw new NodeApiError(this.getNode(), error);
144
178
  }
145
179
  return true;
146
180
  },
@@ -158,14 +192,13 @@ export class LimeCrmTrigger implements INodeType {
158
192
  // Check if a webhook already exists in order to not duplicate it in Lime
159
193
  // This is a different check then 'checkExists' which only takes an ID,
160
194
  // but it's only suited for production environment
161
-
162
195
  const existingSubscriptionResponse =
163
196
  await listSubscriptionsWithExistingData(this, webhook);
164
197
  if (!existingSubscriptionResponse.success) {
165
- throw new NodeOperationError(
166
- this.getNode(),
167
- existingSubscriptionResponse.error
168
- );
198
+ throw new NodeApiError(this.getNode(), {
199
+ message:
200
+ existingSubscriptionResponse.data.error.message,
201
+ });
169
202
  }
170
203
 
171
204
  if (existingSubscriptionResponse.data.length === 0) {
@@ -183,10 +216,10 @@ export class LimeCrmTrigger implements INodeType {
183
216
  );
184
217
 
185
218
  if (!createSubscriptionResponse.success) {
186
- throw new NodeOperationError(
187
- this.getNode(),
188
- createSubscriptionResponse.error
189
- );
219
+ throw new NodeApiError(this.getNode(), {
220
+ message:
221
+ createSubscriptionResponse.data.error.message,
222
+ });
190
223
  }
191
224
 
192
225
  const subscriptionId = createSubscriptionResponse.data.id;
@@ -217,8 +250,9 @@ export class LimeCrmTrigger implements INodeType {
217
250
  { ...webhook }
218
251
  );
219
252
  if (webhook.data.webhookId !== undefined) {
220
- const response = await deleteSubscription(this, webhook);
221
- if (!response.success) {
253
+ try {
254
+ await deleteSubscription(this, webhook);
255
+ } catch {
222
256
  Logger.error(
223
257
  `Failed to delete webhook with ID: ${webhook.data.webhookId}`,
224
258
  {
@@ -236,6 +270,26 @@ export class LimeCrmTrigger implements INodeType {
236
270
  },
237
271
  };
238
272
 
273
+ /**
274
+ * Main webhook handler — called when Lime CRM sends an event to this node.
275
+ *
276
+ * @returns The formatted webhook response data ready for n8n workflow processing.
277
+ *
278
+ * @throws NodeOperationError if authentication fails or webhook data is invalid.
279
+ *
280
+ * @example
281
+ * ```ts
282
+ * // Example webhook body:
283
+ * {
284
+ * "event": "deal.new",
285
+ * "body": {
286
+ * "id": 1001,
287
+ * "limetype": "deal",
288
+ * "values": { "company": 1001, "coworker": 1001, "probability": 0, ... }
289
+ * }
290
+ * }
291
+ * ```
292
+ */
239
293
  async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
240
294
  const webhook = getWebhook(this);
241
295
  Logger.info('Webhook received. Starting webhook processing...', {
@@ -0,0 +1,9 @@
1
+ export * from './utils';
2
+ export * from './methods';
3
+ export * from './models';
4
+ export * from './resources/data';
5
+ export * from './resources/metadata';
6
+ export * from './resources/admin';
7
+ export * from './transport';
8
+ export * from './LimeCrmNode.node';
9
+ export * from './LimeCrmTrigger.node';
@@ -5,14 +5,30 @@ import {
5
5
  } from 'n8n-workflow';
6
6
  import { getProperties } from '../transport/';
7
7
 
8
- async function _getProperties(nodeContext: ILoadOptionsFunctions) {
8
+ /**
9
+ * Fetch all properties for a specific Lime type.
10
+ *
11
+ * This is an internal helper function used by other load-options methods.
12
+ * It calls the Lime API to retrieve properties for the selected Limetype.
13
+ *
14
+ * @param nodeContext - The n8n load options context
15
+ * @returns An array of properties if successful, or an empty array otherwise.
16
+ *
17
+ * @internal
18
+ * @group Load Options Methods
19
+ */
20
+ async function fetchAllProperties(nodeContext: ILoadOptionsFunctions) {
9
21
  const limetype = nodeContext.getNodeParameter('limetype', '') as string;
10
22
  Logger.info(`Fetching file properties for Lime type: ${limetype}`);
11
23
  if (!limetype) return [];
12
-
13
- const response = await getProperties(nodeContext, limetype);
14
-
15
- return response.success ? response.data : [];
24
+ try {
25
+ const response = await getProperties(nodeContext, limetype);
26
+ if (!response.success) return [];
27
+ return response.data;
28
+ } catch (error) {
29
+ Logger.warn(`There was a problem with fetching properties: ${error}`);
30
+ return [];
31
+ }
16
32
  }
17
33
 
18
34
  /**
@@ -27,13 +43,16 @@ async function _getProperties(nodeContext: ILoadOptionsFunctions) {
27
43
  * @param [allowedTypes] - Optional set of property types to filter by
28
44
  * @param [forbiddenType] - Optional set of property types to exclude
29
45
  * @returns Array of formatted property options
46
+ *
47
+ * @public
48
+ * @group Load Options Methods
30
49
  */
31
50
  export async function getFilteredLimetypeProperties(
32
51
  loader: ILoadOptionsFunctions,
33
52
  allowedTypes?: Set<string>,
34
53
  forbiddenType?: Set<string>
35
54
  ): Promise<INodePropertyOptions[]> {
36
- const properties = await _getProperties(loader);
55
+ const properties = await fetchAllProperties(loader);
37
56
 
38
57
  return properties
39
58
  .filter(
@@ -44,22 +63,48 @@ export async function getFilteredLimetypeProperties(
44
63
  .map((property) => ({
45
64
  name: (property.localname as string) || (property.name as string),
46
65
  value: property.name as string,
47
- description: `Type: ${property.type as string}${(property.required as boolean) ? ' (Required)' : ''}`,
48
- }));
66
+ description: `Type: ${property.type as string} | Name: ${property.name as string}${(property.required as boolean) ? ' (Required)' : ''}`,
67
+ type: property.type,
68
+ }))
69
+ .sort((a, b) => a.name.localeCompare(b.name));
49
70
  }
50
71
 
72
+ /**
73
+ * Get all property options for the current Limetype.
74
+ *
75
+ * @returns Array of property options for the current Limetype.
76
+ *
77
+ * @public
78
+ * @group Load Options Methods
79
+ */
51
80
  export async function getLimetypeProperties(
52
81
  this: ILoadOptionsFunctions
53
82
  ): Promise<INodePropertyOptions[]> {
54
83
  return getFilteredLimetypeProperties(this);
55
84
  }
56
85
 
86
+ /**
87
+ * Get only file property options for the current Limetype.
88
+ *
89
+ * @returns Array of file property options
90
+ *
91
+ * @public
92
+ * @group Load Options Methods
93
+ */
57
94
  export async function getFileProperties(
58
95
  this: ILoadOptionsFunctions
59
96
  ): Promise<INodePropertyOptions[]> {
60
97
  return getFilteredLimetypeProperties(this, new Set(['file']));
61
98
  }
62
99
 
100
+ /**
101
+ * Get property options excluding those of type 'hasmany'.
102
+ *
103
+ * @returns Array of property options excluding 'hasmany' types
104
+ *
105
+ * @public
106
+ * @group Load Options Methods
107
+ */
63
108
  export async function getNoHasManyProperties(
64
109
  this: ILoadOptionsFunctions
65
110
  ): Promise<INodePropertyOptions[]> {
@@ -2,20 +2,26 @@ import { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
2
  import { getLimetypesFromApi } from '../transport';
3
3
 
4
4
  /**
5
- * Load available Lime types from the API
5
+ * Load available Limetypes from the API
6
+ *
7
+ * @returns Array of Limetypes options
8
+ *
9
+ * @public
10
+ * @group Load Options Methods
6
11
  */
7
12
  export async function getLimetypes(
8
13
  this: ILoadOptionsFunctions
9
14
  ): Promise<INodePropertyOptions[]> {
10
15
  const data: INodePropertyOptions[] = [];
11
16
  const response = await getLimetypesFromApi(this);
12
- if (response.success && response.data) {
13
- for (const limetype of response.data) {
14
- data.push({
15
- name: limetype.localname?.singular || limetype.name,
16
- value: limetype.name,
17
- });
18
- }
17
+ if (!response.success) return [];
18
+
19
+ for (const limetype of response.data) {
20
+ data.push({
21
+ name: limetype.localname?.singular || limetype.name,
22
+ value: limetype.name,
23
+ description: limetype.name,
24
+ });
19
25
  }
20
- return data;
26
+ return data.sort((a, b) => a.name.localeCompare(b.name));
21
27
  }
@@ -1,7 +1,12 @@
1
- export { getEntitiesForErpSystem } from './getEntitiesForErpSystem';
2
1
  export { getLimetypes } from './getLimetypes';
3
2
  export {
4
3
  getFileProperties,
4
+ getFilteredLimetypeProperties,
5
5
  getLimetypeProperties,
6
6
  getNoHasManyProperties,
7
7
  } from './getLimetypeProperties';
8
+ export {
9
+ getCreateMappingColumns,
10
+ getUpdateMappingColumns,
11
+ parseResourceMapperFields,
12
+ } from './resourceMapping';
@@ -0,0 +1,141 @@
1
+ import {
2
+ FieldType,
3
+ ILoadOptionsFunctions,
4
+ ResourceMapperFields,
5
+ LoggerProxy as Logger,
6
+ IExecuteFunctions,
7
+ IDataObject,
8
+ ResourceMapperValue,
9
+ } from 'n8n-workflow';
10
+ import { getProperties } from '../transport';
11
+ import { LimetypeProperty } from '../models';
12
+
13
+ /**
14
+ * A map of Lime CRM field types to n8n native types
15
+ */
16
+ const LimeCrmTypeToFieldType = new Map(
17
+ Object.entries({
18
+ option: 'options',
19
+ yesno: 'boolean',
20
+ decimal: 'number',
21
+ number: 'number',
22
+ })
23
+ );
24
+
25
+ /**
26
+ * Function which maps Lime CRM to n8n types using the map above. If the type
27
+ * is not declared in a map, string is used.
28
+ * @param limeCrmType
29
+ * @returns n8n native {@link FieldType}
30
+ */
31
+ function mapLimeCrmType(limeCrmType: string): FieldType {
32
+ return (LimeCrmTypeToFieldType.get(limeCrmType) as FieldType) || 'string';
33
+ }
34
+
35
+ /**
36
+ * Get a `length` addition to the input headers when there's a string field
37
+ *
38
+ * @param property - a {@link LimetypeProperty}
39
+ * @returns a string with length wrapped in quotes or an empty string
40
+ */
41
+ function getPropertyLength(property: LimetypeProperty): string {
42
+ return property.type === 'string' ? `(${property.length})` : '';
43
+ }
44
+
45
+ /**
46
+ * Base function to get the description of ResourceMapper fields
47
+ * @param nodeContext
48
+ * @param mode - either `create` or `update` - based on this flag a `required`
49
+ * @param limetype - name of a limetype we are creating or updating
50
+ * property is set
51
+ */
52
+ async function getMappingColumns(
53
+ nodeContext: ILoadOptionsFunctions,
54
+ mode: 'create' | 'update',
55
+ limetype: string
56
+ ): Promise<ResourceMapperFields> {
57
+ const propertiesResponse = await getProperties(nodeContext, limetype);
58
+ if (!propertiesResponse.success) {
59
+ Logger.error(
60
+ `There was an error with fetching properties: ${JSON.stringify(propertiesResponse.data)}`
61
+ );
62
+ return {
63
+ fields: [],
64
+ };
65
+ }
66
+ const noRelationProperties = propertiesResponse.data.filter(
67
+ (property) => property.type !== 'hasmany'
68
+ );
69
+
70
+ const fields = noRelationProperties.map((property) => {
71
+ const propertyLengthDescription = getPropertyLength(property);
72
+ return {
73
+ id: property.name,
74
+ displayName: `${property.localname} [${property.type}${propertyLengthDescription}]`,
75
+ required: mode === 'create' ? property.required : false,
76
+ defaultMatch: false,
77
+ display: true,
78
+ type: mapLimeCrmType(property.type),
79
+ options:
80
+ property.type === 'option' && property.options
81
+ ? property.options
82
+ .filter((option) => !option.inactive)
83
+ .map((option) => {
84
+ return {
85
+ value: option.key,
86
+ name: option.text,
87
+ };
88
+ })
89
+ : undefined,
90
+ };
91
+ });
92
+ return {
93
+ fields: fields.sort((a, b) => {
94
+ if (a.required !== b.required) {
95
+ return a.required ? -1 : 1;
96
+ }
97
+ return a.displayName.localeCompare(b.displayName);
98
+ }),
99
+ };
100
+ }
101
+
102
+ /**
103
+ * Parse resource mapper fields from n8n workflow
104
+ * @param context - Node execution context
105
+ * @param i - The index of the current item in the workflow execution
106
+ * @param inputName - name of the resource mapper input
107
+ * @returns IDataObject - parsed data from resource mapper
108
+ */
109
+
110
+ export function parseResourceMapperFields(
111
+ context: IExecuteFunctions,
112
+ i: number,
113
+ inputName: string
114
+ ): IDataObject {
115
+ const propertiesInput = context.getNodeParameter(
116
+ inputName,
117
+ i
118
+ ) as ResourceMapperValue;
119
+
120
+ return propertiesInput.value as IDataObject;
121
+ }
122
+
123
+ /**
124
+ * Method for getting resource mapper fields in `create` mode
125
+ */
126
+ export async function getCreateMappingColumns(
127
+ this: ILoadOptionsFunctions
128
+ ): Promise<ResourceMapperFields> {
129
+ const limetype = this.getNodeParameter('limetype') as string;
130
+ return getMappingColumns(this, 'create', limetype);
131
+ }
132
+
133
+ /**
134
+ * Method for getting resource mapper fields in `update` mode
135
+ */
136
+ export async function getUpdateMappingColumns(
137
+ this: ILoadOptionsFunctions
138
+ ): Promise<ResourceMapperFields> {
139
+ const limetype = this.getNodeParameter('limetype') as string;
140
+ return getMappingColumns(this, 'update', limetype);
141
+ }
@@ -0,0 +1,73 @@
1
+ // Credentials
2
+
3
+ /**
4
+ * Credential name for Lime CRM API nodes.
5
+ *
6
+ * @public
7
+ * @group Models
8
+ */
9
+ export const LIME_CRM_API_CREDENTIAL_KEY = 'limeCrmApi';
10
+
11
+ // Resources
12
+
13
+ /**
14
+ * Resource name for administrative data operations.
15
+ *
16
+ * @public
17
+ * @group Models
18
+ */
19
+ export const ADMIN_RESOURCE = 'admin';
20
+
21
+ /**
22
+ * Resource name for main data operations.
23
+ *
24
+ * @public
25
+ * @group Models
26
+ */
27
+ export const DATA_RESOURCE = 'data';
28
+
29
+ /**
30
+ * Resource name for metadata-related operations.
31
+ *
32
+ * @public
33
+ * @group Models
34
+ */
35
+ export const METADATA_RESOURCE = 'metadata';
36
+
37
+ /**
38
+ * Resource name for ERP connector-related operations.
39
+ *
40
+ * @internal
41
+ * @group Models
42
+ */
43
+ export const ERP_CONNECTOR_RESOURCE = 'erpConnector';
44
+
45
+ // Types
46
+
47
+ /**
48
+ * Helper type used when none value was provided in N8N form
49
+ * @public
50
+ * @group Models
51
+ */
52
+ export type NullOptionType = '';
53
+
54
+ /**
55
+ * Wrapper for generic return type of Lime CRM API values
56
+ */
57
+ export type APIResponsePrimitiveValue = string | boolean | number | null;
58
+
59
+ /**
60
+ * Wrapper for types of Lime CRM API values
61
+ */
62
+ export type APIResponseValue =
63
+ | APIResponsePrimitiveValue
64
+ | APIResponsePrimitiveValue[]
65
+ | Record<string, APIResponsePrimitiveValue>;
66
+
67
+ // API
68
+ /**
69
+ * Default limit when working with Lime CRM API
70
+ * @public
71
+ * @group Models
72
+ */
73
+ export const DEFAULT_API_OBJECT_LIMIT = 50;
@@ -0,0 +1,21 @@
1
+ export {
2
+ LIME_CRM_API_CREDENTIAL_KEY,
3
+ ADMIN_RESOURCE,
4
+ DATA_RESOURCE,
5
+ METADATA_RESOURCE,
6
+ ERP_CONNECTOR_RESOURCE,
7
+ DEFAULT_API_OBJECT_LIMIT,
8
+ NullOptionType,
9
+ APIResponseValue,
10
+ APIResponsePrimitiveValue,
11
+ } from './constants';
12
+ export { Limetype, LimetypeLocalName, LimetypeProperty } from './limetype';
13
+ export { Limeobject } from './limeobject';
14
+ export {
15
+ CreateWebhook,
16
+ Webhook,
17
+ WebhookContext,
18
+ WebhookFunctions,
19
+ } from './webhook';
20
+ export { User, UserLoginType, UserType } from './users';
21
+ export { YES_NO_PROPERTY_TYPE, PropertyTypeMap } from './propertyTypes';
@@ -0,0 +1,13 @@
1
+ import { APIResponseValue } from './constants';
2
+
3
+ /**
4
+ * Representation of a Limeobject returned by the Lime CRM API.
5
+ *
6
+ * @property id_ - The unique ID of the Limeobject
7
+ *
8
+ * @public
9
+ * @group Models
10
+ */
11
+ export type Limeobject = {
12
+ id_: number;
13
+ } & Record<string, APIResponseValue>;
@@ -0,0 +1,65 @@
1
+ import { APIResponseValue } from './constants';
2
+
3
+ /**
4
+ * Limetype option used only for fields with `option` type.
5
+ * @property key - ID of an option, used as a value for POST/PUT requests in API
6
+ * @property text - display name of an option
7
+ * @property inactive - flag describing whether the property is used or not
8
+ */
9
+ type LimetypePropertyOption = {
10
+ key: string;
11
+ text: string;
12
+ inactive: boolean;
13
+ };
14
+
15
+ /**
16
+ * Representation of a property of a Limetype.
17
+ *
18
+ * @property name - The internal name of the property
19
+ * @property localname - The display name of the property
20
+ * @property type - The type of the property (e.g., string, file, hasmany)
21
+ * @property required - describes whether a property is required or not
22
+ * @property options - a set of {@link LimetypePropertyOption} used only for
23
+ * fields with type `option`.
24
+ *
25
+ * @public
26
+ * @group Models
27
+ */
28
+ export type LimetypeProperty = {
29
+ name: string;
30
+ localname: string;
31
+ type: string;
32
+ required: boolean;
33
+ length?: number;
34
+ options?: LimetypePropertyOption[];
35
+ } & Record<string, APIResponseValue>;
36
+
37
+ /**
38
+ * Localized names for a Limetype.
39
+ *
40
+ * @property singular - Singular display name
41
+ * @property plural - Plural display name
42
+ *
43
+ * @public
44
+ * @group Models
45
+ */
46
+ export type LimetypeLocalName = {
47
+ singular: string;
48
+ plural: string;
49
+ };
50
+
51
+ /**
52
+ * Representation of a Limetype.
53
+ *
54
+ * @property name - Internal name of the Limetype
55
+ * @property localname - Localized names
56
+ * @property properties - List of properties of this Limetype
57
+ *
58
+ * @public
59
+ * @group Models
60
+ */
61
+ export type Limetype = {
62
+ name: string;
63
+ localname: LimetypeLocalName;
64
+ properties: LimetypeProperty[];
65
+ } & Record<string, APIResponseValue>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Module for defining Lime CRM types which will need to be adapted to the
3
+ * proper format later on.
4
+ */
5
+
6
+ export const YES_NO_PROPERTY_TYPE = 'yesno';
7
+
8
+ /**
9
+ * A map of <Lime CRM Type>:<The type required in JSON format>
10
+ */
11
+ export type PropertyTypeMap = {
12
+ YES_NO_PROPERTY_TYPE: boolean;
13
+ };