files.com 1.0.474 → 1.1.1
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/lib/Files.js +1 -1
- package/lib/models/ActionNotificationExport.js +63 -49
- package/lib/models/ActionWebhookFailure.js +1 -1
- package/lib/models/ApiKey.js +113 -94
- package/lib/models/As2Partner.js +81 -62
- package/lib/models/As2Station.js +79 -60
- package/lib/models/Automation.js +90 -71
- package/lib/models/Behavior.js +114 -95
- package/lib/models/Bundle.js +90 -71
- package/lib/models/BundleNotification.js +75 -56
- package/lib/models/BundleRecipient.js +61 -47
- package/lib/models/Clickwrap.js +77 -58
- package/lib/models/ExternalEvent.js +71 -57
- package/lib/models/File.js +166 -154
- package/lib/models/FileComment.js +65 -46
- package/lib/models/FileCommentReaction.js +44 -30
- package/lib/models/Folder.js +58 -46
- package/lib/models/FormFieldSet.js +76 -57
- package/lib/models/GpgKey.js +79 -60
- package/lib/models/Group.js +78 -59
- package/lib/models/GroupUser.js +63 -44
- package/lib/models/HistoryExport.js +76 -62
- package/lib/models/InboxRecipient.js +61 -47
- package/lib/models/Lock.js +56 -44
- package/lib/models/Message.js +82 -63
- package/lib/models/MessageComment.js +78 -59
- package/lib/models/MessageCommentReaction.js +73 -59
- package/lib/models/MessageReaction.js +73 -59
- package/lib/models/Notification.js +84 -65
- package/lib/models/Permission.js +60 -46
- package/lib/models/Project.js +74 -55
- package/lib/models/PublicKey.js +78 -59
- package/lib/models/RemoteServer.js +147 -128
- package/lib/models/Request.js +76 -62
- package/lib/models/Session.js +53 -39
- package/lib/models/SftpHostKey.js +74 -55
- package/lib/models/ShareGroup.js +79 -60
- package/lib/models/Snapshot.js +75 -56
- package/lib/models/SsoStrategy.js +1 -1
- package/lib/models/Style.js +37 -23
- package/lib/models/User.js +104 -85
- package/lib/models/UserRequest.js +73 -59
- package/lib/models/WebhookTest.js +46 -32
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/ActionNotificationExport.js +2 -2
- package/src/models/ActionWebhookFailure.js +1 -1
- package/src/models/ApiKey.js +7 -5
- package/src/models/As2Partner.js +6 -4
- package/src/models/As2Station.js +6 -4
- package/src/models/Automation.js +7 -5
- package/src/models/Behavior.js +7 -5
- package/src/models/Bundle.js +7 -5
- package/src/models/BundleNotification.js +6 -4
- package/src/models/BundleRecipient.js +2 -2
- package/src/models/Clickwrap.js +6 -4
- package/src/models/ExternalEvent.js +2 -2
- package/src/models/File.js +3 -3
- package/src/models/FileComment.js +6 -4
- package/src/models/FileCommentReaction.js +3 -3
- package/src/models/Folder.js +2 -2
- package/src/models/FormFieldSet.js +6 -4
- package/src/models/GpgKey.js +6 -4
- package/src/models/Group.js +6 -4
- package/src/models/GroupUser.js +6 -4
- package/src/models/HistoryExport.js +2 -2
- package/src/models/InboxRecipient.js +2 -2
- package/src/models/Lock.js +3 -3
- package/src/models/Message.js +6 -4
- package/src/models/MessageComment.js +6 -4
- package/src/models/MessageCommentReaction.js +3 -3
- package/src/models/MessageReaction.js +3 -3
- package/src/models/Notification.js +6 -4
- package/src/models/Permission.js +3 -3
- package/src/models/Project.js +6 -4
- package/src/models/PublicKey.js +6 -4
- package/src/models/RemoteServer.js +6 -4
- package/src/models/Request.js +3 -3
- package/src/models/Session.js +3 -3
- package/src/models/SftpHostKey.js +6 -4
- package/src/models/ShareGroup.js +6 -4
- package/src/models/Snapshot.js +6 -4
- package/src/models/SsoStrategy.js +1 -1
- package/src/models/Style.js +6 -3
- package/src/models/User.js +9 -7
- package/src/models/UserRequest.js +3 -3
- package/src/models/WebhookTest.js +2 -2
package/lib/models/User.js
CHANGED
@@ -566,7 +566,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
566
566
|
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params['id']), "/unlock"), 'POST', params, _this.options);
|
567
567
|
case 16:
|
568
568
|
response = _context.sent;
|
569
|
-
return _context.abrupt("return"
|
569
|
+
return _context.abrupt("return");
|
570
570
|
case 18:
|
571
571
|
case "end":
|
572
572
|
return _context.stop();
|
@@ -619,7 +619,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
619
619
|
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params['id']), "/resend_welcome_email"), 'POST', params, _this.options);
|
620
620
|
case 16:
|
621
621
|
response = _context2.sent;
|
622
|
-
return _context2.abrupt("return"
|
622
|
+
return _context2.abrupt("return");
|
623
623
|
case 18:
|
624
624
|
case "end":
|
625
625
|
return _context2.stop();
|
@@ -672,7 +672,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
672
672
|
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params['id']), "/2fa/reset"), 'POST', params, _this.options);
|
673
673
|
case 16:
|
674
674
|
response = _context3.sent;
|
675
|
-
return _context3.abrupt("return"
|
675
|
+
return _context3.abrupt("return");
|
676
676
|
case 18:
|
677
677
|
case "end":
|
678
678
|
return _context3.stop();
|
@@ -978,7 +978,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
978
978
|
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
|
979
979
|
case 16:
|
980
980
|
response = _context5.sent;
|
981
|
-
return _context5.abrupt("return"
|
981
|
+
return _context5.abrupt("return");
|
982
982
|
case 18:
|
983
983
|
case "end":
|
984
984
|
return _context5.stop();
|
@@ -989,19 +989,38 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
989
989
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
990
990
|
return _this.delete(params);
|
991
991
|
});
|
992
|
-
(0, _defineProperty2.default)(this, "save", function () {
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
992
|
+
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
993
|
+
var newObject, _newObject;
|
994
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
995
|
+
while (1) switch (_context6.prev = _context6.next) {
|
996
|
+
case 0:
|
997
|
+
if (!_this.attributes['id']) {
|
998
|
+
_context6.next = 8;
|
999
|
+
break;
|
1000
|
+
}
|
1001
|
+
_context6.next = 3;
|
1002
|
+
return _this.update(_this.attributes);
|
1003
|
+
case 3:
|
1004
|
+
newObject = _context6.sent;
|
1005
|
+
_this.attributes = _objectSpread({}, newObject.attributes);
|
1006
|
+
return _context6.abrupt("return", true);
|
1007
|
+
case 8:
|
1008
|
+
_context6.next = 10;
|
1009
|
+
return User.create(_this.attributes, _this.options);
|
1010
|
+
case 10:
|
1011
|
+
_newObject = _context6.sent;
|
1012
|
+
_this.attributes = _objectSpread({}, _newObject.attributes);
|
1013
|
+
return _context6.abrupt("return", true);
|
1014
|
+
case 13:
|
1015
|
+
case "end":
|
1016
|
+
return _context6.stop();
|
1017
|
+
}
|
1018
|
+
}, _callee6);
|
1019
|
+
})));
|
1020
|
+
Object.entries(attributes).forEach(function (_ref7) {
|
1021
|
+
var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
|
1022
|
+
key = _ref8[0],
|
1023
|
+
value = _ref8[1];
|
1005
1024
|
var normalizedKey = key.replace('?', '');
|
1006
1025
|
_this.attributes[normalizedKey] = value;
|
1007
1026
|
Object.defineProperty(_this, normalizedKey, {
|
@@ -1024,53 +1043,53 @@ _class = User;
|
|
1024
1043
|
// filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
1025
1044
|
// ids - string - comma-separated list of User IDs
|
1026
1045
|
// search - string - Searches for partial matches of name, username, or email.
|
1027
|
-
(0, _defineProperty2.default)(User, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
1046
|
+
(0, _defineProperty2.default)(User, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
1028
1047
|
var _response$data;
|
1029
1048
|
var params,
|
1030
1049
|
options,
|
1031
1050
|
response,
|
1032
|
-
|
1033
|
-
return _regenerator.default.wrap(function
|
1034
|
-
while (1) switch (
|
1051
|
+
_args7 = arguments;
|
1052
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
1053
|
+
while (1) switch (_context7.prev = _context7.next) {
|
1035
1054
|
case 0:
|
1036
|
-
params =
|
1037
|
-
options =
|
1055
|
+
params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
1056
|
+
options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
|
1038
1057
|
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
1039
|
-
|
1058
|
+
_context7.next = 4;
|
1040
1059
|
break;
|
1041
1060
|
}
|
1042
1061
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
|
1043
1062
|
case 4:
|
1044
1063
|
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
1045
|
-
|
1064
|
+
_context7.next = 6;
|
1046
1065
|
break;
|
1047
1066
|
}
|
1048
1067
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
|
1049
1068
|
case 6:
|
1050
1069
|
if (!(params['ids'] && !(0, _utils.isString)(params['ids']))) {
|
1051
|
-
|
1070
|
+
_context7.next = 8;
|
1052
1071
|
break;
|
1053
1072
|
}
|
1054
1073
|
throw new errors.InvalidParameterError("Bad parameter: ids must be of type String, received ".concat((0, _utils.getType)(params['ids'])));
|
1055
1074
|
case 8:
|
1056
1075
|
if (!(params['search'] && !(0, _utils.isString)(params['search']))) {
|
1057
|
-
|
1076
|
+
_context7.next = 10;
|
1058
1077
|
break;
|
1059
1078
|
}
|
1060
1079
|
throw new errors.InvalidParameterError("Bad parameter: search must be of type String, received ".concat((0, _utils.getType)(params['search'])));
|
1061
1080
|
case 10:
|
1062
|
-
|
1081
|
+
_context7.next = 12;
|
1063
1082
|
return _Api.default.sendRequest("/users", 'GET', params, options);
|
1064
1083
|
case 12:
|
1065
|
-
response =
|
1066
|
-
return
|
1084
|
+
response = _context7.sent;
|
1085
|
+
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) {
|
1067
1086
|
return new _class(obj, options);
|
1068
1087
|
})) || []);
|
1069
1088
|
case 14:
|
1070
1089
|
case "end":
|
1071
|
-
return
|
1090
|
+
return _context7.stop();
|
1072
1091
|
}
|
1073
|
-
},
|
1092
|
+
}, _callee7);
|
1074
1093
|
})));
|
1075
1094
|
(0, _defineProperty2.default)(User, "all", function () {
|
1076
1095
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
@@ -1080,48 +1099,48 @@ _class = User;
|
|
1080
1099
|
// Parameters:
|
1081
1100
|
// id (required) - int64 - User ID.
|
1082
1101
|
(0, _defineProperty2.default)(User, "find", /*#__PURE__*/function () {
|
1083
|
-
var
|
1102
|
+
var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(id) {
|
1084
1103
|
var params,
|
1085
1104
|
options,
|
1086
1105
|
response,
|
1087
|
-
|
1088
|
-
return _regenerator.default.wrap(function
|
1089
|
-
while (1) switch (
|
1106
|
+
_args8 = arguments;
|
1107
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
1108
|
+
while (1) switch (_context8.prev = _context8.next) {
|
1090
1109
|
case 0:
|
1091
|
-
params =
|
1092
|
-
options =
|
1110
|
+
params = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};
|
1111
|
+
options = _args8.length > 2 && _args8[2] !== undefined ? _args8[2] : {};
|
1093
1112
|
if ((0, _utils.isObject)(params)) {
|
1094
|
-
|
1113
|
+
_context8.next = 4;
|
1095
1114
|
break;
|
1096
1115
|
}
|
1097
1116
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
1098
1117
|
case 4:
|
1099
1118
|
params['id'] = id;
|
1100
1119
|
if (params['id']) {
|
1101
|
-
|
1120
|
+
_context8.next = 7;
|
1102
1121
|
break;
|
1103
1122
|
}
|
1104
1123
|
throw new errors.MissingParameterError('Parameter missing: id');
|
1105
1124
|
case 7:
|
1106
1125
|
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
1107
|
-
|
1126
|
+
_context8.next = 9;
|
1108
1127
|
break;
|
1109
1128
|
}
|
1110
1129
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
|
1111
1130
|
case 9:
|
1112
|
-
|
1131
|
+
_context8.next = 11;
|
1113
1132
|
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
|
1114
1133
|
case 11:
|
1115
|
-
response =
|
1116
|
-
return
|
1134
|
+
response = _context8.sent;
|
1135
|
+
return _context8.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
1117
1136
|
case 13:
|
1118
1137
|
case "end":
|
1119
|
-
return
|
1138
|
+
return _context8.stop();
|
1120
1139
|
}
|
1121
|
-
},
|
1140
|
+
}, _callee8);
|
1122
1141
|
}));
|
1123
1142
|
return function (_x) {
|
1124
|
-
return
|
1143
|
+
return _ref10.apply(this, arguments);
|
1125
1144
|
};
|
1126
1145
|
}());
|
1127
1146
|
(0, _defineProperty2.default)(User, "get", function (id) {
|
@@ -1175,188 +1194,188 @@ _class = User;
|
|
1175
1194
|
// time_zone - string - User time zone
|
1176
1195
|
// user_root - string - Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
|
1177
1196
|
// username (required) - string - User's username
|
1178
|
-
(0, _defineProperty2.default)(User, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
1197
|
+
(0, _defineProperty2.default)(User, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
1179
1198
|
var params,
|
1180
1199
|
options,
|
1181
1200
|
response,
|
1182
|
-
|
1183
|
-
return _regenerator.default.wrap(function
|
1184
|
-
while (1) switch (
|
1201
|
+
_args9 = arguments;
|
1202
|
+
return _regenerator.default.wrap(function _callee9$(_context9) {
|
1203
|
+
while (1) switch (_context9.prev = _context9.next) {
|
1185
1204
|
case 0:
|
1186
|
-
params =
|
1187
|
-
options =
|
1205
|
+
params = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
1206
|
+
options = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : {};
|
1188
1207
|
if (params['username']) {
|
1189
|
-
|
1208
|
+
_context9.next = 4;
|
1190
1209
|
break;
|
1191
1210
|
}
|
1192
1211
|
throw new errors.MissingParameterError('Parameter missing: username');
|
1193
1212
|
case 4:
|
1194
1213
|
if (!(params['change_password'] && !(0, _utils.isString)(params['change_password']))) {
|
1195
|
-
|
1214
|
+
_context9.next = 6;
|
1196
1215
|
break;
|
1197
1216
|
}
|
1198
1217
|
throw new errors.InvalidParameterError("Bad parameter: change_password must be of type String, received ".concat((0, _utils.getType)(params['change_password'])));
|
1199
1218
|
case 6:
|
1200
1219
|
if (!(params['change_password_confirmation'] && !(0, _utils.isString)(params['change_password_confirmation']))) {
|
1201
|
-
|
1220
|
+
_context9.next = 8;
|
1202
1221
|
break;
|
1203
1222
|
}
|
1204
1223
|
throw new errors.InvalidParameterError("Bad parameter: change_password_confirmation must be of type String, received ".concat((0, _utils.getType)(params['change_password_confirmation'])));
|
1205
1224
|
case 8:
|
1206
1225
|
if (!(params['email'] && !(0, _utils.isString)(params['email']))) {
|
1207
|
-
|
1226
|
+
_context9.next = 10;
|
1208
1227
|
break;
|
1209
1228
|
}
|
1210
1229
|
throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params['email'])));
|
1211
1230
|
case 10:
|
1212
1231
|
if (!(params['grant_permission'] && !(0, _utils.isString)(params['grant_permission']))) {
|
1213
|
-
|
1232
|
+
_context9.next = 12;
|
1214
1233
|
break;
|
1215
1234
|
}
|
1216
1235
|
throw new errors.InvalidParameterError("Bad parameter: grant_permission must be of type String, received ".concat((0, _utils.getType)(params['grant_permission'])));
|
1217
1236
|
case 12:
|
1218
1237
|
if (!(params['group_id'] && !(0, _utils.isInt)(params['group_id']))) {
|
1219
|
-
|
1238
|
+
_context9.next = 14;
|
1220
1239
|
break;
|
1221
1240
|
}
|
1222
1241
|
throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params['group_id'])));
|
1223
1242
|
case 14:
|
1224
1243
|
if (!(params['group_ids'] && !(0, _utils.isString)(params['group_ids']))) {
|
1225
|
-
|
1244
|
+
_context9.next = 16;
|
1226
1245
|
break;
|
1227
1246
|
}
|
1228
1247
|
throw new errors.InvalidParameterError("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(params['group_ids'])));
|
1229
1248
|
case 16:
|
1230
1249
|
if (!(params['imported_password_hash'] && !(0, _utils.isString)(params['imported_password_hash']))) {
|
1231
|
-
|
1250
|
+
_context9.next = 18;
|
1232
1251
|
break;
|
1233
1252
|
}
|
1234
1253
|
throw new errors.InvalidParameterError("Bad parameter: imported_password_hash must be of type String, received ".concat((0, _utils.getType)(params['imported_password_hash'])));
|
1235
1254
|
case 18:
|
1236
1255
|
if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
|
1237
|
-
|
1256
|
+
_context9.next = 20;
|
1238
1257
|
break;
|
1239
1258
|
}
|
1240
1259
|
throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params['password'])));
|
1241
1260
|
case 20:
|
1242
1261
|
if (!(params['password_confirmation'] && !(0, _utils.isString)(params['password_confirmation']))) {
|
1243
|
-
|
1262
|
+
_context9.next = 22;
|
1244
1263
|
break;
|
1245
1264
|
}
|
1246
1265
|
throw new errors.InvalidParameterError("Bad parameter: password_confirmation must be of type String, received ".concat((0, _utils.getType)(params['password_confirmation'])));
|
1247
1266
|
case 22:
|
1248
1267
|
if (!(params['allowed_ips'] && !(0, _utils.isString)(params['allowed_ips']))) {
|
1249
|
-
|
1268
|
+
_context9.next = 24;
|
1250
1269
|
break;
|
1251
1270
|
}
|
1252
1271
|
throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params['allowed_ips'])));
|
1253
1272
|
case 24:
|
1254
1273
|
if (!(params['authenticate_until'] && !(0, _utils.isString)(params['authenticate_until']))) {
|
1255
|
-
|
1274
|
+
_context9.next = 26;
|
1256
1275
|
break;
|
1257
1276
|
}
|
1258
1277
|
throw new errors.InvalidParameterError("Bad parameter: authenticate_until must be of type String, received ".concat((0, _utils.getType)(params['authenticate_until'])));
|
1259
1278
|
case 26:
|
1260
1279
|
if (!(params['authentication_method'] && !(0, _utils.isString)(params['authentication_method']))) {
|
1261
|
-
|
1280
|
+
_context9.next = 28;
|
1262
1281
|
break;
|
1263
1282
|
}
|
1264
1283
|
throw new errors.InvalidParameterError("Bad parameter: authentication_method must be of type String, received ".concat((0, _utils.getType)(params['authentication_method'])));
|
1265
1284
|
case 28:
|
1266
1285
|
if (!(params['header_text'] && !(0, _utils.isString)(params['header_text']))) {
|
1267
|
-
|
1286
|
+
_context9.next = 30;
|
1268
1287
|
break;
|
1269
1288
|
}
|
1270
1289
|
throw new errors.InvalidParameterError("Bad parameter: header_text must be of type String, received ".concat((0, _utils.getType)(params['header_text'])));
|
1271
1290
|
case 30:
|
1272
1291
|
if (!(params['language'] && !(0, _utils.isString)(params['language']))) {
|
1273
|
-
|
1292
|
+
_context9.next = 32;
|
1274
1293
|
break;
|
1275
1294
|
}
|
1276
1295
|
throw new errors.InvalidParameterError("Bad parameter: language must be of type String, received ".concat((0, _utils.getType)(params['language'])));
|
1277
1296
|
case 32:
|
1278
1297
|
if (!(params['notification_daily_send_time'] && !(0, _utils.isInt)(params['notification_daily_send_time']))) {
|
1279
|
-
|
1298
|
+
_context9.next = 34;
|
1280
1299
|
break;
|
1281
1300
|
}
|
1282
1301
|
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'])));
|
1283
1302
|
case 34:
|
1284
1303
|
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
|
1285
|
-
|
1304
|
+
_context9.next = 36;
|
1286
1305
|
break;
|
1287
1306
|
}
|
1288
1307
|
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
|
1289
1308
|
case 36:
|
1290
1309
|
if (!(params['company'] && !(0, _utils.isString)(params['company']))) {
|
1291
|
-
|
1310
|
+
_context9.next = 38;
|
1292
1311
|
break;
|
1293
1312
|
}
|
1294
1313
|
throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params['company'])));
|
1295
1314
|
case 38:
|
1296
1315
|
if (!(params['notes'] && !(0, _utils.isString)(params['notes']))) {
|
1297
|
-
|
1316
|
+
_context9.next = 40;
|
1298
1317
|
break;
|
1299
1318
|
}
|
1300
1319
|
throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params['notes'])));
|
1301
1320
|
case 40:
|
1302
1321
|
if (!(params['password_validity_days'] && !(0, _utils.isInt)(params['password_validity_days']))) {
|
1303
|
-
|
1322
|
+
_context9.next = 42;
|
1304
1323
|
break;
|
1305
1324
|
}
|
1306
1325
|
throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params['password_validity_days'])));
|
1307
1326
|
case 42:
|
1308
1327
|
if (!(params['require_login_by'] && !(0, _utils.isString)(params['require_login_by']))) {
|
1309
|
-
|
1328
|
+
_context9.next = 44;
|
1310
1329
|
break;
|
1311
1330
|
}
|
1312
1331
|
throw new errors.InvalidParameterError("Bad parameter: require_login_by must be of type String, received ".concat((0, _utils.getType)(params['require_login_by'])));
|
1313
1332
|
case 44:
|
1314
1333
|
if (!(params['ssl_required'] && !(0, _utils.isString)(params['ssl_required']))) {
|
1315
|
-
|
1334
|
+
_context9.next = 46;
|
1316
1335
|
break;
|
1317
1336
|
}
|
1318
1337
|
throw new errors.InvalidParameterError("Bad parameter: ssl_required must be of type String, received ".concat((0, _utils.getType)(params['ssl_required'])));
|
1319
1338
|
case 46:
|
1320
1339
|
if (!(params['sso_strategy_id'] && !(0, _utils.isInt)(params['sso_strategy_id']))) {
|
1321
|
-
|
1340
|
+
_context9.next = 48;
|
1322
1341
|
break;
|
1323
1342
|
}
|
1324
1343
|
throw new errors.InvalidParameterError("Bad parameter: sso_strategy_id must be of type Int, received ".concat((0, _utils.getType)(params['sso_strategy_id'])));
|
1325
1344
|
case 48:
|
1326
1345
|
if (!(params['require_2fa'] && !(0, _utils.isString)(params['require_2fa']))) {
|
1327
|
-
|
1346
|
+
_context9.next = 50;
|
1328
1347
|
break;
|
1329
1348
|
}
|
1330
1349
|
throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params['require_2fa'])));
|
1331
1350
|
case 50:
|
1332
1351
|
if (!(params['time_zone'] && !(0, _utils.isString)(params['time_zone']))) {
|
1333
|
-
|
1352
|
+
_context9.next = 52;
|
1334
1353
|
break;
|
1335
1354
|
}
|
1336
1355
|
throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params['time_zone'])));
|
1337
1356
|
case 52:
|
1338
1357
|
if (!(params['user_root'] && !(0, _utils.isString)(params['user_root']))) {
|
1339
|
-
|
1358
|
+
_context9.next = 54;
|
1340
1359
|
break;
|
1341
1360
|
}
|
1342
1361
|
throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params['user_root'])));
|
1343
1362
|
case 54:
|
1344
1363
|
if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
|
1345
|
-
|
1364
|
+
_context9.next = 56;
|
1346
1365
|
break;
|
1347
1366
|
}
|
1348
1367
|
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params['username'])));
|
1349
1368
|
case 56:
|
1350
|
-
|
1369
|
+
_context9.next = 58;
|
1351
1370
|
return _Api.default.sendRequest("/users", 'POST', params, options);
|
1352
1371
|
case 58:
|
1353
|
-
response =
|
1354
|
-
return
|
1372
|
+
response = _context9.sent;
|
1373
|
+
return _context9.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
1355
1374
|
case 60:
|
1356
1375
|
case "end":
|
1357
|
-
return
|
1376
|
+
return _context9.stop();
|
1358
1377
|
}
|
1359
|
-
},
|
1378
|
+
}, _callee9);
|
1360
1379
|
})));
|
1361
1380
|
var _default = exports.default = User;
|
1362
1381
|
module.exports = User;
|