seafile-js 0.2.176 → 0.2.180
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 +39 -0
- package/package.json +1 -1
package/lib/seafile-api.js
CHANGED
|
@@ -250,6 +250,17 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
250
250
|
params: params
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
+
}, {
|
|
254
|
+
key: "searchGroupMember",
|
|
255
|
+
value: function searchGroupMember(groupID, q) {
|
|
256
|
+
var url = this.server + '/api/v2.1/groups/' + groupID + '/search-member/';
|
|
257
|
+
var params = {
|
|
258
|
+
q: q
|
|
259
|
+
};
|
|
260
|
+
return this.req.get(url, {
|
|
261
|
+
params: params
|
|
262
|
+
});
|
|
263
|
+
}
|
|
253
264
|
}, {
|
|
254
265
|
key: "addGroupMember",
|
|
255
266
|
value: function addGroupMember(groupID, userName) {
|
|
@@ -470,6 +481,12 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
470
481
|
|
|
471
482
|
return this._sendPostRequest(url, form);
|
|
472
483
|
}
|
|
484
|
+
}, {
|
|
485
|
+
key: "getRepoShareInfo",
|
|
486
|
+
value: function getRepoShareInfo(repoID) {
|
|
487
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/share-info/';
|
|
488
|
+
return this.req.get(url);
|
|
489
|
+
}
|
|
473
490
|
}, {
|
|
474
491
|
key: "listRepoShareLinks",
|
|
475
492
|
value: function listRepoShareLinks(repoID) {
|
|
@@ -1681,6 +1698,19 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
1681
1698
|
return this._sendPostRequest(url, form);
|
|
1682
1699
|
}
|
|
1683
1700
|
}, {
|
|
1701
|
+
key: "saveSharedDir",
|
|
1702
|
+
value: function saveSharedDir(repoID, dstPath, sharedToken, parentDir, items) {
|
|
1703
|
+
var url = this.server + '/api/v2.1/share-links/' + sharedToken + '/save-items-to-repo/';
|
|
1704
|
+
var form = new FormData();
|
|
1705
|
+
form.append('src_parent_dir', parentDir);
|
|
1706
|
+
items.forEach(function (item) {
|
|
1707
|
+
form.append('src_dirents', item);
|
|
1708
|
+
});
|
|
1709
|
+
form.append('dst_repo_id', repoID);
|
|
1710
|
+
form.append('dst_parent_dir', dstPath);
|
|
1711
|
+
return this._sendPostRequest(url, form);
|
|
1712
|
+
}
|
|
1713
|
+
}, {
|
|
1684
1714
|
key: "addAbuseReport",
|
|
1685
1715
|
value: function addAbuseReport(sharedToken, abuseType, description, reporter, filePath) {
|
|
1686
1716
|
var url = this.server + '/api/v2.1/abuse-reports/';
|
|
@@ -4220,6 +4250,15 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
4220
4250
|
params: params
|
|
4221
4251
|
});
|
|
4222
4252
|
}
|
|
4253
|
+
}, {
|
|
4254
|
+
key: "onlyofficeConvert",
|
|
4255
|
+
value: function onlyofficeConvert(repoID, filePath) {
|
|
4256
|
+
var url = this.server + '/onlyoffice-api/convert/';
|
|
4257
|
+
var formData = new FormData();
|
|
4258
|
+
formData.append('repo_id', repoID);
|
|
4259
|
+
formData.append('file_path', filePath);
|
|
4260
|
+
return this._sendPostRequest(url, formData);
|
|
4261
|
+
}
|
|
4223
4262
|
}]);
|
|
4224
4263
|
|
|
4225
4264
|
return SeafileAPI;
|