@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.
package/dist/api.esm.js CHANGED
@@ -448,6 +448,38 @@ let DataSourceService = /*#__PURE__*/function (_Service) {
448
448
  value: function testConnection(data) {
449
449
  return this.http.post("/ds/testConnection", data).json();
450
450
  }
451
+ /**
452
+ * No description
453
+ *
454
+ * @tags DataSource
455
+ * @name CreateMosRuDataSource
456
+ * @operationId DataSourceController_CreateMosRuDataSource
457
+ * @summary Create data.mos.ru source.
458
+ * @request POST:/ds/dataMosRu
459
+ * @response `200` OK
460
+ */
461
+
462
+ }, {
463
+ key: "createMosRuDataSource",
464
+ value: function createMosRuDataSource(data) {
465
+ return this.http.post("/ds/dataMosRu", data).then(() => {});
466
+ }
467
+ /**
468
+ * No description
469
+ *
470
+ * @tags DataSource
471
+ * @name UpdateMosRuDataSource
472
+ * @operationId DataSourceController_UpdateMosRuDataSource
473
+ * @summary Update arcgis data source.
474
+ * @request PATCH:/ds/dataMosRu
475
+ * @response `200` OK
476
+ */
477
+
478
+ }, {
479
+ key: "updateMosRuDataSource",
480
+ value: function updateMosRuDataSource(data) {
481
+ return this.http.patch("/ds/dataMosRu", data).then(() => {});
482
+ }
451
483
  /**
452
484
  * No description
453
485
  *
@@ -480,6 +512,38 @@ let DataSourceService = /*#__PURE__*/function (_Service) {
480
512
  value: function updateS3DataSource(data) {
481
513
  return this.http.patch("/ds/s3", data).then(() => {});
482
514
  }
515
+ /**
516
+ * No description
517
+ *
518
+ * @tags DataSource
519
+ * @name CreateArcGisDataSource1
520
+ * @operationId DataSourceController_CreateArcGisDataSource_1
521
+ * @summary Create WMS data source.
522
+ * @request POST:/ds/wms
523
+ * @response `200` OK
524
+ */
525
+
526
+ }, {
527
+ key: "createArcGisDataSource1",
528
+ value: function createArcGisDataSource1(data) {
529
+ return this.http.post("/ds/wms", data).then(() => {});
530
+ }
531
+ /**
532
+ * No description
533
+ *
534
+ * @tags DataSource
535
+ * @name UpdateArcGisDataSource1
536
+ * @operationId DataSourceController_UpdateArcGisDataSource_1
537
+ * @summary Update WMS data source.
538
+ * @request PATCH:/ds/wms
539
+ * @response `200` OK
540
+ */
541
+
542
+ }, {
543
+ key: "updateArcGisDataSource1",
544
+ value: function updateArcGisDataSource1(data) {
545
+ return this.http.patch("/ds/wms", data).then(() => {});
546
+ }
483
547
  }]);
484
548
 
485
549
  return DataSourceService;
@@ -1713,7 +1777,6 @@ let Account = /*#__PURE__*/function (_AccountService) {
1713
1777
  return Account;
1714
1778
  }(AccountService);
1715
1779
 
1716
- const _excluded$1 = ["username"];
1717
1780
  /**
1718
1781
  * @title Spatial Processing Core API
1719
1782
  * @version 1.5.1.0
@@ -1760,13 +1823,8 @@ let AccountPreviewService = /*#__PURE__*/function (_Service) {
1760
1823
 
1761
1824
  }, {
1762
1825
  key: "uploadPreview",
1763
- value: function uploadPreview(_ref, data) {
1764
- let {
1765
- username
1766
- } = _ref,
1767
- query = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1768
-
1769
- return this.http.post("/account/user/preview/" + username, toFormData(data), query).json();
1826
+ value: function uploadPreview(username, data) {
1827
+ return this.http.post("/account/user/preview/" + username, toFormData(data)).json();
1770
1828
  }
1771
1829
  /**
1772
1830
  * No description
@@ -1794,78 +1852,13 @@ let AccountPreview = /*#__PURE__*/function (_AccountPreviewServic) {
1794
1852
 
1795
1853
  var _super = /*#__PURE__*/_createSuper(AccountPreview);
1796
1854
 
1797
- function AccountPreview(http, account) {
1798
- var _this;
1799
-
1855
+ function AccountPreview() {
1800
1856
  _classCallCheck(this, AccountPreview);
1801
1857
 
1802
- _this = _super.call(this, http);
1803
- _this.userInfo = account;
1804
- return _this;
1858
+ return _super.apply(this, arguments);
1805
1859
  }
1806
1860
 
1807
- _createClass(AccountPreview, [{
1808
- key: "user",
1809
- get: function get() {
1810
- if (this.userInfo) {
1811
- return this.userInfo;
1812
- }
1813
-
1814
- const userInfo = getUserInfo();
1815
-
1816
- if (userInfo) {
1817
- this.userInfo = userInfo;
1818
- }
1819
-
1820
- return userInfo;
1821
- }
1822
- }, {
1823
- key: "username",
1824
- get: function get() {
1825
- var _this$userInfo;
1826
-
1827
- return ((_this$userInfo = this.userInfo) == null ? void 0 : _this$userInfo.username) || '';
1828
- }
1829
- }, {
1830
- key: "updateCurrentUserPhoto",
1831
- value: async function updateCurrentUserPhoto(file, payload) {
1832
- const {
1833
- fileId
1834
- } = await this.uploadPreview(_extends({
1835
- username: this.username
1836
- }, payload), {
1837
- file
1838
- });
1839
- updateUserInfo({
1840
- profile_photo: fileId,
1841
- has_profile_photo: true
1842
- });
1843
- }
1844
- }, {
1845
- key: "fetchPreview1",
1846
- value: async function fetchPreview1() {
1847
- var _response$headers$get;
1848
-
1849
- const url = this.getPreview('');
1850
- const response = await fetch(url);
1851
- 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();
1852
- updateUserInfo({
1853
- profile_photo,
1854
- has_profile_photo: true
1855
- });
1856
- }
1857
- }, {
1858
- key: "deleteCurrentUserPhoto",
1859
- value: async function deleteCurrentUserPhoto() {
1860
- await this.deletePreview(this.username);
1861
- updateUserInfo({
1862
- profile_photo: '',
1863
- has_profile_photo: false
1864
- });
1865
- }
1866
- }]);
1867
-
1868
- return AccountPreview;
1861
+ return _createClass(AccountPreview);
1869
1862
  }(AccountPreviewService);
1870
1863
 
1871
1864
  /**
@@ -1920,7 +1913,7 @@ let BulkOperations = /*#__PURE__*/function (_BulkOperationsServic) {
1920
1913
  return _createClass(BulkOperations);
1921
1914
  }(BulkOperationsService);
1922
1915
 
1923
- const _excluded$2 = ["cameraId"],
1916
+ const _excluded$1 = ["cameraId"],
1924
1917
  _excluded2 = ["cameraId"],
1925
1918
  _excluded3 = ["cameraId"],
1926
1919
  _excluded4 = ["cameraId"],
@@ -1976,7 +1969,7 @@ let CamerasService = /*#__PURE__*/function (_Service) {
1976
1969
  let {
1977
1970
  cameraId
1978
1971
  } = _ref,
1979
- query = _objectWithoutPropertiesLoose(_ref, _excluded$2);
1972
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1980
1973
 
1981
1974
  return this.http.get("/cameras/" + cameraId + "/archiveFeed", query).blob();
1982
1975
  }
@@ -3025,7 +3018,7 @@ let General = /*#__PURE__*/function (_GeneralService) {
3025
3018
  return _createClass(General);
3026
3019
  }(GeneralService);
3027
3020
 
3028
- const _excluded$3 = ["providerName"],
3021
+ const _excluded$2 = ["providerName"],
3029
3022
  _excluded2$1 = ["providerName"],
3030
3023
  _excluded3$1 = ["providerName"];
3031
3024
  /**
@@ -3062,7 +3055,7 @@ let GeocodeService = /*#__PURE__*/function (_Service) {
3062
3055
  let {
3063
3056
  providerName
3064
3057
  } = _ref,
3065
- query = _objectWithoutPropertiesLoose(_ref, _excluded$3);
3058
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$2);
3066
3059
 
3067
3060
  return this.http.get("/geocode/" + providerName, query).json();
3068
3061
  }
@@ -3408,7 +3401,7 @@ let Import = /*#__PURE__*/function (_ImportService) {
3408
3401
  return _createClass(Import);
3409
3402
  }(ImportService);
3410
3403
 
3411
- const _excluded$4 = ["name"],
3404
+ const _excluded$3 = ["name"],
3412
3405
  _excluded2$2 = ["name"],
3413
3406
  _excluded3$2 = ["name"],
3414
3407
  _excluded4$1 = ["name", "id"],
@@ -3964,7 +3957,7 @@ let LayersService = /*#__PURE__*/function (_Service) {
3964
3957
  let {
3965
3958
  name
3966
3959
  } = _ref,
3967
- query = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3960
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$3);
3968
3961
 
3969
3962
  return this.http.get("/layers/" + name + "/features", query).json();
3970
3963
  }
@@ -4713,7 +4706,7 @@ function notError(v) {
4713
4706
  return !isError(v);
4714
4707
  }
4715
4708
 
4716
- const _excluded$5 = ["remote"],
4709
+ const _excluded$4 = ["remote"],
4717
4710
  _excluded2$3 = ["remote"];
4718
4711
  let Layers = /*#__PURE__*/function (_LayersService) {
4719
4712
  _inherits(Layers, _LayersService);
@@ -4754,7 +4747,7 @@ let Layers = /*#__PURE__*/function (_LayersService) {
4754
4747
  let {
4755
4748
  remote
4756
4749
  } = _ref,
4757
- configuration = _objectWithoutPropertiesLoose(_ref, _excluded$5);
4750
+ configuration = _objectWithoutPropertiesLoose(_ref, _excluded$4);
4758
4751
 
4759
4752
  if (remote) {
4760
4753
  return this.publishRemoteTileService(configuration);
@@ -5569,7 +5562,7 @@ let Print = /*#__PURE__*/function (_PrintService) {
5569
5562
  return _createClass(Print);
5570
5563
  }(PrintService);
5571
5564
 
5572
- const _excluded$6 = ["name"];
5565
+ const _excluded$5 = ["name"];
5573
5566
  /**
5574
5567
  * @title Spatial Processing Core API
5575
5568
  * @version 1.5.1.0
@@ -5732,7 +5725,7 @@ let ProjectsService = /*#__PURE__*/function (_Service) {
5732
5725
  let {
5733
5726
  name
5734
5727
  } = _ref,
5735
- query = _objectWithoutPropertiesLoose(_ref, _excluded$6);
5728
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$5);
5736
5729
 
5737
5730
  return this.http.get("/projects/" + name + "/extent", query).json();
5738
5731
  }
@@ -5995,7 +5988,7 @@ function isProjectContentItems(v) {
5995
5988
  return v !== null && v !== undefined;
5996
5989
  }
5997
5990
 
5998
- const _excluded$7 = ["id"];
5991
+ const _excluded$6 = ["id"];
5999
5992
  /**
6000
5993
  * @title Spatial Processing Core API
6001
5994
  * @version 1.5.1.0
@@ -6338,7 +6331,7 @@ let RemoteTaskManagerService = /*#__PURE__*/function (_Service) {
6338
6331
  let {
6339
6332
  id
6340
6333
  } = _ref,
6341
- query = _objectWithoutPropertiesLoose(_ref, _excluded$7);
6334
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$6);
6342
6335
 
6343
6336
  return this.http.get("/scheduler/" + id + "/tasks", query).then(() => {});
6344
6337
  }
@@ -6443,20 +6436,52 @@ let ResourceCatalogService = /*#__PURE__*/function (_Service) {
6443
6436
  }
6444
6437
 
6445
6438
  _createClass(ResourceCatalogService, [{
6446
- key: "checkLimits",
6439
+ key: "checkLimitsForUser",
6447
6440
  value:
6448
6441
  /**
6449
- * @description This method requires superuser permission.
6442
+ * No description
6443
+ *
6444
+ * @tags ResourceCatalog
6445
+ * @name CheckLimitsForUser
6446
+ * @operationId ResourceCatalogController_CheckLimitsForUser
6447
+ * @summary Get limits of workspace.
6448
+ * @request GET:/resources/checkLimits/user/{userName}
6449
+ * @response `200` OK
6450
+ */
6451
+ function checkLimitsForUser(userName) {
6452
+ return this.http.get("/resources/checkLimits/user/" + userName).json();
6453
+ }
6454
+ /**
6455
+ * No description
6450
6456
  *
6451
6457
  * @tags ResourceCatalog
6452
- * @name CheckLimits
6453
- * @operationId ResourceCatalogController_CheckLimits
6458
+ * @name CheckLimitsForRole
6459
+ * @operationId ResourceCatalogController_CheckLimitsForRole
6454
6460
  * @summary Get limits of workspace.
6455
- * @request GET:/resources/checkLimits
6461
+ * @request GET:/resources/checkLimits/role/{roleName}
6456
6462
  * @response `200` OK
6457
6463
  */
6458
- function checkLimits(query) {
6459
- return this.http.get("/resources/checkLimits", query).json();
6464
+
6465
+ }, {
6466
+ key: "checkLimitsForRole",
6467
+ value: function checkLimitsForRole(roleName) {
6468
+ return this.http.get("/resources/checkLimits/role/" + roleName).json();
6469
+ }
6470
+ /**
6471
+ * No description
6472
+ *
6473
+ * @tags ResourceCatalog
6474
+ * @name GetDefaultLimits
6475
+ * @operationId ResourceCatalogController_GetDefaultLimits
6476
+ * @summary Get default limits of workspace.
6477
+ * @request GET:/resources/checkLimits/default
6478
+ * @response `200` OK
6479
+ */
6480
+
6481
+ }, {
6482
+ key: "getDefaultLimits",
6483
+ value: function getDefaultLimits() {
6484
+ return this.http.get("/resources/checkLimits/default").json();
6460
6485
  }
6461
6486
  /**
6462
6487
  * No description
@@ -7029,7 +7054,7 @@ let Styles = /*#__PURE__*/function (_StyleService) {
7029
7054
  return _createClass(Styles);
7030
7055
  }(StyleService);
7031
7056
 
7032
- const _excluded$8 = ["name"],
7057
+ const _excluded$7 = ["name"],
7033
7058
  _excluded2$4 = ["name"],
7034
7059
  _excluded3$3 = ["name"],
7035
7060
  _excluded4$2 = ["name"];
@@ -7211,7 +7236,7 @@ let TablesService = /*#__PURE__*/function (_Service) {
7211
7236
  let {
7212
7237
  name
7213
7238
  } = _ref,
7214
- query = _objectWithoutPropertiesLoose(_ref, _excluded$8);
7239
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$7);
7215
7240
 
7216
7241
  return this.http.get("/tables/" + name + "/data", query).json();
7217
7242
  }
@@ -7611,7 +7636,7 @@ let Tools = /*#__PURE__*/function (_ToolsService) {
7611
7636
  return _createClass(Tools);
7612
7637
  }(ToolsService);
7613
7638
 
7614
- const _excluded$9 = ["name", "z", "x", "y"];
7639
+ const _excluded$8 = ["name", "z", "x", "y"];
7615
7640
  /**
7616
7641
  * @title Spatial Processing Core API
7617
7642
  * @version 1.5.1.0
@@ -7649,7 +7674,7 @@ let VectorTileService = /*#__PURE__*/function (_Service) {
7649
7674
  x,
7650
7675
  y
7651
7676
  } = _ref,
7652
- query = _objectWithoutPropertiesLoose(_ref, _excluded$9);
7677
+ query = _objectWithoutPropertiesLoose(_ref, _excluded$8);
7653
7678
 
7654
7679
  return this.http.get("/vt/" + name + "/" + z + "/" + x + "/" + y + ".pbf", query).then(() => {});
7655
7680
  }
@@ -7776,7 +7801,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
7776
7801
  }
7777
7802
  }],
7778
7803
  afterResponse: [(request, options, response) => {
7779
- const apiEvent = apiEventsByResponseStatus[response.status];
7804
+ const apiEvent = apiEventsByResponseStatus[response == null ? void 0 : response.status];
7780
7805
 
7781
7806
  if (apiEvent) {
7782
7807
  _this.emit(apiEvent, errorHandler(new HTTPError(response, request, options)));
@@ -7795,7 +7820,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
7795
7820
  _this.resources = new Resources(_this.projects, _this.layers, _this.tables);
7796
7821
  _this.styles = new Styles(_this.http);
7797
7822
  _this.account = new Account(_this.http);
7798
- _this.accountPreview = new AccountPreview(_this.http, _this.account);
7823
+ _this.accountPreview = new AccountPreview(_this.http);
7799
7824
  _this.bulk = new BulkOperations(_this.http);
7800
7825
  _this.security = new Security(_this.http, _this.account);
7801
7826
  _this.notification = new Notification(_this.http, _assertThisInitialized(_this), wsKeepAlive);