@limetech/n8n-nodes-lime 0.1.0

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 (194) hide show
  1. package/.eslintrc.js +58 -0
  2. package/.github/copilot-instructions.md +20 -0
  3. package/.github/workflows/publish.yml +34 -0
  4. package/README.md +79 -0
  5. package/credentials/LimeCrmApi.credentials.ts +57 -0
  6. package/credentials/LimeGoApi.credentials.ts +31 -0
  7. package/dist/credentials/LimeCrmApi.credentials.d.ts +9 -0
  8. package/dist/credentials/LimeCrmApi.credentials.js +53 -0
  9. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -0
  10. package/dist/credentials/LimeGoApi.credentials.d.ts +15 -0
  11. package/dist/credentials/LimeGoApi.credentials.js +32 -0
  12. package/dist/credentials/LimeGoApi.credentials.js.map +1 -0
  13. package/dist/nodes/lime-crm/GenericTypes.d.ts +80 -0
  14. package/dist/nodes/lime-crm/GenericTypes.js +7 -0
  15. package/dist/nodes/lime-crm/GenericTypes.js.map +1 -0
  16. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  17. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +17 -0
  18. package/dist/nodes/lime-crm/LimeCrmNode.node.js +114 -0
  19. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  20. package/dist/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.d.ts +17 -0
  21. package/dist/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.js +408 -0
  22. package/dist/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.js.map +1 -0
  23. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +17 -0
  24. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +439 -0
  25. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  26. package/dist/nodes/lime-crm/lime-crm.svg +1 -0
  27. package/dist/nodes/lime-crm/methods/getAllSortableFields.d.ts +7 -0
  28. package/dist/nodes/lime-crm/methods/getAllSortableFields.js +53 -0
  29. package/dist/nodes/lime-crm/methods/getAllSortableFields.js.map +1 -0
  30. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +3 -0
  31. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +40 -0
  32. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +1 -0
  33. package/dist/nodes/lime-crm/methods/getLimeTypeRelations.d.ts +7 -0
  34. package/dist/nodes/lime-crm/methods/getLimeTypeRelations.js +30 -0
  35. package/dist/nodes/lime-crm/methods/getLimeTypeRelations.js.map +1 -0
  36. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +3 -0
  37. package/dist/nodes/lime-crm/methods/getLimeTypes.js +33 -0
  38. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +1 -0
  39. package/dist/nodes/lime-crm/methods/getRelatedTypeProperties.d.ts +7 -0
  40. package/dist/nodes/lime-crm/methods/getRelatedTypeProperties.js +39 -0
  41. package/dist/nodes/lime-crm/methods/getRelatedTypeProperties.js.map +1 -0
  42. package/dist/nodes/lime-crm/methods/index.d.ts +5 -0
  43. package/dist/nodes/lime-crm/methods/index.js +14 -0
  44. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  45. package/dist/nodes/lime-crm/resources/limeObject/commonFields.d.ts +4 -0
  46. package/dist/nodes/lime-crm/resources/limeObject/commonFields.js +165 -0
  47. package/dist/nodes/lime-crm/resources/limeObject/commonFields.js.map +1 -0
  48. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +6 -0
  49. package/dist/nodes/lime-crm/resources/limeObject/index.js +79 -0
  50. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +1 -0
  51. package/dist/nodes/lime-crm/resources/limeObject/operations/common.operation.d.ts +2 -0
  52. package/dist/nodes/lime-crm/resources/limeObject/operations/common.operation.js +36 -0
  53. package/dist/nodes/lime-crm/resources/limeObject/operations/common.operation.js.map +1 -0
  54. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +9 -0
  55. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +234 -0
  56. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +1 -0
  57. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +9 -0
  58. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +136 -0
  59. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +1 -0
  60. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +9 -0
  61. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +125 -0
  62. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +1 -0
  63. package/dist/nodes/lime-crm/resources/limeObject/operations/getAll.operation.d.ts +3 -0
  64. package/dist/nodes/lime-crm/resources/limeObject/operations/getAll.operation.js +212 -0
  65. package/dist/nodes/lime-crm/resources/limeObject/operations/getAll.operation.js.map +1 -0
  66. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +9 -0
  67. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +232 -0
  68. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -0
  69. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +9 -0
  70. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +186 -0
  71. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +1 -0
  72. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +6 -0
  73. package/dist/nodes/lime-crm/resources/limeType/index.js +81 -0
  74. package/dist/nodes/lime-crm/resources/limeType/index.js.map +1 -0
  75. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +9 -0
  76. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +112 -0
  77. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +1 -0
  78. package/dist/nodes/lime-crm/resources/limeType/operations/getRelations.operation.d.ts +9 -0
  79. package/dist/nodes/lime-crm/resources/limeType/operations/getRelations.operation.js +112 -0
  80. package/dist/nodes/lime-crm/resources/limeType/operations/getRelations.operation.js.map +1 -0
  81. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +9 -0
  82. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +70 -0
  83. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +1 -0
  84. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +9 -0
  85. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +86 -0
  86. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +1 -0
  87. package/dist/nodes/lime-crm/resources/queryApi/index.d.ts +6 -0
  88. package/dist/nodes/lime-crm/resources/queryApi/index.js +57 -0
  89. package/dist/nodes/lime-crm/resources/queryApi/index.js.map +1 -0
  90. package/dist/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.d.ts +9 -0
  91. package/dist/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.js +559 -0
  92. package/dist/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.js.map +1 -0
  93. package/dist/nodes/lime-crm/transport/index.d.ts +2 -0
  94. package/dist/nodes/lime-crm/transport/index.js +50 -0
  95. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  96. package/dist/nodes/lime-go/LimeGo.node.d.ts +8 -0
  97. package/dist/nodes/lime-go/LimeGo.node.js +123 -0
  98. package/dist/nodes/lime-go/LimeGo.node.js.map +1 -0
  99. package/dist/nodes/lime-go/actions/organization/get.operation.d.ts +5 -0
  100. package/dist/nodes/lime-go/actions/organization/get.operation.js +39 -0
  101. package/dist/nodes/lime-go/actions/organization/get.operation.js.map +1 -0
  102. package/dist/nodes/lime-go/actions/organization/getByExternalKey.operation.d.ts +5 -0
  103. package/dist/nodes/lime-go/actions/organization/getByExternalKey.operation.js +54 -0
  104. package/dist/nodes/lime-go/actions/organization/getByExternalKey.operation.js.map +1 -0
  105. package/dist/nodes/lime-go/actions/organization/index.d.ts +7 -0
  106. package/dist/nodes/lime-go/actions/organization/index.js +92 -0
  107. package/dist/nodes/lime-go/actions/organization/index.js.map +1 -0
  108. package/dist/nodes/lime-go/actions/organization/organizationFields.d.ts +2 -0
  109. package/dist/nodes/lime-go/actions/organization/organizationFields.js +162 -0
  110. package/dist/nodes/lime-go/actions/organization/organizationFields.js.map +1 -0
  111. package/dist/nodes/lime-go/actions/organization/search.operation.d.ts +5 -0
  112. package/dist/nodes/lime-go/actions/organization/search.operation.js +70 -0
  113. package/dist/nodes/lime-go/actions/organization/search.operation.js.map +1 -0
  114. package/dist/nodes/lime-go/actions/organization/update.operation.d.ts +5 -0
  115. package/dist/nodes/lime-go/actions/organization/update.operation.js +125 -0
  116. package/dist/nodes/lime-go/actions/organization/update.operation.js.map +1 -0
  117. package/dist/nodes/lime-go/actions/person/createMail.operation.d.ts +7 -0
  118. package/dist/nodes/lime-go/actions/person/createMail.operation.js +130 -0
  119. package/dist/nodes/lime-go/actions/person/createMail.operation.js.map +1 -0
  120. package/dist/nodes/lime-go/actions/person/get.operation.d.ts +7 -0
  121. package/dist/nodes/lime-go/actions/person/get.operation.js +45 -0
  122. package/dist/nodes/lime-go/actions/person/get.operation.js.map +1 -0
  123. package/dist/nodes/lime-go/actions/person/index.d.ts +7 -0
  124. package/dist/nodes/lime-go/actions/person/index.js +92 -0
  125. package/dist/nodes/lime-go/actions/person/index.js.map +1 -0
  126. package/dist/nodes/lime-go/actions/person/personFields.d.ts +2 -0
  127. package/dist/nodes/lime-go/actions/person/personFields.js +134 -0
  128. package/dist/nodes/lime-go/actions/person/personFields.js.map +1 -0
  129. package/dist/nodes/lime-go/actions/person/search.operation.d.ts +7 -0
  130. package/dist/nodes/lime-go/actions/person/search.operation.js +81 -0
  131. package/dist/nodes/lime-go/actions/person/search.operation.js.map +1 -0
  132. package/dist/nodes/lime-go/actions/person/update.operation.d.ts +7 -0
  133. package/dist/nodes/lime-go/actions/person/update.operation.js +104 -0
  134. package/dist/nodes/lime-go/actions/person/update.operation.js.map +1 -0
  135. package/dist/nodes/lime-go/lime-go.svg +1 -0
  136. package/dist/nodes/lime-go/transport/graphqlRequest.d.ts +2 -0
  137. package/dist/nodes/lime-go/transport/graphqlRequest.js +23 -0
  138. package/dist/nodes/lime-go/transport/graphqlRequest.js.map +1 -0
  139. package/dist/nodes/lime-go/transport/transport.d.ts +3 -0
  140. package/dist/nodes/lime-go/transport/transport.js +58 -0
  141. package/dist/nodes/lime-go/transport/transport.js.map +1 -0
  142. package/dist/nodes/lime-go/triggers/webhook.d.ts +10 -0
  143. package/dist/nodes/lime-go/triggers/webhook.js +92 -0
  144. package/dist/nodes/lime-go/triggers/webhook.js.map +1 -0
  145. package/dist/package.json +49 -0
  146. package/dist/tsconfig.tsbuildinfo +1 -0
  147. package/docker-compose.yml +44 -0
  148. package/index.js +3 -0
  149. package/nodes/lime-crm/GenericTypes.ts +114 -0
  150. package/nodes/lime-crm/LimeCrm.node.json +18 -0
  151. package/nodes/lime-crm/LimeCrmNode.node.ts +154 -0
  152. package/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.ts +461 -0
  153. package/nodes/lime-crm/LimeCrmTrigger.node.ts +505 -0
  154. package/nodes/lime-crm/lime-crm.svg +1 -0
  155. package/nodes/lime-crm/methods/getAllSortableFields.ts +73 -0
  156. package/nodes/lime-crm/methods/getLimeTypeProperties.ts +48 -0
  157. package/nodes/lime-crm/methods/getLimeTypeRelations.ts +32 -0
  158. package/nodes/lime-crm/methods/getLimeTypes.ts +33 -0
  159. package/nodes/lime-crm/methods/getRelatedTypeProperties.ts +47 -0
  160. package/nodes/lime-crm/methods/index.ts +5 -0
  161. package/nodes/lime-crm/resources/limeObject/commonFields.ts +179 -0
  162. package/nodes/lime-crm/resources/limeObject/index.ts +64 -0
  163. package/nodes/lime-crm/resources/limeObject/operations/common.operation.ts +35 -0
  164. package/nodes/lime-crm/resources/limeObject/operations/create.operation.ts +234 -0
  165. package/nodes/lime-crm/resources/limeObject/operations/delete.operation.ts +136 -0
  166. package/nodes/lime-crm/resources/limeObject/operations/get.operation.ts +124 -0
  167. package/nodes/lime-crm/resources/limeObject/operations/getAll.operation.ts +242 -0
  168. package/nodes/lime-crm/resources/limeObject/operations/search.operation.ts +242 -0
  169. package/nodes/lime-crm/resources/limeObject/operations/update.operation.ts +201 -0
  170. package/nodes/lime-crm/resources/limeType/index.ts +66 -0
  171. package/nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts +105 -0
  172. package/nodes/lime-crm/resources/limeType/operations/getRelations.operation.ts +105 -0
  173. package/nodes/lime-crm/resources/limeType/operations/getType.operation.ts +58 -0
  174. package/nodes/lime-crm/resources/limeType/operations/listTypes.operation.ts +76 -0
  175. package/nodes/lime-crm/resources/queryApi/index.ts +42 -0
  176. package/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.ts +605 -0
  177. package/nodes/lime-crm/transport/index.ts +74 -0
  178. package/nodes/lime-go/LimeGo.node.ts +146 -0
  179. package/nodes/lime-go/actions/organization/get.operation.ts +42 -0
  180. package/nodes/lime-go/actions/organization/getByExternalKey.operation.ts +57 -0
  181. package/nodes/lime-go/actions/organization/index.ts +69 -0
  182. package/nodes/lime-go/actions/organization/organizationFields.ts +160 -0
  183. package/nodes/lime-go/actions/organization/search.operation.ts +73 -0
  184. package/nodes/lime-go/actions/organization/update.operation.ts +140 -0
  185. package/nodes/lime-go/actions/person/createMail.operation.ts +140 -0
  186. package/nodes/lime-go/actions/person/get.operation.ts +51 -0
  187. package/nodes/lime-go/actions/person/index.ts +69 -0
  188. package/nodes/lime-go/actions/person/personFields.ts +132 -0
  189. package/nodes/lime-go/actions/person/search.operation.ts +88 -0
  190. package/nodes/lime-go/actions/person/update.operation.ts +122 -0
  191. package/nodes/lime-go/lime-go.svg +1 -0
  192. package/nodes/lime-go/transport/graphqlRequest.ts +30 -0
  193. package/package.json +50 -0
  194. package/tsconfig.json +30 -0
@@ -0,0 +1,234 @@
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.execute = exports.properties = exports.description = void 0;
27
+ const n8n_workflow_1 = require("n8n-workflow");
28
+ exports.description = {
29
+ name: 'Create Object',
30
+ value: 'create',
31
+ description: 'Create a new object',
32
+ action: 'Create an object',
33
+ };
34
+ exports.properties = [
35
+ {
36
+ displayName: 'LimeType',
37
+ name: 'limeType',
38
+ type: 'options',
39
+ typeOptions: {
40
+ loadOptionsMethod: 'getLimeTypes',
41
+ },
42
+ required: true,
43
+ default: '',
44
+ description: 'The type of entity to create',
45
+ displayOptions: {
46
+ show: {
47
+ resource: [
48
+ 'limeObject',
49
+ ],
50
+ operation: [
51
+ 'create',
52
+ ],
53
+ },
54
+ },
55
+ },
56
+ {
57
+ displayName: 'Input Method',
58
+ name: 'inputMethod',
59
+ type: 'options',
60
+ options: [
61
+ {
62
+ name: 'Form Fields',
63
+ value: 'fields',
64
+ },
65
+ {
66
+ name: 'JSON',
67
+ value: 'json',
68
+ },
69
+ ],
70
+ default: 'fields',
71
+ description: 'How to input the object data',
72
+ displayOptions: {
73
+ show: {
74
+ resource: [
75
+ 'limeObject',
76
+ ],
77
+ operation: [
78
+ 'create',
79
+ ],
80
+ },
81
+ },
82
+ },
83
+ {
84
+ displayName: 'Properties',
85
+ name: 'properties',
86
+ type: 'fixedCollection',
87
+ placeholder: 'Add Property',
88
+ typeOptions: {
89
+ multipleValues: true,
90
+ sortable: true,
91
+ loadOptionsMethod: 'getLimeTypeProperties',
92
+ loadOptionsDependsOn: ['limeType'],
93
+ },
94
+ default: {},
95
+ displayOptions: {
96
+ show: {
97
+ resource: [
98
+ 'limeObject',
99
+ ],
100
+ operation: [
101
+ 'create',
102
+ ],
103
+ inputMethod: [
104
+ 'fields',
105
+ ],
106
+ },
107
+ },
108
+ options: [
109
+ {
110
+ displayName: 'Property',
111
+ name: 'property',
112
+ values: [
113
+ {
114
+ displayName: 'Property Name',
115
+ name: 'name',
116
+ type: 'options',
117
+ typeOptions: {
118
+ loadOptionsMethod: 'getLimeTypeProperties',
119
+ loadOptionsDependsOn: ['limeType'],
120
+ },
121
+ default: '',
122
+ description: 'Name of the property',
123
+ },
124
+ {
125
+ displayName: 'Property Value',
126
+ name: 'value',
127
+ type: 'string',
128
+ default: '',
129
+ description: 'Value of the property',
130
+ },
131
+ ],
132
+ },
133
+ ],
134
+ },
135
+ {
136
+ displayName: 'Object (JSON)',
137
+ name: 'objectJson',
138
+ type: 'json',
139
+ default: '{\n "name": "New Company",\n "phone": "123-456-7890"\n}',
140
+ description: 'Object to create in JSON format',
141
+ displayOptions: {
142
+ show: {
143
+ resource: [
144
+ 'limeObject',
145
+ ],
146
+ operation: [
147
+ 'create',
148
+ ],
149
+ inputMethod: [
150
+ 'json',
151
+ ],
152
+ },
153
+ },
154
+ typeOptions: {
155
+ alwaysOpenEditWindow: true,
156
+ },
157
+ },
158
+ {
159
+ displayName: 'Options',
160
+ name: 'options',
161
+ type: 'collection',
162
+ placeholder: 'Add Option',
163
+ default: {},
164
+ displayOptions: {
165
+ show: {
166
+ resource: [
167
+ 'limeObject',
168
+ ],
169
+ operation: [
170
+ 'create',
171
+ ],
172
+ },
173
+ },
174
+ options: [
175
+ {
176
+ displayName: 'Return Created Object',
177
+ name: 'returnObject',
178
+ type: 'boolean',
179
+ default: true,
180
+ description: 'Whether to return the created object data',
181
+ },
182
+ ],
183
+ },
184
+ ];
185
+ async function execute(i) {
186
+ const { apiRequest } = await Promise.resolve().then(() => __importStar(require('../../../transport')));
187
+ const limeType = this.getNodeParameter('limeType', i);
188
+ const inputMethod = this.getNodeParameter('inputMethod', i);
189
+ const options = this.getNodeParameter('options', i, {});
190
+ if (!limeType) {
191
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Lime type must be provided');
192
+ }
193
+ let objectData;
194
+ if (inputMethod === 'json') {
195
+ try {
196
+ const jsonInput = this.getNodeParameter('objectJson', i);
197
+ objectData = typeof jsonInput === 'string' ? JSON.parse(jsonInput) : jsonInput;
198
+ }
199
+ catch (error) {
200
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid JSON input: ' + error.message);
201
+ }
202
+ }
203
+ else {
204
+ objectData = {};
205
+ const propertiesInput = this.getNodeParameter('properties.property', i, []);
206
+ if (propertiesInput && propertiesInput.length > 0) {
207
+ propertiesInput.forEach((prop) => {
208
+ if (prop.name && prop.value !== undefined) {
209
+ objectData[prop.name] = prop.value;
210
+ }
211
+ });
212
+ }
213
+ }
214
+ const endpoint = `/api/v1/limeobject/${encodeURIComponent(limeType)}/`;
215
+ try {
216
+ const response = await apiRequest.call(this, {
217
+ method: 'POST',
218
+ endpoint,
219
+ body: objectData,
220
+ });
221
+ if (options.returnObject === true && response && response._id) {
222
+ return await apiRequest.call(this, {
223
+ method: 'GET',
224
+ endpoint: `${endpoint}/${response._id}`,
225
+ });
226
+ }
227
+ return response;
228
+ }
229
+ catch (error) {
230
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to create ${limeType} object: ${error.message}`);
231
+ }
232
+ }
233
+ exports.execute = execute;
234
+ //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAKsB;AAET,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;IAEzC;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;oBACN,YAAY;iBACf;gBACD,SAAS,EAAE;oBACP,QAAQ;iBACX;aACJ;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;QACjB,WAAW,EAAE,8BAA8B;QAC3C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE;oBACN,YAAY;iBACf;gBACD,SAAS,EAAE;oBACP,QAAQ;iBACX;aACJ;SACJ;KACJ;IAGD;QACI,WAAW,EAAE,YAAY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A0DC"}
@@ -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<any>;
@@ -0,0 +1,136 @@
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.execute = exports.properties = exports.description = void 0;
27
+ const n8n_workflow_1 = require("n8n-workflow");
28
+ exports.description = {
29
+ name: 'Delete Object',
30
+ value: 'delete',
31
+ description: 'Delete an existing object',
32
+ action: 'Delete an object',
33
+ };
34
+ exports.properties = [
35
+ {
36
+ displayName: 'Lime Type',
37
+ name: 'limeType',
38
+ type: 'options',
39
+ typeOptions: {
40
+ loadOptionsMethod: 'getLimeTypes',
41
+ },
42
+ required: true,
43
+ default: '',
44
+ description: 'The type of entity to delete',
45
+ displayOptions: {
46
+ show: {
47
+ resource: [
48
+ 'limeObject',
49
+ ],
50
+ operation: [
51
+ 'delete',
52
+ ],
53
+ },
54
+ },
55
+ },
56
+ {
57
+ displayName: 'Object ID',
58
+ name: 'objectId',
59
+ type: 'string',
60
+ required: true,
61
+ default: '',
62
+ description: 'The ID of the object to delete',
63
+ displayOptions: {
64
+ show: {
65
+ resource: [
66
+ 'limeObject',
67
+ ],
68
+ operation: [
69
+ 'delete',
70
+ ],
71
+ },
72
+ },
73
+ },
74
+ {
75
+ displayName: 'Options',
76
+ name: 'options',
77
+ type: 'collection',
78
+ placeholder: 'Add Option',
79
+ default: {},
80
+ displayOptions: {
81
+ show: {
82
+ resource: [
83
+ 'limeObject',
84
+ ],
85
+ operation: [
86
+ 'delete',
87
+ ],
88
+ },
89
+ },
90
+ options: [
91
+ {
92
+ displayName: 'Force Delete',
93
+ name: 'forceDelete',
94
+ type: 'boolean',
95
+ default: false,
96
+ description: 'Whether to force deletion even if there are references to this object',
97
+ },
98
+ ],
99
+ },
100
+ ];
101
+ async function execute(i) {
102
+ const { apiRequest } = await Promise.resolve().then(() => __importStar(require('../../../transport')));
103
+ const limeType = this.getNodeParameter('limeType', i);
104
+ const objectId = this.getNodeParameter('objectId', i);
105
+ const options = this.getNodeParameter('options', i, {});
106
+ if (!limeType) {
107
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Lime type must be provided');
108
+ }
109
+ if (!objectId) {
110
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Object ID must be provided');
111
+ }
112
+ let endpoint = `/api/v1/limeobject/${encodeURIComponent(limeType)}/${encodeURIComponent(objectId)}`;
113
+ const queryParams = {};
114
+ if (options.forceDelete === true) {
115
+ queryParams.force = true;
116
+ }
117
+ try {
118
+ const response = await apiRequest.call(this, {
119
+ method: 'DELETE',
120
+ endpoint,
121
+ qs: queryParams,
122
+ });
123
+ return {
124
+ success: true,
125
+ limeType,
126
+ objectId,
127
+ message: `Successfully deleted ${limeType} with ID: ${objectId}`,
128
+ ...response,
129
+ };
130
+ }
131
+ catch (error) {
132
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to delete ${limeType} object with ID ${objectId}: ${error.message}`);
133
+ }
134
+ }
135
+ exports.execute = execute;
136
+ //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAKsB;AAET,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;oBACN,YAAY;iBACf;gBACD,SAAS,EAAE;oBACP,QAAQ;iBACX;aACJ;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;oBACN,YAAY;iBACf;gBACD,SAAS,EAAE;oBACP,QAAQ;iBACX;aACJ;SACJ;KACJ;IAGD;QACI,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAA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AE;YACzC,MAAM,EAAE,QAAQ;YAChB,QAAQ;YACR,EAAE,EAAE,WAAW;SAClB,CAAC,CAAC;QAGH,OAAO;YACH,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,QAAQ;YACR,OAAO,EAAE,wBAAwB,QAAQ,aAAa,QAAQ,EAAE;YAChE,GAAG,QAAQ;SACd,CAAC;KACL;IAAC,OAAO,KAAK,EAAE;QACZ,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,oBAAoB,QAAQ,mBAAmB,QAAQ,KAAK,KAAK,CAAC,OAAO,EAAE,CAC9E,CAAC;KACL;AACL,CAAC;AAhDD,0BAgDC"}
@@ -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<any>;
@@ -0,0 +1,125 @@
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.execute = exports.properties = exports.description = void 0;
27
+ const n8n_workflow_1 = require("n8n-workflow");
28
+ exports.description = {
29
+ name: 'Get Object',
30
+ value: 'get',
31
+ description: 'Get a single object by ID',
32
+ action: 'Get an object',
33
+ };
34
+ exports.properties = [
35
+ {
36
+ displayName: 'Lime Type',
37
+ name: 'limeType',
38
+ type: 'options',
39
+ typeOptions: {
40
+ loadOptionsMethod: 'getLimeTypes',
41
+ },
42
+ required: true,
43
+ default: '',
44
+ description: 'The type of entity to retrieve',
45
+ displayOptions: {
46
+ show: {
47
+ resource: [
48
+ 'limeObject',
49
+ ],
50
+ operation: [
51
+ 'get',
52
+ ],
53
+ },
54
+ },
55
+ },
56
+ {
57
+ displayName: 'Object ID',
58
+ name: 'objectId',
59
+ type: 'string',
60
+ required: true,
61
+ default: '',
62
+ description: 'The ID of the object to retrieve',
63
+ displayOptions: {
64
+ show: {
65
+ resource: [
66
+ 'limeObject',
67
+ ],
68
+ operation: [
69
+ 'get',
70
+ ],
71
+ },
72
+ },
73
+ },
74
+ {
75
+ displayName: 'Properties to Return',
76
+ name: 'properties',
77
+ type: 'multiOptions',
78
+ typeOptions: {
79
+ loadOptionsMethod: 'getLimeTypeProperties',
80
+ loadOptionsDependsOn: ['limeType'],
81
+ },
82
+ default: [],
83
+ description: 'Properties to include in the response',
84
+ displayOptions: {
85
+ show: {
86
+ resource: [
87
+ 'limeObject',
88
+ ],
89
+ operation: [
90
+ 'get',
91
+ ],
92
+ },
93
+ },
94
+ },
95
+ ];
96
+ async function execute(i) {
97
+ const { apiRequest } = await Promise.resolve().then(() => __importStar(require('../../../transport')));
98
+ const limeType = this.getNodeParameter('limeType', i);
99
+ const objectId = this.getNodeParameter('objectId', i);
100
+ const properties = this.getNodeParameter('properties', i, []);
101
+ if (!limeType) {
102
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Lime type must be provided');
103
+ }
104
+ if (!objectId) {
105
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Object ID must be provided');
106
+ }
107
+ const queryParams = {};
108
+ if (properties && properties.length > 0) {
109
+ queryParams._fields = properties.join(',');
110
+ }
111
+ const endpoint = `/api/v1/limeobject/${encodeURIComponent(limeType)}/${encodeURIComponent(objectId)}/`;
112
+ try {
113
+ const response = await apiRequest.call(this, {
114
+ method: 'GET',
115
+ endpoint,
116
+ qs: queryParams,
117
+ });
118
+ return response;
119
+ }
120
+ catch (error) {
121
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to get ${limeType} object with ID ${objectId}: ${error.message}`);
122
+ }
123
+ }
124
+ exports.execute = execute;
125
+ //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAKsB;AAET,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;oBACN,YAAY;iBACf;gBACD,SAAS,EAAE;oBACP,KAAK;iBACR;aACJ;SACJ;KACJ;IAGD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IA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AE;QACrC,WAAW,CAAC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC9C;IAED,MAAM,QAAQ,GAAG,sBAAsB,kBAAkB,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC;IAEvG,IAAI;QACA,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE;YACzC,MAAM,EAAE,KAAK;YACb,QAAQ;YACR,EAAE,EAAE,WAAW;SAClB,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;KACnB;IAAC,OAAO,KAAK,EAAE;QACZ,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,iBAAiB,QAAQ,mBAAmB,QAAQ,KAAK,KAAK,CAAC,OAAO,EAAE,CAC3E,CAAC;KACL;AACL,CAAC;AAzCD,0BAyCC"}
@@ -0,0 +1,3 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<any>;