files.com 1.0.272 → 1.0.274
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/models/Bundle.md +2 -0
- package/docs/models/Site.md +4 -0
- package/docs/models/Snapshot.md +18 -2
- package/lib/models/Bundle.js +10 -3
- package/lib/models/Site.js +5 -0
- package/lib/models/Snapshot.js +67 -14
- package/package.json +1 -1
- package/src/models/Bundle.js +5 -0
- package/src/models/Site.js +4 -0
- package/src/models/Snapshot.js +38 -2
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.274
|
package/docs/models/Bundle.md
CHANGED
@@ -159,6 +159,7 @@ await Bundle.create({
|
|
159
159
|
'skip_email': true,
|
160
160
|
'skip_name': true,
|
161
161
|
'skip_company': true,
|
162
|
+
'snapshot_id': 1,
|
162
163
|
})
|
163
164
|
```
|
164
165
|
|
@@ -188,6 +189,7 @@ await Bundle.create({
|
|
188
189
|
* `skip_email` (boolean): BundleRegistrations can be saved without providing email?
|
189
190
|
* `skip_name` (boolean): BundleRegistrations can be saved without providing name?
|
190
191
|
* `skip_company` (boolean): BundleRegistrations can be saved without providing company?
|
192
|
+
* `snapshot_id` (int64): ID of the snapshot containing this bundle's contents.
|
191
193
|
* `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
|
192
194
|
|
193
195
|
---
|
package/docs/models/Site.md
CHANGED
@@ -104,6 +104,7 @@
|
|
104
104
|
"password_validity_days": 1,
|
105
105
|
"phone": "555-555-5555",
|
106
106
|
"pin_all_remote_servers_to_site_region": true,
|
107
|
+
"prevent_root_permissions_for_non_site_admins": true,
|
107
108
|
"require_2fa": true,
|
108
109
|
"require_2fa_stop_time": "2000-01-01T01:00:00Z",
|
109
110
|
"require_2fa_user_type": "`site_admins`",
|
@@ -316,6 +317,7 @@
|
|
316
317
|
* `password_validity_days` (int64): Number of days password is valid
|
317
318
|
* `phone` (string): Site phone number
|
318
319
|
* `pin_all_remote_servers_to_site_region` (boolean): If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
|
320
|
+
* `prevent_root_permissions_for_non_site_admins` (boolean): If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
|
319
321
|
* `require_2fa` (boolean): Require two-factor authentication for all users?
|
320
322
|
* `require_2fa_stop_time` (date-time): If set, requirement for two-factor authentication has been scheduled to end on this date-time.
|
321
323
|
* `require_2fa_user_type` (string): What type of user is required to use two-factor authentication (when require_2fa is set to `true` for this site)?
|
@@ -449,6 +451,7 @@ await Site.update({
|
|
449
451
|
'bundle_activity_notifications': "never",
|
450
452
|
'bundle_upload_receipt_notifications': "never",
|
451
453
|
'password_requirements_apply_to_bundles': true,
|
454
|
+
'prevent_root_permissions_for_non_site_admins': true,
|
452
455
|
'opt_out_global': true,
|
453
456
|
'use_provided_modified_at': true,
|
454
457
|
'custom_namespace': true,
|
@@ -580,6 +583,7 @@ await Site.update({
|
|
580
583
|
* `bundle_activity_notifications` (string): Do Bundle owners receive activity notifications?
|
581
584
|
* `bundle_upload_receipt_notifications` (string): Do Bundle uploaders receive upload confirmation notifications?
|
582
585
|
* `password_requirements_apply_to_bundles` (boolean): Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
|
586
|
+
* `prevent_root_permissions_for_non_site_admins` (boolean): If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
|
583
587
|
* `opt_out_global` (boolean): Use servers in the USA only?
|
584
588
|
* `use_provided_modified_at` (boolean): Allow uploaders to set `provided_modified_at` for uploaded files?
|
585
589
|
* `custom_namespace` (boolean): Is this site using a custom namespace for users?
|
package/docs/models/Snapshot.md
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
* `name` (string): A name for the snapshot.
|
18
18
|
* `user_id` (int64): The user that created this snapshot, if applicable.
|
19
19
|
* `bundle_id` (int64): The bundle using this snapshot, if applicable.
|
20
|
+
* `paths` (array(string)): An array of paths to add to the snapshot.
|
20
21
|
* `id` (int64): Snapshot ID.
|
21
22
|
|
22
23
|
---
|
@@ -53,10 +54,19 @@ await Snapshot.find(id)
|
|
53
54
|
## Create Snapshot
|
54
55
|
|
55
56
|
```
|
56
|
-
await Snapshot.create
|
57
|
+
await Snapshot.create({
|
58
|
+
'expires_at': "2000-01-01T01:00:00Z",
|
59
|
+
'name': "My Snapshot",
|
60
|
+
})
|
57
61
|
```
|
58
62
|
|
59
63
|
|
64
|
+
### Parameters
|
65
|
+
|
66
|
+
* `expires_at` (string): When the snapshot expires.
|
67
|
+
* `name` (string): A name for the snapshot.
|
68
|
+
* `paths` (array(string)): An array of paths to add to the snapshot.
|
69
|
+
|
60
70
|
---
|
61
71
|
|
62
72
|
## Update Snapshot
|
@@ -64,12 +74,18 @@ await Snapshot.create
|
|
64
74
|
```
|
65
75
|
const [snapshot] = await Snapshot.list()
|
66
76
|
|
67
|
-
await snapshot.update(
|
77
|
+
await snapshot.update({
|
78
|
+
'expires_at': "2000-01-01T01:00:00Z",
|
79
|
+
'name': "My Snapshot",
|
80
|
+
})
|
68
81
|
```
|
69
82
|
|
70
83
|
### Parameters
|
71
84
|
|
72
85
|
* `id` (int64): Required - Snapshot ID.
|
86
|
+
* `expires_at` (string): When the snapshot expires.
|
87
|
+
* `name` (string): A name for the snapshot.
|
88
|
+
* `paths` (array(string)): An array of paths to add to the snapshot.
|
73
89
|
|
74
90
|
### Example Response
|
75
91
|
|
package/lib/models/Bundle.js
CHANGED
@@ -716,6 +716,7 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
716
716
|
// skip_email - boolean - BundleRegistrations can be saved without providing email?
|
717
717
|
// skip_name - boolean - BundleRegistrations can be saved without providing name?
|
718
718
|
// skip_company - boolean - BundleRegistrations can be saved without providing company?
|
719
|
+
// snapshot_id - int64 - ID of the snapshot containing this bundle's contents.
|
719
720
|
// watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
720
721
|
(0, _defineProperty2.default)(Bundle, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
721
722
|
var params,
|
@@ -811,12 +812,18 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
811
812
|
}
|
812
813
|
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
|
813
814
|
case 30:
|
814
|
-
|
815
|
-
|
815
|
+
if (!(params['snapshot_id'] && !(0, _utils.isInt)(params['snapshot_id']))) {
|
816
|
+
_context6.next = 32;
|
817
|
+
break;
|
818
|
+
}
|
819
|
+
throw new errors.InvalidParameterError("Bad parameter: snapshot_id must be of type Int, received ".concat((0, _utils.getType)(params['snapshot_id'])));
|
816
820
|
case 32:
|
821
|
+
_context6.next = 34;
|
822
|
+
return _Api.default.sendRequest("/bundles", 'POST', params, options);
|
823
|
+
case 34:
|
817
824
|
response = _context6.sent;
|
818
825
|
return _context6.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, options));
|
819
|
-
case
|
826
|
+
case 36:
|
820
827
|
case "end":
|
821
828
|
return _context6.stop();
|
822
829
|
}
|
package/lib/models/Site.js
CHANGED
@@ -423,6 +423,10 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
423
423
|
(0, _defineProperty2.default)(this, "getPinAllRemoteServersToSiteRegion", function () {
|
424
424
|
return _this.attributes.pin_all_remote_servers_to_site_region;
|
425
425
|
});
|
426
|
+
// boolean # If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
|
427
|
+
(0, _defineProperty2.default)(this, "getPreventRootPermissionsForNonSiteAdmins", function () {
|
428
|
+
return _this.attributes.prevent_root_permissions_for_non_site_admins;
|
429
|
+
});
|
426
430
|
// boolean # Require two-factor authentication for all users?
|
427
431
|
(0, _defineProperty2.default)(this, "getRequire2fa", function () {
|
428
432
|
return _this.attributes.require_2fa;
|
@@ -715,6 +719,7 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
715
719
|
// bundle_activity_notifications - string - Do Bundle owners receive activity notifications?
|
716
720
|
// bundle_upload_receipt_notifications - string - Do Bundle uploaders receive upload confirmation notifications?
|
717
721
|
// password_requirements_apply_to_bundles - boolean - Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
|
722
|
+
// prevent_root_permissions_for_non_site_admins - boolean - If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
|
718
723
|
// opt_out_global - boolean - Use servers in the USA only?
|
719
724
|
// use_provided_modified_at - boolean - Allow uploaders to set `provided_modified_at` for uploaded files?
|
720
725
|
// custom_namespace - boolean - Is this site using a custom namespace for users?
|
package/lib/models/Snapshot.js
CHANGED
@@ -66,6 +66,13 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
66
66
|
(0, _defineProperty2.default)(this, "setBundleId", function (value) {
|
67
67
|
_this.attributes.bundle_id = value;
|
68
68
|
});
|
69
|
+
// array(string) # An array of paths to add to the snapshot.
|
70
|
+
(0, _defineProperty2.default)(this, "getPaths", function () {
|
71
|
+
return _this.attributes.paths;
|
72
|
+
});
|
73
|
+
(0, _defineProperty2.default)(this, "setPaths", function (value) {
|
74
|
+
_this.attributes.paths = value;
|
75
|
+
});
|
69
76
|
// int64 # Snapshot ID.
|
70
77
|
(0, _defineProperty2.default)(this, "getId", function () {
|
71
78
|
return _this.attributes.id;
|
@@ -73,6 +80,10 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
73
80
|
(0, _defineProperty2.default)(this, "setId", function (value) {
|
74
81
|
_this.attributes.id = value;
|
75
82
|
});
|
83
|
+
// Parameters:
|
84
|
+
// expires_at - string - When the snapshot expires.
|
85
|
+
// name - string - A name for the snapshot.
|
86
|
+
// paths - array(string) - An array of paths to add to the snapshot.
|
76
87
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
77
88
|
var params,
|
78
89
|
response,
|
@@ -100,26 +111,44 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
100
111
|
}
|
101
112
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
102
113
|
case 8:
|
103
|
-
if (params['
|
114
|
+
if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
|
115
|
+
_context.next = 10;
|
116
|
+
break;
|
117
|
+
}
|
118
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(expires_at)));
|
119
|
+
case 10:
|
120
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
121
|
+
_context.next = 12;
|
122
|
+
break;
|
123
|
+
}
|
124
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
125
|
+
case 12:
|
126
|
+
if (!(params['paths'] && !(0, _utils.isArray)(params['paths']))) {
|
104
127
|
_context.next = 14;
|
105
128
|
break;
|
106
129
|
}
|
130
|
+
throw new errors.InvalidParameterError("Bad parameter: paths must be of type Array, received ".concat((0, _utils.getType)(paths)));
|
131
|
+
case 14:
|
132
|
+
if (params['id']) {
|
133
|
+
_context.next = 20;
|
134
|
+
break;
|
135
|
+
}
|
107
136
|
if (!_this.attributes.id) {
|
108
|
-
_context.next =
|
137
|
+
_context.next = 19;
|
109
138
|
break;
|
110
139
|
}
|
111
140
|
params['id'] = _this.id;
|
112
|
-
_context.next =
|
141
|
+
_context.next = 20;
|
113
142
|
break;
|
114
|
-
case
|
143
|
+
case 19:
|
115
144
|
throw new errors.MissingParameterError('Parameter missing: id');
|
116
|
-
case
|
117
|
-
_context.next =
|
145
|
+
case 20:
|
146
|
+
_context.next = 22;
|
118
147
|
return _Api.default.sendRequest("/snapshots/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
|
119
|
-
case
|
148
|
+
case 22:
|
120
149
|
response = _context.sent;
|
121
150
|
return _context.abrupt("return", new Snapshot(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
122
|
-
case
|
151
|
+
case 24:
|
123
152
|
case "end":
|
124
153
|
return _context.stop();
|
125
154
|
}
|
@@ -299,20 +328,44 @@ var Snapshot = /*#__PURE__*/(0, _createClass2.default)(function Snapshot() {
|
|
299
328
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
300
329
|
return Snapshot.find(id, params, options);
|
301
330
|
});
|
331
|
+
// Parameters:
|
332
|
+
// expires_at - string - When the snapshot expires.
|
333
|
+
// name - string - A name for the snapshot.
|
334
|
+
// paths - array(string) - An array of paths to add to the snapshot.
|
302
335
|
(0, _defineProperty2.default)(Snapshot, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
303
|
-
var
|
336
|
+
var params,
|
337
|
+
options,
|
304
338
|
response,
|
305
339
|
_args5 = arguments;
|
306
340
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
307
341
|
while (1) switch (_context5.prev = _context5.next) {
|
308
342
|
case 0:
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
343
|
+
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
344
|
+
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
345
|
+
if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
|
346
|
+
_context5.next = 4;
|
347
|
+
break;
|
348
|
+
}
|
349
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
|
350
|
+
case 4:
|
351
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
352
|
+
_context5.next = 6;
|
353
|
+
break;
|
354
|
+
}
|
355
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
|
356
|
+
case 6:
|
357
|
+
if (!(params['paths'] && !(0, _utils.isArray)(params['paths']))) {
|
358
|
+
_context5.next = 8;
|
359
|
+
break;
|
360
|
+
}
|
361
|
+
throw new errors.InvalidParameterError("Bad parameter: paths must be of type Array, received ".concat((0, _utils.getType)(params['paths'])));
|
362
|
+
case 8:
|
363
|
+
_context5.next = 10;
|
364
|
+
return _Api.default.sendRequest("/snapshots", 'POST', params, options);
|
365
|
+
case 10:
|
313
366
|
response = _context5.sent;
|
314
367
|
return _context5.abrupt("return", new Snapshot(response === null || response === void 0 ? void 0 : response.data, options));
|
315
|
-
case
|
368
|
+
case 12:
|
316
369
|
case "end":
|
317
370
|
return _context5.stop();
|
318
371
|
}
|
package/package.json
CHANGED
package/src/models/Bundle.js
CHANGED
@@ -522,6 +522,7 @@ class Bundle {
|
|
522
522
|
// skip_email - boolean - BundleRegistrations can be saved without providing email?
|
523
523
|
// skip_name - boolean - BundleRegistrations can be saved without providing name?
|
524
524
|
// skip_company - boolean - BundleRegistrations can be saved without providing company?
|
525
|
+
// snapshot_id - int64 - ID of the snapshot containing this bundle's contents.
|
525
526
|
// watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
526
527
|
static create = async (params = {}, options = {}) => {
|
527
528
|
if (!params['paths']) {
|
@@ -580,6 +581,10 @@ class Bundle {
|
|
580
581
|
throw new errors.InvalidParameterError(`Bad parameter: inbox_id must be of type Int, received ${getType(params['inbox_id'])}`)
|
581
582
|
}
|
582
583
|
|
584
|
+
if (params['snapshot_id'] && !isInt(params['snapshot_id'])) {
|
585
|
+
throw new errors.InvalidParameterError(`Bad parameter: snapshot_id must be of type Int, received ${getType(params['snapshot_id'])}`)
|
586
|
+
}
|
587
|
+
|
583
588
|
const response = await Api.sendRequest(`/bundles`, 'POST', params, options)
|
584
589
|
|
585
590
|
return new Bundle(response?.data, options)
|
package/src/models/Site.js
CHANGED
@@ -317,6 +317,9 @@ class Site {
|
|
317
317
|
// boolean # If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
|
318
318
|
getPinAllRemoteServersToSiteRegion = () => this.attributes.pin_all_remote_servers_to_site_region
|
319
319
|
|
320
|
+
// boolean # If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
|
321
|
+
getPreventRootPermissionsForNonSiteAdmins = () => this.attributes.prevent_root_permissions_for_non_site_admins
|
322
|
+
|
320
323
|
// boolean # Require two-factor authentication for all users?
|
321
324
|
getRequire2fa = () => this.attributes.require_2fa
|
322
325
|
|
@@ -527,6 +530,7 @@ class Site {
|
|
527
530
|
// bundle_activity_notifications - string - Do Bundle owners receive activity notifications?
|
528
531
|
// bundle_upload_receipt_notifications - string - Do Bundle uploaders receive upload confirmation notifications?
|
529
532
|
// password_requirements_apply_to_bundles - boolean - Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
|
533
|
+
// prevent_root_permissions_for_non_site_admins - boolean - If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
|
530
534
|
// opt_out_global - boolean - Use servers in the USA only?
|
531
535
|
// use_provided_modified_at - boolean - Allow uploaders to set `provided_modified_at` for uploaded files?
|
532
536
|
// custom_namespace - boolean - Is this site using a custom namespace for users?
|
package/src/models/Snapshot.js
CHANGED
@@ -58,6 +58,13 @@ class Snapshot {
|
|
58
58
|
this.attributes.bundle_id = value
|
59
59
|
}
|
60
60
|
|
61
|
+
// array(string) # An array of paths to add to the snapshot.
|
62
|
+
getPaths = () => this.attributes.paths
|
63
|
+
|
64
|
+
setPaths = value => {
|
65
|
+
this.attributes.paths = value
|
66
|
+
}
|
67
|
+
|
61
68
|
// int64 # Snapshot ID.
|
62
69
|
getId = () => this.attributes.id
|
63
70
|
|
@@ -66,6 +73,10 @@ class Snapshot {
|
|
66
73
|
}
|
67
74
|
|
68
75
|
|
76
|
+
// Parameters:
|
77
|
+
// expires_at - string - When the snapshot expires.
|
78
|
+
// name - string - A name for the snapshot.
|
79
|
+
// paths - array(string) - An array of paths to add to the snapshot.
|
69
80
|
update = async (params = {}) => {
|
70
81
|
if (!this.attributes.id) {
|
71
82
|
throw new errors.EmptyPropertyError('Current object has no id')
|
@@ -79,6 +90,15 @@ class Snapshot {
|
|
79
90
|
if (params['id'] && !isInt(params['id'])) {
|
80
91
|
throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
|
81
92
|
}
|
93
|
+
if (params['expires_at'] && !isString(params['expires_at'])) {
|
94
|
+
throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
|
95
|
+
}
|
96
|
+
if (params['name'] && !isString(params['name'])) {
|
97
|
+
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
|
98
|
+
}
|
99
|
+
if (params['paths'] && !isArray(params['paths'])) {
|
100
|
+
throw new errors.InvalidParameterError(`Bad parameter: paths must be of type Array, received ${getType(paths)}`)
|
101
|
+
}
|
82
102
|
|
83
103
|
if (!params['id']) {
|
84
104
|
if (this.attributes.id) {
|
@@ -178,8 +198,24 @@ class Snapshot {
|
|
178
198
|
static get = (id, params = {}, options = {}) =>
|
179
199
|
Snapshot.find(id, params, options)
|
180
200
|
|
181
|
-
|
182
|
-
|
201
|
+
// Parameters:
|
202
|
+
// expires_at - string - When the snapshot expires.
|
203
|
+
// name - string - A name for the snapshot.
|
204
|
+
// paths - array(string) - An array of paths to add to the snapshot.
|
205
|
+
static create = async (params = {}, options = {}) => {
|
206
|
+
if (params['expires_at'] && !isString(params['expires_at'])) {
|
207
|
+
throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(params['expires_at'])}`)
|
208
|
+
}
|
209
|
+
|
210
|
+
if (params['name'] && !isString(params['name'])) {
|
211
|
+
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params['name'])}`)
|
212
|
+
}
|
213
|
+
|
214
|
+
if (params['paths'] && !isArray(params['paths'])) {
|
215
|
+
throw new errors.InvalidParameterError(`Bad parameter: paths must be of type Array, received ${getType(params['paths'])}`)
|
216
|
+
}
|
217
|
+
|
218
|
+
const response = await Api.sendRequest(`/snapshots`, 'POST', params, options)
|
183
219
|
|
184
220
|
return new Snapshot(response?.data, options)
|
185
221
|
}
|