seafile-js 0.3.0-beta4 → 0.3.0-beta6
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 +56 -15
- package/package.json +1 -1
package/lib/seafile-api.js
CHANGED
|
@@ -1550,36 +1550,36 @@ 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
|
|
1553
|
+
} // file extended properties
|
|
1554
1554
|
|
|
1555
1555
|
}, {
|
|
1556
|
-
key: "
|
|
1557
|
-
value: function
|
|
1558
|
-
var url = this.server + '/api/v2.1/repos/' + repoID + '/
|
|
1556
|
+
key: "getFileExtendedProperties",
|
|
1557
|
+
value: function getFileExtendedProperties(repoID, path) {
|
|
1558
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/?path=' + path;
|
|
1559
1559
|
return this.req.get(url);
|
|
1560
1560
|
}
|
|
1561
1561
|
}, {
|
|
1562
|
-
key: "
|
|
1563
|
-
value: function
|
|
1564
|
-
var url = this.server + '/api/v2.1/repos/' + repoID + '/
|
|
1562
|
+
key: "newFileExtendedProperties",
|
|
1563
|
+
value: function newFileExtendedProperties(repoID, path, data) {
|
|
1564
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/';
|
|
1565
1565
|
var form = new _formData["default"]();
|
|
1566
1566
|
form.append('path', path);
|
|
1567
|
-
form.append('
|
|
1567
|
+
form.append('props_data', JSON.stringify(data));
|
|
1568
1568
|
return this._sendPostRequest(url, form);
|
|
1569
1569
|
}
|
|
1570
1570
|
}, {
|
|
1571
|
-
key: "
|
|
1572
|
-
value: function
|
|
1573
|
-
var url = this.server + '/api/v2.1/repos/' + repoID + '/
|
|
1571
|
+
key: "updateFileExtendedProperties",
|
|
1572
|
+
value: function updateFileExtendedProperties(repoID, path, data) {
|
|
1573
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/';
|
|
1574
1574
|
var form = new _formData["default"]();
|
|
1575
1575
|
form.append('path', path);
|
|
1576
|
-
form.append('
|
|
1576
|
+
form.append('props_data', JSON.stringify(data));
|
|
1577
1577
|
return this.req.put(url, form);
|
|
1578
1578
|
}
|
|
1579
1579
|
}, {
|
|
1580
|
-
key: "
|
|
1581
|
-
value: function
|
|
1582
|
-
var url = this.server + '/api/v2.1/repos/' + repoID + '/
|
|
1580
|
+
key: "deleteFileExtendedProperties",
|
|
1581
|
+
value: function deleteFileExtendedProperties(repoID, path) {
|
|
1582
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/?path=' + path;
|
|
1583
1583
|
return this.req["delete"](url);
|
|
1584
1584
|
} // file commit api
|
|
1585
1585
|
|
|
@@ -4622,6 +4622,47 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
4622
4622
|
form.append('ctime', ctime);
|
|
4623
4623
|
return this._sendPostRequest(url, form);
|
|
4624
4624
|
}
|
|
4625
|
+
}, {
|
|
4626
|
+
key: "listSdocHistory",
|
|
4627
|
+
value: function listSdocHistory(docUuid, page, perPage) {
|
|
4628
|
+
var url = this.server + '/api/v2.1/seadoc/history/' + docUuid + '/';
|
|
4629
|
+
var params = {
|
|
4630
|
+
page: page,
|
|
4631
|
+
per_page: perPage
|
|
4632
|
+
};
|
|
4633
|
+
return this.req.get(url, {
|
|
4634
|
+
params: params
|
|
4635
|
+
});
|
|
4636
|
+
}
|
|
4637
|
+
}, {
|
|
4638
|
+
key: "renameSdocHistory",
|
|
4639
|
+
value: function renameSdocHistory(docUuid, objID, newName) {
|
|
4640
|
+
var url = this.server + '/api/v2.1/seadoc/history/' + docUuid + '/';
|
|
4641
|
+
var data = {
|
|
4642
|
+
obj_id: objID,
|
|
4643
|
+
new_name: newName
|
|
4644
|
+
};
|
|
4645
|
+
return this.req.post(url, data);
|
|
4646
|
+
}
|
|
4647
|
+
}, {
|
|
4648
|
+
key: "sdocMaskAsDraft",
|
|
4649
|
+
value: function sdocMaskAsDraft(repoID, path) {
|
|
4650
|
+
var url = this.server + '/api/v2.1/seadoc/mask-as-draft/' + repoID + '/';
|
|
4651
|
+
var form = new _formData["default"]();
|
|
4652
|
+
form.append('p', path);
|
|
4653
|
+
return this._sendPostRequest(url, form);
|
|
4654
|
+
}
|
|
4655
|
+
}, {
|
|
4656
|
+
key: "sdocUnmaskAsDraft",
|
|
4657
|
+
value: function sdocUnmaskAsDraft(repoID, path) {
|
|
4658
|
+
var url = this.server + '/api/v2.1/seadoc/mask-as-draft/' + repoID + '/';
|
|
4659
|
+
var params = {
|
|
4660
|
+
'p': path
|
|
4661
|
+
};
|
|
4662
|
+
return this.req["delete"](url, {
|
|
4663
|
+
data: params
|
|
4664
|
+
});
|
|
4665
|
+
}
|
|
4625
4666
|
}]);
|
|
4626
4667
|
|
|
4627
4668
|
return SeafileAPI;
|