seafile-js 0.2.197 → 0.2.199
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/lib/seafile-api.js +31 -0
- package/package.json +1 -1
package/lib/seafile-api.js
CHANGED
|
@@ -462,6 +462,26 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
462
462
|
return this._sendPostRequest(url, form);
|
|
463
463
|
}
|
|
464
464
|
}, {
|
|
465
|
+
key: "batchCreateMultiShareLink",
|
|
466
|
+
value: function batchCreateMultiShareLink(repoID, path, shareLinkNum, autoGeneratePassword, expirationTime, permissions) {
|
|
467
|
+
var url = this.server + '/api/v2.1/multi-share-links/batch/';
|
|
468
|
+
var form = new _formData["default"]();
|
|
469
|
+
form.append('path', path);
|
|
470
|
+
form.append('repo_id', repoID);
|
|
471
|
+
form.append('number', shareLinkNum);
|
|
472
|
+
form.append('auto_generate_password', autoGeneratePassword);
|
|
473
|
+
|
|
474
|
+
if (permissions) {
|
|
475
|
+
form.append('permissions', permissions);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (expirationTime) {
|
|
479
|
+
form.append('expiration_time', expirationTime);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
return this._sendPostRequest(url, form);
|
|
483
|
+
}
|
|
484
|
+
}, {
|
|
465
485
|
key: "createShareLink",
|
|
466
486
|
value: function createShareLink(repoID, path, password, expirationTime, permissions) {
|
|
467
487
|
var url = this.server + '/api/v2.1/share-links/';
|
|
@@ -3089,6 +3109,17 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
3089
3109
|
|
|
3090
3110
|
return this.req.post(url, params);
|
|
3091
3111
|
}
|
|
3112
|
+
}, {
|
|
3113
|
+
key: "restoreDirents",
|
|
3114
|
+
value: function restoreDirents(repoID, commentID, paths) {
|
|
3115
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/trash/revert-dirents/';
|
|
3116
|
+
var formData = new _formData["default"]();
|
|
3117
|
+
paths.forEach(function (path) {
|
|
3118
|
+
formData.append('path', path);
|
|
3119
|
+
});
|
|
3120
|
+
formData.append('commit_id', commentID);
|
|
3121
|
+
return this._sendPostRequest(url, formData);
|
|
3122
|
+
}
|
|
3092
3123
|
}, {
|
|
3093
3124
|
key: "deleteRepoTrash",
|
|
3094
3125
|
value: function deleteRepoTrash(repoID, days) {
|