files.com 1.2.322 → 1.2.324
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 +5 -5
- package/docs/models/BundleDownload.md +1 -1
- package/docs/models/BundleNotification.md +5 -5
- package/docs/models/BundleRecipient.md +2 -2
- package/docs/models/BundleRegistration.md +1 -1
- package/docs/models/GpgKey.md +8 -1
- package/docs/models/Partner.md +13 -6
- package/docs/models/Permission.md +2 -0
- package/docs/models/PublicKey.md +1 -0
- package/docs/models/ScimLog.md +13 -0
- package/docs/models/Site.md +1 -0
- package/docs/models/User.md +11 -1
- package/docs/models/UserLifecycleRule.md +36 -21
- package/lib/Files.js +1 -1
- package/lib/models/GpgKey.js +55 -34
- package/lib/models/Partner.js +34 -13
- package/lib/models/Permission.js +7 -0
- package/lib/models/PublicKey.js +1 -0
- package/lib/models/ScimLog.js +52 -0
- package/lib/models/User.js +57 -28
- package/lib/models/UserLifecycleRule.js +87 -44
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/GpgKey.js +18 -1
- package/src/models/Partner.js +19 -2
- package/src/models/Permission.js +7 -0
- package/src/models/PublicKey.js +1 -0
- package/src/models/ScimLog.js +25 -0
- package/src/models/User.js +26 -1
- package/src/models/UserLifecycleRule.js +64 -29
package/lib/models/GpgKey.js
CHANGED
|
@@ -53,7 +53,14 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
|
|
|
53
53
|
(0, _defineProperty2.default)(this, "setName", function (value) {
|
|
54
54
|
_this.attributes.name = value;
|
|
55
55
|
});
|
|
56
|
-
// int64 # GPG
|
|
56
|
+
// int64 # Partner ID who owns this GPG Key, if applicable.
|
|
57
|
+
(0, _defineProperty2.default)(this, "getPartnerId", function () {
|
|
58
|
+
return _this.attributes.partner_id;
|
|
59
|
+
});
|
|
60
|
+
(0, _defineProperty2.default)(this, "setPartnerId", function (value) {
|
|
61
|
+
_this.attributes.partner_id = value;
|
|
62
|
+
});
|
|
63
|
+
// int64 # User ID who owns this GPG Key, if applicable.
|
|
57
64
|
(0, _defineProperty2.default)(this, "getUserId", function () {
|
|
58
65
|
return _this.attributes.user_id;
|
|
59
66
|
});
|
|
@@ -145,6 +152,7 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
|
|
|
145
152
|
_this.attributes.generate_email = value;
|
|
146
153
|
});
|
|
147
154
|
// Parameters:
|
|
155
|
+
// partner_id - int64 - Partner ID who owns this GPG Key, if applicable.
|
|
148
156
|
// public_key - string - MD5 hash of your GPG public key
|
|
149
157
|
// private_key - string - MD5 hash of your GPG private key.
|
|
150
158
|
// private_key_password - string - Your GPG private key password. Only required for password protected keys.
|
|
@@ -176,50 +184,56 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
|
|
|
176
184
|
}
|
|
177
185
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
178
186
|
case 3:
|
|
179
|
-
if (!(params.
|
|
187
|
+
if (!(params.partner_id && !(0, _utils.isInt)(params.partner_id))) {
|
|
180
188
|
_context.next = 4;
|
|
181
189
|
break;
|
|
182
190
|
}
|
|
183
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
191
|
+
throw new errors.InvalidParameterError("Bad parameter: partner_id must be of type Int, received ".concat((0, _utils.getType)(params.partner_id)));
|
|
184
192
|
case 4:
|
|
185
|
-
if (!(params.
|
|
193
|
+
if (!(params.public_key && !(0, _utils.isString)(params.public_key))) {
|
|
186
194
|
_context.next = 5;
|
|
187
195
|
break;
|
|
188
196
|
}
|
|
189
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
197
|
+
throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(params.public_key)));
|
|
190
198
|
case 5:
|
|
191
|
-
if (!(params.
|
|
199
|
+
if (!(params.private_key && !(0, _utils.isString)(params.private_key))) {
|
|
192
200
|
_context.next = 6;
|
|
193
201
|
break;
|
|
194
202
|
}
|
|
195
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
203
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params.private_key)));
|
|
196
204
|
case 6:
|
|
197
|
-
if (!(params.
|
|
205
|
+
if (!(params.private_key_password && !(0, _utils.isString)(params.private_key_password))) {
|
|
198
206
|
_context.next = 7;
|
|
199
207
|
break;
|
|
200
208
|
}
|
|
201
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
209
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params.private_key_password)));
|
|
202
210
|
case 7:
|
|
211
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
212
|
+
_context.next = 8;
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
216
|
+
case 8:
|
|
203
217
|
if (params.id) {
|
|
204
|
-
_context.next =
|
|
218
|
+
_context.next = 10;
|
|
205
219
|
break;
|
|
206
220
|
}
|
|
207
221
|
if (!_this.attributes.id) {
|
|
208
|
-
_context.next =
|
|
222
|
+
_context.next = 9;
|
|
209
223
|
break;
|
|
210
224
|
}
|
|
211
225
|
params.id = _this.id;
|
|
212
|
-
_context.next =
|
|
226
|
+
_context.next = 10;
|
|
213
227
|
break;
|
|
214
|
-
case 8:
|
|
215
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
|
216
228
|
case 9:
|
|
217
|
-
|
|
218
|
-
return _Api.default.sendRequest("/gpg_keys/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
229
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
|
219
230
|
case 10:
|
|
231
|
+
_context.next = 11;
|
|
232
|
+
return _Api.default.sendRequest("/gpg_keys/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
233
|
+
case 11:
|
|
220
234
|
response = _context.sent;
|
|
221
235
|
return _context.abrupt("return", new GpgKey(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
222
|
-
case
|
|
236
|
+
case 12:
|
|
223
237
|
case "end":
|
|
224
238
|
return _context.stop();
|
|
225
239
|
}
|
|
@@ -425,6 +439,7 @@ _GpgKey = GpgKey;
|
|
|
425
439
|
});
|
|
426
440
|
// Parameters:
|
|
427
441
|
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
442
|
+
// partner_id - int64 - Partner ID who owns this GPG Key, if applicable.
|
|
428
443
|
// public_key - string - MD5 hash of your GPG public key
|
|
429
444
|
// private_key - string - MD5 hash of your GPG private key.
|
|
430
445
|
// private_key_password - string - Your GPG private key password. Only required for password protected keys.
|
|
@@ -455,54 +470,60 @@ _GpgKey = GpgKey;
|
|
|
455
470
|
}
|
|
456
471
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
457
472
|
case 2:
|
|
458
|
-
if (!(params.
|
|
473
|
+
if (!(params.partner_id && !(0, _utils.isInt)(params.partner_id))) {
|
|
459
474
|
_context6.next = 3;
|
|
460
475
|
break;
|
|
461
476
|
}
|
|
462
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
477
|
+
throw new errors.InvalidParameterError("Bad parameter: partner_id must be of type Int, received ".concat((0, _utils.getType)(params.partner_id)));
|
|
463
478
|
case 3:
|
|
464
|
-
if (!(params.
|
|
479
|
+
if (!(params.public_key && !(0, _utils.isString)(params.public_key))) {
|
|
465
480
|
_context6.next = 4;
|
|
466
481
|
break;
|
|
467
482
|
}
|
|
468
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
483
|
+
throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(params.public_key)));
|
|
469
484
|
case 4:
|
|
470
|
-
if (!(params.
|
|
485
|
+
if (!(params.private_key && !(0, _utils.isString)(params.private_key))) {
|
|
471
486
|
_context6.next = 5;
|
|
472
487
|
break;
|
|
473
488
|
}
|
|
474
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
489
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params.private_key)));
|
|
475
490
|
case 5:
|
|
476
|
-
if (!(params.
|
|
491
|
+
if (!(params.private_key_password && !(0, _utils.isString)(params.private_key_password))) {
|
|
477
492
|
_context6.next = 6;
|
|
478
493
|
break;
|
|
479
494
|
}
|
|
480
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
495
|
+
throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params.private_key_password)));
|
|
481
496
|
case 6:
|
|
482
|
-
if (!(params.
|
|
497
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
483
498
|
_context6.next = 7;
|
|
484
499
|
break;
|
|
485
500
|
}
|
|
486
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
501
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
487
502
|
case 7:
|
|
488
|
-
if (!(params.
|
|
503
|
+
if (!(params.generate_expires_at && !(0, _utils.isString)(params.generate_expires_at))) {
|
|
489
504
|
_context6.next = 8;
|
|
490
505
|
break;
|
|
491
506
|
}
|
|
492
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
507
|
+
throw new errors.InvalidParameterError("Bad parameter: generate_expires_at must be of type String, received ".concat((0, _utils.getType)(params.generate_expires_at)));
|
|
493
508
|
case 8:
|
|
494
|
-
if (!(params.
|
|
509
|
+
if (!(params.generate_full_name && !(0, _utils.isString)(params.generate_full_name))) {
|
|
495
510
|
_context6.next = 9;
|
|
496
511
|
break;
|
|
497
512
|
}
|
|
498
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
513
|
+
throw new errors.InvalidParameterError("Bad parameter: generate_full_name must be of type String, received ".concat((0, _utils.getType)(params.generate_full_name)));
|
|
499
514
|
case 9:
|
|
500
|
-
|
|
501
|
-
|
|
515
|
+
if (!(params.generate_email && !(0, _utils.isString)(params.generate_email))) {
|
|
516
|
+
_context6.next = 10;
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
throw new errors.InvalidParameterError("Bad parameter: generate_email must be of type String, received ".concat((0, _utils.getType)(params.generate_email)));
|
|
502
520
|
case 10:
|
|
521
|
+
_context6.next = 11;
|
|
522
|
+
return _Api.default.sendRequest('/gpg_keys', 'POST', params, options);
|
|
523
|
+
case 11:
|
|
503
524
|
response = _context6.sent;
|
|
504
525
|
return _context6.abrupt("return", new _GpgKey(response === null || response === void 0 ? void 0 : response.data, options));
|
|
505
|
-
case
|
|
526
|
+
case 12:
|
|
506
527
|
case "end":
|
|
507
528
|
return _context6.stop();
|
|
508
529
|
}
|
package/lib/models/Partner.js
CHANGED
|
@@ -81,13 +81,21 @@ var Partner = /*#__PURE__*/(0, _createClass2.default)(function Partner() {
|
|
|
81
81
|
(0, _defineProperty2.default)(this, "setRootFolder", function (value) {
|
|
82
82
|
_this.attributes.root_folder = value;
|
|
83
83
|
});
|
|
84
|
+
// string # Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
85
|
+
(0, _defineProperty2.default)(this, "getTags", function () {
|
|
86
|
+
return _this.attributes.tags;
|
|
87
|
+
});
|
|
88
|
+
(0, _defineProperty2.default)(this, "setTags", function (value) {
|
|
89
|
+
_this.attributes.tags = value;
|
|
90
|
+
});
|
|
84
91
|
// Parameters:
|
|
92
|
+
// name - string - The name of the Partner.
|
|
85
93
|
// allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
86
94
|
// allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
87
95
|
// allow_user_creation - boolean - Allow Partner Admins to create users.
|
|
88
|
-
// name - string - The name of the Partner.
|
|
89
96
|
// notes - string - Notes about this Partner.
|
|
90
97
|
// root_folder - string - The root folder path for this Partner.
|
|
98
|
+
// tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
91
99
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
92
100
|
var params,
|
|
93
101
|
response,
|
|
@@ -133,26 +141,32 @@ var Partner = /*#__PURE__*/(0, _createClass2.default)(function Partner() {
|
|
|
133
141
|
}
|
|
134
142
|
throw new errors.InvalidParameterError("Bad parameter: root_folder must be of type String, received ".concat((0, _utils.getType)(params.root_folder)));
|
|
135
143
|
case 6:
|
|
144
|
+
if (!(params.tags && !(0, _utils.isString)(params.tags))) {
|
|
145
|
+
_context.next = 7;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
throw new errors.InvalidParameterError("Bad parameter: tags must be of type String, received ".concat((0, _utils.getType)(params.tags)));
|
|
149
|
+
case 7:
|
|
136
150
|
if (params.id) {
|
|
137
|
-
_context.next =
|
|
151
|
+
_context.next = 9;
|
|
138
152
|
break;
|
|
139
153
|
}
|
|
140
154
|
if (!_this.attributes.id) {
|
|
141
|
-
_context.next =
|
|
155
|
+
_context.next = 8;
|
|
142
156
|
break;
|
|
143
157
|
}
|
|
144
158
|
params.id = _this.id;
|
|
145
|
-
_context.next =
|
|
159
|
+
_context.next = 9;
|
|
146
160
|
break;
|
|
147
|
-
case 7:
|
|
148
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
|
149
161
|
case 8:
|
|
150
|
-
|
|
151
|
-
return _Api.default.sendRequest("/partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
162
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
|
152
163
|
case 9:
|
|
164
|
+
_context.next = 10;
|
|
165
|
+
return _Api.default.sendRequest("/partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
166
|
+
case 10:
|
|
153
167
|
response = _context.sent;
|
|
154
168
|
return _context.abrupt("return", new Partner(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
155
|
-
case
|
|
169
|
+
case 11:
|
|
156
170
|
case "end":
|
|
157
171
|
return _context.stop();
|
|
158
172
|
}
|
|
@@ -350,12 +364,13 @@ _Partner = Partner;
|
|
|
350
364
|
return _Partner.find(id, params, options);
|
|
351
365
|
});
|
|
352
366
|
// Parameters:
|
|
367
|
+
// name - string - The name of the Partner.
|
|
353
368
|
// allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
354
369
|
// allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
355
370
|
// allow_user_creation - boolean - Allow Partner Admins to create users.
|
|
356
|
-
// name - string - The name of the Partner.
|
|
357
371
|
// notes - string - Notes about this Partner.
|
|
358
372
|
// root_folder - string - The root folder path for this Partner.
|
|
373
|
+
// tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
359
374
|
(0, _defineProperty2.default)(Partner, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
360
375
|
var params,
|
|
361
376
|
options,
|
|
@@ -384,12 +399,18 @@ _Partner = Partner;
|
|
|
384
399
|
}
|
|
385
400
|
throw new errors.InvalidParameterError("Bad parameter: root_folder must be of type String, received ".concat((0, _utils.getType)(params.root_folder)));
|
|
386
401
|
case 3:
|
|
387
|
-
|
|
388
|
-
|
|
402
|
+
if (!(params.tags && !(0, _utils.isString)(params.tags))) {
|
|
403
|
+
_context6.next = 4;
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
throw new errors.InvalidParameterError("Bad parameter: tags must be of type String, received ".concat((0, _utils.getType)(params.tags)));
|
|
389
407
|
case 4:
|
|
408
|
+
_context6.next = 5;
|
|
409
|
+
return _Api.default.sendRequest('/partners', 'POST', params, options);
|
|
410
|
+
case 5:
|
|
390
411
|
response = _context6.sent;
|
|
391
412
|
return _context6.abrupt("return", new _Partner(response === null || response === void 0 ? void 0 : response.data, options));
|
|
392
|
-
case
|
|
413
|
+
case 6:
|
|
393
414
|
case "end":
|
|
394
415
|
return _context6.stop();
|
|
395
416
|
}
|
package/lib/models/Permission.js
CHANGED
|
@@ -81,6 +81,13 @@ var Permission = /*#__PURE__*/(0, _createClass2.default)(function Permission() {
|
|
|
81
81
|
(0, _defineProperty2.default)(this, "setPartnerId", function (value) {
|
|
82
82
|
_this.attributes.partner_id = value;
|
|
83
83
|
});
|
|
84
|
+
// string # Partner name (if applicable)
|
|
85
|
+
(0, _defineProperty2.default)(this, "getPartnerName", function () {
|
|
86
|
+
return _this.attributes.partner_name;
|
|
87
|
+
});
|
|
88
|
+
(0, _defineProperty2.default)(this, "setPartnerName", function (value) {
|
|
89
|
+
_this.attributes.partner_name = value;
|
|
90
|
+
});
|
|
84
91
|
// string # Permission type. See the table referenced in the documentation for an explanation of each permission.
|
|
85
92
|
(0, _defineProperty2.default)(this, "getPermission", function () {
|
|
86
93
|
return _this.attributes.permission;
|
package/lib/models/PublicKey.js
CHANGED
|
@@ -313,6 +313,7 @@ _PublicKey = PublicKey;
|
|
|
313
313
|
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
314
314
|
// cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
315
315
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
316
|
+
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `title`, `created_at` or `user_id`.
|
|
316
317
|
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
|
|
317
318
|
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
318
319
|
// filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
package/lib/models/ScimLog.js
CHANGED
|
@@ -123,6 +123,58 @@ _ScimLog = ScimLog;
|
|
|
123
123
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
124
124
|
return _ScimLog.list(params, options);
|
|
125
125
|
});
|
|
126
|
+
// Parameters:
|
|
127
|
+
// id (required) - int64 - Scim Log ID.
|
|
128
|
+
(0, _defineProperty2.default)(ScimLog, "find", /*#__PURE__*/function () {
|
|
129
|
+
var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(id) {
|
|
130
|
+
var params,
|
|
131
|
+
options,
|
|
132
|
+
response,
|
|
133
|
+
_args2 = arguments;
|
|
134
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
135
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
136
|
+
case 0:
|
|
137
|
+
params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
138
|
+
options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
|
|
139
|
+
if ((0, _utils.isObject)(params)) {
|
|
140
|
+
_context2.next = 1;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
144
|
+
case 1:
|
|
145
|
+
params.id = id;
|
|
146
|
+
if (params.id) {
|
|
147
|
+
_context2.next = 2;
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
|
151
|
+
case 2:
|
|
152
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
153
|
+
_context2.next = 3;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
157
|
+
case 3:
|
|
158
|
+
_context2.next = 4;
|
|
159
|
+
return _Api.default.sendRequest("/scim_logs/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
160
|
+
case 4:
|
|
161
|
+
response = _context2.sent;
|
|
162
|
+
return _context2.abrupt("return", new _ScimLog(response === null || response === void 0 ? void 0 : response.data, options));
|
|
163
|
+
case 5:
|
|
164
|
+
case "end":
|
|
165
|
+
return _context2.stop();
|
|
166
|
+
}
|
|
167
|
+
}, _callee2);
|
|
168
|
+
}));
|
|
169
|
+
return function (_x) {
|
|
170
|
+
return _ref4.apply(this, arguments);
|
|
171
|
+
};
|
|
172
|
+
}());
|
|
173
|
+
(0, _defineProperty2.default)(ScimLog, "get", function (id) {
|
|
174
|
+
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
175
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
176
|
+
return _ScimLog.find(id, params, options);
|
|
177
|
+
});
|
|
126
178
|
var _default = exports.default = ScimLog;
|
|
127
179
|
module.exports = ScimLog;
|
|
128
180
|
module.exports.default = ScimLog;
|
package/lib/models/User.js
CHANGED
|
@@ -463,6 +463,13 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
|
463
463
|
(0, _defineProperty2.default)(this, "setExternallyManaged", function (value) {
|
|
464
464
|
_this.attributes.externally_managed = value;
|
|
465
465
|
});
|
|
466
|
+
// string # Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
467
|
+
(0, _defineProperty2.default)(this, "getTags", function () {
|
|
468
|
+
return _this.attributes.tags;
|
|
469
|
+
});
|
|
470
|
+
(0, _defineProperty2.default)(this, "setTags", function (value) {
|
|
471
|
+
_this.attributes.tags = value;
|
|
472
|
+
});
|
|
466
473
|
// string # User time zone
|
|
467
474
|
(0, _defineProperty2.default)(this, "getTimeZone", function () {
|
|
468
475
|
return _this.attributes.time_zone;
|
|
@@ -589,6 +596,13 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
|
589
596
|
(0, _defineProperty2.default)(this, "setClear2fa", function (value) {
|
|
590
597
|
_this.attributes.clear_2fa = value;
|
|
591
598
|
});
|
|
599
|
+
// boolean # If true, convert this user to a partner user by assigning the partner_id provided.
|
|
600
|
+
(0, _defineProperty2.default)(this, "getConvertToPartnerUser", function () {
|
|
601
|
+
return _this.attributes.convert_to_partner_user;
|
|
602
|
+
});
|
|
603
|
+
(0, _defineProperty2.default)(this, "setConvertToPartnerUser", function (value) {
|
|
604
|
+
_this.attributes.convert_to_partner_user = value;
|
|
605
|
+
});
|
|
592
606
|
// Unlock user who has been locked out due to failed logins
|
|
593
607
|
(0, _defineProperty2.default)(this, "unlock", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
594
608
|
var params,
|
|
@@ -783,11 +797,13 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
|
783
797
|
// sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
784
798
|
// subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
785
799
|
// require_2fa - string - 2FA required setting
|
|
800
|
+
// tags - string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
786
801
|
// time_zone - string - User time zone
|
|
787
802
|
// 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.
|
|
788
803
|
// user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
789
804
|
// username - string - User's username
|
|
790
805
|
// clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
|
|
806
|
+
// convert_to_partner_user - boolean - If true, convert this user to a partner user by assigning the partner_id provided.
|
|
791
807
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
792
808
|
var params,
|
|
793
809
|
response,
|
|
@@ -965,50 +981,56 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
|
965
981
|
}
|
|
966
982
|
throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params.require_2fa)));
|
|
967
983
|
case 28:
|
|
968
|
-
if (!(params.
|
|
984
|
+
if (!(params.tags && !(0, _utils.isString)(params.tags))) {
|
|
969
985
|
_context4.next = 29;
|
|
970
986
|
break;
|
|
971
987
|
}
|
|
972
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
988
|
+
throw new errors.InvalidParameterError("Bad parameter: tags must be of type String, received ".concat((0, _utils.getType)(params.tags)));
|
|
973
989
|
case 29:
|
|
974
|
-
if (!(params.
|
|
990
|
+
if (!(params.time_zone && !(0, _utils.isString)(params.time_zone))) {
|
|
975
991
|
_context4.next = 30;
|
|
976
992
|
break;
|
|
977
993
|
}
|
|
978
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
994
|
+
throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params.time_zone)));
|
|
979
995
|
case 30:
|
|
980
|
-
if (!(params.
|
|
996
|
+
if (!(params.user_root && !(0, _utils.isString)(params.user_root))) {
|
|
981
997
|
_context4.next = 31;
|
|
982
998
|
break;
|
|
983
999
|
}
|
|
984
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1000
|
+
throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
|
|
985
1001
|
case 31:
|
|
986
|
-
if (!(params.
|
|
1002
|
+
if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
|
|
987
1003
|
_context4.next = 32;
|
|
988
1004
|
break;
|
|
989
1005
|
}
|
|
990
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1006
|
+
throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
|
|
991
1007
|
case 32:
|
|
1008
|
+
if (!(params.username && !(0, _utils.isString)(params.username))) {
|
|
1009
|
+
_context4.next = 33;
|
|
1010
|
+
break;
|
|
1011
|
+
}
|
|
1012
|
+
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
|
|
1013
|
+
case 33:
|
|
992
1014
|
if (params.id) {
|
|
993
|
-
_context4.next =
|
|
1015
|
+
_context4.next = 35;
|
|
994
1016
|
break;
|
|
995
1017
|
}
|
|
996
1018
|
if (!_this.attributes.id) {
|
|
997
|
-
_context4.next =
|
|
1019
|
+
_context4.next = 34;
|
|
998
1020
|
break;
|
|
999
1021
|
}
|
|
1000
1022
|
params.id = _this.id;
|
|
1001
|
-
_context4.next =
|
|
1023
|
+
_context4.next = 35;
|
|
1002
1024
|
break;
|
|
1003
|
-
case 33:
|
|
1004
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
|
1005
1025
|
case 34:
|
|
1006
|
-
|
|
1007
|
-
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
1026
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
|
1008
1027
|
case 35:
|
|
1028
|
+
_context4.next = 36;
|
|
1029
|
+
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
1030
|
+
case 36:
|
|
1009
1031
|
response = _context4.sent;
|
|
1010
1032
|
return _context4.abrupt("return", new User(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
1011
|
-
case
|
|
1033
|
+
case 37:
|
|
1012
1034
|
case "end":
|
|
1013
1035
|
return _context4.stop();
|
|
1014
1036
|
}
|
|
@@ -1120,7 +1142,7 @@ _User = User;
|
|
|
1120
1142
|
// cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
1121
1143
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
1122
1144
|
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required`, `username`, `site_admin` or `disabled`.
|
|
1123
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin` or `
|
|
1145
|
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]` or `[ company, name ]`.
|
|
1124
1146
|
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
|
1125
1147
|
// filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
|
1126
1148
|
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`. Valid field combinations are `[ company, name ]`.
|
|
@@ -1281,6 +1303,7 @@ _User = User;
|
|
|
1281
1303
|
// sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
1282
1304
|
// subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
1283
1305
|
// require_2fa - string - 2FA required setting
|
|
1306
|
+
// tags - string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
1284
1307
|
// time_zone - string - User time zone
|
|
1285
1308
|
// 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.
|
|
1286
1309
|
// user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
@@ -1451,36 +1474,42 @@ _User = User;
|
|
|
1451
1474
|
}
|
|
1452
1475
|
throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params.require_2fa)));
|
|
1453
1476
|
case 26:
|
|
1454
|
-
if (!(params.
|
|
1477
|
+
if (!(params.tags && !(0, _utils.isString)(params.tags))) {
|
|
1455
1478
|
_context9.next = 27;
|
|
1456
1479
|
break;
|
|
1457
1480
|
}
|
|
1458
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1481
|
+
throw new errors.InvalidParameterError("Bad parameter: tags must be of type String, received ".concat((0, _utils.getType)(params.tags)));
|
|
1459
1482
|
case 27:
|
|
1460
|
-
if (!(params.
|
|
1483
|
+
if (!(params.time_zone && !(0, _utils.isString)(params.time_zone))) {
|
|
1461
1484
|
_context9.next = 28;
|
|
1462
1485
|
break;
|
|
1463
1486
|
}
|
|
1464
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1487
|
+
throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params.time_zone)));
|
|
1465
1488
|
case 28:
|
|
1466
|
-
if (!(params.
|
|
1489
|
+
if (!(params.user_root && !(0, _utils.isString)(params.user_root))) {
|
|
1467
1490
|
_context9.next = 29;
|
|
1468
1491
|
break;
|
|
1469
1492
|
}
|
|
1470
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1493
|
+
throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
|
|
1471
1494
|
case 29:
|
|
1472
|
-
if (!(params.
|
|
1495
|
+
if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
|
|
1473
1496
|
_context9.next = 30;
|
|
1474
1497
|
break;
|
|
1475
1498
|
}
|
|
1476
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1499
|
+
throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
|
|
1477
1500
|
case 30:
|
|
1478
|
-
|
|
1479
|
-
|
|
1501
|
+
if (!(params.username && !(0, _utils.isString)(params.username))) {
|
|
1502
|
+
_context9.next = 31;
|
|
1503
|
+
break;
|
|
1504
|
+
}
|
|
1505
|
+
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
|
|
1480
1506
|
case 31:
|
|
1507
|
+
_context9.next = 32;
|
|
1508
|
+
return _Api.default.sendRequest('/users', 'POST', params, options);
|
|
1509
|
+
case 32:
|
|
1481
1510
|
response = _context9.sent;
|
|
1482
1511
|
return _context9.abrupt("return", new _User(response === null || response === void 0 ? void 0 : response.data, options));
|
|
1483
|
-
case
|
|
1512
|
+
case 33:
|
|
1484
1513
|
case "end":
|
|
1485
1514
|
return _context9.stop();
|
|
1486
1515
|
}
|