files.com 1.2.277 → 1.2.279

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.277
1
+ 1.2.279
@@ -182,6 +182,7 @@ await Automation.create({
182
182
  'schedule_days_of_week': [0,1,3],
183
183
  'schedule_times_of_day': ["7:30","11:30"],
184
184
  'schedule_time_zone': "Eastern Time (US & Canada)",
185
+ 'holiday_region': "us_dc",
185
186
  'always_overwrite_size_matching_files': true,
186
187
  'always_serialize_jobs': true,
187
188
  'description': "example",
@@ -219,6 +220,7 @@ await Automation.create({
219
220
  * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
220
221
  * `schedule_times_of_day` (array(string)): If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
221
222
  * `schedule_time_zone` (string): If trigger is `custom_schedule`. Time zone for the schedule.
223
+ * `holiday_region` (string): If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
222
224
  * `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
223
225
  * `always_serialize_jobs` (boolean): Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is `true` we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
224
226
  * `description` (string): Description for the this Automation.
@@ -274,6 +276,7 @@ await automation.update({
274
276
  'schedule_days_of_week': [0,1,3],
275
277
  'schedule_times_of_day': ["7:30","11:30"],
276
278
  'schedule_time_zone': "Eastern Time (US & Canada)",
279
+ 'holiday_region': "us_dc",
277
280
  'always_overwrite_size_matching_files': true,
278
281
  'always_serialize_jobs': true,
279
282
  'description': "example",
@@ -311,6 +314,7 @@ await automation.update({
311
314
  * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
312
315
  * `schedule_times_of_day` (array(string)): If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
313
316
  * `schedule_time_zone` (string): If trigger is `custom_schedule`. Time zone for the schedule.
317
+ * `holiday_region` (string): If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
314
318
  * `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
315
319
  * `always_serialize_jobs` (boolean): Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is `true` we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
316
320
  * `description` (string): Description for the this Automation.
@@ -69,7 +69,7 @@
69
69
  * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
70
70
  * `schedule_times_of_day` (array(string)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. Times of day in HH:MM format.
71
71
  * `schedule_time_zone` (string): If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
72
- * `holiday_region` (string): If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
72
+ * `holiday_region` (string): If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
73
73
 
74
74
  ---
75
75
 
@@ -117,6 +117,8 @@ await Sync.create({
117
117
  'interval': "week",
118
118
  'trigger': "example",
119
119
  'trigger_file': "example",
120
+ 'holiday_region': "us_dc",
121
+ 'sync_interval_minutes': 1,
120
122
  'recurring_day': 25,
121
123
  'schedule_time_zone': "Eastern Time (US & Canada)",
122
124
  'schedule_days_of_week': [0,2,4],
@@ -140,6 +142,8 @@ await Sync.create({
140
142
  * `interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
141
143
  * `trigger` (string): Trigger type: daily, custom_schedule, or manual
142
144
  * `trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
145
+ * `holiday_region` (string): If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
146
+ * `sync_interval_minutes` (int64): Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
143
147
  * `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
144
148
  * `schedule_time_zone` (string): If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
145
149
  * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
@@ -190,6 +194,8 @@ await sync.update({
190
194
  'interval': "week",
191
195
  'trigger': "example",
192
196
  'trigger_file': "example",
197
+ 'holiday_region': "us_dc",
198
+ 'sync_interval_minutes': 1,
193
199
  'recurring_day': 25,
194
200
  'schedule_time_zone': "Eastern Time (US & Canada)",
195
201
  'schedule_days_of_week': [0,2,4],
@@ -213,6 +219,8 @@ await sync.update({
213
219
  * `interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
214
220
  * `trigger` (string): Trigger type: daily, custom_schedule, or manual
215
221
  * `trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
222
+ * `holiday_region` (string): If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
223
+ * `sync_interval_minutes` (int64): Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
216
224
  * `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
217
225
  * `schedule_time_zone` (string): If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
218
226
  * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
@@ -38,3 +38,9 @@ await UserCipherUse.list({
38
38
  * `user_id` (int64): User ID. If provided, will return uses for this user.
39
39
  * `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.
40
40
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
41
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `updated_at`.
42
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `insecure` and `updated_at`. Valid field combinations are `[ insecure, updated_at ]`.
43
+ * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `updated_at`.
44
+ * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `updated_at`.
45
+ * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `updated_at`.
46
+ * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `updated_at`.
@@ -68,9 +68,9 @@ await UserLifecycleRule.create({
68
68
 
69
69
  ### Parameters
70
70
 
71
- * `action` (string): Required - Action to take on inactive users (disable or delete)
72
- * `authentication_method` (string): Required - User authentication method for the rule
73
- * `inactivity_days` (int64): Required - Number of days of inactivity before the rule applies
71
+ * `action` (string): Action to take on inactive users (disable or delete)
72
+ * `authentication_method` (string): User authentication method for the rule
73
+ * `inactivity_days` (int64): Number of days of inactivity before the rule applies
74
74
  * `include_site_admins` (boolean): Include site admins in the rule
75
75
  * `include_folder_admins` (boolean): Include folder admins in the rule
76
76
  * `user_state` (string): State of the users to apply the rule to (inactive or disabled)
@@ -94,9 +94,9 @@ await user_lifecycle_rule.update({
94
94
  ### Parameters
95
95
 
96
96
  * `id` (int64): Required - User Lifecycle Rule ID.
97
- * `action` (string): Required - Action to take on inactive users (disable or delete)
98
- * `authentication_method` (string): Required - User authentication method for the rule
99
- * `inactivity_days` (int64): Required - Number of days of inactivity before the rule applies
97
+ * `action` (string): Action to take on inactive users (disable or delete)
98
+ * `authentication_method` (string): User authentication method for the rule
99
+ * `inactivity_days` (int64): Number of days of inactivity before the rule applies
100
100
  * `include_site_admins` (boolean): Include site admins in the rule
101
101
  * `include_folder_admins` (boolean): Include folder admins in the rule
102
102
  * `user_state` (string): State of the users to apply the rule to (inactive or disabled)
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.277';
15
+ var version = '1.2.279';
16
16
  var userAgent = "Files.com JavaScript SDK v".concat(version);
17
17
  var logLevel = _Logger.LogLevel.INFO;
18
18
  var debugRequest = false;
@@ -367,6 +367,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
367
367
  // schedule_days_of_week - array(int64) - If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
368
368
  // schedule_times_of_day - array(string) - If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
369
369
  // schedule_time_zone - string - If trigger is `custom_schedule`. Time zone for the schedule.
370
+ // holiday_region - string - If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
370
371
  // always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
371
372
  // always_serialize_jobs - boolean - Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is `true` we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
372
373
  // description - string - Description for the this Automation.
@@ -485,92 +486,98 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
485
486
  }
486
487
  throw new errors.InvalidParameterError("Bad parameter: schedule_time_zone must be of type String, received ".concat((0, _utils.getType)(params.schedule_time_zone)));
487
488
  case 15:
488
- if (!(params.description && !(0, _utils.isString)(params.description))) {
489
+ if (!(params.holiday_region && !(0, _utils.isString)(params.holiday_region))) {
489
490
  _context2.next = 16;
490
491
  break;
491
492
  }
492
- throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
493
+ throw new errors.InvalidParameterError("Bad parameter: holiday_region must be of type String, received ".concat((0, _utils.getType)(params.holiday_region)));
493
494
  case 16:
494
- if (!(params.exclude_pattern && !(0, _utils.isString)(params.exclude_pattern))) {
495
+ if (!(params.description && !(0, _utils.isString)(params.description))) {
495
496
  _context2.next = 17;
496
497
  break;
497
498
  }
498
- throw new errors.InvalidParameterError("Bad parameter: exclude_pattern must be of type String, received ".concat((0, _utils.getType)(params.exclude_pattern)));
499
+ throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
499
500
  case 17:
500
- if (!(params.import_urls && !(0, _utils.isArray)(params.import_urls))) {
501
+ if (!(params.exclude_pattern && !(0, _utils.isString)(params.exclude_pattern))) {
501
502
  _context2.next = 18;
502
503
  break;
503
504
  }
504
- throw new errors.InvalidParameterError("Bad parameter: import_urls must be of type Array, received ".concat((0, _utils.getType)(params.import_urls)));
505
+ throw new errors.InvalidParameterError("Bad parameter: exclude_pattern must be of type String, received ".concat((0, _utils.getType)(params.exclude_pattern)));
505
506
  case 18:
506
- if (!(params.name && !(0, _utils.isString)(params.name))) {
507
+ if (!(params.import_urls && !(0, _utils.isArray)(params.import_urls))) {
507
508
  _context2.next = 19;
508
509
  break;
509
510
  }
510
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
511
+ throw new errors.InvalidParameterError("Bad parameter: import_urls must be of type Array, received ".concat((0, _utils.getType)(params.import_urls)));
511
512
  case 19:
512
- if (!(params.path_time_zone && !(0, _utils.isString)(params.path_time_zone))) {
513
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
513
514
  _context2.next = 20;
514
515
  break;
515
516
  }
516
- throw new errors.InvalidParameterError("Bad parameter: path_time_zone must be of type String, received ".concat((0, _utils.getType)(params.path_time_zone)));
517
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
517
518
  case 20:
518
- if (!(params.retry_on_failure_interval_in_minutes && !(0, _utils.isInt)(params.retry_on_failure_interval_in_minutes))) {
519
+ if (!(params.path_time_zone && !(0, _utils.isString)(params.path_time_zone))) {
519
520
  _context2.next = 21;
520
521
  break;
521
522
  }
522
- throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_interval_in_minutes must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_interval_in_minutes)));
523
+ throw new errors.InvalidParameterError("Bad parameter: path_time_zone must be of type String, received ".concat((0, _utils.getType)(params.path_time_zone)));
523
524
  case 21:
524
- if (!(params.retry_on_failure_number_of_attempts && !(0, _utils.isInt)(params.retry_on_failure_number_of_attempts))) {
525
+ if (!(params.retry_on_failure_interval_in_minutes && !(0, _utils.isInt)(params.retry_on_failure_interval_in_minutes))) {
525
526
  _context2.next = 22;
526
527
  break;
527
528
  }
528
- throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_number_of_attempts must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_number_of_attempts)));
529
+ throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_interval_in_minutes must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_interval_in_minutes)));
529
530
  case 22:
530
- if (!(params.trigger && !(0, _utils.isString)(params.trigger))) {
531
+ if (!(params.retry_on_failure_number_of_attempts && !(0, _utils.isInt)(params.retry_on_failure_number_of_attempts))) {
531
532
  _context2.next = 23;
532
533
  break;
533
534
  }
534
- throw new errors.InvalidParameterError("Bad parameter: trigger must be of type String, received ".concat((0, _utils.getType)(params.trigger)));
535
+ throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_number_of_attempts must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_number_of_attempts)));
535
536
  case 23:
536
- if (!(params.trigger_actions && !(0, _utils.isArray)(params.trigger_actions))) {
537
+ if (!(params.trigger && !(0, _utils.isString)(params.trigger))) {
537
538
  _context2.next = 24;
538
539
  break;
539
540
  }
540
- throw new errors.InvalidParameterError("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(params.trigger_actions)));
541
+ throw new errors.InvalidParameterError("Bad parameter: trigger must be of type String, received ".concat((0, _utils.getType)(params.trigger)));
541
542
  case 24:
542
- if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
543
+ if (!(params.trigger_actions && !(0, _utils.isArray)(params.trigger_actions))) {
543
544
  _context2.next = 25;
544
545
  break;
545
546
  }
546
- throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
547
+ throw new errors.InvalidParameterError("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(params.trigger_actions)));
547
548
  case 25:
548
- if (!(params.automation && !(0, _utils.isString)(params.automation))) {
549
+ if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
549
550
  _context2.next = 26;
550
551
  break;
551
552
  }
552
- throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(params.automation)));
553
+ throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
553
554
  case 26:
555
+ if (!(params.automation && !(0, _utils.isString)(params.automation))) {
556
+ _context2.next = 27;
557
+ break;
558
+ }
559
+ throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(params.automation)));
560
+ case 27:
554
561
  if (params.id) {
555
- _context2.next = 28;
562
+ _context2.next = 29;
556
563
  break;
557
564
  }
558
565
  if (!_this.attributes.id) {
559
- _context2.next = 27;
566
+ _context2.next = 28;
560
567
  break;
561
568
  }
562
569
  params.id = _this.id;
563
- _context2.next = 28;
570
+ _context2.next = 29;
564
571
  break;
565
- case 27:
566
- throw new errors.MissingParameterError('Parameter missing: id');
567
572
  case 28:
568
- _context2.next = 29;
569
- return _Api.default.sendRequest("/automations/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
573
+ throw new errors.MissingParameterError('Parameter missing: id');
570
574
  case 29:
575
+ _context2.next = 30;
576
+ return _Api.default.sendRequest("/automations/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
577
+ case 30:
571
578
  response = _context2.sent;
572
579
  return _context2.abrupt("return", new Automation(response === null || response === void 0 ? void 0 : response.data, _this.options));
573
- case 30:
580
+ case 31:
574
581
  case "end":
575
582
  return _context2.stop();
576
583
  }
@@ -785,6 +792,7 @@ _Automation = Automation;
785
792
  // schedule_days_of_week - array(int64) - If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
786
793
  // schedule_times_of_day - array(string) - If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
787
794
  // schedule_time_zone - string - If trigger is `custom_schedule`. Time zone for the schedule.
795
+ // holiday_region - string - If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
788
796
  // always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
789
797
  // always_serialize_jobs - boolean - Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is `true` we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
790
798
  // description - string - Description for the this Automation.
@@ -892,78 +900,84 @@ _Automation = Automation;
892
900
  }
893
901
  throw new errors.InvalidParameterError("Bad parameter: schedule_time_zone must be of type String, received ".concat((0, _utils.getType)(params.schedule_time_zone)));
894
902
  case 13:
895
- if (!(params.description && !(0, _utils.isString)(params.description))) {
903
+ if (!(params.holiday_region && !(0, _utils.isString)(params.holiday_region))) {
896
904
  _context7.next = 14;
897
905
  break;
898
906
  }
899
- throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
907
+ throw new errors.InvalidParameterError("Bad parameter: holiday_region must be of type String, received ".concat((0, _utils.getType)(params.holiday_region)));
900
908
  case 14:
901
- if (!(params.exclude_pattern && !(0, _utils.isString)(params.exclude_pattern))) {
909
+ if (!(params.description && !(0, _utils.isString)(params.description))) {
902
910
  _context7.next = 15;
903
911
  break;
904
912
  }
905
- throw new errors.InvalidParameterError("Bad parameter: exclude_pattern must be of type String, received ".concat((0, _utils.getType)(params.exclude_pattern)));
913
+ throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
906
914
  case 15:
907
- if (!(params.import_urls && !(0, _utils.isArray)(params.import_urls))) {
915
+ if (!(params.exclude_pattern && !(0, _utils.isString)(params.exclude_pattern))) {
908
916
  _context7.next = 16;
909
917
  break;
910
918
  }
911
- throw new errors.InvalidParameterError("Bad parameter: import_urls must be of type Array, received ".concat((0, _utils.getType)(params.import_urls)));
919
+ throw new errors.InvalidParameterError("Bad parameter: exclude_pattern must be of type String, received ".concat((0, _utils.getType)(params.exclude_pattern)));
912
920
  case 16:
913
- if (!(params.name && !(0, _utils.isString)(params.name))) {
921
+ if (!(params.import_urls && !(0, _utils.isArray)(params.import_urls))) {
914
922
  _context7.next = 17;
915
923
  break;
916
924
  }
917
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
925
+ throw new errors.InvalidParameterError("Bad parameter: import_urls must be of type Array, received ".concat((0, _utils.getType)(params.import_urls)));
918
926
  case 17:
919
- if (!(params.path_time_zone && !(0, _utils.isString)(params.path_time_zone))) {
927
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
920
928
  _context7.next = 18;
921
929
  break;
922
930
  }
923
- throw new errors.InvalidParameterError("Bad parameter: path_time_zone must be of type String, received ".concat((0, _utils.getType)(params.path_time_zone)));
931
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
924
932
  case 18:
925
- if (!(params.retry_on_failure_interval_in_minutes && !(0, _utils.isInt)(params.retry_on_failure_interval_in_minutes))) {
933
+ if (!(params.path_time_zone && !(0, _utils.isString)(params.path_time_zone))) {
926
934
  _context7.next = 19;
927
935
  break;
928
936
  }
929
- throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_interval_in_minutes must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_interval_in_minutes)));
937
+ throw new errors.InvalidParameterError("Bad parameter: path_time_zone must be of type String, received ".concat((0, _utils.getType)(params.path_time_zone)));
930
938
  case 19:
931
- if (!(params.retry_on_failure_number_of_attempts && !(0, _utils.isInt)(params.retry_on_failure_number_of_attempts))) {
939
+ if (!(params.retry_on_failure_interval_in_minutes && !(0, _utils.isInt)(params.retry_on_failure_interval_in_minutes))) {
932
940
  _context7.next = 20;
933
941
  break;
934
942
  }
935
- throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_number_of_attempts must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_number_of_attempts)));
943
+ throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_interval_in_minutes must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_interval_in_minutes)));
936
944
  case 20:
937
- if (!(params.trigger && !(0, _utils.isString)(params.trigger))) {
945
+ if (!(params.retry_on_failure_number_of_attempts && !(0, _utils.isInt)(params.retry_on_failure_number_of_attempts))) {
938
946
  _context7.next = 21;
939
947
  break;
940
948
  }
941
- throw new errors.InvalidParameterError("Bad parameter: trigger must be of type String, received ".concat((0, _utils.getType)(params.trigger)));
949
+ throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_number_of_attempts must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_number_of_attempts)));
942
950
  case 21:
943
- if (!(params.trigger_actions && !(0, _utils.isArray)(params.trigger_actions))) {
951
+ if (!(params.trigger && !(0, _utils.isString)(params.trigger))) {
944
952
  _context7.next = 22;
945
953
  break;
946
954
  }
947
- throw new errors.InvalidParameterError("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(params.trigger_actions)));
955
+ throw new errors.InvalidParameterError("Bad parameter: trigger must be of type String, received ".concat((0, _utils.getType)(params.trigger)));
948
956
  case 22:
949
- if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
957
+ if (!(params.trigger_actions && !(0, _utils.isArray)(params.trigger_actions))) {
950
958
  _context7.next = 23;
951
959
  break;
952
960
  }
953
- throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
961
+ throw new errors.InvalidParameterError("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(params.trigger_actions)));
954
962
  case 23:
955
- if (!(params.automation && !(0, _utils.isString)(params.automation))) {
963
+ if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
956
964
  _context7.next = 24;
957
965
  break;
958
966
  }
959
- throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(params.automation)));
967
+ throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
960
968
  case 24:
961
- _context7.next = 25;
962
- return _Api.default.sendRequest('/automations', 'POST', params, options);
969
+ if (!(params.automation && !(0, _utils.isString)(params.automation))) {
970
+ _context7.next = 25;
971
+ break;
972
+ }
973
+ throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(params.automation)));
963
974
  case 25:
975
+ _context7.next = 26;
976
+ return _Api.default.sendRequest('/automations', 'POST', params, options);
977
+ case 26:
964
978
  response = _context7.sent;
965
979
  return _context7.abrupt("return", new _Automation(response === null || response === void 0 ? void 0 : response.data, options));
966
- case 26:
980
+ case 27:
967
981
  case "end":
968
982
  return _context7.stop();
969
983
  }
@@ -201,7 +201,7 @@ var Sync = /*#__PURE__*/(0, _createClass2.default)(function Sync() {
201
201
  (0, _defineProperty2.default)(this, "setScheduleTimeZone", function (value) {
202
202
  _this.attributes.schedule_time_zone = value;
203
203
  });
204
- // string # If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
204
+ // string # If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
205
205
  (0, _defineProperty2.default)(this, "getHolidayRegion", function () {
206
206
  return _this.attributes.holiday_region;
207
207
  });
@@ -271,6 +271,8 @@ var Sync = /*#__PURE__*/(0, _createClass2.default)(function Sync() {
271
271
  // interval - string - If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
272
272
  // trigger - string - Trigger type: daily, custom_schedule, or manual
273
273
  // trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
274
+ // holiday_region - string - If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
275
+ // sync_interval_minutes - int64 - Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
274
276
  // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
275
277
  // schedule_time_zone - string - If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
276
278
  // schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
@@ -356,50 +358,62 @@ var Sync = /*#__PURE__*/(0, _createClass2.default)(function Sync() {
356
358
  }
357
359
  throw new errors.InvalidParameterError("Bad parameter: trigger_file must be of type String, received ".concat((0, _utils.getType)(params.trigger_file)));
358
360
  case 12:
359
- if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
361
+ if (!(params.holiday_region && !(0, _utils.isString)(params.holiday_region))) {
360
362
  _context2.next = 13;
361
363
  break;
362
364
  }
363
- throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
365
+ throw new errors.InvalidParameterError("Bad parameter: holiday_region must be of type String, received ".concat((0, _utils.getType)(params.holiday_region)));
364
366
  case 13:
365
- if (!(params.schedule_time_zone && !(0, _utils.isString)(params.schedule_time_zone))) {
367
+ if (!(params.sync_interval_minutes && !(0, _utils.isInt)(params.sync_interval_minutes))) {
366
368
  _context2.next = 14;
367
369
  break;
368
370
  }
369
- throw new errors.InvalidParameterError("Bad parameter: schedule_time_zone must be of type String, received ".concat((0, _utils.getType)(params.schedule_time_zone)));
371
+ throw new errors.InvalidParameterError("Bad parameter: sync_interval_minutes must be of type Int, received ".concat((0, _utils.getType)(params.sync_interval_minutes)));
370
372
  case 14:
371
- if (!(params.schedule_days_of_week && !(0, _utils.isArray)(params.schedule_days_of_week))) {
373
+ if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
372
374
  _context2.next = 15;
373
375
  break;
374
376
  }
375
- throw new errors.InvalidParameterError("Bad parameter: schedule_days_of_week must be of type Array, received ".concat((0, _utils.getType)(params.schedule_days_of_week)));
377
+ throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
376
378
  case 15:
377
- if (!(params.schedule_times_of_day && !(0, _utils.isArray)(params.schedule_times_of_day))) {
379
+ if (!(params.schedule_time_zone && !(0, _utils.isString)(params.schedule_time_zone))) {
378
380
  _context2.next = 16;
379
381
  break;
380
382
  }
381
- throw new errors.InvalidParameterError("Bad parameter: schedule_times_of_day must be of type Array, received ".concat((0, _utils.getType)(params.schedule_times_of_day)));
383
+ throw new errors.InvalidParameterError("Bad parameter: schedule_time_zone must be of type String, received ".concat((0, _utils.getType)(params.schedule_time_zone)));
382
384
  case 16:
383
- if (params.id) {
385
+ if (!(params.schedule_days_of_week && !(0, _utils.isArray)(params.schedule_days_of_week))) {
386
+ _context2.next = 17;
387
+ break;
388
+ }
389
+ throw new errors.InvalidParameterError("Bad parameter: schedule_days_of_week must be of type Array, received ".concat((0, _utils.getType)(params.schedule_days_of_week)));
390
+ case 17:
391
+ if (!(params.schedule_times_of_day && !(0, _utils.isArray)(params.schedule_times_of_day))) {
384
392
  _context2.next = 18;
385
393
  break;
386
394
  }
395
+ throw new errors.InvalidParameterError("Bad parameter: schedule_times_of_day must be of type Array, received ".concat((0, _utils.getType)(params.schedule_times_of_day)));
396
+ case 18:
397
+ if (params.id) {
398
+ _context2.next = 20;
399
+ break;
400
+ }
387
401
  if (!_this.attributes.id) {
388
- _context2.next = 17;
402
+ _context2.next = 19;
389
403
  break;
390
404
  }
391
405
  params.id = _this.id;
392
- _context2.next = 18;
406
+ _context2.next = 20;
393
407
  break;
394
- case 17:
408
+ case 19:
395
409
  throw new errors.MissingParameterError('Parameter missing: id');
396
- case 18:
397
- _context2.next = 19;
410
+ case 20:
411
+ _context2.next = 21;
398
412
  return _Api.default.sendRequest("/syncs/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
399
- case 19:
413
+ case 21:
400
414
  response = _context2.sent;
401
415
  return _context2.abrupt("return", new Sync(response === null || response === void 0 ? void 0 : response.data, _this.options));
402
- case 20:
416
+ case 22:
403
417
  case "end":
404
418
  return _context2.stop();
405
419
  }
@@ -609,6 +623,8 @@ _Sync = Sync;
609
623
  // interval - string - If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
610
624
  // trigger - string - Trigger type: daily, custom_schedule, or manual
611
625
  // trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
626
+ // holiday_region - string - If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
627
+ // sync_interval_minutes - int64 - Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
612
628
  // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
613
629
  // schedule_time_zone - string - If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
614
630
  // schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
@@ -677,36 +693,48 @@ _Sync = Sync;
677
693
  }
678
694
  throw new errors.InvalidParameterError("Bad parameter: trigger_file must be of type String, received ".concat((0, _utils.getType)(params.trigger_file)));
679
695
  case 9:
680
- if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
696
+ if (!(params.holiday_region && !(0, _utils.isString)(params.holiday_region))) {
681
697
  _context7.next = 10;
682
698
  break;
683
699
  }
684
- throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
700
+ throw new errors.InvalidParameterError("Bad parameter: holiday_region must be of type String, received ".concat((0, _utils.getType)(params.holiday_region)));
685
701
  case 10:
686
- if (!(params.schedule_time_zone && !(0, _utils.isString)(params.schedule_time_zone))) {
702
+ if (!(params.sync_interval_minutes && !(0, _utils.isInt)(params.sync_interval_minutes))) {
687
703
  _context7.next = 11;
688
704
  break;
689
705
  }
690
- throw new errors.InvalidParameterError("Bad parameter: schedule_time_zone must be of type String, received ".concat((0, _utils.getType)(params.schedule_time_zone)));
706
+ throw new errors.InvalidParameterError("Bad parameter: sync_interval_minutes must be of type Int, received ".concat((0, _utils.getType)(params.sync_interval_minutes)));
691
707
  case 11:
692
- if (!(params.schedule_days_of_week && !(0, _utils.isArray)(params.schedule_days_of_week))) {
708
+ if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
693
709
  _context7.next = 12;
694
710
  break;
695
711
  }
696
- throw new errors.InvalidParameterError("Bad parameter: schedule_days_of_week must be of type Array, received ".concat((0, _utils.getType)(params.schedule_days_of_week)));
712
+ throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
697
713
  case 12:
698
- if (!(params.schedule_times_of_day && !(0, _utils.isArray)(params.schedule_times_of_day))) {
714
+ if (!(params.schedule_time_zone && !(0, _utils.isString)(params.schedule_time_zone))) {
699
715
  _context7.next = 13;
700
716
  break;
701
717
  }
702
- throw new errors.InvalidParameterError("Bad parameter: schedule_times_of_day must be of type Array, received ".concat((0, _utils.getType)(params.schedule_times_of_day)));
718
+ throw new errors.InvalidParameterError("Bad parameter: schedule_time_zone must be of type String, received ".concat((0, _utils.getType)(params.schedule_time_zone)));
703
719
  case 13:
704
- _context7.next = 14;
705
- return _Api.default.sendRequest('/syncs', 'POST', params, options);
720
+ if (!(params.schedule_days_of_week && !(0, _utils.isArray)(params.schedule_days_of_week))) {
721
+ _context7.next = 14;
722
+ break;
723
+ }
724
+ throw new errors.InvalidParameterError("Bad parameter: schedule_days_of_week must be of type Array, received ".concat((0, _utils.getType)(params.schedule_days_of_week)));
706
725
  case 14:
726
+ if (!(params.schedule_times_of_day && !(0, _utils.isArray)(params.schedule_times_of_day))) {
727
+ _context7.next = 15;
728
+ break;
729
+ }
730
+ throw new errors.InvalidParameterError("Bad parameter: schedule_times_of_day must be of type Array, received ".concat((0, _utils.getType)(params.schedule_times_of_day)));
731
+ case 15:
732
+ _context7.next = 16;
733
+ return _Api.default.sendRequest('/syncs', 'POST', params, options);
734
+ case 16:
707
735
  response = _context7.sent;
708
736
  return _context7.abrupt("return", new _Sync(response === null || response === void 0 ? void 0 : response.data, options));
709
- case 15:
737
+ case 17:
710
738
  case "end":
711
739
  return _context7.stop();
712
740
  }
@@ -78,6 +78,12 @@ _UserCipherUse = UserCipherUse;
78
78
  // user_id - int64 - User ID. If provided, will return uses for this user.
79
79
  // 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.
80
80
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
81
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `updated_at`.
82
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `insecure` and `updated_at`. Valid field combinations are `[ insecure, updated_at ]`.
83
+ // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `updated_at`.
84
+ // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `updated_at`.
85
+ // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `updated_at`.
86
+ // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `updated_at`.
81
87
  (0, _defineProperty2.default)(UserCipherUse, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
82
88
  var _response$data;
83
89
  var params,
@@ -89,9 +89,9 @@ var UserLifecycleRule = /*#__PURE__*/(0, _createClass2.default)(function UserLif
89
89
  _this.attributes.site_id = value;
90
90
  });
91
91
  // Parameters:
92
- // action (required) - string - Action to take on inactive users (disable or delete)
93
- // authentication_method (required) - string - User authentication method for the rule
94
- // inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
92
+ // action - string - Action to take on inactive users (disable or delete)
93
+ // authentication_method - string - User authentication method for the rule
94
+ // inactivity_days - int64 - Number of days of inactivity before the rule applies
95
95
  // include_site_admins - boolean - Include site admins in the rule
96
96
  // include_folder_admins - boolean - Include folder admins in the rule
97
97
  // user_state - string - State of the users to apply the rule to (inactive or disabled)
@@ -160,54 +160,12 @@ var UserLifecycleRule = /*#__PURE__*/(0, _createClass2.default)(function UserLif
160
160
  case 8:
161
161
  throw new errors.MissingParameterError('Parameter missing: id');
162
162
  case 9:
163
- if (params.action) {
164
- _context.next = 11;
165
- break;
166
- }
167
- if (!_this.attributes.action) {
168
- _context.next = 10;
169
- break;
170
- }
171
- params.action = _this.action;
172
- _context.next = 11;
173
- break;
174
- case 10:
175
- throw new errors.MissingParameterError('Parameter missing: action');
176
- case 11:
177
- if (params.authentication_method) {
178
- _context.next = 13;
179
- break;
180
- }
181
- if (!_this.attributes.authentication_method) {
182
- _context.next = 12;
183
- break;
184
- }
185
- params.authentication_method = _this.authentication_method;
186
- _context.next = 13;
187
- break;
188
- case 12:
189
- throw new errors.MissingParameterError('Parameter missing: authentication_method');
190
- case 13:
191
- if (params.inactivity_days) {
192
- _context.next = 15;
193
- break;
194
- }
195
- if (!_this.attributes.inactivity_days) {
196
- _context.next = 14;
197
- break;
198
- }
199
- params.inactivity_days = _this.inactivity_days;
200
- _context.next = 15;
201
- break;
202
- case 14:
203
- throw new errors.MissingParameterError('Parameter missing: inactivity_days');
204
- case 15:
205
- _context.next = 16;
163
+ _context.next = 10;
206
164
  return _Api.default.sendRequest("/user_lifecycle_rules/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
207
- case 16:
165
+ case 10:
208
166
  response = _context.sent;
209
167
  return _context.abrupt("return", new UserLifecycleRule(response === null || response === void 0 ? void 0 : response.data, _this.options));
210
- case 17:
168
+ case 11:
211
169
  case "end":
212
170
  return _context.stop();
213
171
  }
@@ -404,9 +362,9 @@ _UserLifecycleRule = UserLifecycleRule;
404
362
  return _UserLifecycleRule.find(id, params, options);
405
363
  });
406
364
  // Parameters:
407
- // action (required) - string - Action to take on inactive users (disable or delete)
408
- // authentication_method (required) - string - User authentication method for the rule
409
- // inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
365
+ // action - string - Action to take on inactive users (disable or delete)
366
+ // authentication_method - string - User authentication method for the rule
367
+ // inactivity_days - int64 - Number of days of inactivity before the rule applies
410
368
  // include_site_admins - boolean - Include site admins in the rule
411
369
  // include_folder_admins - boolean - Include folder admins in the rule
412
370
  // user_state - string - State of the users to apply the rule to (inactive or disabled)
@@ -420,54 +378,36 @@ _UserLifecycleRule = UserLifecycleRule;
420
378
  case 0:
421
379
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
422
380
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
423
- if (params.action) {
424
- _context6.next = 1;
425
- break;
426
- }
427
- throw new errors.MissingParameterError('Parameter missing: action');
428
- case 1:
429
- if (params.authentication_method) {
430
- _context6.next = 2;
431
- break;
432
- }
433
- throw new errors.MissingParameterError('Parameter missing: authentication_method');
434
- case 2:
435
- if (params.inactivity_days) {
436
- _context6.next = 3;
437
- break;
438
- }
439
- throw new errors.MissingParameterError('Parameter missing: inactivity_days');
440
- case 3:
441
381
  if (!(params.action && !(0, _utils.isString)(params.action))) {
442
- _context6.next = 4;
382
+ _context6.next = 1;
443
383
  break;
444
384
  }
445
385
  throw new errors.InvalidParameterError("Bad parameter: action must be of type String, received ".concat((0, _utils.getType)(params.action)));
446
- case 4:
386
+ case 1:
447
387
  if (!(params.authentication_method && !(0, _utils.isString)(params.authentication_method))) {
448
- _context6.next = 5;
388
+ _context6.next = 2;
449
389
  break;
450
390
  }
451
391
  throw new errors.InvalidParameterError("Bad parameter: authentication_method must be of type String, received ".concat((0, _utils.getType)(params.authentication_method)));
452
- case 5:
392
+ case 2:
453
393
  if (!(params.inactivity_days && !(0, _utils.isInt)(params.inactivity_days))) {
454
- _context6.next = 6;
394
+ _context6.next = 3;
455
395
  break;
456
396
  }
457
397
  throw new errors.InvalidParameterError("Bad parameter: inactivity_days must be of type Int, received ".concat((0, _utils.getType)(params.inactivity_days)));
458
- case 6:
398
+ case 3:
459
399
  if (!(params.user_state && !(0, _utils.isString)(params.user_state))) {
460
- _context6.next = 7;
400
+ _context6.next = 4;
461
401
  break;
462
402
  }
463
403
  throw new errors.InvalidParameterError("Bad parameter: user_state must be of type String, received ".concat((0, _utils.getType)(params.user_state)));
464
- case 7:
465
- _context6.next = 8;
404
+ case 4:
405
+ _context6.next = 5;
466
406
  return _Api.default.sendRequest('/user_lifecycle_rules', 'POST', params, options);
467
- case 8:
407
+ case 5:
468
408
  response = _context6.sent;
469
409
  return _context6.abrupt("return", new _UserLifecycleRule(response === null || response === void 0 ? void 0 : response.data, options));
470
- case 9:
410
+ case 6:
471
411
  case "end":
472
412
  return _context6.stop();
473
413
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.277",
3
+ "version": "1.2.279",
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.277'
9
+ const version = '1.2.279'
10
10
  let userAgent = `Files.com JavaScript SDK v${version}`
11
11
 
12
12
  let logLevel = LogLevel.INFO
@@ -340,6 +340,7 @@ class Automation {
340
340
  // schedule_days_of_week - array(int64) - If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
341
341
  // schedule_times_of_day - array(string) - If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
342
342
  // schedule_time_zone - string - If trigger is `custom_schedule`. Time zone for the schedule.
343
+ // holiday_region - string - If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
343
344
  // always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
344
345
  // always_serialize_jobs - boolean - Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is `true` we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
345
346
  // description - string - Description for the this Automation.
@@ -421,6 +422,10 @@ class Automation {
421
422
  throw new errors.InvalidParameterError(`Bad parameter: schedule_time_zone must be of type String, received ${getType(params.schedule_time_zone)}`)
422
423
  }
423
424
 
425
+ if (params.holiday_region && !isString(params.holiday_region)) {
426
+ throw new errors.InvalidParameterError(`Bad parameter: holiday_region must be of type String, received ${getType(params.holiday_region)}`)
427
+ }
428
+
424
429
  if (params.description && !isString(params.description)) {
425
430
  throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(params.description)}`)
426
431
  }
@@ -582,6 +587,7 @@ class Automation {
582
587
  // schedule_days_of_week - array(int64) - If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
583
588
  // schedule_times_of_day - array(string) - If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
584
589
  // schedule_time_zone - string - If trigger is `custom_schedule`. Time zone for the schedule.
590
+ // holiday_region - string - If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
585
591
  // always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
586
592
  // always_serialize_jobs - boolean - Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is `true` we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
587
593
  // description - string - Description for the this Automation.
@@ -654,6 +660,10 @@ class Automation {
654
660
  throw new errors.InvalidParameterError(`Bad parameter: schedule_time_zone must be of type String, received ${getType(params.schedule_time_zone)}`)
655
661
  }
656
662
 
663
+ if (params.holiday_region && !isString(params.holiday_region)) {
664
+ throw new errors.InvalidParameterError(`Bad parameter: holiday_region must be of type String, received ${getType(params.holiday_region)}`)
665
+ }
666
+
657
667
  if (params.description && !isString(params.description)) {
658
668
  throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(params.description)}`)
659
669
  }
@@ -195,7 +195,7 @@ class Sync {
195
195
  this.attributes.schedule_time_zone = value
196
196
  }
197
197
 
198
- // string # If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
198
+ // string # If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
199
199
  getHolidayRegion = () => this.attributes.holiday_region
200
200
 
201
201
  setHolidayRegion = value => {
@@ -242,6 +242,8 @@ class Sync {
242
242
  // interval - string - If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
243
243
  // trigger - string - Trigger type: daily, custom_schedule, or manual
244
244
  // trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
245
+ // holiday_region - string - If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
246
+ // sync_interval_minutes - int64 - Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
245
247
  // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
246
248
  // schedule_time_zone - string - If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
247
249
  // schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
@@ -296,6 +298,14 @@ class Sync {
296
298
  throw new errors.InvalidParameterError(`Bad parameter: trigger_file must be of type String, received ${getType(params.trigger_file)}`)
297
299
  }
298
300
 
301
+ if (params.holiday_region && !isString(params.holiday_region)) {
302
+ throw new errors.InvalidParameterError(`Bad parameter: holiday_region must be of type String, received ${getType(params.holiday_region)}`)
303
+ }
304
+
305
+ if (params.sync_interval_minutes && !isInt(params.sync_interval_minutes)) {
306
+ throw new errors.InvalidParameterError(`Bad parameter: sync_interval_minutes must be of type Int, received ${getType(params.sync_interval_minutes)}`)
307
+ }
308
+
299
309
  if (params.recurring_day && !isInt(params.recurring_day)) {
300
310
  throw new errors.InvalidParameterError(`Bad parameter: recurring_day must be of type Int, received ${getType(params.recurring_day)}`)
301
311
  }
@@ -424,6 +434,8 @@ class Sync {
424
434
  // interval - string - If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
425
435
  // trigger - string - Trigger type: daily, custom_schedule, or manual
426
436
  // trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
437
+ // holiday_region - string - If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
438
+ // sync_interval_minutes - int64 - Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
427
439
  // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
428
440
  // schedule_time_zone - string - If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
429
441
  // schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
@@ -465,6 +477,14 @@ class Sync {
465
477
  throw new errors.InvalidParameterError(`Bad parameter: trigger_file must be of type String, received ${getType(params.trigger_file)}`)
466
478
  }
467
479
 
480
+ if (params.holiday_region && !isString(params.holiday_region)) {
481
+ throw new errors.InvalidParameterError(`Bad parameter: holiday_region must be of type String, received ${getType(params.holiday_region)}`)
482
+ }
483
+
484
+ if (params.sync_interval_minutes && !isInt(params.sync_interval_minutes)) {
485
+ throw new errors.InvalidParameterError(`Bad parameter: sync_interval_minutes must be of type Int, received ${getType(params.sync_interval_minutes)}`)
486
+ }
487
+
468
488
  if (params.recurring_day && !isInt(params.recurring_day)) {
469
489
  throw new errors.InvalidParameterError(`Bad parameter: recurring_day must be of type Int, received ${getType(params.recurring_day)}`)
470
490
  }
@@ -53,6 +53,12 @@ class UserCipherUse {
53
53
  // user_id - int64 - User ID. If provided, will return uses for this user.
54
54
  // 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.
55
55
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
56
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `updated_at`.
57
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `insecure` and `updated_at`. Valid field combinations are `[ insecure, updated_at ]`.
58
+ // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `updated_at`.
59
+ // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `updated_at`.
60
+ // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `updated_at`.
61
+ // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `updated_at`.
56
62
  static list = async (params = {}, options = {}) => {
57
63
  if (params.user_id && !isInt(params.user_id)) {
58
64
  throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params.user_id)}`)
@@ -85,9 +85,9 @@ class UserLifecycleRule {
85
85
  }
86
86
 
87
87
  // Parameters:
88
- // action (required) - string - Action to take on inactive users (disable or delete)
89
- // authentication_method (required) - string - User authentication method for the rule
90
- // inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
88
+ // action - string - Action to take on inactive users (disable or delete)
89
+ // authentication_method - string - User authentication method for the rule
90
+ // inactivity_days - int64 - Number of days of inactivity before the rule applies
91
91
  // include_site_admins - boolean - Include site admins in the rule
92
92
  // include_folder_admins - boolean - Include folder admins in the rule
93
93
  // user_state - string - State of the users to apply the rule to (inactive or disabled)
@@ -129,30 +129,6 @@ class UserLifecycleRule {
129
129
  }
130
130
  }
131
131
 
132
- if (!params.action) {
133
- if (this.attributes.action) {
134
- params.action = this.action
135
- } else {
136
- throw new errors.MissingParameterError('Parameter missing: action')
137
- }
138
- }
139
-
140
- if (!params.authentication_method) {
141
- if (this.attributes.authentication_method) {
142
- params.authentication_method = this.authentication_method
143
- } else {
144
- throw new errors.MissingParameterError('Parameter missing: authentication_method')
145
- }
146
- }
147
-
148
- if (!params.inactivity_days) {
149
- if (this.attributes.inactivity_days) {
150
- params.inactivity_days = this.inactivity_days
151
- } else {
152
- throw new errors.MissingParameterError('Parameter missing: inactivity_days')
153
- }
154
- }
155
-
156
132
  const response = await Api.sendRequest(`/user_lifecycle_rules/${encodeURIComponent(params.id)}`, 'PATCH', params, this.options)
157
133
 
158
134
  return new UserLifecycleRule(response?.data, this.options)
@@ -244,25 +220,13 @@ class UserLifecycleRule {
244
220
  UserLifecycleRule.find(id, params, options)
245
221
 
246
222
  // Parameters:
247
- // action (required) - string - Action to take on inactive users (disable or delete)
248
- // authentication_method (required) - string - User authentication method for the rule
249
- // inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
223
+ // action - string - Action to take on inactive users (disable or delete)
224
+ // authentication_method - string - User authentication method for the rule
225
+ // inactivity_days - int64 - Number of days of inactivity before the rule applies
250
226
  // include_site_admins - boolean - Include site admins in the rule
251
227
  // include_folder_admins - boolean - Include folder admins in the rule
252
228
  // user_state - string - State of the users to apply the rule to (inactive or disabled)
253
229
  static create = async (params = {}, options = {}) => {
254
- if (!params.action) {
255
- throw new errors.MissingParameterError('Parameter missing: action')
256
- }
257
-
258
- if (!params.authentication_method) {
259
- throw new errors.MissingParameterError('Parameter missing: authentication_method')
260
- }
261
-
262
- if (!params.inactivity_days) {
263
- throw new errors.MissingParameterError('Parameter missing: inactivity_days')
264
- }
265
-
266
230
  if (params.action && !isString(params.action)) {
267
231
  throw new errors.InvalidParameterError(`Bad parameter: action must be of type String, received ${getType(params.action)}`)
268
232
  }