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 CHANGED
@@ -1 +1 @@
1
- 1.2.161
1
+ 1.2.162
@@ -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 `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
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.161';
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;
@@ -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 `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
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 = 17;
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 17:
372
+ case 15:
380
373
  if (!(params.search && !(0, _utils.isString)(params.search))) {
381
- _context2.next = 19;
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 19:
386
- _context2.next = 21;
378
+ case 17:
379
+ _context2.next = 19;
387
380
  return _Api.default.sendRequest("/folders/".concat(encodeURIComponent(params.path)), 'GET', params, options);
388
- case 21:
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 24:
387
+ case 22:
395
388
  case "end":
396
389
  return _context2.stop();
397
390
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.161",
3
+ "version": "1.2.162",
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.161'
8
+ const version = '1.2.162'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -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 `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
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
  }