@limetech/n8n-nodes-lime 2.5.2 → 2.5.4

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 (238) hide show
  1. package/.releaserc.json +1 -0
  2. package/CHANGELOG.md +14 -0
  3. package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
  4. package/dist/credentials/FortnoxApi.credentials.js +57 -0
  5. package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
  6. package/dist/credentials/LimeCrmApi.credentials.d.ts +9 -0
  7. package/dist/credentials/LimeCrmApi.credentials.js +70 -0
  8. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -0
  9. package/dist/credentials/index.d.ts +2 -0
  10. package/dist/credentials/index.js +19 -0
  11. package/dist/credentials/index.js.map +1 -0
  12. package/dist/nodes/errorHandling.d.ts +11 -0
  13. package/dist/nodes/errorHandling.js +20 -0
  14. package/dist/nodes/errorHandling.js.map +1 -0
  15. package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
  16. package/dist/nodes/fortnox/Fortnox.node.js +95 -0
  17. package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
  18. package/dist/nodes/fortnox/Fortnox.node.json +18 -0
  19. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
  20. package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
  21. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
  22. package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
  23. package/dist/nodes/fortnox/commons.d.ts +25 -0
  24. package/dist/nodes/fortnox/commons.js +44 -0
  25. package/dist/nodes/fortnox/commons.js.map +1 -0
  26. package/dist/nodes/fortnox/fortnoxLogo.svg +15 -0
  27. package/dist/nodes/fortnox/index.d.ts +6 -0
  28. package/dist/nodes/fortnox/index.js +23 -0
  29. package/dist/nodes/fortnox/index.js.map +1 -0
  30. package/dist/nodes/fortnox/model.d.ts +20 -0
  31. package/dist/nodes/fortnox/model.js +3 -0
  32. package/dist/nodes/fortnox/model.js.map +1 -0
  33. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
  34. package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
  35. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
  36. package/dist/nodes/fortnox/resources/customers/index.d.ts +7 -0
  37. package/dist/nodes/fortnox/resources/customers/index.js +85 -0
  38. package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
  39. package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
  40. package/dist/nodes/fortnox/resources/customers/model.js +3 -0
  41. package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
  42. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +10 -0
  43. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +281 -0
  44. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
  45. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +9 -0
  46. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +38 -0
  47. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
  48. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +10 -0
  49. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +38 -0
  50. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
  51. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +10 -0
  52. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
  53. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
  54. package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +5 -0
  55. package/dist/nodes/fortnox/resources/customers/operations/index.js +42 -0
  56. package/dist/nodes/fortnox/resources/customers/operations/index.js.map +1 -0
  57. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +10 -0
  58. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +261 -0
  59. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
  60. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
  61. package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
  62. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
  63. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
  64. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
  65. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
  66. package/dist/nodes/fortnox/resources/invoice/index.d.ts +7 -0
  67. package/dist/nodes/fortnox/resources/invoice/index.js +81 -0
  68. package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
  69. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
  70. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
  71. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
  72. package/dist/nodes/fortnox/resources/invoice/model.d.ts +147 -0
  73. package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
  74. package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
  75. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +10 -0
  76. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
  77. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
  78. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +10 -0
  79. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +37 -0
  80. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
  81. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +10 -0
  82. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
  83. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
  84. package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +4 -0
  85. package/dist/nodes/fortnox/resources/invoice/operations/index.js +41 -0
  86. package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +1 -0
  87. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +10 -0
  88. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +64 -0
  89. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
  90. package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
  91. package/dist/nodes/fortnox/transport/errorCodes.js +50 -0
  92. package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
  93. package/dist/nodes/fortnox/transport/index.d.ts +3 -0
  94. package/dist/nodes/fortnox/transport/index.js +76 -0
  95. package/dist/nodes/fortnox/transport/index.js.map +1 -0
  96. package/dist/nodes/index.d.ts +4 -0
  97. package/dist/nodes/index.js +21 -0
  98. package/dist/nodes/index.js.map +1 -0
  99. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  100. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +19 -0
  101. package/dist/nodes/lime-crm/LimeCrmNode.node.js +122 -0
  102. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  103. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
  104. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +215 -0
  105. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  106. package/dist/nodes/lime-crm/assets/lime-crm.svg +1 -0
  107. package/dist/nodes/lime-crm/index.d.ts +9 -0
  108. package/dist/nodes/lime-crm/index.js +26 -0
  109. package/dist/nodes/lime-crm/index.js.map +1 -0
  110. package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +5 -0
  111. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +47 -0
  112. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -0
  113. package/dist/nodes/lime-crm/methods/getLimetypes.d.ts +2 -0
  114. package/dist/nodes/lime-crm/methods/getLimetypes.js +20 -0
  115. package/dist/nodes/lime-crm/methods/getLimetypes.js.map +1 -0
  116. package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
  117. package/dist/nodes/lime-crm/methods/index.js +15 -0
  118. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  119. package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +4 -0
  120. package/dist/nodes/lime-crm/methods/resourceMapping.js +71 -0
  121. package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -0
  122. package/dist/nodes/lime-crm/models/constants.d.ts +9 -0
  123. package/dist/nodes/lime-crm/models/constants.js +10 -0
  124. package/dist/nodes/lime-crm/models/constants.js.map +1 -0
  125. package/dist/nodes/lime-crm/models/index.d.ts +6 -0
  126. package/dist/nodes/lime-crm/models/index.js +13 -0
  127. package/dist/nodes/lime-crm/models/index.js.map +1 -0
  128. package/dist/nodes/lime-crm/models/limeobject.d.ts +4 -0
  129. package/dist/nodes/lime-crm/models/limeobject.js +3 -0
  130. package/dist/nodes/lime-crm/models/limeobject.js.map +1 -0
  131. package/dist/nodes/lime-crm/models/limetype.d.ts +24 -0
  132. package/dist/nodes/lime-crm/models/limetype.js +3 -0
  133. package/dist/nodes/lime-crm/models/limetype.js.map +1 -0
  134. package/dist/nodes/lime-crm/models/propertyTypes.d.ts +4 -0
  135. package/dist/nodes/lime-crm/models/propertyTypes.js +5 -0
  136. package/dist/nodes/lime-crm/models/propertyTypes.js.map +1 -0
  137. package/dist/nodes/lime-crm/models/users.d.ts +13 -0
  138. package/dist/nodes/lime-crm/models/users.js +3 -0
  139. package/dist/nodes/lime-crm/models/users.js.map +1 -0
  140. package/dist/nodes/lime-crm/models/webhook.d.ts +18 -0
  141. package/dist/nodes/lime-crm/models/webhook.js +3 -0
  142. package/dist/nodes/lime-crm/models/webhook.js.map +1 -0
  143. package/dist/nodes/lime-crm/resources/admin/index.d.ts +7 -0
  144. package/dist/nodes/lime-crm/resources/admin/index.js +89 -0
  145. package/dist/nodes/lime-crm/resources/admin/index.js.map +1 -0
  146. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.d.ts +11 -0
  147. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js +123 -0
  148. package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js.map +1 -0
  149. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.d.ts +11 -0
  150. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js +87 -0
  151. package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js.map +1 -0
  152. package/dist/nodes/lime-crm/resources/admin/operations/index.d.ts +2 -0
  153. package/dist/nodes/lime-crm/resources/admin/operations/index.js +39 -0
  154. package/dist/nodes/lime-crm/resources/admin/operations/index.js.map +1 -0
  155. package/dist/nodes/lime-crm/resources/data/index.d.ts +7 -0
  156. package/dist/nodes/lime-crm/resources/data/index.js +108 -0
  157. package/dist/nodes/lime-crm/resources/data/index.js.map +1 -0
  158. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.d.ts +11 -0
  159. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js +124 -0
  160. package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js.map +1 -0
  161. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.d.ts +10 -0
  162. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js +52 -0
  163. package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js.map +1 -0
  164. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.d.ts +11 -0
  165. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js +299 -0
  166. package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js.map +1 -0
  167. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.d.ts +9 -0
  168. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js +125 -0
  169. package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js.map +1 -0
  170. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.d.ts +11 -0
  171. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js +79 -0
  172. package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js.map +1 -0
  173. package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +6 -0
  174. package/dist/nodes/lime-crm/resources/data/operations/index.js +43 -0
  175. package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -0
  176. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.d.ts +11 -0
  177. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js +146 -0
  178. package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js.map +1 -0
  179. package/dist/nodes/lime-crm/resources/metadata/index.d.ts +7 -0
  180. package/dist/nodes/lime-crm/resources/metadata/index.js +93 -0
  181. package/dist/nodes/lime-crm/resources/metadata/index.js.map +1 -0
  182. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.d.ts +10 -0
  183. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js +16 -0
  184. package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js.map +1 -0
  185. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.d.ts +11 -0
  186. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js +113 -0
  187. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js.map +1 -0
  188. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.d.ts +11 -0
  189. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js +37 -0
  190. package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js.map +1 -0
  191. package/dist/nodes/lime-crm/resources/metadata/operations/index.d.ts +3 -0
  192. package/dist/nodes/lime-crm/resources/metadata/operations/index.js +40 -0
  193. package/dist/nodes/lime-crm/resources/metadata/operations/index.js.map +1 -0
  194. package/dist/nodes/lime-crm/transport/commons.d.ts +14 -0
  195. package/dist/nodes/lime-crm/transport/commons.js +52 -0
  196. package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
  197. package/dist/nodes/lime-crm/transport/files.d.ts +26 -0
  198. package/dist/nodes/lime-crm/transport/files.js +96 -0
  199. package/dist/nodes/lime-crm/transport/files.js.map +1 -0
  200. package/dist/nodes/lime-crm/transport/index.d.ts +7 -0
  201. package/dist/nodes/lime-crm/transport/index.js +32 -0
  202. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  203. package/dist/nodes/lime-crm/transport/limeQuery.d.ts +10 -0
  204. package/dist/nodes/lime-crm/transport/limeQuery.js +18 -0
  205. package/dist/nodes/lime-crm/transport/limeQuery.js.map +1 -0
  206. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +16 -0
  207. package/dist/nodes/lime-crm/transport/limeobjects.js +76 -0
  208. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
  209. package/dist/nodes/lime-crm/transport/limetypes.d.ts +33 -0
  210. package/dist/nodes/lime-crm/transport/limetypes.js +85 -0
  211. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
  212. package/dist/nodes/lime-crm/transport/users.d.ts +6 -0
  213. package/dist/nodes/lime-crm/transport/users.js +159 -0
  214. package/dist/nodes/lime-crm/transport/users.js.map +1 -0
  215. package/dist/nodes/lime-crm/transport/webhooks.d.ts +14 -0
  216. package/dist/nodes/lime-crm/transport/webhooks.js +51 -0
  217. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
  218. package/dist/nodes/lime-crm/utils/files.d.ts +8 -0
  219. package/dist/nodes/lime-crm/utils/files.js +103 -0
  220. package/dist/nodes/lime-crm/utils/files.js.map +1 -0
  221. package/dist/nodes/lime-crm/utils/hmac.d.ts +1 -0
  222. package/dist/nodes/lime-crm/utils/hmac.js +11 -0
  223. package/dist/nodes/lime-crm/utils/hmac.js.map +1 -0
  224. package/dist/nodes/lime-crm/utils/index.d.ts +4 -0
  225. package/dist/nodes/lime-crm/utils/index.js +16 -0
  226. package/dist/nodes/lime-crm/utils/index.js.map +1 -0
  227. package/dist/nodes/lime-crm/utils/webhook.d.ts +2 -0
  228. package/dist/nodes/lime-crm/utils/webhook.js +34 -0
  229. package/dist/nodes/lime-crm/utils/webhook.js.map +1 -0
  230. package/dist/nodes/modules.d.ts +12 -0
  231. package/dist/nodes/modules.js +16 -0
  232. package/dist/nodes/modules.js.map +1 -0
  233. package/dist/nodes/response.d.ts +18 -0
  234. package/dist/nodes/response.js +3 -0
  235. package/dist/nodes/response.js.map +1 -0
  236. package/dist/package.json +70 -0
  237. package/dist/tsconfig.tsbuildinfo +1 -0
  238. package/package.json +2 -2
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { Limeobject } from '../../../models';
3
+ import { WorkflowFileResponse } from '../../../../response';
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<WorkflowFileResponse<Limeobject>>;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ const models_1 = require("../../../models");
7
+ const utils_1 = require("../../../utils");
8
+ exports.description = {
9
+ name: 'Get Single Object',
10
+ value: 'getSingleObject',
11
+ description: 'Get one specific object',
12
+ action: 'Get single object',
13
+ };
14
+ exports.properties = [
15
+ {
16
+ displayName: 'Limetype',
17
+ name: 'limetype',
18
+ type: 'options',
19
+ typeOptions: {
20
+ loadOptionsMethod: 'getLimetypes',
21
+ },
22
+ required: true,
23
+ default: '',
24
+ description: 'The type of entity to retrieve',
25
+ displayOptions: {
26
+ show: {
27
+ resource: [models_1.DATA_RESOURCE],
28
+ operation: ['getSingleObject'],
29
+ },
30
+ },
31
+ },
32
+ {
33
+ displayName: 'Object ID',
34
+ name: 'objectId',
35
+ type: 'string',
36
+ required: true,
37
+ default: '',
38
+ description: 'The ID of the object to retrieve',
39
+ displayOptions: {
40
+ show: {
41
+ resource: [models_1.DATA_RESOURCE],
42
+ operation: ['getSingleObject'],
43
+ },
44
+ },
45
+ },
46
+ {
47
+ displayName: 'Include file content',
48
+ name: 'includeFileContent',
49
+ type: 'boolean',
50
+ default: false,
51
+ description: 'Include file binary data if the Limetype has any file properties. ' +
52
+ 'Keep performance in mind before activating this. ' +
53
+ 'For Limetypes without any file properties, this setting is ignored.',
54
+ displayOptions: {
55
+ show: {
56
+ resource: [models_1.DATA_RESOURCE],
57
+ operation: ['getSingleObject'],
58
+ },
59
+ },
60
+ },
61
+ ];
62
+ async function execute(i) {
63
+ const limetype = this.getNodeParameter('limetype', i);
64
+ const objectId = this.getNodeParameter('objectId', i);
65
+ const includeFileContent = this.getNodeParameter('includeFileContent', i);
66
+ const limeObjectResponse = await (0, transport_1.getLimeobject)(this, limetype, objectId);
67
+ if (!limeObjectResponse.success)
68
+ return { json: limeObjectResponse.data };
69
+ const propertiesResponse = await (0, transport_1.getProperties)(this, limetype);
70
+ if (!propertiesResponse.success)
71
+ return { json: propertiesResponse.data };
72
+ const fileProperties = (0, utils_1.getFilePropertiesNames)(propertiesResponse.data);
73
+ const fileResponse = await (0, utils_1.processFileResponse)(this, fileProperties, limeObjectResponse.data, includeFileContent);
74
+ return {
75
+ json: fileResponse.json.data,
76
+ binary: fileResponse.binary,
77
+ };
78
+ }
79
+ //# sourceMappingURL=getSingleObject.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSingleObject.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/data/operations/getSingleObject.operation.ts"],"names":[],"mappings":";;;AAgGA,0BA4BC;AA1HD,kDAAkE;AAClE,4CAA4D;AAC5D,0C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AG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAChE,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,CAC5C,oBAAoB,EACpB,CAAC,CACO,CAAC;IAEb,MAAM,kBAAkB,GAAG,MAAM,IAAA,yBAAa,EAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACzE,IAAI,CAAC,kBAAkB,CAAC,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE,CAAC;IAE1E,MAAM,kBAAkB,GAAG,MAAM,IAAA,yBAAa,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/D,IAAI,CAAC,kBAAkB,CAAC,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE,CAAC;IAE1E,MAAM,cAAc,GAAG,IAAA,8BAAsB,EAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACvE,MAAM,YAAY,GAAG,MAAM,IAAA,2BAAmB,EAC1C,IAAI,EACJ,cAAc,EACd,kBAAkB,CAAC,IAAI,EACvB,kBAAkB,CACrB,CAAC;IACF,OAAO;QACH,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI;QAC5B,MAAM,EAAE,YAAY,CAAC,MAAM;KAC9B,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * as createSingleObject from './createSingleObject.operation';
2
+ export * as getSingleObject from './getSingleObject.operation';
3
+ export * as updateSingleObject from './updateSingleObject.operation';
4
+ export * as deleteSingleObject from './deleteSingleObject.operation';
5
+ export * as getManyObjects from './getManyObjects.operation';
6
+ export * as getSingleFile from './getSingleFile.operation';
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.getSingleFile = exports.getManyObjects = exports.deleteSingleObject = exports.updateSingleObject = exports.getSingleObject = exports.createSingleObject = void 0;
37
+ exports.createSingleObject = __importStar(require("./createSingleObject.operation"));
38
+ exports.getSingleObject = __importStar(require("./getSingleObject.operation"));
39
+ exports.updateSingleObject = __importStar(require("./updateSingleObject.operation"));
40
+ exports.deleteSingleObject = __importStar(require("./deleteSingleObject.operation"));
41
+ exports.getManyObjects = __importStar(require("./getManyObjects.operation"));
42
+ exports.getSingleFile = __importStar(require("./getSingleFile.operation"));
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/data/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,qFAAqE;AAIrE,+EAA+D;AAI/D,qFAAqE;AAIrE,qFAAqE;AAIrE,6EAA6D;AAI7D,2EAA2D"}
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { Limeobject } from '../../../models';
3
+ import { WorkflowFileResponse } from '../../../../response';
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<WorkflowFileResponse<Limeobject>>;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ const models_1 = require("../../../models");
7
+ const utils_1 = require("../../../utils");
8
+ const methods_1 = require("../../../methods");
9
+ exports.description = {
10
+ name: 'Update Single Object',
11
+ value: 'updateSingleObject',
12
+ description: 'Update one specific object',
13
+ action: 'Update single object',
14
+ };
15
+ exports.properties = [
16
+ {
17
+ displayName: 'Limetype',
18
+ name: 'limetype',
19
+ type: 'options',
20
+ typeOptions: {
21
+ loadOptionsMethod: 'getLimetypes',
22
+ },
23
+ required: true,
24
+ default: '',
25
+ description: 'The type of entity to update',
26
+ displayOptions: {
27
+ show: {
28
+ resource: [models_1.DATA_RESOURCE],
29
+ operation: ['updateSingleObject'],
30
+ },
31
+ },
32
+ },
33
+ {
34
+ displayName: 'Record ID',
35
+ name: 'id',
36
+ type: 'string',
37
+ required: true,
38
+ default: '',
39
+ description: 'ID of the record to update',
40
+ displayOptions: {
41
+ show: {
42
+ resource: [models_1.DATA_RESOURCE],
43
+ operation: ['updateSingleObject'],
44
+ },
45
+ },
46
+ },
47
+ {
48
+ displayName: 'Input Type',
49
+ name: 'inputType',
50
+ type: 'options',
51
+ options: [
52
+ {
53
+ name: 'Simple Fields',
54
+ value: 'fields',
55
+ description: 'Define fields using the UI',
56
+ },
57
+ {
58
+ name: 'JSON Object',
59
+ value: 'json',
60
+ description: 'Define fields using JSON',
61
+ },
62
+ ],
63
+ default: 'fields',
64
+ description: 'How to input the data',
65
+ displayOptions: {
66
+ show: {
67
+ resource: [models_1.DATA_RESOURCE],
68
+ operation: ['updateSingleObject'],
69
+ },
70
+ },
71
+ },
72
+ {
73
+ displayName: 'Data',
74
+ name: 'jsonData',
75
+ type: 'json',
76
+ default: '{\n "name": "Updated Company Name",\n "phone": "+987654321"\n}',
77
+ description: 'Key-value pairs for fields to update. Property names must match the Lime CRM field names.',
78
+ typeOptions: {
79
+ alwaysOpenEditWindow: true,
80
+ },
81
+ displayOptions: {
82
+ show: {
83
+ resource: [models_1.DATA_RESOURCE],
84
+ operation: ['updateSingleObject'],
85
+ inputType: ['json'],
86
+ },
87
+ },
88
+ },
89
+ {
90
+ displayName: 'Properties',
91
+ name: 'properties',
92
+ type: 'resourceMapper',
93
+ placeholder: 'Add Property',
94
+ typeOptions: {
95
+ resourceMapper: {
96
+ resourceMapperMethod: 'getUpdateMappingColumns',
97
+ mode: 'add',
98
+ addAllFields: false,
99
+ supportAutoMap: false,
100
+ },
101
+ loadOptionsDependsOn: ['limetype'],
102
+ },
103
+ default: {
104
+ value: null,
105
+ },
106
+ displayOptions: {
107
+ show: {
108
+ resource: [models_1.DATA_RESOURCE],
109
+ operation: ['updateSingleObject'],
110
+ inputType: ['fields'],
111
+ },
112
+ },
113
+ },
114
+ ];
115
+ async function execute(i) {
116
+ const limetype = this.getNodeParameter('limetype', i);
117
+ const id = this.getNodeParameter('id', i);
118
+ const inputType = this.getNodeParameter('inputType', i);
119
+ let body = {};
120
+ const propertiesResponse = await (0, transport_1.getProperties)(this, limetype);
121
+ if (!propertiesResponse.success)
122
+ return {
123
+ json: propertiesResponse.data,
124
+ };
125
+ const properties = propertiesResponse.data;
126
+ if (inputType === 'json') {
127
+ const jsonData = this.getNodeParameter('jsonData', i);
128
+ body = JSON.parse(jsonData);
129
+ }
130
+ else {
131
+ body = (0, methods_1.parseResourceMapperFields)(this, i, 'properties');
132
+ }
133
+ const fileProperties = (0, utils_1.getFilePropertiesNames)(properties);
134
+ await (0, utils_1.setFileProperties)(this, i, fileProperties, body);
135
+ const updateLimeobjectResponse = await (0, transport_1.updateLimeobject)(this, limetype, id, body);
136
+ if (!updateLimeobjectResponse.success)
137
+ return {
138
+ json: updateLimeobjectResponse.data,
139
+ };
140
+ const response = await (0, utils_1.processFileResponse)(this, fileProperties, updateLimeobjectResponse.data);
141
+ return {
142
+ json: response.json.data,
143
+ binary: response.binary,
144
+ };
145
+ }
146
+ //# sourceMappingURL=updateSingleObject.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateSingleObject.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/data/operations/updateSingleObject.operation.ts"],"names":[],"mappings":";;;AA8JA,0BAgDC;AA7MD,kDAAqE;AACrE,4CAA4D;AAC5D,0CAIwB;AAExB,8CAA6D;AAOhD,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,4BAA4B;IACzC,MAAM,EAAE,sBAAsB;CACjC,CAAC;AAaW,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,sBAAa,CAAC;gBACzB,SAAS,EAAE,CAAC,oBAAoB,CAAC;aACpC;SACJ;KACJ;IACD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO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C,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAEvD,MAAM,wBAAwB,GAAG,MAAM,IAAA,4BAAgB,EACnD,IAAI,EACJ,QAAQ,EACR,EAAE,EACF,IAAI,CACP,CAAC;IACF,IAAI,CAAC,wBAAwB,CAAC,OAAO;QACjC,OAAO;YACH,IAAI,EAAE,wBAAwB,CAAC,IAAI;SACtC,CAAC;IAEN,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAmB,EACtC,IAAI,EACJ,cAAc,EACd,wBAAwB,CAAC,IAAI,CAChC,CAAC;IACF,OAAO;QACH,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI;QACxB,MAAM,EAAE,QAAQ,CAAC,MAAM;KAC1B,CAAC;AACN,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { INodeExecutionData, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const metadataFields: INodeProperties[];
3
+ export declare function metadataOperations(this: IExecuteFunctions, { operation, i }: {
4
+ operation: string;
5
+ i: number;
6
+ }): Promise<INodeExecutionData | INodeExecutionData[]>;
7
+ export * from './operations';
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.metadataFields = void 0;
40
+ exports.metadataOperations = metadataOperations;
41
+ const n8n_workflow_1 = require("n8n-workflow");
42
+ const operations = __importStar(require("./operations"));
43
+ const models_1 = require("../../models");
44
+ const modules_1 = require("../../../modules");
45
+ const moduleHandler = new modules_1.N8NOperationModuleHandler([
46
+ operations.getAllLimetypes,
47
+ operations.getSingleLimetype,
48
+ operations.getSingleFileMetadata,
49
+ ]);
50
+ exports.metadataFields = [
51
+ {
52
+ displayName: 'Operation',
53
+ name: 'operation',
54
+ type: 'options',
55
+ noDataExpression: true,
56
+ displayOptions: {
57
+ show: {
58
+ resource: [models_1.METADATA_RESOURCE],
59
+ },
60
+ },
61
+ options: moduleHandler.getDescriptions(),
62
+ default: 'getAllLimetypes',
63
+ },
64
+ ...moduleHandler.getProperties(),
65
+ ];
66
+ async function metadataOperations({ operation, i }) {
67
+ switch (operation) {
68
+ case 'getAllLimetypes': {
69
+ const results = await operations.getAllLimetypes.execute.call(this);
70
+ if (Array.isArray(results)) {
71
+ return results.map((limetype) => ({
72
+ json: limetype,
73
+ }));
74
+ }
75
+ else {
76
+ return { json: results };
77
+ }
78
+ }
79
+ case 'getSingleLimetype': {
80
+ return {
81
+ json: await operations.getSingleLimetype.execute.call(this, i),
82
+ };
83
+ }
84
+ case 'getSingleFileMetadata': {
85
+ return {
86
+ json: await operations.getSingleFileMetadata.execute.call(this, i),
87
+ };
88
+ }
89
+ }
90
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported!`);
91
+ }
92
+ __exportStar(require("./operations"), exports);
93
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/lime-crm/resources/metadata/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,gDAkCC;AAlGD,+CAMsB;AAEtB,yDAA2C;AAC3C,yCAAiD;AACjD,8CAA6D;AAE7D,MAAM,aAAa,GAAG,IAAI,mCAAyB,CAAC;IAChD,UAAU,CAAC,eAAe;IAC1B,UAAU,CAAC,iBAAiB;IAC5B,UAAU,CAAC,qBAAqB;CACnC,CAAC,CAAC;AAgBU,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,0BAAiB,CAAC;aAChC;SACJ;QACD,OAAO,EAAE,aAAa,CAAC,eAAe,EAAE;QACxC,OAAO,EAAE,iBAAiB;KAC7B;IAED,GAAG,aAAa,CAAC,aAAa,EAAE;CACnC,CAAC;AAgBK,KAAK,UAAU,kBAAkB,CAEpC,EAAE,SAAS,EAAE,CAAC,EAAoC;IAElD,QAAQ,SAAS,EAAE,CAAC;QAChB,KAAK,iBAAiB,CAAC,CAAC,CAAC;YACrB,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpE,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;oBAC9B,IAAI,EAAE,QAAQ;iBACjB,CAAC,CAAC,CAAC;YACR,CAAC;iBAAM,CAAC;gBACJ,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAC7B,CAAC;QACL,CAAC;QACD,KAAK,mBAAmB,CAAC,CAAC,CAAC;YACvB,OAAO;gBACH,IAAI,EAAE,MAAM,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;aACjE,CAAC;QACN,CAAC;QACD,KAAK,uBAAuB,CAAC,CAAC,CAAC;YAC3B,OAAO;gBACH,IAAI,EAAE,MAAM,UAAU,CAAC,qBAAqB,CAAC,OAAO,CAAC,IAAI,CACrD,IAAI,EACJ,CAAC,CACJ;aACJ,CAAC;QACN,CAAC;IACL,CAAC;IAED,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,kBAAkB,SAAS,qBAAqB,CACnD,CAAC;AACN,CAAC;AAED,+CAA6B"}
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions } from 'n8n-workflow';
2
+ import { Limetype } from '../../../models';
3
+ import { WorkflowResponse } from '../../../../response';
4
+ export declare const description: {
5
+ name: string;
6
+ value: string;
7
+ description: string;
8
+ action: string;
9
+ };
10
+ export declare function execute(this: IExecuteFunctions): Promise<WorkflowResponse<Limetype[]>>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ exports.description = {
7
+ name: 'Get all Limetypes',
8
+ value: 'getAllLimetypes',
9
+ description: 'Get a list of all available Limetypes',
10
+ action: 'Get all Limetypes',
11
+ };
12
+ async function execute() {
13
+ const response = await (0, transport_1.getLimetypesFromApi)(this);
14
+ return response.data;
15
+ }
16
+ //# sourceMappingURL=getAllLimetypes.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAllLimetypes.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts"],"names":[],"mappings":";;;AA0BA,0BAKC;AA7BD,kDAAyD;AAO5C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,uCAAuC;IACpD,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAYK,KAAK,UAAU,OAAO;IAGzB,MAAM,QAAQ,GAAG,MAAM,IAAA,+BAAmB,EAAC,IAAI,CAAC,CAAC;IACjD,OAAO,QAAQ,CAAC,IAAI,CAAC;AACzB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { FileMetadata } from '../../../transport';
3
+ import { WorkflowResponse } from '../../../../response';
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<WorkflowResponse<FileMetadata>>;
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ const models_1 = require("../../../models");
7
+ const errorHandling_1 = require("../../../../errorHandling");
8
+ exports.description = {
9
+ name: 'Get Single File Metadata',
10
+ value: 'getSingleFileMetadata',
11
+ description: 'Get the metadata for a single file',
12
+ action: 'Get single file metadata',
13
+ };
14
+ exports.properties = [
15
+ {
16
+ displayName: 'Get by',
17
+ name: 'source',
18
+ type: 'options',
19
+ required: true,
20
+ placeholder: 'Add Source',
21
+ displayOptions: {
22
+ show: {
23
+ resource: [models_1.METADATA_RESOURCE],
24
+ operation: ['getSingleFileMetadata'],
25
+ },
26
+ },
27
+ options: [
28
+ {
29
+ name: 'File ID',
30
+ value: 'byFile',
31
+ description: 'Get file by its ID',
32
+ },
33
+ {
34
+ name: 'Limeobject ID',
35
+ value: 'byLimeobject',
36
+ description: "Get file by it's associated Limeobject ID",
37
+ },
38
+ ],
39
+ default: 'byFile',
40
+ },
41
+ {
42
+ displayName: 'Limetype',
43
+ name: 'limetype',
44
+ type: 'options',
45
+ typeOptions: {
46
+ loadOptionsMethod: 'getLimetypes',
47
+ },
48
+ required: true,
49
+ default: '',
50
+ description: 'The type of entity associated with the file',
51
+ displayOptions: {
52
+ show: {
53
+ resource: [models_1.METADATA_RESOURCE],
54
+ operation: ['getSingleFileMetadata'],
55
+ source: ['byLimeobject'],
56
+ },
57
+ },
58
+ },
59
+ {
60
+ displayName: 'Identifier',
61
+ name: 'identifier',
62
+ type: 'string',
63
+ required: true,
64
+ default: '',
65
+ description: 'The ID of the file or Limeobject to retrieve',
66
+ displayOptions: {
67
+ show: {
68
+ resource: [models_1.METADATA_RESOURCE],
69
+ operation: ['getSingleFileMetadata'],
70
+ },
71
+ },
72
+ placeholder: 'e.g., 12345',
73
+ },
74
+ {
75
+ displayName: 'File type property',
76
+ name: 'property',
77
+ type: 'options',
78
+ typeOptions: {
79
+ loadOptionsMethod: 'getFileProperties',
80
+ loadOptionsDependsOn: ['limetype'],
81
+ },
82
+ required: true,
83
+ default: '',
84
+ description: 'The type of entity associated with the file',
85
+ displayOptions: {
86
+ show: {
87
+ resource: [models_1.METADATA_RESOURCE],
88
+ operation: ['getSingleFileMetadata'],
89
+ source: ['byLimeobject'],
90
+ },
91
+ },
92
+ },
93
+ ];
94
+ async function execute(i) {
95
+ const source = this.getNodeParameter('source', i);
96
+ const id = this.getNodeParameter('identifier', i);
97
+ let response;
98
+ if (source == 'byFile') {
99
+ response = await (0, transport_1.getFileMetadata)(this, id);
100
+ }
101
+ else if (source == 'byLimeobject') {
102
+ const limetype = this.getNodeParameter('limetype', i);
103
+ const property = this.getNodeParameter('property', i);
104
+ response = await (0, transport_1.getFileMetadataByLimeobject)(this, limetype, id, property);
105
+ }
106
+ else {
107
+ response = (0, errorHandling_1.handleWorkflowError)(this, {
108
+ message: `The source "${source} is not supported`,
109
+ });
110
+ }
111
+ return response.data;
112
+ }
113
+ //# sourceMappingURL=getSingleFileMetadata.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSingleFileMetadata.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.ts"],"names":[],"mappings":";;;AA4HA,0BAyBC;AApJD,kDAI4B;AAC5B,4CAAoD;AAEpD,6DAAgE;AAOnD,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,0BAA0B;IAChC,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,oCAAoC;IACjD,MAAM,EAAE,0BAA0B;CACrC,CAAC;AAYW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,YAAY;QACzB,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,0BAAiB,CAAC;gBAC7B,SAAS,EAAE,CAAC,uBAAuB,CAAC;aACvC;SACJ;QACD,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,oBAAoB;aACpC;YACD;gBACI,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,2CAA2C;aAC3D;SACJ;QACD,OAAO,EAAE,QAAQ;KACpB;IACD;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,EA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,IAAA,2BAAe,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;SAAM,IAAI,MAAM,IAAI,cAAc,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QAChE,QAAQ,GAAG,MAAM,IAAA,uCAA2B,EACxC,IAAI,EACJ,QAAQ,EACR,EAAE,EACF,QAAQ,CACX,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,QAAQ,GAAG,IAAA,mCAAmB,EAAC,IAAI,EAAE;YACjC,OAAO,EAAE,eAAe,MAAM,mBAAmB;SACpD,CAAC,CAAC;IACP,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC;AACzB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { Limetype } from '../../../models';
3
+ import { WorkflowResponse } from '../../../../response';
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<WorkflowResponse<Limetype>>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const limetypes_1 = require("../../../transport/limetypes");
6
+ const models_1 = require("../../../models");
7
+ exports.description = {
8
+ name: 'Get Single Limetype',
9
+ value: 'getSingleLimetype',
10
+ description: 'Get details about a specific Limetype',
11
+ action: 'Get single Limetype',
12
+ };
13
+ exports.properties = [
14
+ {
15
+ displayName: 'Limetype',
16
+ name: 'limetype',
17
+ type: 'options',
18
+ typeOptions: {
19
+ loadOptionsMethod: 'getLimetypes',
20
+ },
21
+ required: true,
22
+ default: '',
23
+ description: 'The name of the entity type to get details for',
24
+ displayOptions: {
25
+ show: {
26
+ resource: [models_1.METADATA_RESOURCE],
27
+ operation: ['getSingleLimetype'],
28
+ },
29
+ },
30
+ },
31
+ ];
32
+ async function execute(i) {
33
+ const limetype = this.getNodeParameter('limetype', i);
34
+ const response = await (0, limetypes_1.getLimetype)(this, limetype);
35
+ return response.data;
36
+ }
37
+ //# sourceMappingURL=getSingleLimetype.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSingleLimetype.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.ts"],"names":[],"mappings":";;;AAsDA,0BAQC;AA7DD,4DAA2D;AAC3D,4CAA8D;AAQjD,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,uCAAuC;IACpD,MAAM,EAAE,qBAAqB;CAChC,CAAC;AASW,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,gDAAgD;QAC7D,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,0BAAiB,CAAC;gBAC7B,SAAS,EAAE,CAAC,mBAAmB,CAAC;aACnC;SACJ;KACJ;CACJ,CAAC;AAYK,KAAK,UAAU,OAAO,CAEzB,CAAS;IAET,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAEhE,MAAM,QAAQ,GAAG,MAAM,IAAA,uBAAW,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACnD,OAAO,QAAQ,CAAC,IAAI,CAAC;AACzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * as getSingleLimetype from './getSingleLimetype.operation';
2
+ export * as getAllLimetypes from './getAllLimetypes.operation';
3
+ export * as getSingleFileMetadata from './getSingleFileMetadata.operation';