files.com 1.2.203 → 1.2.205

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/README.md CHANGED
@@ -668,6 +668,40 @@ Error
668
668
  | `SiteConfiguration_TrialLockedError`| `SiteConfigurationError` |
669
669
  | `SiteConfiguration_UserRequestsEnabledRequiredError`| `SiteConfigurationError` |
670
670
 
671
+ ## {frontmatter.title}
672
+
673
+ Certain API operations return lists of objects. When the number of objects in the list is large,
674
+ the API will paginate the results.
675
+
676
+ The Files.com JavaScript SDK automatically paginates through lists of objects by default.
677
+
678
+ ```javascript title="Example Request" hasDataFormatSelector
679
+ import File from 'files.com/lib/models/File';
680
+ import * as FilesErrors from 'files.com/lib/Errors';
681
+
682
+ Files.configureNetwork({
683
+ // true by default
684
+ autoPaginate: true,
685
+ });
686
+
687
+ try {
688
+ const files = await Folder.listFor(path, {
689
+ search: "some-partial-filename",
690
+ });
691
+ for (const file of files) {
692
+ // Operate on file
693
+ }
694
+ } catch (err) {
695
+ if (err instanceof FilesErrors.NotAuthenticatedError) {
696
+ console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
697
+ } else if (err instanceof FilesErrors.FilesError) {
698
+ console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
699
+ } else {
700
+ throw err;
701
+ }
702
+ }
703
+ ```
704
+
671
705
  ## Case Sensitivity
672
706
 
673
707
  The Files.com API compares files and paths in a case-insensitive manner.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.203
1
+ 1.2.205
@@ -100,8 +100,8 @@
100
100
  * `path` (string): Path on which this Automation runs. Supports globs, except on remote mounts. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
101
101
  * `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
102
102
  * `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`.
103
- * `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes).
104
- * `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times.
103
+ * `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
104
+ * `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
105
105
  * `schedule` (object): If trigger is `custom_schedule`, Custom schedule description for when the automation should be run in json format.
106
106
  * `human_readable_schedule` (string): If trigger is `custom_schedule`, Human readable Custom schedule description for when the automation should be run.
107
107
  * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, Custom schedule description for when the automation should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
@@ -214,8 +214,8 @@ await Automation.create({
214
214
  * `name` (string): Name for this automation.
215
215
  * `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
216
216
  * `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
217
- * `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes).
218
- * `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times.
217
+ * `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
218
+ * `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
219
219
  * `trigger` (string): How this automation is triggered to run.
220
220
  * `trigger_actions` (array(string)): If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
221
221
  * `value` (object): A Hash of attributes specific to the automation type.
@@ -304,8 +304,8 @@ await automation.update({
304
304
  * `name` (string): Name for this automation.
305
305
  * `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
306
306
  * `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
307
- * `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes).
308
- * `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times.
307
+ * `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
308
+ * `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
309
309
  * `trigger` (string): How this automation is triggered to run.
310
310
  * `trigger_actions` (array(string)): If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
311
311
  * `value` (object): A Hash of attributes specific to the automation type.
package/lib/Files.js CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
11
11
  var apiKey;
12
12
  var baseUrl = 'https://app.files.com';
13
13
  var sessionId = null;
14
- var version = '1.2.203';
14
+ var version = '1.2.205';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -187,14 +187,14 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
187
187
  (0, _defineProperty2.default)(this, "setRecurringDay", function (value) {
188
188
  _this.attributes.recurring_day = value;
189
189
  });
190
- // int64 # If the Automation fails, retry at this interval (in minutes).
190
+ // int64 # If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
191
191
  (0, _defineProperty2.default)(this, "getRetryOnFailureIntervalInMinutes", function () {
192
192
  return _this.attributes.retry_on_failure_interval_in_minutes;
193
193
  });
194
194
  (0, _defineProperty2.default)(this, "setRetryOnFailureIntervalInMinutes", function (value) {
195
195
  _this.attributes.retry_on_failure_interval_in_minutes = value;
196
196
  });
197
- // int64 # If the Automation fails, retry at most this many times.
197
+ // int64 # If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
198
198
  (0, _defineProperty2.default)(this, "getRetryOnFailureNumberOfAttempts", function () {
199
199
  return _this.attributes.retry_on_failure_number_of_attempts;
200
200
  });
@@ -365,8 +365,8 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
365
365
  // name - string - Name for this automation.
366
366
  // overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
367
367
  // path_time_zone - string - Timezone to use when rendering timestamps in paths.
368
- // retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes).
369
- // retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times.
368
+ // retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
369
+ // retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
370
370
  // trigger - string - How this automation is triggered to run.
371
371
  // trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
372
372
  // value - object - A Hash of attributes specific to the automation type.
@@ -782,8 +782,8 @@ _Automation = Automation;
782
782
  // name - string - Name for this automation.
783
783
  // overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
784
784
  // path_time_zone - string - Timezone to use when rendering timestamps in paths.
785
- // retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes).
786
- // retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times.
785
+ // retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
786
+ // retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
787
787
  // trigger - string - How this automation is triggered to run.
788
788
  // trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
789
789
  // value - object - A Hash of attributes specific to the automation type.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.203",
3
+ "version": "1.2.205",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
5
5
  let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
- const version = '1.2.203'
8
+ const version = '1.2.205'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -182,14 +182,14 @@ class Automation {
182
182
  this.attributes.recurring_day = value
183
183
  }
184
184
 
185
- // int64 # If the Automation fails, retry at this interval (in minutes).
185
+ // int64 # If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
186
186
  getRetryOnFailureIntervalInMinutes = () => this.attributes.retry_on_failure_interval_in_minutes
187
187
 
188
188
  setRetryOnFailureIntervalInMinutes = value => {
189
189
  this.attributes.retry_on_failure_interval_in_minutes = value
190
190
  }
191
191
 
192
- // int64 # If the Automation fails, retry at most this many times.
192
+ // int64 # If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
193
193
  getRetryOnFailureNumberOfAttempts = () => this.attributes.retry_on_failure_number_of_attempts
194
194
 
195
195
  setRetryOnFailureNumberOfAttempts = value => {
@@ -337,8 +337,8 @@ class Automation {
337
337
  // name - string - Name for this automation.
338
338
  // overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
339
339
  // path_time_zone - string - Timezone to use when rendering timestamps in paths.
340
- // retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes).
341
- // retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times.
340
+ // retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
341
+ // retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
342
342
  // trigger - string - How this automation is triggered to run.
343
343
  // trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
344
344
  // value - object - A Hash of attributes specific to the automation type.
@@ -578,8 +578,8 @@ class Automation {
578
578
  // name - string - Name for this automation.
579
579
  // overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
580
580
  // path_time_zone - string - Timezone to use when rendering timestamps in paths.
581
- // retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes).
582
- // retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times.
581
+ // retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
582
+ // retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
583
583
  // trigger - string - How this automation is triggered to run.
584
584
  // trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
585
585
  // value - object - A Hash of attributes specific to the automation type.