seafile-js 0.2.198 → 0.2.200
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 +21 -0
- package/package.json +1 -1
package/lib/seafile-api.js
CHANGED
|
@@ -3109,6 +3109,17 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
3109
3109
|
|
|
3110
3110
|
return this.req.post(url, params);
|
|
3111
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
|
+
}
|
|
3112
3123
|
}, {
|
|
3113
3124
|
key: "deleteRepoTrash",
|
|
3114
3125
|
value: function deleteRepoTrash(repoID, days) {
|
|
@@ -4569,6 +4580,16 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
4569
4580
|
formData.append('file_path', filePath);
|
|
4570
4581
|
return this._sendPostRequest(url, formData);
|
|
4571
4582
|
}
|
|
4583
|
+
}, {
|
|
4584
|
+
key: "sdocCopyHistoryFile",
|
|
4585
|
+
value: function sdocCopyHistoryFile(repoID, path, objID, ctime) {
|
|
4586
|
+
var url = this.server + '/api/v2.1/seadoc/copy-history-file/' + repoID + '/';
|
|
4587
|
+
var form = new _formData["default"]();
|
|
4588
|
+
form.append('obj_id', objID);
|
|
4589
|
+
form.append('p', path);
|
|
4590
|
+
form.append('ctime', ctime);
|
|
4591
|
+
return this._sendPostRequest(url, form);
|
|
4592
|
+
}
|
|
4572
4593
|
}]);
|
|
4573
4594
|
|
|
4574
4595
|
return SeafileAPI;
|