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
|
@@ -39,7 +39,7 @@ var UserLifecycleRule = /*#__PURE__*/(0, _createClass2.default)(function UserLif
|
|
|
39
39
|
(0, _defineProperty2.default)(this, "setId", function (value) {
|
|
40
40
|
_this.attributes.id = value;
|
|
41
41
|
});
|
|
42
|
-
// string # User authentication method for the rule
|
|
42
|
+
// string # User authentication method for which the rule will apply.
|
|
43
43
|
(0, _defineProperty2.default)(this, "getAuthenticationMethod", function () {
|
|
44
44
|
return _this.attributes.authentication_method;
|
|
45
45
|
});
|
|
@@ -53,6 +53,13 @@ var UserLifecycleRule = /*#__PURE__*/(0, _createClass2.default)(function UserLif
|
|
|
53
53
|
(0, _defineProperty2.default)(this, "setGroupIds", function (value) {
|
|
54
54
|
_this.attributes.group_ids = value;
|
|
55
55
|
});
|
|
56
|
+
// string # Action to take on inactive users (disable or delete)
|
|
57
|
+
(0, _defineProperty2.default)(this, "getAction", function () {
|
|
58
|
+
return _this.attributes.action;
|
|
59
|
+
});
|
|
60
|
+
(0, _defineProperty2.default)(this, "setAction", function (value) {
|
|
61
|
+
_this.attributes.action = value;
|
|
62
|
+
});
|
|
56
63
|
// int64 # Number of days of inactivity before the rule applies
|
|
57
64
|
(0, _defineProperty2.default)(this, "getInactivityDays", function () {
|
|
58
65
|
return _this.attributes.inactivity_days;
|
|
@@ -60,34 +67,20 @@ var UserLifecycleRule = /*#__PURE__*/(0, _createClass2.default)(function UserLif
|
|
|
60
67
|
(0, _defineProperty2.default)(this, "setInactivityDays", function (value) {
|
|
61
68
|
_this.attributes.inactivity_days = value;
|
|
62
69
|
});
|
|
63
|
-
// boolean #
|
|
70
|
+
// boolean # If true, the rule will apply to folder admins.
|
|
64
71
|
(0, _defineProperty2.default)(this, "getIncludeFolderAdmins", function () {
|
|
65
72
|
return _this.attributes.include_folder_admins;
|
|
66
73
|
});
|
|
67
74
|
(0, _defineProperty2.default)(this, "setIncludeFolderAdmins", function (value) {
|
|
68
75
|
_this.attributes.include_folder_admins = value;
|
|
69
76
|
});
|
|
70
|
-
// boolean #
|
|
77
|
+
// boolean # If true, the rule will apply to site admins.
|
|
71
78
|
(0, _defineProperty2.default)(this, "getIncludeSiteAdmins", function () {
|
|
72
79
|
return _this.attributes.include_site_admins;
|
|
73
80
|
});
|
|
74
81
|
(0, _defineProperty2.default)(this, "setIncludeSiteAdmins", function (value) {
|
|
75
82
|
_this.attributes.include_site_admins = value;
|
|
76
83
|
});
|
|
77
|
-
// string # Action to take on inactive users (disable or delete)
|
|
78
|
-
(0, _defineProperty2.default)(this, "getAction", function () {
|
|
79
|
-
return _this.attributes.action;
|
|
80
|
-
});
|
|
81
|
-
(0, _defineProperty2.default)(this, "setAction", function (value) {
|
|
82
|
-
_this.attributes.action = value;
|
|
83
|
-
});
|
|
84
|
-
// string # State of the users to apply the rule to (inactive or disabled)
|
|
85
|
-
(0, _defineProperty2.default)(this, "getUserState", function () {
|
|
86
|
-
return _this.attributes.user_state;
|
|
87
|
-
});
|
|
88
|
-
(0, _defineProperty2.default)(this, "setUserState", function (value) {
|
|
89
|
-
_this.attributes.user_state = value;
|
|
90
|
-
});
|
|
91
84
|
// string # User Lifecycle Rule name
|
|
92
85
|
(0, _defineProperty2.default)(this, "getName", function () {
|
|
93
86
|
return _this.attributes.name;
|
|
@@ -95,6 +88,13 @@ var UserLifecycleRule = /*#__PURE__*/(0, _createClass2.default)(function UserLif
|
|
|
95
88
|
(0, _defineProperty2.default)(this, "setName", function (value) {
|
|
96
89
|
_this.attributes.name = value;
|
|
97
90
|
});
|
|
91
|
+
// string # If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
92
|
+
(0, _defineProperty2.default)(this, "getPartnerTag", function () {
|
|
93
|
+
return _this.attributes.partner_tag;
|
|
94
|
+
});
|
|
95
|
+
(0, _defineProperty2.default)(this, "setPartnerTag", function (value) {
|
|
96
|
+
_this.attributes.partner_tag = value;
|
|
97
|
+
});
|
|
98
98
|
// int64 # Site ID
|
|
99
99
|
(0, _defineProperty2.default)(this, "getSiteId", function () {
|
|
100
100
|
return _this.attributes.site_id;
|
|
@@ -102,15 +102,31 @@ var UserLifecycleRule = /*#__PURE__*/(0, _createClass2.default)(function UserLif
|
|
|
102
102
|
(0, _defineProperty2.default)(this, "setSiteId", function (value) {
|
|
103
103
|
_this.attributes.site_id = value;
|
|
104
104
|
});
|
|
105
|
+
// string # State of the users to apply the rule to (inactive or disabled)
|
|
106
|
+
(0, _defineProperty2.default)(this, "getUserState", function () {
|
|
107
|
+
return _this.attributes.user_state;
|
|
108
|
+
});
|
|
109
|
+
(0, _defineProperty2.default)(this, "setUserState", function (value) {
|
|
110
|
+
_this.attributes.user_state = value;
|
|
111
|
+
});
|
|
112
|
+
// string # If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
113
|
+
(0, _defineProperty2.default)(this, "getUserTag", function () {
|
|
114
|
+
return _this.attributes.user_tag;
|
|
115
|
+
});
|
|
116
|
+
(0, _defineProperty2.default)(this, "setUserTag", function (value) {
|
|
117
|
+
_this.attributes.user_tag = value;
|
|
118
|
+
});
|
|
105
119
|
// Parameters:
|
|
106
120
|
// action - string - Action to take on inactive users (disable or delete)
|
|
107
|
-
// authentication_method - string - User authentication method for the rule
|
|
121
|
+
// authentication_method - string - User authentication method for which the rule will apply.
|
|
108
122
|
// group_ids - array(int64) - Array of Group IDs to which the rule applies. If empty or not set, the rule applies to all users.
|
|
109
123
|
// inactivity_days - int64 - Number of days of inactivity before the rule applies
|
|
110
|
-
// include_site_admins - boolean -
|
|
111
|
-
// include_folder_admins - boolean -
|
|
112
|
-
// user_state - string - State of the users to apply the rule to (inactive or disabled)
|
|
124
|
+
// include_site_admins - boolean - If true, the rule will apply to site admins.
|
|
125
|
+
// include_folder_admins - boolean - If true, the rule will apply to folder admins.
|
|
113
126
|
// name - string - User Lifecycle Rule name
|
|
127
|
+
// partner_tag - string - If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
128
|
+
// user_state - string - State of the users to apply the rule to (inactive or disabled)
|
|
129
|
+
// user_tag - string - If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
114
130
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
115
131
|
var params,
|
|
116
132
|
response,
|
|
@@ -162,38 +178,50 @@ var UserLifecycleRule = /*#__PURE__*/(0, _createClass2.default)(function UserLif
|
|
|
162
178
|
}
|
|
163
179
|
throw new errors.InvalidParameterError("Bad parameter: inactivity_days must be of type Int, received ".concat((0, _utils.getType)(params.inactivity_days)));
|
|
164
180
|
case 7:
|
|
165
|
-
if (!(params.
|
|
181
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
166
182
|
_context.next = 8;
|
|
167
183
|
break;
|
|
168
184
|
}
|
|
169
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
185
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
170
186
|
case 8:
|
|
171
|
-
if (!(params.
|
|
187
|
+
if (!(params.partner_tag && !(0, _utils.isString)(params.partner_tag))) {
|
|
172
188
|
_context.next = 9;
|
|
173
189
|
break;
|
|
174
190
|
}
|
|
175
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
191
|
+
throw new errors.InvalidParameterError("Bad parameter: partner_tag must be of type String, received ".concat((0, _utils.getType)(params.partner_tag)));
|
|
176
192
|
case 9:
|
|
177
|
-
if (params.
|
|
193
|
+
if (!(params.user_state && !(0, _utils.isString)(params.user_state))) {
|
|
194
|
+
_context.next = 10;
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
throw new errors.InvalidParameterError("Bad parameter: user_state must be of type String, received ".concat((0, _utils.getType)(params.user_state)));
|
|
198
|
+
case 10:
|
|
199
|
+
if (!(params.user_tag && !(0, _utils.isString)(params.user_tag))) {
|
|
178
200
|
_context.next = 11;
|
|
179
201
|
break;
|
|
180
202
|
}
|
|
203
|
+
throw new errors.InvalidParameterError("Bad parameter: user_tag must be of type String, received ".concat((0, _utils.getType)(params.user_tag)));
|
|
204
|
+
case 11:
|
|
205
|
+
if (params.id) {
|
|
206
|
+
_context.next = 13;
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
181
209
|
if (!_this.attributes.id) {
|
|
182
|
-
_context.next =
|
|
210
|
+
_context.next = 12;
|
|
183
211
|
break;
|
|
184
212
|
}
|
|
185
213
|
params.id = _this.id;
|
|
186
|
-
_context.next =
|
|
214
|
+
_context.next = 13;
|
|
187
215
|
break;
|
|
188
|
-
case
|
|
216
|
+
case 12:
|
|
189
217
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
190
|
-
case
|
|
191
|
-
_context.next =
|
|
218
|
+
case 13:
|
|
219
|
+
_context.next = 14;
|
|
192
220
|
return _Api.default.sendRequest("/user_lifecycle_rules/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
193
|
-
case
|
|
221
|
+
case 14:
|
|
194
222
|
response = _context.sent;
|
|
195
223
|
return _context.abrupt("return", new UserLifecycleRule(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
196
|
-
case
|
|
224
|
+
case 15:
|
|
197
225
|
case "end":
|
|
198
226
|
return _context.stop();
|
|
199
227
|
}
|
|
@@ -296,6 +324,7 @@ _UserLifecycleRule = UserLifecycleRule;
|
|
|
296
324
|
// Parameters:
|
|
297
325
|
// 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.
|
|
298
326
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
327
|
+
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`.
|
|
299
328
|
(0, _defineProperty2.default)(UserLifecycleRule, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
300
329
|
var _response$data;
|
|
301
330
|
var params,
|
|
@@ -391,13 +420,15 @@ _UserLifecycleRule = UserLifecycleRule;
|
|
|
391
420
|
});
|
|
392
421
|
// Parameters:
|
|
393
422
|
// action - string - Action to take on inactive users (disable or delete)
|
|
394
|
-
// authentication_method - string - User authentication method for the rule
|
|
423
|
+
// authentication_method - string - User authentication method for which the rule will apply.
|
|
395
424
|
// group_ids - array(int64) - Array of Group IDs to which the rule applies. If empty or not set, the rule applies to all users.
|
|
396
425
|
// inactivity_days - int64 - Number of days of inactivity before the rule applies
|
|
397
|
-
// include_site_admins - boolean -
|
|
398
|
-
// include_folder_admins - boolean -
|
|
399
|
-
// user_state - string - State of the users to apply the rule to (inactive or disabled)
|
|
426
|
+
// include_site_admins - boolean - If true, the rule will apply to site admins.
|
|
427
|
+
// include_folder_admins - boolean - If true, the rule will apply to folder admins.
|
|
400
428
|
// name - string - User Lifecycle Rule name
|
|
429
|
+
// partner_tag - string - If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
430
|
+
// user_state - string - State of the users to apply the rule to (inactive or disabled)
|
|
431
|
+
// user_tag - string - If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
401
432
|
(0, _defineProperty2.default)(UserLifecycleRule, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
402
433
|
var params,
|
|
403
434
|
options,
|
|
@@ -432,24 +463,36 @@ _UserLifecycleRule = UserLifecycleRule;
|
|
|
432
463
|
}
|
|
433
464
|
throw new errors.InvalidParameterError("Bad parameter: inactivity_days must be of type Int, received ".concat((0, _utils.getType)(params.inactivity_days)));
|
|
434
465
|
case 4:
|
|
435
|
-
if (!(params.
|
|
466
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
436
467
|
_context6.next = 5;
|
|
437
468
|
break;
|
|
438
469
|
}
|
|
439
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
470
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
440
471
|
case 5:
|
|
441
|
-
if (!(params.
|
|
472
|
+
if (!(params.partner_tag && !(0, _utils.isString)(params.partner_tag))) {
|
|
442
473
|
_context6.next = 6;
|
|
443
474
|
break;
|
|
444
475
|
}
|
|
445
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
476
|
+
throw new errors.InvalidParameterError("Bad parameter: partner_tag must be of type String, received ".concat((0, _utils.getType)(params.partner_tag)));
|
|
446
477
|
case 6:
|
|
447
|
-
|
|
448
|
-
|
|
478
|
+
if (!(params.user_state && !(0, _utils.isString)(params.user_state))) {
|
|
479
|
+
_context6.next = 7;
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
throw new errors.InvalidParameterError("Bad parameter: user_state must be of type String, received ".concat((0, _utils.getType)(params.user_state)));
|
|
449
483
|
case 7:
|
|
484
|
+
if (!(params.user_tag && !(0, _utils.isString)(params.user_tag))) {
|
|
485
|
+
_context6.next = 8;
|
|
486
|
+
break;
|
|
487
|
+
}
|
|
488
|
+
throw new errors.InvalidParameterError("Bad parameter: user_tag must be of type String, received ".concat((0, _utils.getType)(params.user_tag)));
|
|
489
|
+
case 8:
|
|
490
|
+
_context6.next = 9;
|
|
491
|
+
return _Api.default.sendRequest('/user_lifecycle_rules', 'POST', params, options);
|
|
492
|
+
case 9:
|
|
450
493
|
response = _context6.sent;
|
|
451
494
|
return _context6.abrupt("return", new _UserLifecycleRule(response === null || response === void 0 ? void 0 : response.data, options));
|
|
452
|
-
case
|
|
495
|
+
case 10:
|
|
453
496
|
case "end":
|
|
454
497
|
return _context6.stop();
|
|
455
498
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/GpgKey.js
CHANGED
|
@@ -49,7 +49,14 @@ class GpgKey {
|
|
|
49
49
|
this.attributes.name = value
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
// int64 # GPG
|
|
52
|
+
// int64 # Partner ID who owns this GPG Key, if applicable.
|
|
53
|
+
getPartnerId = () => this.attributes.partner_id
|
|
54
|
+
|
|
55
|
+
setPartnerId = value => {
|
|
56
|
+
this.attributes.partner_id = value
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// int64 # User ID who owns this GPG Key, if applicable.
|
|
53
60
|
getUserId = () => this.attributes.user_id
|
|
54
61
|
|
|
55
62
|
setUserId = value => {
|
|
@@ -141,6 +148,7 @@ class GpgKey {
|
|
|
141
148
|
}
|
|
142
149
|
|
|
143
150
|
// Parameters:
|
|
151
|
+
// partner_id - int64 - Partner ID who owns this GPG Key, if applicable.
|
|
144
152
|
// public_key - string - MD5 hash of your GPG public key
|
|
145
153
|
// private_key - string - MD5 hash of your GPG private key.
|
|
146
154
|
// private_key_password - string - Your GPG private key password. Only required for password protected keys.
|
|
@@ -159,6 +167,10 @@ class GpgKey {
|
|
|
159
167
|
throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
|
|
160
168
|
}
|
|
161
169
|
|
|
170
|
+
if (params.partner_id && !isInt(params.partner_id)) {
|
|
171
|
+
throw new errors.InvalidParameterError(`Bad parameter: partner_id must be of type Int, received ${getType(params.partner_id)}`)
|
|
172
|
+
}
|
|
173
|
+
|
|
162
174
|
if (params.public_key && !isString(params.public_key)) {
|
|
163
175
|
throw new errors.InvalidParameterError(`Bad parameter: public_key must be of type String, received ${getType(params.public_key)}`)
|
|
164
176
|
}
|
|
@@ -281,6 +293,7 @@ class GpgKey {
|
|
|
281
293
|
|
|
282
294
|
// Parameters:
|
|
283
295
|
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
296
|
+
// partner_id - int64 - Partner ID who owns this GPG Key, if applicable.
|
|
284
297
|
// public_key - string - MD5 hash of your GPG public key
|
|
285
298
|
// private_key - string - MD5 hash of your GPG private key.
|
|
286
299
|
// private_key_password - string - Your GPG private key password. Only required for password protected keys.
|
|
@@ -298,6 +311,10 @@ class GpgKey {
|
|
|
298
311
|
throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params.user_id)}`)
|
|
299
312
|
}
|
|
300
313
|
|
|
314
|
+
if (params.partner_id && !isInt(params.partner_id)) {
|
|
315
|
+
throw new errors.InvalidParameterError(`Bad parameter: partner_id must be of type Int, received ${getType(params.partner_id)}`)
|
|
316
|
+
}
|
|
317
|
+
|
|
301
318
|
if (params.public_key && !isString(params.public_key)) {
|
|
302
319
|
throw new errors.InvalidParameterError(`Bad parameter: public_key must be of type String, received ${getType(params.public_key)}`)
|
|
303
320
|
}
|
package/src/models/Partner.js
CHANGED
|
@@ -77,13 +77,21 @@ class Partner {
|
|
|
77
77
|
this.attributes.root_folder = value
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
// 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.
|
|
81
|
+
getTags = () => this.attributes.tags
|
|
82
|
+
|
|
83
|
+
setTags = value => {
|
|
84
|
+
this.attributes.tags = value
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
// Parameters:
|
|
88
|
+
// name - string - The name of the Partner.
|
|
81
89
|
// allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
82
90
|
// allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
83
91
|
// allow_user_creation - boolean - Allow Partner Admins to create users.
|
|
84
|
-
// name - string - The name of the Partner.
|
|
85
92
|
// notes - string - Notes about this Partner.
|
|
86
93
|
// root_folder - string - The root folder path for this Partner.
|
|
94
|
+
// 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.
|
|
87
95
|
update = async (params = {}) => {
|
|
88
96
|
if (!this.attributes.id) {
|
|
89
97
|
throw new errors.EmptyPropertyError('Current object has no id')
|
|
@@ -110,6 +118,10 @@ class Partner {
|
|
|
110
118
|
throw new errors.InvalidParameterError(`Bad parameter: root_folder must be of type String, received ${getType(params.root_folder)}`)
|
|
111
119
|
}
|
|
112
120
|
|
|
121
|
+
if (params.tags && !isString(params.tags)) {
|
|
122
|
+
throw new errors.InvalidParameterError(`Bad parameter: tags must be of type String, received ${getType(params.tags)}`)
|
|
123
|
+
}
|
|
124
|
+
|
|
113
125
|
if (!params.id) {
|
|
114
126
|
if (this.attributes.id) {
|
|
115
127
|
params.id = this.id
|
|
@@ -210,12 +222,13 @@ class Partner {
|
|
|
210
222
|
Partner.find(id, params, options)
|
|
211
223
|
|
|
212
224
|
// Parameters:
|
|
225
|
+
// name - string - The name of the Partner.
|
|
213
226
|
// allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
214
227
|
// allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
215
228
|
// allow_user_creation - boolean - Allow Partner Admins to create users.
|
|
216
|
-
// name - string - The name of the Partner.
|
|
217
229
|
// notes - string - Notes about this Partner.
|
|
218
230
|
// root_folder - string - The root folder path for this Partner.
|
|
231
|
+
// 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.
|
|
219
232
|
static create = async (params = {}, options = {}) => {
|
|
220
233
|
if (params.name && !isString(params.name)) {
|
|
221
234
|
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
|
|
@@ -229,6 +242,10 @@ class Partner {
|
|
|
229
242
|
throw new errors.InvalidParameterError(`Bad parameter: root_folder must be of type String, received ${getType(params.root_folder)}`)
|
|
230
243
|
}
|
|
231
244
|
|
|
245
|
+
if (params.tags && !isString(params.tags)) {
|
|
246
|
+
throw new errors.InvalidParameterError(`Bad parameter: tags must be of type String, received ${getType(params.tags)}`)
|
|
247
|
+
}
|
|
248
|
+
|
|
232
249
|
const response = await Api.sendRequest('/partners', 'POST', params, options)
|
|
233
250
|
|
|
234
251
|
return new Partner(response?.data, options)
|
package/src/models/Permission.js
CHANGED
|
@@ -77,6 +77,13 @@ class Permission {
|
|
|
77
77
|
this.attributes.partner_id = value
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
// string # Partner name (if applicable)
|
|
81
|
+
getPartnerName = () => this.attributes.partner_name
|
|
82
|
+
|
|
83
|
+
setPartnerName = value => {
|
|
84
|
+
this.attributes.partner_name = value
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
// string # Permission type. See the table referenced in the documentation for an explanation of each permission.
|
|
81
88
|
getPermission = () => this.attributes.permission
|
|
82
89
|
|
package/src/models/PublicKey.js
CHANGED
|
@@ -221,6 +221,7 @@ class PublicKey {
|
|
|
221
221
|
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
222
222
|
// 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.
|
|
223
223
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
224
|
+
// 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`.
|
|
224
225
|
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
|
|
225
226
|
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
226
227
|
// 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/src/models/ScimLog.js
CHANGED
|
@@ -72,6 +72,31 @@ class ScimLog {
|
|
|
72
72
|
|
|
73
73
|
static all = (params = {}, options = {}) =>
|
|
74
74
|
ScimLog.list(params, options)
|
|
75
|
+
|
|
76
|
+
// Parameters:
|
|
77
|
+
// id (required) - int64 - Scim Log ID.
|
|
78
|
+
static find = async (id, params = {}, options = {}) => {
|
|
79
|
+
if (!isObject(params)) {
|
|
80
|
+
throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
params.id = id
|
|
84
|
+
|
|
85
|
+
if (!params.id) {
|
|
86
|
+
throw new errors.MissingParameterError('Parameter missing: id')
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (params.id && !isInt(params.id)) {
|
|
90
|
+
throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const response = await Api.sendRequest(`/scim_logs/${encodeURIComponent(params.id)}`, 'GET', params, options)
|
|
94
|
+
|
|
95
|
+
return new ScimLog(response?.data, options)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static get = (id, params = {}, options = {}) =>
|
|
99
|
+
ScimLog.find(id, params, options)
|
|
75
100
|
}
|
|
76
101
|
|
|
77
102
|
export default ScimLog
|
package/src/models/User.js
CHANGED
|
@@ -458,6 +458,13 @@ class User {
|
|
|
458
458
|
this.attributes.externally_managed = value
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
+
// 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.
|
|
462
|
+
getTags = () => this.attributes.tags
|
|
463
|
+
|
|
464
|
+
setTags = value => {
|
|
465
|
+
this.attributes.tags = value
|
|
466
|
+
}
|
|
467
|
+
|
|
461
468
|
// string # User time zone
|
|
462
469
|
getTimeZone = () => this.attributes.time_zone
|
|
463
470
|
|
|
@@ -584,6 +591,13 @@ class User {
|
|
|
584
591
|
this.attributes.clear_2fa = value
|
|
585
592
|
}
|
|
586
593
|
|
|
594
|
+
// boolean # If true, convert this user to a partner user by assigning the partner_id provided.
|
|
595
|
+
getConvertToPartnerUser = () => this.attributes.convert_to_partner_user
|
|
596
|
+
|
|
597
|
+
setConvertToPartnerUser = value => {
|
|
598
|
+
this.attributes.convert_to_partner_user = value
|
|
599
|
+
}
|
|
600
|
+
|
|
587
601
|
// Unlock user who has been locked out due to failed logins
|
|
588
602
|
unlock = async (params = {}) => {
|
|
589
603
|
if (!this.attributes.id) {
|
|
@@ -709,11 +723,13 @@ class User {
|
|
|
709
723
|
// sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
710
724
|
// subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
711
725
|
// require_2fa - string - 2FA required setting
|
|
726
|
+
// 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.
|
|
712
727
|
// time_zone - string - User time zone
|
|
713
728
|
// 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.
|
|
714
729
|
// user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
715
730
|
// username - string - User's username
|
|
716
731
|
// clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
|
|
732
|
+
// convert_to_partner_user - boolean - If true, convert this user to a partner user by assigning the partner_id provided.
|
|
717
733
|
update = async (params = {}) => {
|
|
718
734
|
if (!this.attributes.id) {
|
|
719
735
|
throw new errors.EmptyPropertyError('Current object has no id')
|
|
@@ -828,6 +844,10 @@ class User {
|
|
|
828
844
|
throw new errors.InvalidParameterError(`Bad parameter: require_2fa must be of type String, received ${getType(params.require_2fa)}`)
|
|
829
845
|
}
|
|
830
846
|
|
|
847
|
+
if (params.tags && !isString(params.tags)) {
|
|
848
|
+
throw new errors.InvalidParameterError(`Bad parameter: tags must be of type String, received ${getType(params.tags)}`)
|
|
849
|
+
}
|
|
850
|
+
|
|
831
851
|
if (params.time_zone && !isString(params.time_zone)) {
|
|
832
852
|
throw new errors.InvalidParameterError(`Bad parameter: time_zone must be of type String, received ${getType(params.time_zone)}`)
|
|
833
853
|
}
|
|
@@ -907,7 +927,7 @@ class User {
|
|
|
907
927
|
// 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.
|
|
908
928
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
909
929
|
// 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`.
|
|
910
|
-
// 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 `
|
|
930
|
+
// 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 ]`.
|
|
911
931
|
// 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`.
|
|
912
932
|
// 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`.
|
|
913
933
|
// 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 ]`.
|
|
@@ -1013,6 +1033,7 @@ class User {
|
|
|
1013
1033
|
// sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
1014
1034
|
// subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
1015
1035
|
// require_2fa - string - 2FA required setting
|
|
1036
|
+
// 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.
|
|
1016
1037
|
// time_zone - string - User time zone
|
|
1017
1038
|
// 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.
|
|
1018
1039
|
// user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
@@ -1122,6 +1143,10 @@ class User {
|
|
|
1122
1143
|
throw new errors.InvalidParameterError(`Bad parameter: require_2fa must be of type String, received ${getType(params.require_2fa)}`)
|
|
1123
1144
|
}
|
|
1124
1145
|
|
|
1146
|
+
if (params.tags && !isString(params.tags)) {
|
|
1147
|
+
throw new errors.InvalidParameterError(`Bad parameter: tags must be of type String, received ${getType(params.tags)}`)
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1125
1150
|
if (params.time_zone && !isString(params.time_zone)) {
|
|
1126
1151
|
throw new errors.InvalidParameterError(`Bad parameter: time_zone must be of type String, received ${getType(params.time_zone)}`)
|
|
1127
1152
|
}
|