seafile-js 0.2.190 → 0.2.191

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 +91 -2
  2. package/package.json +1 -1
@@ -798,7 +798,7 @@ var SeafileAPI = /*#__PURE__*/function () {
798
798
  permission: JSON.stringify(permission.permission)
799
799
  };
800
800
  return this.req.put(url, data);
801
- } //---- repo(library) operation
801
+ } //---- repo(library) operation
802
802
 
803
803
  }, {
804
804
  key: "createMineRepo",
@@ -1074,7 +1074,7 @@ var SeafileAPI = /*#__PURE__*/function () {
1074
1074
  var form = new _formData["default"]();
1075
1075
  form.append('permission', permission);
1076
1076
  return this.req.put(url, form);
1077
- } //admin
1077
+ } //admin
1078
1078
 
1079
1079
  }, {
1080
1080
  key: "listDeletedRepo",
@@ -1642,6 +1642,20 @@ var SeafileAPI = /*#__PURE__*/function () {
1642
1642
  value: function unstarItem(repoID, path) {
1643
1643
  var url = this.server + '/api/v2.1/starred-items/?repo_id=' + repoID + '&path=' + encodeURIComponent(path);
1644
1644
  return this.req["delete"](url);
1645
+ }
1646
+ }, {
1647
+ key: "monitorRepo",
1648
+ value: function monitorRepo(repoID) {
1649
+ var url = this.server + '/api/v2.1/monitored-repos/';
1650
+ var form = new _formData["default"]();
1651
+ form.append('repo_id', repoID);
1652
+ return this._sendPostRequest(url, form);
1653
+ }
1654
+ }, {
1655
+ key: "unMonitorRepo",
1656
+ value: function unMonitorRepo(repoID) {
1657
+ var url = this.server + '/api/v2.1/monitored-repos/' + repoID + '/';
1658
+ return this.req["delete"](url);
1645
1659
  } //---- tags module api
1646
1660
  // repo tags
1647
1661
 
@@ -1952,6 +1966,73 @@ var SeafileAPI = /*#__PURE__*/function () {
1952
1966
  var url = this.server + '/api/v2.1/org/admin/info/';
1953
1967
  return this.req.get(url);
1954
1968
  }
1969
+ }, {
1970
+ key: "orgAdminUploadIdpCertificate",
1971
+ value: function orgAdminUploadIdpCertificate(orgID, file) {
1972
+ var url = this.server + '/api/v2.1/org/' + orgID + '/admin/saml-idp-certificate/';
1973
+ var formData = new _formData["default"]();
1974
+ formData.append('idp_certificate', file);
1975
+ return this._sendPostRequest(url, formData);
1976
+ }
1977
+ }, {
1978
+ key: "orgAdminUploadIdpMetadataXml",
1979
+ value: function orgAdminUploadIdpMetadataXml(orgID, file) {
1980
+ var url = this.server + '/api/v2.1/org/' + orgID + '/admin/saml-idp-metadata-xml/';
1981
+ var formData = new _formData["default"]();
1982
+ formData.append('idp_metadata_xml', file);
1983
+ return this._sendPostRequest(url, formData);
1984
+ }
1985
+ }, {
1986
+ key: "orgAdminGetSamlConfig",
1987
+ value: function orgAdminGetSamlConfig(orgID) {
1988
+ var url = this.server + '/api/v2.1/org/' + orgID + '/admin/saml-config/';
1989
+ return this.req.get(url);
1990
+ }
1991
+ }, {
1992
+ key: "orgAdminAddSamlConfig",
1993
+ value: function orgAdminAddSamlConfig(orgID, metadataUrl, singleSignOnService, singleLogoutService, validDays) {
1994
+ var url = this.server + '/api/v2.1/org/' + orgID + '/admin/saml-config/';
1995
+ var data = {
1996
+ metadata_url: metadataUrl,
1997
+ single_sign_on_service: singleSignOnService,
1998
+ single_logout_service: singleLogoutService,
1999
+ valid_days: validDays
2000
+ };
2001
+ return this.req.post(url, data);
2002
+ }
2003
+ }, {
2004
+ key: "orgAdminUpdateSamlConfig",
2005
+ value: function orgAdminUpdateSamlConfig(orgID, metadataUrl, singleSignOnService, singleLogoutService, validDays) {
2006
+ var url = this.server + '/api/v2.1/org/' + orgID + '/admin/saml-config/';
2007
+ var data = {
2008
+ metadata_url: metadataUrl,
2009
+ single_sign_on_service: singleSignOnService,
2010
+ single_logout_service: singleLogoutService,
2011
+ valid_days: validDays
2012
+ };
2013
+ return this.req.put(url, data);
2014
+ }
2015
+ }, {
2016
+ key: "orgAdminDeleteSamlConfig",
2017
+ value: function orgAdminDeleteSamlConfig(orgID) {
2018
+ var url = this.server + '/api/v2.1/org/' + orgID + '/admin/saml-config/';
2019
+ return this.req["delete"](url);
2020
+ }
2021
+ }, {
2022
+ key: "orgAdminGetUrlPrefix",
2023
+ value: function orgAdminGetUrlPrefix(orgID) {
2024
+ var url = this.server + '/api/v2.1/org/' + orgID + '/admin/url-prefix/';
2025
+ return this.req.get(url);
2026
+ }
2027
+ }, {
2028
+ key: "orgAdminUpdateUrlPrefix",
2029
+ value: function orgAdminUpdateUrlPrefix(orgID, orgUrlPrefix) {
2030
+ var url = this.server + '/api/v2.1/org/' + orgID + '/admin/url-prefix/';
2031
+ var data = {
2032
+ org_url_prefix: orgUrlPrefix
2033
+ };
2034
+ return this.req.put(url, data);
2035
+ }
1955
2036
  }, {
1956
2037
  key: "orgAdminStatisticFiles",
1957
2038
  value: function orgAdminStatisticFiles(orgID, startTime, endTime, groupBy) {
@@ -4021,6 +4102,14 @@ var SeafileAPI = /*#__PURE__*/function () {
4021
4102
  case 'institution':
4022
4103
  formData.append('institution', value);
4023
4104
  break;
4105
+
4106
+ case 'upload_rate_limit':
4107
+ formData.append('upload_rate_limit', value);
4108
+ break;
4109
+
4110
+ case 'download_rate_limit':
4111
+ formData.append('download_rate_limit', value);
4112
+ break;
4024
4113
  }
4025
4114
 
4026
4115
  return this.req.put(url, formData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seafile-js",
3
- "version": "0.2.190",
3
+ "version": "0.2.191",
4
4
  "private": false,
5
5
  "main": "lib/seafile-api.js",
6
6
  "dependencies": {