seafile-js 0.2.234 → 0.2.235-alpha1

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 +43 -11
  2. package/package.json +2 -2
@@ -1959,17 +1959,6 @@ var SeafileAPI = /*#__PURE__*/function () {
1959
1959
  var url = this.server + '/api2/repos/' + repoID + '/dir/metadata/?p=' + encodeURIComponent(dirPath);
1960
1960
  return this.req.get(url);
1961
1961
  }
1962
- }, {
1963
- key: "aiSearchFiles",
1964
- value: function aiSearchFiles(searchParams, cancelToken) {
1965
- var url = this.server + '/api/v2.1/ai/search/';
1966
- var form = new _formData["default"]();
1967
- form.append('query', searchParams.q);
1968
- form.append('search_repo', searchParams.search_repo);
1969
- return this.req.post(url, form, {
1970
- cancelToken: cancelToken
1971
- });
1972
- }
1973
1962
  }, {
1974
1963
  key: "orgAdminGetOrgInfo",
1975
1964
  value: function orgAdminGetOrgInfo() {
@@ -3209,6 +3198,40 @@ var SeafileAPI = /*#__PURE__*/function () {
3209
3198
  var url = this.server + '/api/v2.1/ocm/providers/' + providerID + '/repos/' + repoID + '/upload-link/?path=' + encodeURIComponent(path);
3210
3199
  return this.req.get(url);
3211
3200
  }
3201
+
3202
+ // com via webdav
3203
+ }, {
3204
+ key: "OCMShareToNextcloud",
3205
+ value: function OCMShareToNextcloud(toUser, toServerURL, repoId, path) {
3206
+ var url = this.server + '/ocm-via-webdav/share-to-nextcloud/';
3207
+ var params = {
3208
+ 'to_user': toUser,
3209
+ 'to_server_url': toServerURL,
3210
+ 'repo_id': repoId,
3211
+ 'path': path
3212
+ };
3213
+ return this.req.post(url, params);
3214
+ }
3215
+ }, {
3216
+ key: "listOCMShareToNextcloud",
3217
+ value: function listOCMShareToNextcloud(repoId) {
3218
+ var url = this.server + '/ocm-via-webdav/share-to-nextcloud/';
3219
+ if (repoId) {
3220
+ url += '?repo_id=' + repoId;
3221
+ }
3222
+ return this.req.get(url);
3223
+ }
3224
+ }, {
3225
+ key: "deleteOCMShareToNextcloud",
3226
+ value: function deleteOCMShareToNextcloud(id) {
3227
+ var url = this.server + '/ocm-via-webdav/share-to-nextcloud/';
3228
+ var params = {
3229
+ 'share_id': id
3230
+ };
3231
+ return this.req["delete"](url, {
3232
+ data: params
3233
+ });
3234
+ }
3212
3235
  }, {
3213
3236
  key: "getRepoOldFilesAutoDelDays",
3214
3237
  value: function getRepoOldFilesAutoDelDays(repoID) {
@@ -4557,6 +4580,15 @@ var SeafileAPI = /*#__PURE__*/function () {
4557
4580
  formData.append('file_path', filePath);
4558
4581
  return this._sendPostRequest(url, formData);
4559
4582
  }
4583
+ }, {
4584
+ key: "importSdoc",
4585
+ value: function importSdoc(file, repoID, parentDir) {
4586
+ var url = this.server + '/api/v2.1/seadoc/import/' + repoID + '/';
4587
+ var formData = new _formData["default"]();
4588
+ formData.append('file', file);
4589
+ formData.append('parent_dir', parentDir);
4590
+ return this._sendPostRequest(url, formData);
4591
+ }
4560
4592
  }]);
4561
4593
  return SeafileAPI;
4562
4594
  }();
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "seafile-js",
3
- "version": "0.2.234",
3
+ "version": "0.2.235-alpha1",
4
4
  "private": false,
5
5
  "main": "lib/seafile-api.js",
6
6
  "dependencies": {
7
- "axios": "^1.7.3",
7
+ "axios": "^1.7.4",
8
8
  "form-data": "4.0.0"
9
9
  },
10
10
  "scripts": {