@evergis/api 3.0.79 → 3.0.82
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 +10 -5
- package/dist/__generated__/AccountPreviewService.d.ts +1 -1
- package/dist/__generated__/AccountService.d.ts +3 -3
- package/dist/__generated__/FeedbackService.d.ts +1 -1
- package/dist/__generated__/ImportService.d.ts +6 -28
- package/dist/__generated__/PrintService.d.ts +1 -1
- package/dist/__generated__/ProjectsService.d.ts +2 -2
- package/dist/__generated__/S3Service.d.ts +1 -1
- package/dist/__generated__/StaticContentService.d.ts +1 -1
- package/dist/__generated__/StatisticService.d.ts +2 -2
- package/dist/__generated__/StyleService.d.ts +1 -1
- package/dist/__generated__/TablesService.d.ts +2 -2
- package/dist/__generated__/WmsServerService.d.ts +2 -2
- package/dist/__generated__/data-contracts.d.ts +21 -16
- package/dist/api.cjs.development.js +138 -154
- 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 +140 -156
- package/dist/api.esm.js.map +1 -1
- package/dist/services/Feedback.d.ts +3 -3
- package/package.json +3 -2
package/dist/Api.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Options as KyOptions } from 'ky';
|
|
2
1
|
import { EventEmitter } from '@evergis/event-emitter';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { HttpClient } from './__generated__/HttpClient';
|
|
2
|
+
import { HubConnection } from '@microsoft/signalr';
|
|
3
|
+
import { Options as KyOptions } from 'ky';
|
|
6
4
|
import { LoginDc } from './__generated__/data-contracts';
|
|
5
|
+
import { HttpClient } from './__generated__/HttpClient';
|
|
6
|
+
import { Account, AccountPreview, BulkOperations, ClientSettings, External, Feedback, FileUpload, General, Geocode, IceRouter, Import, Layers, Names, Namespace, Notification, PortalSettings, Projects, ResourceCatalog, Resources, Scheduler, Security, Statistic, Styles, Tables, Tools } from './services';
|
|
7
|
+
import { Print } from './services/Print';
|
|
7
8
|
export declare type ApiParams = {
|
|
8
9
|
url: string;
|
|
9
10
|
wsUrl?: string;
|
|
11
|
+
snappingHubUrl?: string;
|
|
10
12
|
http?: HttpClient;
|
|
11
13
|
httpOptions?: KyOptions;
|
|
12
14
|
urlPath?: string;
|
|
@@ -49,10 +51,12 @@ export declare class Api extends EventEmitter {
|
|
|
49
51
|
readonly iceRouter: IceRouter;
|
|
50
52
|
readonly statistic: Statistic;
|
|
51
53
|
readonly feedback: Feedback;
|
|
52
|
-
|
|
54
|
+
readonly snappingHub: HubConnection | null;
|
|
55
|
+
constructor({ url, wsUrl, snappingHubUrl, http, urlPath, httpOptions }: ApiParams);
|
|
53
56
|
init({ authParams, connectWs, initScheduler, fetchSettings, fetchUser, }: {
|
|
54
57
|
authParams?: LoginDc;
|
|
55
58
|
connectWs?: boolean;
|
|
59
|
+
connectSignalR?: boolean;
|
|
56
60
|
initScheduler?: boolean;
|
|
57
61
|
fetchSettings?: boolean;
|
|
58
62
|
fetchUser?: boolean;
|
|
@@ -60,6 +64,7 @@ export declare class Api extends EventEmitter {
|
|
|
60
64
|
isAcceptedNetwork(network: string): network is SocAuthNetwork;
|
|
61
65
|
socAuthLogin(network: SocAuthNetwork): Promise<void>;
|
|
62
66
|
connectWs(): Promise<void>;
|
|
67
|
+
connectSignalR(): Promise<void>;
|
|
63
68
|
logout(): Promise<void>;
|
|
64
69
|
initScheduler(): Promise<void>;
|
|
65
70
|
private defineUrlPath;
|
|
@@ -27,7 +27,7 @@ export declare class AccountPreviewService extends Service {
|
|
|
27
27
|
* @request POST:/account/user/{username}/preview
|
|
28
28
|
* @response `200` Success
|
|
29
29
|
*/
|
|
30
|
-
uploadPreview(username: string, data: UploadPreviewPayload): Promise<FileUploadResponse>;
|
|
30
|
+
uploadPreview(username: string, data: UploadPreviewPayload | FormData): Promise<FileUploadResponse>;
|
|
31
31
|
/**
|
|
32
32
|
* No description
|
|
33
33
|
*
|
|
@@ -137,7 +137,7 @@ export declare class AccountService extends Service {
|
|
|
137
137
|
* @request POST:/account/setEmail
|
|
138
138
|
* @response `200` Success
|
|
139
139
|
*/
|
|
140
|
-
setEmail(data: SetEmailPayload): Promise<void>;
|
|
140
|
+
setEmail(data: SetEmailPayload | FormData): Promise<void>;
|
|
141
141
|
/**
|
|
142
142
|
* No description
|
|
143
143
|
*
|
|
@@ -192,7 +192,7 @@ export declare class AccountService extends Service {
|
|
|
192
192
|
* @request PATCH:/account/password/change
|
|
193
193
|
* @response `200` Success
|
|
194
194
|
*/
|
|
195
|
-
changePassword(data: ChangePasswordPayload): Promise<void>;
|
|
195
|
+
changePassword(data: ChangePasswordPayload | FormData): Promise<void>;
|
|
196
196
|
/**
|
|
197
197
|
* No description
|
|
198
198
|
*
|
|
@@ -214,7 +214,7 @@ export declare class AccountService extends Service {
|
|
|
214
214
|
* @request POST:/account/password/reset/confirm
|
|
215
215
|
* @response `200` Success
|
|
216
216
|
*/
|
|
217
|
-
resetPasswordCallback(data: ResetPasswordCallbackPayload): Promise<void>;
|
|
217
|
+
resetPasswordCallback(data: ResetPasswordCallbackPayload | FormData): Promise<void>;
|
|
218
218
|
/**
|
|
219
219
|
* No description
|
|
220
220
|
*
|
|
@@ -38,5 +38,5 @@ export declare class FeedbackService extends Service {
|
|
|
38
38
|
* @request POST:/feedback
|
|
39
39
|
* @response `200` Success
|
|
40
40
|
*/
|
|
41
|
-
feedback(query: FeedbackParams, data: FeedbackPayload): Promise<string[]>;
|
|
41
|
+
feedback(query: FeedbackParams, data: FeedbackPayload | FormData): Promise<string[]>;
|
|
42
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetDataSchemaParams, GetFeaturesCountPayload, GetRasterAttributesParams, ImportDataSchema } from './data-contracts';
|
|
2
2
|
import { Service } from './Service';
|
|
3
3
|
/**
|
|
4
4
|
* @title Spatial Processing Core API
|
|
@@ -21,35 +21,13 @@ export declare class ImportService extends Service {
|
|
|
21
21
|
* No description
|
|
22
22
|
*
|
|
23
23
|
* @tags ImportService
|
|
24
|
-
* @name
|
|
25
|
-
* @operationId
|
|
26
|
-
* @summary
|
|
27
|
-
* @request
|
|
24
|
+
* @name GetFeaturesCount
|
|
25
|
+
* @operationId ImportServiceController_GetFeaturesCount
|
|
26
|
+
* @summary Returns the features count of the given file in temporary static storage.
|
|
27
|
+
* @request POST:/import/count
|
|
28
28
|
* @response `200` Success
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* No description
|
|
33
|
-
*
|
|
34
|
-
* @tags ImportService
|
|
35
|
-
* @name GetCsvDataSchema
|
|
36
|
-
* @operationId ImportServiceController_GetCsvDataSchema
|
|
37
|
-
* @summary Using a file uploaded to the file upload service, reads the headers of the csv file and returns the information about data schema of all layers in that file, available for import.
|
|
38
|
-
* @request GET:/import/csvDataSchema
|
|
39
|
-
* @response `200` Success
|
|
40
|
-
*/
|
|
41
|
-
getCsvDataSchema(query: GetCsvDataSchemaParams): Promise<ImportDataSchema>;
|
|
42
|
-
/**
|
|
43
|
-
* No description
|
|
44
|
-
*
|
|
45
|
-
* @tags ImportService
|
|
46
|
-
* @name GetKmlDataSchema
|
|
47
|
-
* @operationId ImportServiceController_GetKmlDataSchema
|
|
48
|
-
* @summary Using a file uploaded to the file upload service, reads the kml file and returns the information about data schema of all layers in that file, available for import.
|
|
49
|
-
* @request GET:/import/kmlDataSchema
|
|
50
|
-
* @response `200` Success
|
|
51
|
-
*/
|
|
52
|
-
getKmlDataSchema(query: GetKmlDataSchemaParams): Promise<ImportDataSchema>;
|
|
30
|
+
getFeaturesCount(data: GetFeaturesCountPayload): Promise<number>;
|
|
53
31
|
/**
|
|
54
32
|
* No description
|
|
55
33
|
*
|
|
@@ -38,7 +38,7 @@ export declare class PrintService extends Service {
|
|
|
38
38
|
* @request POST:/print/templates
|
|
39
39
|
* @response `200` Success
|
|
40
40
|
*/
|
|
41
|
-
uploadTemplate(query: UploadTemplateParams, data: UploadTemplatePayload): Promise<void>;
|
|
41
|
+
uploadTemplate(query: UploadTemplateParams, data: UploadTemplatePayload | FormData): Promise<void>;
|
|
42
42
|
/**
|
|
43
43
|
* No description
|
|
44
44
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessControlListDc, AddPermissionsBody, BulkOperationResultDc, CreateProjectPayload,
|
|
1
|
+
import { AccessControlListDc, AddPermissionsBody, BulkOperationResultDc, CreateProjectPayload, DeleteResourcesParams4, ExtendedProjectLayersInfo, FileUploadResponse, GetProjectsListParams, IListResponse, ListResponseProjectInfoDc, ResourceDependenciesDc, SetPermissionsBatchBody, SetPermissionsBody, SetPreviewBody, UpdateProjectPayload } 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` Success
|
|
51
51
|
*/
|
|
52
|
-
deleteResources(query:
|
|
52
|
+
deleteResources(query: DeleteResourcesParams4): Promise<BulkOperationResultDc[]>;
|
|
53
53
|
/**
|
|
54
54
|
* No description
|
|
55
55
|
*
|
|
@@ -27,7 +27,7 @@ export declare class S3Service extends Service {
|
|
|
27
27
|
* @request POST:/storages/{storageName}/objects
|
|
28
28
|
* @response `200` Success
|
|
29
29
|
*/
|
|
30
|
-
createResource(storageName: string, data: CreateResourcePayload): Promise<void>;
|
|
30
|
+
createResource(storageName: string, data: CreateResourcePayload | FormData): Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* No description
|
|
33
33
|
*
|
|
@@ -27,7 +27,7 @@ export declare class StaticContentService extends Service {
|
|
|
27
27
|
* @request POST:/upload/file
|
|
28
28
|
* @response `200` Success
|
|
29
29
|
*/
|
|
30
|
-
uploadFile(data: UploadFilePayload): Promise<FileUploadResponse>;
|
|
30
|
+
uploadFile(data: UploadFilePayload | FormData): Promise<FileUploadResponse>;
|
|
31
31
|
/**
|
|
32
32
|
* No description
|
|
33
33
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassifyDc,
|
|
1
|
+
import { ClassifyDc, ClassifyParams2, StatisticsDbParams, StatisticsDc, SumOfProductParams } from './data-contracts';
|
|
2
2
|
import { Service } from './Service';
|
|
3
3
|
/**
|
|
4
4
|
* @title Spatial Processing Core API
|
|
@@ -27,7 +27,7 @@ export declare class StatisticService extends Service {
|
|
|
27
27
|
* @request GET:/statistics/classify
|
|
28
28
|
* @response `200` Success
|
|
29
29
|
*/
|
|
30
|
-
classify(query:
|
|
30
|
+
classify(query: ClassifyParams2): Promise<ClassifyDc>;
|
|
31
31
|
/**
|
|
32
32
|
* No description
|
|
33
33
|
*
|
|
@@ -60,7 +60,7 @@ export declare class StyleService extends Service {
|
|
|
60
60
|
* @request POST:/styles/fonts
|
|
61
61
|
* @response `200` Success
|
|
62
62
|
*/
|
|
63
|
-
addFont(data: AddFontPayload): Promise<void>;
|
|
63
|
+
addFont(data: AddFontPayload | FormData): Promise<void>;
|
|
64
64
|
/**
|
|
65
65
|
* No description
|
|
66
66
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessControlListDc, AddPermissionsInput, BulkOperationResultDc, CreateTablePayload,
|
|
1
|
+
import { AccessControlListDc, AddPermissionsInput, BulkOperationResultDc, CreateTablePayload, DeleteResourcesParams10, DeleteTableDataParams, FileUploadResponse, GetTableDataParams, GetTableListParams, GetUniqueDataRowsParams, IListResponse, ListResponseIEnumerable1, MapRemoteTableParams, MapRemoteTablePayload, MapTableParams, MapTablePayload, MapViewParams, MapViewPayload, ResourceDependenciesDc, SetPermissionsBatchInput, SetPermissionsInput, SetPreviewInput, TableListDc, UpdateTableDataParams, UpdateTableDataPayload, UpdateTablePayload, 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` Success
|
|
51
51
|
*/
|
|
52
|
-
deleteResources(query:
|
|
52
|
+
deleteResources(query: DeleteResourcesParams10): 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` Success
|
|
18
18
|
*/
|
|
19
|
-
getCapabilities(query:
|
|
19
|
+
getCapabilities(query: GetCapabilitiesParams2): Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* No description
|
|
22
22
|
*
|
|
@@ -2277,12 +2277,25 @@ export interface ImportDataSchema {
|
|
|
2277
2277
|
/** Importing file type. */
|
|
2278
2278
|
type: string;
|
|
2279
2279
|
}
|
|
2280
|
+
/**
|
|
2281
|
+
* Data schema of a file for import.
|
|
2282
|
+
*/
|
|
2283
|
+
export interface ImportFileFeaturesCountDc {
|
|
2284
|
+
/** Name of the layer. */
|
|
2285
|
+
name?: string;
|
|
2286
|
+
/** Id of the file in the temporary static storage. */
|
|
2287
|
+
fileId: string;
|
|
2288
|
+
/** Condition. */
|
|
2289
|
+
condition?: string;
|
|
2290
|
+
}
|
|
2280
2291
|
/**
|
|
2281
2292
|
* Schema of a layer in an imported file.
|
|
2282
2293
|
*/
|
|
2283
2294
|
export interface ImportLayerDataSchema {
|
|
2284
2295
|
/** Name of the layer. */
|
|
2285
2296
|
name: string;
|
|
2297
|
+
/** First feature in the layer. */
|
|
2298
|
+
firstRow?: Record<string, any>;
|
|
2286
2299
|
/**
|
|
2287
2300
|
* Number of objects in the layer.
|
|
2288
2301
|
* @format int64
|
|
@@ -5760,18 +5773,10 @@ export interface GetDataSchemaParams {
|
|
|
5760
5773
|
/** File id. */
|
|
5761
5774
|
fileId?: string;
|
|
5762
5775
|
}
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
export interface GetCsvDataSchemaParams {
|
|
5768
|
-
/** Id of the csv file in the temporary static storage. */
|
|
5769
|
-
fileId?: string;
|
|
5770
|
-
}
|
|
5771
|
-
export interface GetKmlDataSchemaParams {
|
|
5772
|
-
/** Id of the kml file in the temporary static storage. */
|
|
5773
|
-
fileId?: string;
|
|
5774
|
-
}
|
|
5776
|
+
/**
|
|
5777
|
+
* Data schema of a file for import.
|
|
5778
|
+
*/
|
|
5779
|
+
export declare type GetFeaturesCountPayload = ImportFileFeaturesCountDc;
|
|
5775
5780
|
export interface GetRasterAttributesParams {
|
|
5776
5781
|
/** File name in the temporary static storage. */
|
|
5777
5782
|
fileName?: string;
|
|
@@ -6367,7 +6372,7 @@ export interface GetProjectsListParams {
|
|
|
6367
6372
|
*/
|
|
6368
6373
|
export declare type CreateProjectPayload = ExtendedProjectInfoDc | ResourceInfoDc | ProjectInfoDc;
|
|
6369
6374
|
export declare type SetPermissionsBatchBody = ResourceAclDc[];
|
|
6370
|
-
export interface
|
|
6375
|
+
export interface DeleteResourcesParams4 {
|
|
6371
6376
|
/** Resource names. */
|
|
6372
6377
|
names?: string[];
|
|
6373
6378
|
}
|
|
@@ -6559,7 +6564,7 @@ export interface StatisticsDbParams {
|
|
|
6559
6564
|
/** Type of required statistic function. */
|
|
6560
6565
|
types?: AggregationFunction[];
|
|
6561
6566
|
}
|
|
6562
|
-
export interface
|
|
6567
|
+
export interface ClassifyParams2 {
|
|
6563
6568
|
/** Layer name. */
|
|
6564
6569
|
name?: string;
|
|
6565
6570
|
/** Attribute name. */
|
|
@@ -6664,7 +6669,7 @@ export interface GetTableListParams {
|
|
|
6664
6669
|
*/
|
|
6665
6670
|
export declare type CreateTablePayload = DetailedTableInfoDc | ResourceInfoDc | TableInfoDc;
|
|
6666
6671
|
export declare type SetPermissionsBatchInput = ResourceAclDc[];
|
|
6667
|
-
export interface
|
|
6672
|
+
export interface DeleteResourcesParams10 {
|
|
6668
6673
|
/** Resource names. */
|
|
6669
6674
|
names?: string[];
|
|
6670
6675
|
}
|
|
@@ -6769,7 +6774,7 @@ export interface GetCapabilitiesParams {
|
|
|
6769
6774
|
/** When omitted or not supported by server, server shall return service metadata document using the MIME type "text/xml". */
|
|
6770
6775
|
AcceptFormats?: string[];
|
|
6771
6776
|
}
|
|
6772
|
-
export interface
|
|
6777
|
+
export interface GetCapabilitiesParams2 {
|
|
6773
6778
|
/** Output format of service metadata. */
|
|
6774
6779
|
Format?: string;
|
|
6775
6780
|
/** Must be WMS. */
|
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
+
var eventEmitter = require('@evergis/event-emitter');
|
|
8
|
+
var signalr = require('@microsoft/signalr');
|
|
7
9
|
var ky = require('ky');
|
|
8
10
|
var ky__default = _interopDefault(ky);
|
|
9
|
-
var eventEmitter = require('@evergis/event-emitter');
|
|
10
11
|
var queryString = require('query-string');
|
|
11
12
|
var nanoid = require('nanoid');
|
|
12
13
|
var DomPainter = require('@evergis/sgis/es/painters/DomPainter/DomPainter');
|
|
@@ -179,6 +180,124 @@ function _get(target, property, receiver) {
|
|
|
179
180
|
return _get(target, property, receiver || target);
|
|
180
181
|
}
|
|
181
182
|
|
|
183
|
+
let HttpClient = /*#__PURE__*/function () {
|
|
184
|
+
function HttpClient(options) {
|
|
185
|
+
var _options$prefixUrl;
|
|
186
|
+
|
|
187
|
+
if (options === void 0) {
|
|
188
|
+
options = {};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
_classCallCheck(this, HttpClient);
|
|
192
|
+
|
|
193
|
+
this.ky = ky__default.extend(options);
|
|
194
|
+
this.prefixUrl = ((_options$prefixUrl = options.prefixUrl) == null ? void 0 : _options$prefixUrl.toString()) || '';
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
_createClass(HttpClient, [{
|
|
198
|
+
key: "extend",
|
|
199
|
+
value: function extend(options) {
|
|
200
|
+
var _options$prefixUrl2;
|
|
201
|
+
|
|
202
|
+
this.ky = ky__default.extend(options);
|
|
203
|
+
this.prefixUrl = ((_options$prefixUrl2 = options.prefixUrl) == null ? void 0 : _options$prefixUrl2.toString()) || '';
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
key: "get",
|
|
207
|
+
value: function get(url, params) {
|
|
208
|
+
return this.ky.get(this.stripSlashes(url), {
|
|
209
|
+
searchParams: qs(params)
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
key: "post",
|
|
214
|
+
value: function post(url, body, params) {
|
|
215
|
+
const options = kyOptions(params, body);
|
|
216
|
+
return this.ky.post(this.stripSlashes(url), options);
|
|
217
|
+
}
|
|
218
|
+
}, {
|
|
219
|
+
key: "put",
|
|
220
|
+
value: function put(url, body, params) {
|
|
221
|
+
const options = kyOptions(params, body);
|
|
222
|
+
return this.ky.put(this.stripSlashes(url), options);
|
|
223
|
+
}
|
|
224
|
+
}, {
|
|
225
|
+
key: "patch",
|
|
226
|
+
value: function patch(url, body, params) {
|
|
227
|
+
const options = kyOptions(params, body);
|
|
228
|
+
return this.ky.patch(this.stripSlashes(url), options);
|
|
229
|
+
}
|
|
230
|
+
}, {
|
|
231
|
+
key: "delete",
|
|
232
|
+
value: function _delete(url, body, params) {
|
|
233
|
+
const options = kyOptions(params, body);
|
|
234
|
+
return this.ky.delete(this.stripSlashes(url), options);
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
key: "createUrl",
|
|
238
|
+
value: function createUrl(url, params) {
|
|
239
|
+
const queryString = params ? "?" + qs(params) : '';
|
|
240
|
+
return this.prefixUrl + this.stripSlashes(url) + queryString;
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "stripSlashes",
|
|
244
|
+
value: function stripSlashes(url) {
|
|
245
|
+
if (this.prefixUrl) {
|
|
246
|
+
return url.replace(/^\//g, '');
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
return url;
|
|
250
|
+
}
|
|
251
|
+
}]);
|
|
252
|
+
|
|
253
|
+
return HttpClient;
|
|
254
|
+
}();
|
|
255
|
+
|
|
256
|
+
function kyOptions(params, body) {
|
|
257
|
+
const options = {
|
|
258
|
+
searchParams: qs(params)
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
if (!isNotObject(body) || Array.isArray(body)) {
|
|
262
|
+
options.json = body;
|
|
263
|
+
} else {
|
|
264
|
+
options.body = body;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return options;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function isNotObject(value) {
|
|
271
|
+
return !(value !== void 0 && typeof value === 'object' && value !== null && value.constructor === Object);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function qs(params) {
|
|
275
|
+
if (params === void 0) {
|
|
276
|
+
params = {};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return queryString.stringify(params, {
|
|
280
|
+
arrayFormat: 'comma'
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function toFormData(input) {
|
|
285
|
+
if (input instanceof FormData) {
|
|
286
|
+
return input;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return Object.keys(input).reduce((data, key) => {
|
|
290
|
+
data.append(key, input[key]);
|
|
291
|
+
return data;
|
|
292
|
+
}, new FormData());
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
(function (ApiEvent) {
|
|
296
|
+
ApiEvent["ConnectionLost"] = "ConnectionLost";
|
|
297
|
+
ApiEvent["Unauthorized"] = "Unauthorized";
|
|
298
|
+
ApiEvent["SessionClosed"] = "SessionClosed";
|
|
299
|
+
})(exports.ApiEvent || (exports.ApiEvent = {}));
|
|
300
|
+
|
|
182
301
|
/* eslint-disable */
|
|
183
302
|
|
|
184
303
|
/* tslint:disable */
|
|
@@ -401,114 +520,6 @@ let Security = /*#__PURE__*/function (_SecurityService) {
|
|
|
401
520
|
return Security;
|
|
402
521
|
}(SecurityService);
|
|
403
522
|
|
|
404
|
-
let HttpClient = /*#__PURE__*/function () {
|
|
405
|
-
function HttpClient(options) {
|
|
406
|
-
var _options$prefixUrl;
|
|
407
|
-
|
|
408
|
-
if (options === void 0) {
|
|
409
|
-
options = {};
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
_classCallCheck(this, HttpClient);
|
|
413
|
-
|
|
414
|
-
this.ky = ky__default.extend(options);
|
|
415
|
-
this.prefixUrl = ((_options$prefixUrl = options.prefixUrl) == null ? void 0 : _options$prefixUrl.toString()) || '';
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
_createClass(HttpClient, [{
|
|
419
|
-
key: "extend",
|
|
420
|
-
value: function extend(options) {
|
|
421
|
-
var _options$prefixUrl2;
|
|
422
|
-
|
|
423
|
-
this.ky = ky__default.extend(options);
|
|
424
|
-
this.prefixUrl = ((_options$prefixUrl2 = options.prefixUrl) == null ? void 0 : _options$prefixUrl2.toString()) || '';
|
|
425
|
-
}
|
|
426
|
-
}, {
|
|
427
|
-
key: "get",
|
|
428
|
-
value: function get(url, params) {
|
|
429
|
-
return this.ky.get(this.stripSlashes(url), {
|
|
430
|
-
searchParams: qs(params)
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
}, {
|
|
434
|
-
key: "post",
|
|
435
|
-
value: function post(url, body, params) {
|
|
436
|
-
const options = kyOptions(params, body);
|
|
437
|
-
return this.ky.post(this.stripSlashes(url), options);
|
|
438
|
-
}
|
|
439
|
-
}, {
|
|
440
|
-
key: "put",
|
|
441
|
-
value: function put(url, body, params) {
|
|
442
|
-
const options = kyOptions(params, body);
|
|
443
|
-
return this.ky.put(this.stripSlashes(url), options);
|
|
444
|
-
}
|
|
445
|
-
}, {
|
|
446
|
-
key: "patch",
|
|
447
|
-
value: function patch(url, body, params) {
|
|
448
|
-
const options = kyOptions(params, body);
|
|
449
|
-
return this.ky.patch(this.stripSlashes(url), options);
|
|
450
|
-
}
|
|
451
|
-
}, {
|
|
452
|
-
key: "delete",
|
|
453
|
-
value: function _delete(url, body, params) {
|
|
454
|
-
const options = kyOptions(params, body);
|
|
455
|
-
return this.ky.delete(this.stripSlashes(url), options);
|
|
456
|
-
}
|
|
457
|
-
}, {
|
|
458
|
-
key: "createUrl",
|
|
459
|
-
value: function createUrl(url, params) {
|
|
460
|
-
const queryString = params ? "?" + qs(params) : '';
|
|
461
|
-
return this.prefixUrl + this.stripSlashes(url) + queryString;
|
|
462
|
-
}
|
|
463
|
-
}, {
|
|
464
|
-
key: "stripSlashes",
|
|
465
|
-
value: function stripSlashes(url) {
|
|
466
|
-
if (this.prefixUrl) {
|
|
467
|
-
return url.replace(/^\//g, '');
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
return url;
|
|
471
|
-
}
|
|
472
|
-
}]);
|
|
473
|
-
|
|
474
|
-
return HttpClient;
|
|
475
|
-
}();
|
|
476
|
-
|
|
477
|
-
function kyOptions(params, body) {
|
|
478
|
-
const options = {
|
|
479
|
-
searchParams: qs(params)
|
|
480
|
-
};
|
|
481
|
-
|
|
482
|
-
if (!isNotObject(body) || Array.isArray(body)) {
|
|
483
|
-
options.json = body;
|
|
484
|
-
} else {
|
|
485
|
-
options.body = body;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
return options;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
function isNotObject(value) {
|
|
492
|
-
return !(value !== void 0 && typeof value === 'object' && value !== null && value.constructor === Object);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
function qs(params) {
|
|
496
|
-
if (params === void 0) {
|
|
497
|
-
params = {};
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
return queryString.stringify(params, {
|
|
501
|
-
arrayFormat: 'comma'
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
function toFormData(input) {
|
|
506
|
-
return Object.keys(input).reduce((data, key) => {
|
|
507
|
-
data.append(key, input[key]);
|
|
508
|
-
return data;
|
|
509
|
-
}, new FormData());
|
|
510
|
-
}
|
|
511
|
-
|
|
512
523
|
/**
|
|
513
524
|
* @title Spatial Processing Core API
|
|
514
525
|
* @version v0.6.0
|
|
@@ -640,49 +651,17 @@ let ImportService = /*#__PURE__*/function (_Service) {
|
|
|
640
651
|
* No description
|
|
641
652
|
*
|
|
642
653
|
* @tags ImportService
|
|
643
|
-
* @name
|
|
644
|
-
* @operationId
|
|
645
|
-
* @summary
|
|
646
|
-
* @request
|
|
647
|
-
* @response `200` Success
|
|
648
|
-
*/
|
|
649
|
-
|
|
650
|
-
}, {
|
|
651
|
-
key: "getExcelDataSchema",
|
|
652
|
-
value: function getExcelDataSchema(query) {
|
|
653
|
-
return this.http.get("/import/excelDataSchema", query).json();
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* No description
|
|
657
|
-
*
|
|
658
|
-
* @tags ImportService
|
|
659
|
-
* @name GetCsvDataSchema
|
|
660
|
-
* @operationId ImportServiceController_GetCsvDataSchema
|
|
661
|
-
* @summary Using a file uploaded to the file upload service, reads the headers of the csv file and returns the information about data schema of all layers in that file, available for import.
|
|
662
|
-
* @request GET:/import/csvDataSchema
|
|
654
|
+
* @name GetFeaturesCount
|
|
655
|
+
* @operationId ImportServiceController_GetFeaturesCount
|
|
656
|
+
* @summary Returns the features count of the given file in temporary static storage.
|
|
657
|
+
* @request POST:/import/count
|
|
663
658
|
* @response `200` Success
|
|
664
659
|
*/
|
|
665
660
|
|
|
666
661
|
}, {
|
|
667
|
-
key: "
|
|
668
|
-
value: function
|
|
669
|
-
return this.http.
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* No description
|
|
673
|
-
*
|
|
674
|
-
* @tags ImportService
|
|
675
|
-
* @name GetKmlDataSchema
|
|
676
|
-
* @operationId ImportServiceController_GetKmlDataSchema
|
|
677
|
-
* @summary Using a file uploaded to the file upload service, reads the kml file and returns the information about data schema of all layers in that file, available for import.
|
|
678
|
-
* @request GET:/import/kmlDataSchema
|
|
679
|
-
* @response `200` Success
|
|
680
|
-
*/
|
|
681
|
-
|
|
682
|
-
}, {
|
|
683
|
-
key: "getKmlDataSchema",
|
|
684
|
-
value: function getKmlDataSchema(query) {
|
|
685
|
-
return this.http.get("/import/kmlDataSchema", query).json();
|
|
662
|
+
key: "getFeaturesCount",
|
|
663
|
+
value: function getFeaturesCount(data) {
|
|
664
|
+
return this.http.post("/import/count", data).json();
|
|
686
665
|
}
|
|
687
666
|
/**
|
|
688
667
|
* No description
|
|
@@ -5787,12 +5766,6 @@ let Print = /*#__PURE__*/function (_PrintService) {
|
|
|
5787
5766
|
return _createClass(Print);
|
|
5788
5767
|
}(PrintService);
|
|
5789
5768
|
|
|
5790
|
-
(function (ApiEvent) {
|
|
5791
|
-
ApiEvent["ConnectionLost"] = "ConnectionLost";
|
|
5792
|
-
ApiEvent["Unauthorized"] = "Unauthorized";
|
|
5793
|
-
ApiEvent["SessionClosed"] = "SessionClosed";
|
|
5794
|
-
})(exports.ApiEvent || (exports.ApiEvent = {}));
|
|
5795
|
-
|
|
5796
5769
|
(function (UrlPath) {
|
|
5797
5770
|
UrlPath["Base"] = "/map";
|
|
5798
5771
|
UrlPath["Shared"] = "/shared";
|
|
@@ -5815,6 +5788,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5815
5788
|
let {
|
|
5816
5789
|
url,
|
|
5817
5790
|
wsUrl,
|
|
5791
|
+
snappingHubUrl,
|
|
5818
5792
|
http,
|
|
5819
5793
|
urlPath,
|
|
5820
5794
|
httpOptions
|
|
@@ -5874,6 +5848,9 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5874
5848
|
_this.names = new Names({
|
|
5875
5849
|
account: _this.account
|
|
5876
5850
|
});
|
|
5851
|
+
_this.snappingHub = snappingHubUrl ? new signalr.HubConnectionBuilder().withUrl(snappingHubUrl, {
|
|
5852
|
+
withCredentials: true
|
|
5853
|
+
}).withAutomaticReconnect().build() : null;
|
|
5877
5854
|
return _this;
|
|
5878
5855
|
}
|
|
5879
5856
|
|
|
@@ -5946,6 +5923,13 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5946
5923
|
});
|
|
5947
5924
|
}
|
|
5948
5925
|
}
|
|
5926
|
+
}, {
|
|
5927
|
+
key: "connectSignalR",
|
|
5928
|
+
value: async function connectSignalR() {
|
|
5929
|
+
if (this.account.isAuth && this.snappingHub && this.snappingHub.state !== signalr.HubConnectionState.Connected) {
|
|
5930
|
+
await this.snappingHub.start();
|
|
5931
|
+
}
|
|
5932
|
+
}
|
|
5949
5933
|
}, {
|
|
5950
5934
|
key: "logout",
|
|
5951
5935
|
value: async function logout() {
|