@limetech/n8n-nodes-lime 0.3.0 → 0.3.2

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 (190) hide show
  1. package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
  2. package/dist/credentials/FortnoxApi.credentials.js +57 -0
  3. package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
  4. package/dist/credentials/LimeCrmApi.credentials.js +3 -2
  5. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -1
  6. package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
  7. package/dist/nodes/fortnox/Fortnox.node.js +95 -0
  8. package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
  9. package/dist/nodes/fortnox/Fortnox.node.json +18 -0
  10. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
  11. package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
  12. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
  13. package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
  14. package/dist/nodes/fortnox/commons.d.ts +25 -0
  15. package/dist/nodes/fortnox/commons.js +44 -0
  16. package/dist/nodes/fortnox/commons.js.map +1 -0
  17. package/dist/nodes/fortnox/fortnoxLogo.svg +15 -0
  18. package/dist/nodes/fortnox/model.d.ts +20 -0
  19. package/dist/nodes/fortnox/model.js +3 -0
  20. package/dist/nodes/fortnox/model.js.map +1 -0
  21. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
  22. package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
  23. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
  24. package/dist/nodes/fortnox/resources/customers/index.d.ts +20 -0
  25. package/dist/nodes/fortnox/resources/customers/index.js +87 -0
  26. package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
  27. package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
  28. package/dist/nodes/fortnox/resources/customers/model.js +3 -0
  29. package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
  30. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +12 -0
  31. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +283 -0
  32. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
  33. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +10 -0
  34. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +36 -0
  35. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
  36. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +11 -0
  37. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +36 -0
  38. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
  39. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +11 -0
  40. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
  41. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
  42. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +12 -0
  43. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +267 -0
  44. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
  45. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
  46. package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
  47. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
  48. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
  49. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
  50. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
  51. package/dist/nodes/fortnox/resources/invoice/index.d.ts +20 -0
  52. package/dist/nodes/fortnox/resources/invoice/index.js +81 -0
  53. package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
  54. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
  55. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
  56. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
  57. package/dist/nodes/fortnox/resources/invoice/model.d.ts +150 -0
  58. package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
  59. package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
  60. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +11 -0
  61. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
  62. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
  63. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +11 -0
  64. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +35 -0
  65. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
  66. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +11 -0
  67. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
  68. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
  69. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +11 -0
  70. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +62 -0
  71. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
  72. package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
  73. package/dist/nodes/fortnox/transport/errorCodes.js +50 -0
  74. package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
  75. package/dist/nodes/fortnox/transport/index.d.ts +4 -0
  76. package/dist/nodes/fortnox/transport/index.js +72 -0
  77. package/dist/nodes/fortnox/transport/index.js.map +1 -0
  78. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  79. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +14 -0
  80. package/dist/nodes/lime-crm/LimeCrmNode.node.js +113 -0
  81. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  82. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
  83. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +200 -0
  84. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  85. package/dist/nodes/lime-crm/assets/lime-crm.svg +1 -0
  86. package/dist/nodes/lime-crm/commons/constants.d.ts +4 -0
  87. package/dist/nodes/lime-crm/commons/constants.js +8 -0
  88. package/dist/nodes/lime-crm/commons/constants.js.map +1 -0
  89. package/dist/nodes/lime-crm/commons/index.d.ts +3 -0
  90. package/dist/nodes/lime-crm/commons/index.js +11 -0
  91. package/dist/nodes/lime-crm/commons/index.js.map +1 -0
  92. package/dist/nodes/lime-crm/commons/limetype.d.ts +10 -0
  93. package/dist/nodes/lime-crm/commons/limetype.js +3 -0
  94. package/dist/nodes/lime-crm/commons/limetype.js.map +1 -0
  95. package/dist/nodes/lime-crm/commons/task.d.ts +14 -0
  96. package/dist/nodes/lime-crm/commons/task.js +48 -0
  97. package/dist/nodes/lime-crm/commons/task.js.map +1 -0
  98. package/dist/nodes/lime-crm/commons/webhook.d.ts +16 -0
  99. package/dist/nodes/lime-crm/commons/webhook.js +29 -0
  100. package/dist/nodes/lime-crm/commons/webhook.js.map +1 -0
  101. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +5 -0
  102. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +11 -0
  103. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +1 -0
  104. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +2 -0
  105. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +20 -0
  106. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +1 -0
  107. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +2 -0
  108. package/dist/nodes/lime-crm/methods/getLimeTypes.js +20 -0
  109. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +1 -0
  110. package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
  111. package/dist/nodes/lime-crm/methods/index.js +10 -0
  112. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  113. package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +23 -0
  114. package/dist/nodes/lime-crm/resources/erpConnector/index.js +67 -0
  115. package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +1 -0
  116. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +26 -0
  117. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +65 -0
  118. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +1 -0
  119. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +9 -0
  120. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +220 -0
  121. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +1 -0
  122. package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +15 -0
  123. package/dist/nodes/lime-crm/resources/erpConnector/transform.js +11 -0
  124. package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +1 -0
  125. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +4 -0
  126. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +7 -0
  127. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +1 -0
  128. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +37 -0
  129. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +124 -0
  130. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +1 -0
  131. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +1 -0
  132. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +6 -0
  133. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +1 -0
  134. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +14 -0
  135. package/dist/nodes/lime-crm/resources/limeObject/index.js +88 -0
  136. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +1 -0
  137. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +9 -0
  138. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +139 -0
  139. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +1 -0
  140. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +9 -0
  141. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +51 -0
  142. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +1 -0
  143. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +9 -0
  144. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +51 -0
  145. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +1 -0
  146. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +9 -0
  147. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +86 -0
  148. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -0
  149. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +9 -0
  150. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +149 -0
  151. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +1 -0
  152. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +20 -0
  153. package/dist/nodes/lime-crm/resources/limeType/index.js +81 -0
  154. package/dist/nodes/lime-crm/resources/limeType/index.js.map +1 -0
  155. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +11 -0
  156. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +36 -0
  157. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +1 -0
  158. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +9 -0
  159. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +36 -0
  160. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +1 -0
  161. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +10 -0
  162. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +15 -0
  163. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +1 -0
  164. package/dist/nodes/lime-crm/transport/commons.d.ts +5 -0
  165. package/dist/nodes/lime-crm/transport/commons.js +32 -0
  166. package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
  167. package/dist/nodes/lime-crm/transport/erpConnector.d.ts +9 -0
  168. package/dist/nodes/lime-crm/transport/erpConnector.js +11 -0
  169. package/dist/nodes/lime-crm/transport/erpConnector.js.map +1 -0
  170. package/dist/nodes/lime-crm/transport/index.d.ts +5 -0
  171. package/dist/nodes/lime-crm/transport/index.js +22 -0
  172. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  173. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +7 -0
  174. package/dist/nodes/lime-crm/transport/limeobjects.js +48 -0
  175. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
  176. package/dist/nodes/lime-crm/transport/limetypes.d.ts +6 -0
  177. package/dist/nodes/lime-crm/transport/limetypes.js +39 -0
  178. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
  179. package/dist/nodes/lime-crm/transport/task.d.ts +13 -0
  180. package/dist/nodes/lime-crm/transport/task.js +13 -0
  181. package/dist/nodes/lime-crm/transport/task.js.map +1 -0
  182. package/dist/nodes/lime-crm/transport/webhooks.d.ts +15 -0
  183. package/dist/nodes/lime-crm/transport/webhooks.js +32 -0
  184. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
  185. package/dist/nodes/nodeResponse.d.ts +12 -0
  186. package/dist/nodes/nodeResponse.js +3 -0
  187. package/dist/nodes/nodeResponse.js.map +1 -0
  188. package/dist/package.json +36 -16
  189. package/dist/tsconfig.tsbuildinfo +1 -1
  190. package/package.json +1 -1
@@ -0,0 +1,139 @@
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 commons_1 = require("../../../commons");
7
+ exports.description = {
8
+ name: 'Create Object',
9
+ value: 'create',
10
+ description: 'Create a new object',
11
+ action: 'Create an object',
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 type of entity to create',
24
+ displayOptions: {
25
+ show: {
26
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
27
+ operation: ['create'],
28
+ },
29
+ },
30
+ },
31
+ {
32
+ displayName: 'Input Method',
33
+ name: 'inputMethod',
34
+ type: 'options',
35
+ options: [
36
+ {
37
+ name: 'Form Fields',
38
+ value: 'fields',
39
+ },
40
+ {
41
+ name: 'JSON',
42
+ value: 'json',
43
+ },
44
+ ],
45
+ default: 'fields',
46
+ description: 'How to input the object data',
47
+ displayOptions: {
48
+ show: {
49
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
50
+ operation: ['create'],
51
+ },
52
+ },
53
+ },
54
+ {
55
+ displayName: 'Properties',
56
+ name: 'properties',
57
+ type: 'fixedCollection',
58
+ placeholder: 'Add Property',
59
+ typeOptions: {
60
+ multipleValues: true,
61
+ sortable: true,
62
+ loadOptionsMethod: 'getLimeTypeProperties',
63
+ loadOptionsDependsOn: ['limeType'],
64
+ },
65
+ default: {},
66
+ displayOptions: {
67
+ show: {
68
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
69
+ operation: ['create'],
70
+ inputMethod: ['fields'],
71
+ },
72
+ },
73
+ options: [
74
+ {
75
+ displayName: 'Property',
76
+ name: 'property',
77
+ values: [
78
+ {
79
+ displayName: 'Property Name',
80
+ name: 'name',
81
+ type: 'options',
82
+ typeOptions: {
83
+ loadOptionsMethod: 'getLimeTypeProperties',
84
+ loadOptionsDependsOn: ['limeType'],
85
+ },
86
+ default: '',
87
+ description: 'Name of the property',
88
+ },
89
+ {
90
+ displayName: 'Property Value',
91
+ name: 'value',
92
+ type: 'string',
93
+ default: '',
94
+ description: 'Value of the property',
95
+ },
96
+ ],
97
+ },
98
+ ],
99
+ },
100
+ {
101
+ displayName: 'Object (JSON)',
102
+ name: 'objectJson',
103
+ type: 'json',
104
+ default: '{\n "name": "New Company",\n "phone": "123-456-7890"\n}',
105
+ description: 'Object to create in JSON format',
106
+ displayOptions: {
107
+ show: {
108
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
109
+ operation: ['create'],
110
+ inputMethod: ['json'],
111
+ },
112
+ },
113
+ typeOptions: {
114
+ alwaysOpenEditWindow: true,
115
+ },
116
+ },
117
+ ];
118
+ async function execute(i) {
119
+ const limeType = this.getNodeParameter('limeType', i);
120
+ const inputMethod = this.getNodeParameter('inputMethod', i);
121
+ let objectData;
122
+ if (inputMethod === 'json') {
123
+ const jsonInput = this.getNodeParameter('objectJson', i);
124
+ objectData = JSON.parse(jsonInput);
125
+ }
126
+ else {
127
+ objectData = {};
128
+ const propertiesInput = this.getNodeParameter('properties.property', i, []);
129
+ if (propertiesInput && propertiesInput.length > 0) {
130
+ for (const prop of propertiesInput) {
131
+ if (prop.name && prop.value !== undefined) {
132
+ objectData[prop.name] = prop.value;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ return await (0, transport_1.createLimeObject)(this, limeType, objectData);
138
+ }
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":";;;AA4HA,0BA2BC;AArJD,kDAAsD;AACtD,8CAAuD;AAE1C,QAAA,WAAW,GAAG;IACvB,IAAI,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,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAW,CAAC;QACnE,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;SAAM,CAAC;QACJ,UAAU,GAAG,EAAE,CAAC;QAChB,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,CACzC,qBAAqB,EACrB,CAAC,EACD,EAAE,CACY,CAAC;QAEnB,IAAI,eAAe,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChD,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;gBACjC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;oBACxC,UAAU,CAAC,IAAI,CAAC,IAAc,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;gBACjD,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,MAAM,IAAA,4BAAgB,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAC9D,CAAC"}
@@ -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<void>>;
@@ -0,0 +1,51 @@
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 commons_1 = require("../../../commons");
7
+ exports.description = {
8
+ name: 'Delete Object',
9
+ value: 'delete',
10
+ description: 'Delete an existing object',
11
+ action: 'Delete an object',
12
+ };
13
+ exports.properties = [
14
+ {
15
+ displayName: 'Lime Type',
16
+ name: 'limeType',
17
+ type: 'options',
18
+ typeOptions: {
19
+ loadOptionsMethod: 'getLimeTypes',
20
+ },
21
+ required: true,
22
+ default: '',
23
+ description: 'The type of entity to delete',
24
+ displayOptions: {
25
+ show: {
26
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
27
+ operation: ['delete'],
28
+ },
29
+ },
30
+ },
31
+ {
32
+ displayName: 'Object ID',
33
+ name: 'objectId',
34
+ type: 'string',
35
+ required: true,
36
+ default: '',
37
+ description: 'The ID of the object to delete',
38
+ displayOptions: {
39
+ show: {
40
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
41
+ operation: ['delete'],
42
+ },
43
+ },
44
+ },
45
+ ];
46
+ async function execute(i) {
47
+ const limeType = this.getNodeParameter('limeType', i);
48
+ const objectId = this.getNodeParameter('objectId', i);
49
+ return await (0, transport_1.deleteLimeObject)(this, limeType, objectId);
50
+ }
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":";;;AAiDA,0BAKC;AApDD,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"}
@@ -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.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ const commons_1 = require("../../../commons");
7
+ exports.description = {
8
+ name: 'Get Object',
9
+ value: 'get',
10
+ description: 'Get a single object by ID',
11
+ action: 'Get an object',
12
+ };
13
+ exports.properties = [
14
+ {
15
+ displayName: 'Lime Type',
16
+ name: 'limeType',
17
+ type: 'options',
18
+ typeOptions: {
19
+ loadOptionsMethod: 'getLimeTypes',
20
+ },
21
+ required: true,
22
+ default: '',
23
+ description: 'The type of entity to retrieve',
24
+ displayOptions: {
25
+ show: {
26
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
27
+ operation: ['get'],
28
+ },
29
+ },
30
+ },
31
+ {
32
+ displayName: 'Object ID',
33
+ name: 'objectId',
34
+ type: 'string',
35
+ required: true,
36
+ default: '',
37
+ description: 'The ID of the object to retrieve',
38
+ displayOptions: {
39
+ show: {
40
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
41
+ operation: ['get'],
42
+ },
43
+ },
44
+ },
45
+ ];
46
+ async function execute(i) {
47
+ const limeType = this.getNodeParameter('limeType', i);
48
+ const objectId = this.getNodeParameter('objectId', i);
49
+ return (0, transport_1.getLimeObject)(this, limeType, objectId);
50
+ }
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":";;;AAiDA,0BAIC;AAnDD,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"}
@@ -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.properties = exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../../transport");
6
+ const commons_1 = require("../../../commons");
7
+ exports.description = {
8
+ name: 'Search',
9
+ value: 'search',
10
+ description: 'Search for objects',
11
+ action: 'Search for objects',
12
+ };
13
+ exports.properties = [
14
+ {
15
+ displayName: 'Lime Type',
16
+ name: 'limeType',
17
+ type: 'options',
18
+ typeOptions: {
19
+ loadOptionsMethod: 'getLimeTypes',
20
+ },
21
+ required: true,
22
+ default: '',
23
+ description: 'The type of entity to search for',
24
+ displayOptions: {
25
+ show: {
26
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
27
+ operation: ['search'],
28
+ },
29
+ },
30
+ },
31
+ {
32
+ displayName: 'Search Term',
33
+ name: 'searchTerm',
34
+ type: 'string',
35
+ default: '',
36
+ description: 'Term to search for',
37
+ displayOptions: {
38
+ show: {
39
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
40
+ operation: ['search'],
41
+ },
42
+ },
43
+ },
44
+ {
45
+ displayName: 'Search Fields',
46
+ name: 'searchField',
47
+ type: 'options',
48
+ typeOptions: {
49
+ loadOptionsMethod: 'getLimeTypeProperties',
50
+ loadOptionsDependsOn: ['limeType'],
51
+ },
52
+ default: [],
53
+ description: 'Fields to search in. If none selected, searches across all searchable fields',
54
+ displayOptions: {
55
+ show: {
56
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
57
+ operation: ['search'],
58
+ },
59
+ },
60
+ },
61
+ {
62
+ displayName: 'Limit',
63
+ name: 'limit',
64
+ type: 'number',
65
+ default: 50,
66
+ description: 'Max number of results to return',
67
+ typeOptions: {
68
+ minValue: 1,
69
+ },
70
+ displayOptions: {
71
+ show: {
72
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
73
+ operation: ['search'],
74
+ },
75
+ },
76
+ },
77
+ ];
78
+ async function execute(i) {
79
+ const limeType = this.getNodeParameter('limeType', i);
80
+ const searchTerm = this.getNodeParameter('searchTerm', i, '');
81
+ const searchField = this.getNodeParameter('searchField', i);
82
+ const limit = this.getNodeParameter('limit', i, 50);
83
+ const options = this.getNodeParameter('options', i, {});
84
+ return await (0, transport_1.searchLimeObject)(this, limeType, searchField, searchTerm, limit || null, options.sortField || null);
85
+ }
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":";;;AAmFA,0BAeC;AAjGD,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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ACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAChE,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;IACxE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAW,CAAC;IACtE,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAExD,OAAO,MAAM,IAAA,4BAAgB,EACzB,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,KAAK,IAAI,IAAI,EACZ,OAAO,CAAC,SAAoB,IAAI,IAAI,CACxC,CAAC;AACN,CAAC"}
@@ -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,149 @@
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 commons_1 = require("../../../commons");
7
+ exports.description = {
8
+ name: 'Update',
9
+ value: 'update',
10
+ description: 'Update an existing record',
11
+ action: 'Update a record',
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 type of entity to update',
24
+ displayOptions: {
25
+ show: {
26
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
27
+ operation: ['update'],
28
+ },
29
+ },
30
+ },
31
+ {
32
+ displayName: 'Record ID',
33
+ name: 'id',
34
+ type: 'string',
35
+ required: true,
36
+ default: '',
37
+ description: 'ID of the record to update',
38
+ displayOptions: {
39
+ show: {
40
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
41
+ operation: ['update'],
42
+ },
43
+ },
44
+ },
45
+ {
46
+ displayName: 'Input Type',
47
+ name: 'inputType',
48
+ type: 'options',
49
+ options: [
50
+ {
51
+ name: 'Simple Fields',
52
+ value: 'simple',
53
+ description: 'Define fields using the UI',
54
+ },
55
+ {
56
+ name: 'JSON Object',
57
+ value: 'json',
58
+ description: 'Define fields using JSON',
59
+ },
60
+ ],
61
+ default: 'simple',
62
+ description: 'How to input the data',
63
+ displayOptions: {
64
+ show: {
65
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
66
+ operation: ['update'],
67
+ },
68
+ },
69
+ },
70
+ {
71
+ displayName: 'Data',
72
+ name: 'jsonData',
73
+ type: 'json',
74
+ default: '{\n "name": "Updated Company Name",\n "phone": "+987654321"\n}',
75
+ description: 'Key-value pairs for fields to update. Property names must match the Lime CRM field names.',
76
+ typeOptions: {
77
+ alwaysOpenEditWindow: true,
78
+ },
79
+ displayOptions: {
80
+ show: {
81
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
82
+ operation: ['update'],
83
+ inputType: ['json'],
84
+ },
85
+ },
86
+ },
87
+ {
88
+ displayName: 'Fields',
89
+ name: 'simpleFields',
90
+ placeholder: 'Add Field',
91
+ type: 'fixedCollection',
92
+ typeOptions: {
93
+ multipleValues: true,
94
+ sortable: true,
95
+ },
96
+ default: {},
97
+ displayOptions: {
98
+ show: {
99
+ resource: [commons_1.LIMEOBJECT_RESOURCE],
100
+ operation: ['update'],
101
+ inputType: ['simple'],
102
+ },
103
+ },
104
+ options: [
105
+ {
106
+ name: 'field',
107
+ displayName: 'Field',
108
+ values: [
109
+ {
110
+ displayName: 'Field Name',
111
+ name: 'fieldName',
112
+ type: 'options',
113
+ typeOptions: {
114
+ loadOptionsMethod: 'getLimeTypeProperties',
115
+ loadOptionsDependsOn: ['limeType'],
116
+ },
117
+ default: '',
118
+ description: 'The name of the field',
119
+ },
120
+ {
121
+ displayName: 'Field Value',
122
+ name: 'fieldValue',
123
+ type: 'string',
124
+ default: '',
125
+ description: 'The value of the field',
126
+ },
127
+ ],
128
+ },
129
+ ],
130
+ },
131
+ ];
132
+ async function execute(i) {
133
+ const limeType = this.getNodeParameter('limeType', i);
134
+ const id = this.getNodeParameter('id', i);
135
+ const inputType = this.getNodeParameter('inputType', i);
136
+ let body = {};
137
+ if (inputType === 'json') {
138
+ const jsonData = this.getNodeParameter('jsonData', i);
139
+ body = JSON.parse(jsonData);
140
+ }
141
+ else {
142
+ const simpleFields = this.getNodeParameter('simpleFields.field', i, []);
143
+ for (const field of simpleFields) {
144
+ body[field.fieldName] = field.fieldValue;
145
+ }
146
+ }
147
+ return (0, transport_1.updateLimeObject)(this, limeType, id, body);
148
+ }
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":";;;AAsIA,0BAsBC;AA3JD,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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AAC;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"}
@@ -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;
10
+ metadata?: Record<string, unknown>;
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,81 @@
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.limeTypeFields = void 0;
37
+ exports.limeTypeOperations = limeTypeOperations;
38
+ const getType = __importStar(require("./operations/getType.operation"));
39
+ const listTypes = __importStar(require("./operations/listTypes.operation"));
40
+ const getProperties = __importStar(require("./operations/getProperties.operation"));
41
+ const commons_1 = require("../../commons");
42
+ exports.limeTypeFields = [
43
+ {
44
+ displayName: 'Operation',
45
+ name: 'operation',
46
+ type: 'options',
47
+ noDataExpression: true,
48
+ displayOptions: {
49
+ show: {
50
+ resource: [commons_1.LIMETYPE_RESOURCE],
51
+ },
52
+ },
53
+ options: [
54
+ {
55
+ ...listTypes.description,
56
+ },
57
+ {
58
+ ...getType.description,
59
+ },
60
+ {
61
+ ...getProperties.description,
62
+ },
63
+ ],
64
+ default: 'listTypes',
65
+ },
66
+ ...getType.properties,
67
+ ...getProperties.properties,
68
+ ];
69
+ async function limeTypeOperations({ operation, i }) {
70
+ if (operation === 'listTypes') {
71
+ return await listTypes.execute.call(this);
72
+ }
73
+ if (operation === 'getType') {
74
+ return await getType.execute.call(this, i);
75
+ }
76
+ if (operation === 'getProperties') {
77
+ return await getProperties.execute.call(this, i);
78
+ }
79
+ return null;
80
+ }
81
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/lime-crm/resources/limeType/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,gDAeC;AAnDD,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"}