@evergis/api 4.0.1-alpha.0 → 4.0.2

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.
@@ -454,6 +454,38 @@ let DataSourceService = /*#__PURE__*/function (_Service) {
454
454
  value: function testConnection(data) {
455
455
  return this.http.post("/ds/testConnection", data).json();
456
456
  }
457
+ /**
458
+ * No description
459
+ *
460
+ * @tags DataSource
461
+ * @name CreateMosRuDataSource
462
+ * @operationId DataSourceController_CreateMosRuDataSource
463
+ * @summary Create data.mos.ru source.
464
+ * @request POST:/ds/dataMosRu
465
+ * @response `200` OK
466
+ */
467
+
468
+ }, {
469
+ key: "createMosRuDataSource",
470
+ value: function createMosRuDataSource(data) {
471
+ return this.http.post("/ds/dataMosRu", data).then(() => {});
472
+ }
473
+ /**
474
+ * No description
475
+ *
476
+ * @tags DataSource
477
+ * @name UpdateMosRuDataSource
478
+ * @operationId DataSourceController_UpdateMosRuDataSource
479
+ * @summary Update arcgis data source.
480
+ * @request PATCH:/ds/dataMosRu
481
+ * @response `200` OK
482
+ */
483
+
484
+ }, {
485
+ key: "updateMosRuDataSource",
486
+ value: function updateMosRuDataSource(data) {
487
+ return this.http.patch("/ds/dataMosRu", data).then(() => {});
488
+ }
457
489
  /**
458
490
  * No description
459
491
  *
@@ -486,6 +518,38 @@ let DataSourceService = /*#__PURE__*/function (_Service) {
486
518
  value: function updateS3DataSource(data) {
487
519
  return this.http.patch("/ds/s3", data).then(() => {});
488
520
  }
521
+ /**
522
+ * No description
523
+ *
524
+ * @tags DataSource
525
+ * @name CreateArcGisDataSource1
526
+ * @operationId DataSourceController_CreateArcGisDataSource_1
527
+ * @summary Create WMS data source.
528
+ * @request POST:/ds/wms
529
+ * @response `200` OK
530
+ */
531
+
532
+ }, {
533
+ key: "createArcGisDataSource1",
534
+ value: function createArcGisDataSource1(data) {
535
+ return this.http.post("/ds/wms", data).then(() => {});
536
+ }
537
+ /**
538
+ * No description
539
+ *
540
+ * @tags DataSource
541
+ * @name UpdateArcGisDataSource1
542
+ * @operationId DataSourceController_UpdateArcGisDataSource_1
543
+ * @summary Update WMS data source.
544
+ * @request PATCH:/ds/wms
545
+ * @response `200` OK
546
+ */
547
+
548
+ }, {
549
+ key: "updateArcGisDataSource1",
550
+ value: function updateArcGisDataSource1(data) {
551
+ return this.http.patch("/ds/wms", data).then(() => {});
552
+ }
489
553
  }]);
490
554
 
491
555
  return DataSourceService;
@@ -1717,7 +1781,6 @@ let Account = /*#__PURE__*/function (_AccountService) {
1717
1781
  return Account;
1718
1782
  }(AccountService);
1719
1783
 
1720
- const _excluded$1 = ["username"];
1721
1784
  /**
1722
1785
  * @title Spatial Processing Core API
1723
1786
  * @version 1.5.1.0
@@ -1764,13 +1827,8 @@ let AccountPreviewService = /*#__PURE__*/function (_Service) {
1764
1827
 
1765
1828
  }, {
1766
1829
  key: "uploadPreview",
1767
- value: function uploadPreview(_ref, data) {
1768
- let {
1769
- username
1770
- } = _ref,
1771
- query = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1772
-
1773
- return this.http.post("/account/user/preview/" + username, toFormData(data), query).json();
1830
+ value: function uploadPreview(username, data) {
1831
+ return this.http.post("/account/user/preview/" + username, toFormData(data)).json();
1774
1832
  }
1775
1833
  /**
1776
1834
  * No description
@@ -1798,78 +1856,13 @@ let AccountPreview = /*#__PURE__*/function (_AccountPreviewServic) {
1798
1856
 
1799
1857
  var _super = /*#__PURE__*/_createSuper(AccountPreview);
1800
1858
 
1801
- function AccountPreview(http, account) {
1802
- var _this;
1803
-
1859
+ function AccountPreview() {
1804
1860
  _classCallCheck(this, AccountPreview);
1805
1861
 
1806
- _this = _super.call(this, http);
1807
- _this.userInfo = account;
1808
- return _this;
1862
+ return _super.apply(this, arguments);
1809
1863
  }
1810
1864
 
1811
- _createClass(AccountPreview, [{
1812
- key: "user",
1813
- get: function get() {
1814
- if (this.userInfo) {
1815
- return this.userInfo;
1816
- }
1817
-
1818
- const userInfo = getUserInfo();
1819
-
1820
- if (userInfo) {
1821
- this.userInfo = userInfo;
1822
- }
1823
-
1824
- return userInfo;
1825
- }
1826
- }, {
1827
- key: "username",
1828
- get: function get() {
1829
- var _this$userInfo;
1830
-
1831
- return ((_this$userInfo = this.userInfo) == null ? void 0 : _this$userInfo.username) || '';
1832
- }
1833
- }, {
1834
- key: "updateCurrentUserPhoto",
1835
- value: async function updateCurrentUserPhoto(file, payload) {
1836
- const {
1837
- fileId
1838
- } = await this.uploadPreview(_extends({
1839
- username: this.username
1840
- }, payload), {
1841
- file
1842
- });
1843
- updateUserInfo({
1844
- profile_photo: fileId,
1845
- has_profile_photo: true
1846
- });
1847
- }
1848
- }, {
1849
- key: "fetchPreview1",
1850
- value: async function fetchPreview1() {
1851
- var _response$headers$get;
1852
-
1853
- const url = this.getPreview('');
1854
- const response = await fetch(url);
1855
- const profile_photo = (_response$headers$get = response.headers.get('content-type')) != null && _response$headers$get.includes('text/plain') ? await response.text() : url + "?r=" + Math.random();
1856
- updateUserInfo({
1857
- profile_photo,
1858
- has_profile_photo: true
1859
- });
1860
- }
1861
- }, {
1862
- key: "deleteCurrentUserPhoto",
1863
- value: async function deleteCurrentUserPhoto() {
1864
- await this.deletePreview(this.username);
1865
- updateUserInfo({
1866
- profile_photo: '',
1867
- has_profile_photo: false
1868
- });
1869
- }
1870
- }]);
1871
-
1872
- return AccountPreview;
1865
+ return _createClass(AccountPreview);
1873
1866
  }(AccountPreviewService);
1874
1867
 
1875
1868
  /**
@@ -1924,7 +1917,7 @@ let BulkOperations = /*#__PURE__*/function (_BulkOperationsServic) {
1924
1917
  return _createClass(BulkOperations);
1925
1918
  }(BulkOperationsService);
1926
1919
 
1927
- const _excluded$2 = ["cameraId"],
1920
+ const _excluded$1 = ["cameraId"],
1928
1921
  _excluded2 = ["cameraId"],
1929
1922
  _excluded3 = ["cameraId"],
1930
1923
  _excluded4 = ["cameraId"],
@@ -1980,7 +1973,7 @@ let CamerasService = /*#__PURE__*/function (_Service) {
1980
1973
  let {
1981
1974
  cameraId
1982
1975
  } = _ref,
1983
- query = _objectWithoutPropertiesLoose(_ref, _excluded$2);
1976
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1984
1977
 
1985
1978
  return this.http.get("/cameras/" + cameraId + "/archiveFeed", query).blob();
1986
1979
  }
@@ -3029,7 +3022,7 @@ let General = /*#__PURE__*/function (_GeneralService) {
3029
3022
  return _createClass(General);
3030
3023
  }(GeneralService);
3031
3024
 
3032
- const _excluded$3 = ["providerName"],
3025
+ const _excluded$2 = ["providerName"],
3033
3026
  _excluded2$1 = ["providerName"],
3034
3027
  _excluded3$1 = ["providerName"];
3035
3028
  /**
@@ -3066,7 +3059,7 @@ let GeocodeService = /*#__PURE__*/function (_Service) {
3066
3059
  let {
3067
3060
  providerName
3068
3061
  } = _ref,
3069
- query = _objectWithoutPropertiesLoose(_ref, _excluded$3);
3062
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$2);
3070
3063
 
3071
3064
  return this.http.get("/geocode/" + providerName, query).json();
3072
3065
  }
@@ -3412,7 +3405,7 @@ let Import = /*#__PURE__*/function (_ImportService) {
3412
3405
  return _createClass(Import);
3413
3406
  }(ImportService);
3414
3407
 
3415
- const _excluded$4 = ["name"],
3408
+ const _excluded$3 = ["name"],
3416
3409
  _excluded2$2 = ["name"],
3417
3410
  _excluded3$2 = ["name"],
3418
3411
  _excluded4$1 = ["name", "id"],
@@ -3968,7 +3961,7 @@ let LayersService = /*#__PURE__*/function (_Service) {
3968
3961
  let {
3969
3962
  name
3970
3963
  } = _ref,
3971
- query = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3964
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$3);
3972
3965
 
3973
3966
  return this.http.get("/layers/" + name + "/features", query).json();
3974
3967
  }
@@ -4717,7 +4710,7 @@ function notError(v) {
4717
4710
  return !isError(v);
4718
4711
  }
4719
4712
 
4720
- const _excluded$5 = ["remote"],
4713
+ const _excluded$4 = ["remote"],
4721
4714
  _excluded2$3 = ["remote"];
4722
4715
  let Layers = /*#__PURE__*/function (_LayersService) {
4723
4716
  _inherits(Layers, _LayersService);
@@ -4758,7 +4751,7 @@ let Layers = /*#__PURE__*/function (_LayersService) {
4758
4751
  let {
4759
4752
  remote
4760
4753
  } = _ref,
4761
- configuration = _objectWithoutPropertiesLoose(_ref, _excluded$5);
4754
+ configuration = _objectWithoutPropertiesLoose(_ref, _excluded$4);
4762
4755
 
4763
4756
  if (remote) {
4764
4757
  return this.publishRemoteTileService(configuration);
@@ -5568,7 +5561,7 @@ let Print = /*#__PURE__*/function (_PrintService) {
5568
5561
  return _createClass(Print);
5569
5562
  }(PrintService);
5570
5563
 
5571
- const _excluded$6 = ["name"];
5564
+ const _excluded$5 = ["name"];
5572
5565
  /**
5573
5566
  * @title Spatial Processing Core API
5574
5567
  * @version 1.5.1.0
@@ -5731,7 +5724,7 @@ let ProjectsService = /*#__PURE__*/function (_Service) {
5731
5724
  let {
5732
5725
  name
5733
5726
  } = _ref,
5734
- query = _objectWithoutPropertiesLoose(_ref, _excluded$6);
5727
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$5);
5735
5728
 
5736
5729
  return this.http.get("/projects/" + name + "/extent", query).json();
5737
5730
  }
@@ -5994,7 +5987,7 @@ function isProjectContentItems(v) {
5994
5987
  return v !== null && v !== undefined;
5995
5988
  }
5996
5989
 
5997
- const _excluded$7 = ["id"];
5990
+ const _excluded$6 = ["id"];
5998
5991
  /**
5999
5992
  * @title Spatial Processing Core API
6000
5993
  * @version 1.5.1.0
@@ -6337,7 +6330,7 @@ let RemoteTaskManagerService = /*#__PURE__*/function (_Service) {
6337
6330
  let {
6338
6331
  id
6339
6332
  } = _ref,
6340
- query = _objectWithoutPropertiesLoose(_ref, _excluded$7);
6333
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$6);
6341
6334
 
6342
6335
  return this.http.get("/scheduler/" + id + "/tasks", query).then(() => {});
6343
6336
  }
@@ -6442,20 +6435,52 @@ let ResourceCatalogService = /*#__PURE__*/function (_Service) {
6442
6435
  }
6443
6436
 
6444
6437
  _createClass(ResourceCatalogService, [{
6445
- key: "checkLimits",
6438
+ key: "checkLimitsForUser",
6446
6439
  value:
6447
6440
  /**
6448
- * @description This method requires superuser permission.
6441
+ * No description
6442
+ *
6443
+ * @tags ResourceCatalog
6444
+ * @name CheckLimitsForUser
6445
+ * @operationId ResourceCatalogController_CheckLimitsForUser
6446
+ * @summary Get limits of workspace.
6447
+ * @request GET:/resources/checkLimits/user/{userName}
6448
+ * @response `200` OK
6449
+ */
6450
+ function checkLimitsForUser(userName) {
6451
+ return this.http.get("/resources/checkLimits/user/" + userName).json();
6452
+ }
6453
+ /**
6454
+ * No description
6449
6455
  *
6450
6456
  * @tags ResourceCatalog
6451
- * @name CheckLimits
6452
- * @operationId ResourceCatalogController_CheckLimits
6457
+ * @name CheckLimitsForRole
6458
+ * @operationId ResourceCatalogController_CheckLimitsForRole
6453
6459
  * @summary Get limits of workspace.
6454
- * @request GET:/resources/checkLimits
6460
+ * @request GET:/resources/checkLimits/role/{roleName}
6455
6461
  * @response `200` OK
6456
6462
  */
6457
- function checkLimits(query) {
6458
- return this.http.get("/resources/checkLimits", query).json();
6463
+
6464
+ }, {
6465
+ key: "checkLimitsForRole",
6466
+ value: function checkLimitsForRole(roleName) {
6467
+ return this.http.get("/resources/checkLimits/role/" + roleName).json();
6468
+ }
6469
+ /**
6470
+ * No description
6471
+ *
6472
+ * @tags ResourceCatalog
6473
+ * @name GetDefaultLimits
6474
+ * @operationId ResourceCatalogController_GetDefaultLimits
6475
+ * @summary Get default limits of workspace.
6476
+ * @request GET:/resources/checkLimits/default
6477
+ * @response `200` OK
6478
+ */
6479
+
6480
+ }, {
6481
+ key: "getDefaultLimits",
6482
+ value: function getDefaultLimits() {
6483
+ return this.http.get("/resources/checkLimits/default").json();
6459
6484
  }
6460
6485
  /**
6461
6486
  * No description
@@ -7026,7 +7051,7 @@ let Styles = /*#__PURE__*/function (_StyleService) {
7026
7051
  return _createClass(Styles);
7027
7052
  }(StyleService);
7028
7053
 
7029
- const _excluded$8 = ["name"],
7054
+ const _excluded$7 = ["name"],
7030
7055
  _excluded2$4 = ["name"],
7031
7056
  _excluded3$3 = ["name"],
7032
7057
  _excluded4$2 = ["name"];
@@ -7208,7 +7233,7 @@ let TablesService = /*#__PURE__*/function (_Service) {
7208
7233
  let {
7209
7234
  name
7210
7235
  } = _ref,
7211
- query = _objectWithoutPropertiesLoose(_ref, _excluded$8);
7236
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$7);
7212
7237
 
7213
7238
  return this.http.get("/tables/" + name + "/data", query).json();
7214
7239
  }
@@ -7608,7 +7633,7 @@ let Tools = /*#__PURE__*/function (_ToolsService) {
7608
7633
  return _createClass(Tools);
7609
7634
  }(ToolsService);
7610
7635
 
7611
- const _excluded$9 = ["name", "z", "x", "y"];
7636
+ const _excluded$8 = ["name", "z", "x", "y"];
7612
7637
  /**
7613
7638
  * @title Spatial Processing Core API
7614
7639
  * @version 1.5.1.0
@@ -7646,7 +7671,7 @@ let VectorTileService = /*#__PURE__*/function (_Service) {
7646
7671
  x,
7647
7672
  y
7648
7673
  } = _ref,
7649
- query = _objectWithoutPropertiesLoose(_ref, _excluded$9);
7674
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$8);
7650
7675
 
7651
7676
  return this.http.get("/vt/" + name + "/" + z + "/" + x + "/" + y + ".pbf", query).then(() => {});
7652
7677
  }
@@ -7771,7 +7796,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
7771
7796
  }
7772
7797
  }],
7773
7798
  afterResponse: [(request, options, response) => {
7774
- const apiEvent = apiEventsByResponseStatus[response.status];
7799
+ const apiEvent = apiEventsByResponseStatus[response == null ? void 0 : response.status];
7775
7800
 
7776
7801
  if (apiEvent) {
7777
7802
  _this.emit(apiEvent, errorHandler(new ky.HTTPError(response, request, options)));
@@ -7790,7 +7815,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
7790
7815
  _this.resources = new Resources(_this.projects, _this.layers, _this.tables);
7791
7816
  _this.styles = new Styles(_this.http);
7792
7817
  _this.account = new Account(_this.http);
7793
- _this.accountPreview = new AccountPreview(_this.http, _this.account);
7818
+ _this.accountPreview = new AccountPreview(_this.http);
7794
7819
  _this.bulk = new BulkOperations(_this.http);
7795
7820
  _this.security = new Security(_this.http, _this.account);
7796
7821
  _this.notification = new Notification(_this.http, _assertThisInitialized(_this), wsKeepAlive);