files.com 1.2.204 → 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.204
1
+ 1.2.205
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.204';
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.204",
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.204'
8
+ const version = '1.2.205'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO