@joshuanode/n8n-nodes-cipp 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +142 -0
  2. package/dist/credentials/CippApi.credentials.d.ts +10 -0
  3. package/dist/credentials/CippApi.credentials.d.ts.map +1 -0
  4. package/dist/credentials/CippApi.credentials.js +58 -0
  5. package/dist/credentials/CippApi.credentials.js.map +1 -0
  6. package/dist/credentials/cipp.svg +4 -0
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +19 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/nodes/Cipp/Cipp.node.d.ts +11 -0
  12. package/dist/nodes/Cipp/Cipp.node.d.ts.map +1 -0
  13. package/dist/nodes/Cipp/Cipp.node.js +949 -0
  14. package/dist/nodes/Cipp/Cipp.node.js.map +1 -0
  15. package/dist/nodes/Cipp/GenericFunctions.d.ts +23 -0
  16. package/dist/nodes/Cipp/GenericFunctions.d.ts.map +1 -0
  17. package/dist/nodes/Cipp/GenericFunctions.js +181 -0
  18. package/dist/nodes/Cipp/GenericFunctions.js.map +1 -0
  19. package/dist/nodes/Cipp/cipp.svg +4 -0
  20. package/dist/nodes/Cipp/descriptions/AlertDescription.d.ts +4 -0
  21. package/dist/nodes/Cipp/descriptions/AlertDescription.d.ts.map +1 -0
  22. package/dist/nodes/Cipp/descriptions/AlertDescription.js +251 -0
  23. package/dist/nodes/Cipp/descriptions/AlertDescription.js.map +1 -0
  24. package/dist/nodes/Cipp/descriptions/ApplicationDescription.d.ts +4 -0
  25. package/dist/nodes/Cipp/descriptions/ApplicationDescription.d.ts.map +1 -0
  26. package/dist/nodes/Cipp/descriptions/ApplicationDescription.js +458 -0
  27. package/dist/nodes/Cipp/descriptions/ApplicationDescription.js.map +1 -0
  28. package/dist/nodes/Cipp/descriptions/CippDescription.d.ts +8 -0
  29. package/dist/nodes/Cipp/descriptions/CippDescription.d.ts.map +1 -0
  30. package/dist/nodes/Cipp/descriptions/CippDescription.js +534 -0
  31. package/dist/nodes/Cipp/descriptions/CippDescription.js.map +1 -0
  32. package/dist/nodes/Cipp/descriptions/DeviceDescription.d.ts +6 -0
  33. package/dist/nodes/Cipp/descriptions/DeviceDescription.d.ts.map +1 -0
  34. package/dist/nodes/Cipp/descriptions/DeviceDescription.js +374 -0
  35. package/dist/nodes/Cipp/descriptions/DeviceDescription.js.map +1 -0
  36. package/dist/nodes/Cipp/descriptions/GroupDescription.d.ts +4 -0
  37. package/dist/nodes/Cipp/descriptions/GroupDescription.d.ts.map +1 -0
  38. package/dist/nodes/Cipp/descriptions/GroupDescription.js +315 -0
  39. package/dist/nodes/Cipp/descriptions/GroupDescription.js.map +1 -0
  40. package/dist/nodes/Cipp/descriptions/MailboxDescription.d.ts +4 -0
  41. package/dist/nodes/Cipp/descriptions/MailboxDescription.d.ts.map +1 -0
  42. package/dist/nodes/Cipp/descriptions/MailboxDescription.js +175 -0
  43. package/dist/nodes/Cipp/descriptions/MailboxDescription.js.map +1 -0
  44. package/dist/nodes/Cipp/descriptions/TeamDescription.d.ts +6 -0
  45. package/dist/nodes/Cipp/descriptions/TeamDescription.d.ts.map +1 -0
  46. package/dist/nodes/Cipp/descriptions/TeamDescription.js +509 -0
  47. package/dist/nodes/Cipp/descriptions/TeamDescription.js.map +1 -0
  48. package/dist/nodes/Cipp/descriptions/TenantDescription.d.ts +4 -0
  49. package/dist/nodes/Cipp/descriptions/TenantDescription.d.ts.map +1 -0
  50. package/dist/nodes/Cipp/descriptions/TenantDescription.js +102 -0
  51. package/dist/nodes/Cipp/descriptions/TenantDescription.js.map +1 -0
  52. package/dist/nodes/Cipp/descriptions/UserDescription.d.ts +4 -0
  53. package/dist/nodes/Cipp/descriptions/UserDescription.d.ts.map +1 -0
  54. package/dist/nodes/Cipp/descriptions/UserDescription.js +374 -0
  55. package/dist/nodes/Cipp/descriptions/UserDescription.js.map +1 -0
  56. package/dist/nodes/Cipp/descriptions/index.d.ts +3 -0
  57. package/dist/nodes/Cipp/descriptions/index.d.ts.map +1 -0
  58. package/dist/nodes/Cipp/descriptions/index.js +43 -0
  59. package/dist/nodes/Cipp/descriptions/index.js.map +1 -0
  60. package/dist/nodes/Cipp/types.d.ts +142 -0
  61. package/dist/nodes/Cipp/types.d.ts.map +1 -0
  62. package/dist/nodes/Cipp/types.js +3 -0
  63. package/dist/nodes/Cipp/types.js.map +1 -0
  64. package/package.json +68 -0
@@ -0,0 +1,949 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Cipp = void 0;
4
+ const GenericFunctions_1 = require("./GenericFunctions");
5
+ const descriptions_1 = require("./descriptions");
6
+ class Cipp {
7
+ description = {
8
+ displayName: 'CIPP',
9
+ name: 'cipp',
10
+ icon: 'file:cipp.svg',
11
+ group: ['transform'],
12
+ version: 1,
13
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
14
+ description: 'Manage Microsoft 365 tenants via CIPP.app',
15
+ defaults: {
16
+ name: 'CIPP',
17
+ },
18
+ inputs: ['main'],
19
+ outputs: ['main'],
20
+ credentials: [
21
+ {
22
+ name: 'cippApi',
23
+ required: true,
24
+ },
25
+ ],
26
+ properties: [
27
+ {
28
+ displayName: 'Resource',
29
+ name: 'resource',
30
+ type: 'options',
31
+ noDataExpression: true,
32
+ options: [
33
+ {
34
+ name: 'Alert',
35
+ value: 'alert',
36
+ description: 'Manage alerts and security incidents',
37
+ },
38
+ {
39
+ name: 'Application',
40
+ value: 'application',
41
+ description: 'Manage Intune applications',
42
+ },
43
+ {
44
+ name: 'Autopilot',
45
+ value: 'autopilot',
46
+ description: 'Manage Autopilot devices',
47
+ },
48
+ {
49
+ name: 'Backup',
50
+ value: 'backup',
51
+ description: 'Manage CIPP backups',
52
+ },
53
+ {
54
+ name: 'Device',
55
+ value: 'device',
56
+ description: 'Manage Intune devices',
57
+ },
58
+ {
59
+ name: 'Group',
60
+ value: 'group',
61
+ description: 'Manage Azure AD groups',
62
+ },
63
+ {
64
+ name: 'Mailbox',
65
+ value: 'mailbox',
66
+ description: 'Manage Exchange mailboxes',
67
+ },
68
+ {
69
+ name: 'Scheduled Item',
70
+ value: 'scheduledItem',
71
+ description: 'Manage scheduled jobs',
72
+ },
73
+ {
74
+ name: 'Team',
75
+ value: 'team',
76
+ description: 'Manage Teams and SharePoint',
77
+ },
78
+ {
79
+ name: 'Tenant',
80
+ value: 'tenant',
81
+ description: 'List and manage tenants',
82
+ },
83
+ {
84
+ name: 'Tool',
85
+ value: 'tools',
86
+ description: 'Breach search and Graph requests',
87
+ },
88
+ {
89
+ name: 'User',
90
+ value: 'user',
91
+ description: 'Manage Azure AD users',
92
+ },
93
+ {
94
+ name: 'Voice',
95
+ value: 'voice',
96
+ description: 'Manage Teams Voice',
97
+ },
98
+ ],
99
+ default: 'tenant',
100
+ },
101
+ ...descriptions_1.operationFields,
102
+ ...descriptions_1.resourceFields,
103
+ ],
104
+ usableAsTool: true,
105
+ };
106
+ methods = {
107
+ listSearch: {
108
+ async tenantSearch(filter) {
109
+ const tenants = await GenericFunctions_1.getTenantList.call(this);
110
+ const results = tenants
111
+ .filter((tenant) => {
112
+ if (!filter)
113
+ return true;
114
+ const searchTerm = filter.toLowerCase();
115
+ return (tenant.displayName?.toLowerCase().includes(searchTerm) ||
116
+ tenant.defaultDomainName?.toLowerCase().includes(searchTerm));
117
+ })
118
+ .map((tenant) => ({
119
+ name: tenant.displayName || tenant.defaultDomainName,
120
+ value: tenant.defaultDomainName,
121
+ url: `https://portal.azure.com/${tenant.defaultDomainName}`,
122
+ }));
123
+ return { results };
124
+ },
125
+ },
126
+ };
127
+ async execute() {
128
+ const items = this.getInputData();
129
+ const returnData = [];
130
+ const resource = this.getNodeParameter('resource', 0);
131
+ const operation = this.getNodeParameter('operation', 0);
132
+ for (let i = 0; i < items.length; i++) {
133
+ try {
134
+ let responseData = {};
135
+ // Get tenant filter if applicable
136
+ const getTenantFilter = () => {
137
+ try {
138
+ const tenantValue = this.getNodeParameter('tenantFilter', i);
139
+ return (0, GenericFunctions_1.getResourceLocatorValue)(tenantValue);
140
+ }
141
+ catch {
142
+ return '';
143
+ }
144
+ };
145
+ // ==================== TENANT ====================
146
+ if (resource === 'tenant') {
147
+ if (operation === 'getAll') {
148
+ const returnAll = this.getNodeParameter('returnAll', i);
149
+ const options = this.getNodeParameter('options', i, {});
150
+ const qs = {};
151
+ if (options.allTenantSelector) {
152
+ qs.allTenantSelector = true;
153
+ }
154
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListTenants', {}, qs);
155
+ if (Array.isArray(responseData) && !returnAll) {
156
+ const limit = this.getNodeParameter('limit', i);
157
+ responseData = responseData.slice(0, limit);
158
+ }
159
+ }
160
+ else if (operation === 'clearCache') {
161
+ const clearTenantOnly = this.getNodeParameter('clearCacheTenantOnly', i);
162
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ListTenants', {
163
+ ClearCache: true,
164
+ TenantsOnly: clearTenantOnly,
165
+ }, {});
166
+ }
167
+ }
168
+ // ==================== USER ====================
169
+ else if (resource === 'user') {
170
+ const tenantFilter = getTenantFilter();
171
+ if (operation === 'getAll') {
172
+ const returnAll = this.getNodeParameter('returnAll', i);
173
+ const filters = this.getNodeParameter('filters', i, {});
174
+ const qs = {
175
+ tenantFilter,
176
+ Endpoint: 'users',
177
+ };
178
+ if (filters.select)
179
+ qs['$select'] = filters.select;
180
+ if (filters.filter)
181
+ qs['$filter'] = filters.filter;
182
+ if (!returnAll) {
183
+ const limit = this.getNodeParameter('limit', i);
184
+ qs['$top'] = limit;
185
+ }
186
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListGraphRequest', {}, qs);
187
+ }
188
+ else if (operation === 'add') {
189
+ const firstName = this.getNodeParameter('firstName', i);
190
+ const lastName = this.getNodeParameter('lastName', i);
191
+ const domain = this.getNodeParameter('domain', i);
192
+ const additionalFields = this.getNodeParameter('additionalFields', i, {});
193
+ const body = {
194
+ tenantFilter,
195
+ firstName,
196
+ lastName,
197
+ domain,
198
+ ...additionalFields,
199
+ };
200
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddUser', body, {});
201
+ }
202
+ else if (operation === 'disable' || operation === 'enable') {
203
+ const userId = this.getNodeParameter('userId', i);
204
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecDisableUser', {
205
+ tenantFilter,
206
+ ID: userId,
207
+ Enable: operation === 'enable',
208
+ }, {});
209
+ }
210
+ else if (operation === 'resetPassword') {
211
+ const userId = this.getNodeParameter('userId', i);
212
+ const options = this.getNodeParameter('passwordOptions', i, {});
213
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecResetPass', {
214
+ tenantFilter,
215
+ ID: userId,
216
+ MustChange: options.mustChangePass !== false,
217
+ }, {});
218
+ }
219
+ else if (operation === 'remove') {
220
+ const userId = this.getNodeParameter('userId', i);
221
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/RemoveUser', {
222
+ tenantFilter,
223
+ ID: userId,
224
+ }, {});
225
+ }
226
+ else if (operation === 'resetMfa') {
227
+ const userId = this.getNodeParameter('userId', i);
228
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecResetMFA', {
229
+ tenantFilter,
230
+ ID: userId,
231
+ }, {});
232
+ }
233
+ else if (operation === 'sendMfaPush') {
234
+ const userId = this.getNodeParameter('userId', i);
235
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecSendPush', {
236
+ tenantFilter,
237
+ UserPrincipalName: userId,
238
+ }, {});
239
+ }
240
+ else if (operation === 'setPerUserMfa') {
241
+ const userId = this.getNodeParameter('userId', i);
242
+ const mfaState = this.getNodeParameter('mfaState', i);
243
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecPerUserMFA', {
244
+ tenantFilter,
245
+ userId,
246
+ State: mfaState,
247
+ }, {});
248
+ }
249
+ else if (operation === 'createTap') {
250
+ const userId = this.getNodeParameter('userId', i);
251
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecCreateTAP', {
252
+ tenantFilter,
253
+ ID: userId,
254
+ }, {});
255
+ }
256
+ else if (operation === 'clearImmutableId') {
257
+ const userId = this.getNodeParameter('userId', i);
258
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecClrImmId', {
259
+ tenantFilter,
260
+ ID: userId,
261
+ }, {});
262
+ }
263
+ else if (operation === 'revokeSessions') {
264
+ const userId = this.getNodeParameter('userId', i);
265
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecRevokeSessions', {
266
+ tenantFilter,
267
+ ID: userId,
268
+ }, {});
269
+ }
270
+ else if (operation === 'offboard') {
271
+ const users = this.getNodeParameter('usersToOffboard', i);
272
+ const scheduled = this.getNodeParameter('scheduledOffboard', i);
273
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecOffboardUser', {
274
+ tenantFilter,
275
+ user: JSON.parse(users),
276
+ Scheduled: { enabled: scheduled },
277
+ }, {});
278
+ }
279
+ }
280
+ // ==================== GROUP ====================
281
+ else if (resource === 'group') {
282
+ const tenantFilter = getTenantFilter();
283
+ if (operation === 'getAll') {
284
+ const returnAll = this.getNodeParameter('returnAll', i);
285
+ const options = this.getNodeParameter('options', i, {});
286
+ const qs = { tenantFilter };
287
+ if (options.groupId)
288
+ qs.groupId = options.groupId;
289
+ if (options.members)
290
+ qs.members = true;
291
+ if (options.owners)
292
+ qs.owners = true;
293
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListGroups', {}, qs);
294
+ if (Array.isArray(responseData) && !returnAll) {
295
+ const limit = this.getNodeParameter('limit', i);
296
+ responseData = responseData.slice(0, limit);
297
+ }
298
+ }
299
+ else if (operation === 'add') {
300
+ const groupName = this.getNodeParameter('groupName', i);
301
+ const groupType = this.getNodeParameter('groupType', i);
302
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddGroup', {
303
+ tenantFilter,
304
+ displayName: groupName,
305
+ groupType,
306
+ }, {});
307
+ }
308
+ else if (operation === 'edit') {
309
+ const groupId = this.getNodeParameter('groupId', i);
310
+ const editOptions = this.getNodeParameter('editOptions', i, {});
311
+ const body = {
312
+ tenantFilter,
313
+ groupId,
314
+ };
315
+ if (editOptions.addMembers) {
316
+ body.addMembers = editOptions.addMembers.split(',').map((m) => m.trim());
317
+ }
318
+ if (editOptions.addOwners) {
319
+ body.addOwners = editOptions.addOwners.split(',').map((o) => o.trim());
320
+ }
321
+ if (editOptions.removeMembers) {
322
+ body.removeMembers = editOptions.removeMembers
323
+ .split(',')
324
+ .map((m) => m.trim());
325
+ }
326
+ if (editOptions.removeOwners) {
327
+ body.removeOwners = editOptions.removeOwners
328
+ .split(',')
329
+ .map((o) => o.trim());
330
+ }
331
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/EditGroup', body, {});
332
+ }
333
+ else if (operation === 'delete') {
334
+ const groupId = this.getNodeParameter('groupId', i);
335
+ const groupType = this.getNodeParameter('groupTypeForDelete', i);
336
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecGroupsDelete', {
337
+ tenantFilter,
338
+ ID: groupId,
339
+ groupType,
340
+ }, {});
341
+ }
342
+ else if (operation === 'hideFromGal') {
343
+ const groupId = this.getNodeParameter('groupId', i);
344
+ const groupEmail = this.getNodeParameter('groupEmail', i);
345
+ const groupType = this.getNodeParameter('groupTypeForDelete', i);
346
+ const hideFromGal = this.getNodeParameter('hideFromGal', i);
347
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecGroupsHideFromGAL', {
348
+ tenantFilter,
349
+ ID: groupId,
350
+ groupEmail,
351
+ groupType,
352
+ HideFromGAL: hideFromGal,
353
+ }, {});
354
+ }
355
+ else if (operation === 'deliveryManagement') {
356
+ const groupId = this.getNodeParameter('groupId', i);
357
+ const groupEmail = this.getNodeParameter('groupEmail', i);
358
+ const groupType = this.getNodeParameter('groupTypeForDelete', i);
359
+ const onlyInternal = this.getNodeParameter('onlyInternal', i);
360
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecGroupsDeliveryManagement', {
361
+ tenantFilter,
362
+ ID: groupId,
363
+ groupEmail,
364
+ groupType,
365
+ OnlyAllowInternal: onlyInternal,
366
+ }, {});
367
+ }
368
+ }
369
+ // ==================== DEVICE ====================
370
+ else if (resource === 'device') {
371
+ const tenantFilter = getTenantFilter();
372
+ if (operation === 'getAll') {
373
+ const returnAll = this.getNodeParameter('returnAll', i);
374
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListDevices', {}, { tenantFilter });
375
+ if (Array.isArray(responseData) && !returnAll) {
376
+ const limit = this.getNodeParameter('limit', i);
377
+ responseData = responseData.slice(0, limit);
378
+ }
379
+ }
380
+ else if (operation === 'manage') {
381
+ const deviceId = this.getNodeParameter('deviceId', i);
382
+ const action = this.getNodeParameter('manageAction', i);
383
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecDeviceDelete', {
384
+ tenantFilter,
385
+ ID: deviceId,
386
+ action,
387
+ }, {});
388
+ }
389
+ else if (operation === 'executeAction') {
390
+ const deviceId = this.getNodeParameter('deviceId', i);
391
+ const action = this.getNodeParameter('executeDeviceAction', i);
392
+ const body = {
393
+ tenantFilter,
394
+ GUID: deviceId,
395
+ Action: action,
396
+ };
397
+ if (action === 'Rename') {
398
+ body.newDeviceName = this.getNodeParameter('newDeviceName', i);
399
+ }
400
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecDeviceAction', body, {});
401
+ }
402
+ else if (operation === 'getRecoveryKey') {
403
+ const deviceId = this.getNodeParameter('deviceId', i);
404
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecGetRecoveryKey', {
405
+ tenantFilter,
406
+ GUID: deviceId,
407
+ }, {});
408
+ }
409
+ else if (operation === 'getLapsPassword') {
410
+ const deviceId = this.getNodeParameter('deviceId', i);
411
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecGetLocalAdminPassword', {
412
+ tenantFilter,
413
+ GUID: deviceId,
414
+ }, {});
415
+ }
416
+ }
417
+ // ==================== AUTOPILOT ====================
418
+ else if (resource === 'autopilot') {
419
+ const tenantFilter = getTenantFilter();
420
+ if (operation === 'getAll') {
421
+ const returnAll = this.getNodeParameter('returnAll', i);
422
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListAPDevices', {}, { tenantFilter });
423
+ if (Array.isArray(responseData) && !returnAll) {
424
+ const limit = this.getNodeParameter('limit', i);
425
+ responseData = responseData.slice(0, limit);
426
+ }
427
+ }
428
+ else if (operation === 'assign') {
429
+ const deviceId = this.getNodeParameter('deviceId', i);
430
+ const serialNumber = this.getNodeParameter('serialNumber', i);
431
+ const userPrincipalName = this.getNodeParameter('userPrincipalName', i);
432
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecAssignAPDevice', {
433
+ tenantFilter,
434
+ ID: deviceId,
435
+ serialNumber,
436
+ userPrincipalName,
437
+ }, {});
438
+ }
439
+ else if (operation === 'remove') {
440
+ const deviceId = this.getNodeParameter('deviceId', i);
441
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/RemoveAPDevice', {
442
+ tenantFilter,
443
+ ID: deviceId,
444
+ }, {});
445
+ }
446
+ else if (operation === 'sync') {
447
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecSyncAPDevices', { tenantFilter }, {});
448
+ }
449
+ else if (operation === 'getConfigurations') {
450
+ const configType = this.getNodeParameter('configType', i);
451
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListAutopilotConfig', {}, { tenantFilter, type: configType });
452
+ }
453
+ }
454
+ // ==================== MAILBOX ====================
455
+ else if (resource === 'mailbox') {
456
+ const tenantFilter = getTenantFilter();
457
+ const userId = this.getNodeParameter('userId', i);
458
+ if (operation === 'convert') {
459
+ const mailboxType = this.getNodeParameter('mailboxType', i);
460
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecConvertMailbox', {
461
+ tenantFilter,
462
+ ID: userId,
463
+ MailboxType: mailboxType,
464
+ }, {});
465
+ }
466
+ else if (operation === 'enableArchive') {
467
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecEnableArchive', {
468
+ tenantFilter,
469
+ ID: userId,
470
+ }, {});
471
+ }
472
+ else if (operation === 'setOutOfOffice') {
473
+ const autoReplyState = this.getNodeParameter('autoReplyState', i);
474
+ const body = {
475
+ tenantFilter,
476
+ user: userId,
477
+ AutoReplyState: autoReplyState,
478
+ };
479
+ if (autoReplyState === 'Enabled') {
480
+ body.input = this.getNodeParameter('autoReplyMessage', i);
481
+ }
482
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecSetOOO', body, {});
483
+ }
484
+ else if (operation === 'setForwarding') {
485
+ const forwardTo = this.getNodeParameter('forwardTo', i);
486
+ const keepCopy = this.getNodeParameter('keepCopy', i);
487
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecEmailForward', {
488
+ tenantFilter,
489
+ user: userId,
490
+ ForwardTo: forwardTo,
491
+ KeepCopy: keepCopy,
492
+ }, {});
493
+ }
494
+ }
495
+ // ==================== ALERT ====================
496
+ else if (resource === 'alert') {
497
+ if (operation === 'getAll') {
498
+ const returnAll = this.getNodeParameter('returnAll', i);
499
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListAlertsQueue', {}, {});
500
+ if (Array.isArray(responseData) && !returnAll) {
501
+ const limit = this.getNodeParameter('limit', i);
502
+ responseData = responseData.slice(0, limit);
503
+ }
504
+ }
505
+ else if (operation === 'add') {
506
+ const alertConfig = this.getNodeParameter('alertConfig', i);
507
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddAlert', JSON.parse(alertConfig), {});
508
+ }
509
+ else if (operation === 'getSecurityAlerts') {
510
+ const tenantFilter = getTenantFilter();
511
+ const returnAll = this.getNodeParameter('returnAll', i);
512
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ExecAlertsList', {}, { tenantFilter });
513
+ if (Array.isArray(responseData) && !returnAll) {
514
+ const limit = this.getNodeParameter('limit', i);
515
+ responseData = responseData.slice(0, limit);
516
+ }
517
+ }
518
+ else if (operation === 'getSecurityIncidents') {
519
+ const tenantFilter = getTenantFilter();
520
+ const returnAll = this.getNodeParameter('returnAll', i);
521
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ExecIncidentsList', {}, { tenantFilter });
522
+ if (Array.isArray(responseData) && !returnAll) {
523
+ const limit = this.getNodeParameter('limit', i);
524
+ responseData = responseData.slice(0, limit);
525
+ }
526
+ }
527
+ else if (operation === 'setSecurityAlertStatus') {
528
+ const tenantFilter = getTenantFilter();
529
+ const alertId = this.getNodeParameter('alertId', i);
530
+ const status = this.getNodeParameter('alertStatus', i);
531
+ const additionalFields = this.getNodeParameter('alertAdditionalFields', i, {});
532
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecSetSecurityAlert', {
533
+ tenantFilter,
534
+ ID: alertId,
535
+ Status: status,
536
+ ...additionalFields,
537
+ }, {});
538
+ }
539
+ else if (operation === 'setSecurityIncidentStatus') {
540
+ const tenantFilter = getTenantFilter();
541
+ const incidentId = this.getNodeParameter('incidentId', i);
542
+ const status = this.getNodeParameter('incidentStatus', i);
543
+ const assignedTo = this.getNodeParameter('assignedTo', i, '');
544
+ const body = {
545
+ tenantFilter,
546
+ ID: incidentId,
547
+ Status: status,
548
+ };
549
+ if (assignedTo) {
550
+ body.AssignedTo = assignedTo;
551
+ }
552
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecSetSecurityIncident', body, {});
553
+ }
554
+ }
555
+ // ==================== APPLICATION ====================
556
+ else if (resource === 'application') {
557
+ const tenantFilter = getTenantFilter();
558
+ if (operation === 'getAll') {
559
+ const returnAll = this.getNodeParameter('returnAll', i);
560
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListApps', {}, { tenantFilter });
561
+ if (Array.isArray(responseData) && !returnAll) {
562
+ const limit = this.getNodeParameter('limit', i);
563
+ responseData = responseData.slice(0, limit);
564
+ }
565
+ }
566
+ else if (operation === 'getQueue') {
567
+ const returnAll = this.getNodeParameter('returnAll', i);
568
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListApplicationQueue', {}, { tenantFilter });
569
+ if (Array.isArray(responseData) && !returnAll) {
570
+ const limit = this.getNodeParameter('limit', i);
571
+ responseData = responseData.slice(0, limit);
572
+ }
573
+ }
574
+ else if (operation === 'assign') {
575
+ const appId = this.getNodeParameter('appId', i);
576
+ const assignTo = this.getNodeParameter('assignTo', i);
577
+ const body = {
578
+ tenantFilter,
579
+ ID: appId,
580
+ AssignTo: assignTo,
581
+ };
582
+ if (assignTo === 'customGroup') {
583
+ const customGroups = this.getNodeParameter('customGroupNames', i, '');
584
+ body.customGroupNames = customGroups.split(',').map((g) => g.trim());
585
+ }
586
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecAssignApp', body, {});
587
+ }
588
+ else if (operation === 'remove') {
589
+ const appId = this.getNodeParameter('appId', i);
590
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/RemoveApp', {
591
+ tenantFilter,
592
+ ID: appId,
593
+ }, {});
594
+ }
595
+ else if (operation === 'removeFromQueue') {
596
+ const queueId = this.getNodeParameter('queueId', i);
597
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/RemoveQueuedApp', {
598
+ tenantFilter,
599
+ ID: queueId,
600
+ }, {});
601
+ }
602
+ else if (operation === 'addWinget') {
603
+ const packageId = this.getNodeParameter('packageId', i);
604
+ const appName = this.getNodeParameter('appName', i);
605
+ const appDescription = this.getNodeParameter('appDescription', i, '');
606
+ const uninstall = this.getNodeParameter('uninstall', i);
607
+ const assignTo = this.getNodeParameter('assignTo', i);
608
+ const body = {
609
+ tenantFilter,
610
+ PackageIdentifier: packageId,
611
+ ApplicationName: appName,
612
+ Description: appDescription,
613
+ InstallAsSystem: true,
614
+ UninstallApp: uninstall,
615
+ AssignTo: assignTo,
616
+ };
617
+ if (assignTo === 'customGroup') {
618
+ const customGroups = this.getNodeParameter('customGroupNames', i, '');
619
+ body.customGroupNames = customGroups.split(',').map((g) => g.trim());
620
+ }
621
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddWinGetApp', body, {});
622
+ }
623
+ else if (operation === 'addStore') {
624
+ const packageId = this.getNodeParameter('packageId', i);
625
+ const appName = this.getNodeParameter('appName', i);
626
+ const appDescription = this.getNodeParameter('appDescription', i, '');
627
+ const uninstall = this.getNodeParameter('uninstall', i);
628
+ const assignTo = this.getNodeParameter('assignTo', i);
629
+ const body = {
630
+ tenantFilter,
631
+ PackageIdentifier: packageId,
632
+ ApplicationName: appName,
633
+ Description: appDescription,
634
+ UninstallApp: uninstall,
635
+ AssignTo: assignTo,
636
+ };
637
+ if (assignTo === 'customGroup') {
638
+ const customGroups = this.getNodeParameter('customGroupNames', i, '');
639
+ body.customGroupNames = customGroups.split(',').map((g) => g.trim());
640
+ }
641
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddStoreApp', body, {});
642
+ }
643
+ else if (operation === 'addChocolatey') {
644
+ const packageName = this.getNodeParameter('packageName', i);
645
+ const appName = this.getNodeParameter('appName', i);
646
+ const appDescription = this.getNodeParameter('appDescription', i, '');
647
+ const uninstall = this.getNodeParameter('uninstall', i);
648
+ const assignTo = this.getNodeParameter('assignTo', i);
649
+ const chocoOptions = this.getNodeParameter('chocoOptions', i, {});
650
+ const body = {
651
+ tenantFilter,
652
+ PackageName: packageName,
653
+ ApplicationName: appName,
654
+ Description: appDescription,
655
+ UninstallApp: uninstall,
656
+ AssignTo: assignTo,
657
+ ...chocoOptions,
658
+ };
659
+ if (assignTo === 'customGroup') {
660
+ const customGroups = this.getNodeParameter('customGroupNames', i, '');
661
+ body.customGroupNames = customGroups.split(',').map((g) => g.trim());
662
+ }
663
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddChocoApp', body, {});
664
+ }
665
+ else if (operation === 'addMsp') {
666
+ const rmmTool = this.getNodeParameter('rmmTool', i);
667
+ const displayName = this.getNodeParameter('mspDisplayName', i);
668
+ const rmmParameters = this.getNodeParameter('rmmParameters', i);
669
+ const assignTo = this.getNodeParameter('assignTo', i);
670
+ const body = {
671
+ tenantFilter,
672
+ RMM: rmmTool,
673
+ displayName,
674
+ RMMParams: JSON.parse(rmmParameters),
675
+ AssignTo: assignTo,
676
+ };
677
+ if (assignTo === 'customGroup') {
678
+ const customGroups = this.getNodeParameter('customGroupNames', i, '');
679
+ body.customGroupNames = customGroups.split(',').map((g) => g.trim());
680
+ }
681
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddMSPApp', body, {});
682
+ }
683
+ else if (operation === 'addOffice') {
684
+ const excludedApps = this.getNodeParameter('excludedApps', i);
685
+ const updateChannel = this.getNodeParameter('updateChannel', i);
686
+ const assignTo = this.getNodeParameter('assignTo', i);
687
+ const officeOptions = this.getNodeParameter('officeOptions', i, {});
688
+ const body = {
689
+ tenantFilter,
690
+ ExcludeApps: excludedApps,
691
+ UpdateChannel: updateChannel,
692
+ AssignTo: assignTo,
693
+ ...officeOptions,
694
+ };
695
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddOfficeApp', body, {});
696
+ }
697
+ }
698
+ // ==================== TEAM ====================
699
+ else if (resource === 'team') {
700
+ const tenantFilter = getTenantFilter();
701
+ if (operation === 'getAll') {
702
+ const returnAll = this.getNodeParameter('returnAll', i);
703
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListTeams', {}, { tenantFilter, type: 'list' });
704
+ if (Array.isArray(responseData) && !returnAll) {
705
+ const limit = this.getNodeParameter('limit', i);
706
+ responseData = responseData.slice(0, limit);
707
+ }
708
+ }
709
+ else if (operation === 'add') {
710
+ const displayName = this.getNodeParameter('displayName', i);
711
+ const description = this.getNodeParameter('teamDescription', i, '');
712
+ const owner = this.getNodeParameter('owner', i);
713
+ const visibility = this.getNodeParameter('visibility', i);
714
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddTeam', {
715
+ tenantFilter,
716
+ displayName,
717
+ description,
718
+ owner,
719
+ visibility,
720
+ }, {});
721
+ }
722
+ else if (operation === 'getSites') {
723
+ const returnAll = this.getNodeParameter('returnAll', i);
724
+ const siteType = this.getNodeParameter('siteType', i);
725
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListSites', {}, { tenantFilter, type: siteType });
726
+ if (Array.isArray(responseData) && !returnAll) {
727
+ const limit = this.getNodeParameter('limit', i);
728
+ responseData = responseData.slice(0, limit);
729
+ }
730
+ }
731
+ else if (operation === 'addSite') {
732
+ const siteName = this.getNodeParameter('siteName', i);
733
+ const siteDescription = this.getNodeParameter('siteDescription', i, '');
734
+ const owner = this.getNodeParameter('siteOwner', i);
735
+ const templateName = this.getNodeParameter('templateName', i);
736
+ const body = {
737
+ tenantFilter,
738
+ siteName,
739
+ siteDescription,
740
+ owner,
741
+ TemplateName: templateName,
742
+ };
743
+ if (templateName === 'communication') {
744
+ body.siteDesign = this.getNodeParameter('siteDesign', i);
745
+ }
746
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddSite', body, {});
747
+ }
748
+ else if (operation === 'getActivity') {
749
+ const returnAll = this.getNodeParameter('returnAll', i);
750
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListTeamsActivity', {}, { tenantFilter, type: 'TeamsUserActivityUser' });
751
+ if (Array.isArray(responseData) && !returnAll) {
752
+ const limit = this.getNodeParameter('limit', i);
753
+ responseData = responseData.slice(0, limit);
754
+ }
755
+ }
756
+ else if (operation === 'manageSiteMember') {
757
+ const siteUrl = this.getNodeParameter('siteUrl', i);
758
+ const siteUser = this.getNodeParameter('siteUser', i);
759
+ const action = this.getNodeParameter('memberAction', i);
760
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecSetSharePointMember', {
761
+ tenantFilter,
762
+ URL: siteUrl,
763
+ AddMember: action === 'add',
764
+ userPrincipalName: siteUser,
765
+ }, {});
766
+ }
767
+ else if (operation === 'manageSitePermissions') {
768
+ const siteUrl = this.getNodeParameter('siteUrl', i);
769
+ const siteUser = this.getNodeParameter('siteUser', i);
770
+ const removePermission = this.getNodeParameter('removePermission', i);
771
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecSharePointPerms', {
772
+ tenantFilter,
773
+ URL: siteUrl,
774
+ RemovePermission: removePermission,
775
+ userPrincipalName: siteUser,
776
+ }, {});
777
+ }
778
+ }
779
+ // ==================== VOICE ====================
780
+ else if (resource === 'voice') {
781
+ const tenantFilter = getTenantFilter();
782
+ if (operation === 'getPhoneNumbers') {
783
+ const returnAll = this.getNodeParameter('returnAll', i);
784
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListTeamsVoice', {}, { tenantFilter });
785
+ if (Array.isArray(responseData) && !returnAll) {
786
+ const limit = this.getNodeParameter('limit', i);
787
+ responseData = responseData.slice(0, limit);
788
+ }
789
+ }
790
+ else if (operation === 'getLocations') {
791
+ const returnAll = this.getNodeParameter('returnAll', i);
792
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListTeamsLisLocation', {}, { tenantFilter });
793
+ if (Array.isArray(responseData) && !returnAll) {
794
+ const limit = this.getNodeParameter('limit', i);
795
+ responseData = responseData.slice(0, limit);
796
+ }
797
+ }
798
+ else if (operation === 'assignNumber') {
799
+ const phoneNumber = this.getNodeParameter('phoneNumber', i);
800
+ const voiceUser = this.getNodeParameter('voiceUser', i);
801
+ const phoneNumberType = this.getNodeParameter('phoneNumberType', i, '');
802
+ const locationOnly = this.getNodeParameter('locationOnly', i);
803
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecTeamsVoicePhoneNumberAssignment', {
804
+ tenantFilter,
805
+ PhoneNumber: phoneNumber,
806
+ PhoneNumberType: phoneNumberType,
807
+ LocationOnly: locationOnly,
808
+ UserPrincipalNameOrLocationId: voiceUser,
809
+ }, {});
810
+ }
811
+ else if (operation === 'unassignNumber') {
812
+ const phoneNumber = this.getNodeParameter('phoneNumber', i);
813
+ const voiceUser = this.getNodeParameter('voiceUser', i);
814
+ const phoneNumberType = this.getNodeParameter('phoneNumberType', i, '');
815
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecRemoveTeamsVoicePhoneNumberAssignment', {
816
+ tenantFilter,
817
+ PhoneNumber: phoneNumber,
818
+ PhoneNumberType: phoneNumberType,
819
+ AssignedTo: voiceUser,
820
+ }, {});
821
+ }
822
+ }
823
+ // ==================== SCHEDULED ITEM ====================
824
+ else if (resource === 'scheduledItem') {
825
+ if (operation === 'getAll') {
826
+ const returnAll = this.getNodeParameter('returnAll', i);
827
+ const options = this.getNodeParameter('options', i, {});
828
+ const qs = {};
829
+ if (options.showHidden)
830
+ qs.showHidden = true;
831
+ if (options.name)
832
+ qs.name = options.name;
833
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListScheduledItems', {}, qs);
834
+ if (Array.isArray(responseData) && !returnAll) {
835
+ const limit = this.getNodeParameter('limit', i);
836
+ responseData = responseData.slice(0, limit);
837
+ }
838
+ }
839
+ else if (operation === 'add') {
840
+ const tenantFilter = getTenantFilter();
841
+ const jobName = this.getNodeParameter('jobName', i);
842
+ const command = this.getNodeParameter('command', i);
843
+ const scheduledTime = this.getNodeParameter('scheduledTime', i, '');
844
+ const recurrence = this.getNodeParameter('recurrence', i);
845
+ const parameters = this.getNodeParameter('parameters', i);
846
+ const postExecution = this.getNodeParameter('postExecution', i);
847
+ const body = {
848
+ TenantFilter: tenantFilter || 'AllTenants',
849
+ Name: jobName,
850
+ Command: command,
851
+ Recurrence: recurrence,
852
+ Parameters: JSON.parse(parameters),
853
+ PostExecution: postExecution,
854
+ };
855
+ if (scheduledTime) {
856
+ body.ScheduledTime = new Date(scheduledTime).getTime() / 1000;
857
+ }
858
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/AddScheduledItem', body, {});
859
+ }
860
+ else if (operation === 'remove') {
861
+ const rowKey = this.getNodeParameter('rowKey', i);
862
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/RemoveScheduledItem', {
863
+ RowKey: rowKey,
864
+ }, {});
865
+ }
866
+ }
867
+ // ==================== BACKUP ====================
868
+ else if (resource === 'backup') {
869
+ if (operation === 'getAll') {
870
+ const returnAll = this.getNodeParameter('returnAll', i);
871
+ const options = this.getNodeParameter('options', i, {});
872
+ const qs = {};
873
+ if (options.namesOnly)
874
+ qs.NameOnly = true;
875
+ if (options.backupName)
876
+ qs.BackupName = options.backupName;
877
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ExecListBackup', {}, qs);
878
+ if (Array.isArray(responseData) && !returnAll) {
879
+ const limit = this.getNodeParameter('limit', i);
880
+ responseData = responseData.slice(0, limit);
881
+ }
882
+ }
883
+ else if (operation === 'run') {
884
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecRunBackup', {}, {});
885
+ }
886
+ else if (operation === 'restore') {
887
+ const backupData = this.getNodeParameter('backupData', i);
888
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecRestoreBackup', JSON.parse(backupData), {});
889
+ }
890
+ else if (operation === 'setAutoBackup') {
891
+ const enableAutoBackup = this.getNodeParameter('enableAutoBackup', i);
892
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'POST', '/api/ExecSetCIPPAutoBackup', {
893
+ Enabled: enableAutoBackup,
894
+ }, {});
895
+ }
896
+ }
897
+ // ==================== TOOLS ====================
898
+ else if (resource === 'tools') {
899
+ if (operation === 'breachAccount') {
900
+ const account = this.getNodeParameter('account', i);
901
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListBreachesAccount', {}, { account });
902
+ }
903
+ else if (operation === 'breachTenant') {
904
+ const tenantFilter = getTenantFilter();
905
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListBreachesTenant', {}, { tenantFilter });
906
+ }
907
+ else if (operation === 'executeBreachSearch') {
908
+ const tenantFilter = getTenantFilter();
909
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ExecBreachSearch', {}, { tenantFilter });
910
+ }
911
+ else if (operation === 'graphRequest') {
912
+ const tenantFilter = getTenantFilter();
913
+ const endpoint = this.getNodeParameter('graphEndpoint', i);
914
+ const graphOptions = this.getNodeParameter('graphOptions', i, {});
915
+ const qs = {
916
+ tenantFilter,
917
+ Endpoint: endpoint,
918
+ };
919
+ if (graphOptions.select)
920
+ qs['$select'] = graphOptions.select;
921
+ if (graphOptions.filter)
922
+ qs['$filter'] = graphOptions.filter;
923
+ if (graphOptions.orderby)
924
+ qs['$orderby'] = graphOptions.orderby;
925
+ if (graphOptions.top)
926
+ qs['$top'] = graphOptions.top;
927
+ if (graphOptions.count)
928
+ qs['$count'] = graphOptions.count;
929
+ responseData = await GenericFunctions_1.cippApiRequest.call(this, 'GET', '/api/ListGraphRequest', {}, qs);
930
+ }
931
+ }
932
+ // Handle response
933
+ const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
934
+ returnData.push(...executionData);
935
+ }
936
+ catch (error) {
937
+ if (this.continueOnFail()) {
938
+ const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
939
+ returnData.push(...executionErrorData);
940
+ continue;
941
+ }
942
+ throw error;
943
+ }
944
+ }
945
+ return [returnData];
946
+ }
947
+ }
948
+ exports.Cipp = Cipp;
949
+ //# sourceMappingURL=Cipp.node.js.map