files.com 1.2.82 → 1.2.83
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/Lock.md +3 -3
- package/lib/Files.js +1 -1
- package/lib/models/Lock.js +8 -14
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Lock.js +3 -7
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.83
|
package/docs/models/Lock.md
CHANGED
@@ -68,10 +68,10 @@ await Lock.create(path, {
|
|
68
68
|
### Parameters
|
69
69
|
|
70
70
|
* `path` (string): Required - Path
|
71
|
-
* `allow_access_by_any_user` (boolean):
|
71
|
+
* `allow_access_by_any_user` (boolean): Can lock be modified by users other than its creator?
|
72
72
|
* `exclusive` (boolean): Is lock exclusive?
|
73
|
-
* `recursive` (
|
74
|
-
* `timeout` (int64): Lock timeout
|
73
|
+
* `recursive` (boolean): Does lock apply to subfolders?
|
74
|
+
* `timeout` (int64): Lock timeout in seconds
|
75
75
|
|
76
76
|
---
|
77
77
|
|
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.83';
|
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/Lock.js
CHANGED
@@ -289,10 +289,10 @@ _Lock = Lock;
|
|
289
289
|
}());
|
290
290
|
// Parameters:
|
291
291
|
// path (required) - string - Path
|
292
|
-
// allow_access_by_any_user - boolean -
|
292
|
+
// allow_access_by_any_user - boolean - Can lock be modified by users other than its creator?
|
293
293
|
// exclusive - boolean - Is lock exclusive?
|
294
|
-
// recursive -
|
295
|
-
// timeout - int64 - Lock timeout
|
294
|
+
// recursive - boolean - Does lock apply to subfolders?
|
295
|
+
// timeout - int64 - Lock timeout in seconds
|
296
296
|
(0, _defineProperty2.default)(Lock, "create", /*#__PURE__*/function () {
|
297
297
|
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(path) {
|
298
298
|
var params,
|
@@ -323,24 +323,18 @@ _Lock = Lock;
|
|
323
323
|
}
|
324
324
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
325
325
|
case 9:
|
326
|
-
if (!(params.recursive && !(0, _utils.isString)(params.recursive))) {
|
327
|
-
_context4.next = 11;
|
328
|
-
break;
|
329
|
-
}
|
330
|
-
throw new errors.InvalidParameterError("Bad parameter: recursive must be of type String, received ".concat((0, _utils.getType)(params.recursive)));
|
331
|
-
case 11:
|
332
326
|
if (!(params.timeout && !(0, _utils.isInt)(params.timeout))) {
|
333
|
-
_context4.next =
|
327
|
+
_context4.next = 11;
|
334
328
|
break;
|
335
329
|
}
|
336
330
|
throw new errors.InvalidParameterError("Bad parameter: timeout must be of type Int, received ".concat((0, _utils.getType)(params.timeout)));
|
337
|
-
case
|
338
|
-
_context4.next =
|
331
|
+
case 11:
|
332
|
+
_context4.next = 13;
|
339
333
|
return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params.path)), 'POST', params, options);
|
340
|
-
case
|
334
|
+
case 13:
|
341
335
|
response = _context4.sent;
|
342
336
|
return _context4.abrupt("return", new _Lock(response === null || response === void 0 ? void 0 : response.data, options));
|
343
|
-
case
|
337
|
+
case 15:
|
344
338
|
case "end":
|
345
339
|
return _context4.stop();
|
346
340
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Lock.js
CHANGED
@@ -195,10 +195,10 @@ class Lock {
|
|
195
195
|
|
196
196
|
// Parameters:
|
197
197
|
// path (required) - string - Path
|
198
|
-
// allow_access_by_any_user - boolean -
|
198
|
+
// allow_access_by_any_user - boolean - Can lock be modified by users other than its creator?
|
199
199
|
// exclusive - boolean - Is lock exclusive?
|
200
|
-
// recursive -
|
201
|
-
// timeout - int64 - Lock timeout
|
200
|
+
// recursive - boolean - Does lock apply to subfolders?
|
201
|
+
// timeout - int64 - Lock timeout in seconds
|
202
202
|
static create = async (path, params = {}, options = {}) => {
|
203
203
|
if (!isObject(params)) {
|
204
204
|
throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
|
@@ -214,10 +214,6 @@ class Lock {
|
|
214
214
|
throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params.path)}`)
|
215
215
|
}
|
216
216
|
|
217
|
-
if (params.recursive && !isString(params.recursive)) {
|
218
|
-
throw new errors.InvalidParameterError(`Bad parameter: recursive must be of type String, received ${getType(params.recursive)}`)
|
219
|
-
}
|
220
|
-
|
221
217
|
if (params.timeout && !isInt(params.timeout)) {
|
222
218
|
throw new errors.InvalidParameterError(`Bad parameter: timeout must be of type Int, received ${getType(params.timeout)}`)
|
223
219
|
}
|