seafile-js 0.2.210 → 0.2.212-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 +48 -0
  2. package/package.json +1 -1
@@ -1597,6 +1597,14 @@ var SeafileAPI = /*#__PURE__*/function () {
1597
1597
  value: function deleteFileExtendedProperties(repoID, path) {
1598
1598
  var url = this.server + '/api/v2.1/repos/' + repoID + '/extended-properties/?path=' + path;
1599
1599
  return this.req["delete"](url);
1600
+ }
1601
+ }, {
1602
+ key: "applyFolderExtendedProperties",
1603
+ value: function applyFolderExtendedProperties(repoID, path) {
1604
+ var url = this.server + '/api/v2.1/repos/' + repoID + '/apply-folder-extended-properties/';
1605
+ var form = new FormData();
1606
+ form.append('path', path);
1607
+ return this.req.post(url, form);
1600
1608
  } // file commit api
1601
1609
 
1602
1610
  }, {
@@ -1776,6 +1784,15 @@ var SeafileAPI = /*#__PURE__*/function () {
1776
1784
  form.append('color', color);
1777
1785
  return this._sendPostRequest(url, form);
1778
1786
  }
1787
+ }, {
1788
+ key: "createRepoTags",
1789
+ value: function createRepoTags(repoID, tags) {
1790
+ var url = this.server + '/api/v2.1/repos/' + repoID + '/repo-tags/';
1791
+ var params = {
1792
+ tags: tags
1793
+ };
1794
+ return this.req.put(url, params);
1795
+ }
1779
1796
  }, {
1780
1797
  key: "deleteRepoTag",
1781
1798
  value: function deleteRepoTag(repoID, repo_tag_id) {
@@ -2060,6 +2077,37 @@ var SeafileAPI = /*#__PURE__*/function () {
2060
2077
  value: function dirMetaData(repoID, dirPath) {
2061
2078
  var url = this.server + '/api2/repos/' + repoID + '/dir/metadata/?p=' + encodeURIComponent(dirPath);
2062
2079
  return this.req.get(url);
2080
+ }
2081
+ }, {
2082
+ key: "similaritySearchFiles",
2083
+ value: function similaritySearchFiles(searchParams, cancelToken) {
2084
+ var url = this.server + '/api/v2.1/ai/similarity-search-in-library/';
2085
+ var form = new FormData();
2086
+ form.append('query', searchParams.q);
2087
+ form.append('repo_id', searchParams.search_repo);
2088
+ return this.req.post(url, form, {
2089
+ cancelToken: cancelToken
2090
+ });
2091
+ }
2092
+ }, {
2093
+ key: "queryLibraryIndexState",
2094
+ value: function queryLibraryIndexState(repoID) {
2095
+ var url = this.server + '/api/v2.1/ai/library-index-state/?repo_id=' + repoID;
2096
+ return this.req.get(url);
2097
+ }
2098
+ }, {
2099
+ key: "createLibraryIndex",
2100
+ value: function createLibraryIndex(repoID) {
2101
+ var url = this.server + '/api/v2.1/ai/library-sdoc-indexes/';
2102
+ var form = new FormData();
2103
+ form.append('repo_id', repoID);
2104
+ return this._sendPostRequest(url, form);
2105
+ }
2106
+ }, {
2107
+ key: "queryIndexTaskStatus",
2108
+ value: function queryIndexTaskStatus(taskId) {
2109
+ var url = this.server + '/api/v2.1/ai/task-status/?task_id=' + taskId;
2110
+ return this.req.get(url);
2063
2111
  } // single org admin api
2064
2112
 
2065
2113
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seafile-js",
3
- "version": "0.2.210",
3
+ "version": "0.2.212beta",
4
4
  "private": false,
5
5
  "main": "lib/seafile-api.js",
6
6
  "dependencies": {