seafile-js 0.2.205 → 0.2.207
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 +44 -1
- package/package.json +1 -1
package/lib/seafile-api.js
CHANGED
|
@@ -526,6 +526,17 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
526
526
|
var url = this.server + '/api/v2.1/share-links/' + token + '/';
|
|
527
527
|
return this.req["delete"](url);
|
|
528
528
|
}
|
|
529
|
+
}, {
|
|
530
|
+
key: "deleteShareLinks",
|
|
531
|
+
value: function deleteShareLinks(tokens) {
|
|
532
|
+
var url = this.server + '/api/v2.1/share-links/';
|
|
533
|
+
var param = {
|
|
534
|
+
tokens: tokens
|
|
535
|
+
};
|
|
536
|
+
return this.req["delete"](url, {
|
|
537
|
+
data: param
|
|
538
|
+
});
|
|
539
|
+
}
|
|
529
540
|
}, {
|
|
530
541
|
key: "cleanInvalidShareLinks",
|
|
531
542
|
value: function cleanInvalidShareLinks() {
|
|
@@ -1550,6 +1561,37 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
1550
1561
|
value: function getFileRevision(repoID, commitID, filePath) {
|
|
1551
1562
|
var url = this.server + '/api2/' + 'repos/' + repoID + '/file' + '/revision/?p=' + encodeURIComponent(filePath) + '&commit_id=' + commitID;
|
|
1552
1563
|
return this.req.get(url);
|
|
1564
|
+
} // file extended properties
|
|
1565
|
+
|
|
1566
|
+
}, {
|
|
1567
|
+
key: "getFileExtendedProperties",
|
|
1568
|
+
value: function getFileExtendedProperties(repoID, path) {
|
|
1569
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/?path=' + path;
|
|
1570
|
+
return this.req.get(url);
|
|
1571
|
+
}
|
|
1572
|
+
}, {
|
|
1573
|
+
key: "newFileExtendedProperties",
|
|
1574
|
+
value: function newFileExtendedProperties(repoID, path, data) {
|
|
1575
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/';
|
|
1576
|
+
var form = new _formData["default"]();
|
|
1577
|
+
form.append('path', path);
|
|
1578
|
+
form.append('props_data', JSON.stringify(data));
|
|
1579
|
+
return this._sendPostRequest(url, form);
|
|
1580
|
+
}
|
|
1581
|
+
}, {
|
|
1582
|
+
key: "updateFileExtendedProperties",
|
|
1583
|
+
value: function updateFileExtendedProperties(repoID, path, data) {
|
|
1584
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/';
|
|
1585
|
+
var form = new _formData["default"]();
|
|
1586
|
+
form.append('path', path);
|
|
1587
|
+
form.append('props_data', JSON.stringify(data));
|
|
1588
|
+
return this.req.put(url, form);
|
|
1589
|
+
}
|
|
1590
|
+
}, {
|
|
1591
|
+
key: "deleteFileExtendedProperties",
|
|
1592
|
+
value: function deleteFileExtendedProperties(repoID, path) {
|
|
1593
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/?path=' + path;
|
|
1594
|
+
return this.req["delete"](url);
|
|
1553
1595
|
} // file commit api
|
|
1554
1596
|
|
|
1555
1597
|
}, {
|
|
@@ -1600,7 +1642,8 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
1600
1642
|
if (detail) params.detail = detail;
|
|
1601
1643
|
if (comment) params.comment = comment;
|
|
1602
1644
|
return this.req.put(url, params);
|
|
1603
|
-
}
|
|
1645
|
+
} // draft
|
|
1646
|
+
|
|
1604
1647
|
}, {
|
|
1605
1648
|
key: "getRepoDraftCounts",
|
|
1606
1649
|
value: function getRepoDraftCounts(repoID) {
|