files.com 1.2.249 → 1.2.250

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/_VERSION +1 -1
  2. package/lib/Api.js +72 -71
  3. package/lib/Files.js +1 -1
  4. package/lib/isomorphic/File.node.js +5 -5
  5. package/lib/models/ActionNotificationExport.js +38 -38
  6. package/lib/models/ActionNotificationExportResult.js +14 -14
  7. package/lib/models/ApiKey.js +100 -100
  8. package/lib/models/ApiRequestLog.js +8 -8
  9. package/lib/models/App.js +8 -8
  10. package/lib/models/As2IncomingMessage.js +10 -10
  11. package/lib/models/As2OutgoingMessage.js +10 -10
  12. package/lib/models/As2Partner.js +101 -101
  13. package/lib/models/As2Station.js +81 -81
  14. package/lib/models/Automation.js +167 -167
  15. package/lib/models/AutomationLog.js +8 -8
  16. package/lib/models/AutomationRun.js +24 -24
  17. package/lib/models/BandwidthSnapshot.js +8 -8
  18. package/lib/models/Behavior.js +106 -106
  19. package/lib/models/Bundle.js +143 -143
  20. package/lib/models/BundleAction.js +10 -10
  21. package/lib/models/BundleDownload.js +12 -12
  22. package/lib/models/BundleNotification.js +69 -69
  23. package/lib/models/BundleRecipient.js +40 -40
  24. package/lib/models/BundleRegistration.js +12 -12
  25. package/lib/models/Clickwrap.js +79 -79
  26. package/lib/models/DnsRecord.js +8 -8
  27. package/lib/models/EmailIncomingMessage.js +8 -8
  28. package/lib/models/EmailLog.js +8 -8
  29. package/lib/models/ExavaultApiRequestLog.js +8 -8
  30. package/lib/models/ExternalEvent.js +36 -36
  31. package/lib/models/File.js +269 -269
  32. package/lib/models/FileComment.js +70 -70
  33. package/lib/models/FileCommentReaction.js +34 -34
  34. package/lib/models/FileMigration.js +10 -10
  35. package/lib/models/FileMigrationLog.js +8 -8
  36. package/lib/models/Folder.js +36 -36
  37. package/lib/models/FormFieldSet.js +71 -71
  38. package/lib/models/FtpActionLog.js +8 -8
  39. package/lib/models/GpgKey.js +81 -81
  40. package/lib/models/Group.js +83 -83
  41. package/lib/models/GroupUser.js +89 -89
  42. package/lib/models/History.js +88 -88
  43. package/lib/models/HistoryExport.js +64 -64
  44. package/lib/models/HistoryExportResult.js +14 -14
  45. package/lib/models/InboxRecipient.js +36 -36
  46. package/lib/models/InboxRegistration.js +10 -10
  47. package/lib/models/InboxUpload.js +8 -8
  48. package/lib/models/Invoice.js +18 -18
  49. package/lib/models/IpAddress.js +32 -32
  50. package/lib/models/Lock.js +51 -51
  51. package/lib/models/Message.js +100 -100
  52. package/lib/models/MessageComment.js +78 -78
  53. package/lib/models/MessageCommentReaction.js +54 -54
  54. package/lib/models/MessageReaction.js +54 -54
  55. package/lib/models/Notification.js +91 -91
  56. package/lib/models/OutboundConnectionLog.js +8 -8
  57. package/lib/models/Payment.js +18 -18
  58. package/lib/models/Permission.js +54 -54
  59. package/lib/models/Priority.js +14 -14
  60. package/lib/models/Project.js +70 -70
  61. package/lib/models/PublicHostingRequestLog.js +8 -8
  62. package/lib/models/PublicKey.js +78 -78
  63. package/lib/models/RemoteBandwidthSnapshot.js +8 -8
  64. package/lib/models/RemoteServer.js +362 -362
  65. package/lib/models/Request.js +60 -60
  66. package/lib/models/Restore.js +24 -24
  67. package/lib/models/Session.js +21 -21
  68. package/lib/models/SettingsChange.js +8 -8
  69. package/lib/models/SftpActionLog.js +8 -8
  70. package/lib/models/SftpHostKey.js +67 -67
  71. package/lib/models/ShareGroup.js +79 -79
  72. package/lib/models/SiemHttpDestination.js +158 -158
  73. package/lib/models/Site.js +150 -150
  74. package/lib/models/Snapshot.js +85 -85
  75. package/lib/models/SsoStrategy.js +32 -32
  76. package/lib/models/Style.js +48 -48
  77. package/lib/models/SyncLog.js +8 -8
  78. package/lib/models/UsageDailySnapshot.js +8 -8
  79. package/lib/models/UsageSnapshot.js +8 -8
  80. package/lib/models/User.js +215 -215
  81. package/lib/models/UserCipherUse.js +10 -10
  82. package/lib/models/UserLifecycleRule.js +92 -92
  83. package/lib/models/UserRequest.js +56 -56
  84. package/lib/models/UserSftpClientUse.js +10 -10
  85. package/lib/models/WebDavActionLog.js +8 -8
  86. package/lib/models/WebhookTest.js +24 -24
  87. package/package.json +1 -1
  88. package/src/Files.js +1 -1
@@ -565,46 +565,46 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
565
565
  (0, _defineProperty2.default)(this, "unlock", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
566
566
  var params,
567
567
  _args = arguments;
568
- return _regenerator.default.wrap(function _callee$(_context) {
568
+ return _regenerator.default.wrap(function (_context) {
569
569
  while (1) switch (_context.prev = _context.next) {
570
570
  case 0:
571
571
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
572
572
  if (_this.attributes.id) {
573
- _context.next = 3;
573
+ _context.next = 1;
574
574
  break;
575
575
  }
576
576
  throw new errors.EmptyPropertyError('Current object has no id');
577
- case 3:
577
+ case 1:
578
578
  if ((0, _utils.isObject)(params)) {
579
- _context.next = 5;
579
+ _context.next = 2;
580
580
  break;
581
581
  }
582
582
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
583
- case 5:
583
+ case 2:
584
584
  params.id = _this.attributes.id;
585
585
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
586
- _context.next = 8;
586
+ _context.next = 3;
587
587
  break;
588
588
  }
589
589
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
590
- case 8:
590
+ case 3:
591
591
  if (params.id) {
592
- _context.next = 14;
592
+ _context.next = 5;
593
593
  break;
594
594
  }
595
595
  if (!_this.attributes.id) {
596
- _context.next = 13;
596
+ _context.next = 4;
597
597
  break;
598
598
  }
599
599
  params.id = _this.id;
600
- _context.next = 14;
600
+ _context.next = 5;
601
601
  break;
602
- case 13:
602
+ case 4:
603
603
  throw new errors.MissingParameterError('Parameter missing: id');
604
- case 14:
605
- _context.next = 16;
604
+ case 5:
605
+ _context.next = 6;
606
606
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id), "/unlock"), 'POST', params, _this.options);
607
- case 16:
607
+ case 6:
608
608
  case "end":
609
609
  return _context.stop();
610
610
  }
@@ -614,46 +614,46 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
614
614
  (0, _defineProperty2.default)(this, "resendWelcomeEmail", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
615
615
  var params,
616
616
  _args2 = arguments;
617
- return _regenerator.default.wrap(function _callee2$(_context2) {
617
+ return _regenerator.default.wrap(function (_context2) {
618
618
  while (1) switch (_context2.prev = _context2.next) {
619
619
  case 0:
620
620
  params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
621
621
  if (_this.attributes.id) {
622
- _context2.next = 3;
622
+ _context2.next = 1;
623
623
  break;
624
624
  }
625
625
  throw new errors.EmptyPropertyError('Current object has no id');
626
- case 3:
626
+ case 1:
627
627
  if ((0, _utils.isObject)(params)) {
628
- _context2.next = 5;
628
+ _context2.next = 2;
629
629
  break;
630
630
  }
631
631
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
632
- case 5:
632
+ case 2:
633
633
  params.id = _this.attributes.id;
634
634
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
635
- _context2.next = 8;
635
+ _context2.next = 3;
636
636
  break;
637
637
  }
638
638
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
639
- case 8:
639
+ case 3:
640
640
  if (params.id) {
641
- _context2.next = 14;
641
+ _context2.next = 5;
642
642
  break;
643
643
  }
644
644
  if (!_this.attributes.id) {
645
- _context2.next = 13;
645
+ _context2.next = 4;
646
646
  break;
647
647
  }
648
648
  params.id = _this.id;
649
- _context2.next = 14;
649
+ _context2.next = 5;
650
650
  break;
651
- case 13:
651
+ case 4:
652
652
  throw new errors.MissingParameterError('Parameter missing: id');
653
- case 14:
654
- _context2.next = 16;
653
+ case 5:
654
+ _context2.next = 6;
655
655
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id), "/resend_welcome_email"), 'POST', params, _this.options);
656
- case 16:
656
+ case 6:
657
657
  case "end":
658
658
  return _context2.stop();
659
659
  }
@@ -663,46 +663,46 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
663
663
  (0, _defineProperty2.default)(this, "user2faReset", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
664
664
  var params,
665
665
  _args3 = arguments;
666
- return _regenerator.default.wrap(function _callee3$(_context3) {
666
+ return _regenerator.default.wrap(function (_context3) {
667
667
  while (1) switch (_context3.prev = _context3.next) {
668
668
  case 0:
669
669
  params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
670
670
  if (_this.attributes.id) {
671
- _context3.next = 3;
671
+ _context3.next = 1;
672
672
  break;
673
673
  }
674
674
  throw new errors.EmptyPropertyError('Current object has no id');
675
- case 3:
675
+ case 1:
676
676
  if ((0, _utils.isObject)(params)) {
677
- _context3.next = 5;
677
+ _context3.next = 2;
678
678
  break;
679
679
  }
680
680
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
681
- case 5:
681
+ case 2:
682
682
  params.id = _this.attributes.id;
683
683
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
684
- _context3.next = 8;
684
+ _context3.next = 3;
685
685
  break;
686
686
  }
687
687
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
688
- case 8:
688
+ case 3:
689
689
  if (params.id) {
690
- _context3.next = 14;
690
+ _context3.next = 5;
691
691
  break;
692
692
  }
693
693
  if (!_this.attributes.id) {
694
- _context3.next = 13;
694
+ _context3.next = 4;
695
695
  break;
696
696
  }
697
697
  params.id = _this.id;
698
- _context3.next = 14;
698
+ _context3.next = 5;
699
699
  break;
700
- case 13:
700
+ case 4:
701
701
  throw new errors.MissingParameterError('Parameter missing: id');
702
- case 14:
703
- _context3.next = 16;
702
+ case 5:
703
+ _context3.next = 6;
704
704
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id), "/2fa/reset"), 'POST', params, _this.options);
705
- case 16:
705
+ case 6:
706
706
  case "end":
707
707
  return _context3.stop();
708
708
  }
@@ -760,211 +760,211 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
760
760
  var params,
761
761
  response,
762
762
  _args4 = arguments;
763
- return _regenerator.default.wrap(function _callee4$(_context4) {
763
+ return _regenerator.default.wrap(function (_context4) {
764
764
  while (1) switch (_context4.prev = _context4.next) {
765
765
  case 0:
766
766
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
767
767
  if (_this.attributes.id) {
768
- _context4.next = 3;
768
+ _context4.next = 1;
769
769
  break;
770
770
  }
771
771
  throw new errors.EmptyPropertyError('Current object has no id');
772
- case 3:
772
+ case 1:
773
773
  if ((0, _utils.isObject)(params)) {
774
- _context4.next = 5;
774
+ _context4.next = 2;
775
775
  break;
776
776
  }
777
777
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
778
- case 5:
778
+ case 2:
779
779
  params.id = _this.attributes.id;
780
780
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
781
- _context4.next = 8;
781
+ _context4.next = 3;
782
782
  break;
783
783
  }
784
784
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
785
- case 8:
785
+ case 3:
786
786
  if (!(params.change_password && !(0, _utils.isString)(params.change_password))) {
787
- _context4.next = 10;
787
+ _context4.next = 4;
788
788
  break;
789
789
  }
790
790
  throw new errors.InvalidParameterError("Bad parameter: change_password must be of type String, received ".concat((0, _utils.getType)(params.change_password)));
791
- case 10:
791
+ case 4:
792
792
  if (!(params.change_password_confirmation && !(0, _utils.isString)(params.change_password_confirmation))) {
793
- _context4.next = 12;
793
+ _context4.next = 5;
794
794
  break;
795
795
  }
796
796
  throw new errors.InvalidParameterError("Bad parameter: change_password_confirmation must be of type String, received ".concat((0, _utils.getType)(params.change_password_confirmation)));
797
- case 12:
797
+ case 5:
798
798
  if (!(params.email && !(0, _utils.isString)(params.email))) {
799
- _context4.next = 14;
799
+ _context4.next = 6;
800
800
  break;
801
801
  }
802
802
  throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params.email)));
803
- case 14:
803
+ case 6:
804
804
  if (!(params.grant_permission && !(0, _utils.isString)(params.grant_permission))) {
805
- _context4.next = 16;
805
+ _context4.next = 7;
806
806
  break;
807
807
  }
808
808
  throw new errors.InvalidParameterError("Bad parameter: grant_permission must be of type String, received ".concat((0, _utils.getType)(params.grant_permission)));
809
- case 16:
809
+ case 7:
810
810
  if (!(params.group_id && !(0, _utils.isInt)(params.group_id))) {
811
- _context4.next = 18;
811
+ _context4.next = 8;
812
812
  break;
813
813
  }
814
814
  throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params.group_id)));
815
- case 18:
815
+ case 8:
816
816
  if (!(params.group_ids && !(0, _utils.isString)(params.group_ids))) {
817
- _context4.next = 20;
817
+ _context4.next = 9;
818
818
  break;
819
819
  }
820
820
  throw new errors.InvalidParameterError("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(params.group_ids)));
821
- case 20:
821
+ case 9:
822
822
  if (!(params.imported_password_hash && !(0, _utils.isString)(params.imported_password_hash))) {
823
- _context4.next = 22;
823
+ _context4.next = 10;
824
824
  break;
825
825
  }
826
826
  throw new errors.InvalidParameterError("Bad parameter: imported_password_hash must be of type String, received ".concat((0, _utils.getType)(params.imported_password_hash)));
827
- case 22:
827
+ case 10:
828
828
  if (!(params.password && !(0, _utils.isString)(params.password))) {
829
- _context4.next = 24;
829
+ _context4.next = 11;
830
830
  break;
831
831
  }
832
832
  throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params.password)));
833
- case 24:
833
+ case 11:
834
834
  if (!(params.password_confirmation && !(0, _utils.isString)(params.password_confirmation))) {
835
- _context4.next = 26;
835
+ _context4.next = 12;
836
836
  break;
837
837
  }
838
838
  throw new errors.InvalidParameterError("Bad parameter: password_confirmation must be of type String, received ".concat((0, _utils.getType)(params.password_confirmation)));
839
- case 26:
839
+ case 12:
840
840
  if (!(params.allowed_ips && !(0, _utils.isString)(params.allowed_ips))) {
841
- _context4.next = 28;
841
+ _context4.next = 13;
842
842
  break;
843
843
  }
844
844
  throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params.allowed_ips)));
845
- case 28:
845
+ case 13:
846
846
  if (!(params.authenticate_until && !(0, _utils.isString)(params.authenticate_until))) {
847
- _context4.next = 30;
847
+ _context4.next = 14;
848
848
  break;
849
849
  }
850
850
  throw new errors.InvalidParameterError("Bad parameter: authenticate_until must be of type String, received ".concat((0, _utils.getType)(params.authenticate_until)));
851
- case 30:
851
+ case 14:
852
852
  if (!(params.authentication_method && !(0, _utils.isString)(params.authentication_method))) {
853
- _context4.next = 32;
853
+ _context4.next = 15;
854
854
  break;
855
855
  }
856
856
  throw new errors.InvalidParameterError("Bad parameter: authentication_method must be of type String, received ".concat((0, _utils.getType)(params.authentication_method)));
857
- case 32:
857
+ case 15:
858
858
  if (!(params.header_text && !(0, _utils.isString)(params.header_text))) {
859
- _context4.next = 34;
859
+ _context4.next = 16;
860
860
  break;
861
861
  }
862
862
  throw new errors.InvalidParameterError("Bad parameter: header_text must be of type String, received ".concat((0, _utils.getType)(params.header_text)));
863
- case 34:
863
+ case 16:
864
864
  if (!(params.language && !(0, _utils.isString)(params.language))) {
865
- _context4.next = 36;
865
+ _context4.next = 17;
866
866
  break;
867
867
  }
868
868
  throw new errors.InvalidParameterError("Bad parameter: language must be of type String, received ".concat((0, _utils.getType)(params.language)));
869
- case 36:
869
+ case 17:
870
870
  if (!(params.notification_daily_send_time && !(0, _utils.isInt)(params.notification_daily_send_time))) {
871
- _context4.next = 38;
871
+ _context4.next = 18;
872
872
  break;
873
873
  }
874
874
  throw new errors.InvalidParameterError("Bad parameter: notification_daily_send_time must be of type Int, received ".concat((0, _utils.getType)(params.notification_daily_send_time)));
875
- case 38:
875
+ case 18:
876
876
  if (!(params.name && !(0, _utils.isString)(params.name))) {
877
- _context4.next = 40;
877
+ _context4.next = 19;
878
878
  break;
879
879
  }
880
880
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
881
- case 40:
881
+ case 19:
882
882
  if (!(params.company && !(0, _utils.isString)(params.company))) {
883
- _context4.next = 42;
883
+ _context4.next = 20;
884
884
  break;
885
885
  }
886
886
  throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
887
- case 42:
887
+ case 20:
888
888
  if (!(params.notes && !(0, _utils.isString)(params.notes))) {
889
- _context4.next = 44;
889
+ _context4.next = 21;
890
890
  break;
891
891
  }
892
892
  throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params.notes)));
893
- case 44:
893
+ case 21:
894
894
  if (!(params.password_validity_days && !(0, _utils.isInt)(params.password_validity_days))) {
895
- _context4.next = 46;
895
+ _context4.next = 22;
896
896
  break;
897
897
  }
898
898
  throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params.password_validity_days)));
899
- case 46:
899
+ case 22:
900
900
  if (!(params.require_login_by && !(0, _utils.isString)(params.require_login_by))) {
901
- _context4.next = 48;
901
+ _context4.next = 23;
902
902
  break;
903
903
  }
904
904
  throw new errors.InvalidParameterError("Bad parameter: require_login_by must be of type String, received ".concat((0, _utils.getType)(params.require_login_by)));
905
- case 48:
905
+ case 23:
906
906
  if (!(params.ssl_required && !(0, _utils.isString)(params.ssl_required))) {
907
- _context4.next = 50;
907
+ _context4.next = 24;
908
908
  break;
909
909
  }
910
910
  throw new errors.InvalidParameterError("Bad parameter: ssl_required must be of type String, received ".concat((0, _utils.getType)(params.ssl_required)));
911
- case 50:
911
+ case 24:
912
912
  if (!(params.sso_strategy_id && !(0, _utils.isInt)(params.sso_strategy_id))) {
913
- _context4.next = 52;
913
+ _context4.next = 25;
914
914
  break;
915
915
  }
916
916
  throw new errors.InvalidParameterError("Bad parameter: sso_strategy_id must be of type Int, received ".concat((0, _utils.getType)(params.sso_strategy_id)));
917
- case 52:
917
+ case 25:
918
918
  if (!(params.require_2fa && !(0, _utils.isString)(params.require_2fa))) {
919
- _context4.next = 54;
919
+ _context4.next = 26;
920
920
  break;
921
921
  }
922
922
  throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params.require_2fa)));
923
- case 54:
923
+ case 26:
924
924
  if (!(params.time_zone && !(0, _utils.isString)(params.time_zone))) {
925
- _context4.next = 56;
925
+ _context4.next = 27;
926
926
  break;
927
927
  }
928
928
  throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params.time_zone)));
929
- case 56:
929
+ case 27:
930
930
  if (!(params.user_root && !(0, _utils.isString)(params.user_root))) {
931
- _context4.next = 58;
931
+ _context4.next = 28;
932
932
  break;
933
933
  }
934
934
  throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
935
- case 58:
935
+ case 28:
936
936
  if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
937
- _context4.next = 60;
937
+ _context4.next = 29;
938
938
  break;
939
939
  }
940
940
  throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
941
- case 60:
941
+ case 29:
942
942
  if (!(params.username && !(0, _utils.isString)(params.username))) {
943
- _context4.next = 62;
943
+ _context4.next = 30;
944
944
  break;
945
945
  }
946
946
  throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
947
- case 62:
947
+ case 30:
948
948
  if (params.id) {
949
- _context4.next = 68;
949
+ _context4.next = 32;
950
950
  break;
951
951
  }
952
952
  if (!_this.attributes.id) {
953
- _context4.next = 67;
953
+ _context4.next = 31;
954
954
  break;
955
955
  }
956
956
  params.id = _this.id;
957
- _context4.next = 68;
957
+ _context4.next = 32;
958
958
  break;
959
- case 67:
959
+ case 31:
960
960
  throw new errors.MissingParameterError('Parameter missing: id');
961
- case 68:
962
- _context4.next = 70;
961
+ case 32:
962
+ _context4.next = 33;
963
963
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
964
- case 70:
964
+ case 33:
965
965
  response = _context4.sent;
966
966
  return _context4.abrupt("return", new User(response === null || response === void 0 ? void 0 : response.data, _this.options));
967
- case 72:
967
+ case 34:
968
968
  case "end":
969
969
  return _context4.stop();
970
970
  }
@@ -973,46 +973,46 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
973
973
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
974
974
  var params,
975
975
  _args5 = arguments;
976
- return _regenerator.default.wrap(function _callee5$(_context5) {
976
+ return _regenerator.default.wrap(function (_context5) {
977
977
  while (1) switch (_context5.prev = _context5.next) {
978
978
  case 0:
979
979
  params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
980
980
  if (_this.attributes.id) {
981
- _context5.next = 3;
981
+ _context5.next = 1;
982
982
  break;
983
983
  }
984
984
  throw new errors.EmptyPropertyError('Current object has no id');
985
- case 3:
985
+ case 1:
986
986
  if ((0, _utils.isObject)(params)) {
987
- _context5.next = 5;
987
+ _context5.next = 2;
988
988
  break;
989
989
  }
990
990
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
991
- case 5:
991
+ case 2:
992
992
  params.id = _this.attributes.id;
993
993
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
994
- _context5.next = 8;
994
+ _context5.next = 3;
995
995
  break;
996
996
  }
997
997
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
998
- case 8:
998
+ case 3:
999
999
  if (params.id) {
1000
- _context5.next = 14;
1000
+ _context5.next = 5;
1001
1001
  break;
1002
1002
  }
1003
1003
  if (!_this.attributes.id) {
1004
- _context5.next = 13;
1004
+ _context5.next = 4;
1005
1005
  break;
1006
1006
  }
1007
1007
  params.id = _this.id;
1008
- _context5.next = 14;
1008
+ _context5.next = 5;
1009
1009
  break;
1010
- case 13:
1010
+ case 4:
1011
1011
  throw new errors.MissingParameterError('Parameter missing: id');
1012
- case 14:
1013
- _context5.next = 16;
1012
+ case 5:
1013
+ _context5.next = 6;
1014
1014
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
1015
- case 16:
1015
+ case 6:
1016
1016
  case "end":
1017
1017
  return _context5.stop();
1018
1018
  }
@@ -1024,27 +1024,27 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
1024
1024
  });
1025
1025
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
1026
1026
  var _newObject, newObject;
1027
- return _regenerator.default.wrap(function _callee6$(_context6) {
1027
+ return _regenerator.default.wrap(function (_context6) {
1028
1028
  while (1) switch (_context6.prev = _context6.next) {
1029
1029
  case 0:
1030
1030
  if (!_this.attributes.id) {
1031
- _context6.next = 6;
1031
+ _context6.next = 2;
1032
1032
  break;
1033
1033
  }
1034
- _context6.next = 3;
1034
+ _context6.next = 1;
1035
1035
  return _this.update(_this.attributes);
1036
- case 3:
1036
+ case 1:
1037
1037
  _newObject = _context6.sent;
1038
1038
  _this.attributes = _objectSpread({}, _newObject.attributes);
1039
1039
  return _context6.abrupt("return", true);
1040
- case 6:
1041
- _context6.next = 8;
1040
+ case 2:
1041
+ _context6.next = 3;
1042
1042
  return User.create(_this.attributes, _this.options);
1043
- case 8:
1043
+ case 3:
1044
1044
  newObject = _context6.sent;
1045
1045
  _this.attributes = _objectSpread({}, newObject.attributes);
1046
1046
  return _context6.abrupt("return", true);
1047
- case 11:
1047
+ case 4:
1048
1048
  case "end":
1049
1049
  return _context6.stop();
1050
1050
  }
@@ -1083,43 +1083,43 @@ _User = User;
1083
1083
  options,
1084
1084
  response,
1085
1085
  _args7 = arguments;
1086
- return _regenerator.default.wrap(function _callee7$(_context7) {
1086
+ return _regenerator.default.wrap(function (_context7) {
1087
1087
  while (1) switch (_context7.prev = _context7.next) {
1088
1088
  case 0:
1089
1089
  params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
1090
1090
  options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
1091
1091
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
1092
- _context7.next = 4;
1092
+ _context7.next = 1;
1093
1093
  break;
1094
1094
  }
1095
1095
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
1096
- case 4:
1096
+ case 1:
1097
1097
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
1098
- _context7.next = 6;
1098
+ _context7.next = 2;
1099
1099
  break;
1100
1100
  }
1101
1101
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
1102
- case 6:
1102
+ case 2:
1103
1103
  if (!(params.ids && !(0, _utils.isString)(params.ids))) {
1104
- _context7.next = 8;
1104
+ _context7.next = 3;
1105
1105
  break;
1106
1106
  }
1107
1107
  throw new errors.InvalidParameterError("Bad parameter: ids must be of type String, received ".concat((0, _utils.getType)(params.ids)));
1108
- case 8:
1108
+ case 3:
1109
1109
  if (!(params.search && !(0, _utils.isString)(params.search))) {
1110
- _context7.next = 10;
1110
+ _context7.next = 4;
1111
1111
  break;
1112
1112
  }
1113
1113
  throw new errors.InvalidParameterError("Bad parameter: search must be of type String, received ".concat((0, _utils.getType)(params.search)));
1114
- case 10:
1115
- _context7.next = 12;
1114
+ case 4:
1115
+ _context7.next = 5;
1116
1116
  return _Api.default.sendRequest('/users', 'GET', params, options);
1117
- case 12:
1117
+ case 5:
1118
1118
  response = _context7.sent;
1119
1119
  return _context7.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
1120
1120
  return new _User(obj, options);
1121
1121
  })) || []);
1122
- case 14:
1122
+ case 6:
1123
1123
  case "end":
1124
1124
  return _context7.stop();
1125
1125
  }
@@ -1138,36 +1138,36 @@ _User = User;
1138
1138
  options,
1139
1139
  response,
1140
1140
  _args8 = arguments;
1141
- return _regenerator.default.wrap(function _callee8$(_context8) {
1141
+ return _regenerator.default.wrap(function (_context8) {
1142
1142
  while (1) switch (_context8.prev = _context8.next) {
1143
1143
  case 0:
1144
1144
  params = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};
1145
1145
  options = _args8.length > 2 && _args8[2] !== undefined ? _args8[2] : {};
1146
1146
  if ((0, _utils.isObject)(params)) {
1147
- _context8.next = 4;
1147
+ _context8.next = 1;
1148
1148
  break;
1149
1149
  }
1150
1150
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
1151
- case 4:
1151
+ case 1:
1152
1152
  params.id = id;
1153
1153
  if (params.id) {
1154
- _context8.next = 7;
1154
+ _context8.next = 2;
1155
1155
  break;
1156
1156
  }
1157
1157
  throw new errors.MissingParameterError('Parameter missing: id');
1158
- case 7:
1158
+ case 2:
1159
1159
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
1160
- _context8.next = 9;
1160
+ _context8.next = 3;
1161
1161
  break;
1162
1162
  }
1163
1163
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
1164
- case 9:
1165
- _context8.next = 11;
1164
+ case 3:
1165
+ _context8.next = 4;
1166
1166
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'GET', params, options);
1167
- case 11:
1167
+ case 4:
1168
1168
  response = _context8.sent;
1169
1169
  return _context8.abrupt("return", new _User(response === null || response === void 0 ? void 0 : response.data, options));
1170
- case 13:
1170
+ case 5:
1171
1171
  case "end":
1172
1172
  return _context8.stop();
1173
1173
  }
@@ -1235,185 +1235,185 @@ _User = User;
1235
1235
  options,
1236
1236
  response,
1237
1237
  _args9 = arguments;
1238
- return _regenerator.default.wrap(function _callee9$(_context9) {
1238
+ return _regenerator.default.wrap(function (_context9) {
1239
1239
  while (1) switch (_context9.prev = _context9.next) {
1240
1240
  case 0:
1241
1241
  params = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
1242
1242
  options = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : {};
1243
1243
  if (params.username) {
1244
- _context9.next = 4;
1244
+ _context9.next = 1;
1245
1245
  break;
1246
1246
  }
1247
1247
  throw new errors.MissingParameterError('Parameter missing: username');
1248
- case 4:
1248
+ case 1:
1249
1249
  if (!(params.change_password && !(0, _utils.isString)(params.change_password))) {
1250
- _context9.next = 6;
1250
+ _context9.next = 2;
1251
1251
  break;
1252
1252
  }
1253
1253
  throw new errors.InvalidParameterError("Bad parameter: change_password must be of type String, received ".concat((0, _utils.getType)(params.change_password)));
1254
- case 6:
1254
+ case 2:
1255
1255
  if (!(params.change_password_confirmation && !(0, _utils.isString)(params.change_password_confirmation))) {
1256
- _context9.next = 8;
1256
+ _context9.next = 3;
1257
1257
  break;
1258
1258
  }
1259
1259
  throw new errors.InvalidParameterError("Bad parameter: change_password_confirmation must be of type String, received ".concat((0, _utils.getType)(params.change_password_confirmation)));
1260
- case 8:
1260
+ case 3:
1261
1261
  if (!(params.email && !(0, _utils.isString)(params.email))) {
1262
- _context9.next = 10;
1262
+ _context9.next = 4;
1263
1263
  break;
1264
1264
  }
1265
1265
  throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params.email)));
1266
- case 10:
1266
+ case 4:
1267
1267
  if (!(params.grant_permission && !(0, _utils.isString)(params.grant_permission))) {
1268
- _context9.next = 12;
1268
+ _context9.next = 5;
1269
1269
  break;
1270
1270
  }
1271
1271
  throw new errors.InvalidParameterError("Bad parameter: grant_permission must be of type String, received ".concat((0, _utils.getType)(params.grant_permission)));
1272
- case 12:
1272
+ case 5:
1273
1273
  if (!(params.group_id && !(0, _utils.isInt)(params.group_id))) {
1274
- _context9.next = 14;
1274
+ _context9.next = 6;
1275
1275
  break;
1276
1276
  }
1277
1277
  throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params.group_id)));
1278
- case 14:
1278
+ case 6:
1279
1279
  if (!(params.group_ids && !(0, _utils.isString)(params.group_ids))) {
1280
- _context9.next = 16;
1280
+ _context9.next = 7;
1281
1281
  break;
1282
1282
  }
1283
1283
  throw new errors.InvalidParameterError("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(params.group_ids)));
1284
- case 16:
1284
+ case 7:
1285
1285
  if (!(params.imported_password_hash && !(0, _utils.isString)(params.imported_password_hash))) {
1286
- _context9.next = 18;
1286
+ _context9.next = 8;
1287
1287
  break;
1288
1288
  }
1289
1289
  throw new errors.InvalidParameterError("Bad parameter: imported_password_hash must be of type String, received ".concat((0, _utils.getType)(params.imported_password_hash)));
1290
- case 18:
1290
+ case 8:
1291
1291
  if (!(params.password && !(0, _utils.isString)(params.password))) {
1292
- _context9.next = 20;
1292
+ _context9.next = 9;
1293
1293
  break;
1294
1294
  }
1295
1295
  throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params.password)));
1296
- case 20:
1296
+ case 9:
1297
1297
  if (!(params.password_confirmation && !(0, _utils.isString)(params.password_confirmation))) {
1298
- _context9.next = 22;
1298
+ _context9.next = 10;
1299
1299
  break;
1300
1300
  }
1301
1301
  throw new errors.InvalidParameterError("Bad parameter: password_confirmation must be of type String, received ".concat((0, _utils.getType)(params.password_confirmation)));
1302
- case 22:
1302
+ case 10:
1303
1303
  if (!(params.allowed_ips && !(0, _utils.isString)(params.allowed_ips))) {
1304
- _context9.next = 24;
1304
+ _context9.next = 11;
1305
1305
  break;
1306
1306
  }
1307
1307
  throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params.allowed_ips)));
1308
- case 24:
1308
+ case 11:
1309
1309
  if (!(params.authenticate_until && !(0, _utils.isString)(params.authenticate_until))) {
1310
- _context9.next = 26;
1310
+ _context9.next = 12;
1311
1311
  break;
1312
1312
  }
1313
1313
  throw new errors.InvalidParameterError("Bad parameter: authenticate_until must be of type String, received ".concat((0, _utils.getType)(params.authenticate_until)));
1314
- case 26:
1314
+ case 12:
1315
1315
  if (!(params.authentication_method && !(0, _utils.isString)(params.authentication_method))) {
1316
- _context9.next = 28;
1316
+ _context9.next = 13;
1317
1317
  break;
1318
1318
  }
1319
1319
  throw new errors.InvalidParameterError("Bad parameter: authentication_method must be of type String, received ".concat((0, _utils.getType)(params.authentication_method)));
1320
- case 28:
1320
+ case 13:
1321
1321
  if (!(params.header_text && !(0, _utils.isString)(params.header_text))) {
1322
- _context9.next = 30;
1322
+ _context9.next = 14;
1323
1323
  break;
1324
1324
  }
1325
1325
  throw new errors.InvalidParameterError("Bad parameter: header_text must be of type String, received ".concat((0, _utils.getType)(params.header_text)));
1326
- case 30:
1326
+ case 14:
1327
1327
  if (!(params.language && !(0, _utils.isString)(params.language))) {
1328
- _context9.next = 32;
1328
+ _context9.next = 15;
1329
1329
  break;
1330
1330
  }
1331
1331
  throw new errors.InvalidParameterError("Bad parameter: language must be of type String, received ".concat((0, _utils.getType)(params.language)));
1332
- case 32:
1332
+ case 15:
1333
1333
  if (!(params.notification_daily_send_time && !(0, _utils.isInt)(params.notification_daily_send_time))) {
1334
- _context9.next = 34;
1334
+ _context9.next = 16;
1335
1335
  break;
1336
1336
  }
1337
1337
  throw new errors.InvalidParameterError("Bad parameter: notification_daily_send_time must be of type Int, received ".concat((0, _utils.getType)(params.notification_daily_send_time)));
1338
- case 34:
1338
+ case 16:
1339
1339
  if (!(params.name && !(0, _utils.isString)(params.name))) {
1340
- _context9.next = 36;
1340
+ _context9.next = 17;
1341
1341
  break;
1342
1342
  }
1343
1343
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
1344
- case 36:
1344
+ case 17:
1345
1345
  if (!(params.company && !(0, _utils.isString)(params.company))) {
1346
- _context9.next = 38;
1346
+ _context9.next = 18;
1347
1347
  break;
1348
1348
  }
1349
1349
  throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
1350
- case 38:
1350
+ case 18:
1351
1351
  if (!(params.notes && !(0, _utils.isString)(params.notes))) {
1352
- _context9.next = 40;
1352
+ _context9.next = 19;
1353
1353
  break;
1354
1354
  }
1355
1355
  throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params.notes)));
1356
- case 40:
1356
+ case 19:
1357
1357
  if (!(params.password_validity_days && !(0, _utils.isInt)(params.password_validity_days))) {
1358
- _context9.next = 42;
1358
+ _context9.next = 20;
1359
1359
  break;
1360
1360
  }
1361
1361
  throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params.password_validity_days)));
1362
- case 42:
1362
+ case 20:
1363
1363
  if (!(params.require_login_by && !(0, _utils.isString)(params.require_login_by))) {
1364
- _context9.next = 44;
1364
+ _context9.next = 21;
1365
1365
  break;
1366
1366
  }
1367
1367
  throw new errors.InvalidParameterError("Bad parameter: require_login_by must be of type String, received ".concat((0, _utils.getType)(params.require_login_by)));
1368
- case 44:
1368
+ case 21:
1369
1369
  if (!(params.ssl_required && !(0, _utils.isString)(params.ssl_required))) {
1370
- _context9.next = 46;
1370
+ _context9.next = 22;
1371
1371
  break;
1372
1372
  }
1373
1373
  throw new errors.InvalidParameterError("Bad parameter: ssl_required must be of type String, received ".concat((0, _utils.getType)(params.ssl_required)));
1374
- case 46:
1374
+ case 22:
1375
1375
  if (!(params.sso_strategy_id && !(0, _utils.isInt)(params.sso_strategy_id))) {
1376
- _context9.next = 48;
1376
+ _context9.next = 23;
1377
1377
  break;
1378
1378
  }
1379
1379
  throw new errors.InvalidParameterError("Bad parameter: sso_strategy_id must be of type Int, received ".concat((0, _utils.getType)(params.sso_strategy_id)));
1380
- case 48:
1380
+ case 23:
1381
1381
  if (!(params.require_2fa && !(0, _utils.isString)(params.require_2fa))) {
1382
- _context9.next = 50;
1382
+ _context9.next = 24;
1383
1383
  break;
1384
1384
  }
1385
1385
  throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params.require_2fa)));
1386
- case 50:
1386
+ case 24:
1387
1387
  if (!(params.time_zone && !(0, _utils.isString)(params.time_zone))) {
1388
- _context9.next = 52;
1388
+ _context9.next = 25;
1389
1389
  break;
1390
1390
  }
1391
1391
  throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params.time_zone)));
1392
- case 52:
1392
+ case 25:
1393
1393
  if (!(params.user_root && !(0, _utils.isString)(params.user_root))) {
1394
- _context9.next = 54;
1394
+ _context9.next = 26;
1395
1395
  break;
1396
1396
  }
1397
1397
  throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
1398
- case 54:
1398
+ case 26:
1399
1399
  if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
1400
- _context9.next = 56;
1400
+ _context9.next = 27;
1401
1401
  break;
1402
1402
  }
1403
1403
  throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
1404
- case 56:
1404
+ case 27:
1405
1405
  if (!(params.username && !(0, _utils.isString)(params.username))) {
1406
- _context9.next = 58;
1406
+ _context9.next = 28;
1407
1407
  break;
1408
1408
  }
1409
1409
  throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
1410
- case 58:
1411
- _context9.next = 60;
1410
+ case 28:
1411
+ _context9.next = 29;
1412
1412
  return _Api.default.sendRequest('/users', 'POST', params, options);
1413
- case 60:
1413
+ case 29:
1414
1414
  response = _context9.sent;
1415
1415
  return _context9.abrupt("return", new _User(response === null || response === void 0 ? void 0 : response.data, options));
1416
- case 62:
1416
+ case 30:
1417
1417
  case "end":
1418
1418
  return _context9.stop();
1419
1419
  }