seafile-js 0.2.205 → 0.2.206

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.
Files changed (2) hide show
  1. package/lib/seafile-api.js +33 -1
  2. package/package.json +1 -1
@@ -1550,6 +1550,37 @@ var SeafileAPI = /*#__PURE__*/function () {
1550
1550
  value: function getFileRevision(repoID, commitID, filePath) {
1551
1551
  var url = this.server + '/api2/' + 'repos/' + repoID + '/file' + '/revision/?p=' + encodeURIComponent(filePath) + '&commit_id=' + commitID;
1552
1552
  return this.req.get(url);
1553
+ } // file extended properties
1554
+
1555
+ }, {
1556
+ key: "getFileExtendedProperties",
1557
+ value: function getFileExtendedProperties(repoID, path) {
1558
+ var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/?path=' + path;
1559
+ return this.req.get(url);
1560
+ }
1561
+ }, {
1562
+ key: "newFileExtendedProperties",
1563
+ value: function newFileExtendedProperties(repoID, path, data) {
1564
+ var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/';
1565
+ var form = new _formData["default"]();
1566
+ form.append('path', path);
1567
+ form.append('props_data', JSON.stringify(data));
1568
+ return this._sendPostRequest(url, form);
1569
+ }
1570
+ }, {
1571
+ key: "updateFileExtendedProperties",
1572
+ value: function updateFileExtendedProperties(repoID, path, data) {
1573
+ var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/';
1574
+ var form = new _formData["default"]();
1575
+ form.append('path', path);
1576
+ form.append('props_data', JSON.stringify(data));
1577
+ return this.req.put(url, form);
1578
+ }
1579
+ }, {
1580
+ key: "deleteFileExtendedProperties",
1581
+ value: function deleteFileExtendedProperties(repoID, path) {
1582
+ var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/?path=' + path;
1583
+ return this.req["delete"](url);
1553
1584
  } // file commit api
1554
1585
 
1555
1586
  }, {
@@ -1600,7 +1631,8 @@ var SeafileAPI = /*#__PURE__*/function () {
1600
1631
  if (detail) params.detail = detail;
1601
1632
  if (comment) params.comment = comment;
1602
1633
  return this.req.put(url, params);
1603
- }
1634
+ } // draft
1635
+
1604
1636
  }, {
1605
1637
  key: "getRepoDraftCounts",
1606
1638
  value: function getRepoDraftCounts(repoID) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seafile-js",
3
- "version": "0.2.205",
3
+ "version": "0.2.206",
4
4
  "private": false,
5
5
  "main": "lib/seafile-api.js",
6
6
  "dependencies": {