files.com 1.2.97 → 1.2.99

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.97
1
+ 1.2.99
@@ -49,10 +49,7 @@
49
49
  ## List API Request Logs
50
50
 
51
51
  ```
52
- await ApiRequestLog.list({
53
- 'filter': "",
54
- 'filter_prefix': "",
55
- })
52
+ await ApiRequestLog.list
56
53
  ```
57
54
 
58
55
 
@@ -57,11 +57,7 @@
57
57
  ## List Apps
58
58
 
59
59
  ```
60
- await App.list({
61
- 'sort_by': "",
62
- 'filter': "",
63
- 'filter_prefix': "",
64
- })
60
+ await App.list
65
61
  ```
66
62
 
67
63
 
@@ -31,10 +31,7 @@
31
31
  ## List Automation Logs
32
32
 
33
33
  ```
34
- await AutomationLog.list({
35
- 'filter': "",
36
- 'filter_prefix': "",
37
- })
34
+ await AutomationLog.list
38
35
  ```
39
36
 
40
37
 
@@ -31,14 +31,7 @@
31
31
  ## List Bandwidth Snapshots
32
32
 
33
33
  ```
34
- await BandwidthSnapshot.list({
35
- 'sort_by': "",
36
- 'filter': "",
37
- 'filter_gt': "",
38
- 'filter_gteq': "",
39
- 'filter_lt': "",
40
- 'filter_lteq': "",
41
- })
34
+ await BandwidthSnapshot.list
42
35
  ```
43
36
 
44
37
 
@@ -35,11 +35,7 @@
35
35
  ## List Behaviors
36
36
 
37
37
  ```
38
- await Behavior.list({
39
- 'sort_by': "",
40
- 'filter': "",
41
- 'filter_prefix': "",
42
- })
38
+ await Behavior.list
43
39
  ```
44
40
 
45
41
 
@@ -23,10 +23,7 @@
23
23
  ## List Bundle Notifications
24
24
 
25
25
  ```
26
- await BundleNotification.list({
27
- 'sort_by': "",
28
- 'filter': "",
29
- })
26
+ await BundleNotification.list
30
27
  ```
31
28
 
32
29
 
@@ -31,15 +31,7 @@
31
31
  ## List Email Incoming Messages
32
32
 
33
33
  ```
34
- await EmailIncomingMessage.list({
35
- 'sort_by': "",
36
- 'filter': "",
37
- 'filter_gt': "",
38
- 'filter_gteq': "",
39
- 'filter_prefix': "",
40
- 'filter_lt': "",
41
- 'filter_lteq': "",
42
- })
34
+ await EmailIncomingMessage.list
43
35
  ```
44
36
 
45
37
 
@@ -31,10 +31,7 @@
31
31
  ## List Email Logs
32
32
 
33
33
  ```
34
- await EmailLog.list({
35
- 'filter': "",
36
- 'filter_prefix': "",
37
- })
34
+ await EmailLog.list
38
35
  ```
39
36
 
40
37
 
@@ -35,10 +35,7 @@
35
35
  ## List Exavault API Request Logs
36
36
 
37
37
  ```
38
- await ExavaultApiRequestLog.list({
39
- 'filter': "",
40
- 'filter_prefix': "",
41
- })
38
+ await ExavaultApiRequestLog.list
42
39
  ```
43
40
 
44
41
 
@@ -39,15 +39,7 @@
39
39
  ## List External Events
40
40
 
41
41
  ```
42
- await ExternalEvent.list({
43
- 'sort_by': "",
44
- 'filter': "",
45
- 'filter_gt': "",
46
- 'filter_gteq': "",
47
- 'filter_prefix': "",
48
- 'filter_lt': "",
49
- 'filter_lteq': "",
50
- })
42
+ await ExternalEvent.list
51
43
  ```
52
44
 
53
45
 
@@ -165,6 +165,7 @@ await file.download({
165
165
  * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
166
166
  * `with_previews` (boolean): Include file preview information?
167
167
  * `with_priority_color` (boolean): Include file priority color information?
168
+ * `point_in_time` (string): Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
168
169
 
169
170
  ### Example Response
170
171
 
@@ -29,10 +29,7 @@
29
29
  ## List File Migration Logs
30
30
 
31
31
  ```
32
- await FileMigrationLog.list({
33
- 'filter': "",
34
- 'filter_prefix': "",
35
- })
32
+ await FileMigrationLog.list
36
33
  ```
37
34
 
38
35
 
@@ -109,6 +109,7 @@ await Folder.listFor(path, {
109
109
  * `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 UI. 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.
110
110
  * `with_previews` (boolean): Include file previews?
111
111
  * `with_priority_color` (boolean): Include file priority color information?
112
+ * `point_in_time` (string): Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
112
113
 
113
114
  ---
114
115
 
@@ -49,10 +49,7 @@
49
49
  ## List FTP Action Logs
50
50
 
51
51
  ```
52
- await FtpActionLog.list({
53
- 'filter': "",
54
- 'filter_prefix': "",
55
- })
52
+ await FtpActionLog.list
56
53
  ```
57
54
 
58
55
 
@@ -35,12 +35,7 @@
35
35
  ## List Groups
36
36
 
37
37
  ```
38
- await Group.list({
39
- 'sort_by': "",
40
- 'filter': "",
41
- 'filter_prefix': "",
42
- 'ids': "",
43
- })
38
+ await Group.list
44
39
  ```
45
40
 
46
41
 
@@ -41,10 +41,7 @@
41
41
  ## List Outbound Connection Logs
42
42
 
43
43
  ```
44
- await OutboundConnectionLog.list({
45
- 'filter': "",
46
- 'filter_prefix': "",
47
- })
44
+ await OutboundConnectionLog.list
48
45
  ```
49
46
 
50
47
 
@@ -29,10 +29,7 @@
29
29
  ## List Public Hosting Request Logs
30
30
 
31
31
  ```
32
- await PublicHostingRequestLog.list({
33
- 'filter': "",
34
- 'filter_prefix': "",
35
- })
32
+ await PublicHostingRequestLog.list
36
33
  ```
37
34
 
38
35
 
@@ -23,14 +23,7 @@
23
23
  ## List Remote Bandwidth Snapshots
24
24
 
25
25
  ```
26
- await RemoteBandwidthSnapshot.list({
27
- 'sort_by': "",
28
- 'filter': "",
29
- 'filter_gt': "",
30
- 'filter_gteq': "",
31
- 'filter_lt': "",
32
- 'filter_lteq': "",
33
- })
26
+ await RemoteBandwidthSnapshot.list
34
27
  ```
35
28
 
36
29
 
@@ -27,10 +27,7 @@
27
27
  ## List Settings Changes
28
28
 
29
29
  ```
30
- await SettingsChange.list({
31
- 'sort_by': "",
32
- 'filter': "",
33
- })
30
+ await SettingsChange.list
34
31
  ```
35
32
 
36
33
 
@@ -53,10 +53,7 @@
53
53
  ## List SFTP Action Logs
54
54
 
55
55
  ```
56
- await SftpActionLog.list({
57
- 'filter': "",
58
- 'filter_prefix': "",
59
- })
56
+ await SftpActionLog.list
60
57
  ```
61
58
 
62
59
 
@@ -33,10 +33,7 @@
33
33
  ## List Sync Logs
34
34
 
35
35
  ```
36
- await SyncLog.list({
37
- 'filter': "",
38
- 'filter_prefix': "",
39
- })
36
+ await SyncLog.list
40
37
  ```
41
38
 
42
39
 
@@ -37,14 +37,7 @@
37
37
  ## List Usage Daily Snapshots
38
38
 
39
39
  ```
40
- await UsageDailySnapshot.list({
41
- 'sort_by': "",
42
- 'filter': "",
43
- 'filter_gt': "",
44
- 'filter_gteq': "",
45
- 'filter_lt': "",
46
- 'filter_lteq': "",
47
- })
40
+ await UsageDailySnapshot.list
48
41
  ```
49
42
 
50
43
 
@@ -149,17 +149,7 @@
149
149
  ## List Users
150
150
 
151
151
  ```
152
- await User.list({
153
- 'sort_by': "",
154
- 'filter': "",
155
- 'filter_gt': "",
156
- 'filter_gteq': "",
157
- 'filter_prefix': "",
158
- 'filter_lt': "",
159
- 'filter_lteq': "",
160
- 'ids': "",
161
- 'search': "",
162
- })
152
+ await User.list
163
153
  ```
164
154
 
165
155
 
@@ -45,10 +45,7 @@
45
45
  ## List WebDAV Action Logs
46
46
 
47
47
  ```
48
- await WebDavActionLog.list({
49
- 'filter': "",
50
- 'filter_prefix': "",
51
- })
48
+ await WebDavActionLog.list
52
49
  ```
53
50
 
54
51
 
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.97';
14
+ var version = '1.2.99';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -463,6 +463,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
463
463
  // preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
464
464
  // with_previews - boolean - Include file preview information?
465
465
  // with_priority_color - boolean - Include file priority color information?
466
+ // point_in_time - string - Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
466
467
  (0, _defineProperty2.default)(this, "download", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
467
468
  var params,
468
469
  response,
@@ -502,26 +503,32 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
502
503
  }
503
504
  throw new errors.InvalidParameterError("Bad parameter: preview_size must be of type String, received ".concat((0, _utils.getType)(params.preview_size)));
504
505
  case 12:
506
+ if (!(params.point_in_time && !(0, _utils.isString)(params.point_in_time))) {
507
+ _context6.next = 14;
508
+ break;
509
+ }
510
+ throw new errors.InvalidParameterError("Bad parameter: point_in_time must be of type String, received ".concat((0, _utils.getType)(params.point_in_time)));
511
+ case 14:
505
512
  if (params.path) {
506
- _context6.next = 18;
513
+ _context6.next = 20;
507
514
  break;
508
515
  }
509
516
  if (!_this.attributes.path) {
510
- _context6.next = 17;
517
+ _context6.next = 19;
511
518
  break;
512
519
  }
513
520
  params.path = _this.path;
514
- _context6.next = 18;
521
+ _context6.next = 20;
515
522
  break;
516
- case 17:
523
+ case 19:
517
524
  throw new errors.MissingParameterError('Parameter missing: path');
518
- case 18:
519
- _context6.next = 20;
520
- return _Api.default.sendRequest("/files/".concat(encodeURIComponent(params.path)), 'GET', params, _this.options);
521
525
  case 20:
526
+ _context6.next = 22;
527
+ return _Api.default.sendRequest("/files/".concat(encodeURIComponent(params.path)), 'GET', params, _this.options);
528
+ case 22:
522
529
  response = _context6.sent;
523
530
  return _context6.abrupt("return", new File(response === null || response === void 0 ? void 0 : response.data, _this.options));
524
- case 22:
531
+ case 24:
525
532
  case "end":
526
533
  return _context6.stop();
527
534
  }
@@ -308,6 +308,7 @@ var Folder = /*#__PURE__*/(0, _createClass2.default)(function Folder() {
308
308
  // 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 UI. 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.
309
309
  // with_previews - boolean - Include file previews?
310
310
  // with_priority_color - boolean - Include file priority color information?
311
+ // point_in_time - string - Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
311
312
  (0, _defineProperty2.default)(Folder, "listFor", /*#__PURE__*/function () {
312
313
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(path) {
313
314
  var _response$data;
@@ -376,15 +377,21 @@ var Folder = /*#__PURE__*/(0, _createClass2.default)(function Folder() {
376
377
  }
377
378
  throw new errors.InvalidParameterError("Bad parameter: search must be of type String, received ".concat((0, _utils.getType)(params.search)));
378
379
  case 21:
379
- _context2.next = 23;
380
- return _Api.default.sendRequest("/folders/".concat(encodeURIComponent(params.path)), 'GET', params, options);
380
+ if (!(params.point_in_time && !(0, _utils.isString)(params.point_in_time))) {
381
+ _context2.next = 23;
382
+ break;
383
+ }
384
+ throw new errors.InvalidParameterError("Bad parameter: point_in_time must be of type String, received ".concat((0, _utils.getType)(params.point_in_time)));
381
385
  case 23:
386
+ _context2.next = 25;
387
+ return _Api.default.sendRequest("/folders/".concat(encodeURIComponent(params.path)), 'GET', params, options);
388
+ case 25:
382
389
  response = _context2.sent;
383
390
  File = require('./File.js').default;
384
391
  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) {
385
392
  return new File(obj, options);
386
393
  })) || []);
387
- case 26:
394
+ case 28:
388
395
  case "end":
389
396
  return _context2.stop();
390
397
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.97",
3
+ "version": "1.2.99",
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.97'
8
+ const version = '1.2.99'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -606,6 +606,7 @@ class File {
606
606
  // preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
607
607
  // with_previews - boolean - Include file preview information?
608
608
  // with_priority_color - boolean - Include file priority color information?
609
+ // point_in_time - string - Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
609
610
  download = async (params = {}) => {
610
611
  if (!this.attributes.path) {
611
612
  throw new errors.EmptyPropertyError('Current object has no path')
@@ -628,6 +629,10 @@ class File {
628
629
  throw new errors.InvalidParameterError(`Bad parameter: preview_size must be of type String, received ${getType(params.preview_size)}`)
629
630
  }
630
631
 
632
+ if (params.point_in_time && !isString(params.point_in_time)) {
633
+ throw new errors.InvalidParameterError(`Bad parameter: point_in_time must be of type String, received ${getType(params.point_in_time)}`)
634
+ }
635
+
631
636
  if (!params.path) {
632
637
  if (this.attributes.path) {
633
638
  params.path = this.path
@@ -280,6 +280,7 @@ class Folder {
280
280
  // 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 UI. 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.
281
281
  // with_previews - boolean - Include file previews?
282
282
  // with_priority_color - boolean - Include file priority color information?
283
+ // point_in_time - string - Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
283
284
  static listFor = async (path, params = {}, options = {}) => {
284
285
  if (!isObject(params)) {
285
286
  throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
@@ -319,6 +320,10 @@ class Folder {
319
320
  throw new errors.InvalidParameterError(`Bad parameter: search must be of type String, received ${getType(params.search)}`)
320
321
  }
321
322
 
323
+ if (params.point_in_time && !isString(params.point_in_time)) {
324
+ throw new errors.InvalidParameterError(`Bad parameter: point_in_time must be of type String, received ${getType(params.point_in_time)}`)
325
+ }
326
+
322
327
  const response = await Api.sendRequest(`/folders/${encodeURIComponent(params.path)}`, 'GET', params, options)
323
328
 
324
329
  const File = require('./File.js').default