files.com 1.2.161 → 1.2.162
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 +1 -1
- package/docs/models/Folder.md +2 -2
- package/lib/Files.js +1 -1
- package/lib/models/Folder.js +8 -15
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Folder.js +1 -6
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.162
|
package/docs/models/Folder.md
CHANGED
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
|
|
94
94
|
```
|
|
95
95
|
await Folder.listFor(path, {
|
|
96
|
+
'search': "some-partial-filename",
|
|
96
97
|
'search_all': true,
|
|
97
98
|
'with_previews': true,
|
|
98
99
|
'with_priority_color': true,
|
|
@@ -105,10 +106,9 @@ await Folder.listFor(path, {
|
|
|
105
106
|
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
|
106
107
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
107
108
|
* `path` (string): Required - Path to operate on.
|
|
108
|
-
* `filter` (string): If specified, will filter folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
109
109
|
* `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
110
110
|
* `sort_by` (object): Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
|
|
111
|
-
* `search` (string): If
|
|
111
|
+
* `search` (string): If specified, will filter folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
112
112
|
* `search_all` (boolean): Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
113
113
|
* `with_previews` (boolean): Include file previews?
|
|
114
114
|
* `with_priority_color` (boolean): Include file priority color information?
|
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.
|
|
14
|
+
var version = '1.2.162';
|
|
15
15
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
16
16
|
var logLevel = _Logger.LogLevel.INFO;
|
|
17
17
|
var debugRequest = false;
|
package/lib/models/Folder.js
CHANGED
|
@@ -314,10 +314,9 @@ var Folder = /*#__PURE__*/(0, _createClass2.default)(function Folder() {
|
|
|
314
314
|
// cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
|
315
315
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
316
316
|
// path (required) - string - Path to operate on.
|
|
317
|
-
// filter - string - If specified, will filter folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
318
317
|
// preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
319
318
|
// sort_by - object - Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
|
|
320
|
-
// search - string - If
|
|
319
|
+
// search - string - If specified, will filter folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
321
320
|
// search_all - boolean - Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
322
321
|
// with_previews - boolean - Include file previews?
|
|
323
322
|
// with_priority_color - boolean - Include file priority color information?
|
|
@@ -365,33 +364,27 @@ var Folder = /*#__PURE__*/(0, _createClass2.default)(function Folder() {
|
|
|
365
364
|
}
|
|
366
365
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
367
366
|
case 13:
|
|
368
|
-
if (!(params.filter && !(0, _utils.isString)(params.filter))) {
|
|
369
|
-
_context2.next = 15;
|
|
370
|
-
break;
|
|
371
|
-
}
|
|
372
|
-
throw new errors.InvalidParameterError("Bad parameter: filter must be of type String, received ".concat((0, _utils.getType)(params.filter)));
|
|
373
|
-
case 15:
|
|
374
367
|
if (!(params.preview_size && !(0, _utils.isString)(params.preview_size))) {
|
|
375
|
-
_context2.next =
|
|
368
|
+
_context2.next = 15;
|
|
376
369
|
break;
|
|
377
370
|
}
|
|
378
371
|
throw new errors.InvalidParameterError("Bad parameter: preview_size must be of type String, received ".concat((0, _utils.getType)(params.preview_size)));
|
|
379
|
-
case
|
|
372
|
+
case 15:
|
|
380
373
|
if (!(params.search && !(0, _utils.isString)(params.search))) {
|
|
381
|
-
_context2.next =
|
|
374
|
+
_context2.next = 17;
|
|
382
375
|
break;
|
|
383
376
|
}
|
|
384
377
|
throw new errors.InvalidParameterError("Bad parameter: search must be of type String, received ".concat((0, _utils.getType)(params.search)));
|
|
385
|
-
case
|
|
386
|
-
_context2.next =
|
|
378
|
+
case 17:
|
|
379
|
+
_context2.next = 19;
|
|
387
380
|
return _Api.default.sendRequest("/folders/".concat(encodeURIComponent(params.path)), 'GET', params, options);
|
|
388
|
-
case
|
|
381
|
+
case 19:
|
|
389
382
|
response = _context2.sent;
|
|
390
383
|
File = require('./File.js').default;
|
|
391
384
|
return _context2.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
392
385
|
return new File(obj, options);
|
|
393
386
|
})) || []);
|
|
394
|
-
case
|
|
387
|
+
case 22:
|
|
395
388
|
case "end":
|
|
396
389
|
return _context2.stop();
|
|
397
390
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Folder.js
CHANGED
|
@@ -286,10 +286,9 @@ class Folder {
|
|
|
286
286
|
// cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
|
287
287
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
288
288
|
// path (required) - string - Path to operate on.
|
|
289
|
-
// filter - string - If specified, will filter folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
290
289
|
// preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
|
291
290
|
// sort_by - object - Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
|
|
292
|
-
// search - string - If
|
|
291
|
+
// search - string - If specified, will filter folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
293
292
|
// search_all - boolean - Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
294
293
|
// with_previews - boolean - Include file previews?
|
|
295
294
|
// with_priority_color - boolean - Include file priority color information?
|
|
@@ -316,10 +315,6 @@ class Folder {
|
|
|
316
315
|
throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params.path)}`)
|
|
317
316
|
}
|
|
318
317
|
|
|
319
|
-
if (params.filter && !isString(params.filter)) {
|
|
320
|
-
throw new errors.InvalidParameterError(`Bad parameter: filter must be of type String, received ${getType(params.filter)}`)
|
|
321
|
-
}
|
|
322
|
-
|
|
323
318
|
if (params.preview_size && !isString(params.preview_size)) {
|
|
324
319
|
throw new errors.InvalidParameterError(`Bad parameter: preview_size must be of type String, received ${getType(params.preview_size)}`)
|
|
325
320
|
}
|