files.com 1.0.235 → 1.0.237
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.
- package/_VERSION +1 -1
- package/docs/models/Bundle.md +9 -2
- package/docs/models/BundleNotification.md +35 -0
- package/docs/models/BundleRegistration.md +3 -1
- package/docs/models/InboxRegistration.md +3 -1
- package/docs/models/Site.md +2 -0
- package/lib/Api.js +153 -159
- package/lib/isomorphic/File.node.js +24 -28
- package/lib/models/ActionNotificationExport.js +97 -101
- package/lib/models/ActionNotificationExportResult.js +44 -46
- package/lib/models/ActionWebhookFailure.js +42 -44
- package/lib/models/ApiKey.js +271 -287
- package/lib/models/App.js +26 -28
- package/lib/models/As2IncomingMessage.js +32 -34
- package/lib/models/As2OutgoingMessage.js +32 -34
- package/lib/models/As2Partner.js +231 -241
- package/lib/models/As2Station.js +219 -229
- package/lib/models/Automation.js +333 -343
- package/lib/models/AutomationRun.js +75 -79
- package/lib/models/BandwidthSnapshot.js +26 -28
- package/lib/models/Behavior.js +323 -337
- package/lib/models/Bundle.js +381 -387
- package/lib/models/BundleDownload.js +38 -40
- package/lib/models/BundleNotification.js +223 -173
- package/lib/models/BundleRecipient.js +104 -108
- package/lib/models/BundleRegistration.js +41 -40
- package/lib/models/Clickwrap.js +213 -223
- package/lib/models/DnsRecord.js +26 -28
- package/lib/models/ExternalEvent.js +93 -99
- package/lib/models/File.js +726 -766
- package/lib/models/FileComment.js +180 -188
- package/lib/models/FileCommentReaction.js +84 -88
- package/lib/models/FileMigration.js +31 -33
- package/lib/models/Folder.js +94 -98
- package/lib/models/FormFieldSet.js +189 -199
- package/lib/models/Group.js +207 -217
- package/lib/models/GroupUser.js +230 -238
- package/lib/models/History.js +266 -276
- package/lib/models/HistoryExport.js +175 -179
- package/lib/models/HistoryExportResult.js +44 -46
- package/lib/models/InboxRecipient.js +104 -108
- package/lib/models/InboxRegistration.js +35 -34
- package/lib/models/InboxUpload.js +38 -40
- package/lib/models/Invoice.js +57 -61
- package/lib/models/IpAddress.js +78 -84
- package/lib/models/Lock.js +148 -154
- package/lib/models/Message.js +267 -277
- package/lib/models/MessageComment.js +207 -217
- package/lib/models/MessageCommentReaction.js +147 -155
- package/lib/models/MessageReaction.js +147 -155
- package/lib/models/Notification.js +255 -265
- package/lib/models/Payment.js +57 -61
- package/lib/models/Permission.js +128 -134
- package/lib/models/Priority.js +45 -47
- package/lib/models/Project.js +183 -193
- package/lib/models/PublicKey.js +207 -217
- package/lib/models/RemoteBandwidthSnapshot.js +26 -28
- package/lib/models/RemoteServer.js +805 -819
- package/lib/models/Request.js +166 -174
- package/lib/models/Session.js +47 -51
- package/lib/models/SettingsChange.js +26 -28
- package/lib/models/SftpHostKey.js +177 -187
- package/lib/models/Site.js +415 -418
- package/lib/models/SsoStrategy.js +99 -105
- package/lib/models/Style.js +127 -133
- package/lib/models/UsageDailySnapshot.js +26 -28
- package/lib/models/UsageSnapshot.js +26 -28
- package/lib/models/User.js +587 -603
- package/lib/models/UserCipherUse.js +32 -34
- package/lib/models/UserRequest.js +147 -155
- package/lib/models/WebhookTest.js +54 -56
- package/package.json +1 -1
- package/src/models/Bundle.js +10 -1
- package/src/models/BundleNotification.js +39 -1
- package/src/models/BundleRegistration.js +3 -0
- package/src/models/InboxRegistration.js +3 -0
- package/src/models/Site.js +3 -0
package/lib/models/Bundle.js
CHANGED
@@ -148,6 +148,12 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
148
148
|
(0, _defineProperty2.default)(this, "setPathTemplate", function (value) {
|
149
149
|
_this.attributes.path_template = value;
|
150
150
|
});
|
151
|
+
(0, _defineProperty2.default)(this, "getSendEmailReceiptToUploader", function () {
|
152
|
+
return _this.attributes.send_email_receipt_to_uploader;
|
153
|
+
});
|
154
|
+
(0, _defineProperty2.default)(this, "setSendEmailReceiptToUploader", function (value) {
|
155
|
+
_this.attributes.send_email_receipt_to_uploader = value;
|
156
|
+
});
|
151
157
|
(0, _defineProperty2.default)(this, "getUserId", function () {
|
152
158
|
return _this.attributes.user_id;
|
153
159
|
});
|
@@ -225,70 +231,68 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
225
231
|
response,
|
226
232
|
_args = arguments;
|
227
233
|
return _regenerator.default.wrap(function _callee$(_context) {
|
228
|
-
while (1) {
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
if (params['id']) {
|
270
|
-
_context.next = 20;
|
271
|
-
break;
|
272
|
-
}
|
273
|
-
if (!_this.attributes.id) {
|
274
|
-
_context.next = 19;
|
275
|
-
break;
|
276
|
-
}
|
277
|
-
params['id'] = _this.id;
|
234
|
+
while (1) switch (_context.prev = _context.next) {
|
235
|
+
case 0:
|
236
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
237
|
+
if (_this.attributes.id) {
|
238
|
+
_context.next = 3;
|
239
|
+
break;
|
240
|
+
}
|
241
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
242
|
+
case 3:
|
243
|
+
if ((0, _utils.isObject)(params)) {
|
244
|
+
_context.next = 5;
|
245
|
+
break;
|
246
|
+
}
|
247
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
248
|
+
case 5:
|
249
|
+
params.id = _this.attributes.id;
|
250
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
251
|
+
_context.next = 8;
|
252
|
+
break;
|
253
|
+
}
|
254
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
255
|
+
case 8:
|
256
|
+
if (!(params['to'] && !(0, _utils.isArray)(params['to']))) {
|
257
|
+
_context.next = 10;
|
258
|
+
break;
|
259
|
+
}
|
260
|
+
throw new errors.InvalidParameterError("Bad parameter: to must be of type Array, received ".concat((0, _utils.getType)(to)));
|
261
|
+
case 10:
|
262
|
+
if (!(params['note'] && !(0, _utils.isString)(params['note']))) {
|
263
|
+
_context.next = 12;
|
264
|
+
break;
|
265
|
+
}
|
266
|
+
throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(note)));
|
267
|
+
case 12:
|
268
|
+
if (!(params['recipients'] && !(0, _utils.isArray)(params['recipients']))) {
|
269
|
+
_context.next = 14;
|
270
|
+
break;
|
271
|
+
}
|
272
|
+
throw new errors.InvalidParameterError("Bad parameter: recipients must be of type Array, received ".concat((0, _utils.getType)(recipients)));
|
273
|
+
case 14:
|
274
|
+
if (params['id']) {
|
278
275
|
_context.next = 20;
|
279
276
|
break;
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
277
|
+
}
|
278
|
+
if (!_this.attributes.id) {
|
279
|
+
_context.next = 19;
|
280
|
+
break;
|
281
|
+
}
|
282
|
+
params['id'] = _this.id;
|
283
|
+
_context.next = 20;
|
284
|
+
break;
|
285
|
+
case 19:
|
286
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
287
|
+
case 20:
|
288
|
+
_context.next = 22;
|
289
|
+
return _Api.default.sendRequest("/bundles/".concat(encodeURIComponent(params['id']), "/share"), 'POST', params, _this.options);
|
290
|
+
case 22:
|
291
|
+
response = _context.sent;
|
292
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
293
|
+
case 24:
|
294
|
+
case "end":
|
295
|
+
return _context.stop();
|
292
296
|
}
|
293
297
|
}, _callee);
|
294
298
|
})));
|
@@ -297,124 +301,122 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
297
301
|
response,
|
298
302
|
_args2 = arguments;
|
299
303
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
300
|
-
while (1) {
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
if (params['id']) {
|
396
|
-
_context2.next = 38;
|
397
|
-
break;
|
398
|
-
}
|
399
|
-
if (!_this.attributes.id) {
|
400
|
-
_context2.next = 37;
|
401
|
-
break;
|
402
|
-
}
|
403
|
-
params['id'] = _this.id;
|
304
|
+
while (1) switch (_context2.prev = _context2.next) {
|
305
|
+
case 0:
|
306
|
+
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
307
|
+
if (_this.attributes.id) {
|
308
|
+
_context2.next = 3;
|
309
|
+
break;
|
310
|
+
}
|
311
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
312
|
+
case 3:
|
313
|
+
if ((0, _utils.isObject)(params)) {
|
314
|
+
_context2.next = 5;
|
315
|
+
break;
|
316
|
+
}
|
317
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
318
|
+
case 5:
|
319
|
+
params.id = _this.attributes.id;
|
320
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
321
|
+
_context2.next = 8;
|
322
|
+
break;
|
323
|
+
}
|
324
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
325
|
+
case 8:
|
326
|
+
if (!(params['paths'] && !(0, _utils.isArray)(params['paths']))) {
|
327
|
+
_context2.next = 10;
|
328
|
+
break;
|
329
|
+
}
|
330
|
+
throw new errors.InvalidParameterError("Bad parameter: paths must be of type Array, received ".concat((0, _utils.getType)(paths)));
|
331
|
+
case 10:
|
332
|
+
if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
|
333
|
+
_context2.next = 12;
|
334
|
+
break;
|
335
|
+
}
|
336
|
+
throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(password)));
|
337
|
+
case 12:
|
338
|
+
if (!(params['form_field_set_id'] && !(0, _utils.isInt)(params['form_field_set_id']))) {
|
339
|
+
_context2.next = 14;
|
340
|
+
break;
|
341
|
+
}
|
342
|
+
throw new errors.InvalidParameterError("Bad parameter: form_field_set_id must be of type Int, received ".concat((0, _utils.getType)(form_field_set_id)));
|
343
|
+
case 14:
|
344
|
+
if (!(params['clickwrap_id'] && !(0, _utils.isInt)(params['clickwrap_id']))) {
|
345
|
+
_context2.next = 16;
|
346
|
+
break;
|
347
|
+
}
|
348
|
+
throw new errors.InvalidParameterError("Bad parameter: clickwrap_id must be of type Int, received ".concat((0, _utils.getType)(clickwrap_id)));
|
349
|
+
case 16:
|
350
|
+
if (!(params['code'] && !(0, _utils.isString)(params['code']))) {
|
351
|
+
_context2.next = 18;
|
352
|
+
break;
|
353
|
+
}
|
354
|
+
throw new errors.InvalidParameterError("Bad parameter: code must be of type String, received ".concat((0, _utils.getType)(code)));
|
355
|
+
case 18:
|
356
|
+
if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
|
357
|
+
_context2.next = 20;
|
358
|
+
break;
|
359
|
+
}
|
360
|
+
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(description)));
|
361
|
+
case 20:
|
362
|
+
if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
|
363
|
+
_context2.next = 22;
|
364
|
+
break;
|
365
|
+
}
|
366
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(expires_at)));
|
367
|
+
case 22:
|
368
|
+
if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
|
369
|
+
_context2.next = 24;
|
370
|
+
break;
|
371
|
+
}
|
372
|
+
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(inbox_id)));
|
373
|
+
case 24:
|
374
|
+
if (!(params['max_uses'] && !(0, _utils.isInt)(params['max_uses']))) {
|
375
|
+
_context2.next = 26;
|
376
|
+
break;
|
377
|
+
}
|
378
|
+
throw new errors.InvalidParameterError("Bad parameter: max_uses must be of type Int, received ".concat((0, _utils.getType)(max_uses)));
|
379
|
+
case 26:
|
380
|
+
if (!(params['note'] && !(0, _utils.isString)(params['note']))) {
|
381
|
+
_context2.next = 28;
|
382
|
+
break;
|
383
|
+
}
|
384
|
+
throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(note)));
|
385
|
+
case 28:
|
386
|
+
if (!(params['path_template'] && !(0, _utils.isString)(params['path_template']))) {
|
387
|
+
_context2.next = 30;
|
388
|
+
break;
|
389
|
+
}
|
390
|
+
throw new errors.InvalidParameterError("Bad parameter: path_template must be of type String, received ".concat((0, _utils.getType)(path_template)));
|
391
|
+
case 30:
|
392
|
+
if (!(params['permissions'] && !(0, _utils.isString)(params['permissions']))) {
|
393
|
+
_context2.next = 32;
|
394
|
+
break;
|
395
|
+
}
|
396
|
+
throw new errors.InvalidParameterError("Bad parameter: permissions must be of type String, received ".concat((0, _utils.getType)(permissions)));
|
397
|
+
case 32:
|
398
|
+
if (params['id']) {
|
404
399
|
_context2.next = 38;
|
405
400
|
break;
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
401
|
+
}
|
402
|
+
if (!_this.attributes.id) {
|
403
|
+
_context2.next = 37;
|
404
|
+
break;
|
405
|
+
}
|
406
|
+
params['id'] = _this.id;
|
407
|
+
_context2.next = 38;
|
408
|
+
break;
|
409
|
+
case 37:
|
410
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
411
|
+
case 38:
|
412
|
+
_context2.next = 40;
|
413
|
+
return _Api.default.sendRequest("/bundles/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
|
414
|
+
case 40:
|
415
|
+
response = _context2.sent;
|
416
|
+
return _context2.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
417
|
+
case 42:
|
418
|
+
case "end":
|
419
|
+
return _context2.stop();
|
418
420
|
}
|
419
421
|
}, _callee2);
|
420
422
|
})));
|
@@ -423,52 +425,50 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
423
425
|
response,
|
424
426
|
_args3 = arguments;
|
425
427
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
426
|
-
while (1) {
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
if (params['id']) {
|
450
|
-
_context3.next = 14;
|
451
|
-
break;
|
452
|
-
}
|
453
|
-
if (!_this.attributes.id) {
|
454
|
-
_context3.next = 13;
|
455
|
-
break;
|
456
|
-
}
|
457
|
-
params['id'] = _this.id;
|
428
|
+
while (1) switch (_context3.prev = _context3.next) {
|
429
|
+
case 0:
|
430
|
+
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
431
|
+
if (_this.attributes.id) {
|
432
|
+
_context3.next = 3;
|
433
|
+
break;
|
434
|
+
}
|
435
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
436
|
+
case 3:
|
437
|
+
if ((0, _utils.isObject)(params)) {
|
438
|
+
_context3.next = 5;
|
439
|
+
break;
|
440
|
+
}
|
441
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
442
|
+
case 5:
|
443
|
+
params.id = _this.attributes.id;
|
444
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
445
|
+
_context3.next = 8;
|
446
|
+
break;
|
447
|
+
}
|
448
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
449
|
+
case 8:
|
450
|
+
if (params['id']) {
|
458
451
|
_context3.next = 14;
|
459
452
|
break;
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
453
|
+
}
|
454
|
+
if (!_this.attributes.id) {
|
455
|
+
_context3.next = 13;
|
456
|
+
break;
|
457
|
+
}
|
458
|
+
params['id'] = _this.id;
|
459
|
+
_context3.next = 14;
|
460
|
+
break;
|
461
|
+
case 13:
|
462
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
463
|
+
case 14:
|
464
|
+
_context3.next = 16;
|
465
|
+
return _Api.default.sendRequest("/bundles/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
|
466
|
+
case 16:
|
467
|
+
response = _context3.sent;
|
468
|
+
return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
469
|
+
case 18:
|
470
|
+
case "end":
|
471
|
+
return _context3.stop();
|
472
472
|
}
|
473
473
|
}, _callee3);
|
474
474
|
})));
|
@@ -505,40 +505,38 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
505
505
|
response,
|
506
506
|
_args4 = arguments;
|
507
507
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
508
|
-
while (1) {
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
return
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
return _context4.stop();
|
541
|
-
}
|
508
|
+
while (1) switch (_context4.prev = _context4.next) {
|
509
|
+
case 0:
|
510
|
+
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
511
|
+
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
512
|
+
if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
|
513
|
+
_context4.next = 4;
|
514
|
+
break;
|
515
|
+
}
|
516
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
|
517
|
+
case 4:
|
518
|
+
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
519
|
+
_context4.next = 6;
|
520
|
+
break;
|
521
|
+
}
|
522
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
|
523
|
+
case 6:
|
524
|
+
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
525
|
+
_context4.next = 8;
|
526
|
+
break;
|
527
|
+
}
|
528
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
|
529
|
+
case 8:
|
530
|
+
_context4.next = 10;
|
531
|
+
return _Api.default.sendRequest("/bundles", 'GET', params, options);
|
532
|
+
case 10:
|
533
|
+
response = _context4.sent;
|
534
|
+
return _context4.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
535
|
+
return new Bundle(obj, options);
|
536
|
+
})) || []);
|
537
|
+
case 12:
|
538
|
+
case "end":
|
539
|
+
return _context4.stop();
|
542
540
|
}
|
543
541
|
}, _callee4);
|
544
542
|
})));
|
@@ -554,39 +552,37 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
554
552
|
response,
|
555
553
|
_args5 = arguments;
|
556
554
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
557
|
-
while (1) {
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
return _context5.stop();
|
589
|
-
}
|
555
|
+
while (1) switch (_context5.prev = _context5.next) {
|
556
|
+
case 0:
|
557
|
+
params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
558
|
+
options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
|
559
|
+
if ((0, _utils.isObject)(params)) {
|
560
|
+
_context5.next = 4;
|
561
|
+
break;
|
562
|
+
}
|
563
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
564
|
+
case 4:
|
565
|
+
params['id'] = id;
|
566
|
+
if (params['id']) {
|
567
|
+
_context5.next = 7;
|
568
|
+
break;
|
569
|
+
}
|
570
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
571
|
+
case 7:
|
572
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
573
|
+
_context5.next = 9;
|
574
|
+
break;
|
575
|
+
}
|
576
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
|
577
|
+
case 9:
|
578
|
+
_context5.next = 11;
|
579
|
+
return _Api.default.sendRequest("/bundles/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
|
580
|
+
case 11:
|
581
|
+
response = _context5.sent;
|
582
|
+
return _context5.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, options));
|
583
|
+
case 13:
|
584
|
+
case "end":
|
585
|
+
return _context5.stop();
|
590
586
|
}
|
591
587
|
}, _callee5);
|
592
588
|
}));
|
@@ -605,104 +601,102 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
605
601
|
response,
|
606
602
|
_args6 = arguments;
|
607
603
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
608
|
-
while (1) {
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
return _context6.stop();
|
705
|
-
}
|
604
|
+
while (1) switch (_context6.prev = _context6.next) {
|
605
|
+
case 0:
|
606
|
+
params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
607
|
+
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
608
|
+
if (params['paths']) {
|
609
|
+
_context6.next = 4;
|
610
|
+
break;
|
611
|
+
}
|
612
|
+
throw new errors.MissingParameterError('Parameter missing: paths');
|
613
|
+
case 4:
|
614
|
+
if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
|
615
|
+
_context6.next = 6;
|
616
|
+
break;
|
617
|
+
}
|
618
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
|
619
|
+
case 6:
|
620
|
+
if (!(params['paths'] && !(0, _utils.isArray)(params['paths']))) {
|
621
|
+
_context6.next = 8;
|
622
|
+
break;
|
623
|
+
}
|
624
|
+
throw new errors.InvalidParameterError("Bad parameter: paths must be of type Array, received ".concat((0, _utils.getType)(params['paths'])));
|
625
|
+
case 8:
|
626
|
+
if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
|
627
|
+
_context6.next = 10;
|
628
|
+
break;
|
629
|
+
}
|
630
|
+
throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params['password'])));
|
631
|
+
case 10:
|
632
|
+
if (!(params['form_field_set_id'] && !(0, _utils.isInt)(params['form_field_set_id']))) {
|
633
|
+
_context6.next = 12;
|
634
|
+
break;
|
635
|
+
}
|
636
|
+
throw new errors.InvalidParameterError("Bad parameter: form_field_set_id must be of type Int, received ".concat((0, _utils.getType)(params['form_field_set_id'])));
|
637
|
+
case 12:
|
638
|
+
if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
|
639
|
+
_context6.next = 14;
|
640
|
+
break;
|
641
|
+
}
|
642
|
+
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
|
643
|
+
case 14:
|
644
|
+
if (!(params['max_uses'] && !(0, _utils.isInt)(params['max_uses']))) {
|
645
|
+
_context6.next = 16;
|
646
|
+
break;
|
647
|
+
}
|
648
|
+
throw new errors.InvalidParameterError("Bad parameter: max_uses must be of type Int, received ".concat((0, _utils.getType)(params['max_uses'])));
|
649
|
+
case 16:
|
650
|
+
if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
|
651
|
+
_context6.next = 18;
|
652
|
+
break;
|
653
|
+
}
|
654
|
+
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params['description'])));
|
655
|
+
case 18:
|
656
|
+
if (!(params['note'] && !(0, _utils.isString)(params['note']))) {
|
657
|
+
_context6.next = 20;
|
658
|
+
break;
|
659
|
+
}
|
660
|
+
throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params['note'])));
|
661
|
+
case 20:
|
662
|
+
if (!(params['code'] && !(0, _utils.isString)(params['code']))) {
|
663
|
+
_context6.next = 22;
|
664
|
+
break;
|
665
|
+
}
|
666
|
+
throw new errors.InvalidParameterError("Bad parameter: code must be of type String, received ".concat((0, _utils.getType)(params['code'])));
|
667
|
+
case 22:
|
668
|
+
if (!(params['path_template'] && !(0, _utils.isString)(params['path_template']))) {
|
669
|
+
_context6.next = 24;
|
670
|
+
break;
|
671
|
+
}
|
672
|
+
throw new errors.InvalidParameterError("Bad parameter: path_template must be of type String, received ".concat((0, _utils.getType)(params['path_template'])));
|
673
|
+
case 24:
|
674
|
+
if (!(params['permissions'] && !(0, _utils.isString)(params['permissions']))) {
|
675
|
+
_context6.next = 26;
|
676
|
+
break;
|
677
|
+
}
|
678
|
+
throw new errors.InvalidParameterError("Bad parameter: permissions must be of type String, received ".concat((0, _utils.getType)(params['permissions'])));
|
679
|
+
case 26:
|
680
|
+
if (!(params['clickwrap_id'] && !(0, _utils.isInt)(params['clickwrap_id']))) {
|
681
|
+
_context6.next = 28;
|
682
|
+
break;
|
683
|
+
}
|
684
|
+
throw new errors.InvalidParameterError("Bad parameter: clickwrap_id must be of type Int, received ".concat((0, _utils.getType)(params['clickwrap_id'])));
|
685
|
+
case 28:
|
686
|
+
if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
|
687
|
+
_context6.next = 30;
|
688
|
+
break;
|
689
|
+
}
|
690
|
+
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
|
691
|
+
case 30:
|
692
|
+
_context6.next = 32;
|
693
|
+
return _Api.default.sendRequest("/bundles", 'POST', params, options);
|
694
|
+
case 32:
|
695
|
+
response = _context6.sent;
|
696
|
+
return _context6.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, options));
|
697
|
+
case 34:
|
698
|
+
case "end":
|
699
|
+
return _context6.stop();
|
706
700
|
}
|
707
701
|
}, _callee6);
|
708
702
|
})));
|