@evergis/api 3.0.201 → 3.0.202

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.d.ts CHANGED
@@ -23,7 +23,6 @@ export declare enum UrlPath {
23
23
  Portal = "/portal"
24
24
  }
25
25
  export declare type SocAuthNetwork = 'vk' | 'facebook' | 'google';
26
- export declare type SocAuthCallback = 'vkCallback' | 'facebookCallback' | 'googleCallback';
27
26
  export declare class Api extends EventEmitter {
28
27
  protected readonly http: HttpClient;
29
28
  private readonly wsUrl;
@@ -269,7 +269,7 @@ export declare class AccountService extends Service {
269
269
  * @request POST:/account/refresh-token
270
270
  * @response `200` OK
271
271
  */
272
- refreshToken(data: RefreshTokenDc): Promise<string>;
272
+ refreshToken(data: RefreshTokenDc): Promise<LoginResultDc>;
273
273
  /**
274
274
  * No description
275
275
  *
@@ -1,4 +1,4 @@
1
- import { AccessControlListDc, AggregateAttributeParams, AggregationDataResultDc, AttributeDistinctsDc, BulkOperationResultDc, ClassifyDc, ClassifyParams, CompositeServiceConfigurationDc, CompositeServiceInfoDc, CreateFeaturesPayload, DeleteByConditionParams, DeleteFeatureParams, DeleteFeaturesParams, DeleteResourcesParams, DistinctsParams, EditAttributesInfoDc, EnvelopeDc, ExpressionValidationResultDc, FeatureDc, FeatureLayerServiceInfoDc, FeaturesContainsParams, FeatureSelectionDc, FeaturesListDc, FileUploadResponse, GetBulkFeaturesPayload, GetByGeometryGetParams, GetByGeometryParams, GetByGeometryPostParams, GetByGeometryPostPayload, GetByIdParams, GetFeatures1Params, GetFeaturesParametersDc, GetFilteredFeaturesCountDc, GetFilteredFeaturesCountParams, GetLayerExtentParams, GetLayerImageParams, GetLayersInfoParams, GetLayersListParams, GetRasterMetaParams8, GetTilesLayerImageParams, LayerUpdateInfo, LayerUpdateInfoDc, LinearServiceConfigurationDc, LocalTileServiceConfigurationDc, NetCdfMetaDc, PagedBulkFeaturesListDc, PagedFeaturesListDc, PbfServiceConfigurationDc, PbfServiceInfoDc, PostgresLayerServiceConfigurationDc, PostgresTileCatalogServiceConfigurationDc, ProxyServiceInfoDc, PublishProxyServicePayload, QueryLayerServiceConfigurationDc, QueryLayerServiceInfoDc, RasterMetaDc, RemoteTileServiceConfigurationDc, RemoteTileServiceInfo, RemoteTileServiceInfoDc, ResourceDependenciesDc, ResourceInfoDc, RouteFeatureDc, RouteServiceConfigurationDc, SelectFeaturesParams, ServiceInfoDc, ServiceListDc, SetPermissionsBatchPayload, SetPreviewPayload, SimpleSymbolDc, StyleDc, StyledLayerServiceConfigurationDc, SubtractParams, SubtractPayload, TileServiceInfoDc, UniteParams, UnitePayload, UpdateFeaturePayload, UpdateProxyServicePayload, ValidateExpressionParams } from './data-contracts';
1
+ import { AccessControlListDc, AggregateAttributeParams, AggregationDataResultDc, AttributeDistinctsDc, BulkOperationResultDc, ClassifyDc, ClassifyParams, CompositeServiceConfigurationDc, CompositeServiceInfoDc, CreateFeaturesPayload, DeleteByConditionParams, DeleteFeatureParams, DeleteFeaturesParams, DeleteResourcesParams, DistinctsParams, EditAttributesInfoDc, EnvelopeDc, ExpressionValidationResultDc, FeatureDc, FeatureLayerServiceInfoDc, FeaturesContainsParams, FeatureSelectionDc, FeaturesListDc, FileUploadResponse, GetBulkFeaturesPayload, GetByGeometryGetParams, GetByGeometryParams, GetByGeometryPostParams, GetByGeometryPostPayload, GetByIdParams, GetFeatures1Params, GetFeaturesParametersDc, GetFilteredFeaturesCountDc, GetFilteredFeaturesCountParams, GetLayerExtentParams, GetLayerImageParams, GetLayersInfoParams, GetLayersListParams, GetRasterMetaParams5, GetTilesLayerImageParams, LayerUpdateInfo, LayerUpdateInfoDc, LinearServiceConfigurationDc, LocalTileServiceConfigurationDc, NetCdfMetaDc, PagedBulkFeaturesListDc, PagedFeaturesListDc, PbfServiceConfigurationDc, PbfServiceInfoDc, PostgresLayerServiceConfigurationDc, PostgresTileCatalogServiceConfigurationDc, ProxyServiceInfoDc, PublishProxyServicePayload, QueryLayerServiceConfigurationDc, QueryLayerServiceInfoDc, RasterMetaDc, RemoteTileServiceConfigurationDc, RemoteTileServiceInfo, RemoteTileServiceInfoDc, ResourceDependenciesDc, ResourceInfoDc, RouteFeatureDc, RouteServiceConfigurationDc, SelectFeaturesParams, ServiceInfoDc, ServiceListDc, SetPermissionsBatchPayload, SetPreviewPayload, SimpleSymbolDc, StyleDc, StyledLayerServiceConfigurationDc, SubtractParams, SubtractPayload, TileServiceInfoDc, UniteParams, UnitePayload, UpdateFeaturePayload, UpdateProxyServicePayload, ValidateExpressionParams } from './data-contracts';
2
2
  import { Service } from './Service';
3
3
  /**
4
4
  * @title Spatial Processing Core API
@@ -589,7 +589,7 @@ export declare class LayersService extends Service {
589
589
  * @request GET:/layers/{name}/{id}/metadata
590
590
  * @response `200` OK
591
591
  */
592
- getRasterMeta({ name, id, ...query }: GetRasterMetaParams8): Promise<(RasterMetaDc | NetCdfMetaDc)[]>;
592
+ getRasterMeta({ name, id, ...query }: GetRasterMetaParams5): Promise<(RasterMetaDc | NetCdfMetaDc)[]>;
593
593
  /**
594
594
  * No description
595
595
  *
@@ -1,4 +1,4 @@
1
- import { AccessControlListDc, BulkOperationResultDc, DeleteResourcesParams7, ExtendedProjectInfoDc, ExtendedProjectLayersInfo, FileUploadResponse, GetProjectsInfoParams, GetProjectsListParams, PagedListProjectInfoDc, ProjectsListDc, ResourceDependenciesDc, SetPermissionsBatchBody, SetPreviewBody } from './data-contracts';
1
+ import { AccessControlListDc, BulkOperationResultDc, DeleteResourcesParams2, ExtendedProjectInfoDc, ExtendedProjectLayersInfo, FileUploadResponse, GetProjectsInfoParams, GetProjectsListParams, PagedListProjectInfoDc, ProjectsListDc, ResourceDependenciesDc, SetPermissionsBatchBody, SetPreviewBody } from './data-contracts';
2
2
  import { Service } from './Service';
3
3
  /**
4
4
  * @title Spatial Processing Core API
@@ -49,7 +49,7 @@ export declare class ProjectsService extends Service {
49
49
  * @request DELETE:/projects
50
50
  * @response `200` OK
51
51
  */
52
- deleteResources(query: DeleteResourcesParams7): Promise<BulkOperationResultDc[]>;
52
+ deleteResources(query: DeleteResourcesParams2): Promise<BulkOperationResultDc[]>;
53
53
  /**
54
54
  * No description
55
55
  *
@@ -1,4 +1,4 @@
1
- import { ClassifyDc, ClassifyParams7, GetClassifyDc, GetStatisticsDc, GetSumOfProductDc, StatisticsDbParams, StatisticsDc, SumOfProductParams } from './data-contracts';
1
+ import { ClassifyDc, ClassifyParams5, GetClassifyDc, GetStatisticsDc, GetSumOfProductDc, StatisticsDbParams, StatisticsDc, SumOfProductParams } from './data-contracts';
2
2
  import { Service } from './Service';
3
3
  /**
4
4
  * @title Spatial Processing Core API
@@ -38,7 +38,7 @@ export declare class StatisticService extends Service {
38
38
  * @request GET:/statistics/classify
39
39
  * @response `200` OK
40
40
  */
41
- classify(query: ClassifyParams7): Promise<ClassifyDc>;
41
+ classify(query: ClassifyParams5): Promise<ClassifyDc>;
42
42
  /**
43
43
  * No description
44
44
  *
@@ -1,4 +1,4 @@
1
- import { AccessControlListDc, BulkOperationResultDc, CreateViewFromQueryDc, CreateViewFromQueryLayerDc, DeleteResourcesParams4, DeleteTableDataParams, DetailedTableInfoDc, FileUploadResponse, GetTableDataParams, GetTableListParams, GetTablesInfoParams, GetUniqueDataRowsParams, MapTableInfoDc, MapTableParams, PagedListIEnumerable1, PagedListTableInfoDc, ResourceDependenciesDc, SetPermissionsBatchInput, SetPreviewInput, TableListDc, UpdateTableDataParams, UpdateTableDataPayload, UpdateTableDc, WriteTableDataPayload } from './data-contracts';
1
+ import { AccessControlListDc, BulkOperationResultDc, CreateViewFromQueryDc, CreateViewFromQueryLayerDc, DeleteResourcesParams7, DeleteTableDataParams, DetailedTableInfoDc, FileUploadResponse, GetTableDataParams, GetTableListParams, GetTablesInfoParams, GetUniqueDataRowsParams, MapTableInfoDc, MapTableParams, PagedListIEnumerable1, PagedListTableInfoDc, ResourceDependenciesDc, SetPermissionsBatchInput, SetPreviewInput, TableListDc, UpdateTableDataParams, UpdateTableDataPayload, UpdateTableDc, WriteTableDataPayload } from './data-contracts';
2
2
  import { Service } from './Service';
3
3
  /**
4
4
  * @title Spatial Processing Core API
@@ -49,7 +49,7 @@ export declare class TablesService extends Service {
49
49
  * @request DELETE:/tables
50
50
  * @response `200` OK
51
51
  */
52
- deleteResources(query: DeleteResourcesParams4): Promise<BulkOperationResultDc[]>;
52
+ deleteResources(query: DeleteResourcesParams7): Promise<BulkOperationResultDc[]>;
53
53
  /**
54
54
  * No description
55
55
  *
@@ -1,4 +1,4 @@
1
- import { GetCapabilities1Params, GetCapabilitiesParams6, GetFeatureInfoParams, GetLegendGraphicParams, GetMapParams } from './data-contracts';
1
+ import { GetCapabilities1Params, GetCapabilitiesParams2, GetFeatureInfoParams, GetLegendGraphicParams, GetMapParams } from './data-contracts';
2
2
  import { Service } from './Service';
3
3
  /**
4
4
  * @title Spatial Processing Core API
@@ -16,7 +16,7 @@ export declare class WmsServerService extends Service {
16
16
  * @request GET:/wms#REQUEST=GetCapabilities
17
17
  * @response `200` OK
18
18
  */
19
- getCapabilities(query: GetCapabilitiesParams6): Promise<void>;
19
+ getCapabilities(query: GetCapabilitiesParams2): Promise<void>;
20
20
  /**
21
21
  * No description
22
22
  *
@@ -7745,7 +7745,7 @@ export interface ValidateExpressionParams {
7745
7745
  /** Layer name. */
7746
7746
  layerName: string;
7747
7747
  }
7748
- export interface GetRasterMetaParams8 {
7748
+ export interface GetRasterMetaParams5 {
7749
7749
  /**
7750
7750
  * Min value for build histogram.
7751
7751
  * @format double
@@ -7864,7 +7864,7 @@ export interface GetProjectsListParams {
7864
7864
  tags?: string[];
7865
7865
  }
7866
7866
  export declare type SetPermissionsBatchBody = ResourceAclDc[];
7867
- export interface DeleteResourcesParams7 {
7867
+ export interface DeleteResourcesParams2 {
7868
7868
  /** Resource names. */
7869
7869
  names?: string[];
7870
7870
  }
@@ -8147,7 +8147,7 @@ export interface StatisticsDbParams {
8147
8147
  */
8148
8148
  types?: AggregationFunction[];
8149
8149
  }
8150
- export interface ClassifyParams7 {
8150
+ export interface ClassifyParams5 {
8151
8151
  /** Layer name. */
8152
8152
  name: string;
8153
8153
  /** Attribute name. */
@@ -8280,7 +8280,7 @@ export interface GetTableListParams {
8280
8280
  acl?: string;
8281
8281
  }
8282
8282
  export declare type SetPermissionsBatchInput = ResourceAclDc[];
8283
- export interface DeleteResourcesParams4 {
8283
+ export interface DeleteResourcesParams7 {
8284
8284
  /** Resource names. */
8285
8285
  names?: string[];
8286
8286
  }
@@ -8437,7 +8437,7 @@ export interface GetPublicCapabilitiesParams {
8437
8437
  /** When omitted or not supported by server, server shall return service metadata document using the MIME type "text/xml". */
8438
8438
  AcceptFormats?: string[];
8439
8439
  }
8440
- export interface GetCapabilitiesParams6 {
8440
+ export interface GetCapabilitiesParams2 {
8441
8441
  /** Output format of service metadata. */
8442
8442
  Format?: string;
8443
8443
  /** Must be WMS. */
@@ -181,6 +181,7 @@ function _get(target, property, receiver) {
181
181
  return _get(target, property, receiver || target);
182
182
  }
183
183
 
184
+ const API_USER_INFO_KEY = '@evergis/user-info';
184
185
  const STORAGE_TOKEN_KEY = "evergis-jwt-token";
185
186
  const STORAGE_REFRESH_TOKEN_KEY = "evergis-refresh-token";
186
187
 
@@ -1182,7 +1183,7 @@ let AccountService = /*#__PURE__*/function (_Service) {
1182
1183
  }, {
1183
1184
  key: "refreshToken",
1184
1185
  value: function refreshToken(data) {
1185
- return this.http.post("/account/refresh-token", data).text();
1186
+ return this.http.post("/account/refresh-token", data).json();
1186
1187
  }
1187
1188
  /**
1188
1189
  * No description
@@ -1413,8 +1414,6 @@ let AccountService = /*#__PURE__*/function (_Service) {
1413
1414
  return AccountService;
1414
1415
  }(Service);
1415
1416
 
1416
- const API_USER_INFO_KEY = '@evergis/user-info';
1417
-
1418
1417
  const getUserInfo = () => JSON.parse(localStorage.getItem(API_USER_INFO_KEY) || 'null') || void 0;
1419
1418
  const updateUserInfo = newUserInfo => {
1420
1419
  if (newUserInfo) {
@@ -4685,6 +4684,13 @@ function isString(v) {
4685
4684
 
4686
4685
  const addSubDomainToLocation = subDomain => window.location.protocol + "//" + subDomain + "." + window.location.host;
4687
4686
 
4687
+ const parseJwt = token => {
4688
+ const base64Url = token.split(".")[1];
4689
+ const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
4690
+ const jsonPayload = decodeURIComponent(atob(base64).split("").map(c => "%" + "00".concat(c.charCodeAt(0).toString(16)).slice(-2)).join(""));
4691
+ return JSON.parse(jsonPayload);
4692
+ };
4693
+
4688
4694
  function unique(value, index, array) {
4689
4695
  return array.indexOf(value) === index;
4690
4696
  }
@@ -7486,13 +7492,6 @@ let VectorTiles = /*#__PURE__*/function (_VectorTileService) {
7486
7492
  return VectorTiles;
7487
7493
  }(VectorTileService);
7488
7494
 
7489
- const parseJwt = token => {
7490
- const base64Url = token.split(".")[1];
7491
- const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
7492
- const jsonPayload = decodeURIComponent(atob(base64).split("").map(c => "%" + "00".concat(c.charCodeAt(0).toString(16)).slice(-2)).join(""));
7493
- return JSON.parse(jsonPayload);
7494
- };
7495
-
7496
7495
  (function (UrlPath) {
7497
7496
  UrlPath["Base"] = "/map";
7498
7497
  UrlPath["Shared"] = "/shared";
@@ -7535,23 +7534,12 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
7535
7534
  timeout: false
7536
7535
  }, httpOptions || {}, {
7537
7536
  hooks: _extends({}, hooks || {}, {
7538
- beforeRequest: [async request => {
7537
+ beforeRequest: [request => {
7539
7538
  const token = window.localStorage.getItem(STORAGE_TOKEN_KEY);
7540
- const refreshToken = window.localStorage.getItem(STORAGE_REFRESH_TOKEN_KEY);
7541
7539
 
7542
- if (token && refreshToken) {
7540
+ if (token) {
7543
7541
  var _request$headers;
7544
7542
 
7545
- const {
7546
- exp
7547
- } = parseJwt(token) || {};
7548
-
7549
- if (typeof exp === 'number' && exp - new Date().getTime() < 60 * 1000) {
7550
- await _this.account.refreshToken({
7551
- refreshToken
7552
- });
7553
- }
7554
-
7555
7543
  (_request$headers = request.headers) == null ? void 0 : _request$headers.set('Authorization', "Bearer " + (token || ''));
7556
7544
  }
7557
7545
  }, ...((_hooks$beforeRequest = hooks == null ? void 0 : hooks.beforeRequest) != null ? _hooks$beforeRequest : [])],
@@ -8466,6 +8454,8 @@ exports.Print = Print;
8466
8454
  exports.Projects = Projects;
8467
8455
  exports.ResourceCatalog = ResourceCatalog;
8468
8456
  exports.Resources = Resources;
8457
+ exports.STORAGE_REFRESH_TOKEN_KEY = STORAGE_REFRESH_TOKEN_KEY;
8458
+ exports.STORAGE_TOKEN_KEY = STORAGE_TOKEN_KEY;
8469
8459
  exports.Scheduler = Scheduler;
8470
8460
  exports.Security = Security;
8471
8461
  exports.SpatialProcessor = SpatialProcessor;
@@ -8487,6 +8477,7 @@ exports.isLayer = isLayer;
8487
8477
  exports.isProjectContentItems = isProjectContentItems;
8488
8478
  exports.isString = isString;
8489
8479
  exports.isTileLayerService = isTileLayerService;
8480
+ exports.parseJwt = parseJwt;
8490
8481
  exports.promiseAllIgnoreErrors = promiseAllIgnoreErrors;
8491
8482
  exports.stripUselessSlashes = stripUselessSlashes;
8492
8483
  exports.toFormData = toFormData;