files.com 1.2.132 → 1.2.134

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.132
1
+ 1.2.134
@@ -112,7 +112,7 @@
112
112
 
113
113
  ---
114
114
 
115
- ## List Siem Http Destinations
115
+ ## List SIEM HTTP Destinations
116
116
 
117
117
  ```
118
118
  await SiemHttpDestination.list
@@ -126,7 +126,7 @@ await SiemHttpDestination.list
126
126
 
127
127
  ---
128
128
 
129
- ## Show Siem Http Destination
129
+ ## Show SIEM HTTP Destination
130
130
 
131
131
  ```
132
132
  await SiemHttpDestination.find(id)
@@ -139,7 +139,7 @@ await SiemHttpDestination.find(id)
139
139
 
140
140
  ---
141
141
 
142
- ## Create Siem Http Destination
142
+ ## Create SIEM HTTP Destination
143
143
 
144
144
  ```
145
145
  await SiemHttpDestination.create({
@@ -200,7 +200,7 @@ await SiemHttpDestination.create({
200
200
 
201
201
  ---
202
202
 
203
- ## send_test_entry Siem Http Destination
203
+ ## send_test_entry SIEM HTTP Destination
204
204
 
205
205
  ```
206
206
  await SiemHttpDestination.sendTestEntry({
@@ -263,7 +263,7 @@ await SiemHttpDestination.sendTestEntry({
263
263
 
264
264
  ---
265
265
 
266
- ## Update Siem Http Destination
266
+ ## Update SIEM HTTP Destination
267
267
 
268
268
  ```
269
269
  const siem_http_destination = await SiemHttpDestination.find(id)
@@ -382,7 +382,7 @@ await siem_http_destination.update({
382
382
 
383
383
  ---
384
384
 
385
- ## Delete Siem Http Destination
385
+ ## Delete SIEM HTTP Destination
386
386
 
387
387
  ```
388
388
  const siem_http_destination = await SiemHttpDestination.find(id)
@@ -157,6 +157,7 @@
157
157
  "multiple_regions": true,
158
158
  "read_only": true,
159
159
  "root_path": "example",
160
+ "home_path": "example",
160
161
  "sftp_insecure_ciphers": false,
161
162
  "site_id": 1,
162
163
  "ssl_required": true,
@@ -262,6 +263,7 @@
262
263
  "type_of_2fa_for_display": "yubi",
263
264
  "updated_at": "2000-01-01T01:00:00Z",
264
265
  "user_root": "example",
266
+ "user_home": "example",
265
267
  "days_remaining_until_password_expire": 1,
266
268
  "password_expire_at": "2000-01-01T01:00:00Z"
267
269
  },
@@ -67,6 +67,7 @@
67
67
  "type_of_2fa": "yubi",
68
68
  "type_of_2fa_for_display": "yubi",
69
69
  "user_root": "example",
70
+ "user_home": "example",
70
71
  "days_remaining_until_password_expire": 1,
71
72
  "password_expire_at": "2000-01-01T01:00:00Z"
72
73
  }
@@ -132,7 +133,8 @@
132
133
  * `time_zone` (string): User time zone
133
134
  * `type_of_2fa` (string): Type(s) of 2FA methods in use, for programmatic use. Will be either `sms`, `totp`, `webauthn`, `yubi`, `email`, or multiple values sorted alphabetically and joined by an underscore. Does not specify whether user has more than one of a given method.
134
135
  * `type_of_2fa_for_display` (string): Type(s) of 2FA methods in use, formatted for displaying in the UI. Unlike `type_of_2fa`, this value will make clear when a user has more than 1 of the same type of method.
135
- * `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.
136
+ * `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.
137
+ * `user_home` (string): Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
136
138
  * `days_remaining_until_password_expire` (int64): Number of days remaining until password expires
137
139
  * `password_expire_at` (date-time): Password expiration datetime
138
140
  * `avatar_file` (file): An image file for your user avatar.
@@ -226,6 +228,7 @@ await User.create({
226
228
  'require_2fa': "always_require",
227
229
  'time_zone': "Pacific Time (US & Canada)",
228
230
  'user_root': "example",
231
+ 'user_home': "example",
229
232
  'username': "user",
230
233
  })
231
234
  ```
@@ -277,7 +280,8 @@ await User.create({
277
280
  * `subscribe_to_newsletter` (boolean): Is the user subscribed to the newsletter?
278
281
  * `require_2fa` (string): 2FA required setting
279
282
  * `time_zone` (string): User time zone
280
- * `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.
283
+ * `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.
284
+ * `user_home` (string): Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
281
285
  * `username` (string): Required - User's username
282
286
 
283
287
  ---
@@ -371,6 +375,7 @@ await user.update({
371
375
  'require_2fa': "always_require",
372
376
  'time_zone': "Pacific Time (US & Canada)",
373
377
  'user_root': "example",
378
+ 'user_home': "example",
374
379
  'username': "user",
375
380
  })
376
381
  ```
@@ -422,7 +427,8 @@ await user.update({
422
427
  * `subscribe_to_newsletter` (boolean): Is the user subscribed to the newsletter?
423
428
  * `require_2fa` (string): 2FA required setting
424
429
  * `time_zone` (string): User time zone
425
- * `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.
430
+ * `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.
431
+ * `user_home` (string): Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
426
432
  * `username` (string): User's username
427
433
 
428
434
  ### Example Response
@@ -492,6 +498,7 @@ await user.update({
492
498
  "type_of_2fa": "yubi",
493
499
  "type_of_2fa_for_display": "yubi",
494
500
  "user_root": "example",
501
+ "user_home": "example",
495
502
  "days_remaining_until_password_expire": 1,
496
503
  "password_expire_at": "2000-01-01T01:00:00Z"
497
504
  }
package/lib/Files.js CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
11
11
  var apiKey;
12
12
  var baseUrl = 'https://app.files.com';
13
13
  var sessionId = null;
14
- var version = '1.2.132';
14
+ var version = '1.2.134';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -450,13 +450,20 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
450
450
  (0, _defineProperty2.default)(this, "setTypeOf2faForDisplay", function (value) {
451
451
  _this.attributes.type_of_2fa_for_display = value;
452
452
  });
453
- // 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.
453
+ // 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.
454
454
  (0, _defineProperty2.default)(this, "getUserRoot", function () {
455
455
  return _this.attributes.user_root;
456
456
  });
457
457
  (0, _defineProperty2.default)(this, "setUserRoot", function (value) {
458
458
  _this.attributes.user_root = value;
459
459
  });
460
+ // string # Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
461
+ (0, _defineProperty2.default)(this, "getUserHome", function () {
462
+ return _this.attributes.user_home;
463
+ });
464
+ (0, _defineProperty2.default)(this, "setUserHome", function (value) {
465
+ _this.attributes.user_home = value;
466
+ });
460
467
  // int64 # Number of days remaining until password expires
461
468
  (0, _defineProperty2.default)(this, "getDaysRemainingUntilPasswordExpire", function () {
462
469
  return _this.attributes.days_remaining_until_password_expire;
@@ -733,7 +740,8 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
733
740
  // subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
734
741
  // require_2fa - string - 2FA required setting
735
742
  // time_zone - string - User time zone
736
- // 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.
743
+ // 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.
744
+ // user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
737
745
  // username - string - User's username
738
746
  (0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
739
747
  var params,
@@ -912,32 +920,38 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
912
920
  }
913
921
  throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
914
922
  case 58:
915
- if (!(params.username && !(0, _utils.isString)(params.username))) {
923
+ if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
916
924
  _context4.next = 60;
917
925
  break;
918
926
  }
919
- throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
927
+ throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
920
928
  case 60:
929
+ if (!(params.username && !(0, _utils.isString)(params.username))) {
930
+ _context4.next = 62;
931
+ break;
932
+ }
933
+ throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
934
+ case 62:
921
935
  if (params.id) {
922
- _context4.next = 66;
936
+ _context4.next = 68;
923
937
  break;
924
938
  }
925
939
  if (!_this.attributes.id) {
926
- _context4.next = 65;
940
+ _context4.next = 67;
927
941
  break;
928
942
  }
929
943
  params.id = _this.id;
930
- _context4.next = 66;
944
+ _context4.next = 68;
931
945
  break;
932
- case 65:
946
+ case 67:
933
947
  throw new errors.MissingParameterError('Parameter missing: id');
934
- case 66:
935
- _context4.next = 68;
936
- return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
937
948
  case 68:
949
+ _context4.next = 70;
950
+ return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
951
+ case 70:
938
952
  response = _context4.sent;
939
953
  return _context4.abrupt("return", new User(response === null || response === void 0 ? void 0 : response.data, _this.options));
940
- case 70:
954
+ case 72:
941
955
  case "end":
942
956
  return _context4.stop();
943
957
  }
@@ -1199,7 +1213,8 @@ _User = User;
1199
1213
  // subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
1200
1214
  // require_2fa - string - 2FA required setting
1201
1215
  // time_zone - string - User time zone
1202
- // 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.
1216
+ // 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.
1217
+ // user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
1203
1218
  // username (required) - string - User's username
1204
1219
  (0, _defineProperty2.default)(User, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
1205
1220
  var params,
@@ -1367,18 +1382,24 @@ _User = User;
1367
1382
  }
1368
1383
  throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
1369
1384
  case 54:
1370
- if (!(params.username && !(0, _utils.isString)(params.username))) {
1385
+ if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
1371
1386
  _context9.next = 56;
1372
1387
  break;
1373
1388
  }
1374
- throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
1389
+ throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
1375
1390
  case 56:
1376
- _context9.next = 58;
1377
- return _Api.default.sendRequest('/users', 'POST', params, options);
1391
+ if (!(params.username && !(0, _utils.isString)(params.username))) {
1392
+ _context9.next = 58;
1393
+ break;
1394
+ }
1395
+ throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
1378
1396
  case 58:
1397
+ _context9.next = 60;
1398
+ return _Api.default.sendRequest('/users', 'POST', params, options);
1399
+ case 60:
1379
1400
  response = _context9.sent;
1380
1401
  return _context9.abrupt("return", new _User(response === null || response === void 0 ? void 0 : response.data, options));
1381
- case 60:
1402
+ case 62:
1382
1403
  case "end":
1383
1404
  return _context9.stop();
1384
1405
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.132",
3
+ "version": "1.2.134",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
5
5
  let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
- const version = '1.2.132'
8
+ const version = '1.2.134'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -444,13 +444,20 @@ class User {
444
444
  this.attributes.type_of_2fa_for_display = value
445
445
  }
446
446
 
447
- // 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.
447
+ // 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.
448
448
  getUserRoot = () => this.attributes.user_root
449
449
 
450
450
  setUserRoot = value => {
451
451
  this.attributes.user_root = value
452
452
  }
453
453
 
454
+ // string # Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
455
+ getUserHome = () => this.attributes.user_home
456
+
457
+ setUserHome = value => {
458
+ this.attributes.user_home = value
459
+ }
460
+
454
461
  // int64 # Number of days remaining until password expires
455
462
  getDaysRemainingUntilPasswordExpire = () => this.attributes.days_remaining_until_password_expire
456
463
 
@@ -658,7 +665,8 @@ class User {
658
665
  // subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
659
666
  // require_2fa - string - 2FA required setting
660
667
  // time_zone - string - User time zone
661
- // 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.
668
+ // 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.
669
+ // user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
662
670
  // username - string - User's username
663
671
  update = async (params = {}) => {
664
672
  if (!this.attributes.id) {
@@ -774,6 +782,10 @@ class User {
774
782
  throw new errors.InvalidParameterError(`Bad parameter: user_root must be of type String, received ${getType(params.user_root)}`)
775
783
  }
776
784
 
785
+ if (params.user_home && !isString(params.user_home)) {
786
+ throw new errors.InvalidParameterError(`Bad parameter: user_home must be of type String, received ${getType(params.user_home)}`)
787
+ }
788
+
777
789
  if (params.username && !isString(params.username)) {
778
790
  throw new errors.InvalidParameterError(`Bad parameter: username must be of type String, received ${getType(params.username)}`)
779
791
  }
@@ -938,7 +950,8 @@ class User {
938
950
  // subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
939
951
  // require_2fa - string - 2FA required setting
940
952
  // time_zone - string - User time zone
941
- // 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.
953
+ // 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.
954
+ // user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
942
955
  // username (required) - string - User's username
943
956
  static create = async (params = {}, options = {}) => {
944
957
  if (!params.username) {
@@ -1045,6 +1058,10 @@ class User {
1045
1058
  throw new errors.InvalidParameterError(`Bad parameter: user_root must be of type String, received ${getType(params.user_root)}`)
1046
1059
  }
1047
1060
 
1061
+ if (params.user_home && !isString(params.user_home)) {
1062
+ throw new errors.InvalidParameterError(`Bad parameter: user_home must be of type String, received ${getType(params.user_home)}`)
1063
+ }
1064
+
1048
1065
  if (params.username && !isString(params.username)) {
1049
1066
  throw new errors.InvalidParameterError(`Bad parameter: username must be of type String, received ${getType(params.username)}`)
1050
1067
  }