seafile-js 0.2.209 → 0.2.210-beta
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 +29 -0
- package/package.json +1 -1
package/lib/seafile-api.js
CHANGED
|
@@ -1404,6 +1404,16 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
1404
1404
|
form.append('newname', newfileName);
|
|
1405
1405
|
return this._sendPostRequest(url, form);
|
|
1406
1406
|
}
|
|
1407
|
+
}, {
|
|
1408
|
+
key: "convertFile",
|
|
1409
|
+
value: function convertFile(repoID, filePath, dstType) {
|
|
1410
|
+
var path = encodeURIComponent(filePath);
|
|
1411
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/file/?p=' + path;
|
|
1412
|
+
var form = new FormData();
|
|
1413
|
+
form.append('operation', 'convert');
|
|
1414
|
+
form.append('dst_type', dstType);
|
|
1415
|
+
return this._sendPostRequest(url, form);
|
|
1416
|
+
}
|
|
1407
1417
|
}, {
|
|
1408
1418
|
key: "lockfile",
|
|
1409
1419
|
value: function lockfile(repoID, filePath) {
|
|
@@ -1587,6 +1597,25 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
1587
1597
|
value: function deleteFileExtendedProperties(repoID, path) {
|
|
1588
1598
|
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/?path=' + path;
|
|
1589
1599
|
return this.req["delete"](url);
|
|
1600
|
+
}
|
|
1601
|
+
}, {
|
|
1602
|
+
key: "setFolderItemsExtendedProperties",
|
|
1603
|
+
value: function setFolderItemsExtendedProperties(repoID, path) {
|
|
1604
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/folder-items-extended-properties/';
|
|
1605
|
+
var form = new FormData();
|
|
1606
|
+
form.append('path', path);
|
|
1607
|
+
return this.req.post(url, form);
|
|
1608
|
+
}
|
|
1609
|
+
}, {
|
|
1610
|
+
key: "queryFolderItemsExtendedPropertiesStatus",
|
|
1611
|
+
value: function queryFolderItemsExtendedPropertiesStatus(repoID, path) {
|
|
1612
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/folder-items-extended-properties/status-query/';
|
|
1613
|
+
var params = {
|
|
1614
|
+
path: path
|
|
1615
|
+
};
|
|
1616
|
+
return this.req.get(url, {
|
|
1617
|
+
params: params
|
|
1618
|
+
});
|
|
1590
1619
|
} // file commit api
|
|
1591
1620
|
|
|
1592
1621
|
}, {
|