files.com 1.2.112 → 1.2.114
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/models/ApiKey.md +2 -2
- package/docs/models/File.md +0 -1
- package/docs/models/Folder.md +0 -1
- package/lib/Files.js +1 -1
- package/lib/models/ApiKey.js +2 -2
- package/lib/models/File.js +8 -15
- package/lib/models/Folder.js +3 -10
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/ApiKey.js +2 -2
- package/src/models/File.js +0 -5
- package/src/models/Folder.js +0 -5
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.114
|
package/docs/models/ApiKey.md
CHANGED
@@ -31,7 +31,7 @@
|
|
31
31
|
* `platform` (string): If this API key represents a Desktop app, what platform was it created on?
|
32
32
|
* `url` (string): URL for API host.
|
33
33
|
* `user_id` (int64): User ID for the owner of this API Key. May be blank for Site-wide API Keys.
|
34
|
-
* `path` (string): Folder path restriction for
|
34
|
+
* `path` (string): Folder path restriction for `office_integration` permission set API keys.
|
35
35
|
|
36
36
|
---
|
37
37
|
|
@@ -101,7 +101,7 @@ await ApiKey.create({
|
|
101
101
|
* `expires_at` (string): API Key expiration date
|
102
102
|
* `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
103
103
|
* `name` (string): Required - Internal name for the API Key. For your use.
|
104
|
-
* `path` (string): Folder path restriction for
|
104
|
+
* `path` (string): Folder path restriction for `office_integration` permission set API keys.
|
105
105
|
|
106
106
|
---
|
107
107
|
|
package/docs/models/File.md
CHANGED
@@ -165,7 +165,6 @@ 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.
|
169
168
|
|
170
169
|
### Example Response
|
171
170
|
|
package/docs/models/Folder.md
CHANGED
@@ -108,7 +108,6 @@ await Folder.listFor(path, {
|
|
108
108
|
* `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.
|
109
109
|
* `with_previews` (boolean): Include file previews?
|
110
110
|
* `with_priority_color` (boolean): Include file priority color information?
|
111
|
-
* `point_in_time` (string): Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
|
112
111
|
|
113
112
|
---
|
114
113
|
|
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.114';
|
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/ApiKey.js
CHANGED
@@ -114,7 +114,7 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
114
114
|
(0, _defineProperty2.default)(this, "setUserId", function (value) {
|
115
115
|
_this.attributes.user_id = value;
|
116
116
|
});
|
117
|
-
// string # Folder path restriction for
|
117
|
+
// string # Folder path restriction for `office_integration` permission set API keys.
|
118
118
|
(0, _defineProperty2.default)(this, "getPath", function () {
|
119
119
|
return _this.attributes.path;
|
120
120
|
});
|
@@ -430,7 +430,7 @@ _ApiKey = ApiKey;
|
|
430
430
|
// expires_at - string - API Key expiration date
|
431
431
|
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
432
432
|
// name (required) - string - Internal name for the API Key. For your use.
|
433
|
-
// path - string - Folder path restriction for
|
433
|
+
// path - string - Folder path restriction for `office_integration` permission set API keys.
|
434
434
|
(0, _defineProperty2.default)(ApiKey, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
435
435
|
var params,
|
436
436
|
options,
|
package/lib/models/File.js
CHANGED
@@ -463,7 +463,6 @@ 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.
|
467
466
|
(0, _defineProperty2.default)(this, "download", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
468
467
|
var params,
|
469
468
|
response,
|
@@ -503,32 +502,26 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
503
502
|
}
|
504
503
|
throw new errors.InvalidParameterError("Bad parameter: preview_size must be of type String, received ".concat((0, _utils.getType)(params.preview_size)));
|
505
504
|
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:
|
512
505
|
if (params.path) {
|
513
|
-
_context6.next =
|
506
|
+
_context6.next = 18;
|
514
507
|
break;
|
515
508
|
}
|
516
509
|
if (!_this.attributes.path) {
|
517
|
-
_context6.next =
|
510
|
+
_context6.next = 17;
|
518
511
|
break;
|
519
512
|
}
|
520
513
|
params.path = _this.path;
|
521
|
-
_context6.next =
|
514
|
+
_context6.next = 18;
|
522
515
|
break;
|
523
|
-
case
|
516
|
+
case 17:
|
524
517
|
throw new errors.MissingParameterError('Parameter missing: path');
|
525
|
-
case
|
526
|
-
_context6.next =
|
518
|
+
case 18:
|
519
|
+
_context6.next = 20;
|
527
520
|
return _Api.default.sendRequest("/files/".concat(encodeURIComponent(params.path)), 'GET', params, _this.options);
|
528
|
-
case
|
521
|
+
case 20:
|
529
522
|
response = _context6.sent;
|
530
523
|
return _context6.abrupt("return", new File(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
531
|
-
case
|
524
|
+
case 22:
|
532
525
|
case "end":
|
533
526
|
return _context6.stop();
|
534
527
|
}
|
package/lib/models/Folder.js
CHANGED
@@ -307,7 +307,6 @@ var Folder = /*#__PURE__*/(0, _createClass2.default)(function Folder() {
|
|
307
307
|
// 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.
|
308
308
|
// with_previews - boolean - Include file previews?
|
309
309
|
// with_priority_color - boolean - Include file priority color information?
|
310
|
-
// point_in_time - string - Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
|
311
310
|
(0, _defineProperty2.default)(Folder, "listFor", /*#__PURE__*/function () {
|
312
311
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(path) {
|
313
312
|
var _response$data;
|
@@ -370,21 +369,15 @@ var Folder = /*#__PURE__*/(0, _createClass2.default)(function Folder() {
|
|
370
369
|
}
|
371
370
|
throw new errors.InvalidParameterError("Bad parameter: search must be of type String, received ".concat((0, _utils.getType)(params.search)));
|
372
371
|
case 19:
|
373
|
-
|
374
|
-
_context2.next = 21;
|
375
|
-
break;
|
376
|
-
}
|
377
|
-
throw new errors.InvalidParameterError("Bad parameter: point_in_time must be of type String, received ".concat((0, _utils.getType)(params.point_in_time)));
|
378
|
-
case 21:
|
379
|
-
_context2.next = 23;
|
372
|
+
_context2.next = 21;
|
380
373
|
return _Api.default.sendRequest("/folders/".concat(encodeURIComponent(params.path)), 'GET', params, options);
|
381
|
-
case
|
374
|
+
case 21:
|
382
375
|
response = _context2.sent;
|
383
376
|
File = require('./File.js').default;
|
384
377
|
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
378
|
return new File(obj, options);
|
386
379
|
})) || []);
|
387
|
-
case
|
380
|
+
case 24:
|
388
381
|
case "end":
|
389
382
|
return _context2.stop();
|
390
383
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/ApiKey.js
CHANGED
@@ -108,7 +108,7 @@ class ApiKey {
|
|
108
108
|
this.attributes.user_id = value
|
109
109
|
}
|
110
110
|
|
111
|
-
// string # Folder path restriction for
|
111
|
+
// string # Folder path restriction for `office_integration` permission set API keys.
|
112
112
|
getPath = () => this.attributes.path
|
113
113
|
|
114
114
|
setPath = value => {
|
@@ -271,7 +271,7 @@ class ApiKey {
|
|
271
271
|
// expires_at - string - API Key expiration date
|
272
272
|
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
273
273
|
// name (required) - string - Internal name for the API Key. For your use.
|
274
|
-
// path - string - Folder path restriction for
|
274
|
+
// path - string - Folder path restriction for `office_integration` permission set API keys.
|
275
275
|
static create = async (params = {}, options = {}) => {
|
276
276
|
if (!params.name) {
|
277
277
|
throw new errors.MissingParameterError('Parameter missing: name')
|
package/src/models/File.js
CHANGED
@@ -606,7 +606,6 @@ 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.
|
610
609
|
download = async (params = {}) => {
|
611
610
|
if (!this.attributes.path) {
|
612
611
|
throw new errors.EmptyPropertyError('Current object has no path')
|
@@ -629,10 +628,6 @@ class File {
|
|
629
628
|
throw new errors.InvalidParameterError(`Bad parameter: preview_size must be of type String, received ${getType(params.preview_size)}`)
|
630
629
|
}
|
631
630
|
|
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
|
-
|
636
631
|
if (!params.path) {
|
637
632
|
if (this.attributes.path) {
|
638
633
|
params.path = this.path
|
package/src/models/Folder.js
CHANGED
@@ -279,7 +279,6 @@ class Folder {
|
|
279
279
|
// 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.
|
280
280
|
// with_previews - boolean - Include file previews?
|
281
281
|
// with_priority_color - boolean - Include file priority color information?
|
282
|
-
// point_in_time - string - Point in time to view the folder. Available only on remote server mounts for S3 with versioned buckets.
|
283
282
|
static listFor = async (path, params = {}, options = {}) => {
|
284
283
|
if (!isObject(params)) {
|
285
284
|
throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
|
@@ -315,10 +314,6 @@ class Folder {
|
|
315
314
|
throw new errors.InvalidParameterError(`Bad parameter: search must be of type String, received ${getType(params.search)}`)
|
316
315
|
}
|
317
316
|
|
318
|
-
if (params.point_in_time && !isString(params.point_in_time)) {
|
319
|
-
throw new errors.InvalidParameterError(`Bad parameter: point_in_time must be of type String, received ${getType(params.point_in_time)}`)
|
320
|
-
}
|
321
|
-
|
322
317
|
const response = await Api.sendRequest(`/folders/${encodeURIComponent(params.path)}`, 'GET', params, options)
|
323
318
|
|
324
319
|
const File = require('./File.js').default
|