@evergis/api 3.0.200 → 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 +0 -1
- package/dist/__generated__/AccountService.d.ts +1 -1
- package/dist/__generated__/LayersService.d.ts +2 -2
- package/dist/__generated__/ProjectsService.d.ts +2 -2
- package/dist/__generated__/StatisticService.d.ts +2 -2
- package/dist/__generated__/TablesService.d.ts +2 -2
- package/dist/__generated__/WmsServerService.d.ts +2 -2
- package/dist/__generated__/data-contracts.d.ts +5 -5
- package/dist/api.cjs.development.js +26 -37
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +24 -38
- package/dist/api.esm.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/index.d.ts +10 -9
- package/dist/services/Statistic.d.ts +2 -2
- package/dist/utils/index.d.ts +10 -9
- package/package.json +2 -2
- package/dist/services/constants.d.ts +0 -2
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<
|
|
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,
|
|
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 }:
|
|
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,
|
|
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:
|
|
52
|
+
deleteResources(query: DeleteResourcesParams2): Promise<BulkOperationResultDc[]>;
|
|
53
53
|
/**
|
|
54
54
|
* No description
|
|
55
55
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassifyDc,
|
|
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:
|
|
41
|
+
classify(query: ClassifyParams5): Promise<ClassifyDc>;
|
|
42
42
|
/**
|
|
43
43
|
* No description
|
|
44
44
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessControlListDc, BulkOperationResultDc, CreateViewFromQueryDc, CreateViewFromQueryLayerDc,
|
|
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:
|
|
52
|
+
deleteResources(query: DeleteResourcesParams7): Promise<BulkOperationResultDc[]>;
|
|
53
53
|
/**
|
|
54
54
|
* No description
|
|
55
55
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetCapabilities1Params,
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
8440
|
+
export interface GetCapabilitiesParams2 {
|
|
8441
8441
|
/** Output format of service metadata. */
|
|
8442
8442
|
Format?: string;
|
|
8443
8443
|
/** Must be WMS. */
|
|
@@ -181,15 +181,9 @@ 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
|
-
const STORAGE_REFRESH_TOKEN_KEY = "evergis-
|
|
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
|
-
};
|
|
186
|
+
const STORAGE_REFRESH_TOKEN_KEY = "evergis-refresh-token";
|
|
193
187
|
|
|
194
188
|
let HttpClient = /*#__PURE__*/function () {
|
|
195
189
|
function HttpClient(options) {
|
|
@@ -210,30 +204,7 @@ let HttpClient = /*#__PURE__*/function () {
|
|
|
210
204
|
value: function extend(options) {
|
|
211
205
|
var _options$prefixUrl2;
|
|
212
206
|
|
|
213
|
-
this.ky = ky__default.extend(
|
|
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
|
-
}));
|
|
207
|
+
this.ky = ky__default.extend(options);
|
|
237
208
|
this.prefixUrl = ((_options$prefixUrl2 = options.prefixUrl) == null ? void 0 : _options$prefixUrl2.toString()) || '';
|
|
238
209
|
}
|
|
239
210
|
}, {
|
|
@@ -1212,7 +1183,7 @@ let AccountService = /*#__PURE__*/function (_Service) {
|
|
|
1212
1183
|
}, {
|
|
1213
1184
|
key: "refreshToken",
|
|
1214
1185
|
value: function refreshToken(data) {
|
|
1215
|
-
return this.http.post("/account/refresh-token", data).
|
|
1186
|
+
return this.http.post("/account/refresh-token", data).json();
|
|
1216
1187
|
}
|
|
1217
1188
|
/**
|
|
1218
1189
|
* No description
|
|
@@ -1443,8 +1414,6 @@ let AccountService = /*#__PURE__*/function (_Service) {
|
|
|
1443
1414
|
return AccountService;
|
|
1444
1415
|
}(Service);
|
|
1445
1416
|
|
|
1446
|
-
const API_USER_INFO_KEY = '@evergis/user-info';
|
|
1447
|
-
|
|
1448
1417
|
const getUserInfo = () => JSON.parse(localStorage.getItem(API_USER_INFO_KEY) || 'null') || void 0;
|
|
1449
1418
|
const updateUserInfo = newUserInfo => {
|
|
1450
1419
|
if (newUserInfo) {
|
|
@@ -4715,6 +4684,13 @@ function isString(v) {
|
|
|
4715
4684
|
|
|
4716
4685
|
const addSubDomainToLocation = subDomain => window.location.protocol + "//" + subDomain + "." + window.location.host;
|
|
4717
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
|
+
|
|
4718
4694
|
function unique(value, index, array) {
|
|
4719
4695
|
return array.indexOf(value) === index;
|
|
4720
4696
|
}
|
|
@@ -7533,6 +7509,8 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
7533
7509
|
var _super = /*#__PURE__*/_createSuper(Api);
|
|
7534
7510
|
|
|
7535
7511
|
function Api(_ref) {
|
|
7512
|
+
var _hooks$beforeRequest;
|
|
7513
|
+
|
|
7536
7514
|
var _this;
|
|
7537
7515
|
|
|
7538
7516
|
let {
|
|
@@ -7556,7 +7534,15 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
7556
7534
|
timeout: false
|
|
7557
7535
|
}, httpOptions || {}, {
|
|
7558
7536
|
hooks: _extends({}, hooks || {}, {
|
|
7559
|
-
beforeRequest: [
|
|
7537
|
+
beforeRequest: [request => {
|
|
7538
|
+
const token = window.localStorage.getItem(STORAGE_TOKEN_KEY);
|
|
7539
|
+
|
|
7540
|
+
if (token) {
|
|
7541
|
+
var _request$headers;
|
|
7542
|
+
|
|
7543
|
+
(_request$headers = request.headers) == null ? void 0 : _request$headers.set('Authorization', "Bearer " + (token || ''));
|
|
7544
|
+
}
|
|
7545
|
+
}, ...((_hooks$beforeRequest = hooks == null ? void 0 : hooks.beforeRequest) != null ? _hooks$beforeRequest : [])],
|
|
7560
7546
|
afterResponse: [response => {
|
|
7561
7547
|
const apiEvent = apiEventsByResponseStatus[response.status];
|
|
7562
7548
|
|
|
@@ -7565,7 +7551,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
7565
7551
|
}
|
|
7566
7552
|
|
|
7567
7553
|
return response;
|
|
7568
|
-
}, ...(hooks
|
|
7554
|
+
}, ...((hooks == null ? void 0 : hooks.afterResponse) || [])]
|
|
7569
7555
|
})
|
|
7570
7556
|
}));
|
|
7571
7557
|
_this.url = url;
|
|
@@ -8468,6 +8454,8 @@ exports.Print = Print;
|
|
|
8468
8454
|
exports.Projects = Projects;
|
|
8469
8455
|
exports.ResourceCatalog = ResourceCatalog;
|
|
8470
8456
|
exports.Resources = Resources;
|
|
8457
|
+
exports.STORAGE_REFRESH_TOKEN_KEY = STORAGE_REFRESH_TOKEN_KEY;
|
|
8458
|
+
exports.STORAGE_TOKEN_KEY = STORAGE_TOKEN_KEY;
|
|
8471
8459
|
exports.Scheduler = Scheduler;
|
|
8472
8460
|
exports.Security = Security;
|
|
8473
8461
|
exports.SpatialProcessor = SpatialProcessor;
|
|
@@ -8489,6 +8477,7 @@ exports.isLayer = isLayer;
|
|
|
8489
8477
|
exports.isProjectContentItems = isProjectContentItems;
|
|
8490
8478
|
exports.isString = isString;
|
|
8491
8479
|
exports.isTileLayerService = isTileLayerService;
|
|
8480
|
+
exports.parseJwt = parseJwt;
|
|
8492
8481
|
exports.promiseAllIgnoreErrors = promiseAllIgnoreErrors;
|
|
8493
8482
|
exports.stripUselessSlashes = stripUselessSlashes;
|
|
8494
8483
|
exports.toFormData = toFormData;
|