n8n-nodes-hudu 1.4.1 → 1.4.3

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 (30) hide show
  1. package/README.md +9 -3
  2. package/dist/nodes/Hudu/Hudu.node.js +2 -2
  3. package/dist/nodes/Hudu/Hudu.node.js.map +1 -1
  4. package/dist/nodes/Hudu/Hudu.node.ts +410 -413
  5. package/dist/nodes/Hudu/descriptions/asset_layout_fields.description.ts +450 -450
  6. package/dist/nodes/Hudu/descriptions/assets.description.ts +587 -587
  7. package/dist/nodes/Hudu/descriptions/magic_dash.description.js +9 -21
  8. package/dist/nodes/Hudu/descriptions/magic_dash.description.js.map +1 -1
  9. package/dist/nodes/Hudu/descriptions/magic_dash.description.ts +270 -282
  10. package/dist/nodes/Hudu/optionLoaders/asset_layouts/getAssetLayoutFields.ts +290 -290
  11. package/dist/nodes/Hudu/optionLoaders/index.ts +4 -4
  12. package/dist/nodes/Hudu/resources/assets/assets.handler.ts +345 -345
  13. package/dist/nodes/Hudu/resources/assets/assets.types.ts +43 -43
  14. package/dist/nodes/Hudu/resources/magic_dash/magic_dash.handler.js +8 -14
  15. package/dist/nodes/Hudu/resources/magic_dash/magic_dash.handler.js.map +1 -1
  16. package/dist/nodes/Hudu/resources/magic_dash/magic_dash.handler.ts +85 -85
  17. package/dist/nodes/Hudu/resources/magic_dash/magic_dash.types.ts +1 -1
  18. package/dist/nodes/Hudu/resources/public_photos/public_photos.handler.ts +153 -153
  19. package/dist/nodes/Hudu/utils/debugConfig.js +3 -3
  20. package/dist/nodes/Hudu/utils/debugConfig.js.map +1 -1
  21. package/dist/nodes/Hudu/utils/debugConfig.ts +3 -3
  22. package/dist/nodes/Hudu/utils/index.ts +24 -24
  23. package/dist/nodes/Hudu/utils/operations/magic_dash.js +4 -13
  24. package/dist/nodes/Hudu/utils/operations/magic_dash.js.map +1 -1
  25. package/dist/nodes/Hudu/utils/operations/magic_dash.ts +68 -85
  26. package/dist/nodes/Hudu/utils/operations/matchers.js +1 -11
  27. package/dist/nodes/Hudu/utils/operations/matchers.js.map +1 -1
  28. package/dist/nodes/Hudu/utils/operations/matchers.ts +7 -17
  29. package/dist/nodes/Hudu/utils/requestUtils.ts +490 -490
  30. package/package.json +1 -1
@@ -1,16 +1,13 @@
1
1
  /* eslint-disable n8n-nodes-base/node-class-description-inputs-wrong-regular-node */
2
- import type {
3
- IExecuteFunctions,
4
- INodeExecutionData,
5
- INodeType,
6
- INodeTypeDescription,
7
- IDataObject,
8
- ILoadOptionsFunctions,
9
- INodePropertyOptions,
10
- } from 'n8n-workflow';
11
2
  import {
12
- NodeOperationError,
13
- NodeConnectionType,
3
+ IExecuteFunctions,
4
+ INodeExecutionData,
5
+ INodeType,
6
+ INodeTypeDescription,
7
+ IDataObject,
8
+ ILoadOptionsFunctions,
9
+ INodePropertyOptions,
10
+ NodeOperationError,
14
11
  } from 'n8n-workflow';
15
12
  import { DEBUG_CONFIG, debugLog } from './utils/debugConfig';
16
13
 
@@ -28,419 +25,419 @@ import { getAssetsForCompany } from './optionLoaders/assets/getAssetsForCompany'
28
25
  import { mapAssetLayoutFieldsForResource } from './optionLoaders/asset_layouts/getAssetLayoutFields';
29
26
 
30
27
  export class Hudu implements INodeType {
31
- description: INodeTypeDescription = {
32
- displayName: 'Hudu',
33
- name: 'hudu',
34
- icon: 'file:hudu.svg',
35
- group: ['transform'],
36
- version: 1,
37
- subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
38
- description: 'Interact with Hudu REST API',
39
- defaults: {
40
- name: 'Hudu',
41
- },
42
- usableAsTool: true,
43
- inputs: [NodeConnectionType.Main],
44
- // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
45
- outputs: [NodeConnectionType.Main],
46
-
47
- credentials: [
48
- {
49
- name: 'huduApi',
50
- required: true,
51
- },
52
- ],
53
- codex: {
54
- categories: ['Communication'],
55
- subcategories: {
56
- Communication: ['Documentation']
57
- },
58
- },
59
- requestDefaults: {
60
- baseURL: '={{$credentials.baseUrl}}/api/v1',
61
- headers: {
62
- 'x-api-key': '={{$credentials.apiKey}}',
63
- },
64
- },
65
- properties: [
66
- resourceProperty,
67
- // Operations
68
- ...descriptions.activityLogsOperations,
69
- ...descriptions.apiInfoOperations,
70
- ...descriptions.articlesOperations,
71
- ...descriptions.assetLayoutOperations,
72
- ...descriptions.assetLayoutFieldOperations,
73
- ...descriptions.assetPasswordOperations,
74
- ...descriptions.assetsOperations,
75
- ...descriptions.cardsOperations,
76
- ...descriptions.companiesOperations,
77
- ...descriptions.expirationsOperations,
78
- ...descriptions.folderOperations,
79
- ...descriptions.ipAddressOperations,
80
- ...descriptions.listOptionsOperations,
81
- ...descriptions.listsOperations,
82
- ...descriptions.magicDashOperations,
83
- ...descriptions.matchersOperations,
84
- ...descriptions.networksOperations,
85
- ...descriptions.passwordFoldersOperations,
86
- ...descriptions.proceduresOperations,
87
- ...descriptions.procedureTasksOperations,
88
- ...descriptions.publicPhotosOperations,
89
- ...descriptions.rackStorageOperations,
90
- ...descriptions.rackStorageItemOperations,
91
- ...descriptions.relationsOperations,
92
- ...descriptions.uploadsOperations,
93
- ...descriptions.userOperations,
94
- ...descriptions.websitesOperations,
95
- ...descriptions.vlansOperations,
96
- ...descriptions.vlanZonesOperations,
97
- // Fields
98
- ...descriptions.activityLogsFields,
99
- ...descriptions.apiInfoFields,
100
- ...descriptions.articlesFields,
101
- ...descriptions.assetLayoutFields,
102
- ...descriptions.assetLayoutUpdateFields,
103
- ...descriptions.assetLayoutManageFields,
104
- ...descriptions.assetLayoutFieldFields,
105
- ...descriptions.assetPasswordFields,
106
- ...descriptions.assetsFields,
107
- ...descriptions.cardsFields,
108
- ...descriptions.companiesFields,
109
- ...descriptions.expirationsFields,
110
- ...descriptions.folderFields,
111
- ...descriptions.ipAddressFields,
112
- ...descriptions.listOptionsFields,
113
- ...descriptions.listsFields,
114
- ...descriptions.magicDashFields,
115
- ...descriptions.matchersFields,
116
- ...descriptions.networksFields,
117
- ...descriptions.passwordFoldersFields,
118
- ...descriptions.proceduresFields,
119
- ...descriptions.procedureTasksFields,
120
- ...descriptions.publicPhotosFields,
121
- ...descriptions.rackStorageFields,
122
- ...descriptions.rackStorageItemFields,
123
- ...descriptions.relationsFields,
124
- ...descriptions.uploadsFields,
125
- ...descriptions.userFields,
126
- ...descriptions.websitesFields,
127
- ...descriptions.vlansFields,
128
- ...descriptions.vlanZonesFields,
129
- ],
130
- };
28
+ description: INodeTypeDescription = {
29
+ displayName: 'Hudu',
30
+ name: 'hudu',
31
+ icon: 'file:hudu.svg',
32
+ group: ['transform'],
33
+ version: 1,
34
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
35
+ description: 'Interact with Hudu REST API',
36
+ defaults: {
37
+ name: 'Hudu',
38
+ },
39
+ usableAsTool: true,
40
+ inputs: ['main'],
41
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
42
+ outputs: ['main'],
43
+
44
+ credentials: [
45
+ {
46
+ name: 'huduApi',
47
+ required: true,
48
+ },
49
+ ],
50
+ codex: {
51
+ categories: ['Communication'],
52
+ subcategories: {
53
+ Communication: ['Documentation']
54
+ },
55
+ },
56
+ requestDefaults: {
57
+ baseURL: '={{$credentials.baseUrl}}/api/v1',
58
+ headers: {
59
+ 'x-api-key': '={{$credentials.apiKey}}',
60
+ },
61
+ },
62
+ properties: [
63
+ resourceProperty,
64
+ // Operations
65
+ ...descriptions.activityLogsOperations,
66
+ ...descriptions.apiInfoOperations,
67
+ ...descriptions.articlesOperations,
68
+ ...descriptions.assetLayoutOperations,
69
+ ...descriptions.assetLayoutFieldOperations,
70
+ ...descriptions.assetPasswordOperations,
71
+ ...descriptions.assetsOperations,
72
+ ...descriptions.cardsOperations,
73
+ ...descriptions.companiesOperations,
74
+ ...descriptions.expirationsOperations,
75
+ ...descriptions.folderOperations,
76
+ ...descriptions.ipAddressOperations,
77
+ ...descriptions.listOptionsOperations,
78
+ ...descriptions.listsOperations,
79
+ ...descriptions.magicDashOperations,
80
+ ...descriptions.matchersOperations,
81
+ ...descriptions.networksOperations,
82
+ ...descriptions.passwordFoldersOperations,
83
+ ...descriptions.proceduresOperations,
84
+ ...descriptions.procedureTasksOperations,
85
+ ...descriptions.publicPhotosOperations,
86
+ ...descriptions.rackStorageOperations,
87
+ ...descriptions.rackStorageItemOperations,
88
+ ...descriptions.relationsOperations,
89
+ ...descriptions.uploadsOperations,
90
+ ...descriptions.userOperations,
91
+ ...descriptions.websitesOperations,
92
+ ...descriptions.vlansOperations,
93
+ ...descriptions.vlanZonesOperations,
94
+ // Fields
95
+ ...descriptions.activityLogsFields,
96
+ ...descriptions.apiInfoFields,
97
+ ...descriptions.articlesFields,
98
+ ...descriptions.assetLayoutFields,
99
+ ...descriptions.assetLayoutUpdateFields,
100
+ ...descriptions.assetLayoutManageFields,
101
+ ...descriptions.assetLayoutFieldFields,
102
+ ...descriptions.assetPasswordFields,
103
+ ...descriptions.assetsFields,
104
+ ...descriptions.cardsFields,
105
+ ...descriptions.companiesFields,
106
+ ...descriptions.expirationsFields,
107
+ ...descriptions.folderFields,
108
+ ...descriptions.ipAddressFields,
109
+ ...descriptions.listOptionsFields,
110
+ ...descriptions.listsFields,
111
+ ...descriptions.magicDashFields,
112
+ ...descriptions.matchersFields,
113
+ ...descriptions.networksFields,
114
+ ...descriptions.passwordFoldersFields,
115
+ ...descriptions.proceduresFields,
116
+ ...descriptions.procedureTasksFields,
117
+ ...descriptions.publicPhotosFields,
118
+ ...descriptions.rackStorageFields,
119
+ ...descriptions.rackStorageItemFields,
120
+ ...descriptions.relationsFields,
121
+ ...descriptions.uploadsFields,
122
+ ...descriptions.userFields,
123
+ ...descriptions.websitesFields,
124
+ ...descriptions.vlansFields,
125
+ ...descriptions.vlanZonesFields,
126
+ ],
127
+ };
131
128
 
132
- methods = {
133
- loadOptions: {
134
- getUsers: optionLoaders.getUsers,
135
- getCompanies: optionLoaders.getCompanies,
136
- getAssetLayouts: optionLoaders.getAssetLayouts,
137
- getAssetLayoutFields: optionLoaders.getAssetLayoutFields,
138
- getAssetLayoutFieldValues: optionLoaders.getAssetLayoutFieldValues,
139
- getAssets,
140
- getAssetsForCompany,
141
- getCustomFieldsLayoutFields: optionLoaders.getCustomFieldsLayoutFields,
142
- getLists: optionLoaders.getLists,
143
- async getStandardAssetFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
144
- return [
145
- { name: 'Name', value: 'name' },
146
- { name: 'Archived', value: 'archived' },
147
- { name: 'Primary Serial', value: 'primary_serial' },
148
- { name: 'Primary Model', value: 'primary_model' },
149
- { name: 'Primary Manufacturer', value: 'primary_manufacturer' },
150
- { name: 'Primary Mail', value: 'primary_mail' },
151
- ];
152
- },
153
- async getBinaryProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
154
- const items = (this as any).getInputData?.() || [];
155
- const item = items[0];
156
- if (!item || !item.binary) {
157
- return [];
158
- }
159
- return Object.keys(item.binary).map((key) => ({
160
- name: key,
161
- value: key,
162
- }));
163
- },
164
- },
165
- resourceMapping: {
166
- mapAssetLayoutFieldsForResource,
167
- },
168
- };
129
+ methods = {
130
+ loadOptions: {
131
+ getUsers: optionLoaders.getUsers,
132
+ getCompanies: optionLoaders.getCompanies,
133
+ getAssetLayouts: optionLoaders.getAssetLayouts,
134
+ getAssetLayoutFields: optionLoaders.getAssetLayoutFields,
135
+ getAssetLayoutFieldValues: optionLoaders.getAssetLayoutFieldValues,
136
+ getAssets,
137
+ getAssetsForCompany,
138
+ getCustomFieldsLayoutFields: optionLoaders.getCustomFieldsLayoutFields,
139
+ getLists: optionLoaders.getLists,
140
+ async getStandardAssetFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
141
+ return [
142
+ { name: 'Name', value: 'name' },
143
+ { name: 'Archived', value: 'archived' },
144
+ { name: 'Primary Serial', value: 'primary_serial' },
145
+ { name: 'Primary Model', value: 'primary_model' },
146
+ { name: 'Primary Manufacturer', value: 'primary_manufacturer' },
147
+ { name: 'Primary Mail', value: 'primary_mail' },
148
+ ];
149
+ },
150
+ async getBinaryProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
151
+ const items = (this as any).getInputData?.() || [];
152
+ const item = items[0];
153
+ if (!item || !item.binary) {
154
+ return [];
155
+ }
156
+ return Object.keys(item.binary).map((key) => ({
157
+ name: key,
158
+ value: key,
159
+ }));
160
+ },
161
+ },
162
+ resourceMapping: {
163
+ mapAssetLayoutFieldsForResource,
164
+ },
165
+ };
169
166
 
170
- async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
171
- const items = this.getInputData();
172
- const returnData: INodeExecutionData[] = [];
167
+ async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
168
+ const items = this.getInputData();
169
+ const returnData: INodeExecutionData[] = [];
173
170
 
174
- if (DEBUG_CONFIG.NODE_INPUT) {
175
- debugLog('Node Execution - Input Items', {
176
- itemCount: items.length,
177
- items,
178
- });
179
- }
171
+ if (DEBUG_CONFIG.NODE_INPUT) {
172
+ debugLog('Node Execution - Input Items', {
173
+ itemCount: items.length,
174
+ items,
175
+ });
176
+ }
180
177
 
181
- for (let i = 0; i < items.length; i++) {
182
- try {
183
- const resource = this.getNodeParameter('resource', i) as string;
184
- const operation = this.getNodeParameter('operation', i) as string;
178
+ for (let i = 0; i < items.length; i++) {
179
+ try {
180
+ const resource = this.getNodeParameter('resource', i) as string;
181
+ const operation = this.getNodeParameter('operation', i) as string;
185
182
 
186
- if (DEBUG_CONFIG.NODE_INPUT) {
187
- debugLog(`Node Execution - Item ${i}`, {
188
- resource,
189
- operation,
190
- itemData: items[i],
191
- });
192
- }
183
+ if (DEBUG_CONFIG.NODE_INPUT) {
184
+ debugLog(`Node Execution - Item ${i}`, {
185
+ resource,
186
+ operation,
187
+ itemData: items[i],
188
+ });
189
+ }
193
190
 
194
- let responseData: IDataObject | IDataObject[] = {};
191
+ let responseData: IDataObject | IDataObject[] = {};
195
192
 
196
- switch (resource) {
197
- case 'activity_logs':
198
- responseData = await resources.handleActivityLogsOperation.call(
199
- this,
200
- operation as resources.ActivityLogsOperation,
201
- i,
202
- );
203
- break;
204
- case 'api_info':
205
- responseData = await resources.handleApiInfoOperation.call(
206
- this,
207
- operation as resources.ApiInfoOperation,
208
- );
209
- break;
210
- case 'articles':
211
- responseData = await resources.handleArticlesOperation.call(
212
- this,
213
- operation as resources.ArticlesOperation,
214
- i,
215
- );
216
- break;
217
- case 'asset_layouts':
218
- responseData = await resources.handleAssetLayoutOperation.call(
219
- this,
220
- operation as resources.AssetLayoutOperation,
221
- i,
222
- );
223
- break;
224
- case 'asset_layout_fields':
225
- responseData = await resources.handleAssetLayoutFieldOperation.call(
226
- this,
227
- operation as resources.AssetLayoutFieldOperation,
228
- i,
229
- );
230
- break;
231
- case 'asset_passwords':
232
- responseData = await resources.handleAssetPasswordOperation.call(
233
- this,
234
- operation as resources.AssetPasswordOperation,
235
- i,
236
- );
237
- break;
238
- case 'assets':
239
- responseData = await resources.handleAssetsOperation.call(
240
- this,
241
- operation as resources.AssetsOperations,
242
- i,
243
- );
244
- break;
245
- case 'cards':
246
- responseData = await resources.handleCardOperation.call(
247
- this,
248
- operation as resources.CardsOperation,
249
- i,
250
- );
251
- break;
252
- case 'companies':
253
- responseData = await resources.handleCompaniesOperation.call(
254
- this,
255
- operation as resources.CompaniesOperations,
256
- i,
257
- );
258
- break;
259
- case 'expirations':
260
- responseData = await resources.handleExpirationOperation.call(
261
- this,
262
- operation as resources.ExpirationsOperations,
263
- i,
264
- );
265
- break;
266
- case 'folders':
267
- responseData = await resources.handleFolderOperation.call(
268
- this,
269
- operation as resources.FolderOperation,
270
- i,
271
- );
272
- break;
273
- case 'ipAddresses':
274
- responseData = await resources.handleIpAddressesOperation.call(
275
- this,
276
- operation as resources.IpAddressOperations,
277
- i,
278
- );
279
- break;
280
- case 'list_options':
281
- responseData = await resources.handleListOptionsOperation.call(
282
- this,
283
- operation as resources.ListOptionsOperation,
284
- i,
285
- );
286
- break;
287
- case 'lists':
288
- responseData = await resources.handleListsOperation.call(
289
- this,
290
- operation as resources.ListsOperation,
291
- i,
292
- );
293
- break;
294
- case 'magic_dash':
295
- responseData = await resources.handleMagicDashOperation.call(
296
- this,
297
- operation as resources.MagicDashOperation,
298
- i,
299
- );
300
- break;
301
- case 'matchers':
302
- responseData = await resources.handleMatcherOperation.call(
303
- this,
304
- operation as resources.MatcherOperation,
305
- i,
306
- );
307
- break;
308
- case 'networks':
309
- responseData = await resources.handleNetworksOperation.call(
310
- this,
311
- operation as resources.NetworksOperations,
312
- i,
313
- );
314
- break;
315
- case 'password_folders':
316
- responseData = await resources.handlePasswordFoldersOperation.call(
317
- this,
318
- operation as resources.PasswordFoldersOperations,
319
- i,
320
- );
321
- break;
322
- case 'procedures':
323
- responseData = await resources.handleProceduresOperation.call(
324
- this,
325
- operation as resources.ProceduresOperations,
326
- i,
327
- );
328
- break;
329
- case 'procedure_tasks':
330
- responseData = await resources.handleProcedureTasksOperation.call(
331
- this,
332
- operation as resources.ProcedureTasksOperations,
333
- i,
334
- );
335
- break;
336
- case 'public_photos':
337
- responseData = await resources.handlePublicPhotoOperation.call(
338
- this,
339
- operation as resources.PublicPhotoOperation,
340
- i,
341
- );
342
- break;
343
- case 'rack_storages':
344
- responseData = await resources.handleRackStorageOperation.call(
345
- this,
346
- operation as resources.RackStorageOperation,
347
- i,
348
- );
349
- break;
350
- case 'rack_storage_items':
351
- responseData = await resources.handleRackStorageItemOperation.call(
352
- this,
353
- operation as resources.RackStorageItemOperation,
354
- i,
355
- );
356
- break;
357
- case 'relations':
358
- responseData = await resources.handleRelationsOperation.call(
359
- this,
360
- operation as resources.RelationOperation,
361
- i,
362
- );
363
- break;
364
- case 'uploads':
365
- responseData = await resources.handleUploadOperation.call(
366
- this,
367
- operation as resources.UploadOperation,
368
- i,
369
- );
370
- break;
371
- case 'users':
372
- responseData = await resources.handleUserOperation.call(
373
- this,
374
- operation as resources.UserOperation,
375
- i,
376
- );
377
- break;
378
- case 'websites':
379
- responseData = await resources.handleWebsitesOperation.call(
380
- this,
381
- operation as resources.WebsiteOperation,
382
- i,
383
- );
384
- break;
385
- case 'vlans':
386
- responseData = await resources.handleVlansOperation.call(
387
- this,
388
- operation as resources.VlanOperation,
389
- i,
390
- );
391
- break;
392
- case 'vlan_zones':
393
- responseData = await resources.handleVlanZonesOperation.call(
394
- this,
395
- operation as resources.VlanZoneOperation,
396
- i,
397
- );
398
- break;
399
- default:
400
- throw new NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`);
401
- }
193
+ switch (resource) {
194
+ case 'activity_logs':
195
+ responseData = await resources.handleActivityLogsOperation.call(
196
+ this,
197
+ operation as resources.ActivityLogsOperation,
198
+ i,
199
+ );
200
+ break;
201
+ case 'api_info':
202
+ responseData = await resources.handleApiInfoOperation.call(
203
+ this,
204
+ operation as resources.ApiInfoOperation,
205
+ );
206
+ break;
207
+ case 'articles':
208
+ responseData = await resources.handleArticlesOperation.call(
209
+ this,
210
+ operation as resources.ArticlesOperation,
211
+ i,
212
+ );
213
+ break;
214
+ case 'asset_layouts':
215
+ responseData = await resources.handleAssetLayoutOperation.call(
216
+ this,
217
+ operation as resources.AssetLayoutOperation,
218
+ i,
219
+ );
220
+ break;
221
+ case 'asset_layout_fields':
222
+ responseData = await resources.handleAssetLayoutFieldOperation.call(
223
+ this,
224
+ operation as resources.AssetLayoutFieldOperation,
225
+ i,
226
+ );
227
+ break;
228
+ case 'asset_passwords':
229
+ responseData = await resources.handleAssetPasswordOperation.call(
230
+ this,
231
+ operation as resources.AssetPasswordOperation,
232
+ i,
233
+ );
234
+ break;
235
+ case 'assets':
236
+ responseData = await resources.handleAssetsOperation.call(
237
+ this,
238
+ operation as resources.AssetsOperations,
239
+ i,
240
+ );
241
+ break;
242
+ case 'cards':
243
+ responseData = await resources.handleCardOperation.call(
244
+ this,
245
+ operation as resources.CardsOperation,
246
+ i,
247
+ );
248
+ break;
249
+ case 'companies':
250
+ responseData = await resources.handleCompaniesOperation.call(
251
+ this,
252
+ operation as resources.CompaniesOperations,
253
+ i,
254
+ );
255
+ break;
256
+ case 'expirations':
257
+ responseData = await resources.handleExpirationOperation.call(
258
+ this,
259
+ operation as resources.ExpirationsOperations,
260
+ i,
261
+ );
262
+ break;
263
+ case 'folders':
264
+ responseData = await resources.handleFolderOperation.call(
265
+ this,
266
+ operation as resources.FolderOperation,
267
+ i,
268
+ );
269
+ break;
270
+ case 'ipAddresses':
271
+ responseData = await resources.handleIpAddressesOperation.call(
272
+ this,
273
+ operation as resources.IpAddressOperations,
274
+ i,
275
+ );
276
+ break;
277
+ case 'list_options':
278
+ responseData = await resources.handleListOptionsOperation.call(
279
+ this,
280
+ operation as resources.ListOptionsOperation,
281
+ i,
282
+ );
283
+ break;
284
+ case 'lists':
285
+ responseData = await resources.handleListsOperation.call(
286
+ this,
287
+ operation as resources.ListsOperation,
288
+ i,
289
+ );
290
+ break;
291
+ case 'magic_dash':
292
+ responseData = await resources.handleMagicDashOperation.call(
293
+ this,
294
+ operation as resources.MagicDashOperation,
295
+ i,
296
+ );
297
+ break;
298
+ case 'matchers':
299
+ responseData = await resources.handleMatcherOperation.call(
300
+ this,
301
+ operation as resources.MatcherOperation,
302
+ i,
303
+ );
304
+ break;
305
+ case 'networks':
306
+ responseData = await resources.handleNetworksOperation.call(
307
+ this,
308
+ operation as resources.NetworksOperations,
309
+ i,
310
+ );
311
+ break;
312
+ case 'password_folders':
313
+ responseData = await resources.handlePasswordFoldersOperation.call(
314
+ this,
315
+ operation as resources.PasswordFoldersOperations,
316
+ i,
317
+ );
318
+ break;
319
+ case 'procedures':
320
+ responseData = await resources.handleProceduresOperation.call(
321
+ this,
322
+ operation as resources.ProceduresOperations,
323
+ i,
324
+ );
325
+ break;
326
+ case 'procedure_tasks':
327
+ responseData = await resources.handleProcedureTasksOperation.call(
328
+ this,
329
+ operation as resources.ProcedureTasksOperations,
330
+ i,
331
+ );
332
+ break;
333
+ case 'public_photos':
334
+ responseData = await resources.handlePublicPhotoOperation.call(
335
+ this,
336
+ operation as resources.PublicPhotoOperation,
337
+ i,
338
+ );
339
+ break;
340
+ case 'rack_storages':
341
+ responseData = await resources.handleRackStorageOperation.call(
342
+ this,
343
+ operation as resources.RackStorageOperation,
344
+ i,
345
+ );
346
+ break;
347
+ case 'rack_storage_items':
348
+ responseData = await resources.handleRackStorageItemOperation.call(
349
+ this,
350
+ operation as resources.RackStorageItemOperation,
351
+ i,
352
+ );
353
+ break;
354
+ case 'relations':
355
+ responseData = await resources.handleRelationsOperation.call(
356
+ this,
357
+ operation as resources.RelationOperation,
358
+ i,
359
+ );
360
+ break;
361
+ case 'uploads':
362
+ responseData = await resources.handleUploadOperation.call(
363
+ this,
364
+ operation as resources.UploadOperation,
365
+ i,
366
+ );
367
+ break;
368
+ case 'users':
369
+ responseData = await resources.handleUserOperation.call(
370
+ this,
371
+ operation as resources.UserOperation,
372
+ i,
373
+ );
374
+ break;
375
+ case 'websites':
376
+ responseData = await resources.handleWebsitesOperation.call(
377
+ this,
378
+ operation as resources.WebsiteOperation,
379
+ i,
380
+ );
381
+ break;
382
+ case 'vlans':
383
+ responseData = await resources.handleVlansOperation.call(
384
+ this,
385
+ operation as resources.VlanOperation,
386
+ i,
387
+ );
388
+ break;
389
+ case 'vlan_zones':
390
+ responseData = await resources.handleVlanZonesOperation.call(
391
+ this,
392
+ operation as resources.VlanZoneOperation,
393
+ i,
394
+ );
395
+ break;
396
+ default:
397
+ throw new NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`);
398
+ }
402
399
 
403
- const executionData = this.helpers.returnJsonArray(responseData).map((item) => ({
404
- ...item,
405
- pairedItem: { item: i },
406
- }));
400
+ const executionData = this.helpers.returnJsonArray(responseData).map((item) => ({
401
+ ...item,
402
+ pairedItem: { item: i },
403
+ }));
407
404
 
408
- if (DEBUG_CONFIG.NODE_OUTPUT) {
409
- debugLog(`Node Execution - Item ${i} Output`, {
410
- executionData,
411
- });
412
- }
405
+ if (DEBUG_CONFIG.NODE_OUTPUT) {
406
+ debugLog(`Node Execution - Item ${i} Output`, {
407
+ executionData,
408
+ });
409
+ }
413
410
 
414
- returnData.push(...executionData);
415
- } catch (error) {
416
- if (DEBUG_CONFIG.NODE_OUTPUT) {
417
- debugLog(`Node Execution - Item ${i} Error`, {
418
- error,
419
- message: error instanceof Error ? error.message : String(error),
420
- stack: error instanceof Error ? error.stack : undefined,
421
- level: 'error',
422
- });
423
- }
411
+ returnData.push(...executionData);
412
+ } catch (error) {
413
+ if (DEBUG_CONFIG.NODE_OUTPUT) {
414
+ debugLog(`Node Execution - Item ${i} Error`, {
415
+ error,
416
+ message: error instanceof Error ? error.message : String(error),
417
+ stack: error instanceof Error ? error.stack : undefined,
418
+ level: 'error',
419
+ });
420
+ }
424
421
 
425
- if (this.continueOnFail()) {
426
- const executionErrorData = this.helpers.returnJsonArray({ error: error.message }).map((item: IDataObject) => ({
427
- json: item,
428
- pairedItem: { item: i },
429
- }));
430
- returnData.push(...executionErrorData);
431
- continue;
432
- }
433
- throw error;
434
- }
435
- }
422
+ if (this.continueOnFail()) {
423
+ const executionErrorData = this.helpers.returnJsonArray({ error: error.message }).map((item: IDataObject) => ({
424
+ json: item,
425
+ pairedItem: { item: i },
426
+ }));
427
+ returnData.push(...executionErrorData);
428
+ continue;
429
+ }
430
+ throw error;
431
+ }
432
+ }
436
433
 
437
- if (DEBUG_CONFIG.NODE_OUTPUT) {
438
- debugLog('Node Execution - Final Output', {
439
- returnDataCount: returnData.length,
440
- returnData,
441
- });
442
- }
434
+ if (DEBUG_CONFIG.NODE_OUTPUT) {
435
+ debugLog('Node Execution - Final Output', {
436
+ returnDataCount: returnData.length,
437
+ returnData,
438
+ });
439
+ }
443
440
 
444
- return [returnData];
445
- }
441
+ return [returnData];
442
+ }
446
443
  }