@evergis/api 3.0.81 → 3.0.84
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 +5 -5
- package/dist/__generated__/LayersService.d.ts +1 -1
- package/dist/__generated__/ProjectsService.d.ts +3 -3
- package/dist/__generated__/StatisticService.d.ts +2 -2
- package/dist/__generated__/TablesService.d.ts +3 -3
- package/dist/__generated__/WmsServerService.d.ts +2 -2
- package/dist/__generated__/data-contracts.d.ts +15 -27
- package/dist/api.cjs.development.js +120 -125
- 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 +123 -128
- package/dist/api.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/Api.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { EventEmitter } from '@evergis/event-emitter';
|
|
1
2
|
import { HubConnection } from '@microsoft/signalr';
|
|
2
3
|
import { Options as KyOptions } from 'ky';
|
|
3
|
-
import { EventEmitter } from '@evergis/event-emitter';
|
|
4
|
-
import { Account, External, ClientSettings, PortalSettings, FileUpload, General, Geocode, Import, Layers, Names, Namespace, Notification, Projects, ResourceCatalog, Resources, Scheduler, Security, Styles, Tables, Tools, AccountPreview, BulkOperations, IceRouter, Statistic, Feedback } from './services';
|
|
5
|
-
import { Print } from './services/Print';
|
|
6
|
-
import { HttpClient } from './__generated__/HttpClient';
|
|
7
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';
|
|
8
8
|
export declare type ApiParams = {
|
|
9
9
|
url: string;
|
|
10
10
|
wsUrl?: string;
|
|
@@ -53,7 +53,7 @@ export declare class Api extends EventEmitter {
|
|
|
53
53
|
readonly feedback: Feedback;
|
|
54
54
|
readonly snappingHub: HubConnection | null;
|
|
55
55
|
constructor({ url, wsUrl, snappingHubUrl, http, urlPath, httpOptions }: ApiParams);
|
|
56
|
-
init({ authParams, connectWs,
|
|
56
|
+
init({ authParams, connectWs, initScheduler, fetchSettings, fetchUser, }: {
|
|
57
57
|
authParams?: LoginDc;
|
|
58
58
|
connectWs?: boolean;
|
|
59
59
|
connectSignalR?: boolean;
|
|
@@ -490,7 +490,7 @@ export declare class LayersService extends Service {
|
|
|
490
490
|
* @request POST:/layers/{name}/preview
|
|
491
491
|
* @response `200` Success
|
|
492
492
|
*/
|
|
493
|
-
setPreview(name: string, data: SetPreviewPayload): Promise<FileUploadResponse>;
|
|
493
|
+
setPreview(name: string, data: SetPreviewPayload | FormData): Promise<FileUploadResponse>;
|
|
494
494
|
/**
|
|
495
495
|
* No description
|
|
496
496
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessControlListDc, AddPermissionsBody, BulkOperationResultDc, CreateProjectPayload,
|
|
1
|
+
import { AccessControlListDc, AddPermissionsBody, BulkOperationResultDc, CreateProjectPayload, DeleteResourcesParams7, 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: DeleteResourcesParams7): Promise<BulkOperationResultDc[]>;
|
|
53
53
|
/**
|
|
54
54
|
* No description
|
|
55
55
|
*
|
|
@@ -115,7 +115,7 @@ export declare class ProjectsService extends Service {
|
|
|
115
115
|
* @request POST:/projects/{name}/preview
|
|
116
116
|
* @response `200` Success
|
|
117
117
|
*/
|
|
118
|
-
setPreview(name: string, data: SetPreviewBody): Promise<FileUploadResponse>;
|
|
118
|
+
setPreview(name: string, data: SetPreviewBody | FormData): Promise<FileUploadResponse>;
|
|
119
119
|
/**
|
|
120
120
|
* No description
|
|
121
121
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassifyDc,
|
|
1
|
+
import { ClassifyDc, ClassifyParams5, 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: ClassifyParams5): Promise<ClassifyDc>;
|
|
31
31
|
/**
|
|
32
32
|
* No description
|
|
33
33
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessControlListDc, AddPermissionsInput, BulkOperationResultDc, CreateTablePayload,
|
|
1
|
+
import { AccessControlListDc, AddPermissionsInput, BulkOperationResultDc, CreateTablePayload, DeleteResourcesParams3, 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: DeleteResourcesParams3): Promise<BulkOperationResultDc[]>;
|
|
53
53
|
/**
|
|
54
54
|
* No description
|
|
55
55
|
*
|
|
@@ -203,7 +203,7 @@ export declare class TablesService extends Service {
|
|
|
203
203
|
* @request POST:/tables/{name}/preview
|
|
204
204
|
* @response `200` Success
|
|
205
205
|
*/
|
|
206
|
-
setPreview(name: string, data: SetPreviewInput): Promise<FileUploadResponse>;
|
|
206
|
+
setPreview(name: string, data: SetPreviewInput | FormData): Promise<FileUploadResponse>;
|
|
207
207
|
/**
|
|
208
208
|
* No description
|
|
209
209
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetCapabilities1Params,
|
|
1
|
+
import { GetCapabilities1Params, GetCapabilitiesParams7, 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: GetCapabilitiesParams7): Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* No description
|
|
22
22
|
*
|
|
@@ -1933,7 +1933,10 @@ export interface GeocodeResultDc {
|
|
|
1933
1933
|
* @format double
|
|
1934
1934
|
*/
|
|
1935
1935
|
score?: number;
|
|
1936
|
-
geometry
|
|
1936
|
+
/** Result geometry. */
|
|
1937
|
+
center?: PositionDc;
|
|
1938
|
+
/** Result geometry. */
|
|
1939
|
+
geometry?: GeometryDc;
|
|
1937
1940
|
}
|
|
1938
1941
|
/**
|
|
1939
1942
|
* Geocode suggest result.
|
|
@@ -2108,27 +2111,6 @@ export interface IEnvelopeGeometry {
|
|
|
2108
2111
|
sr?: ISpatialReference;
|
|
2109
2112
|
envelope?: IEnvelopeGeometry;
|
|
2110
2113
|
}
|
|
2111
|
-
export interface IGeometry {
|
|
2112
|
-
centroid?: IVector;
|
|
2113
|
-
/**
|
|
2114
|
-
*
|
|
2115
|
-
*
|
|
2116
|
-
* unknown
|
|
2117
|
-
*
|
|
2118
|
-
* point
|
|
2119
|
-
*
|
|
2120
|
-
* polyline
|
|
2121
|
-
*
|
|
2122
|
-
* polygon
|
|
2123
|
-
*
|
|
2124
|
-
* envelope
|
|
2125
|
-
*
|
|
2126
|
-
* multipoint
|
|
2127
|
-
*/
|
|
2128
|
-
geometryType?: GeometryType;
|
|
2129
|
-
sr?: ISpatialReference;
|
|
2130
|
-
envelope?: IEnvelopeGeometry;
|
|
2131
|
-
}
|
|
2132
2114
|
export interface ILineEndingDc {
|
|
2133
2115
|
/** Type of the line ending. */
|
|
2134
2116
|
type?: LineEndingType;
|
|
@@ -2786,6 +2768,8 @@ export interface MapRemoteTableInfoDc {
|
|
|
2786
2768
|
dataProvider: string;
|
|
2787
2769
|
/** Name of the table, materialized view or view. */
|
|
2788
2770
|
name: string;
|
|
2771
|
+
/** Owner of the table. */
|
|
2772
|
+
owner: string;
|
|
2789
2773
|
/** Create datasource alias. */
|
|
2790
2774
|
alias?: string;
|
|
2791
2775
|
/** Create datasource description. */
|
|
@@ -2798,6 +2782,8 @@ export interface MapRemoteTableInfoDc {
|
|
|
2798
2782
|
export interface MapTableInfoDc {
|
|
2799
2783
|
/** Name of the table, materialized view or view. */
|
|
2800
2784
|
name: string;
|
|
2785
|
+
/** Owner of the table. */
|
|
2786
|
+
owner: string;
|
|
2801
2787
|
/** Create datasource alias. */
|
|
2802
2788
|
alias?: string;
|
|
2803
2789
|
/** Create datasource description. */
|
|
@@ -2809,6 +2795,8 @@ export interface MapTableInfoDc {
|
|
|
2809
2795
|
export interface MapViewInfoDc {
|
|
2810
2796
|
/** Name of the table, materialized view or view. */
|
|
2811
2797
|
name: string;
|
|
2798
|
+
/** Owner of the table. */
|
|
2799
|
+
owner: string;
|
|
2812
2800
|
/** Create datasource alias. */
|
|
2813
2801
|
alias?: string;
|
|
2814
2802
|
/** Create datasource description. */
|
|
@@ -6042,7 +6030,7 @@ export interface GetLayerImageParams {
|
|
|
6042
6030
|
}
|
|
6043
6031
|
export interface GetLayerExtentParams {
|
|
6044
6032
|
/** If set, only the features that satisfy the condition will be considered when calculating the extent. */
|
|
6045
|
-
|
|
6033
|
+
condition?: string;
|
|
6046
6034
|
/**
|
|
6047
6035
|
* Spatial reference to return the extent in.
|
|
6048
6036
|
* @format int32
|
|
@@ -6372,7 +6360,7 @@ export interface GetProjectsListParams {
|
|
|
6372
6360
|
*/
|
|
6373
6361
|
export declare type CreateProjectPayload = ExtendedProjectInfoDc | ResourceInfoDc | ProjectInfoDc;
|
|
6374
6362
|
export declare type SetPermissionsBatchBody = ResourceAclDc[];
|
|
6375
|
-
export interface
|
|
6363
|
+
export interface DeleteResourcesParams7 {
|
|
6376
6364
|
/** Resource names. */
|
|
6377
6365
|
names?: string[];
|
|
6378
6366
|
}
|
|
@@ -6564,7 +6552,7 @@ export interface StatisticsDbParams {
|
|
|
6564
6552
|
/** Type of required statistic function. */
|
|
6565
6553
|
types?: AggregationFunction[];
|
|
6566
6554
|
}
|
|
6567
|
-
export interface
|
|
6555
|
+
export interface ClassifyParams5 {
|
|
6568
6556
|
/** Layer name. */
|
|
6569
6557
|
name?: string;
|
|
6570
6558
|
/** Attribute name. */
|
|
@@ -6669,7 +6657,7 @@ export interface GetTableListParams {
|
|
|
6669
6657
|
*/
|
|
6670
6658
|
export declare type CreateTablePayload = DetailedTableInfoDc | ResourceInfoDc | TableInfoDc;
|
|
6671
6659
|
export declare type SetPermissionsBatchInput = ResourceAclDc[];
|
|
6672
|
-
export interface
|
|
6660
|
+
export interface DeleteResourcesParams3 {
|
|
6673
6661
|
/** Resource names. */
|
|
6674
6662
|
names?: string[];
|
|
6675
6663
|
}
|
|
@@ -6774,7 +6762,7 @@ export interface GetCapabilitiesParams {
|
|
|
6774
6762
|
/** When omitted or not supported by server, server shall return service metadata document using the MIME type "text/xml". */
|
|
6775
6763
|
AcceptFormats?: string[];
|
|
6776
6764
|
}
|
|
6777
|
-
export interface
|
|
6765
|
+
export interface GetCapabilitiesParams7 {
|
|
6778
6766
|
/** Output format of service metadata. */
|
|
6779
6767
|
Format?: string;
|
|
6780
6768
|
/** Must be WMS. */
|
|
@@ -4,10 +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');
|
|
7
8
|
var signalr = require('@microsoft/signalr');
|
|
8
9
|
var ky = require('ky');
|
|
9
10
|
var ky__default = _interopDefault(ky);
|
|
10
|
-
var eventEmitter = require('@evergis/event-emitter');
|
|
11
11
|
var queryString = require('query-string');
|
|
12
12
|
var nanoid = require('nanoid');
|
|
13
13
|
var DomPainter = require('@evergis/sgis/es/painters/DomPainter/DomPainter');
|
|
@@ -180,6 +180,124 @@ function _get(target, property, receiver) {
|
|
|
180
180
|
return _get(target, property, receiver || target);
|
|
181
181
|
}
|
|
182
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
|
+
|
|
183
301
|
/* eslint-disable */
|
|
184
302
|
|
|
185
303
|
/* tslint:disable */
|
|
@@ -402,118 +520,6 @@ let Security = /*#__PURE__*/function (_SecurityService) {
|
|
|
402
520
|
return Security;
|
|
403
521
|
}(SecurityService);
|
|
404
522
|
|
|
405
|
-
let HttpClient = /*#__PURE__*/function () {
|
|
406
|
-
function HttpClient(options) {
|
|
407
|
-
var _options$prefixUrl;
|
|
408
|
-
|
|
409
|
-
if (options === void 0) {
|
|
410
|
-
options = {};
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
_classCallCheck(this, HttpClient);
|
|
414
|
-
|
|
415
|
-
this.ky = ky__default.extend(options);
|
|
416
|
-
this.prefixUrl = ((_options$prefixUrl = options.prefixUrl) == null ? void 0 : _options$prefixUrl.toString()) || '';
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
_createClass(HttpClient, [{
|
|
420
|
-
key: "extend",
|
|
421
|
-
value: function extend(options) {
|
|
422
|
-
var _options$prefixUrl2;
|
|
423
|
-
|
|
424
|
-
this.ky = ky__default.extend(options);
|
|
425
|
-
this.prefixUrl = ((_options$prefixUrl2 = options.prefixUrl) == null ? void 0 : _options$prefixUrl2.toString()) || '';
|
|
426
|
-
}
|
|
427
|
-
}, {
|
|
428
|
-
key: "get",
|
|
429
|
-
value: function get(url, params) {
|
|
430
|
-
return this.ky.get(this.stripSlashes(url), {
|
|
431
|
-
searchParams: qs(params)
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
}, {
|
|
435
|
-
key: "post",
|
|
436
|
-
value: function post(url, body, params) {
|
|
437
|
-
const options = kyOptions(params, body);
|
|
438
|
-
return this.ky.post(this.stripSlashes(url), options);
|
|
439
|
-
}
|
|
440
|
-
}, {
|
|
441
|
-
key: "put",
|
|
442
|
-
value: function put(url, body, params) {
|
|
443
|
-
const options = kyOptions(params, body);
|
|
444
|
-
return this.ky.put(this.stripSlashes(url), options);
|
|
445
|
-
}
|
|
446
|
-
}, {
|
|
447
|
-
key: "patch",
|
|
448
|
-
value: function patch(url, body, params) {
|
|
449
|
-
const options = kyOptions(params, body);
|
|
450
|
-
return this.ky.patch(this.stripSlashes(url), options);
|
|
451
|
-
}
|
|
452
|
-
}, {
|
|
453
|
-
key: "delete",
|
|
454
|
-
value: function _delete(url, body, params) {
|
|
455
|
-
const options = kyOptions(params, body);
|
|
456
|
-
return this.ky.delete(this.stripSlashes(url), options);
|
|
457
|
-
}
|
|
458
|
-
}, {
|
|
459
|
-
key: "createUrl",
|
|
460
|
-
value: function createUrl(url, params) {
|
|
461
|
-
const queryString = params ? "?" + qs(params) : '';
|
|
462
|
-
return this.prefixUrl + this.stripSlashes(url) + queryString;
|
|
463
|
-
}
|
|
464
|
-
}, {
|
|
465
|
-
key: "stripSlashes",
|
|
466
|
-
value: function stripSlashes(url) {
|
|
467
|
-
if (this.prefixUrl) {
|
|
468
|
-
return url.replace(/^\//g, '');
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
return url;
|
|
472
|
-
}
|
|
473
|
-
}]);
|
|
474
|
-
|
|
475
|
-
return HttpClient;
|
|
476
|
-
}();
|
|
477
|
-
|
|
478
|
-
function kyOptions(params, body) {
|
|
479
|
-
const options = {
|
|
480
|
-
searchParams: qs(params)
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
if (!isNotObject(body) || Array.isArray(body)) {
|
|
484
|
-
options.json = body;
|
|
485
|
-
} else {
|
|
486
|
-
options.body = body;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
return options;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
function isNotObject(value) {
|
|
493
|
-
return !(value !== void 0 && typeof value === 'object' && value !== null && value.constructor === Object);
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
function qs(params) {
|
|
497
|
-
if (params === void 0) {
|
|
498
|
-
params = {};
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
return queryString.stringify(params, {
|
|
502
|
-
arrayFormat: 'comma'
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
function toFormData(input) {
|
|
507
|
-
if (input instanceof FormData) {
|
|
508
|
-
return input;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
return Object.keys(input).reduce((data, key) => {
|
|
512
|
-
data.append(key, input[key]);
|
|
513
|
-
return data;
|
|
514
|
-
}, new FormData());
|
|
515
|
-
}
|
|
516
|
-
|
|
517
523
|
/**
|
|
518
524
|
* @title Spatial Processing Core API
|
|
519
525
|
* @version v0.6.0
|
|
@@ -5760,12 +5766,6 @@ let Print = /*#__PURE__*/function (_PrintService) {
|
|
|
5760
5766
|
return _createClass(Print);
|
|
5761
5767
|
}(PrintService);
|
|
5762
5768
|
|
|
5763
|
-
(function (ApiEvent) {
|
|
5764
|
-
ApiEvent["ConnectionLost"] = "ConnectionLost";
|
|
5765
|
-
ApiEvent["Unauthorized"] = "Unauthorized";
|
|
5766
|
-
ApiEvent["SessionClosed"] = "SessionClosed";
|
|
5767
|
-
})(exports.ApiEvent || (exports.ApiEvent = {}));
|
|
5768
|
-
|
|
5769
5769
|
(function (UrlPath) {
|
|
5770
5770
|
UrlPath["Base"] = "/map";
|
|
5771
5771
|
UrlPath["Shared"] = "/shared";
|
|
@@ -5860,7 +5860,6 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5860
5860
|
let {
|
|
5861
5861
|
authParams,
|
|
5862
5862
|
connectWs,
|
|
5863
|
-
connectSignalR,
|
|
5864
5863
|
initScheduler,
|
|
5865
5864
|
fetchSettings,
|
|
5866
5865
|
fetchUser
|
|
@@ -5877,10 +5876,6 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5877
5876
|
await this.connectWs();
|
|
5878
5877
|
}
|
|
5879
5878
|
|
|
5880
|
-
if (connectSignalR) {
|
|
5881
|
-
await this.connectSignalR();
|
|
5882
|
-
}
|
|
5883
|
-
|
|
5884
5879
|
if (initScheduler) {
|
|
5885
5880
|
await this.initScheduler();
|
|
5886
5881
|
}
|
|
@@ -5931,7 +5926,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5931
5926
|
}, {
|
|
5932
5927
|
key: "connectSignalR",
|
|
5933
5928
|
value: async function connectSignalR() {
|
|
5934
|
-
if (this.account.isAuth && this.snappingHub) {
|
|
5929
|
+
if (this.account.isAuth && this.snappingHub && this.snappingHub.state !== signalr.HubConnectionState.Connected) {
|
|
5935
5930
|
await this.snappingHub.start();
|
|
5936
5931
|
}
|
|
5937
5932
|
}
|