seafile-js 0.2.204 → 0.2.205-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.
Files changed (2) hide show
  1. package/lib/seafile-api.js +39 -7
  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) {
@@ -3304,17 +3336,17 @@ var SeafileAPI = /*#__PURE__*/function () {
3304
3336
  return this.req.post(url, data);
3305
3337
  }
3306
3338
  }, {
3307
- key: "sdocMaskAsDraft",
3308
- value: function sdocMaskAsDraft(repoID, path) {
3309
- var url = this.server + '/api/v2.1/seadoc/mask-as-draft/' + repoID + '/';
3339
+ key: "sdocMarkAsDraft",
3340
+ value: function sdocMarkAsDraft(repoID, path) {
3341
+ var url = this.server + '/api/v2.1/seadoc/mark-as-draft/' + repoID + '/';
3310
3342
  var form = new _formData["default"]();
3311
3343
  form.append('p', path);
3312
3344
  return this._sendPostRequest(url, form);
3313
3345
  }
3314
3346
  }, {
3315
- key: "sdocUnmaskAsDraft",
3316
- value: function sdocUnmaskAsDraft(repoID, path) {
3317
- var url = this.server + '/api/v2.1/seadoc/mask-as-draft/' + repoID + '/';
3347
+ key: "sdocUnmarkAsDraft",
3348
+ value: function sdocUnmarkAsDraft(repoID, path) {
3349
+ var url = this.server + '/api/v2.1/seadoc/mark-as-draft/' + repoID + '/';
3318
3350
  var params = {
3319
3351
  'p': path
3320
3352
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seafile-js",
3
- "version": "0.2.204",
3
+ "version": "0.2.205-beta",
4
4
  "private": false,
5
5
  "main": "lib/seafile-api.js",
6
6
  "dependencies": {