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
@@ -396,112 +396,110 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
|
|
396
396
|
response,
|
397
397
|
_args = arguments;
|
398
398
|
return _regenerator.default.wrap(function _callee$(_context) {
|
399
|
-
while (1) {
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
if (params['id']) {
|
483
|
-
_context.next = 34;
|
484
|
-
break;
|
485
|
-
}
|
486
|
-
if (!_this.attributes.id) {
|
487
|
-
_context.next = 33;
|
488
|
-
break;
|
489
|
-
}
|
490
|
-
params['id'] = _this.id;
|
399
|
+
while (1) switch (_context.prev = _context.next) {
|
400
|
+
case 0:
|
401
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
402
|
+
if (_this.attributes.id) {
|
403
|
+
_context.next = 3;
|
404
|
+
break;
|
405
|
+
}
|
406
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
407
|
+
case 3:
|
408
|
+
if ((0, _utils.isObject)(params)) {
|
409
|
+
_context.next = 5;
|
410
|
+
break;
|
411
|
+
}
|
412
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
413
|
+
case 5:
|
414
|
+
params.id = _this.attributes.id;
|
415
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
416
|
+
_context.next = 8;
|
417
|
+
break;
|
418
|
+
}
|
419
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
420
|
+
case 8:
|
421
|
+
if (!(params['api_token'] && !(0, _utils.isString)(params['api_token']))) {
|
422
|
+
_context.next = 10;
|
423
|
+
break;
|
424
|
+
}
|
425
|
+
throw new errors.InvalidParameterError("Bad parameter: api_token must be of type String, received ".concat((0, _utils.getType)(api_token)));
|
426
|
+
case 10:
|
427
|
+
if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
|
428
|
+
_context.next = 12;
|
429
|
+
break;
|
430
|
+
}
|
431
|
+
throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(permission_set)));
|
432
|
+
case 12:
|
433
|
+
if (!(params['root'] && !(0, _utils.isString)(params['root']))) {
|
434
|
+
_context.next = 14;
|
435
|
+
break;
|
436
|
+
}
|
437
|
+
throw new errors.InvalidParameterError("Bad parameter: root must be of type String, received ".concat((0, _utils.getType)(root)));
|
438
|
+
case 14:
|
439
|
+
if (!(params['hostname'] && !(0, _utils.isString)(params['hostname']))) {
|
440
|
+
_context.next = 16;
|
441
|
+
break;
|
442
|
+
}
|
443
|
+
throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(hostname)));
|
444
|
+
case 16:
|
445
|
+
if (!(params['port'] && !(0, _utils.isInt)(params['port']))) {
|
446
|
+
_context.next = 18;
|
447
|
+
break;
|
448
|
+
}
|
449
|
+
throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(port)));
|
450
|
+
case 18:
|
451
|
+
if (!(params['status'] && !(0, _utils.isString)(params['status']))) {
|
452
|
+
_context.next = 20;
|
453
|
+
break;
|
454
|
+
}
|
455
|
+
throw new errors.InvalidParameterError("Bad parameter: status must be of type String, received ".concat((0, _utils.getType)(status)));
|
456
|
+
case 20:
|
457
|
+
if (!(params['config_version'] && !(0, _utils.isString)(params['config_version']))) {
|
458
|
+
_context.next = 22;
|
459
|
+
break;
|
460
|
+
}
|
461
|
+
throw new errors.InvalidParameterError("Bad parameter: config_version must be of type String, received ".concat((0, _utils.getType)(config_version)));
|
462
|
+
case 22:
|
463
|
+
if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
|
464
|
+
_context.next = 24;
|
465
|
+
break;
|
466
|
+
}
|
467
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
|
468
|
+
case 24:
|
469
|
+
if (!(params['public_key'] && !(0, _utils.isString)(params['public_key']))) {
|
470
|
+
_context.next = 26;
|
471
|
+
break;
|
472
|
+
}
|
473
|
+
throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(public_key)));
|
474
|
+
case 26:
|
475
|
+
if (!(params['server_host_key'] && !(0, _utils.isString)(params['server_host_key']))) {
|
476
|
+
_context.next = 28;
|
477
|
+
break;
|
478
|
+
}
|
479
|
+
throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(server_host_key)));
|
480
|
+
case 28:
|
481
|
+
if (params['id']) {
|
491
482
|
_context.next = 34;
|
492
483
|
break;
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
484
|
+
}
|
485
|
+
if (!_this.attributes.id) {
|
486
|
+
_context.next = 33;
|
487
|
+
break;
|
488
|
+
}
|
489
|
+
params['id'] = _this.id;
|
490
|
+
_context.next = 34;
|
491
|
+
break;
|
492
|
+
case 33:
|
493
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
494
|
+
case 34:
|
495
|
+
_context.next = 36;
|
496
|
+
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'POST', params, _this.options);
|
497
|
+
case 36:
|
498
|
+
response = _context.sent;
|
499
|
+
return _context.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
500
|
+
case 38:
|
501
|
+
case "end":
|
502
|
+
return _context.stop();
|
505
503
|
}
|
506
504
|
}, _callee);
|
507
505
|
})));
|
@@ -510,873 +508,861 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
|
|
510
508
|
response,
|
511
509
|
_args2 = arguments;
|
512
510
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
513
|
-
while (1) {
|
514
|
-
switch (_context2.prev = _context2.next) {
|
515
|
-
case 0:
|
516
|
-
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
517
|
-
if (_this.attributes.id) {
|
518
|
-
_context2.next = 3;
|
519
|
-
break;
|
520
|
-
}
|
521
|
-
throw new errors.EmptyPropertyError('Current object has no id');
|
522
|
-
case 3:
|
523
|
-
if ((0, _utils.isObject)(params)) {
|
524
|
-
_context2.next = 5;
|
525
|
-
break;
|
526
|
-
}
|
527
|
-
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
528
|
-
case 5:
|
529
|
-
params.id = _this.attributes.id;
|
530
|
-
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
531
|
-
_context2.next = 8;
|
532
|
-
break;
|
533
|
-
}
|
534
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
535
|
-
case 8:
|
536
|
-
if (!(params['aws_access_key'] && !(0, _utils.isString)(params['aws_access_key']))) {
|
537
|
-
_context2.next = 10;
|
538
|
-
break;
|
539
|
-
}
|
540
|
-
throw new errors.InvalidParameterError("Bad parameter: aws_access_key must be of type String, received ".concat((0, _utils.getType)(aws_access_key)));
|
541
|
-
case 10:
|
542
|
-
if (!(params['aws_secret_key'] && !(0, _utils.isString)(params['aws_secret_key']))) {
|
543
|
-
_context2.next = 12;
|
544
|
-
break;
|
545
|
-
}
|
546
|
-
throw new errors.InvalidParameterError("Bad parameter: aws_secret_key must be of type String, received ".concat((0, _utils.getType)(aws_secret_key)));
|
547
|
-
case 12:
|
548
|
-
if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
|
549
|
-
_context2.next = 14;
|
550
|
-
break;
|
551
|
-
}
|
552
|
-
throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(password)));
|
553
|
-
case 14:
|
554
|
-
if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
|
555
|
-
_context2.next = 16;
|
556
|
-
break;
|
557
|
-
}
|
558
|
-
throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
|
559
|
-
case 16:
|
560
|
-
if (!(params['private_key_passphrase'] && !(0, _utils.isString)(params['private_key_passphrase']))) {
|
561
|
-
_context2.next = 18;
|
562
|
-
break;
|
563
|
-
}
|
564
|
-
throw new errors.InvalidParameterError("Bad parameter: private_key_passphrase must be of type String, received ".concat((0, _utils.getType)(private_key_passphrase)));
|
565
|
-
case 18:
|
566
|
-
if (!(params['ssl_certificate'] && !(0, _utils.isString)(params['ssl_certificate']))) {
|
567
|
-
_context2.next = 20;
|
568
|
-
break;
|
569
|
-
}
|
570
|
-
throw new errors.InvalidParameterError("Bad parameter: ssl_certificate must be of type String, received ".concat((0, _utils.getType)(ssl_certificate)));
|
571
|
-
case 20:
|
572
|
-
if (!(params['google_cloud_storage_credentials_json'] && !(0, _utils.isString)(params['google_cloud_storage_credentials_json']))) {
|
573
|
-
_context2.next = 22;
|
574
|
-
break;
|
575
|
-
}
|
576
|
-
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_credentials_json must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_credentials_json)));
|
577
|
-
case 22:
|
578
|
-
if (!(params['wasabi_access_key'] && !(0, _utils.isString)(params['wasabi_access_key']))) {
|
579
|
-
_context2.next = 24;
|
580
|
-
break;
|
581
|
-
}
|
582
|
-
throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(wasabi_access_key)));
|
583
|
-
case 24:
|
584
|
-
if (!(params['wasabi_secret_key'] && !(0, _utils.isString)(params['wasabi_secret_key']))) {
|
585
|
-
_context2.next = 26;
|
586
|
-
break;
|
587
|
-
}
|
588
|
-
throw new errors.InvalidParameterError("Bad parameter: wasabi_secret_key must be of type String, received ".concat((0, _utils.getType)(wasabi_secret_key)));
|
589
|
-
case 26:
|
590
|
-
if (!(params['backblaze_b2_key_id'] && !(0, _utils.isString)(params['backblaze_b2_key_id']))) {
|
591
|
-
_context2.next = 28;
|
592
|
-
break;
|
593
|
-
}
|
594
|
-
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_key_id must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_key_id)));
|
595
|
-
case 28:
|
596
|
-
if (!(params['backblaze_b2_application_key'] && !(0, _utils.isString)(params['backblaze_b2_application_key']))) {
|
597
|
-
_context2.next = 30;
|
598
|
-
break;
|
599
|
-
}
|
600
|
-
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_application_key must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_application_key)));
|
601
|
-
case 30:
|
602
|
-
if (!(params['rackspace_api_key'] && !(0, _utils.isString)(params['rackspace_api_key']))) {
|
603
|
-
_context2.next = 32;
|
604
|
-
break;
|
605
|
-
}
|
606
|
-
throw new errors.InvalidParameterError("Bad parameter: rackspace_api_key must be of type String, received ".concat((0, _utils.getType)(rackspace_api_key)));
|
607
|
-
case 32:
|
608
|
-
if (!(params['azure_blob_storage_access_key'] && !(0, _utils.isString)(params['azure_blob_storage_access_key']))) {
|
609
|
-
_context2.next = 34;
|
610
|
-
break;
|
611
|
-
}
|
612
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_access_key must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_access_key)));
|
613
|
-
case 34:
|
614
|
-
if (!(params['azure_files_storage_access_key'] && !(0, _utils.isString)(params['azure_files_storage_access_key']))) {
|
615
|
-
_context2.next = 36;
|
616
|
-
break;
|
617
|
-
}
|
618
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_access_key must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_access_key)));
|
619
|
-
case 36:
|
620
|
-
if (!(params['hostname'] && !(0, _utils.isString)(params['hostname']))) {
|
621
|
-
_context2.next = 38;
|
622
|
-
break;
|
623
|
-
}
|
624
|
-
throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(hostname)));
|
625
|
-
case 38:
|
626
|
-
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
627
|
-
_context2.next = 40;
|
628
|
-
break;
|
629
|
-
}
|
630
|
-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
631
|
-
case 40:
|
632
|
-
if (!(params['max_connections'] && !(0, _utils.isInt)(params['max_connections']))) {
|
633
|
-
_context2.next = 42;
|
634
|
-
break;
|
635
|
-
}
|
636
|
-
throw new errors.InvalidParameterError("Bad parameter: max_connections must be of type Int, received ".concat((0, _utils.getType)(max_connections)));
|
637
|
-
case 42:
|
638
|
-
if (!(params['port'] && !(0, _utils.isInt)(params['port']))) {
|
639
|
-
_context2.next = 44;
|
640
|
-
break;
|
641
|
-
}
|
642
|
-
throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(port)));
|
643
|
-
case 44:
|
644
|
-
if (!(params['s3_bucket'] && !(0, _utils.isString)(params['s3_bucket']))) {
|
645
|
-
_context2.next = 46;
|
646
|
-
break;
|
647
|
-
}
|
648
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(s3_bucket)));
|
649
|
-
case 46:
|
650
|
-
if (!(params['s3_region'] && !(0, _utils.isString)(params['s3_region']))) {
|
651
|
-
_context2.next = 48;
|
652
|
-
break;
|
653
|
-
}
|
654
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(s3_region)));
|
655
|
-
case 48:
|
656
|
-
if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
|
657
|
-
_context2.next = 50;
|
658
|
-
break;
|
659
|
-
}
|
660
|
-
throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(server_certificate)));
|
661
|
-
case 50:
|
662
|
-
if (!(params['server_host_key'] && !(0, _utils.isString)(params['server_host_key']))) {
|
663
|
-
_context2.next = 52;
|
664
|
-
break;
|
665
|
-
}
|
666
|
-
throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(server_host_key)));
|
667
|
-
case 52:
|
668
|
-
if (!(params['server_type'] && !(0, _utils.isString)(params['server_type']))) {
|
669
|
-
_context2.next = 54;
|
670
|
-
break;
|
671
|
-
}
|
672
|
-
throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(server_type)));
|
673
|
-
case 54:
|
674
|
-
if (!(params['ssl'] && !(0, _utils.isString)(params['ssl']))) {
|
675
|
-
_context2.next = 56;
|
676
|
-
break;
|
677
|
-
}
|
678
|
-
throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(ssl)));
|
679
|
-
case 56:
|
680
|
-
if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
|
681
|
-
_context2.next = 58;
|
682
|
-
break;
|
683
|
-
}
|
684
|
-
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(username)));
|
685
|
-
case 58:
|
686
|
-
if (!(params['google_cloud_storage_bucket'] && !(0, _utils.isString)(params['google_cloud_storage_bucket']))) {
|
687
|
-
_context2.next = 60;
|
688
|
-
break;
|
689
|
-
}
|
690
|
-
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_bucket must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_bucket)));
|
691
|
-
case 60:
|
692
|
-
if (!(params['google_cloud_storage_project_id'] && !(0, _utils.isString)(params['google_cloud_storage_project_id']))) {
|
693
|
-
_context2.next = 62;
|
694
|
-
break;
|
695
|
-
}
|
696
|
-
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_project_id must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_project_id)));
|
697
|
-
case 62:
|
698
|
-
if (!(params['backblaze_b2_bucket'] && !(0, _utils.isString)(params['backblaze_b2_bucket']))) {
|
699
|
-
_context2.next = 64;
|
700
|
-
break;
|
701
|
-
}
|
702
|
-
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_bucket must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_bucket)));
|
703
|
-
case 64:
|
704
|
-
if (!(params['backblaze_b2_s3_endpoint'] && !(0, _utils.isString)(params['backblaze_b2_s3_endpoint']))) {
|
705
|
-
_context2.next = 66;
|
706
|
-
break;
|
707
|
-
}
|
708
|
-
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_s3_endpoint must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_s3_endpoint)));
|
709
|
-
case 66:
|
710
|
-
if (!(params['wasabi_bucket'] && !(0, _utils.isString)(params['wasabi_bucket']))) {
|
711
|
-
_context2.next = 68;
|
712
|
-
break;
|
713
|
-
}
|
714
|
-
throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(wasabi_bucket)));
|
715
|
-
case 68:
|
716
|
-
if (!(params['wasabi_region'] && !(0, _utils.isString)(params['wasabi_region']))) {
|
717
|
-
_context2.next = 70;
|
718
|
-
break;
|
719
|
-
}
|
720
|
-
throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(wasabi_region)));
|
721
|
-
case 70:
|
722
|
-
if (!(params['rackspace_username'] && !(0, _utils.isString)(params['rackspace_username']))) {
|
723
|
-
_context2.next = 72;
|
724
|
-
break;
|
725
|
-
}
|
726
|
-
throw new errors.InvalidParameterError("Bad parameter: rackspace_username must be of type String, received ".concat((0, _utils.getType)(rackspace_username)));
|
727
|
-
case 72:
|
728
|
-
if (!(params['rackspace_region'] && !(0, _utils.isString)(params['rackspace_region']))) {
|
729
|
-
_context2.next = 74;
|
730
|
-
break;
|
731
|
-
}
|
732
|
-
throw new errors.InvalidParameterError("Bad parameter: rackspace_region must be of type String, received ".concat((0, _utils.getType)(rackspace_region)));
|
733
|
-
case 74:
|
734
|
-
if (!(params['rackspace_container'] && !(0, _utils.isString)(params['rackspace_container']))) {
|
735
|
-
_context2.next = 76;
|
736
|
-
break;
|
737
|
-
}
|
738
|
-
throw new errors.InvalidParameterError("Bad parameter: rackspace_container must be of type String, received ".concat((0, _utils.getType)(rackspace_container)));
|
739
|
-
case 76:
|
740
|
-
if (!(params['one_drive_account_type'] && !(0, _utils.isString)(params['one_drive_account_type']))) {
|
741
|
-
_context2.next = 78;
|
742
|
-
break;
|
743
|
-
}
|
744
|
-
throw new errors.InvalidParameterError("Bad parameter: one_drive_account_type must be of type String, received ".concat((0, _utils.getType)(one_drive_account_type)));
|
745
|
-
case 78:
|
746
|
-
if (!(params['azure_blob_storage_account'] && !(0, _utils.isString)(params['azure_blob_storage_account']))) {
|
747
|
-
_context2.next = 80;
|
748
|
-
break;
|
749
|
-
}
|
750
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_account must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_account)));
|
751
|
-
case 80:
|
752
|
-
if (!(params['azure_blob_storage_container'] && !(0, _utils.isString)(params['azure_blob_storage_container']))) {
|
753
|
-
_context2.next = 82;
|
754
|
-
break;
|
755
|
-
}
|
756
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_container)));
|
757
|
-
case 82:
|
758
|
-
if (!(params['azure_blob_storage_sas_token'] && !(0, _utils.isString)(params['azure_blob_storage_sas_token']))) {
|
759
|
-
_context2.next = 84;
|
760
|
-
break;
|
761
|
-
}
|
762
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_sas_token)));
|
763
|
-
case 84:
|
764
|
-
if (!(params['azure_files_storage_account'] && !(0, _utils.isString)(params['azure_files_storage_account']))) {
|
765
|
-
_context2.next = 86;
|
766
|
-
break;
|
767
|
-
}
|
768
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_account must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_account)));
|
769
|
-
case 86:
|
770
|
-
if (!(params['azure_files_storage_share_name'] && !(0, _utils.isString)(params['azure_files_storage_share_name']))) {
|
771
|
-
_context2.next = 88;
|
772
|
-
break;
|
773
|
-
}
|
774
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_share_name)));
|
775
|
-
case 88:
|
776
|
-
if (!(params['azure_files_storage_sas_token'] && !(0, _utils.isString)(params['azure_files_storage_sas_token']))) {
|
777
|
-
_context2.next = 90;
|
778
|
-
break;
|
779
|
-
}
|
780
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_sas_token)));
|
781
|
-
case 90:
|
782
|
-
if (!(params['s3_compatible_bucket'] && !(0, _utils.isString)(params['s3_compatible_bucket']))) {
|
783
|
-
_context2.next = 92;
|
784
|
-
break;
|
785
|
-
}
|
786
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(s3_compatible_bucket)));
|
787
|
-
case 92:
|
788
|
-
if (!(params['s3_compatible_endpoint'] && !(0, _utils.isString)(params['s3_compatible_endpoint']))) {
|
789
|
-
_context2.next = 94;
|
790
|
-
break;
|
791
|
-
}
|
792
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(s3_compatible_endpoint)));
|
793
|
-
case 94:
|
794
|
-
if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
|
795
|
-
_context2.next = 96;
|
796
|
-
break;
|
797
|
-
}
|
798
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(s3_compatible_region)));
|
799
|
-
case 96:
|
800
|
-
if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
|
801
|
-
_context2.next = 98;
|
802
|
-
break;
|
803
|
-
}
|
804
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
|
805
|
-
case 98:
|
806
|
-
if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
|
807
|
-
_context2.next = 100;
|
808
|
-
break;
|
809
|
-
}
|
810
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
|
811
|
-
case 100:
|
812
|
-
if (!(params['files_agent_root'] && !(0, _utils.isString)(params['files_agent_root']))) {
|
813
|
-
_context2.next = 102;
|
814
|
-
break;
|
815
|
-
}
|
816
|
-
throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(files_agent_root)));
|
817
|
-
case 102:
|
818
|
-
if (!(params['files_agent_permission_set'] && !(0, _utils.isString)(params['files_agent_permission_set']))) {
|
819
|
-
_context2.next = 104;
|
820
|
-
break;
|
821
|
-
}
|
822
|
-
throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(files_agent_permission_set)));
|
823
|
-
case 104:
|
824
|
-
if (params['id']) {
|
825
|
-
_context2.next = 110;
|
826
|
-
break;
|
827
|
-
}
|
828
|
-
if (!_this.attributes.id) {
|
829
|
-
_context2.next = 109;
|
830
|
-
break;
|
831
|
-
}
|
832
|
-
params['id'] = _this.id;
|
833
|
-
_context2.next = 110;
|
834
|
-
break;
|
835
|
-
case 109:
|
836
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
837
|
-
case 110:
|
838
|
-
_context2.next = 112;
|
839
|
-
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
|
840
|
-
case 112:
|
841
|
-
response = _context2.sent;
|
842
|
-
return _context2.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
843
|
-
case 114:
|
844
|
-
case "end":
|
845
|
-
return _context2.stop();
|
846
|
-
}
|
847
|
-
}
|
848
|
-
}, _callee2);
|
849
|
-
})));
|
850
|
-
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
851
|
-
var params,
|
852
|
-
response,
|
853
|
-
_args3 = arguments;
|
854
|
-
return _regenerator.default.wrap(function _callee3$(_context3) {
|
855
|
-
while (1) {
|
856
|
-
switch (_context3.prev = _context3.next) {
|
857
|
-
case 0:
|
858
|
-
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
859
|
-
if (_this.attributes.id) {
|
860
|
-
_context3.next = 3;
|
861
|
-
break;
|
862
|
-
}
|
863
|
-
throw new errors.EmptyPropertyError('Current object has no id');
|
864
|
-
case 3:
|
865
|
-
if ((0, _utils.isObject)(params)) {
|
866
|
-
_context3.next = 5;
|
867
|
-
break;
|
868
|
-
}
|
869
|
-
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
870
|
-
case 5:
|
871
|
-
params.id = _this.attributes.id;
|
872
|
-
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
873
|
-
_context3.next = 8;
|
874
|
-
break;
|
875
|
-
}
|
876
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
877
|
-
case 8:
|
878
|
-
if (params['id']) {
|
879
|
-
_context3.next = 14;
|
880
|
-
break;
|
881
|
-
}
|
882
|
-
if (!_this.attributes.id) {
|
883
|
-
_context3.next = 13;
|
884
|
-
break;
|
885
|
-
}
|
886
|
-
params['id'] = _this.id;
|
887
|
-
_context3.next = 14;
|
888
|
-
break;
|
889
|
-
case 13:
|
890
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
891
|
-
case 14:
|
892
|
-
_context3.next = 16;
|
893
|
-
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
|
894
|
-
case 16:
|
895
|
-
response = _context3.sent;
|
896
|
-
return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
897
|
-
case 18:
|
898
|
-
case "end":
|
899
|
-
return _context3.stop();
|
900
|
-
}
|
901
|
-
}
|
902
|
-
}, _callee3);
|
903
|
-
})));
|
904
|
-
(0, _defineProperty2.default)(this, "destroy", function () {
|
905
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
906
|
-
return _this.delete(params);
|
907
|
-
});
|
908
|
-
(0, _defineProperty2.default)(this, "save", function () {
|
909
|
-
if (_this.attributes['id']) {
|
910
|
-
return _this.update(_this.attributes);
|
911
|
-
} else {
|
912
|
-
var newObject = RemoteServer.create(_this.attributes, _this.options);
|
913
|
-
_this.attributes = _objectSpread({}, newObject.attributes);
|
914
|
-
return true;
|
915
|
-
}
|
916
|
-
});
|
917
|
-
Object.entries(attributes).forEach(function (_ref4) {
|
918
|
-
var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
|
919
|
-
key = _ref5[0],
|
920
|
-
value = _ref5[1];
|
921
|
-
var normalizedKey = key.replace('?', '');
|
922
|
-
_this.attributes[normalizedKey] = value;
|
923
|
-
Object.defineProperty(_this, normalizedKey, {
|
924
|
-
value: value,
|
925
|
-
writable: false
|
926
|
-
});
|
927
|
-
});
|
928
|
-
this.options = _objectSpread({}, options);
|
929
|
-
});
|
930
|
-
(0, _defineProperty2.default)(RemoteServer, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
931
|
-
var _response$data;
|
932
|
-
var params,
|
933
|
-
options,
|
934
|
-
response,
|
935
|
-
_args4 = arguments;
|
936
|
-
return _regenerator.default.wrap(function _callee4$(_context4) {
|
937
|
-
while (1) {
|
938
|
-
switch (_context4.prev = _context4.next) {
|
511
|
+
while (1) switch (_context2.prev = _context2.next) {
|
939
512
|
case 0:
|
940
|
-
params =
|
941
|
-
|
942
|
-
|
943
|
-
_context4.next = 4;
|
513
|
+
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
514
|
+
if (_this.attributes.id) {
|
515
|
+
_context2.next = 3;
|
944
516
|
break;
|
945
517
|
}
|
946
|
-
throw new errors.
|
947
|
-
case
|
948
|
-
if (
|
949
|
-
|
518
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
519
|
+
case 3:
|
520
|
+
if ((0, _utils.isObject)(params)) {
|
521
|
+
_context2.next = 5;
|
950
522
|
break;
|
951
523
|
}
|
952
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
953
|
-
case
|
954
|
-
|
955
|
-
|
524
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
525
|
+
case 5:
|
526
|
+
params.id = _this.attributes.id;
|
527
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
528
|
+
_context2.next = 8;
|
529
|
+
break;
|
530
|
+
}
|
531
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
956
532
|
case 8:
|
957
|
-
response = _context4.sent;
|
958
|
-
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) {
|
959
|
-
return new RemoteServer(obj, options);
|
960
|
-
})) || []);
|
961
|
-
case 10:
|
962
|
-
case "end":
|
963
|
-
return _context4.stop();
|
964
|
-
}
|
965
|
-
}
|
966
|
-
}, _callee4);
|
967
|
-
})));
|
968
|
-
(0, _defineProperty2.default)(RemoteServer, "all", function () {
|
969
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
970
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
971
|
-
return RemoteServer.list(params, options);
|
972
|
-
});
|
973
|
-
(0, _defineProperty2.default)(RemoteServer, "find", /*#__PURE__*/function () {
|
974
|
-
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(id) {
|
975
|
-
var params,
|
976
|
-
options,
|
977
|
-
response,
|
978
|
-
_args5 = arguments;
|
979
|
-
return _regenerator.default.wrap(function _callee5$(_context5) {
|
980
|
-
while (1) {
|
981
|
-
switch (_context5.prev = _context5.next) {
|
982
|
-
case 0:
|
983
|
-
params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
984
|
-
options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
|
985
|
-
if ((0, _utils.isObject)(params)) {
|
986
|
-
_context5.next = 4;
|
987
|
-
break;
|
988
|
-
}
|
989
|
-
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
990
|
-
case 4:
|
991
|
-
params['id'] = id;
|
992
|
-
if (params['id']) {
|
993
|
-
_context5.next = 7;
|
994
|
-
break;
|
995
|
-
}
|
996
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
997
|
-
case 7:
|
998
|
-
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
999
|
-
_context5.next = 9;
|
1000
|
-
break;
|
1001
|
-
}
|
1002
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
|
1003
|
-
case 9:
|
1004
|
-
_context5.next = 11;
|
1005
|
-
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
|
1006
|
-
case 11:
|
1007
|
-
response = _context5.sent;
|
1008
|
-
return _context5.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
|
1009
|
-
case 13:
|
1010
|
-
case "end":
|
1011
|
-
return _context5.stop();
|
1012
|
-
}
|
1013
|
-
}
|
1014
|
-
}, _callee5);
|
1015
|
-
}));
|
1016
|
-
return function (_x) {
|
1017
|
-
return _ref7.apply(this, arguments);
|
1018
|
-
};
|
1019
|
-
}());
|
1020
|
-
(0, _defineProperty2.default)(RemoteServer, "get", function (id) {
|
1021
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
1022
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
1023
|
-
return RemoteServer.find(id, params, options);
|
1024
|
-
});
|
1025
|
-
(0, _defineProperty2.default)(RemoteServer, "findConfigurationFile", /*#__PURE__*/function () {
|
1026
|
-
var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(id) {
|
1027
|
-
var params,
|
1028
|
-
options,
|
1029
|
-
response,
|
1030
|
-
_args6 = arguments;
|
1031
|
-
return _regenerator.default.wrap(function _callee6$(_context6) {
|
1032
|
-
while (1) {
|
1033
|
-
switch (_context6.prev = _context6.next) {
|
1034
|
-
case 0:
|
1035
|
-
params = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
1036
|
-
options = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
|
1037
|
-
if ((0, _utils.isObject)(params)) {
|
1038
|
-
_context6.next = 4;
|
1039
|
-
break;
|
1040
|
-
}
|
1041
|
-
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
1042
|
-
case 4:
|
1043
|
-
params['id'] = id;
|
1044
|
-
if (params['id']) {
|
1045
|
-
_context6.next = 7;
|
1046
|
-
break;
|
1047
|
-
}
|
1048
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
1049
|
-
case 7:
|
1050
|
-
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
1051
|
-
_context6.next = 9;
|
1052
|
-
break;
|
1053
|
-
}
|
1054
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
|
1055
|
-
case 9:
|
1056
|
-
_context6.next = 11;
|
1057
|
-
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'GET', params, options);
|
1058
|
-
case 11:
|
1059
|
-
response = _context6.sent;
|
1060
|
-
return _context6.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, options));
|
1061
|
-
case 13:
|
1062
|
-
case "end":
|
1063
|
-
return _context6.stop();
|
1064
|
-
}
|
1065
|
-
}
|
1066
|
-
}, _callee6);
|
1067
|
-
}));
|
1068
|
-
return function (_x2) {
|
1069
|
-
return _ref8.apply(this, arguments);
|
1070
|
-
};
|
1071
|
-
}());
|
1072
|
-
(0, _defineProperty2.default)(RemoteServer, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
1073
|
-
var params,
|
1074
|
-
options,
|
1075
|
-
response,
|
1076
|
-
_args7 = arguments;
|
1077
|
-
return _regenerator.default.wrap(function _callee7$(_context7) {
|
1078
|
-
while (1) {
|
1079
|
-
switch (_context7.prev = _context7.next) {
|
1080
|
-
case 0:
|
1081
|
-
params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
1082
|
-
options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
|
1083
533
|
if (!(params['aws_access_key'] && !(0, _utils.isString)(params['aws_access_key']))) {
|
1084
|
-
|
534
|
+
_context2.next = 10;
|
1085
535
|
break;
|
1086
536
|
}
|
1087
|
-
throw new errors.InvalidParameterError("Bad parameter: aws_access_key must be of type String, received ".concat((0, _utils.getType)(
|
1088
|
-
case
|
537
|
+
throw new errors.InvalidParameterError("Bad parameter: aws_access_key must be of type String, received ".concat((0, _utils.getType)(aws_access_key)));
|
538
|
+
case 10:
|
1089
539
|
if (!(params['aws_secret_key'] && !(0, _utils.isString)(params['aws_secret_key']))) {
|
1090
|
-
|
540
|
+
_context2.next = 12;
|
1091
541
|
break;
|
1092
542
|
}
|
1093
|
-
throw new errors.InvalidParameterError("Bad parameter: aws_secret_key must be of type String, received ".concat((0, _utils.getType)(
|
1094
|
-
case
|
543
|
+
throw new errors.InvalidParameterError("Bad parameter: aws_secret_key must be of type String, received ".concat((0, _utils.getType)(aws_secret_key)));
|
544
|
+
case 12:
|
1095
545
|
if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
|
1096
|
-
|
546
|
+
_context2.next = 14;
|
1097
547
|
break;
|
1098
548
|
}
|
1099
|
-
throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(
|
1100
|
-
case
|
549
|
+
throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(password)));
|
550
|
+
case 14:
|
1101
551
|
if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
|
1102
|
-
|
552
|
+
_context2.next = 16;
|
1103
553
|
break;
|
1104
554
|
}
|
1105
|
-
throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(
|
1106
|
-
case
|
555
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
|
556
|
+
case 16:
|
1107
557
|
if (!(params['private_key_passphrase'] && !(0, _utils.isString)(params['private_key_passphrase']))) {
|
1108
|
-
|
558
|
+
_context2.next = 18;
|
1109
559
|
break;
|
1110
560
|
}
|
1111
|
-
throw new errors.InvalidParameterError("Bad parameter: private_key_passphrase must be of type String, received ".concat((0, _utils.getType)(
|
1112
|
-
case
|
561
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key_passphrase must be of type String, received ".concat((0, _utils.getType)(private_key_passphrase)));
|
562
|
+
case 18:
|
1113
563
|
if (!(params['ssl_certificate'] && !(0, _utils.isString)(params['ssl_certificate']))) {
|
1114
|
-
|
564
|
+
_context2.next = 20;
|
1115
565
|
break;
|
1116
566
|
}
|
1117
|
-
throw new errors.InvalidParameterError("Bad parameter: ssl_certificate must be of type String, received ".concat((0, _utils.getType)(
|
1118
|
-
case
|
567
|
+
throw new errors.InvalidParameterError("Bad parameter: ssl_certificate must be of type String, received ".concat((0, _utils.getType)(ssl_certificate)));
|
568
|
+
case 20:
|
1119
569
|
if (!(params['google_cloud_storage_credentials_json'] && !(0, _utils.isString)(params['google_cloud_storage_credentials_json']))) {
|
1120
|
-
|
570
|
+
_context2.next = 22;
|
1121
571
|
break;
|
1122
572
|
}
|
1123
|
-
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_credentials_json must be of type String, received ".concat((0, _utils.getType)(
|
1124
|
-
case
|
573
|
+
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_credentials_json must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_credentials_json)));
|
574
|
+
case 22:
|
1125
575
|
if (!(params['wasabi_access_key'] && !(0, _utils.isString)(params['wasabi_access_key']))) {
|
1126
|
-
|
576
|
+
_context2.next = 24;
|
1127
577
|
break;
|
1128
578
|
}
|
1129
|
-
throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(
|
1130
|
-
case
|
579
|
+
throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(wasabi_access_key)));
|
580
|
+
case 24:
|
1131
581
|
if (!(params['wasabi_secret_key'] && !(0, _utils.isString)(params['wasabi_secret_key']))) {
|
1132
|
-
|
582
|
+
_context2.next = 26;
|
1133
583
|
break;
|
1134
584
|
}
|
1135
|
-
throw new errors.InvalidParameterError("Bad parameter: wasabi_secret_key must be of type String, received ".concat((0, _utils.getType)(
|
1136
|
-
case
|
585
|
+
throw new errors.InvalidParameterError("Bad parameter: wasabi_secret_key must be of type String, received ".concat((0, _utils.getType)(wasabi_secret_key)));
|
586
|
+
case 26:
|
1137
587
|
if (!(params['backblaze_b2_key_id'] && !(0, _utils.isString)(params['backblaze_b2_key_id']))) {
|
1138
|
-
|
588
|
+
_context2.next = 28;
|
1139
589
|
break;
|
1140
590
|
}
|
1141
|
-
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_key_id must be of type String, received ".concat((0, _utils.getType)(
|
1142
|
-
case
|
591
|
+
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_key_id must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_key_id)));
|
592
|
+
case 28:
|
1143
593
|
if (!(params['backblaze_b2_application_key'] && !(0, _utils.isString)(params['backblaze_b2_application_key']))) {
|
1144
|
-
|
594
|
+
_context2.next = 30;
|
1145
595
|
break;
|
1146
596
|
}
|
1147
|
-
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_application_key must be of type String, received ".concat((0, _utils.getType)(
|
1148
|
-
case
|
597
|
+
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_application_key must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_application_key)));
|
598
|
+
case 30:
|
1149
599
|
if (!(params['rackspace_api_key'] && !(0, _utils.isString)(params['rackspace_api_key']))) {
|
1150
|
-
|
600
|
+
_context2.next = 32;
|
1151
601
|
break;
|
1152
602
|
}
|
1153
|
-
throw new errors.InvalidParameterError("Bad parameter: rackspace_api_key must be of type String, received ".concat((0, _utils.getType)(
|
1154
|
-
case
|
603
|
+
throw new errors.InvalidParameterError("Bad parameter: rackspace_api_key must be of type String, received ".concat((0, _utils.getType)(rackspace_api_key)));
|
604
|
+
case 32:
|
1155
605
|
if (!(params['azure_blob_storage_access_key'] && !(0, _utils.isString)(params['azure_blob_storage_access_key']))) {
|
1156
|
-
|
606
|
+
_context2.next = 34;
|
1157
607
|
break;
|
1158
608
|
}
|
1159
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_access_key must be of type String, received ".concat((0, _utils.getType)(
|
1160
|
-
case
|
609
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_access_key must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_access_key)));
|
610
|
+
case 34:
|
1161
611
|
if (!(params['azure_files_storage_access_key'] && !(0, _utils.isString)(params['azure_files_storage_access_key']))) {
|
1162
|
-
|
612
|
+
_context2.next = 36;
|
1163
613
|
break;
|
1164
614
|
}
|
1165
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_access_key must be of type String, received ".concat((0, _utils.getType)(
|
1166
|
-
case
|
615
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_access_key must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_access_key)));
|
616
|
+
case 36:
|
1167
617
|
if (!(params['hostname'] && !(0, _utils.isString)(params['hostname']))) {
|
1168
|
-
|
618
|
+
_context2.next = 38;
|
1169
619
|
break;
|
1170
620
|
}
|
1171
|
-
throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(
|
1172
|
-
case
|
621
|
+
throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(hostname)));
|
622
|
+
case 38:
|
1173
623
|
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
1174
|
-
|
624
|
+
_context2.next = 40;
|
1175
625
|
break;
|
1176
626
|
}
|
1177
|
-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(
|
1178
|
-
case
|
627
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
|
628
|
+
case 40:
|
1179
629
|
if (!(params['max_connections'] && !(0, _utils.isInt)(params['max_connections']))) {
|
1180
|
-
|
630
|
+
_context2.next = 42;
|
1181
631
|
break;
|
1182
632
|
}
|
1183
|
-
throw new errors.InvalidParameterError("Bad parameter: max_connections must be of type Int, received ".concat((0, _utils.getType)(
|
1184
|
-
case
|
633
|
+
throw new errors.InvalidParameterError("Bad parameter: max_connections must be of type Int, received ".concat((0, _utils.getType)(max_connections)));
|
634
|
+
case 42:
|
1185
635
|
if (!(params['port'] && !(0, _utils.isInt)(params['port']))) {
|
1186
|
-
|
636
|
+
_context2.next = 44;
|
1187
637
|
break;
|
1188
638
|
}
|
1189
|
-
throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(
|
1190
|
-
case
|
639
|
+
throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(port)));
|
640
|
+
case 44:
|
1191
641
|
if (!(params['s3_bucket'] && !(0, _utils.isString)(params['s3_bucket']))) {
|
1192
|
-
|
642
|
+
_context2.next = 46;
|
1193
643
|
break;
|
1194
644
|
}
|
1195
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(
|
1196
|
-
case
|
645
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(s3_bucket)));
|
646
|
+
case 46:
|
1197
647
|
if (!(params['s3_region'] && !(0, _utils.isString)(params['s3_region']))) {
|
1198
|
-
|
648
|
+
_context2.next = 48;
|
1199
649
|
break;
|
1200
650
|
}
|
1201
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(
|
1202
|
-
case
|
651
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(s3_region)));
|
652
|
+
case 48:
|
1203
653
|
if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
|
1204
|
-
|
654
|
+
_context2.next = 50;
|
1205
655
|
break;
|
1206
656
|
}
|
1207
|
-
throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(
|
1208
|
-
case
|
657
|
+
throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(server_certificate)));
|
658
|
+
case 50:
|
1209
659
|
if (!(params['server_host_key'] && !(0, _utils.isString)(params['server_host_key']))) {
|
1210
|
-
|
660
|
+
_context2.next = 52;
|
1211
661
|
break;
|
1212
662
|
}
|
1213
|
-
throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(
|
1214
|
-
case
|
663
|
+
throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(server_host_key)));
|
664
|
+
case 52:
|
1215
665
|
if (!(params['server_type'] && !(0, _utils.isString)(params['server_type']))) {
|
1216
|
-
|
666
|
+
_context2.next = 54;
|
1217
667
|
break;
|
1218
668
|
}
|
1219
|
-
throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(
|
1220
|
-
case
|
669
|
+
throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(server_type)));
|
670
|
+
case 54:
|
1221
671
|
if (!(params['ssl'] && !(0, _utils.isString)(params['ssl']))) {
|
1222
|
-
|
672
|
+
_context2.next = 56;
|
1223
673
|
break;
|
1224
674
|
}
|
1225
|
-
throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(
|
1226
|
-
case
|
675
|
+
throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(ssl)));
|
676
|
+
case 56:
|
1227
677
|
if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
|
1228
|
-
|
678
|
+
_context2.next = 58;
|
1229
679
|
break;
|
1230
680
|
}
|
1231
|
-
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(
|
1232
|
-
case
|
681
|
+
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(username)));
|
682
|
+
case 58:
|
1233
683
|
if (!(params['google_cloud_storage_bucket'] && !(0, _utils.isString)(params['google_cloud_storage_bucket']))) {
|
1234
|
-
|
684
|
+
_context2.next = 60;
|
1235
685
|
break;
|
1236
686
|
}
|
1237
|
-
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_bucket must be of type String, received ".concat((0, _utils.getType)(
|
1238
|
-
case
|
687
|
+
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_bucket must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_bucket)));
|
688
|
+
case 60:
|
1239
689
|
if (!(params['google_cloud_storage_project_id'] && !(0, _utils.isString)(params['google_cloud_storage_project_id']))) {
|
1240
|
-
|
690
|
+
_context2.next = 62;
|
1241
691
|
break;
|
1242
692
|
}
|
1243
|
-
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_project_id must be of type String, received ".concat((0, _utils.getType)(
|
1244
|
-
case
|
693
|
+
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_project_id must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_project_id)));
|
694
|
+
case 62:
|
1245
695
|
if (!(params['backblaze_b2_bucket'] && !(0, _utils.isString)(params['backblaze_b2_bucket']))) {
|
1246
|
-
|
696
|
+
_context2.next = 64;
|
1247
697
|
break;
|
1248
698
|
}
|
1249
|
-
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_bucket must be of type String, received ".concat((0, _utils.getType)(
|
1250
|
-
case
|
699
|
+
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_bucket must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_bucket)));
|
700
|
+
case 64:
|
1251
701
|
if (!(params['backblaze_b2_s3_endpoint'] && !(0, _utils.isString)(params['backblaze_b2_s3_endpoint']))) {
|
1252
|
-
|
702
|
+
_context2.next = 66;
|
1253
703
|
break;
|
1254
704
|
}
|
1255
|
-
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_s3_endpoint must be of type String, received ".concat((0, _utils.getType)(
|
1256
|
-
case
|
705
|
+
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_s3_endpoint must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_s3_endpoint)));
|
706
|
+
case 66:
|
1257
707
|
if (!(params['wasabi_bucket'] && !(0, _utils.isString)(params['wasabi_bucket']))) {
|
1258
|
-
|
708
|
+
_context2.next = 68;
|
1259
709
|
break;
|
1260
710
|
}
|
1261
|
-
throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(
|
1262
|
-
case
|
711
|
+
throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(wasabi_bucket)));
|
712
|
+
case 68:
|
1263
713
|
if (!(params['wasabi_region'] && !(0, _utils.isString)(params['wasabi_region']))) {
|
1264
|
-
|
714
|
+
_context2.next = 70;
|
1265
715
|
break;
|
1266
716
|
}
|
1267
|
-
throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(
|
1268
|
-
case
|
717
|
+
throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(wasabi_region)));
|
718
|
+
case 70:
|
1269
719
|
if (!(params['rackspace_username'] && !(0, _utils.isString)(params['rackspace_username']))) {
|
1270
|
-
|
720
|
+
_context2.next = 72;
|
1271
721
|
break;
|
1272
722
|
}
|
1273
|
-
throw new errors.InvalidParameterError("Bad parameter: rackspace_username must be of type String, received ".concat((0, _utils.getType)(
|
1274
|
-
case
|
723
|
+
throw new errors.InvalidParameterError("Bad parameter: rackspace_username must be of type String, received ".concat((0, _utils.getType)(rackspace_username)));
|
724
|
+
case 72:
|
1275
725
|
if (!(params['rackspace_region'] && !(0, _utils.isString)(params['rackspace_region']))) {
|
1276
|
-
|
726
|
+
_context2.next = 74;
|
1277
727
|
break;
|
1278
728
|
}
|
1279
|
-
throw new errors.InvalidParameterError("Bad parameter: rackspace_region must be of type String, received ".concat((0, _utils.getType)(
|
1280
|
-
case
|
729
|
+
throw new errors.InvalidParameterError("Bad parameter: rackspace_region must be of type String, received ".concat((0, _utils.getType)(rackspace_region)));
|
730
|
+
case 74:
|
1281
731
|
if (!(params['rackspace_container'] && !(0, _utils.isString)(params['rackspace_container']))) {
|
1282
|
-
|
732
|
+
_context2.next = 76;
|
1283
733
|
break;
|
1284
734
|
}
|
1285
|
-
throw new errors.InvalidParameterError("Bad parameter: rackspace_container must be of type String, received ".concat((0, _utils.getType)(
|
1286
|
-
case
|
735
|
+
throw new errors.InvalidParameterError("Bad parameter: rackspace_container must be of type String, received ".concat((0, _utils.getType)(rackspace_container)));
|
736
|
+
case 76:
|
1287
737
|
if (!(params['one_drive_account_type'] && !(0, _utils.isString)(params['one_drive_account_type']))) {
|
1288
|
-
|
738
|
+
_context2.next = 78;
|
1289
739
|
break;
|
1290
740
|
}
|
1291
|
-
throw new errors.InvalidParameterError("Bad parameter: one_drive_account_type must be of type String, received ".concat((0, _utils.getType)(
|
1292
|
-
case
|
741
|
+
throw new errors.InvalidParameterError("Bad parameter: one_drive_account_type must be of type String, received ".concat((0, _utils.getType)(one_drive_account_type)));
|
742
|
+
case 78:
|
1293
743
|
if (!(params['azure_blob_storage_account'] && !(0, _utils.isString)(params['azure_blob_storage_account']))) {
|
1294
|
-
|
744
|
+
_context2.next = 80;
|
1295
745
|
break;
|
1296
746
|
}
|
1297
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_account must be of type String, received ".concat((0, _utils.getType)(
|
1298
|
-
case
|
747
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_account must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_account)));
|
748
|
+
case 80:
|
1299
749
|
if (!(params['azure_blob_storage_container'] && !(0, _utils.isString)(params['azure_blob_storage_container']))) {
|
1300
|
-
|
750
|
+
_context2.next = 82;
|
1301
751
|
break;
|
1302
752
|
}
|
1303
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(
|
1304
|
-
case
|
753
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_container)));
|
754
|
+
case 82:
|
1305
755
|
if (!(params['azure_blob_storage_sas_token'] && !(0, _utils.isString)(params['azure_blob_storage_sas_token']))) {
|
1306
|
-
|
756
|
+
_context2.next = 84;
|
1307
757
|
break;
|
1308
758
|
}
|
1309
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(
|
1310
|
-
case
|
759
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_sas_token)));
|
760
|
+
case 84:
|
1311
761
|
if (!(params['azure_files_storage_account'] && !(0, _utils.isString)(params['azure_files_storage_account']))) {
|
1312
|
-
|
762
|
+
_context2.next = 86;
|
1313
763
|
break;
|
1314
764
|
}
|
1315
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_account must be of type String, received ".concat((0, _utils.getType)(
|
1316
|
-
case
|
765
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_account must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_account)));
|
766
|
+
case 86:
|
1317
767
|
if (!(params['azure_files_storage_share_name'] && !(0, _utils.isString)(params['azure_files_storage_share_name']))) {
|
1318
|
-
|
768
|
+
_context2.next = 88;
|
1319
769
|
break;
|
1320
770
|
}
|
1321
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(
|
1322
|
-
case
|
771
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_share_name)));
|
772
|
+
case 88:
|
1323
773
|
if (!(params['azure_files_storage_sas_token'] && !(0, _utils.isString)(params['azure_files_storage_sas_token']))) {
|
1324
|
-
|
774
|
+
_context2.next = 90;
|
1325
775
|
break;
|
1326
776
|
}
|
1327
|
-
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(
|
1328
|
-
case
|
777
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_sas_token)));
|
778
|
+
case 90:
|
1329
779
|
if (!(params['s3_compatible_bucket'] && !(0, _utils.isString)(params['s3_compatible_bucket']))) {
|
1330
|
-
|
780
|
+
_context2.next = 92;
|
1331
781
|
break;
|
1332
782
|
}
|
1333
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(
|
1334
|
-
case
|
783
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(s3_compatible_bucket)));
|
784
|
+
case 92:
|
1335
785
|
if (!(params['s3_compatible_endpoint'] && !(0, _utils.isString)(params['s3_compatible_endpoint']))) {
|
1336
|
-
|
786
|
+
_context2.next = 94;
|
1337
787
|
break;
|
1338
788
|
}
|
1339
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(
|
1340
|
-
case
|
789
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(s3_compatible_endpoint)));
|
790
|
+
case 94:
|
1341
791
|
if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
|
1342
|
-
|
792
|
+
_context2.next = 96;
|
1343
793
|
break;
|
1344
794
|
}
|
1345
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(
|
1346
|
-
case
|
795
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(s3_compatible_region)));
|
796
|
+
case 96:
|
1347
797
|
if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
|
1348
|
-
|
798
|
+
_context2.next = 98;
|
1349
799
|
break;
|
1350
800
|
}
|
1351
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(
|
1352
|
-
case
|
801
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
|
802
|
+
case 98:
|
1353
803
|
if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
|
1354
|
-
|
804
|
+
_context2.next = 100;
|
1355
805
|
break;
|
1356
806
|
}
|
1357
|
-
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(
|
1358
|
-
case
|
807
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
|
808
|
+
case 100:
|
1359
809
|
if (!(params['files_agent_root'] && !(0, _utils.isString)(params['files_agent_root']))) {
|
1360
|
-
|
810
|
+
_context2.next = 102;
|
1361
811
|
break;
|
1362
812
|
}
|
1363
|
-
throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(
|
1364
|
-
case
|
813
|
+
throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(files_agent_root)));
|
814
|
+
case 102:
|
1365
815
|
if (!(params['files_agent_permission_set'] && !(0, _utils.isString)(params['files_agent_permission_set']))) {
|
1366
|
-
|
816
|
+
_context2.next = 104;
|
1367
817
|
break;
|
1368
818
|
}
|
1369
|
-
throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(
|
1370
|
-
case
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
819
|
+
throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(files_agent_permission_set)));
|
820
|
+
case 104:
|
821
|
+
if (params['id']) {
|
822
|
+
_context2.next = 110;
|
823
|
+
break;
|
824
|
+
}
|
825
|
+
if (!_this.attributes.id) {
|
826
|
+
_context2.next = 109;
|
827
|
+
break;
|
828
|
+
}
|
829
|
+
params['id'] = _this.id;
|
830
|
+
_context2.next = 110;
|
831
|
+
break;
|
832
|
+
case 109:
|
833
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
834
|
+
case 110:
|
835
|
+
_context2.next = 112;
|
836
|
+
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
|
837
|
+
case 112:
|
838
|
+
response = _context2.sent;
|
839
|
+
return _context2.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
840
|
+
case 114:
|
841
|
+
case "end":
|
842
|
+
return _context2.stop();
|
843
|
+
}
|
844
|
+
}, _callee2);
|
845
|
+
})));
|
846
|
+
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
847
|
+
var params,
|
848
|
+
response,
|
849
|
+
_args3 = arguments;
|
850
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
851
|
+
while (1) switch (_context3.prev = _context3.next) {
|
852
|
+
case 0:
|
853
|
+
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
854
|
+
if (_this.attributes.id) {
|
855
|
+
_context3.next = 3;
|
856
|
+
break;
|
857
|
+
}
|
858
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
859
|
+
case 3:
|
860
|
+
if ((0, _utils.isObject)(params)) {
|
861
|
+
_context3.next = 5;
|
862
|
+
break;
|
863
|
+
}
|
864
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
865
|
+
case 5:
|
866
|
+
params.id = _this.attributes.id;
|
867
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
868
|
+
_context3.next = 8;
|
869
|
+
break;
|
870
|
+
}
|
871
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
872
|
+
case 8:
|
873
|
+
if (params['id']) {
|
874
|
+
_context3.next = 14;
|
875
|
+
break;
|
876
|
+
}
|
877
|
+
if (!_this.attributes.id) {
|
878
|
+
_context3.next = 13;
|
879
|
+
break;
|
880
|
+
}
|
881
|
+
params['id'] = _this.id;
|
882
|
+
_context3.next = 14;
|
883
|
+
break;
|
884
|
+
case 13:
|
885
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
886
|
+
case 14:
|
887
|
+
_context3.next = 16;
|
888
|
+
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
|
889
|
+
case 16:
|
890
|
+
response = _context3.sent;
|
891
|
+
return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
892
|
+
case 18:
|
893
|
+
case "end":
|
894
|
+
return _context3.stop();
|
895
|
+
}
|
896
|
+
}, _callee3);
|
897
|
+
})));
|
898
|
+
(0, _defineProperty2.default)(this, "destroy", function () {
|
899
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
900
|
+
return _this.delete(params);
|
901
|
+
});
|
902
|
+
(0, _defineProperty2.default)(this, "save", function () {
|
903
|
+
if (_this.attributes['id']) {
|
904
|
+
return _this.update(_this.attributes);
|
905
|
+
} else {
|
906
|
+
var newObject = RemoteServer.create(_this.attributes, _this.options);
|
907
|
+
_this.attributes = _objectSpread({}, newObject.attributes);
|
908
|
+
return true;
|
909
|
+
}
|
910
|
+
});
|
911
|
+
Object.entries(attributes).forEach(function (_ref4) {
|
912
|
+
var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
|
913
|
+
key = _ref5[0],
|
914
|
+
value = _ref5[1];
|
915
|
+
var normalizedKey = key.replace('?', '');
|
916
|
+
_this.attributes[normalizedKey] = value;
|
917
|
+
Object.defineProperty(_this, normalizedKey, {
|
918
|
+
value: value,
|
919
|
+
writable: false
|
920
|
+
});
|
921
|
+
});
|
922
|
+
this.options = _objectSpread({}, options);
|
923
|
+
});
|
924
|
+
(0, _defineProperty2.default)(RemoteServer, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
925
|
+
var _response$data;
|
926
|
+
var params,
|
927
|
+
options,
|
928
|
+
response,
|
929
|
+
_args4 = arguments;
|
930
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
931
|
+
while (1) switch (_context4.prev = _context4.next) {
|
932
|
+
case 0:
|
933
|
+
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
934
|
+
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
935
|
+
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
936
|
+
_context4.next = 4;
|
937
|
+
break;
|
938
|
+
}
|
939
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
|
940
|
+
case 4:
|
941
|
+
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
942
|
+
_context4.next = 6;
|
943
|
+
break;
|
944
|
+
}
|
945
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
|
946
|
+
case 6:
|
947
|
+
_context4.next = 8;
|
948
|
+
return _Api.default.sendRequest("/remote_servers", 'GET', params, options);
|
949
|
+
case 8:
|
950
|
+
response = _context4.sent;
|
951
|
+
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) {
|
952
|
+
return new RemoteServer(obj, options);
|
953
|
+
})) || []);
|
954
|
+
case 10:
|
955
|
+
case "end":
|
956
|
+
return _context4.stop();
|
957
|
+
}
|
958
|
+
}, _callee4);
|
959
|
+
})));
|
960
|
+
(0, _defineProperty2.default)(RemoteServer, "all", function () {
|
961
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
962
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
963
|
+
return RemoteServer.list(params, options);
|
964
|
+
});
|
965
|
+
(0, _defineProperty2.default)(RemoteServer, "find", /*#__PURE__*/function () {
|
966
|
+
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(id) {
|
967
|
+
var params,
|
968
|
+
options,
|
969
|
+
response,
|
970
|
+
_args5 = arguments;
|
971
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
972
|
+
while (1) switch (_context5.prev = _context5.next) {
|
973
|
+
case 0:
|
974
|
+
params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
975
|
+
options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
|
976
|
+
if ((0, _utils.isObject)(params)) {
|
977
|
+
_context5.next = 4;
|
978
|
+
break;
|
979
|
+
}
|
980
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
981
|
+
case 4:
|
982
|
+
params['id'] = id;
|
983
|
+
if (params['id']) {
|
984
|
+
_context5.next = 7;
|
985
|
+
break;
|
986
|
+
}
|
987
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
988
|
+
case 7:
|
989
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
990
|
+
_context5.next = 9;
|
991
|
+
break;
|
992
|
+
}
|
993
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
|
994
|
+
case 9:
|
995
|
+
_context5.next = 11;
|
996
|
+
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
|
997
|
+
case 11:
|
998
|
+
response = _context5.sent;
|
999
|
+
return _context5.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
|
1000
|
+
case 13:
|
1001
|
+
case "end":
|
1002
|
+
return _context5.stop();
|
1003
|
+
}
|
1004
|
+
}, _callee5);
|
1005
|
+
}));
|
1006
|
+
return function (_x) {
|
1007
|
+
return _ref7.apply(this, arguments);
|
1008
|
+
};
|
1009
|
+
}());
|
1010
|
+
(0, _defineProperty2.default)(RemoteServer, "get", function (id) {
|
1011
|
+
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
1012
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
1013
|
+
return RemoteServer.find(id, params, options);
|
1014
|
+
});
|
1015
|
+
(0, _defineProperty2.default)(RemoteServer, "findConfigurationFile", /*#__PURE__*/function () {
|
1016
|
+
var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(id) {
|
1017
|
+
var params,
|
1018
|
+
options,
|
1019
|
+
response,
|
1020
|
+
_args6 = arguments;
|
1021
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
1022
|
+
while (1) switch (_context6.prev = _context6.next) {
|
1023
|
+
case 0:
|
1024
|
+
params = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
1025
|
+
options = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
|
1026
|
+
if ((0, _utils.isObject)(params)) {
|
1027
|
+
_context6.next = 4;
|
1028
|
+
break;
|
1029
|
+
}
|
1030
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
1031
|
+
case 4:
|
1032
|
+
params['id'] = id;
|
1033
|
+
if (params['id']) {
|
1034
|
+
_context6.next = 7;
|
1035
|
+
break;
|
1036
|
+
}
|
1037
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
1038
|
+
case 7:
|
1039
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
1040
|
+
_context6.next = 9;
|
1041
|
+
break;
|
1042
|
+
}
|
1043
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
|
1044
|
+
case 9:
|
1045
|
+
_context6.next = 11;
|
1046
|
+
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'GET', params, options);
|
1047
|
+
case 11:
|
1048
|
+
response = _context6.sent;
|
1049
|
+
return _context6.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, options));
|
1050
|
+
case 13:
|
1377
1051
|
case "end":
|
1378
|
-
return
|
1052
|
+
return _context6.stop();
|
1379
1053
|
}
|
1054
|
+
}, _callee6);
|
1055
|
+
}));
|
1056
|
+
return function (_x2) {
|
1057
|
+
return _ref8.apply(this, arguments);
|
1058
|
+
};
|
1059
|
+
}());
|
1060
|
+
(0, _defineProperty2.default)(RemoteServer, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
1061
|
+
var params,
|
1062
|
+
options,
|
1063
|
+
response,
|
1064
|
+
_args7 = arguments;
|
1065
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
1066
|
+
while (1) switch (_context7.prev = _context7.next) {
|
1067
|
+
case 0:
|
1068
|
+
params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
1069
|
+
options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
|
1070
|
+
if (!(params['aws_access_key'] && !(0, _utils.isString)(params['aws_access_key']))) {
|
1071
|
+
_context7.next = 4;
|
1072
|
+
break;
|
1073
|
+
}
|
1074
|
+
throw new errors.InvalidParameterError("Bad parameter: aws_access_key must be of type String, received ".concat((0, _utils.getType)(params['aws_access_key'])));
|
1075
|
+
case 4:
|
1076
|
+
if (!(params['aws_secret_key'] && !(0, _utils.isString)(params['aws_secret_key']))) {
|
1077
|
+
_context7.next = 6;
|
1078
|
+
break;
|
1079
|
+
}
|
1080
|
+
throw new errors.InvalidParameterError("Bad parameter: aws_secret_key must be of type String, received ".concat((0, _utils.getType)(params['aws_secret_key'])));
|
1081
|
+
case 6:
|
1082
|
+
if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
|
1083
|
+
_context7.next = 8;
|
1084
|
+
break;
|
1085
|
+
}
|
1086
|
+
throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params['password'])));
|
1087
|
+
case 8:
|
1088
|
+
if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
|
1089
|
+
_context7.next = 10;
|
1090
|
+
break;
|
1091
|
+
}
|
1092
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params['private_key'])));
|
1093
|
+
case 10:
|
1094
|
+
if (!(params['private_key_passphrase'] && !(0, _utils.isString)(params['private_key_passphrase']))) {
|
1095
|
+
_context7.next = 12;
|
1096
|
+
break;
|
1097
|
+
}
|
1098
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key_passphrase must be of type String, received ".concat((0, _utils.getType)(params['private_key_passphrase'])));
|
1099
|
+
case 12:
|
1100
|
+
if (!(params['ssl_certificate'] && !(0, _utils.isString)(params['ssl_certificate']))) {
|
1101
|
+
_context7.next = 14;
|
1102
|
+
break;
|
1103
|
+
}
|
1104
|
+
throw new errors.InvalidParameterError("Bad parameter: ssl_certificate must be of type String, received ".concat((0, _utils.getType)(params['ssl_certificate'])));
|
1105
|
+
case 14:
|
1106
|
+
if (!(params['google_cloud_storage_credentials_json'] && !(0, _utils.isString)(params['google_cloud_storage_credentials_json']))) {
|
1107
|
+
_context7.next = 16;
|
1108
|
+
break;
|
1109
|
+
}
|
1110
|
+
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_credentials_json must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_credentials_json'])));
|
1111
|
+
case 16:
|
1112
|
+
if (!(params['wasabi_access_key'] && !(0, _utils.isString)(params['wasabi_access_key']))) {
|
1113
|
+
_context7.next = 18;
|
1114
|
+
break;
|
1115
|
+
}
|
1116
|
+
throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(params['wasabi_access_key'])));
|
1117
|
+
case 18:
|
1118
|
+
if (!(params['wasabi_secret_key'] && !(0, _utils.isString)(params['wasabi_secret_key']))) {
|
1119
|
+
_context7.next = 20;
|
1120
|
+
break;
|
1121
|
+
}
|
1122
|
+
throw new errors.InvalidParameterError("Bad parameter: wasabi_secret_key must be of type String, received ".concat((0, _utils.getType)(params['wasabi_secret_key'])));
|
1123
|
+
case 20:
|
1124
|
+
if (!(params['backblaze_b2_key_id'] && !(0, _utils.isString)(params['backblaze_b2_key_id']))) {
|
1125
|
+
_context7.next = 22;
|
1126
|
+
break;
|
1127
|
+
}
|
1128
|
+
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_key_id must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_key_id'])));
|
1129
|
+
case 22:
|
1130
|
+
if (!(params['backblaze_b2_application_key'] && !(0, _utils.isString)(params['backblaze_b2_application_key']))) {
|
1131
|
+
_context7.next = 24;
|
1132
|
+
break;
|
1133
|
+
}
|
1134
|
+
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_application_key must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_application_key'])));
|
1135
|
+
case 24:
|
1136
|
+
if (!(params['rackspace_api_key'] && !(0, _utils.isString)(params['rackspace_api_key']))) {
|
1137
|
+
_context7.next = 26;
|
1138
|
+
break;
|
1139
|
+
}
|
1140
|
+
throw new errors.InvalidParameterError("Bad parameter: rackspace_api_key must be of type String, received ".concat((0, _utils.getType)(params['rackspace_api_key'])));
|
1141
|
+
case 26:
|
1142
|
+
if (!(params['azure_blob_storage_access_key'] && !(0, _utils.isString)(params['azure_blob_storage_access_key']))) {
|
1143
|
+
_context7.next = 28;
|
1144
|
+
break;
|
1145
|
+
}
|
1146
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_access_key must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_access_key'])));
|
1147
|
+
case 28:
|
1148
|
+
if (!(params['azure_files_storage_access_key'] && !(0, _utils.isString)(params['azure_files_storage_access_key']))) {
|
1149
|
+
_context7.next = 30;
|
1150
|
+
break;
|
1151
|
+
}
|
1152
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_access_key must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_access_key'])));
|
1153
|
+
case 30:
|
1154
|
+
if (!(params['hostname'] && !(0, _utils.isString)(params['hostname']))) {
|
1155
|
+
_context7.next = 32;
|
1156
|
+
break;
|
1157
|
+
}
|
1158
|
+
throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(params['hostname'])));
|
1159
|
+
case 32:
|
1160
|
+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
1161
|
+
_context7.next = 34;
|
1162
|
+
break;
|
1163
|
+
}
|
1164
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
|
1165
|
+
case 34:
|
1166
|
+
if (!(params['max_connections'] && !(0, _utils.isInt)(params['max_connections']))) {
|
1167
|
+
_context7.next = 36;
|
1168
|
+
break;
|
1169
|
+
}
|
1170
|
+
throw new errors.InvalidParameterError("Bad parameter: max_connections must be of type Int, received ".concat((0, _utils.getType)(params['max_connections'])));
|
1171
|
+
case 36:
|
1172
|
+
if (!(params['port'] && !(0, _utils.isInt)(params['port']))) {
|
1173
|
+
_context7.next = 38;
|
1174
|
+
break;
|
1175
|
+
}
|
1176
|
+
throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(params['port'])));
|
1177
|
+
case 38:
|
1178
|
+
if (!(params['s3_bucket'] && !(0, _utils.isString)(params['s3_bucket']))) {
|
1179
|
+
_context7.next = 40;
|
1180
|
+
break;
|
1181
|
+
}
|
1182
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(params['s3_bucket'])));
|
1183
|
+
case 40:
|
1184
|
+
if (!(params['s3_region'] && !(0, _utils.isString)(params['s3_region']))) {
|
1185
|
+
_context7.next = 42;
|
1186
|
+
break;
|
1187
|
+
}
|
1188
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(params['s3_region'])));
|
1189
|
+
case 42:
|
1190
|
+
if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
|
1191
|
+
_context7.next = 44;
|
1192
|
+
break;
|
1193
|
+
}
|
1194
|
+
throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params['server_certificate'])));
|
1195
|
+
case 44:
|
1196
|
+
if (!(params['server_host_key'] && !(0, _utils.isString)(params['server_host_key']))) {
|
1197
|
+
_context7.next = 46;
|
1198
|
+
break;
|
1199
|
+
}
|
1200
|
+
throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(params['server_host_key'])));
|
1201
|
+
case 46:
|
1202
|
+
if (!(params['server_type'] && !(0, _utils.isString)(params['server_type']))) {
|
1203
|
+
_context7.next = 48;
|
1204
|
+
break;
|
1205
|
+
}
|
1206
|
+
throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(params['server_type'])));
|
1207
|
+
case 48:
|
1208
|
+
if (!(params['ssl'] && !(0, _utils.isString)(params['ssl']))) {
|
1209
|
+
_context7.next = 50;
|
1210
|
+
break;
|
1211
|
+
}
|
1212
|
+
throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(params['ssl'])));
|
1213
|
+
case 50:
|
1214
|
+
if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
|
1215
|
+
_context7.next = 52;
|
1216
|
+
break;
|
1217
|
+
}
|
1218
|
+
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params['username'])));
|
1219
|
+
case 52:
|
1220
|
+
if (!(params['google_cloud_storage_bucket'] && !(0, _utils.isString)(params['google_cloud_storage_bucket']))) {
|
1221
|
+
_context7.next = 54;
|
1222
|
+
break;
|
1223
|
+
}
|
1224
|
+
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_bucket must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_bucket'])));
|
1225
|
+
case 54:
|
1226
|
+
if (!(params['google_cloud_storage_project_id'] && !(0, _utils.isString)(params['google_cloud_storage_project_id']))) {
|
1227
|
+
_context7.next = 56;
|
1228
|
+
break;
|
1229
|
+
}
|
1230
|
+
throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_project_id must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_project_id'])));
|
1231
|
+
case 56:
|
1232
|
+
if (!(params['backblaze_b2_bucket'] && !(0, _utils.isString)(params['backblaze_b2_bucket']))) {
|
1233
|
+
_context7.next = 58;
|
1234
|
+
break;
|
1235
|
+
}
|
1236
|
+
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_bucket must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_bucket'])));
|
1237
|
+
case 58:
|
1238
|
+
if (!(params['backblaze_b2_s3_endpoint'] && !(0, _utils.isString)(params['backblaze_b2_s3_endpoint']))) {
|
1239
|
+
_context7.next = 60;
|
1240
|
+
break;
|
1241
|
+
}
|
1242
|
+
throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_s3_endpoint must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_s3_endpoint'])));
|
1243
|
+
case 60:
|
1244
|
+
if (!(params['wasabi_bucket'] && !(0, _utils.isString)(params['wasabi_bucket']))) {
|
1245
|
+
_context7.next = 62;
|
1246
|
+
break;
|
1247
|
+
}
|
1248
|
+
throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(params['wasabi_bucket'])));
|
1249
|
+
case 62:
|
1250
|
+
if (!(params['wasabi_region'] && !(0, _utils.isString)(params['wasabi_region']))) {
|
1251
|
+
_context7.next = 64;
|
1252
|
+
break;
|
1253
|
+
}
|
1254
|
+
throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(params['wasabi_region'])));
|
1255
|
+
case 64:
|
1256
|
+
if (!(params['rackspace_username'] && !(0, _utils.isString)(params['rackspace_username']))) {
|
1257
|
+
_context7.next = 66;
|
1258
|
+
break;
|
1259
|
+
}
|
1260
|
+
throw new errors.InvalidParameterError("Bad parameter: rackspace_username must be of type String, received ".concat((0, _utils.getType)(params['rackspace_username'])));
|
1261
|
+
case 66:
|
1262
|
+
if (!(params['rackspace_region'] && !(0, _utils.isString)(params['rackspace_region']))) {
|
1263
|
+
_context7.next = 68;
|
1264
|
+
break;
|
1265
|
+
}
|
1266
|
+
throw new errors.InvalidParameterError("Bad parameter: rackspace_region must be of type String, received ".concat((0, _utils.getType)(params['rackspace_region'])));
|
1267
|
+
case 68:
|
1268
|
+
if (!(params['rackspace_container'] && !(0, _utils.isString)(params['rackspace_container']))) {
|
1269
|
+
_context7.next = 70;
|
1270
|
+
break;
|
1271
|
+
}
|
1272
|
+
throw new errors.InvalidParameterError("Bad parameter: rackspace_container must be of type String, received ".concat((0, _utils.getType)(params['rackspace_container'])));
|
1273
|
+
case 70:
|
1274
|
+
if (!(params['one_drive_account_type'] && !(0, _utils.isString)(params['one_drive_account_type']))) {
|
1275
|
+
_context7.next = 72;
|
1276
|
+
break;
|
1277
|
+
}
|
1278
|
+
throw new errors.InvalidParameterError("Bad parameter: one_drive_account_type must be of type String, received ".concat((0, _utils.getType)(params['one_drive_account_type'])));
|
1279
|
+
case 72:
|
1280
|
+
if (!(params['azure_blob_storage_account'] && !(0, _utils.isString)(params['azure_blob_storage_account']))) {
|
1281
|
+
_context7.next = 74;
|
1282
|
+
break;
|
1283
|
+
}
|
1284
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_account must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_account'])));
|
1285
|
+
case 74:
|
1286
|
+
if (!(params['azure_blob_storage_container'] && !(0, _utils.isString)(params['azure_blob_storage_container']))) {
|
1287
|
+
_context7.next = 76;
|
1288
|
+
break;
|
1289
|
+
}
|
1290
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_container'])));
|
1291
|
+
case 76:
|
1292
|
+
if (!(params['azure_blob_storage_sas_token'] && !(0, _utils.isString)(params['azure_blob_storage_sas_token']))) {
|
1293
|
+
_context7.next = 78;
|
1294
|
+
break;
|
1295
|
+
}
|
1296
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_sas_token'])));
|
1297
|
+
case 78:
|
1298
|
+
if (!(params['azure_files_storage_account'] && !(0, _utils.isString)(params['azure_files_storage_account']))) {
|
1299
|
+
_context7.next = 80;
|
1300
|
+
break;
|
1301
|
+
}
|
1302
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_account must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_account'])));
|
1303
|
+
case 80:
|
1304
|
+
if (!(params['azure_files_storage_share_name'] && !(0, _utils.isString)(params['azure_files_storage_share_name']))) {
|
1305
|
+
_context7.next = 82;
|
1306
|
+
break;
|
1307
|
+
}
|
1308
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_share_name'])));
|
1309
|
+
case 82:
|
1310
|
+
if (!(params['azure_files_storage_sas_token'] && !(0, _utils.isString)(params['azure_files_storage_sas_token']))) {
|
1311
|
+
_context7.next = 84;
|
1312
|
+
break;
|
1313
|
+
}
|
1314
|
+
throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_sas_token'])));
|
1315
|
+
case 84:
|
1316
|
+
if (!(params['s3_compatible_bucket'] && !(0, _utils.isString)(params['s3_compatible_bucket']))) {
|
1317
|
+
_context7.next = 86;
|
1318
|
+
break;
|
1319
|
+
}
|
1320
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_bucket'])));
|
1321
|
+
case 86:
|
1322
|
+
if (!(params['s3_compatible_endpoint'] && !(0, _utils.isString)(params['s3_compatible_endpoint']))) {
|
1323
|
+
_context7.next = 88;
|
1324
|
+
break;
|
1325
|
+
}
|
1326
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_endpoint'])));
|
1327
|
+
case 88:
|
1328
|
+
if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
|
1329
|
+
_context7.next = 90;
|
1330
|
+
break;
|
1331
|
+
}
|
1332
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_region'])));
|
1333
|
+
case 90:
|
1334
|
+
if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
|
1335
|
+
_context7.next = 92;
|
1336
|
+
break;
|
1337
|
+
}
|
1338
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_access_key'])));
|
1339
|
+
case 92:
|
1340
|
+
if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
|
1341
|
+
_context7.next = 94;
|
1342
|
+
break;
|
1343
|
+
}
|
1344
|
+
throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_secret_key'])));
|
1345
|
+
case 94:
|
1346
|
+
if (!(params['files_agent_root'] && !(0, _utils.isString)(params['files_agent_root']))) {
|
1347
|
+
_context7.next = 96;
|
1348
|
+
break;
|
1349
|
+
}
|
1350
|
+
throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(params['files_agent_root'])));
|
1351
|
+
case 96:
|
1352
|
+
if (!(params['files_agent_permission_set'] && !(0, _utils.isString)(params['files_agent_permission_set']))) {
|
1353
|
+
_context7.next = 98;
|
1354
|
+
break;
|
1355
|
+
}
|
1356
|
+
throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(params['files_agent_permission_set'])));
|
1357
|
+
case 98:
|
1358
|
+
_context7.next = 100;
|
1359
|
+
return _Api.default.sendRequest("/remote_servers", 'POST', params, options);
|
1360
|
+
case 100:
|
1361
|
+
response = _context7.sent;
|
1362
|
+
return _context7.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
|
1363
|
+
case 102:
|
1364
|
+
case "end":
|
1365
|
+
return _context7.stop();
|
1380
1366
|
}
|
1381
1367
|
}, _callee7);
|
1382
1368
|
})));
|