files.com 1.2.301 → 1.2.302

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 CHANGED
@@ -1 +1 @@
1
- 1.2.301
1
+ 1.2.302
@@ -151,6 +151,7 @@
151
151
  * `password` (string): User password.
152
152
  * `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
153
153
  * `announcements_read` (boolean): Signifies that the user has read all the announcements in the UI.
154
+ * `clear_2fa` (boolean): If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
154
155
 
155
156
  ---
156
157
 
@@ -384,6 +385,7 @@ await user.update({
384
385
  'user_root': "example",
385
386
  'user_home': "example",
386
387
  'username': "user",
388
+ 'clear_2fa': false,
387
389
  })
388
390
  ```
389
391
 
@@ -437,6 +439,7 @@ await user.update({
437
439
  * `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.
438
440
  * `user_home` (string): Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
439
441
  * `username` (string): User's username
442
+ * `clear_2fa` (boolean): If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
440
443
 
441
444
  ### Example Response
442
445
 
package/lib/Files.js CHANGED
@@ -12,7 +12,7 @@ var apiKey;
12
12
  var baseUrl = 'https://app.files.com';
13
13
  var sessionId = null;
14
14
  var language = null;
15
- var version = '1.2.301';
15
+ var version = '1.2.302';
16
16
  var userAgent = "Files.com JavaScript SDK v".concat(version);
17
17
  var logLevel = _Logger.LogLevel.INFO;
18
18
  var debugRequest = false;
@@ -561,6 +561,13 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
561
561
  (0, _defineProperty2.default)(this, "setAnnouncementsRead", function (value) {
562
562
  _this.attributes.announcements_read = value;
563
563
  });
564
+ // boolean # If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
565
+ (0, _defineProperty2.default)(this, "getClear2fa", function () {
566
+ return _this.attributes.clear_2fa;
567
+ });
568
+ (0, _defineProperty2.default)(this, "setClear2fa", function (value) {
569
+ _this.attributes.clear_2fa = value;
570
+ });
564
571
  // Unlock user who has been locked out due to failed logins
565
572
  (0, _defineProperty2.default)(this, "unlock", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
566
573
  var params,
@@ -756,6 +763,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
756
763
  // 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.
757
764
  // user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
758
765
  // username - string - User's username
766
+ // clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
759
767
  (0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
760
768
  var params,
761
769
  response,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.301",
3
+ "version": "1.2.302",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -6,7 +6,7 @@ let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
8
  let language = null
9
- const version = '1.2.301'
9
+ const version = '1.2.302'
10
10
  let userAgent = `Files.com JavaScript SDK v${version}`
11
11
 
12
12
  let logLevel = LogLevel.INFO
@@ -556,6 +556,13 @@ class User {
556
556
  this.attributes.announcements_read = value
557
557
  }
558
558
 
559
+ // boolean # If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
560
+ getClear2fa = () => this.attributes.clear_2fa
561
+
562
+ setClear2fa = value => {
563
+ this.attributes.clear_2fa = value
564
+ }
565
+
559
566
  // Unlock user who has been locked out due to failed logins
560
567
  unlock = async (params = {}) => {
561
568
  if (!this.attributes.id) {
@@ -682,6 +689,7 @@ class User {
682
689
  // 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.
683
690
  // user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
684
691
  // username - string - User's username
692
+ // clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
685
693
  update = async (params = {}) => {
686
694
  if (!this.attributes.id) {
687
695
  throw new errors.EmptyPropertyError('Current object has no id')