@limetech/n8n-nodes-lime 0.2.9 → 0.3.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 (271) hide show
  1. package/.dockerignore +1 -0
  2. package/.github/workflows/lint.yml +21 -0
  3. package/.github/workflows/release.yml +82 -0
  4. package/.github/workflows/test-and-build.yml +47 -0
  5. package/.prettierignore +4 -0
  6. package/.prettierrc.mjs +1 -0
  7. package/.releaserc.json +34 -0
  8. package/CHANGELOG.md +74 -0
  9. package/Dockerfile +21 -0
  10. package/README.md +4 -0
  11. package/credentials/FortnoxApi.credentials.ts +61 -0
  12. package/credentials/LimeCrmApi.credentials.ts +60 -0
  13. package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
  14. package/dist/credentials/FortnoxApi.credentials.js +57 -0
  15. package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
  16. package/dist/credentials/LimeCrmApi.credentials.js +3 -2
  17. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -1
  18. package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
  19. package/dist/nodes/fortnox/Fortnox.node.js +95 -0
  20. package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
  21. package/dist/nodes/fortnox/Fortnox.node.json +18 -0
  22. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
  23. package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
  24. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
  25. package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
  26. package/dist/nodes/fortnox/commons.d.ts +25 -0
  27. package/dist/nodes/fortnox/commons.js +44 -0
  28. package/dist/nodes/fortnox/commons.js.map +1 -0
  29. package/dist/nodes/fortnox/model.d.ts +20 -0
  30. package/dist/nodes/fortnox/model.js +3 -0
  31. package/dist/nodes/fortnox/model.js.map +1 -0
  32. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
  33. package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
  34. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
  35. package/dist/nodes/fortnox/resources/customers/index.d.ts +20 -0
  36. package/dist/nodes/fortnox/resources/customers/index.js +77 -0
  37. package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
  38. package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
  39. package/dist/nodes/fortnox/resources/customers/model.js +3 -0
  40. package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
  41. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +12 -0
  42. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +283 -0
  43. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
  44. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +10 -0
  45. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +36 -0
  46. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
  47. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +11 -0
  48. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +36 -0
  49. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
  50. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +11 -0
  51. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
  52. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
  53. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +12 -0
  54. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +267 -0
  55. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
  56. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
  57. package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
  58. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
  59. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
  60. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
  61. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
  62. package/dist/nodes/fortnox/resources/invoice/index.d.ts +20 -0
  63. package/dist/nodes/fortnox/resources/invoice/index.js +71 -0
  64. package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
  65. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
  66. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
  67. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
  68. package/dist/nodes/fortnox/resources/invoice/model.d.ts +150 -0
  69. package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
  70. package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
  71. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +11 -0
  72. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
  73. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
  74. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +11 -0
  75. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +35 -0
  76. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
  77. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +11 -0
  78. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
  79. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
  80. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +11 -0
  81. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +62 -0
  82. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
  83. package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
  84. package/dist/nodes/fortnox/transport/errorCodes.js +51 -0
  85. package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
  86. package/dist/nodes/fortnox/transport/index.d.ts +4 -0
  87. package/dist/nodes/fortnox/transport/index.js +72 -0
  88. package/dist/nodes/fortnox/transport/index.js.map +1 -0
  89. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  90. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +14 -0
  91. package/dist/nodes/lime-crm/LimeCrmNode.node.js +113 -0
  92. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  93. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
  94. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +200 -0
  95. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  96. package/dist/nodes/lime-crm/commons/constants.d.ts +4 -0
  97. package/dist/nodes/lime-crm/commons/constants.js +8 -0
  98. package/dist/nodes/lime-crm/commons/constants.js.map +1 -0
  99. package/dist/nodes/lime-crm/commons/index.d.ts +3 -0
  100. package/dist/nodes/lime-crm/commons/index.js +11 -0
  101. package/dist/nodes/lime-crm/commons/index.js.map +1 -0
  102. package/dist/nodes/lime-crm/commons/limetype.d.ts +10 -0
  103. package/dist/nodes/lime-crm/commons/limetype.js +3 -0
  104. package/dist/nodes/lime-crm/commons/limetype.js.map +1 -0
  105. package/dist/nodes/lime-crm/commons/task.d.ts +14 -0
  106. package/dist/nodes/lime-crm/commons/task.js +49 -0
  107. package/dist/nodes/lime-crm/commons/task.js.map +1 -0
  108. package/dist/nodes/lime-crm/commons/webhook.d.ts +16 -0
  109. package/dist/nodes/lime-crm/commons/webhook.js +30 -0
  110. package/dist/nodes/lime-crm/commons/webhook.js.map +1 -0
  111. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +5 -0
  112. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +12 -0
  113. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +1 -0
  114. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +2 -0
  115. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +21 -0
  116. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +1 -0
  117. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +2 -0
  118. package/dist/nodes/lime-crm/methods/getLimeTypes.js +21 -0
  119. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +1 -0
  120. package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
  121. package/dist/nodes/lime-crm/methods/index.js +10 -0
  122. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  123. package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +23 -0
  124. package/dist/nodes/lime-crm/resources/erpConnector/index.js +57 -0
  125. package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +1 -0
  126. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +26 -0
  127. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +65 -0
  128. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +1 -0
  129. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +9 -0
  130. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +220 -0
  131. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +1 -0
  132. package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +15 -0
  133. package/dist/nodes/lime-crm/resources/erpConnector/transform.js +12 -0
  134. package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +1 -0
  135. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +4 -0
  136. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +7 -0
  137. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +1 -0
  138. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +37 -0
  139. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +124 -0
  140. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +1 -0
  141. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +1 -0
  142. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +6 -0
  143. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +1 -0
  144. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +14 -0
  145. package/dist/nodes/lime-crm/resources/limeObject/index.js +78 -0
  146. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +1 -0
  147. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +9 -0
  148. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +139 -0
  149. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +1 -0
  150. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +9 -0
  151. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +51 -0
  152. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +1 -0
  153. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +9 -0
  154. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +51 -0
  155. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +1 -0
  156. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +9 -0
  157. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +86 -0
  158. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -0
  159. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +9 -0
  160. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +149 -0
  161. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +1 -0
  162. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +20 -0
  163. package/dist/nodes/lime-crm/resources/limeType/index.js +71 -0
  164. package/dist/nodes/lime-crm/resources/limeType/index.js.map +1 -0
  165. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +11 -0
  166. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +36 -0
  167. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +1 -0
  168. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +9 -0
  169. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +36 -0
  170. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +1 -0
  171. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +10 -0
  172. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +15 -0
  173. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +1 -0
  174. package/dist/nodes/lime-crm/transport/commons.d.ts +5 -0
  175. package/dist/nodes/lime-crm/transport/commons.js +33 -0
  176. package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
  177. package/dist/nodes/lime-crm/transport/erpConnector.d.ts +9 -0
  178. package/dist/nodes/lime-crm/transport/erpConnector.js +12 -0
  179. package/dist/nodes/lime-crm/transport/erpConnector.js.map +1 -0
  180. package/dist/nodes/lime-crm/transport/index.d.ts +5 -0
  181. package/dist/nodes/lime-crm/transport/index.js +22 -0
  182. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  183. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +7 -0
  184. package/dist/nodes/lime-crm/transport/limeobjects.js +49 -0
  185. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
  186. package/dist/nodes/lime-crm/transport/limetypes.d.ts +6 -0
  187. package/dist/nodes/lime-crm/transport/limetypes.js +40 -0
  188. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
  189. package/dist/nodes/lime-crm/transport/task.d.ts +13 -0
  190. package/dist/nodes/lime-crm/transport/task.js +14 -0
  191. package/dist/nodes/lime-crm/transport/task.js.map +1 -0
  192. package/dist/nodes/lime-crm/transport/webhooks.d.ts +15 -0
  193. package/dist/nodes/lime-crm/transport/webhooks.js +33 -0
  194. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
  195. package/dist/nodes/nodeResponse.d.ts +12 -0
  196. package/dist/nodes/nodeResponse.js +3 -0
  197. package/dist/nodes/nodeResponse.js.map +1 -0
  198. package/dist/package.json +36 -16
  199. package/dist/tsconfig.tsbuildinfo +1 -1
  200. package/docker-compose.yml +46 -0
  201. package/eslint.config.mjs +27 -0
  202. package/jest.config.js +11 -0
  203. package/nodes/fortnox/Fortnox.node.json +18 -0
  204. package/nodes/fortnox/Fortnox.node.ts +102 -0
  205. package/nodes/fortnox/FortnoxTrigger.node.json +18 -0
  206. package/nodes/fortnox/FortnoxTrigger.node.ts +196 -0
  207. package/nodes/fortnox/commons.ts +94 -0
  208. package/nodes/fortnox/fortnoxLogo.svg +15 -0
  209. package/nodes/fortnox/model.ts +25 -0
  210. package/nodes/fortnox/resources/customers/filterParameters.ts +47 -0
  211. package/nodes/fortnox/resources/customers/index.ts +57 -0
  212. package/nodes/fortnox/resources/customers/model.ts +107 -0
  213. package/nodes/fortnox/resources/customers/operations/create.operation.ts +303 -0
  214. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +44 -0
  215. package/nodes/fortnox/resources/customers/operations/get.operation.ts +45 -0
  216. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +80 -0
  217. package/nodes/fortnox/resources/customers/operations/update.operation.ts +278 -0
  218. package/nodes/fortnox/resources/customers/sortParameters.ts +32 -0
  219. package/nodes/fortnox/resources/invoice/filterParameters.ts +88 -0
  220. package/nodes/fortnox/resources/invoice/index.ts +51 -0
  221. package/nodes/fortnox/resources/invoice/invoiceParameters.ts +214 -0
  222. package/nodes/fortnox/resources/invoice/model.ts +160 -0
  223. package/nodes/fortnox/resources/invoice/operations/create.operation.ts +72 -0
  224. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +45 -0
  225. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +101 -0
  226. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +74 -0
  227. package/nodes/fortnox/transport/errorCodes.ts +62 -0
  228. package/nodes/fortnox/transport/index.ts +98 -0
  229. package/nodes/lime-crm/LimeCrm.node.json +18 -0
  230. package/nodes/lime-crm/LimeCrmNode.node.ts +135 -0
  231. package/nodes/lime-crm/LimeCrmTrigger.node.ts +263 -0
  232. package/nodes/lime-crm/assets/lime-crm.svg +1 -0
  233. package/nodes/lime-crm/commons/constants.ts +9 -0
  234. package/nodes/lime-crm/commons/index.ts +9 -0
  235. package/nodes/lime-crm/commons/limetype.ts +11 -0
  236. package/nodes/lime-crm/commons/task.ts +55 -0
  237. package/nodes/lime-crm/commons/webhook.ts +50 -0
  238. package/nodes/lime-crm/methods/getEntitiesForErpSystem.ts +11 -0
  239. package/nodes/lime-crm/methods/getLimeTypeProperties.ts +27 -0
  240. package/nodes/lime-crm/methods/getLimeTypes.ts +23 -0
  241. package/nodes/lime-crm/methods/index.ts +3 -0
  242. package/nodes/lime-crm/resources/erpConnector/index.ts +43 -0
  243. package/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.ts +69 -0
  244. package/nodes/lime-crm/resources/erpConnector/operations/transform.operation.ts +274 -0
  245. package/nodes/lime-crm/resources/erpConnector/transform.ts +49 -0
  246. package/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.ts +18 -0
  247. package/nodes/lime-crm/resources/erpConnector/transformers/fortnox.ts +201 -0
  248. package/nodes/lime-crm/resources/erpConnector/transformers/index.ts +1 -0
  249. package/nodes/lime-crm/resources/limeObject/index.ts +64 -0
  250. package/nodes/lime-crm/resources/limeObject/operations/create.operation.ts +152 -0
  251. package/nodes/lime-crm/resources/limeObject/operations/delete.operation.ts +55 -0
  252. package/nodes/lime-crm/resources/limeObject/operations/get.operation.ts +54 -0
  253. package/nodes/lime-crm/resources/limeObject/operations/search.operation.ts +99 -0
  254. package/nodes/lime-crm/resources/limeObject/operations/update.operation.ts +157 -0
  255. package/nodes/lime-crm/resources/limeType/index.ts +58 -0
  256. package/nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts +42 -0
  257. package/nodes/lime-crm/resources/limeType/operations/getType.operation.ts +36 -0
  258. package/nodes/lime-crm/resources/limeType/operations/listTypes.operation.ts +18 -0
  259. package/nodes/lime-crm/transport/commons.ts +44 -0
  260. package/nodes/lime-crm/transport/erpConnector.ts +21 -0
  261. package/nodes/lime-crm/transport/index.ts +17 -0
  262. package/nodes/lime-crm/transport/limeobjects.ts +83 -0
  263. package/nodes/lime-crm/transport/limetypes.ts +68 -0
  264. package/nodes/lime-crm/transport/task.ts +32 -0
  265. package/nodes/lime-crm/transport/webhooks.ts +61 -0
  266. package/nodes/nodeResponse.ts +13 -0
  267. package/package.json +36 -16
  268. package/tests/fixtures/fortnox.ts +182 -0
  269. package/tests/transform.spec.ts +187 -0
  270. package/tsconfig.json +30 -0
  271. package/index.js +0 -3
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.properties = exports.description = void 0;
4
+ const transport_1 = require("../../../transport");
5
+ const commons_1 = require("../../../commons");
6
+ exports.description = {
7
+ name: 'Create Object',
8
+ value: 'create',
9
+ description: 'Create a new object',
10
+ action: 'Create an object',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'LimeType',
15
+ name: 'limeType',
16
+ type: 'options',
17
+ typeOptions: {
18
+ loadOptionsMethod: 'getLimeTypes',
19
+ },
20
+ required: true,
21
+ default: '',
22
+ description: 'The type of entity to create',
23
+ displayOptions: {
24
+ show: {
25
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
26
+ operation: ['create'],
27
+ },
28
+ },
29
+ },
30
+ {
31
+ displayName: 'Input Method',
32
+ name: 'inputMethod',
33
+ type: 'options',
34
+ options: [
35
+ {
36
+ name: 'Form Fields',
37
+ value: 'fields',
38
+ },
39
+ {
40
+ name: 'JSON',
41
+ value: 'json',
42
+ },
43
+ ],
44
+ default: 'fields',
45
+ description: 'How to input the object data',
46
+ displayOptions: {
47
+ show: {
48
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
49
+ operation: ['create'],
50
+ },
51
+ },
52
+ },
53
+ {
54
+ displayName: 'Properties',
55
+ name: 'properties',
56
+ type: 'fixedCollection',
57
+ placeholder: 'Add Property',
58
+ typeOptions: {
59
+ multipleValues: true,
60
+ sortable: true,
61
+ loadOptionsMethod: 'getLimeTypeProperties',
62
+ loadOptionsDependsOn: ['limeType'],
63
+ },
64
+ default: {},
65
+ displayOptions: {
66
+ show: {
67
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
68
+ operation: ['create'],
69
+ inputMethod: ['fields'],
70
+ },
71
+ },
72
+ options: [
73
+ {
74
+ displayName: 'Property',
75
+ name: 'property',
76
+ values: [
77
+ {
78
+ displayName: 'Property Name',
79
+ name: 'name',
80
+ type: 'options',
81
+ typeOptions: {
82
+ loadOptionsMethod: 'getLimeTypeProperties',
83
+ loadOptionsDependsOn: ['limeType'],
84
+ },
85
+ default: '',
86
+ description: 'Name of the property',
87
+ },
88
+ {
89
+ displayName: 'Property Value',
90
+ name: 'value',
91
+ type: 'string',
92
+ default: '',
93
+ description: 'Value of the property',
94
+ },
95
+ ],
96
+ },
97
+ ],
98
+ },
99
+ {
100
+ displayName: 'Object (JSON)',
101
+ name: 'objectJson',
102
+ type: 'json',
103
+ default: '{\n "name": "New Company",\n "phone": "123-456-7890"\n}',
104
+ description: 'Object to create in JSON format',
105
+ displayOptions: {
106
+ show: {
107
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
108
+ operation: ['create'],
109
+ inputMethod: ['json'],
110
+ },
111
+ },
112
+ typeOptions: {
113
+ alwaysOpenEditWindow: true,
114
+ },
115
+ },
116
+ ];
117
+ async function execute(i) {
118
+ const limeType = this.getNodeParameter('limeType', i);
119
+ const inputMethod = this.getNodeParameter('inputMethod', i);
120
+ let objectData;
121
+ if (inputMethod === 'json') {
122
+ const jsonInput = this.getNodeParameter('objectJson', i);
123
+ objectData = JSON.parse(jsonInput);
124
+ }
125
+ else {
126
+ objectData = {};
127
+ const propertiesInput = this.getNodeParameter('properties.property', i, []);
128
+ if (propertiesInput && propertiesInput.length > 0) {
129
+ for (const prop of propertiesInput) {
130
+ if (prop.name && prop.value !== undefined) {
131
+ objectData[prop.name] = prop.value;
132
+ }
133
+ }
134
+ }
135
+ }
136
+ return await (0, transport_1.createLimeObject)(this, limeType, objectData);
137
+ }
138
+ exports.execute = execute;
139
+ //# sourceMappingURL=create.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeObject/operations/create.operation.ts"],"names":[],"mappings":";;;AAEA,kDAAsD;AACtD,8CAAuD;AAE1C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,qBAAqB;IAClC,MAAM,EAAE,kBAAkB;CAC7B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;SACpC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;QAC3C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;IAGD;QACI,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,QAAQ;aAClB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aAChB;SACJ;QACD,OAAO,EAAE,QAAQ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{ IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: {
3
+ name: string;
4
+ value: string;
5
+ description: string;
6
+ action: string;
7
+ };
8
+ export declare const properties: INodeProperties[];
9
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<import("../../../../nodeResponse").NodeResponse<void>>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.properties = exports.description = void 0;
4
+ const transport_1 = require("../../../transport");
5
+ const commons_1 = require("../../../commons");
6
+ exports.description = {
7
+ name: 'Delete Object',
8
+ value: 'delete',
9
+ description: 'Delete an existing object',
10
+ action: 'Delete an object',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'Lime Type',
15
+ name: 'limeType',
16
+ type: 'options',
17
+ typeOptions: {
18
+ loadOptionsMethod: 'getLimeTypes',
19
+ },
20
+ required: true,
21
+ default: '',
22
+ description: 'The type of entity to delete',
23
+ displayOptions: {
24
+ show: {
25
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
26
+ operation: ['delete'],
27
+ },
28
+ },
29
+ },
30
+ {
31
+ displayName: 'Object ID',
32
+ name: 'objectId',
33
+ type: 'string',
34
+ required: true,
35
+ default: '',
36
+ description: 'The ID of the object to delete',
37
+ displayOptions: {
38
+ show: {
39
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
40
+ operation: ['delete'],
41
+ },
42
+ },
43
+ },
44
+ ];
45
+ async function execute(i) {
46
+ const limeType = this.getNodeParameter('limeType', i);
47
+ const objectId = this.getNodeParameter('objectId', i);
48
+ return await (0, transport_1.deleteLimeObject)(this, limeType, objectId);
49
+ }
50
+ exports.execute = execute;
51
+ //# sourceMappingURL=delete.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeObject/operations/delete.operation.ts"],"names":[],"mappings":";;;AAEA,kDAAsD;AACtD,8CAAuD;AAE1C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,2BAA2B;IACxC,MAAM,EAAE,kBAAkB;CAC7B,CAAC;AAEW,QAAA,UAAU,GAAsB;IAEzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;SACpC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;QAC3C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;IAGD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAEhE,OAAO,MAAM,IAAA,4BAAgB,EAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC5D,CAAC;AALD,0BAKC"}
@@ -0,0 +1,9 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: {
3
+ name: string;
4
+ value: string;
5
+ description: string;
6
+ action: string;
7
+ };
8
+ export declare const properties: INodeProperties[];
9
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<import("../../../../nodeResponse").NodeResponse<unknown>>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.properties = exports.description = void 0;
4
+ const transport_1 = require("../../../transport");
5
+ const commons_1 = require("../../../commons");
6
+ exports.description = {
7
+ name: 'Get Object',
8
+ value: 'get',
9
+ description: 'Get a single object by ID',
10
+ action: 'Get an object',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'Lime Type',
15
+ name: 'limeType',
16
+ type: 'options',
17
+ typeOptions: {
18
+ loadOptionsMethod: 'getLimeTypes',
19
+ },
20
+ required: true,
21
+ default: '',
22
+ description: 'The type of entity to retrieve',
23
+ displayOptions: {
24
+ show: {
25
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
26
+ operation: ['get'],
27
+ },
28
+ },
29
+ },
30
+ {
31
+ displayName: 'Object ID',
32
+ name: 'objectId',
33
+ type: 'string',
34
+ required: true,
35
+ default: '',
36
+ description: 'The ID of the object to retrieve',
37
+ displayOptions: {
38
+ show: {
39
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
40
+ operation: ['get'],
41
+ },
42
+ },
43
+ },
44
+ ];
45
+ async function execute(i) {
46
+ const limeType = this.getNodeParameter('limeType', i);
47
+ const objectId = this.getNodeParameter('objectId', i);
48
+ return (0, transport_1.getLimeObject)(this, limeType, objectId);
49
+ }
50
+ exports.execute = execute;
51
+ //# sourceMappingURL=get.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeObject/operations/get.operation.ts"],"names":[],"mappings":";;;AAEA,kDAAmD;AACnD,8CAAuD;AAE1C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,2BAA2B;IACxC,MAAM,EAAE,eAAe;CAC1B,CAAC;AAEW,QAAA,UAAU,GAAsB;IAEzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;SACpC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,KAAK,CAAC;aACrB;SACJ;KACJ;IAGD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kCAAkC;QAC/C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,KAAK,CAAC;aACrB;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAChE,OAAO,IAAA,yBAAa,EAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC;AAJD,0BAIC"}
@@ -0,0 +1,9 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: {
3
+ name: string;
4
+ value: string;
5
+ description: string;
6
+ action: string;
7
+ };
8
+ export declare const properties: INodeProperties[];
9
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<import("../../../../nodeResponse").NodeResponse<object[]>>;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.properties = exports.description = void 0;
4
+ const transport_1 = require("../../../transport");
5
+ const commons_1 = require("../../../commons");
6
+ exports.description = {
7
+ name: 'Search',
8
+ value: 'search',
9
+ description: 'Search for objects',
10
+ action: 'Search for objects',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'Lime Type',
15
+ name: 'limeType',
16
+ type: 'options',
17
+ typeOptions: {
18
+ loadOptionsMethod: 'getLimeTypes',
19
+ },
20
+ required: true,
21
+ default: '',
22
+ description: 'The type of entity to search for',
23
+ displayOptions: {
24
+ show: {
25
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
26
+ operation: ['search'],
27
+ },
28
+ },
29
+ },
30
+ {
31
+ displayName: 'Search Term',
32
+ name: 'searchTerm',
33
+ type: 'string',
34
+ default: '',
35
+ description: 'Term to search for',
36
+ displayOptions: {
37
+ show: {
38
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
39
+ operation: ['search'],
40
+ },
41
+ },
42
+ },
43
+ {
44
+ displayName: 'Search Fields',
45
+ name: 'searchField',
46
+ type: 'options',
47
+ typeOptions: {
48
+ loadOptionsMethod: 'getLimeTypeProperties',
49
+ loadOptionsDependsOn: ['limeType'],
50
+ },
51
+ default: [],
52
+ description: 'Fields to search in. If none selected, searches across all searchable fields',
53
+ displayOptions: {
54
+ show: {
55
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
56
+ operation: ['search'],
57
+ },
58
+ },
59
+ },
60
+ {
61
+ displayName: 'Limit',
62
+ name: 'limit',
63
+ type: 'number',
64
+ default: 50,
65
+ description: 'Max number of results to return',
66
+ typeOptions: {
67
+ minValue: 1,
68
+ },
69
+ displayOptions: {
70
+ show: {
71
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
72
+ operation: ['search'],
73
+ },
74
+ },
75
+ },
76
+ ];
77
+ async function execute(i) {
78
+ const limeType = this.getNodeParameter('limeType', i);
79
+ const searchTerm = this.getNodeParameter('searchTerm', i, '');
80
+ const searchField = this.getNodeParameter('searchField', i);
81
+ const limit = this.getNodeParameter('limit', i, 50);
82
+ const options = this.getNodeParameter('options', i, {});
83
+ return await (0, transport_1.searchLimeObject)(this, limeType, searchField, searchTerm, limit || null, options.sortField || null);
84
+ }
85
+ exports.execute = execute;
86
+ //# sourceMappingURL=search.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeObject/operations/search.operation.ts"],"names":[],"mappings":";;;AACA,kDAAsD;AACtD,8CAAuD;AAE1C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,oBAAoB;IACjC,MAAM,EAAE,oBAAoB;CAC/B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;SACpC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kCAAkC;QAC/C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;IAGD;QACI,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,oBAAoB;QACjC,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;IAGD;QACI,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAA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 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: {
3
+ name: string;
4
+ value: string;
5
+ description: string;
6
+ action: string;
7
+ };
8
+ export declare const properties: INodeProperties[];
9
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<import("../../../../nodeResponse").NodeResponse<unknown>>;
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.properties = exports.description = void 0;
4
+ const transport_1 = require("../../../transport");
5
+ const commons_1 = require("../../../commons");
6
+ exports.description = {
7
+ name: 'Update',
8
+ value: 'update',
9
+ description: 'Update an existing record',
10
+ action: 'Update a record',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'LimeType',
15
+ name: 'limeType',
16
+ type: 'options',
17
+ typeOptions: {
18
+ loadOptionsMethod: 'getLimeTypes',
19
+ },
20
+ required: true,
21
+ default: '',
22
+ description: 'The type of entity to update',
23
+ displayOptions: {
24
+ show: {
25
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
26
+ operation: ['update'],
27
+ },
28
+ },
29
+ },
30
+ {
31
+ displayName: 'Record ID',
32
+ name: 'id',
33
+ type: 'string',
34
+ required: true,
35
+ default: '',
36
+ description: 'ID of the record to update',
37
+ displayOptions: {
38
+ show: {
39
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
40
+ operation: ['update'],
41
+ },
42
+ },
43
+ },
44
+ {
45
+ displayName: 'Input Type',
46
+ name: 'inputType',
47
+ type: 'options',
48
+ options: [
49
+ {
50
+ name: 'Simple Fields',
51
+ value: 'simple',
52
+ description: 'Define fields using the UI',
53
+ },
54
+ {
55
+ name: 'JSON Object',
56
+ value: 'json',
57
+ description: 'Define fields using JSON',
58
+ },
59
+ ],
60
+ default: 'simple',
61
+ description: 'How to input the data',
62
+ displayOptions: {
63
+ show: {
64
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
65
+ operation: ['update'],
66
+ },
67
+ },
68
+ },
69
+ {
70
+ displayName: 'Data',
71
+ name: 'jsonData',
72
+ type: 'json',
73
+ default: '{\n "name": "Updated Company Name",\n "phone": "+987654321"\n}',
74
+ description: 'Key-value pairs for fields to update. Property names must match the Lime CRM field names.',
75
+ typeOptions: {
76
+ alwaysOpenEditWindow: true,
77
+ },
78
+ displayOptions: {
79
+ show: {
80
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
81
+ operation: ['update'],
82
+ inputType: ['json'],
83
+ },
84
+ },
85
+ },
86
+ {
87
+ displayName: 'Fields',
88
+ name: 'simpleFields',
89
+ placeholder: 'Add Field',
90
+ type: 'fixedCollection',
91
+ typeOptions: {
92
+ multipleValues: true,
93
+ sortable: true,
94
+ },
95
+ default: {},
96
+ displayOptions: {
97
+ show: {
98
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
99
+ operation: ['update'],
100
+ inputType: ['simple'],
101
+ },
102
+ },
103
+ options: [
104
+ {
105
+ name: 'field',
106
+ displayName: 'Field',
107
+ values: [
108
+ {
109
+ displayName: 'Field Name',
110
+ name: 'fieldName',
111
+ type: 'options',
112
+ typeOptions: {
113
+ loadOptionsMethod: 'getLimeTypeProperties',
114
+ loadOptionsDependsOn: ['limeType'],
115
+ },
116
+ default: '',
117
+ description: 'The name of the field',
118
+ },
119
+ {
120
+ displayName: 'Field Value',
121
+ name: 'fieldValue',
122
+ type: 'string',
123
+ default: '',
124
+ description: 'The value of the field',
125
+ },
126
+ ],
127
+ },
128
+ ],
129
+ },
130
+ ];
131
+ async function execute(i) {
132
+ const limeType = this.getNodeParameter('limeType', i);
133
+ const id = this.getNodeParameter('id', i);
134
+ const inputType = this.getNodeParameter('inputType', i);
135
+ let body = {};
136
+ if (inputType === 'json') {
137
+ const jsonData = this.getNodeParameter('jsonData', i);
138
+ body = JSON.parse(jsonData);
139
+ }
140
+ else {
141
+ const simpleFields = this.getNodeParameter('simpleFields.field', i, []);
142
+ for (const field of simpleFields) {
143
+ body[field.fieldName] = field.fieldValue;
144
+ }
145
+ }
146
+ return (0, transport_1.updateLimeObject)(this, limeType, id, body);
147
+ }
148
+ exports.execute = execute;
149
+ //# sourceMappingURL=update.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeObject/operations/update.operation.ts"],"names":[],"mappings":";;;AACA,kDAAsD;AACtD,8CAAuD;AAG1C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,2BAA2B;IACxC,MAAM,EAAE,iBAAiB;CAC5B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;SACpC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;QAC3C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;IACD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;QACzC,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,6BAAmB,CAAC;gBAC/B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;IACD;QACI,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,4BAA4B;aAC5C;YACD;gBACI,IAAI,EAAE,aAA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D,OAAO,EAAE,EAAE;wBACX,WAAW,EAAE,uBAAuB;qBACvC;oBACD;wBACI,WAAW,EAAE,aAAa;wBAC1B,IAAI,EAAE,YAAY;wBAClB,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,EAAE;wBACX,WAAW,EAAE,wBAAwB;qBACxC;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAChE,MAAM,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAW,CAAC;IACpD,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;IAElE,IAAI,IAAI,GAAgB,EAAE,CAAC;IAE3B,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QAChE,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;SAAM,CAAC;QACJ,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CACtC,oBAAoB,EACpB,CAAC,EACD,EAAE,CACY,CAAC;QACnB,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;YAC/B,IAAI,CAAC,KAAK,CAAC,SAAmB,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;QACvD,CAAC;IACL,CAAC;IAED,OAAO,IAAA,4BAAgB,EAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;AACtD,CAAC;AAtBD,0BAsBC"}
@@ -0,0 +1,20 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const limeTypeFields: INodeProperties[];
3
+ export declare function limeTypeOperations(this: IExecuteFunctions, { operation, i }: {
4
+ operation: string;
5
+ i: number;
6
+ }): Promise<{
7
+ success: false;
8
+ error: string;
9
+ status?: number | undefined;
10
+ metadata?: Record<string, unknown> | undefined;
11
+ } | {
12
+ success: true;
13
+ data: import("../../commons").LimeType[];
14
+ } | {
15
+ success: true;
16
+ data: import("../../commons").LimeType;
17
+ } | {
18
+ success: true;
19
+ data: import("../../commons").LimeTypeProperty[];
20
+ } | null>;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.limeTypeOperations = exports.limeTypeFields = void 0;
27
+ const getType = __importStar(require("./operations/getType.operation"));
28
+ const listTypes = __importStar(require("./operations/listTypes.operation"));
29
+ const getProperties = __importStar(require("./operations/getProperties.operation"));
30
+ const commons_1 = require("../../commons");
31
+ exports.limeTypeFields = [
32
+ {
33
+ displayName: 'Operation',
34
+ name: 'operation',
35
+ type: 'options',
36
+ noDataExpression: true,
37
+ displayOptions: {
38
+ show: {
39
+ resource: [commons_1.LIMETYPE_RESOURCE],
40
+ },
41
+ },
42
+ options: [
43
+ {
44
+ ...listTypes.description,
45
+ },
46
+ {
47
+ ...getType.description,
48
+ },
49
+ {
50
+ ...getProperties.description,
51
+ },
52
+ ],
53
+ default: 'listTypes',
54
+ },
55
+ ...getType.properties,
56
+ ...getProperties.properties,
57
+ ];
58
+ async function limeTypeOperations({ operation, i }) {
59
+ if (operation === 'listTypes') {
60
+ return await listTypes.execute.call(this);
61
+ }
62
+ if (operation === 'getType') {
63
+ return await getType.execute.call(this, i);
64
+ }
65
+ if (operation === 'getProperties') {
66
+ return await getProperties.execute.call(this, i);
67
+ }
68
+ return null;
69
+ }
70
+ exports.limeTypeOperations = limeTypeOperations;
71
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/lime-crm/resources/limeType/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wEAA0D;AAC1D,4EAA8D;AAC9D,oFAAsE;AACtE,2CAAkD;AAErC,QAAA,cAAc,GAAsB;IAC7C;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAA8B;QACpC,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,2BAAiB,CAAC;aAChC;SACJ;QACD,OAAO,EAAE;YACL;gBACI,GAAG,SAAS,CAAC,WAAW;aAC3B;YACD;gBACI,GAAG,OAAO,CAAC,WAAW;aACzB;YACD;gBACI,GAAG,aAAa,CAAC,WAAW;aAC/B;SACJ;QACD,OAAO,EAAE,WAAW;KACvB;IAGD,GAAG,OAAO,CAAC,UAAU;IACrB,GAAG,aAAa,CAAC,UAAU;CAC9B,CAAC;AAGK,KAAK,UAAU,kBAAkB,CAEpC,EAAE,SAAS,EAAE,CAAC,EAAoC;IAElD,IAAI,SAAS,KAAK,WAAW,EAAE,CAAC;QAC5B,OAAO,MAAM,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,SAAS,KAAK,eAAe,EAAE,CAAC;QAChC,OAAO,MAAM,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAfD,gDAeC"}
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { LimeTypeProperty } from '../../../commons';
3
+ import { NodeResponse } from '../../../../nodeResponse';
4
+ export declare const description: {
5
+ name: string;
6
+ value: string;
7
+ description: string;
8
+ action: string;
9
+ };
10
+ export declare const properties: INodeProperties[];
11
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<LimeTypeProperty[]>>;