files.com 1.1.14 → 1.1.16

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.14
1
+ 1.1.16
@@ -27,11 +27,10 @@
27
27
  * `key` (string): API Key actual key string
28
28
  * `last_use_at` (date-time): API Key last used - note this value is only updated once per 3 hour period, so the 'actual' time of last use may be up to 3 hours later than this timestamp.
29
29
  * `name` (string): Internal name for the API Key. For your use.
30
- * `permission_set` (string): Permissions for this API Key. 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). 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.
30
+ * `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). 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.
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 this api key.
35
34
 
36
35
  ---
37
36
 
@@ -90,7 +89,6 @@ await ApiKey.create({
90
89
  'description': "example",
91
90
  'expires_at': "2000-01-01T01:00:00Z",
92
91
  'permission_set': "full",
93
- 'path': "shared/docs",
94
92
  })
95
93
  ```
96
94
 
@@ -101,8 +99,7 @@ await ApiKey.create({
101
99
  * `name` (string): Internal name for the API Key. For your use.
102
100
  * `description` (string): User-supplied description of API key.
103
101
  * `expires_at` (string): API Key expiration date
104
- * `permission_set` (string): Permissions for this API Key. 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). 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.
105
- * `path` (string): Folder path restriction for this api key.
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). 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.
106
103
 
107
104
  ---
108
105
 
@@ -121,7 +118,7 @@ await ApiKey.updateCurrent({
121
118
 
122
119
  * `expires_at` (string): API Key expiration date
123
120
  * `name` (string): Internal name for the API Key. For your use.
124
- * `permission_set` (string): Permissions for this API Key. 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). 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.
121
+ * `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). 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.
125
122
 
126
123
  ---
127
124
 
@@ -153,7 +150,7 @@ await api_key.update({
153
150
  * `name` (string): Internal name for the API Key. For your use.
154
151
  * `description` (string): User-supplied description of API key.
155
152
  * `expires_at` (string): API Key expiration date
156
- * `permission_set` (string): Permissions for this API Key. 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). 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.
153
+ * `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). 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.
157
154
 
158
155
  ### Example Response
159
156
 
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.1.14';
14
+ var version = '1.1.16';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -86,7 +86,7 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
86
86
  (0, _defineProperty2.default)(this, "setName", function (value) {
87
87
  _this.attributes.name = value;
88
88
  });
89
- // string # Permissions for this API Key. 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). 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.
89
+ // 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). 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.
90
90
  (0, _defineProperty2.default)(this, "getPermissionSet", function () {
91
91
  return _this.attributes.permission_set;
92
92
  });
@@ -114,18 +114,11 @@ 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 this api key.
118
- (0, _defineProperty2.default)(this, "getPath", function () {
119
- return _this.attributes.path;
120
- });
121
- (0, _defineProperty2.default)(this, "setPath", function (value) {
122
- _this.attributes.path = value;
123
- });
124
117
  // Parameters:
125
118
  // name - string - Internal name for the API Key. For your use.
126
119
  // description - string - User-supplied description of API key.
127
120
  // expires_at - string - API Key expiration date
128
- // permission_set - string - Permissions for this API Key. 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). 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.
121
+ // 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). 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.
129
122
  (0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
130
123
  var params,
131
124
  response,
@@ -433,8 +426,7 @@ _class = ApiKey;
433
426
  // name - string - Internal name for the API Key. For your use.
434
427
  // description - string - User-supplied description of API key.
435
428
  // expires_at - string - API Key expiration date
436
- // permission_set - string - Permissions for this API Key. 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). 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.
437
- // path - string - Folder path restriction for this api key.
429
+ // 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). 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.
438
430
  (0, _defineProperty2.default)(ApiKey, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
439
431
  var params,
440
432
  options,
@@ -475,18 +467,12 @@ _class = ApiKey;
475
467
  }
476
468
  throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params['permission_set'])));
477
469
  case 12:
478
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
479
- _context7.next = 14;
480
- break;
481
- }
482
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
483
- case 14:
484
- _context7.next = 16;
470
+ _context7.next = 14;
485
471
  return _Api.default.sendRequest("/api_keys", 'POST', params, options);
486
- case 16:
472
+ case 14:
487
473
  response = _context7.sent;
488
474
  return _context7.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
489
- case 18:
475
+ case 16:
490
476
  case "end":
491
477
  return _context7.stop();
492
478
  }
@@ -495,7 +481,7 @@ _class = ApiKey;
495
481
  // Parameters:
496
482
  // expires_at - string - API Key expiration date
497
483
  // name - string - Internal name for the API Key. For your use.
498
- // permission_set - string - Permissions for this API Key. 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). 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.
484
+ // 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). 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.
499
485
  (0, _defineProperty2.default)(ApiKey, "updateCurrent", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
500
486
  var params,
501
487
  options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
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.1.14'
8
+ const version = '1.1.16'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -76,7 +76,7 @@ class ApiKey {
76
76
  this.attributes.name = value
77
77
  }
78
78
 
79
- // string # Permissions for this API Key. 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). 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.
79
+ // 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). 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.
80
80
  getPermissionSet = () => this.attributes.permission_set
81
81
 
82
82
  setPermissionSet = value => {
@@ -104,19 +104,12 @@ class ApiKey {
104
104
  this.attributes.user_id = value
105
105
  }
106
106
 
107
- // string # Folder path restriction for this api key.
108
- getPath = () => this.attributes.path
109
-
110
- setPath = value => {
111
- this.attributes.path = value
112
- }
113
-
114
107
 
115
108
  // Parameters:
116
109
  // name - string - Internal name for the API Key. For your use.
117
110
  // description - string - User-supplied description of API key.
118
111
  // expires_at - string - API Key expiration date
119
- // permission_set - string - Permissions for this API Key. 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). 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.
112
+ // 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). 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.
120
113
  update = async (params = {}) => {
121
114
  if (!this.attributes.id) {
122
115
  throw new errors.EmptyPropertyError('Current object has no id')
@@ -269,8 +262,7 @@ class ApiKey {
269
262
  // name - string - Internal name for the API Key. For your use.
270
263
  // description - string - User-supplied description of API key.
271
264
  // expires_at - string - API Key expiration date
272
- // permission_set - string - Permissions for this API Key. 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). 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
- // path - string - Folder path restriction for this api key.
265
+ // 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). 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.
274
266
  static create = async (params = {}, options = {}) => {
275
267
  if (params['user_id'] && !isInt(params['user_id'])) {
276
268
  throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
@@ -292,10 +284,6 @@ class ApiKey {
292
284
  throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(params['permission_set'])}`)
293
285
  }
294
286
 
295
- if (params['path'] && !isString(params['path'])) {
296
- throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params['path'])}`)
297
- }
298
-
299
287
  const response = await Api.sendRequest(`/api_keys`, 'POST', params, options)
300
288
 
301
289
 
@@ -305,7 +293,7 @@ class ApiKey {
305
293
  // Parameters:
306
294
  // expires_at - string - API Key expiration date
307
295
  // name - string - Internal name for the API Key. For your use.
308
- // permission_set - string - Permissions for this API Key. 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). 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.
296
+ // 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). 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.
309
297
  static updateCurrent = async (params = {}, options = {}) => {
310
298
  if (params['expires_at'] && !isString(params['expires_at'])) {
311
299
  throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(params['expires_at'])}`)