@evergis/api 3.0.200 → 3.0.201

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.
@@ -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, GetRasterMetaParams7, 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, 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';
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 }: GetRasterMetaParams7): Promise<(RasterMetaDc | NetCdfMetaDc)[]>;
592
+ getRasterMeta({ name, id, ...query }: GetRasterMetaParams8): Promise<(RasterMetaDc | NetCdfMetaDc)[]>;
593
593
  /**
594
594
  * No description
595
595
  *
@@ -1,4 +1,4 @@
1
- import { AccessControlListDc, BulkOperationResultDc, DeleteResourcesParams6, ExtendedProjectInfoDc, ExtendedProjectLayersInfo, FileUploadResponse, GetProjectsInfoParams, GetProjectsListParams, PagedListProjectInfoDc, ProjectsListDc, ResourceDependenciesDc, SetPermissionsBatchBody, SetPreviewBody } from './data-contracts';
1
+ import { AccessControlListDc, BulkOperationResultDc, DeleteResourcesParams7, 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: DeleteResourcesParams6): Promise<BulkOperationResultDc[]>;
52
+ deleteResources(query: DeleteResourcesParams7): Promise<BulkOperationResultDc[]>;
53
53
  /**
54
54
  * No description
55
55
  *
@@ -1,4 +1,4 @@
1
- import { ClassifyDc, ClassifyParams8, GetClassifyDc, GetStatisticsDc, GetSumOfProductDc, StatisticsDbParams, StatisticsDc, SumOfProductParams } from './data-contracts';
1
+ import { ClassifyDc, ClassifyParams7, 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: ClassifyParams8): Promise<ClassifyDc>;
41
+ classify(query: ClassifyParams7): Promise<ClassifyDc>;
42
42
  /**
43
43
  * No description
44
44
  *
@@ -1,4 +1,4 @@
1
- import { AccessControlListDc, BulkOperationResultDc, CreateViewFromQueryDc, CreateViewFromQueryLayerDc, DeleteResourcesParams5, 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, DeleteResourcesParams4, 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: DeleteResourcesParams5): Promise<BulkOperationResultDc[]>;
52
+ deleteResources(query: DeleteResourcesParams4): Promise<BulkOperationResultDc[]>;
53
53
  /**
54
54
  * No description
55
55
  *
@@ -1,4 +1,4 @@
1
- import { GetCapabilities1Params, GetCapabilitiesParams4, GetFeatureInfoParams, GetLegendGraphicParams, GetMapParams } from './data-contracts';
1
+ import { GetCapabilities1Params, GetCapabilitiesParams6, 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: GetCapabilitiesParams4): Promise<void>;
19
+ getCapabilities(query: GetCapabilitiesParams6): 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 GetRasterMetaParams7 {
7748
+ export interface GetRasterMetaParams8 {
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 DeleteResourcesParams6 {
7867
+ export interface DeleteResourcesParams7 {
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 ClassifyParams8 {
8150
+ export interface ClassifyParams7 {
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 DeleteResourcesParams5 {
8283
+ export interface DeleteResourcesParams4 {
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 GetCapabilitiesParams4 {
8440
+ export interface GetCapabilitiesParams6 {
8441
8441
  /** Output format of service metadata. */
8442
8442
  Format?: string;
8443
8443
  /** Must be WMS. */
@@ -182,14 +182,7 @@ function _get(target, property, receiver) {
182
182
  }
183
183
 
184
184
  const STORAGE_TOKEN_KEY = "evergis-jwt-token";
185
- const STORAGE_REFRESH_TOKEN_KEY = "evergis-jwt-token";
186
-
187
- const parseJwt = token => {
188
- const base64Url = token.split(".")[1];
189
- const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
190
- const jsonPayload = decodeURIComponent(atob(base64).split("").map(c => "%" + "00".concat(c.charCodeAt(0).toString(16)).slice(-2)).join(""));
191
- return JSON.parse(jsonPayload);
192
- };
185
+ const STORAGE_REFRESH_TOKEN_KEY = "evergis-refresh-token";
193
186
 
194
187
  let HttpClient = /*#__PURE__*/function () {
195
188
  function HttpClient(options) {
@@ -210,30 +203,7 @@ let HttpClient = /*#__PURE__*/function () {
210
203
  value: function extend(options) {
211
204
  var _options$prefixUrl2;
212
205
 
213
- this.ky = ky__default.extend(_extends({}, options, {
214
- hooks: {
215
- beforeRequest: [async request => {
216
- const token = window.localStorage.getItem(STORAGE_TOKEN_KEY);
217
- const refreshToken = window.localStorage.getItem(STORAGE_REFRESH_TOKEN_KEY);
218
-
219
- if (token) {
220
- var _request$headers;
221
-
222
- const {
223
- exp
224
- } = parseJwt(token) || {};
225
-
226
- if (typeof exp === 'number' && exp - new Date().getTime() < 60 * 1000) {
227
- await this.post("/account/refresh-token", {
228
- refreshToken
229
- });
230
- }
231
-
232
- (_request$headers = request.headers) == null ? void 0 : _request$headers.set('Authorization', "Bearer " + (token || ''));
233
- }
234
- }]
235
- }
236
- }));
206
+ this.ky = ky__default.extend(options);
237
207
  this.prefixUrl = ((_options$prefixUrl2 = options.prefixUrl) == null ? void 0 : _options$prefixUrl2.toString()) || '';
238
208
  }
239
209
  }, {
@@ -7516,6 +7486,13 @@ let VectorTiles = /*#__PURE__*/function (_VectorTileService) {
7516
7486
  return VectorTiles;
7517
7487
  }(VectorTileService);
7518
7488
 
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
+
7519
7496
  (function (UrlPath) {
7520
7497
  UrlPath["Base"] = "/map";
7521
7498
  UrlPath["Shared"] = "/shared";
@@ -7533,6 +7510,8 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
7533
7510
  var _super = /*#__PURE__*/_createSuper(Api);
7534
7511
 
7535
7512
  function Api(_ref) {
7513
+ var _hooks$beforeRequest;
7514
+
7536
7515
  var _this;
7537
7516
 
7538
7517
  let {
@@ -7556,7 +7535,26 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
7556
7535
  timeout: false
7557
7536
  }, httpOptions || {}, {
7558
7537
  hooks: _extends({}, hooks || {}, {
7559
- beforeRequest: [...(hooks && hooks.beforeRequest || [])],
7538
+ beforeRequest: [async request => {
7539
+ const token = window.localStorage.getItem(STORAGE_TOKEN_KEY);
7540
+ const refreshToken = window.localStorage.getItem(STORAGE_REFRESH_TOKEN_KEY);
7541
+
7542
+ if (token && refreshToken) {
7543
+ var _request$headers;
7544
+
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
+ (_request$headers = request.headers) == null ? void 0 : _request$headers.set('Authorization', "Bearer " + (token || ''));
7556
+ }
7557
+ }, ...((_hooks$beforeRequest = hooks == null ? void 0 : hooks.beforeRequest) != null ? _hooks$beforeRequest : [])],
7560
7558
  afterResponse: [response => {
7561
7559
  const apiEvent = apiEventsByResponseStatus[response.status];
7562
7560
 
@@ -7565,7 +7563,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
7565
7563
  }
7566
7564
 
7567
7565
  return response;
7568
- }, ...(hooks && hooks.afterResponse || [])]
7566
+ }, ...((hooks == null ? void 0 : hooks.afterResponse) || [])]
7569
7567
  })
7570
7568
  }));
7571
7569
  _this.url = url;