files.com 1.0.185 → 1.0.186
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/lib/models/Automation.js +88 -80
- package/lib/models/Notification.js +113 -17
- package/lib/models/RemoteServer.js +53 -31
- package/package.json +1 -1
- package/src/models/Automation.js +43 -24
- package/src/models/Folder.js +1 -1
- package/src/models/Notification.js +94 -1
- package/src/models/RemoteServer.js +16 -0
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.186
|
package/lib/models/Automation.js
CHANGED
@@ -53,6 +53,12 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
53
53
|
(0, _defineProperty2.default)(this, "setAutomation", function (value) {
|
54
54
|
_this.attributes.automation = value;
|
55
55
|
});
|
56
|
+
(0, _defineProperty2.default)(this, "getDeleted", function () {
|
57
|
+
return _this.attributes.deleted;
|
58
|
+
});
|
59
|
+
(0, _defineProperty2.default)(this, "setDeleted", function (value) {
|
60
|
+
_this.attributes.deleted = value;
|
61
|
+
});
|
56
62
|
(0, _defineProperty2.default)(this, "getDisabled", function () {
|
57
63
|
return _this.attributes.disabled;
|
58
64
|
});
|
@@ -71,6 +77,12 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
71
77
|
(0, _defineProperty2.default)(this, "setInterval", function (value) {
|
72
78
|
_this.attributes.interval = value;
|
73
79
|
});
|
80
|
+
(0, _defineProperty2.default)(this, "getLastModifiedAt", function () {
|
81
|
+
return _this.attributes.last_modified_at;
|
82
|
+
});
|
83
|
+
(0, _defineProperty2.default)(this, "setLastModifiedAt", function (value) {
|
84
|
+
_this.attributes.last_modified_at = value;
|
85
|
+
});
|
74
86
|
(0, _defineProperty2.default)(this, "getName", function () {
|
75
87
|
return _this.attributes.name;
|
76
88
|
});
|
@@ -161,6 +173,12 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
161
173
|
(0, _defineProperty2.default)(this, "setDestination", function (value) {
|
162
174
|
_this.attributes.destination = value;
|
163
175
|
});
|
176
|
+
(0, _defineProperty2.default)(this, "getClonedFrom", function () {
|
177
|
+
return _this.attributes.cloned_from;
|
178
|
+
});
|
179
|
+
(0, _defineProperty2.default)(this, "setClonedFrom", function (value) {
|
180
|
+
_this.attributes.cloned_from = value;
|
181
|
+
});
|
164
182
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
165
183
|
var params,
|
166
184
|
response,
|
@@ -197,116 +215,116 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
197
215
|
throw new Error("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
198
216
|
|
199
217
|
case 8:
|
200
|
-
if (!(params['
|
218
|
+
if (!(params['source'] && !(0, _utils.isString)(params['source']))) {
|
201
219
|
_context.next = 10;
|
202
220
|
break;
|
203
221
|
}
|
204
222
|
|
205
|
-
throw new Error("Bad parameter:
|
223
|
+
throw new Error("Bad parameter: source must be of type String, received ".concat((0, _utils.getType)(source)));
|
206
224
|
|
207
225
|
case 10:
|
208
|
-
if (!(params['
|
226
|
+
if (!(params['destination'] && !(0, _utils.isString)(params['destination']))) {
|
209
227
|
_context.next = 12;
|
210
228
|
break;
|
211
229
|
}
|
212
230
|
|
213
|
-
throw new Error("Bad parameter:
|
231
|
+
throw new Error("Bad parameter: destination must be of type String, received ".concat((0, _utils.getType)(destination)));
|
214
232
|
|
215
233
|
case 12:
|
216
|
-
if (!(params['
|
234
|
+
if (!(params['destinations'] && !(0, _utils.isArray)(params['destinations']))) {
|
217
235
|
_context.next = 14;
|
218
236
|
break;
|
219
237
|
}
|
220
238
|
|
221
|
-
throw new Error("Bad parameter:
|
239
|
+
throw new Error("Bad parameter: destinations must be of type Array, received ".concat((0, _utils.getType)(destinations)));
|
222
240
|
|
223
241
|
case 14:
|
224
|
-
if (!(params['
|
242
|
+
if (!(params['destination_replace_from'] && !(0, _utils.isString)(params['destination_replace_from']))) {
|
225
243
|
_context.next = 16;
|
226
244
|
break;
|
227
245
|
}
|
228
246
|
|
229
|
-
throw new Error("Bad parameter:
|
247
|
+
throw new Error("Bad parameter: destination_replace_from must be of type String, received ".concat((0, _utils.getType)(destination_replace_from)));
|
230
248
|
|
231
249
|
case 16:
|
232
|
-
if (!(params['
|
250
|
+
if (!(params['destination_replace_to'] && !(0, _utils.isString)(params['destination_replace_to']))) {
|
233
251
|
_context.next = 18;
|
234
252
|
break;
|
235
253
|
}
|
236
254
|
|
237
|
-
throw new Error("Bad parameter:
|
255
|
+
throw new Error("Bad parameter: destination_replace_to must be of type String, received ".concat((0, _utils.getType)(destination_replace_to)));
|
238
256
|
|
239
257
|
case 18:
|
240
|
-
if (!(params['
|
258
|
+
if (!(params['interval'] && !(0, _utils.isString)(params['interval']))) {
|
241
259
|
_context.next = 20;
|
242
260
|
break;
|
243
261
|
}
|
244
262
|
|
245
|
-
throw new Error("Bad parameter:
|
263
|
+
throw new Error("Bad parameter: interval must be of type String, received ".concat((0, _utils.getType)(interval)));
|
246
264
|
|
247
265
|
case 20:
|
248
|
-
if (!(params['
|
266
|
+
if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
|
249
267
|
_context.next = 22;
|
250
268
|
break;
|
251
269
|
}
|
252
270
|
|
253
|
-
throw new Error("Bad parameter:
|
271
|
+
throw new Error("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
|
254
272
|
|
255
273
|
case 22:
|
256
|
-
if (!(params['
|
274
|
+
if (!(params['user_ids'] && !(0, _utils.isString)(params['user_ids']))) {
|
257
275
|
_context.next = 24;
|
258
276
|
break;
|
259
277
|
}
|
260
278
|
|
261
|
-
throw new Error("Bad parameter:
|
279
|
+
throw new Error("Bad parameter: user_ids must be of type String, received ".concat((0, _utils.getType)(user_ids)));
|
262
280
|
|
263
281
|
case 24:
|
264
|
-
if (!(params['
|
282
|
+
if (!(params['group_ids'] && !(0, _utils.isString)(params['group_ids']))) {
|
265
283
|
_context.next = 26;
|
266
284
|
break;
|
267
285
|
}
|
268
286
|
|
269
|
-
throw new Error("Bad parameter:
|
287
|
+
throw new Error("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(group_ids)));
|
270
288
|
|
271
289
|
case 26:
|
272
|
-
if (!(params['
|
290
|
+
if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
|
273
291
|
_context.next = 28;
|
274
292
|
break;
|
275
293
|
}
|
276
294
|
|
277
|
-
throw new Error("Bad parameter:
|
295
|
+
throw new Error("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(description)));
|
278
296
|
|
279
297
|
case 28:
|
280
|
-
if (!(params['
|
298
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
281
299
|
_context.next = 30;
|
282
300
|
break;
|
283
301
|
}
|
284
302
|
|
285
|
-
throw new Error("Bad parameter:
|
303
|
+
throw new Error("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
286
304
|
|
287
305
|
case 30:
|
288
|
-
if (!(params['
|
306
|
+
if (!(params['trigger'] && !(0, _utils.isString)(params['trigger']))) {
|
289
307
|
_context.next = 32;
|
290
308
|
break;
|
291
309
|
}
|
292
310
|
|
293
|
-
throw new Error("Bad parameter:
|
311
|
+
throw new Error("Bad parameter: trigger must be of type String, received ".concat((0, _utils.getType)(trigger)));
|
294
312
|
|
295
313
|
case 32:
|
296
|
-
if (!(params['
|
314
|
+
if (!(params['trigger_actions'] && !(0, _utils.isArray)(params['trigger_actions']))) {
|
297
315
|
_context.next = 34;
|
298
316
|
break;
|
299
317
|
}
|
300
318
|
|
301
|
-
throw new Error("Bad parameter:
|
319
|
+
throw new Error("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(trigger_actions)));
|
302
320
|
|
303
321
|
case 34:
|
304
|
-
if (!(params['
|
322
|
+
if (!(params['automation'] && !(0, _utils.isString)(params['automation']))) {
|
305
323
|
_context.next = 36;
|
306
324
|
break;
|
307
325
|
}
|
308
326
|
|
309
|
-
throw new Error("Bad parameter:
|
327
|
+
throw new Error("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(automation)));
|
310
328
|
|
311
329
|
case 36:
|
312
330
|
if (params['id']) {
|
@@ -327,32 +345,14 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
327
345
|
throw new Error('Parameter missing: id');
|
328
346
|
|
329
347
|
case 42:
|
330
|
-
|
331
|
-
_context.next = 48;
|
332
|
-
break;
|
333
|
-
}
|
334
|
-
|
335
|
-
if (!_this.attributes.automation) {
|
336
|
-
_context.next = 47;
|
337
|
-
break;
|
338
|
-
}
|
339
|
-
|
340
|
-
params['automation'] = _this.automation;
|
341
|
-
_context.next = 48;
|
342
|
-
break;
|
343
|
-
|
344
|
-
case 47:
|
345
|
-
throw new Error('Parameter missing: automation');
|
346
|
-
|
347
|
-
case 48:
|
348
|
-
_context.next = 50;
|
348
|
+
_context.next = 44;
|
349
349
|
return _Api.default.sendRequest("/automations/".concat(params['id']), 'PATCH', params, _this.options);
|
350
350
|
|
351
|
-
case
|
351
|
+
case 44:
|
352
352
|
response = _context.sent;
|
353
353
|
return _context.abrupt("return", new Automation(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
354
354
|
|
355
|
-
case
|
355
|
+
case 46:
|
356
356
|
case "end":
|
357
357
|
return _context.stop();
|
358
358
|
}
|
@@ -596,126 +596,134 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
596
596
|
throw new Error('Parameter missing: automation');
|
597
597
|
|
598
598
|
case 4:
|
599
|
-
if (!(params['
|
599
|
+
if (!(params['source'] && !(0, _utils.isString)(params['source']))) {
|
600
600
|
_context5.next = 6;
|
601
601
|
break;
|
602
602
|
}
|
603
603
|
|
604
|
-
throw new Error("Bad parameter:
|
604
|
+
throw new Error("Bad parameter: source must be of type String, received ".concat((0, _utils.getType)(source)));
|
605
605
|
|
606
606
|
case 6:
|
607
|
-
if (!(params['
|
607
|
+
if (!(params['destination'] && !(0, _utils.isString)(params['destination']))) {
|
608
608
|
_context5.next = 8;
|
609
609
|
break;
|
610
610
|
}
|
611
611
|
|
612
|
-
throw new Error("Bad parameter:
|
612
|
+
throw new Error("Bad parameter: destination must be of type String, received ".concat((0, _utils.getType)(destination)));
|
613
613
|
|
614
614
|
case 8:
|
615
|
-
if (!(params['
|
615
|
+
if (!(params['destinations'] && !(0, _utils.isArray)(params['destinations']))) {
|
616
616
|
_context5.next = 10;
|
617
617
|
break;
|
618
618
|
}
|
619
619
|
|
620
|
-
throw new Error("Bad parameter:
|
620
|
+
throw new Error("Bad parameter: destinations must be of type Array, received ".concat((0, _utils.getType)(destinations)));
|
621
621
|
|
622
622
|
case 10:
|
623
|
-
if (!(params['
|
623
|
+
if (!(params['destination_replace_from'] && !(0, _utils.isString)(params['destination_replace_from']))) {
|
624
624
|
_context5.next = 12;
|
625
625
|
break;
|
626
626
|
}
|
627
627
|
|
628
|
-
throw new Error("Bad parameter:
|
628
|
+
throw new Error("Bad parameter: destination_replace_from must be of type String, received ".concat((0, _utils.getType)(destination_replace_from)));
|
629
629
|
|
630
630
|
case 12:
|
631
|
-
if (!(params['
|
631
|
+
if (!(params['destination_replace_to'] && !(0, _utils.isString)(params['destination_replace_to']))) {
|
632
632
|
_context5.next = 14;
|
633
633
|
break;
|
634
634
|
}
|
635
635
|
|
636
|
-
throw new Error("Bad parameter:
|
636
|
+
throw new Error("Bad parameter: destination_replace_to must be of type String, received ".concat((0, _utils.getType)(destination_replace_to)));
|
637
637
|
|
638
638
|
case 14:
|
639
|
-
if (!(params['
|
639
|
+
if (!(params['interval'] && !(0, _utils.isString)(params['interval']))) {
|
640
640
|
_context5.next = 16;
|
641
641
|
break;
|
642
642
|
}
|
643
643
|
|
644
|
-
throw new Error("Bad parameter:
|
644
|
+
throw new Error("Bad parameter: interval must be of type String, received ".concat((0, _utils.getType)(interval)));
|
645
645
|
|
646
646
|
case 16:
|
647
|
-
if (!(params['
|
647
|
+
if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
|
648
648
|
_context5.next = 18;
|
649
649
|
break;
|
650
650
|
}
|
651
651
|
|
652
|
-
throw new Error("Bad parameter:
|
652
|
+
throw new Error("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
|
653
653
|
|
654
654
|
case 18:
|
655
|
-
if (!(params['
|
655
|
+
if (!(params['user_ids'] && !(0, _utils.isString)(params['user_ids']))) {
|
656
656
|
_context5.next = 20;
|
657
657
|
break;
|
658
658
|
}
|
659
659
|
|
660
|
-
throw new Error("Bad parameter:
|
660
|
+
throw new Error("Bad parameter: user_ids must be of type String, received ".concat((0, _utils.getType)(user_ids)));
|
661
661
|
|
662
662
|
case 20:
|
663
|
-
if (!(params['
|
663
|
+
if (!(params['group_ids'] && !(0, _utils.isString)(params['group_ids']))) {
|
664
664
|
_context5.next = 22;
|
665
665
|
break;
|
666
666
|
}
|
667
667
|
|
668
|
-
throw new Error("Bad parameter:
|
668
|
+
throw new Error("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(group_ids)));
|
669
669
|
|
670
670
|
case 22:
|
671
|
-
if (!(params['
|
671
|
+
if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
|
672
672
|
_context5.next = 24;
|
673
673
|
break;
|
674
674
|
}
|
675
675
|
|
676
|
-
throw new Error("Bad parameter:
|
676
|
+
throw new Error("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(description)));
|
677
677
|
|
678
678
|
case 24:
|
679
|
-
if (!(params['
|
679
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
680
680
|
_context5.next = 26;
|
681
681
|
break;
|
682
682
|
}
|
683
683
|
|
684
|
-
throw new Error("Bad parameter:
|
684
|
+
throw new Error("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
685
685
|
|
686
686
|
case 26:
|
687
|
-
if (!(params['
|
687
|
+
if (!(params['trigger'] && !(0, _utils.isString)(params['trigger']))) {
|
688
688
|
_context5.next = 28;
|
689
689
|
break;
|
690
690
|
}
|
691
691
|
|
692
|
-
throw new Error("Bad parameter:
|
692
|
+
throw new Error("Bad parameter: trigger must be of type String, received ".concat((0, _utils.getType)(trigger)));
|
693
693
|
|
694
694
|
case 28:
|
695
|
-
if (!(params['
|
695
|
+
if (!(params['trigger_actions'] && !(0, _utils.isArray)(params['trigger_actions']))) {
|
696
696
|
_context5.next = 30;
|
697
697
|
break;
|
698
698
|
}
|
699
699
|
|
700
|
-
throw new Error("Bad parameter:
|
700
|
+
throw new Error("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(trigger_actions)));
|
701
701
|
|
702
702
|
case 30:
|
703
|
-
if (!(params['
|
703
|
+
if (!(params['automation'] && !(0, _utils.isString)(params['automation']))) {
|
704
704
|
_context5.next = 32;
|
705
705
|
break;
|
706
706
|
}
|
707
707
|
|
708
|
-
throw new Error("Bad parameter:
|
708
|
+
throw new Error("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(automation)));
|
709
709
|
|
710
710
|
case 32:
|
711
|
-
|
712
|
-
|
711
|
+
if (!(params['cloned_from'] && !(0, _utils.isInt)(params['cloned_from']))) {
|
712
|
+
_context5.next = 34;
|
713
|
+
break;
|
714
|
+
}
|
715
|
+
|
716
|
+
throw new Error("Bad parameter: cloned_from must be of type Int, received ".concat((0, _utils.getType)(cloned_from)));
|
713
717
|
|
714
718
|
case 34:
|
719
|
+
_context5.next = 36;
|
720
|
+
return _Api.default.sendRequest("/automations", 'POST', params, options);
|
721
|
+
|
722
|
+
case 36:
|
715
723
|
response = _context5.sent;
|
716
724
|
return _context5.abrupt("return", new Automation(response === null || response === void 0 ? void 0 : response.data, options));
|
717
725
|
|
718
|
-
case
|
726
|
+
case 38:
|
719
727
|
case "end":
|
720
728
|
return _context5.stop();
|
721
729
|
}
|
@@ -65,6 +65,24 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
|
|
65
65
|
(0, _defineProperty2.default)(this, "setGroupName", function (value) {
|
66
66
|
_this.attributes.group_name = value;
|
67
67
|
});
|
68
|
+
(0, _defineProperty2.default)(this, "getTriggeringGroupIds", function () {
|
69
|
+
return _this.attributes.triggering_group_ids;
|
70
|
+
});
|
71
|
+
(0, _defineProperty2.default)(this, "setTriggeringGroupIds", function (value) {
|
72
|
+
_this.attributes.triggering_group_ids = value;
|
73
|
+
});
|
74
|
+
(0, _defineProperty2.default)(this, "getTriggeringUserIds", function () {
|
75
|
+
return _this.attributes.triggering_user_ids;
|
76
|
+
});
|
77
|
+
(0, _defineProperty2.default)(this, "setTriggeringUserIds", function (value) {
|
78
|
+
_this.attributes.triggering_user_ids = value;
|
79
|
+
});
|
80
|
+
(0, _defineProperty2.default)(this, "getTriggerByShareRecipients", function () {
|
81
|
+
return _this.attributes.trigger_by_share_recipients;
|
82
|
+
});
|
83
|
+
(0, _defineProperty2.default)(this, "setTriggerByShareRecipients", function (value) {
|
84
|
+
_this.attributes.trigger_by_share_recipients = value;
|
85
|
+
});
|
68
86
|
(0, _defineProperty2.default)(this, "getNotifyUserActions", function () {
|
69
87
|
return _this.attributes.notify_user_actions;
|
70
88
|
});
|
@@ -77,6 +95,30 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
|
|
77
95
|
(0, _defineProperty2.default)(this, "setNotifyOnCopy", function (value) {
|
78
96
|
_this.attributes.notify_on_copy = value;
|
79
97
|
});
|
98
|
+
(0, _defineProperty2.default)(this, "getNotifyOnDelete", function () {
|
99
|
+
return _this.attributes.notify_on_delete;
|
100
|
+
});
|
101
|
+
(0, _defineProperty2.default)(this, "setNotifyOnDelete", function (value) {
|
102
|
+
_this.attributes.notify_on_delete = value;
|
103
|
+
});
|
104
|
+
(0, _defineProperty2.default)(this, "getNotifyOnDownload", function () {
|
105
|
+
return _this.attributes.notify_on_download;
|
106
|
+
});
|
107
|
+
(0, _defineProperty2.default)(this, "setNotifyOnDownload", function (value) {
|
108
|
+
_this.attributes.notify_on_download = value;
|
109
|
+
});
|
110
|
+
(0, _defineProperty2.default)(this, "getNotifyOnMove", function () {
|
111
|
+
return _this.attributes.notify_on_move;
|
112
|
+
});
|
113
|
+
(0, _defineProperty2.default)(this, "setNotifyOnMove", function (value) {
|
114
|
+
_this.attributes.notify_on_move = value;
|
115
|
+
});
|
116
|
+
(0, _defineProperty2.default)(this, "getNotifyOnUpload", function () {
|
117
|
+
return _this.attributes.notify_on_upload;
|
118
|
+
});
|
119
|
+
(0, _defineProperty2.default)(this, "setNotifyOnUpload", function (value) {
|
120
|
+
_this.attributes.notify_on_upload = value;
|
121
|
+
});
|
80
122
|
(0, _defineProperty2.default)(this, "getRecursive", function () {
|
81
123
|
return _this.attributes.recursive;
|
82
124
|
});
|
@@ -95,6 +137,12 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
|
|
95
137
|
(0, _defineProperty2.default)(this, "setMessage", function (value) {
|
96
138
|
_this.attributes.message = value;
|
97
139
|
});
|
140
|
+
(0, _defineProperty2.default)(this, "getTriggeringFilenames", function () {
|
141
|
+
return _this.attributes.triggering_filenames;
|
142
|
+
});
|
143
|
+
(0, _defineProperty2.default)(this, "setTriggeringFilenames", function (value) {
|
144
|
+
_this.attributes.triggering_filenames = value;
|
145
|
+
});
|
98
146
|
(0, _defineProperty2.default)(this, "getUnsubscribed", function () {
|
99
147
|
return _this.attributes.unsubscribed;
|
100
148
|
});
|
@@ -177,32 +225,56 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
|
|
177
225
|
throw new Error("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(message)));
|
178
226
|
|
179
227
|
case 12:
|
180
|
-
if (params['
|
228
|
+
if (!(params['triggering_filenames'] && !(0, _utils.isArray)(params['triggering_filenames']))) {
|
229
|
+
_context.next = 14;
|
230
|
+
break;
|
231
|
+
}
|
232
|
+
|
233
|
+
throw new Error("Bad parameter: triggering_filenames must be of type Array, received ".concat((0, _utils.getType)(triggering_filenames)));
|
234
|
+
|
235
|
+
case 14:
|
236
|
+
if (!(params['triggering_group_ids'] && !(0, _utils.isArray)(params['triggering_group_ids']))) {
|
237
|
+
_context.next = 16;
|
238
|
+
break;
|
239
|
+
}
|
240
|
+
|
241
|
+
throw new Error("Bad parameter: triggering_group_ids must be of type Array, received ".concat((0, _utils.getType)(triggering_group_ids)));
|
242
|
+
|
243
|
+
case 16:
|
244
|
+
if (!(params['triggering_user_ids'] && !(0, _utils.isArray)(params['triggering_user_ids']))) {
|
181
245
|
_context.next = 18;
|
182
246
|
break;
|
183
247
|
}
|
184
248
|
|
249
|
+
throw new Error("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0, _utils.getType)(triggering_user_ids)));
|
250
|
+
|
251
|
+
case 18:
|
252
|
+
if (params['id']) {
|
253
|
+
_context.next = 24;
|
254
|
+
break;
|
255
|
+
}
|
256
|
+
|
185
257
|
if (!_this.attributes.id) {
|
186
|
-
_context.next =
|
258
|
+
_context.next = 23;
|
187
259
|
break;
|
188
260
|
}
|
189
261
|
|
190
262
|
params['id'] = _this.id;
|
191
|
-
_context.next =
|
263
|
+
_context.next = 24;
|
192
264
|
break;
|
193
265
|
|
194
|
-
case
|
266
|
+
case 23:
|
195
267
|
throw new Error('Parameter missing: id');
|
196
268
|
|
197
|
-
case
|
198
|
-
_context.next =
|
269
|
+
case 24:
|
270
|
+
_context.next = 26;
|
199
271
|
return _Api.default.sendRequest("/notifications/".concat(params['id']), 'PATCH', params, _this.options);
|
200
272
|
|
201
|
-
case
|
273
|
+
case 26:
|
202
274
|
response = _context.sent;
|
203
275
|
return _context.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
204
276
|
|
205
|
-
case
|
277
|
+
case 28:
|
206
278
|
case "end":
|
207
279
|
return _context.stop();
|
208
280
|
}
|
@@ -478,38 +550,62 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
|
|
478
550
|
throw new Error("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(message)));
|
479
551
|
|
480
552
|
case 8:
|
481
|
-
if (!(params['
|
553
|
+
if (!(params['triggering_filenames'] && !(0, _utils.isArray)(params['triggering_filenames']))) {
|
482
554
|
_context5.next = 10;
|
483
555
|
break;
|
484
556
|
}
|
485
557
|
|
486
|
-
throw new Error("Bad parameter:
|
558
|
+
throw new Error("Bad parameter: triggering_filenames must be of type Array, received ".concat((0, _utils.getType)(triggering_filenames)));
|
487
559
|
|
488
560
|
case 10:
|
489
|
-
if (!(params['
|
561
|
+
if (!(params['triggering_group_ids'] && !(0, _utils.isArray)(params['triggering_group_ids']))) {
|
490
562
|
_context5.next = 12;
|
491
563
|
break;
|
492
564
|
}
|
493
565
|
|
494
|
-
throw new Error("Bad parameter:
|
566
|
+
throw new Error("Bad parameter: triggering_group_ids must be of type Array, received ".concat((0, _utils.getType)(triggering_group_ids)));
|
495
567
|
|
496
568
|
case 12:
|
497
|
-
if (!(params['
|
569
|
+
if (!(params['triggering_user_ids'] && !(0, _utils.isArray)(params['triggering_user_ids']))) {
|
498
570
|
_context5.next = 14;
|
499
571
|
break;
|
500
572
|
}
|
501
573
|
|
502
|
-
throw new Error("Bad parameter:
|
574
|
+
throw new Error("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0, _utils.getType)(triggering_user_ids)));
|
503
575
|
|
504
576
|
case 14:
|
505
|
-
|
506
|
-
|
577
|
+
if (!(params['group_id'] && !(0, _utils.isInt)(params['group_id']))) {
|
578
|
+
_context5.next = 16;
|
579
|
+
break;
|
580
|
+
}
|
581
|
+
|
582
|
+
throw new Error("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(group_id)));
|
507
583
|
|
508
584
|
case 16:
|
585
|
+
if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
|
586
|
+
_context5.next = 18;
|
587
|
+
break;
|
588
|
+
}
|
589
|
+
|
590
|
+
throw new Error("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
|
591
|
+
|
592
|
+
case 18:
|
593
|
+
if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
|
594
|
+
_context5.next = 20;
|
595
|
+
break;
|
596
|
+
}
|
597
|
+
|
598
|
+
throw new Error("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(username)));
|
599
|
+
|
600
|
+
case 20:
|
601
|
+
_context5.next = 22;
|
602
|
+
return _Api.default.sendRequest("/notifications", 'POST', params, options);
|
603
|
+
|
604
|
+
case 22:
|
509
605
|
response = _context5.sent;
|
510
606
|
return _context5.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, options));
|
511
607
|
|
512
|
-
case
|
608
|
+
case 24:
|
513
609
|
case "end":
|
514
610
|
return _context5.stop();
|
515
611
|
}
|
@@ -227,6 +227,12 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
|
|
227
227
|
(0, _defineProperty2.default)(this, "setAzureBlobStorageAccount", function (value) {
|
228
228
|
_this.attributes.azure_blob_storage_account = value;
|
229
229
|
});
|
230
|
+
(0, _defineProperty2.default)(this, "getAzureBlobStorageSasToken", function () {
|
231
|
+
return _this.attributes.azure_blob_storage_sas_token;
|
232
|
+
});
|
233
|
+
(0, _defineProperty2.default)(this, "setAzureBlobStorageSasToken", function (value) {
|
234
|
+
_this.attributes.azure_blob_storage_sas_token = value;
|
235
|
+
});
|
230
236
|
(0, _defineProperty2.default)(this, "getAzureBlobStorageContainer", function () {
|
231
237
|
return _this.attributes.azure_blob_storage_container;
|
232
238
|
});
|
@@ -651,72 +657,80 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
|
|
651
657
|
throw new Error("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_container)));
|
652
658
|
|
653
659
|
case 78:
|
654
|
-
if (!(params['
|
660
|
+
if (!(params['azure_blob_storage_sas_token'] && !(0, _utils.isString)(params['azure_blob_storage_sas_token']))) {
|
655
661
|
_context.next = 80;
|
656
662
|
break;
|
657
663
|
}
|
658
664
|
|
659
|
-
throw new Error("Bad parameter:
|
665
|
+
throw new Error("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_sas_token)));
|
660
666
|
|
661
667
|
case 80:
|
662
|
-
if (!(params['
|
668
|
+
if (!(params['s3_compatible_bucket'] && !(0, _utils.isString)(params['s3_compatible_bucket']))) {
|
663
669
|
_context.next = 82;
|
664
670
|
break;
|
665
671
|
}
|
666
672
|
|
667
|
-
throw new Error("Bad parameter:
|
673
|
+
throw new Error("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(s3_compatible_bucket)));
|
668
674
|
|
669
675
|
case 82:
|
670
|
-
if (!(params['
|
676
|
+
if (!(params['s3_compatible_endpoint'] && !(0, _utils.isString)(params['s3_compatible_endpoint']))) {
|
671
677
|
_context.next = 84;
|
672
678
|
break;
|
673
679
|
}
|
674
680
|
|
675
|
-
throw new Error("Bad parameter:
|
681
|
+
throw new Error("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(s3_compatible_endpoint)));
|
676
682
|
|
677
683
|
case 84:
|
678
|
-
if (!(params['
|
684
|
+
if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
|
679
685
|
_context.next = 86;
|
680
686
|
break;
|
681
687
|
}
|
682
688
|
|
683
|
-
throw new Error("Bad parameter:
|
689
|
+
throw new Error("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(s3_compatible_region)));
|
684
690
|
|
685
691
|
case 86:
|
686
|
-
if (!(params['
|
692
|
+
if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
|
687
693
|
_context.next = 88;
|
688
694
|
break;
|
689
695
|
}
|
690
696
|
|
691
|
-
throw new Error("Bad parameter:
|
697
|
+
throw new Error("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
|
692
698
|
|
693
699
|
case 88:
|
700
|
+
if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
|
701
|
+
_context.next = 90;
|
702
|
+
break;
|
703
|
+
}
|
704
|
+
|
705
|
+
throw new Error("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
|
706
|
+
|
707
|
+
case 90:
|
694
708
|
if (params['id']) {
|
695
|
-
_context.next =
|
709
|
+
_context.next = 96;
|
696
710
|
break;
|
697
711
|
}
|
698
712
|
|
699
713
|
if (!_this.attributes.id) {
|
700
|
-
_context.next =
|
714
|
+
_context.next = 95;
|
701
715
|
break;
|
702
716
|
}
|
703
717
|
|
704
718
|
params['id'] = _this.id;
|
705
|
-
_context.next =
|
719
|
+
_context.next = 96;
|
706
720
|
break;
|
707
721
|
|
708
|
-
case
|
722
|
+
case 95:
|
709
723
|
throw new Error('Parameter missing: id');
|
710
724
|
|
711
|
-
case
|
712
|
-
_context.next =
|
725
|
+
case 96:
|
726
|
+
_context.next = 98;
|
713
727
|
return _Api.default.sendRequest("/remote_servers/".concat(params['id']), 'PATCH', params, _this.options);
|
714
728
|
|
715
|
-
case
|
729
|
+
case 98:
|
716
730
|
response = _context.sent;
|
717
731
|
return _context.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
718
732
|
|
719
|
-
case
|
733
|
+
case 100:
|
720
734
|
case "end":
|
721
735
|
return _context.stop();
|
722
736
|
}
|
@@ -1224,54 +1238,62 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
|
|
1224
1238
|
throw new Error("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_container)));
|
1225
1239
|
|
1226
1240
|
case 72:
|
1227
|
-
if (!(params['
|
1241
|
+
if (!(params['azure_blob_storage_sas_token'] && !(0, _utils.isString)(params['azure_blob_storage_sas_token']))) {
|
1228
1242
|
_context5.next = 74;
|
1229
1243
|
break;
|
1230
1244
|
}
|
1231
1245
|
|
1232
|
-
throw new Error("Bad parameter:
|
1246
|
+
throw new Error("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_sas_token)));
|
1233
1247
|
|
1234
1248
|
case 74:
|
1235
|
-
if (!(params['
|
1249
|
+
if (!(params['s3_compatible_bucket'] && !(0, _utils.isString)(params['s3_compatible_bucket']))) {
|
1236
1250
|
_context5.next = 76;
|
1237
1251
|
break;
|
1238
1252
|
}
|
1239
1253
|
|
1240
|
-
throw new Error("Bad parameter:
|
1254
|
+
throw new Error("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(s3_compatible_bucket)));
|
1241
1255
|
|
1242
1256
|
case 76:
|
1243
|
-
if (!(params['
|
1257
|
+
if (!(params['s3_compatible_endpoint'] && !(0, _utils.isString)(params['s3_compatible_endpoint']))) {
|
1244
1258
|
_context5.next = 78;
|
1245
1259
|
break;
|
1246
1260
|
}
|
1247
1261
|
|
1248
|
-
throw new Error("Bad parameter:
|
1262
|
+
throw new Error("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(s3_compatible_endpoint)));
|
1249
1263
|
|
1250
1264
|
case 78:
|
1251
|
-
if (!(params['
|
1265
|
+
if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
|
1252
1266
|
_context5.next = 80;
|
1253
1267
|
break;
|
1254
1268
|
}
|
1255
1269
|
|
1256
|
-
throw new Error("Bad parameter:
|
1270
|
+
throw new Error("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(s3_compatible_region)));
|
1257
1271
|
|
1258
1272
|
case 80:
|
1259
|
-
if (!(params['
|
1273
|
+
if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
|
1260
1274
|
_context5.next = 82;
|
1261
1275
|
break;
|
1262
1276
|
}
|
1263
1277
|
|
1264
|
-
throw new Error("Bad parameter:
|
1278
|
+
throw new Error("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
|
1265
1279
|
|
1266
1280
|
case 82:
|
1267
|
-
|
1268
|
-
|
1281
|
+
if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
|
1282
|
+
_context5.next = 84;
|
1283
|
+
break;
|
1284
|
+
}
|
1285
|
+
|
1286
|
+
throw new Error("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
|
1269
1287
|
|
1270
1288
|
case 84:
|
1289
|
+
_context5.next = 86;
|
1290
|
+
return _Api.default.sendRequest("/remote_servers", 'POST', params, options);
|
1291
|
+
|
1292
|
+
case 86:
|
1271
1293
|
response = _context5.sent;
|
1272
1294
|
return _context5.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
|
1273
1295
|
|
1274
|
-
case
|
1296
|
+
case 88:
|
1275
1297
|
case "end":
|
1276
1298
|
return _context5.stop();
|
1277
1299
|
}
|
package/package.json
CHANGED
package/src/models/Automation.js
CHANGED
@@ -36,6 +36,13 @@ class Automation {
|
|
36
36
|
this.attributes.automation = value
|
37
37
|
}
|
38
38
|
|
39
|
+
// boolean # Indicates if the automation has been deleted.
|
40
|
+
getDeleted = () => this.attributes.deleted
|
41
|
+
|
42
|
+
setDeleted = value => {
|
43
|
+
this.attributes.deleted = value
|
44
|
+
}
|
45
|
+
|
39
46
|
// boolean # If true, this automation will not run.
|
40
47
|
getDisabled = () => this.attributes.disabled
|
41
48
|
|
@@ -57,6 +64,13 @@ class Automation {
|
|
57
64
|
this.attributes.interval = value
|
58
65
|
}
|
59
66
|
|
67
|
+
// date-time # Time when automation was last modified. Does not change for name or description updates.
|
68
|
+
getLastModifiedAt = () => this.attributes.last_modified_at
|
69
|
+
|
70
|
+
setLastModifiedAt = value => {
|
71
|
+
this.attributes.last_modified_at = value
|
72
|
+
}
|
73
|
+
|
60
74
|
// string # Name for this automation.
|
61
75
|
getName = () => this.attributes.name
|
62
76
|
|
@@ -162,9 +176,15 @@ class Automation {
|
|
162
176
|
this.attributes.destination = value
|
163
177
|
}
|
164
178
|
|
179
|
+
// int64 # Set to the ID of automation used a clone template. For
|
180
|
+
getClonedFrom = () => this.attributes.cloned_from
|
181
|
+
|
182
|
+
setClonedFrom = value => {
|
183
|
+
this.attributes.cloned_from = value
|
184
|
+
}
|
185
|
+
|
165
186
|
|
166
187
|
// Parameters:
|
167
|
-
// automation (required) - string - Automation type
|
168
188
|
// source - string - Source Path
|
169
189
|
// destination - string - DEPRECATED: Destination Path. Use `destinations` instead.
|
170
190
|
// destinations - array(string) - A list of String destination paths or Hash of folder_path and optional file_path.
|
@@ -181,6 +201,7 @@ class Automation {
|
|
181
201
|
// trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
182
202
|
// trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
|
183
203
|
// value - object - A Hash of attributes specific to the automation type.
|
204
|
+
// automation - string - Automation type
|
184
205
|
update = async (params = {}) => {
|
185
206
|
if (!this.attributes.id) {
|
186
207
|
throw new Error('Current object has no id')
|
@@ -194,9 +215,6 @@ class Automation {
|
|
194
215
|
if (params['id'] && !isInt(params['id'])) {
|
195
216
|
throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
|
196
217
|
}
|
197
|
-
if (params['automation'] && !isString(params['automation'])) {
|
198
|
-
throw new Error(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
|
199
|
-
}
|
200
218
|
if (params['source'] && !isString(params['source'])) {
|
201
219
|
throw new Error(`Bad parameter: source must be of type String, received ${getType(source)}`)
|
202
220
|
}
|
@@ -236,6 +254,9 @@ class Automation {
|
|
236
254
|
if (params['trigger_actions'] && !isArray(params['trigger_actions'])) {
|
237
255
|
throw new Error(`Bad parameter: trigger_actions must be of type Array, received ${getType(trigger_actions)}`)
|
238
256
|
}
|
257
|
+
if (params['automation'] && !isString(params['automation'])) {
|
258
|
+
throw new Error(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
|
259
|
+
}
|
239
260
|
|
240
261
|
if (!params['id']) {
|
241
262
|
if (this.attributes.id) {
|
@@ -245,14 +266,6 @@ class Automation {
|
|
245
266
|
}
|
246
267
|
}
|
247
268
|
|
248
|
-
if (!params['automation']) {
|
249
|
-
if (this.attributes.automation) {
|
250
|
-
params['automation'] = this.automation
|
251
|
-
} else {
|
252
|
-
throw new Error('Parameter missing: automation')
|
253
|
-
}
|
254
|
-
}
|
255
|
-
|
256
269
|
const response = await Api.sendRequest(`/automations/${params['id']}`, 'PATCH', params, this.options)
|
257
270
|
|
258
271
|
return new Automation(response?.data, this.options)
|
@@ -301,13 +314,14 @@ class Automation {
|
|
301
314
|
// Parameters:
|
302
315
|
// cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
303
316
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
304
|
-
// sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `automation`.
|
305
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`.
|
306
|
-
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `automation`.
|
307
|
-
// filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `automation`.
|
308
|
-
// filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`.
|
309
|
-
// filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `automation`.
|
310
|
-
// filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `automation`.
|
317
|
+
// sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `automation`, `last_modified_at` or `disabled`.
|
318
|
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
319
|
+
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
320
|
+
// filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
321
|
+
// filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
322
|
+
// filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
323
|
+
// filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
324
|
+
// with_deleted - boolean - Set to true to include deleted automations in the results.
|
311
325
|
// automation - string - DEPRECATED: Type of automation to filter by. Use `filter[automation]` instead.
|
312
326
|
static list = async (params = {}, options = {}) => {
|
313
327
|
if (params['cursor'] && !isString(params['cursor'])) {
|
@@ -356,7 +370,6 @@ class Automation {
|
|
356
370
|
Automation.find(id, params, options)
|
357
371
|
|
358
372
|
// Parameters:
|
359
|
-
// automation (required) - string - Automation type
|
360
373
|
// source - string - Source Path
|
361
374
|
// destination - string - DEPRECATED: Destination Path. Use `destinations` instead.
|
362
375
|
// destinations - array(string) - A list of String destination paths or Hash of folder_path and optional file_path.
|
@@ -373,15 +386,13 @@ class Automation {
|
|
373
386
|
// trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
374
387
|
// trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
|
375
388
|
// value - object - A Hash of attributes specific to the automation type.
|
389
|
+
// automation (required) - string - Automation type
|
390
|
+
// cloned_from - int64 - Set to the ID of automation used a clone template. For
|
376
391
|
static create = async (params = {}, options = {}) => {
|
377
392
|
if (!params['automation']) {
|
378
393
|
throw new Error('Parameter missing: automation')
|
379
394
|
}
|
380
395
|
|
381
|
-
if (params['automation'] && !isString(params['automation'])) {
|
382
|
-
throw new Error(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
|
383
|
-
}
|
384
|
-
|
385
396
|
if (params['source'] && !isString(params['source'])) {
|
386
397
|
throw new Error(`Bad parameter: source must be of type String, received ${getType(source)}`)
|
387
398
|
}
|
@@ -434,6 +445,14 @@ class Automation {
|
|
434
445
|
throw new Error(`Bad parameter: trigger_actions must be of type Array, received ${getType(trigger_actions)}`)
|
435
446
|
}
|
436
447
|
|
448
|
+
if (params['automation'] && !isString(params['automation'])) {
|
449
|
+
throw new Error(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
|
450
|
+
}
|
451
|
+
|
452
|
+
if (params['cloned_from'] && !isInt(params['cloned_from'])) {
|
453
|
+
throw new Error(`Bad parameter: cloned_from must be of type Int, received ${getType(cloned_from)}`)
|
454
|
+
}
|
455
|
+
|
437
456
|
const response = await Api.sendRequest(`/automations`, 'POST', params, options)
|
438
457
|
|
439
458
|
return new Automation(response?.data, options)
|
package/src/models/Folder.js
CHANGED
@@ -156,7 +156,7 @@ class Folder {
|
|
156
156
|
// filter - string - If specified, will filter folders/files list by this string. Wildcards of `*` and `?` are acceptable here.
|
157
157
|
// preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
158
158
|
// search - string - If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
|
159
|
-
// search_all - boolean - Search entire site?
|
159
|
+
// search_all - boolean - Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the UI. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
160
160
|
// with_previews - boolean - Include file previews?
|
161
161
|
// with_priority_color - boolean - Include file priority color information?
|
162
162
|
static listFor = async (path, params = {}, options = {}) => {
|
@@ -50,6 +50,27 @@ class Notification {
|
|
50
50
|
this.attributes.group_name = value
|
51
51
|
}
|
52
52
|
|
53
|
+
// int64 # Only notify on actions made by a member of one of the specified groups
|
54
|
+
getTriggeringGroupIds = () => this.attributes.triggering_group_ids
|
55
|
+
|
56
|
+
setTriggeringGroupIds = value => {
|
57
|
+
this.attributes.triggering_group_ids = value
|
58
|
+
}
|
59
|
+
|
60
|
+
// int64 # Only notify on actions made one of the specified users
|
61
|
+
getTriggeringUserIds = () => this.attributes.triggering_user_ids
|
62
|
+
|
63
|
+
setTriggeringUserIds = value => {
|
64
|
+
this.attributes.triggering_user_ids = value
|
65
|
+
}
|
66
|
+
|
67
|
+
// boolean # Notify when actions are performed by a share recipient?
|
68
|
+
getTriggerByShareRecipients = () => this.attributes.trigger_by_share_recipients
|
69
|
+
|
70
|
+
setTriggerByShareRecipients = value => {
|
71
|
+
this.attributes.trigger_by_share_recipients = value
|
72
|
+
}
|
73
|
+
|
53
74
|
// boolean # Trigger notification on notification user actions?
|
54
75
|
getNotifyUserActions = () => this.attributes.notify_user_actions
|
55
76
|
|
@@ -57,13 +78,41 @@ class Notification {
|
|
57
78
|
this.attributes.notify_user_actions = value
|
58
79
|
}
|
59
80
|
|
60
|
-
// boolean # Triggers notification when
|
81
|
+
// boolean # Triggers notification when copying files to this path
|
61
82
|
getNotifyOnCopy = () => this.attributes.notify_on_copy
|
62
83
|
|
63
84
|
setNotifyOnCopy = value => {
|
64
85
|
this.attributes.notify_on_copy = value
|
65
86
|
}
|
66
87
|
|
88
|
+
// boolean # Triggers notification when deleting files from this path
|
89
|
+
getNotifyOnDelete = () => this.attributes.notify_on_delete
|
90
|
+
|
91
|
+
setNotifyOnDelete = value => {
|
92
|
+
this.attributes.notify_on_delete = value
|
93
|
+
}
|
94
|
+
|
95
|
+
// boolean # Triggers notification when downloading files from this path
|
96
|
+
getNotifyOnDownload = () => this.attributes.notify_on_download
|
97
|
+
|
98
|
+
setNotifyOnDownload = value => {
|
99
|
+
this.attributes.notify_on_download = value
|
100
|
+
}
|
101
|
+
|
102
|
+
// boolean # Triggers notification when moving files to this path
|
103
|
+
getNotifyOnMove = () => this.attributes.notify_on_move
|
104
|
+
|
105
|
+
setNotifyOnMove = value => {
|
106
|
+
this.attributes.notify_on_move = value
|
107
|
+
}
|
108
|
+
|
109
|
+
// boolean # Triggers notification when uploading new files to this path
|
110
|
+
getNotifyOnUpload = () => this.attributes.notify_on_upload
|
111
|
+
|
112
|
+
setNotifyOnUpload = value => {
|
113
|
+
this.attributes.notify_on_upload = value
|
114
|
+
}
|
115
|
+
|
67
116
|
// boolean # Enable notifications for each subfolder in this path
|
68
117
|
getRecursive = () => this.attributes.recursive
|
69
118
|
|
@@ -85,6 +134,13 @@ class Notification {
|
|
85
134
|
this.attributes.message = value
|
86
135
|
}
|
87
136
|
|
137
|
+
// array # Array of filenames (possibly with wildcards) to match for action path
|
138
|
+
getTriggeringFilenames = () => this.attributes.triggering_filenames
|
139
|
+
|
140
|
+
setTriggeringFilenames = value => {
|
141
|
+
this.attributes.triggering_filenames = value
|
142
|
+
}
|
143
|
+
|
88
144
|
// boolean # Is the user unsubscribed from this notification?
|
89
145
|
getUnsubscribed = () => this.attributes.unsubscribed
|
90
146
|
|
@@ -123,10 +179,18 @@ class Notification {
|
|
123
179
|
|
124
180
|
// Parameters:
|
125
181
|
// notify_on_copy - boolean - If `true`, copying or moving resources into this path will trigger a notification, in addition to just uploads.
|
182
|
+
// notify_on_delete - boolean - Triggers notification when deleting files from this path
|
183
|
+
// notify_on_download - boolean - Triggers notification when downloading files from this path
|
184
|
+
// notify_on_move - boolean - Triggers notification when moving files to this path
|
185
|
+
// notify_on_upload - boolean - Triggers notification when uploading new files to this path
|
126
186
|
// notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
|
127
187
|
// recursive - boolean - If `true`, enable notifications for each subfolder in this path
|
128
188
|
// send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
129
189
|
// message - string - Custom message to include in notification emails.
|
190
|
+
// triggering_filenames - array(string) - Array of filenames (possibly with wildcards) to match for action path
|
191
|
+
// triggering_group_ids - array(int64) - Only notify on actions made by a member of one of the specified groups
|
192
|
+
// triggering_user_ids - array(int64) - Only notify on actions made one of the specified users
|
193
|
+
// trigger_by_share_recipients - boolean - Notify when actions are performed by a share recipient?
|
130
194
|
update = async (params = {}) => {
|
131
195
|
if (!this.attributes.id) {
|
132
196
|
throw new Error('Current object has no id')
|
@@ -146,6 +210,15 @@ class Notification {
|
|
146
210
|
if (params['message'] && !isString(params['message'])) {
|
147
211
|
throw new Error(`Bad parameter: message must be of type String, received ${getType(message)}`)
|
148
212
|
}
|
213
|
+
if (params['triggering_filenames'] && !isArray(params['triggering_filenames'])) {
|
214
|
+
throw new Error(`Bad parameter: triggering_filenames must be of type Array, received ${getType(triggering_filenames)}`)
|
215
|
+
}
|
216
|
+
if (params['triggering_group_ids'] && !isArray(params['triggering_group_ids'])) {
|
217
|
+
throw new Error(`Bad parameter: triggering_group_ids must be of type Array, received ${getType(triggering_group_ids)}`)
|
218
|
+
}
|
219
|
+
if (params['triggering_user_ids'] && !isArray(params['triggering_user_ids'])) {
|
220
|
+
throw new Error(`Bad parameter: triggering_user_ids must be of type Array, received ${getType(triggering_user_ids)}`)
|
221
|
+
}
|
149
222
|
|
150
223
|
if (!params['id']) {
|
151
224
|
if (this.attributes.id) {
|
@@ -271,10 +344,18 @@ class Notification {
|
|
271
344
|
// Parameters:
|
272
345
|
// user_id - int64 - The id of the user to notify. Provide `user_id`, `username` or `group_id`.
|
273
346
|
// notify_on_copy - boolean - If `true`, copying or moving resources into this path will trigger a notification, in addition to just uploads.
|
347
|
+
// notify_on_delete - boolean - Triggers notification when deleting files from this path
|
348
|
+
// notify_on_download - boolean - Triggers notification when downloading files from this path
|
349
|
+
// notify_on_move - boolean - Triggers notification when moving files to this path
|
350
|
+
// notify_on_upload - boolean - Triggers notification when uploading new files to this path
|
274
351
|
// notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
|
275
352
|
// recursive - boolean - If `true`, enable notifications for each subfolder in this path
|
276
353
|
// send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
277
354
|
// message - string - Custom message to include in notification emails.
|
355
|
+
// triggering_filenames - array(string) - Array of filenames (possibly with wildcards) to match for action path
|
356
|
+
// triggering_group_ids - array(int64) - Only notify on actions made by a member of one of the specified groups
|
357
|
+
// triggering_user_ids - array(int64) - Only notify on actions made one of the specified users
|
358
|
+
// trigger_by_share_recipients - boolean - Notify when actions are performed by a share recipient?
|
278
359
|
// group_id - int64 - The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
|
279
360
|
// path - string - Path
|
280
361
|
// username - string - The username of the user to notify. Provide `user_id`, `username` or `group_id`.
|
@@ -291,6 +372,18 @@ class Notification {
|
|
291
372
|
throw new Error(`Bad parameter: message must be of type String, received ${getType(message)}`)
|
292
373
|
}
|
293
374
|
|
375
|
+
if (params['triggering_filenames'] && !isArray(params['triggering_filenames'])) {
|
376
|
+
throw new Error(`Bad parameter: triggering_filenames must be of type Array, received ${getType(triggering_filenames)}`)
|
377
|
+
}
|
378
|
+
|
379
|
+
if (params['triggering_group_ids'] && !isArray(params['triggering_group_ids'])) {
|
380
|
+
throw new Error(`Bad parameter: triggering_group_ids must be of type Array, received ${getType(triggering_group_ids)}`)
|
381
|
+
}
|
382
|
+
|
383
|
+
if (params['triggering_user_ids'] && !isArray(params['triggering_user_ids'])) {
|
384
|
+
throw new Error(`Bad parameter: triggering_user_ids must be of type Array, received ${getType(triggering_user_ids)}`)
|
385
|
+
}
|
386
|
+
|
294
387
|
if (params['group_id'] && !isInt(params['group_id'])) {
|
295
388
|
throw new Error(`Bad parameter: group_id must be of type Int, received ${getType(group_id)}`)
|
296
389
|
}
|
@@ -239,6 +239,13 @@ class RemoteServer {
|
|
239
239
|
this.attributes.azure_blob_storage_account = value
|
240
240
|
}
|
241
241
|
|
242
|
+
// string # Shared Access Signature (SAS) token
|
243
|
+
getAzureBlobStorageSasToken = () => this.attributes.azure_blob_storage_sas_token
|
244
|
+
|
245
|
+
setAzureBlobStorageSasToken = value => {
|
246
|
+
this.attributes.azure_blob_storage_sas_token = value
|
247
|
+
}
|
248
|
+
|
242
249
|
// string # Azure Blob Storage Container name
|
243
250
|
getAzureBlobStorageContainer = () => this.attributes.azure_blob_storage_container
|
244
251
|
|
@@ -403,6 +410,7 @@ class RemoteServer {
|
|
403
410
|
// one_drive_account_type - string - Either personal or business_other account types
|
404
411
|
// azure_blob_storage_account - string - Azure Blob Storage Account name
|
405
412
|
// azure_blob_storage_container - string - Azure Blob Storage Container name
|
413
|
+
// azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
|
406
414
|
// s3_compatible_bucket - string - S3-compatible Bucket name
|
407
415
|
// s3_compatible_endpoint - string - S3-compatible endpoint
|
408
416
|
// s3_compatible_region - string - S3-compatible endpoint
|
@@ -527,6 +535,9 @@ class RemoteServer {
|
|
527
535
|
if (params['azure_blob_storage_container'] && !isString(params['azure_blob_storage_container'])) {
|
528
536
|
throw new Error(`Bad parameter: azure_blob_storage_container must be of type String, received ${getType(azure_blob_storage_container)}`)
|
529
537
|
}
|
538
|
+
if (params['azure_blob_storage_sas_token'] && !isString(params['azure_blob_storage_sas_token'])) {
|
539
|
+
throw new Error(`Bad parameter: azure_blob_storage_sas_token must be of type String, received ${getType(azure_blob_storage_sas_token)}`)
|
540
|
+
}
|
530
541
|
if (params['s3_compatible_bucket'] && !isString(params['s3_compatible_bucket'])) {
|
531
542
|
throw new Error(`Bad parameter: s3_compatible_bucket must be of type String, received ${getType(s3_compatible_bucket)}`)
|
532
543
|
}
|
@@ -678,6 +689,7 @@ class RemoteServer {
|
|
678
689
|
// one_drive_account_type - string - Either personal or business_other account types
|
679
690
|
// azure_blob_storage_account - string - Azure Blob Storage Account name
|
680
691
|
// azure_blob_storage_container - string - Azure Blob Storage Container name
|
692
|
+
// azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
|
681
693
|
// s3_compatible_bucket - string - S3-compatible Bucket name
|
682
694
|
// s3_compatible_endpoint - string - S3-compatible endpoint
|
683
695
|
// s3_compatible_region - string - S3-compatible endpoint
|
@@ -825,6 +837,10 @@ class RemoteServer {
|
|
825
837
|
throw new Error(`Bad parameter: azure_blob_storage_container must be of type String, received ${getType(azure_blob_storage_container)}`)
|
826
838
|
}
|
827
839
|
|
840
|
+
if (params['azure_blob_storage_sas_token'] && !isString(params['azure_blob_storage_sas_token'])) {
|
841
|
+
throw new Error(`Bad parameter: azure_blob_storage_sas_token must be of type String, received ${getType(azure_blob_storage_sas_token)}`)
|
842
|
+
}
|
843
|
+
|
828
844
|
if (params['s3_compatible_bucket'] && !isString(params['s3_compatible_bucket'])) {
|
829
845
|
throw new Error(`Bad parameter: s3_compatible_bucket must be of type String, received ${getType(s3_compatible_bucket)}`)
|
830
846
|
}
|