files.com 1.0.216 → 1.0.218

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.216
1
+ 1.0.218
@@ -6,6 +6,7 @@
6
6
  {
7
7
  "id": 1,
8
8
  "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
9
+ "description": "",
9
10
  "created_at": "2000-01-01T01:00:00Z",
10
11
  "expires_at": "2000-01-01T01:00:00Z",
11
12
  "key": "[key]",
@@ -20,6 +21,7 @@
20
21
 
21
22
  * `id` (int64): API Key ID
22
23
  * `descriptive_label` (string): Unique label that describes this API key. Useful for external systems where you may have API keys from multiple accounts and want a human-readable label for each key.
24
+ * `description` (string): User-supplied description of API key.
23
25
  * `created_at` (date-time): Time which API Key was created
24
26
  * `expires_at` (date-time): API Key expiration date
25
27
  * `key` (string): API Key actual key string
@@ -96,6 +98,7 @@ await ApiKey.create({
96
98
 
97
99
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
98
100
  * `name` (string): Internal name for the API Key. For your use.
101
+ * `description` (string): User-supplied description of API key.
99
102
  * `expires_at` (string): API Key expiration date
100
103
  * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
101
104
  * `path` (string): Folder path restriction for this api key.
@@ -146,6 +149,7 @@ await api_key.update({
146
149
 
147
150
  * `id` (int64): Required - Api Key ID.
148
151
  * `name` (string): Internal name for the API Key. For your use.
152
+ * `description` (string): User-supplied description of API key.
149
153
  * `expires_at` (string): API Key expiration date
150
154
  * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
151
155
 
@@ -155,6 +159,7 @@ await api_key.update({
155
159
  {
156
160
  "id": 1,
157
161
  "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
162
+ "description": "",
158
163
  "created_at": "2000-01-01T01:00:00Z",
159
164
  "expires_at": "2000-01-01T01:00:00Z",
160
165
  "key": "[key]",
@@ -96,6 +96,9 @@
96
96
  "uri": "https://mysite.files.com/.../my_image.png"
97
97
  },
98
98
  "max_prior_passwords": 1,
99
+ "motd_text": "",
100
+ "motd_use_for_ftp": true,
101
+ "motd_use_for_sftp": true,
99
102
  "next_billing_amount": 1.0,
100
103
  "next_billing_date": "Apr 20",
101
104
  "office_integration_available": true,
@@ -305,6 +308,9 @@
305
308
  * `login_help_text` (string): Login help text
306
309
  * `logo` (Image): Branded logo
307
310
  * `max_prior_passwords` (int64): Number of prior passwords to disallow
311
+ * `motd_text` (string): A message to show users when they connect via FTP or SFTP.
312
+ * `motd_use_for_ftp` (boolean): Show message to users connecting via FTP
313
+ * `motd_use_for_sftp` (boolean): Show message to users connecting via SFTP
308
314
  * `next_billing_amount` (double): Next billing amount
309
315
  * `next_billing_date` (string): Next billing date
310
316
  * `office_integration_available` (boolean): Allow users to use Office for the web?
@@ -414,6 +420,8 @@ await Site.update({
414
420
  'welcome_screen': "user_controlled",
415
421
  'office_integration_available': true,
416
422
  'pin_all_remote_servers_to_site_region': true,
423
+ 'motd_use_for_ftp': true,
424
+ 'motd_use_for_sftp': true,
417
425
  'session_expiry': 1.0,
418
426
  'ssl_required': true,
419
427
  'tls_disabled': true,
@@ -526,6 +534,9 @@ await Site.update({
526
534
  * `welcome_screen` (string): Does the welcome screen appear?
527
535
  * `office_integration_available` (boolean): Allow users to use Office for the web?
528
536
  * `pin_all_remote_servers_to_site_region` (boolean): If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
537
+ * `motd_text` (string): A message to show users when they connect via FTP or SFTP.
538
+ * `motd_use_for_ftp` (boolean): Show message to users connecting via FTP
539
+ * `motd_use_for_sftp` (boolean): Show message to users connecting via SFTP
529
540
  * `session_expiry` (double): Session expiry in hours
530
541
  * `ssl_required` (boolean): Is SSL required? Disabling this is insecure.
531
542
  * `tls_disabled` (boolean): Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
@@ -61,6 +61,12 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
61
61
  (0, _defineProperty2.default)(this, "setDescriptiveLabel", function (value) {
62
62
  _this.attributes.descriptive_label = value;
63
63
  });
64
+ (0, _defineProperty2.default)(this, "getDescription", function () {
65
+ return _this.attributes.description;
66
+ });
67
+ (0, _defineProperty2.default)(this, "setDescription", function (value) {
68
+ _this.attributes.description = value;
69
+ });
64
70
  (0, _defineProperty2.default)(this, "getCreatedAt", function () {
65
71
  return _this.attributes.created_at;
66
72
  });
@@ -156,48 +162,56 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
156
162
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
157
163
 
158
164
  case 10:
159
- if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
165
+ if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
160
166
  _context.next = 12;
161
167
  break;
162
168
  }
163
169
 
164
- throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(expires_at)));
170
+ throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(description)));
165
171
 
166
172
  case 12:
167
- if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
173
+ if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
168
174
  _context.next = 14;
169
175
  break;
170
176
  }
171
177
 
172
- throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(permission_set)));
178
+ throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(expires_at)));
173
179
 
174
180
  case 14:
181
+ if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
182
+ _context.next = 16;
183
+ break;
184
+ }
185
+
186
+ throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(permission_set)));
187
+
188
+ case 16:
175
189
  if (params['id']) {
176
- _context.next = 20;
190
+ _context.next = 22;
177
191
  break;
178
192
  }
179
193
 
180
194
  if (!_this.attributes.id) {
181
- _context.next = 19;
195
+ _context.next = 21;
182
196
  break;
183
197
  }
184
198
 
185
199
  params['id'] = _this.id;
186
- _context.next = 20;
200
+ _context.next = 22;
187
201
  break;
188
202
 
189
- case 19:
203
+ case 21:
190
204
  throw new errors.MissingParameterError('Parameter missing: id');
191
205
 
192
- case 20:
193
- _context.next = 22;
206
+ case 22:
207
+ _context.next = 24;
194
208
  return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
195
209
 
196
- case 22:
210
+ case 24:
197
211
  response = _context.sent;
198
212
  return _context.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, _this.options));
199
213
 
200
- case 24:
214
+ case 26:
201
215
  case "end":
202
216
  return _context.stop();
203
217
  }
@@ -472,38 +486,46 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
472
486
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
473
487
 
474
488
  case 6:
475
- if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
489
+ if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
476
490
  _context6.next = 8;
477
491
  break;
478
492
  }
479
493
 
480
- throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
494
+ throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params['description'])));
481
495
 
482
496
  case 8:
483
- if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
497
+ if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
484
498
  _context6.next = 10;
485
499
  break;
486
500
  }
487
501
 
488
- throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params['permission_set'])));
502
+ throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
489
503
 
490
504
  case 10:
491
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
505
+ if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
492
506
  _context6.next = 12;
493
507
  break;
494
508
  }
495
509
 
496
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
510
+ throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params['permission_set'])));
497
511
 
498
512
  case 12:
499
- _context6.next = 14;
500
- return _Api.default.sendRequest("/api_keys", 'POST', params, options);
513
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
514
+ _context6.next = 14;
515
+ break;
516
+ }
517
+
518
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
501
519
 
502
520
  case 14:
521
+ _context6.next = 16;
522
+ return _Api.default.sendRequest("/api_keys", 'POST', params, options);
523
+
524
+ case 16:
503
525
  response = _context6.sent;
504
526
  return _context6.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, options));
505
527
 
506
- case 16:
528
+ case 18:
507
529
  case "end":
508
530
  return _context6.stop();
509
531
  }
@@ -271,6 +271,15 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
271
271
  (0, _defineProperty2.default)(this, "getMaxPriorPasswords", function () {
272
272
  return _this.attributes.max_prior_passwords;
273
273
  });
274
+ (0, _defineProperty2.default)(this, "getMotdText", function () {
275
+ return _this.attributes.motd_text;
276
+ });
277
+ (0, _defineProperty2.default)(this, "getMotdUseForFtp", function () {
278
+ return _this.attributes.motd_use_for_ftp;
279
+ });
280
+ (0, _defineProperty2.default)(this, "getMotdUseForSftp", function () {
281
+ return _this.attributes.motd_use_for_sftp;
282
+ });
274
283
  (0, _defineProperty2.default)(this, "getNextBillingAmount", function () {
275
284
  return _this.attributes.next_billing_amount;
276
285
  });
@@ -637,350 +646,358 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
637
646
  throw new errors.InvalidParameterError("Bad parameter: welcome_screen must be of type String, received ".concat((0, _utils.getType)(params['welcome_screen'])));
638
647
 
639
648
  case 32:
640
- if (!(params['user_lockout_tries'] && !(0, _utils.isInt)(params['user_lockout_tries']))) {
649
+ if (!(params['motd_text'] && !(0, _utils.isString)(params['motd_text']))) {
641
650
  _context3.next = 34;
642
651
  break;
643
652
  }
644
653
 
645
- throw new errors.InvalidParameterError("Bad parameter: user_lockout_tries must be of type Int, received ".concat((0, _utils.getType)(params['user_lockout_tries'])));
654
+ throw new errors.InvalidParameterError("Bad parameter: motd_text must be of type String, received ".concat((0, _utils.getType)(params['motd_text'])));
646
655
 
647
656
  case 34:
648
- if (!(params['user_lockout_within'] && !(0, _utils.isInt)(params['user_lockout_within']))) {
657
+ if (!(params['user_lockout_tries'] && !(0, _utils.isInt)(params['user_lockout_tries']))) {
649
658
  _context3.next = 36;
650
659
  break;
651
660
  }
652
661
 
653
- throw new errors.InvalidParameterError("Bad parameter: user_lockout_within must be of type Int, received ".concat((0, _utils.getType)(params['user_lockout_within'])));
662
+ throw new errors.InvalidParameterError("Bad parameter: user_lockout_tries must be of type Int, received ".concat((0, _utils.getType)(params['user_lockout_tries'])));
654
663
 
655
664
  case 36:
656
- if (!(params['user_lockout_lock_period'] && !(0, _utils.isInt)(params['user_lockout_lock_period']))) {
665
+ if (!(params['user_lockout_within'] && !(0, _utils.isInt)(params['user_lockout_within']))) {
657
666
  _context3.next = 38;
658
667
  break;
659
668
  }
660
669
 
661
- throw new errors.InvalidParameterError("Bad parameter: user_lockout_lock_period must be of type Int, received ".concat((0, _utils.getType)(params['user_lockout_lock_period'])));
670
+ throw new errors.InvalidParameterError("Bad parameter: user_lockout_within must be of type Int, received ".concat((0, _utils.getType)(params['user_lockout_within'])));
662
671
 
663
672
  case 38:
664
- if (!(params['allowed_countries'] && !(0, _utils.isString)(params['allowed_countries']))) {
673
+ if (!(params['user_lockout_lock_period'] && !(0, _utils.isInt)(params['user_lockout_lock_period']))) {
665
674
  _context3.next = 40;
666
675
  break;
667
676
  }
668
677
 
669
- throw new errors.InvalidParameterError("Bad parameter: allowed_countries must be of type String, received ".concat((0, _utils.getType)(params['allowed_countries'])));
678
+ throw new errors.InvalidParameterError("Bad parameter: user_lockout_lock_period must be of type Int, received ".concat((0, _utils.getType)(params['user_lockout_lock_period'])));
670
679
 
671
680
  case 40:
672
- if (!(params['allowed_ips'] && !(0, _utils.isString)(params['allowed_ips']))) {
681
+ if (!(params['allowed_countries'] && !(0, _utils.isString)(params['allowed_countries']))) {
673
682
  _context3.next = 42;
674
683
  break;
675
684
  }
676
685
 
677
- throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params['allowed_ips'])));
686
+ throw new errors.InvalidParameterError("Bad parameter: allowed_countries must be of type String, received ".concat((0, _utils.getType)(params['allowed_countries'])));
678
687
 
679
688
  case 42:
680
- if (!(params['disallowed_countries'] && !(0, _utils.isString)(params['disallowed_countries']))) {
689
+ if (!(params['allowed_ips'] && !(0, _utils.isString)(params['allowed_ips']))) {
681
690
  _context3.next = 44;
682
691
  break;
683
692
  }
684
693
 
685
- throw new errors.InvalidParameterError("Bad parameter: disallowed_countries must be of type String, received ".concat((0, _utils.getType)(params['disallowed_countries'])));
694
+ throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params['allowed_ips'])));
686
695
 
687
696
  case 44:
688
- if (!(params['days_to_retain_backups'] && !(0, _utils.isInt)(params['days_to_retain_backups']))) {
697
+ if (!(params['disallowed_countries'] && !(0, _utils.isString)(params['disallowed_countries']))) {
689
698
  _context3.next = 46;
690
699
  break;
691
700
  }
692
701
 
693
- throw new errors.InvalidParameterError("Bad parameter: days_to_retain_backups must be of type Int, received ".concat((0, _utils.getType)(params['days_to_retain_backups'])));
702
+ throw new errors.InvalidParameterError("Bad parameter: disallowed_countries must be of type String, received ".concat((0, _utils.getType)(params['disallowed_countries'])));
694
703
 
695
704
  case 46:
696
- if (!(params['max_prior_passwords'] && !(0, _utils.isInt)(params['max_prior_passwords']))) {
705
+ if (!(params['days_to_retain_backups'] && !(0, _utils.isInt)(params['days_to_retain_backups']))) {
697
706
  _context3.next = 48;
698
707
  break;
699
708
  }
700
709
 
701
- throw new errors.InvalidParameterError("Bad parameter: max_prior_passwords must be of type Int, received ".concat((0, _utils.getType)(params['max_prior_passwords'])));
710
+ throw new errors.InvalidParameterError("Bad parameter: days_to_retain_backups must be of type Int, received ".concat((0, _utils.getType)(params['days_to_retain_backups'])));
702
711
 
703
712
  case 48:
704
- if (!(params['password_validity_days'] && !(0, _utils.isInt)(params['password_validity_days']))) {
713
+ if (!(params['max_prior_passwords'] && !(0, _utils.isInt)(params['max_prior_passwords']))) {
705
714
  _context3.next = 50;
706
715
  break;
707
716
  }
708
717
 
709
- throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params['password_validity_days'])));
718
+ throw new errors.InvalidParameterError("Bad parameter: max_prior_passwords must be of type Int, received ".concat((0, _utils.getType)(params['max_prior_passwords'])));
710
719
 
711
720
  case 50:
712
- if (!(params['password_min_length'] && !(0, _utils.isInt)(params['password_min_length']))) {
721
+ if (!(params['password_validity_days'] && !(0, _utils.isInt)(params['password_validity_days']))) {
713
722
  _context3.next = 52;
714
723
  break;
715
724
  }
716
725
 
717
- throw new errors.InvalidParameterError("Bad parameter: password_min_length must be of type Int, received ".concat((0, _utils.getType)(params['password_min_length'])));
726
+ throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params['password_validity_days'])));
718
727
 
719
728
  case 52:
720
- if (!(params['disable_users_from_inactivity_period_days'] && !(0, _utils.isInt)(params['disable_users_from_inactivity_period_days']))) {
729
+ if (!(params['password_min_length'] && !(0, _utils.isInt)(params['password_min_length']))) {
721
730
  _context3.next = 54;
722
731
  break;
723
732
  }
724
733
 
725
- throw new errors.InvalidParameterError("Bad parameter: disable_users_from_inactivity_period_days must be of type Int, received ".concat((0, _utils.getType)(params['disable_users_from_inactivity_period_days'])));
734
+ throw new errors.InvalidParameterError("Bad parameter: password_min_length must be of type Int, received ".concat((0, _utils.getType)(params['password_min_length'])));
726
735
 
727
736
  case 54:
728
- if (!(params['require_2fa_user_type'] && !(0, _utils.isString)(params['require_2fa_user_type']))) {
737
+ if (!(params['disable_users_from_inactivity_period_days'] && !(0, _utils.isInt)(params['disable_users_from_inactivity_period_days']))) {
729
738
  _context3.next = 56;
730
739
  break;
731
740
  }
732
741
 
733
- throw new errors.InvalidParameterError("Bad parameter: require_2fa_user_type must be of type String, received ".concat((0, _utils.getType)(params['require_2fa_user_type'])));
742
+ throw new errors.InvalidParameterError("Bad parameter: disable_users_from_inactivity_period_days must be of type Int, received ".concat((0, _utils.getType)(params['disable_users_from_inactivity_period_days'])));
734
743
 
735
744
  case 56:
736
- if (!(params['color2_top'] && !(0, _utils.isString)(params['color2_top']))) {
745
+ if (!(params['require_2fa_user_type'] && !(0, _utils.isString)(params['require_2fa_user_type']))) {
737
746
  _context3.next = 58;
738
747
  break;
739
748
  }
740
749
 
741
- throw new errors.InvalidParameterError("Bad parameter: color2_top must be of type String, received ".concat((0, _utils.getType)(params['color2_top'])));
750
+ throw new errors.InvalidParameterError("Bad parameter: require_2fa_user_type must be of type String, received ".concat((0, _utils.getType)(params['require_2fa_user_type'])));
742
751
 
743
752
  case 58:
744
- if (!(params['color2_left'] && !(0, _utils.isString)(params['color2_left']))) {
753
+ if (!(params['color2_top'] && !(0, _utils.isString)(params['color2_top']))) {
745
754
  _context3.next = 60;
746
755
  break;
747
756
  }
748
757
 
749
- throw new errors.InvalidParameterError("Bad parameter: color2_left must be of type String, received ".concat((0, _utils.getType)(params['color2_left'])));
758
+ throw new errors.InvalidParameterError("Bad parameter: color2_top must be of type String, received ".concat((0, _utils.getType)(params['color2_top'])));
750
759
 
751
760
  case 60:
752
- if (!(params['color2_link'] && !(0, _utils.isString)(params['color2_link']))) {
761
+ if (!(params['color2_left'] && !(0, _utils.isString)(params['color2_left']))) {
753
762
  _context3.next = 62;
754
763
  break;
755
764
  }
756
765
 
757
- throw new errors.InvalidParameterError("Bad parameter: color2_link must be of type String, received ".concat((0, _utils.getType)(params['color2_link'])));
766
+ throw new errors.InvalidParameterError("Bad parameter: color2_left must be of type String, received ".concat((0, _utils.getType)(params['color2_left'])));
758
767
 
759
768
  case 62:
760
- if (!(params['color2_text'] && !(0, _utils.isString)(params['color2_text']))) {
769
+ if (!(params['color2_link'] && !(0, _utils.isString)(params['color2_link']))) {
761
770
  _context3.next = 64;
762
771
  break;
763
772
  }
764
773
 
765
- throw new errors.InvalidParameterError("Bad parameter: color2_text must be of type String, received ".concat((0, _utils.getType)(params['color2_text'])));
774
+ throw new errors.InvalidParameterError("Bad parameter: color2_link must be of type String, received ".concat((0, _utils.getType)(params['color2_link'])));
766
775
 
767
776
  case 64:
768
- if (!(params['color2_top_text'] && !(0, _utils.isString)(params['color2_top_text']))) {
777
+ if (!(params['color2_text'] && !(0, _utils.isString)(params['color2_text']))) {
769
778
  _context3.next = 66;
770
779
  break;
771
780
  }
772
781
 
773
- throw new errors.InvalidParameterError("Bad parameter: color2_top_text must be of type String, received ".concat((0, _utils.getType)(params['color2_top_text'])));
782
+ throw new errors.InvalidParameterError("Bad parameter: color2_text must be of type String, received ".concat((0, _utils.getType)(params['color2_text'])));
774
783
 
775
784
  case 66:
776
- if (!(params['site_header'] && !(0, _utils.isString)(params['site_header']))) {
785
+ if (!(params['color2_top_text'] && !(0, _utils.isString)(params['color2_top_text']))) {
777
786
  _context3.next = 68;
778
787
  break;
779
788
  }
780
789
 
781
- throw new errors.InvalidParameterError("Bad parameter: site_header must be of type String, received ".concat((0, _utils.getType)(params['site_header'])));
790
+ throw new errors.InvalidParameterError("Bad parameter: color2_top_text must be of type String, received ".concat((0, _utils.getType)(params['color2_top_text'])));
782
791
 
783
792
  case 68:
784
- if (!(params['site_footer'] && !(0, _utils.isString)(params['site_footer']))) {
793
+ if (!(params['site_header'] && !(0, _utils.isString)(params['site_header']))) {
785
794
  _context3.next = 70;
786
795
  break;
787
796
  }
788
797
 
789
- throw new errors.InvalidParameterError("Bad parameter: site_footer must be of type String, received ".concat((0, _utils.getType)(params['site_footer'])));
798
+ throw new errors.InvalidParameterError("Bad parameter: site_header must be of type String, received ".concat((0, _utils.getType)(params['site_header'])));
790
799
 
791
800
  case 70:
792
- if (!(params['login_help_text'] && !(0, _utils.isString)(params['login_help_text']))) {
801
+ if (!(params['site_footer'] && !(0, _utils.isString)(params['site_footer']))) {
793
802
  _context3.next = 72;
794
803
  break;
795
804
  }
796
805
 
797
- throw new errors.InvalidParameterError("Bad parameter: login_help_text must be of type String, received ".concat((0, _utils.getType)(params['login_help_text'])));
806
+ throw new errors.InvalidParameterError("Bad parameter: site_footer must be of type String, received ".concat((0, _utils.getType)(params['site_footer'])));
798
807
 
799
808
  case 72:
800
- if (!(params['smtp_address'] && !(0, _utils.isString)(params['smtp_address']))) {
809
+ if (!(params['login_help_text'] && !(0, _utils.isString)(params['login_help_text']))) {
801
810
  _context3.next = 74;
802
811
  break;
803
812
  }
804
813
 
805
- throw new errors.InvalidParameterError("Bad parameter: smtp_address must be of type String, received ".concat((0, _utils.getType)(params['smtp_address'])));
814
+ throw new errors.InvalidParameterError("Bad parameter: login_help_text must be of type String, received ".concat((0, _utils.getType)(params['login_help_text'])));
806
815
 
807
816
  case 74:
808
- if (!(params['smtp_authentication'] && !(0, _utils.isString)(params['smtp_authentication']))) {
817
+ if (!(params['smtp_address'] && !(0, _utils.isString)(params['smtp_address']))) {
809
818
  _context3.next = 76;
810
819
  break;
811
820
  }
812
821
 
813
- throw new errors.InvalidParameterError("Bad parameter: smtp_authentication must be of type String, received ".concat((0, _utils.getType)(params['smtp_authentication'])));
822
+ throw new errors.InvalidParameterError("Bad parameter: smtp_address must be of type String, received ".concat((0, _utils.getType)(params['smtp_address'])));
814
823
 
815
824
  case 76:
816
- if (!(params['smtp_from'] && !(0, _utils.isString)(params['smtp_from']))) {
825
+ if (!(params['smtp_authentication'] && !(0, _utils.isString)(params['smtp_authentication']))) {
817
826
  _context3.next = 78;
818
827
  break;
819
828
  }
820
829
 
821
- throw new errors.InvalidParameterError("Bad parameter: smtp_from must be of type String, received ".concat((0, _utils.getType)(params['smtp_from'])));
830
+ throw new errors.InvalidParameterError("Bad parameter: smtp_authentication must be of type String, received ".concat((0, _utils.getType)(params['smtp_authentication'])));
822
831
 
823
832
  case 78:
824
- if (!(params['smtp_username'] && !(0, _utils.isString)(params['smtp_username']))) {
833
+ if (!(params['smtp_from'] && !(0, _utils.isString)(params['smtp_from']))) {
825
834
  _context3.next = 80;
826
835
  break;
827
836
  }
828
837
 
829
- throw new errors.InvalidParameterError("Bad parameter: smtp_username must be of type String, received ".concat((0, _utils.getType)(params['smtp_username'])));
838
+ throw new errors.InvalidParameterError("Bad parameter: smtp_from must be of type String, received ".concat((0, _utils.getType)(params['smtp_from'])));
830
839
 
831
840
  case 80:
832
- if (!(params['smtp_port'] && !(0, _utils.isInt)(params['smtp_port']))) {
841
+ if (!(params['smtp_username'] && !(0, _utils.isString)(params['smtp_username']))) {
833
842
  _context3.next = 82;
834
843
  break;
835
844
  }
836
845
 
837
- throw new errors.InvalidParameterError("Bad parameter: smtp_port must be of type Int, received ".concat((0, _utils.getType)(params['smtp_port'])));
846
+ throw new errors.InvalidParameterError("Bad parameter: smtp_username must be of type String, received ".concat((0, _utils.getType)(params['smtp_username'])));
838
847
 
839
848
  case 82:
840
- if (!(params['ldap_type'] && !(0, _utils.isString)(params['ldap_type']))) {
849
+ if (!(params['smtp_port'] && !(0, _utils.isInt)(params['smtp_port']))) {
841
850
  _context3.next = 84;
842
851
  break;
843
852
  }
844
853
 
845
- throw new errors.InvalidParameterError("Bad parameter: ldap_type must be of type String, received ".concat((0, _utils.getType)(params['ldap_type'])));
854
+ throw new errors.InvalidParameterError("Bad parameter: smtp_port must be of type Int, received ".concat((0, _utils.getType)(params['smtp_port'])));
846
855
 
847
856
  case 84:
848
- if (!(params['ldap_host'] && !(0, _utils.isString)(params['ldap_host']))) {
857
+ if (!(params['ldap_type'] && !(0, _utils.isString)(params['ldap_type']))) {
849
858
  _context3.next = 86;
850
859
  break;
851
860
  }
852
861
 
853
- throw new errors.InvalidParameterError("Bad parameter: ldap_host must be of type String, received ".concat((0, _utils.getType)(params['ldap_host'])));
862
+ throw new errors.InvalidParameterError("Bad parameter: ldap_type must be of type String, received ".concat((0, _utils.getType)(params['ldap_type'])));
854
863
 
855
864
  case 86:
856
- if (!(params['ldap_host_2'] && !(0, _utils.isString)(params['ldap_host_2']))) {
865
+ if (!(params['ldap_host'] && !(0, _utils.isString)(params['ldap_host']))) {
857
866
  _context3.next = 88;
858
867
  break;
859
868
  }
860
869
 
861
- throw new errors.InvalidParameterError("Bad parameter: ldap_host_2 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_2'])));
870
+ throw new errors.InvalidParameterError("Bad parameter: ldap_host must be of type String, received ".concat((0, _utils.getType)(params['ldap_host'])));
862
871
 
863
872
  case 88:
864
- if (!(params['ldap_host_3'] && !(0, _utils.isString)(params['ldap_host_3']))) {
873
+ if (!(params['ldap_host_2'] && !(0, _utils.isString)(params['ldap_host_2']))) {
865
874
  _context3.next = 90;
866
875
  break;
867
876
  }
868
877
 
869
- throw new errors.InvalidParameterError("Bad parameter: ldap_host_3 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_3'])));
878
+ throw new errors.InvalidParameterError("Bad parameter: ldap_host_2 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_2'])));
870
879
 
871
880
  case 90:
872
- if (!(params['ldap_port'] && !(0, _utils.isInt)(params['ldap_port']))) {
881
+ if (!(params['ldap_host_3'] && !(0, _utils.isString)(params['ldap_host_3']))) {
873
882
  _context3.next = 92;
874
883
  break;
875
884
  }
876
885
 
877
- throw new errors.InvalidParameterError("Bad parameter: ldap_port must be of type Int, received ".concat((0, _utils.getType)(params['ldap_port'])));
886
+ throw new errors.InvalidParameterError("Bad parameter: ldap_host_3 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_3'])));
878
887
 
879
888
  case 92:
880
- if (!(params['ldap_username'] && !(0, _utils.isString)(params['ldap_username']))) {
889
+ if (!(params['ldap_port'] && !(0, _utils.isInt)(params['ldap_port']))) {
881
890
  _context3.next = 94;
882
891
  break;
883
892
  }
884
893
 
885
- throw new errors.InvalidParameterError("Bad parameter: ldap_username must be of type String, received ".concat((0, _utils.getType)(params['ldap_username'])));
894
+ throw new errors.InvalidParameterError("Bad parameter: ldap_port must be of type Int, received ".concat((0, _utils.getType)(params['ldap_port'])));
886
895
 
887
896
  case 94:
888
- if (!(params['ldap_username_field'] && !(0, _utils.isString)(params['ldap_username_field']))) {
897
+ if (!(params['ldap_username'] && !(0, _utils.isString)(params['ldap_username']))) {
889
898
  _context3.next = 96;
890
899
  break;
891
900
  }
892
901
 
893
- throw new errors.InvalidParameterError("Bad parameter: ldap_username_field must be of type String, received ".concat((0, _utils.getType)(params['ldap_username_field'])));
902
+ throw new errors.InvalidParameterError("Bad parameter: ldap_username must be of type String, received ".concat((0, _utils.getType)(params['ldap_username'])));
894
903
 
895
904
  case 96:
896
- if (!(params['ldap_domain'] && !(0, _utils.isString)(params['ldap_domain']))) {
905
+ if (!(params['ldap_username_field'] && !(0, _utils.isString)(params['ldap_username_field']))) {
897
906
  _context3.next = 98;
898
907
  break;
899
908
  }
900
909
 
901
- throw new errors.InvalidParameterError("Bad parameter: ldap_domain must be of type String, received ".concat((0, _utils.getType)(params['ldap_domain'])));
910
+ throw new errors.InvalidParameterError("Bad parameter: ldap_username_field must be of type String, received ".concat((0, _utils.getType)(params['ldap_username_field'])));
902
911
 
903
912
  case 98:
904
- if (!(params['ldap_user_action'] && !(0, _utils.isString)(params['ldap_user_action']))) {
913
+ if (!(params['ldap_domain'] && !(0, _utils.isString)(params['ldap_domain']))) {
905
914
  _context3.next = 100;
906
915
  break;
907
916
  }
908
917
 
909
- throw new errors.InvalidParameterError("Bad parameter: ldap_user_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_user_action'])));
918
+ throw new errors.InvalidParameterError("Bad parameter: ldap_domain must be of type String, received ".concat((0, _utils.getType)(params['ldap_domain'])));
910
919
 
911
920
  case 100:
912
- if (!(params['ldap_group_action'] && !(0, _utils.isString)(params['ldap_group_action']))) {
921
+ if (!(params['ldap_user_action'] && !(0, _utils.isString)(params['ldap_user_action']))) {
913
922
  _context3.next = 102;
914
923
  break;
915
924
  }
916
925
 
917
- throw new errors.InvalidParameterError("Bad parameter: ldap_group_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_action'])));
926
+ throw new errors.InvalidParameterError("Bad parameter: ldap_user_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_user_action'])));
918
927
 
919
928
  case 102:
920
- if (!(params['ldap_user_include_groups'] && !(0, _utils.isString)(params['ldap_user_include_groups']))) {
929
+ if (!(params['ldap_group_action'] && !(0, _utils.isString)(params['ldap_group_action']))) {
921
930
  _context3.next = 104;
922
931
  break;
923
932
  }
924
933
 
925
- throw new errors.InvalidParameterError("Bad parameter: ldap_user_include_groups must be of type String, received ".concat((0, _utils.getType)(params['ldap_user_include_groups'])));
934
+ throw new errors.InvalidParameterError("Bad parameter: ldap_group_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_action'])));
926
935
 
927
936
  case 104:
928
- if (!(params['ldap_group_exclusion'] && !(0, _utils.isString)(params['ldap_group_exclusion']))) {
937
+ if (!(params['ldap_user_include_groups'] && !(0, _utils.isString)(params['ldap_user_include_groups']))) {
929
938
  _context3.next = 106;
930
939
  break;
931
940
  }
932
941
 
933
- throw new errors.InvalidParameterError("Bad parameter: ldap_group_exclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_exclusion'])));
942
+ throw new errors.InvalidParameterError("Bad parameter: ldap_user_include_groups must be of type String, received ".concat((0, _utils.getType)(params['ldap_user_include_groups'])));
934
943
 
935
944
  case 106:
936
- if (!(params['ldap_group_inclusion'] && !(0, _utils.isString)(params['ldap_group_inclusion']))) {
945
+ if (!(params['ldap_group_exclusion'] && !(0, _utils.isString)(params['ldap_group_exclusion']))) {
937
946
  _context3.next = 108;
938
947
  break;
939
948
  }
940
949
 
941
- throw new errors.InvalidParameterError("Bad parameter: ldap_group_inclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_inclusion'])));
950
+ throw new errors.InvalidParameterError("Bad parameter: ldap_group_exclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_exclusion'])));
942
951
 
943
952
  case 108:
944
- if (!(params['ldap_base_dn'] && !(0, _utils.isString)(params['ldap_base_dn']))) {
953
+ if (!(params['ldap_group_inclusion'] && !(0, _utils.isString)(params['ldap_group_inclusion']))) {
945
954
  _context3.next = 110;
946
955
  break;
947
956
  }
948
957
 
949
- throw new errors.InvalidParameterError("Bad parameter: ldap_base_dn must be of type String, received ".concat((0, _utils.getType)(params['ldap_base_dn'])));
958
+ throw new errors.InvalidParameterError("Bad parameter: ldap_group_inclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_inclusion'])));
950
959
 
951
960
  case 110:
952
- if (!(params['ldap_password_change'] && !(0, _utils.isString)(params['ldap_password_change']))) {
961
+ if (!(params['ldap_base_dn'] && !(0, _utils.isString)(params['ldap_base_dn']))) {
953
962
  _context3.next = 112;
954
963
  break;
955
964
  }
956
965
 
957
- throw new errors.InvalidParameterError("Bad parameter: ldap_password_change must be of type String, received ".concat((0, _utils.getType)(params['ldap_password_change'])));
966
+ throw new errors.InvalidParameterError("Bad parameter: ldap_base_dn must be of type String, received ".concat((0, _utils.getType)(params['ldap_base_dn'])));
958
967
 
959
968
  case 112:
960
- if (!(params['ldap_password_change_confirmation'] && !(0, _utils.isString)(params['ldap_password_change_confirmation']))) {
969
+ if (!(params['ldap_password_change'] && !(0, _utils.isString)(params['ldap_password_change']))) {
961
970
  _context3.next = 114;
962
971
  break;
963
972
  }
964
973
 
965
- throw new errors.InvalidParameterError("Bad parameter: ldap_password_change_confirmation must be of type String, received ".concat((0, _utils.getType)(params['ldap_password_change_confirmation'])));
974
+ throw new errors.InvalidParameterError("Bad parameter: ldap_password_change must be of type String, received ".concat((0, _utils.getType)(params['ldap_password_change'])));
966
975
 
967
976
  case 114:
968
- if (!(params['smtp_password'] && !(0, _utils.isString)(params['smtp_password']))) {
977
+ if (!(params['ldap_password_change_confirmation'] && !(0, _utils.isString)(params['ldap_password_change_confirmation']))) {
969
978
  _context3.next = 116;
970
979
  break;
971
980
  }
972
981
 
973
- throw new errors.InvalidParameterError("Bad parameter: smtp_password must be of type String, received ".concat((0, _utils.getType)(params['smtp_password'])));
982
+ throw new errors.InvalidParameterError("Bad parameter: ldap_password_change_confirmation must be of type String, received ".concat((0, _utils.getType)(params['ldap_password_change_confirmation'])));
974
983
 
975
984
  case 116:
976
- _context3.next = 118;
977
- return _Api.default.sendRequest("/site", 'PATCH', params, options);
985
+ if (!(params['smtp_password'] && !(0, _utils.isString)(params['smtp_password']))) {
986
+ _context3.next = 118;
987
+ break;
988
+ }
989
+
990
+ throw new errors.InvalidParameterError("Bad parameter: smtp_password must be of type String, received ".concat((0, _utils.getType)(params['smtp_password'])));
978
991
 
979
992
  case 118:
993
+ _context3.next = 120;
994
+ return _Api.default.sendRequest("/site", 'PATCH', params, options);
995
+
996
+ case 120:
980
997
  response = _context3.sent;
981
998
  return _context3.abrupt("return", new Site(response === null || response === void 0 ? void 0 : response.data, options));
982
999
 
983
- case 120:
1000
+ case 122:
984
1001
  case "end":
985
1002
  return _context3.stop();
986
1003
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.216",
3
+ "version": "1.0.218",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -37,6 +37,13 @@ class ApiKey {
37
37
  this.attributes.descriptive_label = value
38
38
  }
39
39
 
40
+ // string # User-supplied description of API key.
41
+ getDescription = () => this.attributes.description
42
+
43
+ setDescription = value => {
44
+ this.attributes.description = value
45
+ }
46
+
40
47
  // date-time # Time which API Key was created
41
48
  getCreatedAt = () => this.attributes.created_at
42
49
 
@@ -99,6 +106,7 @@ class ApiKey {
99
106
 
100
107
  // Parameters:
101
108
  // name - string - Internal name for the API Key. For your use.
109
+ // description - string - User-supplied description of API key.
102
110
  // expires_at - string - API Key expiration date
103
111
  // permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
104
112
  update = async (params = {}) => {
@@ -117,6 +125,9 @@ class ApiKey {
117
125
  if (params['name'] && !isString(params['name'])) {
118
126
  throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
119
127
  }
128
+ if (params['description'] && !isString(params['description'])) {
129
+ throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(description)}`)
130
+ }
120
131
  if (params['expires_at'] && !isString(params['expires_at'])) {
121
132
  throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
122
133
  }
@@ -243,6 +254,7 @@ class ApiKey {
243
254
  // Parameters:
244
255
  // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
245
256
  // name - string - Internal name for the API Key. For your use.
257
+ // description - string - User-supplied description of API key.
246
258
  // expires_at - string - API Key expiration date
247
259
  // permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
248
260
  // path - string - Folder path restriction for this api key.
@@ -255,6 +267,10 @@ class ApiKey {
255
267
  throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params['name'])}`)
256
268
  }
257
269
 
270
+ if (params['description'] && !isString(params['description'])) {
271
+ throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(params['description'])}`)
272
+ }
273
+
258
274
  if (params['expires_at'] && !isString(params['expires_at'])) {
259
275
  throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(params['expires_at'])}`)
260
276
  }
@@ -245,6 +245,15 @@ class Site {
245
245
  // int64 # Number of prior passwords to disallow
246
246
  getMaxPriorPasswords = () => this.attributes.max_prior_passwords
247
247
 
248
+ // string # A message to show users when they connect via FTP or SFTP.
249
+ getMotdText = () => this.attributes.motd_text
250
+
251
+ // boolean # Show message to users connecting via FTP
252
+ getMotdUseForFtp = () => this.attributes.motd_use_for_ftp
253
+
254
+ // boolean # Show message to users connecting via SFTP
255
+ getMotdUseForSftp = () => this.attributes.motd_use_for_sftp
256
+
248
257
  // double # Next billing amount
249
258
  getNextBillingAmount = () => this.attributes.next_billing_amount
250
259
 
@@ -462,6 +471,9 @@ class Site {
462
471
  // welcome_screen - string - Does the welcome screen appear?
463
472
  // office_integration_available - boolean - Allow users to use Office for the web?
464
473
  // pin_all_remote_servers_to_site_region - boolean - If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
474
+ // motd_text - string - A message to show users when they connect via FTP or SFTP.
475
+ // motd_use_for_ftp - boolean - Show message to users connecting via FTP
476
+ // motd_use_for_sftp - boolean - Show message to users connecting via SFTP
465
477
  // session_expiry - double - Session expiry in hours
466
478
  // ssl_required - boolean - Is SSL required? Disabling this is insecure.
467
479
  // tls_disabled - boolean - Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
@@ -617,6 +629,10 @@ class Site {
617
629
  throw new errors.InvalidParameterError(`Bad parameter: welcome_screen must be of type String, received ${getType(params['welcome_screen'])}`)
618
630
  }
619
631
 
632
+ if (params['motd_text'] && !isString(params['motd_text'])) {
633
+ throw new errors.InvalidParameterError(`Bad parameter: motd_text must be of type String, received ${getType(params['motd_text'])}`)
634
+ }
635
+
620
636
  if (params['user_lockout_tries'] && !isInt(params['user_lockout_tries'])) {
621
637
  throw new errors.InvalidParameterError(`Bad parameter: user_lockout_tries must be of type Int, received ${getType(params['user_lockout_tries'])}`)
622
638
  }