@evergis/api 5.0.48 → 5.0.49
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/LICENSE +21 -21
- package/README.md +12 -12
- package/dist/Api.d.ts +0 -4
- package/dist/__generated__/CatalogService.d.ts +20 -2
- package/dist/__generated__/data-contracts.d.ts +36 -0
- package/dist/api.esm.js +1559 -1564
- package/dist/api.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1560 -1568
- package/dist/index.js.map +1 -1
- package/dist/services/Account.d.ts +1 -1
- package/dist/services/FileUpload.d.ts +1 -1
- package/dist/services/Geocode.d.ts +1 -1
- package/dist/services/Layers.d.ts +1 -1
- package/dist/services/Projects.d.ts +1 -1
- package/dist/services/Tables.d.ts +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/utils/index.d.ts +2 -5
- package/package.json +2 -2
- package/dist/ApiEvent.d.ts +0 -5
- package/dist/__generated__/ImportService.d.ts +0 -118
- package/dist/services/Import.d.ts +0 -3
- package/dist/utils/formDataFromFile.d.ts +0 -1
- package/dist/utils/isString.d.ts +0 -1
- package/dist/utils/location.d.ts +0 -2
- package/dist/utils/stripUselessSlashes.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -14,17 +14,6 @@ const useToken = () => {
|
|
|
14
14
|
return { token, refreshToken };
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const getUserInfo = () => JSON.parse(localStorage.getItem(API_USER_INFO_KEY) || "null") || void 0;
|
|
18
|
-
const updateUserInfo = (newUserInfo) => {
|
|
19
|
-
if (newUserInfo) {
|
|
20
|
-
const oldUserInfo = getUserInfo();
|
|
21
|
-
localStorage.setItem(API_USER_INFO_KEY, JSON.stringify({ ...oldUserInfo, ...newUserInfo }));
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
localStorage.removeItem(API_USER_INFO_KEY);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
17
|
/* eslint-disable */
|
|
29
18
|
/* tslint:disable */
|
|
30
19
|
/*
|
|
@@ -729,6 +718,83 @@ class AccountService extends Service {
|
|
|
729
718
|
}
|
|
730
719
|
}
|
|
731
720
|
|
|
721
|
+
exports.ErrorReason = void 0;
|
|
722
|
+
(function (ErrorReason) {
|
|
723
|
+
/** When request has status code less than 400 */
|
|
724
|
+
ErrorReason["HTTP_OTHER"] = "other";
|
|
725
|
+
/** When request has status code in range 400 - 499 */
|
|
726
|
+
ErrorReason["HTTP_CLIENT"] = "client";
|
|
727
|
+
/** When request has status code 500 or more */
|
|
728
|
+
ErrorReason["HTTP_SERVER"] = "server";
|
|
729
|
+
/** When it's not a http bad response */
|
|
730
|
+
ErrorReason["UNKNOWN"] = "unknown";
|
|
731
|
+
})(exports.ErrorReason || (exports.ErrorReason = {}));
|
|
732
|
+
const handleBaseError = (e) => ({
|
|
733
|
+
type: "base",
|
|
734
|
+
reason: exports.ErrorReason.UNKNOWN,
|
|
735
|
+
origin: e,
|
|
736
|
+
});
|
|
737
|
+
const handleHTTPError = (e) => {
|
|
738
|
+
const status = e.response.status;
|
|
739
|
+
let reason = exports.ErrorReason.HTTP_OTHER;
|
|
740
|
+
if (status >= 400 && status < 500) {
|
|
741
|
+
reason = exports.ErrorReason.HTTP_CLIENT;
|
|
742
|
+
}
|
|
743
|
+
if (status >= 500) {
|
|
744
|
+
reason = exports.ErrorReason.HTTP_SERVER;
|
|
745
|
+
}
|
|
746
|
+
return {
|
|
747
|
+
type: "http",
|
|
748
|
+
reason,
|
|
749
|
+
status,
|
|
750
|
+
origin: e,
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
const errorHandler = (e) => {
|
|
754
|
+
if (e instanceof ky.HTTPError)
|
|
755
|
+
return handleHTTPError(e);
|
|
756
|
+
return handleBaseError(e);
|
|
757
|
+
};
|
|
758
|
+
const isHandledError = (e) => e && e.type && e.reason;
|
|
759
|
+
const isHTTPError = (e) => isHandledError(e) && e.type === "http";
|
|
760
|
+
|
|
761
|
+
const ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
762
|
+
/** Generates unique identifier */
|
|
763
|
+
const generateId = nanoid.customAlphabet(ALPHABET, 12);
|
|
764
|
+
|
|
765
|
+
const parseJwt = (token) => {
|
|
766
|
+
const base64Url = token.split(".")[1];
|
|
767
|
+
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
768
|
+
const jsonPayload = decodeURIComponent(atob(base64).split("").map((c) => (`%${("00".concat(c.charCodeAt(0).toString(16)).slice(-2))}`)).join(""));
|
|
769
|
+
return JSON.parse(jsonPayload);
|
|
770
|
+
};
|
|
771
|
+
|
|
772
|
+
async function promiseAllIgnoreErrors(promises) {
|
|
773
|
+
const results = await Promise.all(promises.map(promise => promise.catch(e => (isError(e) ? e : new Error(e)))));
|
|
774
|
+
return results.filter(notError);
|
|
775
|
+
}
|
|
776
|
+
function isError(v) {
|
|
777
|
+
return v instanceof Error;
|
|
778
|
+
}
|
|
779
|
+
function notError(v) {
|
|
780
|
+
return !isError(v);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
function unique(value, index, array) {
|
|
784
|
+
return array.indexOf(value) === index;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
const getUserInfo = () => JSON.parse(localStorage.getItem(API_USER_INFO_KEY) || "null") || void 0;
|
|
788
|
+
const updateUserInfo = (newUserInfo) => {
|
|
789
|
+
if (newUserInfo) {
|
|
790
|
+
const oldUserInfo = getUserInfo();
|
|
791
|
+
localStorage.setItem(API_USER_INFO_KEY, JSON.stringify({ ...oldUserInfo, ...newUserInfo }));
|
|
792
|
+
}
|
|
793
|
+
else {
|
|
794
|
+
localStorage.removeItem(API_USER_INFO_KEY);
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
|
|
732
798
|
class Account extends AccountService {
|
|
733
799
|
userInfo;
|
|
734
800
|
get username() {
|
|
@@ -2063,10 +2129,30 @@ class CatalogService extends Service {
|
|
|
2063
2129
|
* @secure
|
|
2064
2130
|
* @response `200` OK
|
|
2065
2131
|
* @response `206` Partial Content
|
|
2132
|
+
* @response `304` Not Modified
|
|
2133
|
+
* @response `412` Precondition Failed
|
|
2134
|
+
* @response `416` Range Not Satisfiable
|
|
2135
|
+
*/
|
|
2136
|
+
getFile({ resourceId, ...query }) {
|
|
2137
|
+
return this.http.get(`/resources/file/${resourceId}`, query).blob();
|
|
2138
|
+
}
|
|
2139
|
+
/**
|
|
2140
|
+
* No description
|
|
2141
|
+
*
|
|
2142
|
+
* @tags Catalog
|
|
2143
|
+
* @name HeadFile
|
|
2144
|
+
* @operationId CatalogController_HeadFile
|
|
2145
|
+
* @summary Report the headers a download would carry, without transferring anything.
|
|
2146
|
+
* @request HEAD:/resources/file/{resourceId}
|
|
2147
|
+
* @secure
|
|
2148
|
+
* @response `200` OK
|
|
2149
|
+
* @response `206` Partial Content
|
|
2150
|
+
* @response `304` Not Modified
|
|
2151
|
+
* @response `412` Precondition Failed
|
|
2066
2152
|
* @response `416` Range Not Satisfiable
|
|
2067
2153
|
*/
|
|
2068
|
-
|
|
2069
|
-
return this.http.
|
|
2154
|
+
headFile({ resourceId, ...query }) {
|
|
2155
|
+
return this.http.head(`/resources/file/${resourceId}`, query).then(() => { });
|
|
2070
2156
|
}
|
|
2071
2157
|
/**
|
|
2072
2158
|
* No description
|
|
@@ -2291,56 +2377,6 @@ class HistoryService extends Service {
|
|
|
2291
2377
|
class History extends HistoryService {
|
|
2292
2378
|
}
|
|
2293
2379
|
|
|
2294
|
-
exports.ErrorReason = void 0;
|
|
2295
|
-
(function (ErrorReason) {
|
|
2296
|
-
/** When request has status code less than 400 */
|
|
2297
|
-
ErrorReason["HTTP_OTHER"] = "other";
|
|
2298
|
-
/** When request has status code in range 400 - 499 */
|
|
2299
|
-
ErrorReason["HTTP_CLIENT"] = "client";
|
|
2300
|
-
/** When request has status code 500 or more */
|
|
2301
|
-
ErrorReason["HTTP_SERVER"] = "server";
|
|
2302
|
-
/** When it's not a http bad response */
|
|
2303
|
-
ErrorReason["UNKNOWN"] = "unknown";
|
|
2304
|
-
})(exports.ErrorReason || (exports.ErrorReason = {}));
|
|
2305
|
-
const handleBaseError = (e) => ({
|
|
2306
|
-
type: "base",
|
|
2307
|
-
reason: exports.ErrorReason.UNKNOWN,
|
|
2308
|
-
origin: e,
|
|
2309
|
-
});
|
|
2310
|
-
const handleHTTPError = (e) => {
|
|
2311
|
-
const status = e.response.status;
|
|
2312
|
-
let reason = exports.ErrorReason.HTTP_OTHER;
|
|
2313
|
-
if (status >= 400 && status < 500) {
|
|
2314
|
-
reason = exports.ErrorReason.HTTP_CLIENT;
|
|
2315
|
-
}
|
|
2316
|
-
if (status >= 500) {
|
|
2317
|
-
reason = exports.ErrorReason.HTTP_SERVER;
|
|
2318
|
-
}
|
|
2319
|
-
return {
|
|
2320
|
-
type: "http",
|
|
2321
|
-
reason,
|
|
2322
|
-
status,
|
|
2323
|
-
origin: e,
|
|
2324
|
-
};
|
|
2325
|
-
};
|
|
2326
|
-
const errorHandler = (e) => {
|
|
2327
|
-
if (e instanceof ky.HTTPError)
|
|
2328
|
-
return handleHTTPError(e);
|
|
2329
|
-
return handleBaseError(e);
|
|
2330
|
-
};
|
|
2331
|
-
const isHandledError = (e) => e && e.type && e.reason;
|
|
2332
|
-
const isHTTPError = (e) => isHandledError(e) && e.type === "http";
|
|
2333
|
-
|
|
2334
|
-
function formDataFromFile(file) {
|
|
2335
|
-
const data = new FormData();
|
|
2336
|
-
data.append("file", file);
|
|
2337
|
-
return data;
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
|
-
function isString(v) {
|
|
2341
|
-
return typeof v === "string";
|
|
2342
|
-
}
|
|
2343
|
-
|
|
2344
2380
|
/* eslint-disable */
|
|
2345
2381
|
/* tslint:disable */
|
|
2346
2382
|
/*
|
|
@@ -2357,659 +2393,455 @@ function isString(v) {
|
|
|
2357
2393
|
* @version 1.5.1.0
|
|
2358
2394
|
* @baseUrl /sp
|
|
2359
2395
|
*/
|
|
2360
|
-
class
|
|
2396
|
+
class LayersService extends Service {
|
|
2361
2397
|
/**
|
|
2362
2398
|
* No description
|
|
2363
2399
|
*
|
|
2364
|
-
* @tags
|
|
2365
|
-
* @name
|
|
2366
|
-
* @operationId
|
|
2367
|
-
* @summary
|
|
2368
|
-
* @request POST:/
|
|
2400
|
+
* @tags Layers
|
|
2401
|
+
* @name GetBulkFeatures
|
|
2402
|
+
* @operationId LayersController_GetBulkFeatures
|
|
2403
|
+
* @summary Returns list of the layer features.
|
|
2404
|
+
* @request POST:/bulk/layers/features/query
|
|
2369
2405
|
* @secure
|
|
2370
2406
|
* @response `200` OK
|
|
2371
2407
|
*/
|
|
2372
|
-
|
|
2373
|
-
return this.http.post(`/
|
|
2408
|
+
getBulkFeatures(data) {
|
|
2409
|
+
return this.http.post(`/bulk/layers/features/query`, data).json();
|
|
2374
2410
|
}
|
|
2375
2411
|
/**
|
|
2376
2412
|
* No description
|
|
2377
2413
|
*
|
|
2378
|
-
* @tags
|
|
2379
|
-
* @name
|
|
2380
|
-
* @operationId
|
|
2381
|
-
* @summary
|
|
2382
|
-
* @request POST:/
|
|
2414
|
+
* @tags Layers
|
|
2415
|
+
* @name GetBulkExtents
|
|
2416
|
+
* @operationId LayersController_GetBulkExtents
|
|
2417
|
+
* @summary Returns list of the layer extents with overall extent.
|
|
2418
|
+
* @request POST:/bulk/layers/extent
|
|
2383
2419
|
* @secure
|
|
2384
2420
|
* @response `200` OK
|
|
2385
2421
|
*/
|
|
2386
|
-
|
|
2387
|
-
return this.http.post(`/
|
|
2422
|
+
getBulkExtents(query, data) {
|
|
2423
|
+
return this.http.post(`/bulk/layers/extent`, data, query).json();
|
|
2388
2424
|
}
|
|
2389
2425
|
/**
|
|
2390
2426
|
* No description
|
|
2391
2427
|
*
|
|
2392
|
-
* @tags
|
|
2393
|
-
* @name
|
|
2394
|
-
* @operationId
|
|
2395
|
-
* @summary
|
|
2396
|
-
* @request
|
|
2428
|
+
* @tags Layers
|
|
2429
|
+
* @name GetFilteredFeaturesCount
|
|
2430
|
+
* @operationId LayersController_GetFilteredFeaturesCount
|
|
2431
|
+
* @summary Returns list of features count according layer filter.
|
|
2432
|
+
* @request POST:/bulk/layers/features/count
|
|
2397
2433
|
* @secure
|
|
2398
2434
|
* @response `200` OK
|
|
2399
2435
|
*/
|
|
2400
|
-
|
|
2401
|
-
return this.http.
|
|
2436
|
+
getFilteredFeaturesCount(data) {
|
|
2437
|
+
return this.http.post(`/bulk/layers/features/count`, data).json();
|
|
2402
2438
|
}
|
|
2403
2439
|
/**
|
|
2404
2440
|
* No description
|
|
2405
2441
|
*
|
|
2406
|
-
* @tags
|
|
2407
|
-
* @name
|
|
2408
|
-
* @operationId
|
|
2409
|
-
* @summary Returns
|
|
2410
|
-
* @request GET:/
|
|
2442
|
+
* @tags Layers
|
|
2443
|
+
* @name GetLayerInfo
|
|
2444
|
+
* @operationId LayersController_GetLayerInfoAsync
|
|
2445
|
+
* @summary Returns the layer information.
|
|
2446
|
+
* @request GET:/layers/{name}
|
|
2411
2447
|
* @secure
|
|
2412
2448
|
* @response `200` OK
|
|
2413
2449
|
*/
|
|
2414
|
-
|
|
2415
|
-
return this.http
|
|
2450
|
+
getLayerInfo(name) {
|
|
2451
|
+
return this.http
|
|
2452
|
+
.get(`/layers/${name}`)
|
|
2453
|
+
.json();
|
|
2416
2454
|
}
|
|
2417
2455
|
/**
|
|
2418
2456
|
* No description
|
|
2419
2457
|
*
|
|
2420
|
-
* @tags
|
|
2421
|
-
* @name
|
|
2422
|
-
* @operationId
|
|
2423
|
-
* @summary
|
|
2424
|
-
* @request
|
|
2458
|
+
* @tags Layers
|
|
2459
|
+
* @name PatchQueryLayerService
|
|
2460
|
+
* @operationId LayersController_PatchQueryLayerService
|
|
2461
|
+
* @summary Patch EQL-based Query Layer Service.
|
|
2462
|
+
* @request PATCH:/layers/{name}
|
|
2425
2463
|
* @secure
|
|
2426
2464
|
* @response `200` OK
|
|
2427
2465
|
*/
|
|
2428
|
-
|
|
2429
|
-
return this.http
|
|
2466
|
+
patchQueryLayerService(name, data) {
|
|
2467
|
+
return this.http
|
|
2468
|
+
.patch(`/layers/${name}`, data)
|
|
2469
|
+
.json();
|
|
2430
2470
|
}
|
|
2431
2471
|
/**
|
|
2432
2472
|
* No description
|
|
2433
2473
|
*
|
|
2434
|
-
* @tags
|
|
2435
|
-
* @name
|
|
2436
|
-
* @operationId
|
|
2437
|
-
* @summary
|
|
2438
|
-
* @request
|
|
2474
|
+
* @tags Layers
|
|
2475
|
+
* @name GetLayersInfo
|
|
2476
|
+
* @operationId LayersController_GetLayersInfoAsync
|
|
2477
|
+
* @summary Returns the layers information.
|
|
2478
|
+
* @request GET:/layers/batchInfo
|
|
2439
2479
|
* @secure
|
|
2440
2480
|
* @response `200` OK
|
|
2441
2481
|
*/
|
|
2442
|
-
|
|
2443
|
-
return this.http
|
|
2482
|
+
getLayersInfo(query) {
|
|
2483
|
+
return this.http
|
|
2484
|
+
.get(`/layers/batchInfo`, query)
|
|
2485
|
+
.json();
|
|
2444
2486
|
}
|
|
2445
2487
|
/**
|
|
2446
2488
|
* No description
|
|
2447
2489
|
*
|
|
2448
|
-
* @tags
|
|
2449
|
-
* @name
|
|
2450
|
-
* @operationId
|
|
2451
|
-
* @summary
|
|
2452
|
-
* @request
|
|
2490
|
+
* @tags Layers
|
|
2491
|
+
* @name PublishService
|
|
2492
|
+
* @operationId LayersController_PublishServiceAsync
|
|
2493
|
+
* @summary Publishes a service using the specified layer configuration parameters.
|
|
2494
|
+
* @request POST:/layers
|
|
2453
2495
|
* @secure
|
|
2454
2496
|
* @response `200` OK
|
|
2455
2497
|
*/
|
|
2456
|
-
|
|
2498
|
+
publishService(data) {
|
|
2457
2499
|
return this.http
|
|
2458
|
-
.
|
|
2500
|
+
.post(`/layers`, data)
|
|
2459
2501
|
.json();
|
|
2460
2502
|
}
|
|
2461
2503
|
/**
|
|
2462
2504
|
* No description
|
|
2463
2505
|
*
|
|
2464
|
-
* @tags
|
|
2465
|
-
* @name
|
|
2466
|
-
* @operationId
|
|
2467
|
-
* @summary
|
|
2468
|
-
* @request
|
|
2469
|
-
* @secure
|
|
2470
|
-
* @response `200` OK
|
|
2471
|
-
*/
|
|
2472
|
-
removeDataSource(name) {
|
|
2473
|
-
return this.http.delete(`/ds/${name}`, null).then(() => { });
|
|
2474
|
-
}
|
|
2475
|
-
/**
|
|
2476
|
-
* No description
|
|
2477
|
-
*
|
|
2478
|
-
* @tags DataSource
|
|
2479
|
-
* @name TestConnection1
|
|
2480
|
-
* @operationId DataSourceController_TestConnection_1
|
|
2481
|
-
* @summary Test data.mos.ru data source connection.
|
|
2482
|
-
* @request POST:/ds/dataMosRu/test-connection
|
|
2506
|
+
* @tags Layers
|
|
2507
|
+
* @name PatchQueryLayerService1
|
|
2508
|
+
* @operationId LayersController_PatchQueryLayerService_1
|
|
2509
|
+
* @summary Patch EQL-based Query Layer Service.
|
|
2510
|
+
* @request PATCH:/layers/{name}/v2
|
|
2483
2511
|
* @secure
|
|
2484
2512
|
* @response `200` OK
|
|
2485
2513
|
*/
|
|
2486
|
-
|
|
2487
|
-
return this.http.
|
|
2514
|
+
patchQueryLayerService1(name, data) {
|
|
2515
|
+
return this.http.patch(`/layers/${name}/v2`, data).json();
|
|
2488
2516
|
}
|
|
2489
2517
|
/**
|
|
2490
2518
|
* No description
|
|
2491
2519
|
*
|
|
2492
|
-
* @tags
|
|
2493
|
-
* @name
|
|
2494
|
-
* @operationId
|
|
2495
|
-
* @summary
|
|
2496
|
-
* @request
|
|
2520
|
+
* @tags Layers
|
|
2521
|
+
* @name ReloadService
|
|
2522
|
+
* @operationId LayersController_ReloadServiceAsync
|
|
2523
|
+
* @summary Initialize a new instance of service by given name.
|
|
2524
|
+
* @request GET:/layers/{name}/reload
|
|
2497
2525
|
* @secure
|
|
2498
2526
|
* @response `200` OK
|
|
2499
2527
|
*/
|
|
2500
|
-
|
|
2501
|
-
return this.http
|
|
2528
|
+
reloadService(name) {
|
|
2529
|
+
return this.http
|
|
2530
|
+
.get(`/layers/${name}/reload`)
|
|
2531
|
+
.json();
|
|
2502
2532
|
}
|
|
2503
2533
|
/**
|
|
2504
2534
|
* No description
|
|
2505
2535
|
*
|
|
2506
|
-
* @tags
|
|
2507
|
-
* @name
|
|
2508
|
-
* @operationId
|
|
2509
|
-
* @summary
|
|
2510
|
-
* @request
|
|
2536
|
+
* @tags Layers
|
|
2537
|
+
* @name GetFeatures
|
|
2538
|
+
* @operationId LayersController_GetFeatures
|
|
2539
|
+
* @summary Returns list of the layer features.
|
|
2540
|
+
* @request POST:/layers/{name}/features/query
|
|
2511
2541
|
* @secure
|
|
2512
2542
|
* @response `200` OK
|
|
2513
2543
|
*/
|
|
2514
|
-
|
|
2515
|
-
return this.http.
|
|
2544
|
+
getFeatures(name, data) {
|
|
2545
|
+
return this.http.post(`/layers/${name}/features/query`, data).json();
|
|
2516
2546
|
}
|
|
2517
2547
|
/**
|
|
2518
2548
|
* No description
|
|
2519
2549
|
*
|
|
2520
|
-
* @tags
|
|
2521
|
-
* @name
|
|
2522
|
-
* @operationId
|
|
2523
|
-
* @summary
|
|
2524
|
-
* @request
|
|
2550
|
+
* @tags Layers
|
|
2551
|
+
* @name GetFeatures1
|
|
2552
|
+
* @operationId LayersController_GetFeatures_1
|
|
2553
|
+
* @summary Returns list of the layer features.
|
|
2554
|
+
* @request GET:/layers/{name}/features
|
|
2525
2555
|
* @secure
|
|
2526
2556
|
* @response `200` OK
|
|
2527
2557
|
*/
|
|
2528
|
-
|
|
2529
|
-
return this.http.
|
|
2558
|
+
getFeatures1({ name, ...query }) {
|
|
2559
|
+
return this.http.get(`/layers/${name}/features`, query).json();
|
|
2530
2560
|
}
|
|
2531
2561
|
/**
|
|
2532
2562
|
* No description
|
|
2533
2563
|
*
|
|
2534
|
-
* @tags
|
|
2535
|
-
* @name
|
|
2536
|
-
* @operationId
|
|
2537
|
-
* @summary
|
|
2538
|
-
* @request
|
|
2564
|
+
* @tags Layers
|
|
2565
|
+
* @name DeleteFeature
|
|
2566
|
+
* @operationId LayersController_DeleteFeature
|
|
2567
|
+
* @summary Deletes feature by id.
|
|
2568
|
+
* @request DELETE:/layers/{name}/features
|
|
2539
2569
|
* @secure
|
|
2540
2570
|
* @response `200` OK
|
|
2541
2571
|
*/
|
|
2542
|
-
|
|
2543
|
-
return this.http.
|
|
2572
|
+
deleteFeature({ name, ...query }) {
|
|
2573
|
+
return this.http.delete(`/layers/${name}/features`, null, query).json();
|
|
2544
2574
|
}
|
|
2545
2575
|
/**
|
|
2546
2576
|
* No description
|
|
2547
2577
|
*
|
|
2548
|
-
* @tags
|
|
2549
|
-
* @name
|
|
2550
|
-
* @operationId
|
|
2551
|
-
* @summary
|
|
2552
|
-
* @request POST:/
|
|
2578
|
+
* @tags Layers
|
|
2579
|
+
* @name CreateFeatures
|
|
2580
|
+
* @operationId LayersController_CreateFeatures
|
|
2581
|
+
* @summary Creates features list of type.SPCore.Connectors.Connectors.Base.Models.Features.FeatureDc.
|
|
2582
|
+
* @request POST:/layers/{name}/features
|
|
2553
2583
|
* @secure
|
|
2554
2584
|
* @response `200` OK
|
|
2555
2585
|
*/
|
|
2556
|
-
|
|
2557
|
-
return this.http.post(`/
|
|
2586
|
+
createFeatures({ name, ...query }, data) {
|
|
2587
|
+
return this.http.post(`/layers/${name}/features`, data, query).json();
|
|
2558
2588
|
}
|
|
2559
2589
|
/**
|
|
2560
2590
|
* No description
|
|
2561
2591
|
*
|
|
2562
|
-
* @tags
|
|
2563
|
-
* @name
|
|
2564
|
-
* @operationId
|
|
2565
|
-
* @summary
|
|
2566
|
-
* @request PATCH:/
|
|
2592
|
+
* @tags Layers
|
|
2593
|
+
* @name UpdateFeature
|
|
2594
|
+
* @operationId LayersController_UpdateFeature
|
|
2595
|
+
* @summary Updates features list SPCore.Connectors.Connectors.Base.Models.Features.FeatureDc.
|
|
2596
|
+
* @request PATCH:/layers/{name}/features
|
|
2567
2597
|
* @secure
|
|
2568
2598
|
* @response `200` OK
|
|
2569
2599
|
*/
|
|
2570
|
-
|
|
2571
|
-
return this.http.patch(`/
|
|
2600
|
+
updateFeature(name, data) {
|
|
2601
|
+
return this.http.patch(`/layers/${name}/features`, data).json();
|
|
2572
2602
|
}
|
|
2573
2603
|
/**
|
|
2574
2604
|
* No description
|
|
2575
2605
|
*
|
|
2576
|
-
* @tags
|
|
2577
|
-
* @name
|
|
2578
|
-
* @operationId
|
|
2579
|
-
* @summary
|
|
2580
|
-
* @request
|
|
2606
|
+
* @tags Layers
|
|
2607
|
+
* @name GetById
|
|
2608
|
+
* @operationId LayersController_GetByIdAsync
|
|
2609
|
+
* @summary Gets feature by id.
|
|
2610
|
+
* @request GET:/layers/{name}/features/{id}
|
|
2581
2611
|
* @secure
|
|
2582
2612
|
* @response `200` OK
|
|
2583
2613
|
*/
|
|
2584
|
-
|
|
2585
|
-
return this.http.
|
|
2614
|
+
getById({ name, id, ...query }) {
|
|
2615
|
+
return this.http.get(`/layers/${name}/features/${id}`, query).json();
|
|
2586
2616
|
}
|
|
2587
2617
|
/**
|
|
2588
2618
|
* No description
|
|
2589
2619
|
*
|
|
2590
|
-
* @tags
|
|
2591
|
-
* @name
|
|
2592
|
-
* @operationId
|
|
2593
|
-
* @summary
|
|
2594
|
-
* @request
|
|
2620
|
+
* @tags Layers
|
|
2621
|
+
* @name GetTilesLayerImage
|
|
2622
|
+
* @operationId LayersController_GetTilesLayerImage
|
|
2623
|
+
* @summary Render tile with input indexes.
|
|
2624
|
+
* @request GET:/layers/{name}/tile/{z}/{x}/{y}
|
|
2595
2625
|
* @secure
|
|
2596
2626
|
* @response `200` OK
|
|
2597
2627
|
*/
|
|
2598
|
-
|
|
2599
|
-
return this.http.
|
|
2628
|
+
getTilesLayerImage({ name, x, y, z, ...query }) {
|
|
2629
|
+
return this.http.createUrl(`/layers/${name}/tile/{z}/{x}/{y}`, query);
|
|
2600
2630
|
}
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
/* eslint-disable */
|
|
2604
|
-
/* tslint:disable */
|
|
2605
|
-
/*
|
|
2606
|
-
* ---------------------------------------------------------------
|
|
2607
|
-
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
2608
|
-
* ## ##
|
|
2609
|
-
* ## AUTHOR: acacode ##
|
|
2610
|
-
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
2611
|
-
* ---------------------------------------------------------------
|
|
2612
|
-
*/
|
|
2613
|
-
// @ts-nocheck
|
|
2614
|
-
/**
|
|
2615
|
-
* @title Spatial Processing Gateway API
|
|
2616
|
-
* @version 1.5.1.0
|
|
2617
|
-
* @baseUrl /sp
|
|
2618
|
-
*/
|
|
2619
|
-
class QueryTokenAccessService extends Service {
|
|
2620
2631
|
/**
|
|
2621
2632
|
* No description
|
|
2622
2633
|
*
|
|
2623
|
-
* @tags
|
|
2624
|
-
* @name
|
|
2625
|
-
* @operationId
|
|
2626
|
-
* @
|
|
2634
|
+
* @tags Layers
|
|
2635
|
+
* @name GetTilesLayerImage1
|
|
2636
|
+
* @operationId LayersController_GetTilesLayerImage_1
|
|
2637
|
+
* @summary Render tile with input indexes.
|
|
2638
|
+
* @request GET:/layers/{name}/tile/{z}/{x}/{y}.{format}
|
|
2627
2639
|
* @secure
|
|
2628
2640
|
* @response `200` OK
|
|
2629
2641
|
*/
|
|
2630
|
-
|
|
2631
|
-
return this.http.
|
|
2642
|
+
getTilesLayerImage1({ name, x, y, z, format, ...query }) {
|
|
2643
|
+
return this.http.createUrl(`/layers/${name}/tile/{z}/{x}/{y}.${format}`, query);
|
|
2632
2644
|
}
|
|
2633
2645
|
/**
|
|
2634
2646
|
* No description
|
|
2635
2647
|
*
|
|
2636
|
-
* @tags
|
|
2637
|
-
* @name
|
|
2638
|
-
* @operationId
|
|
2639
|
-
* @
|
|
2648
|
+
* @tags Layers
|
|
2649
|
+
* @name GetTilesLayerImageWithFormatAndDpi
|
|
2650
|
+
* @operationId LayersController_GetTilesLayerImageWithFormatAndDpi
|
|
2651
|
+
* @summary Render tile with input indexes.
|
|
2652
|
+
* @request GET:/layers/{name}/tile/{z}/{x}/{y}@{dpi}x.{format}
|
|
2640
2653
|
* @secure
|
|
2641
2654
|
* @response `200` OK
|
|
2642
2655
|
*/
|
|
2643
|
-
|
|
2644
|
-
return this.http.
|
|
2656
|
+
getTilesLayerImageWithFormatAndDpi({ name, x, y, z, dpi, format, ...query }) {
|
|
2657
|
+
return this.http.createUrl(`/layers/${name}/tile/{z}/{x}/{y}@${dpi}x.${format}`, query);
|
|
2645
2658
|
}
|
|
2646
2659
|
/**
|
|
2647
2660
|
* No description
|
|
2648
2661
|
*
|
|
2649
|
-
* @tags
|
|
2650
|
-
* @name
|
|
2651
|
-
* @operationId
|
|
2652
|
-
* @
|
|
2662
|
+
* @tags Layers
|
|
2663
|
+
* @name GetLayerExtent
|
|
2664
|
+
* @operationId LayersController_GetLayerExtent
|
|
2665
|
+
* @summary Returns the extent of the layer.
|
|
2666
|
+
* @request GET:/layers/{name}/extent
|
|
2653
2667
|
* @secure
|
|
2654
2668
|
* @response `200` OK
|
|
2655
2669
|
*/
|
|
2656
|
-
|
|
2657
|
-
return this.http.
|
|
2670
|
+
getLayerExtent({ name, ...query }) {
|
|
2671
|
+
return this.http.get(`/layers/${name}/extent`, query).json();
|
|
2658
2672
|
}
|
|
2659
2673
|
/**
|
|
2660
2674
|
* No description
|
|
2661
2675
|
*
|
|
2662
|
-
* @tags
|
|
2663
|
-
* @name
|
|
2664
|
-
* @operationId
|
|
2665
|
-
* @
|
|
2676
|
+
* @tags Layers
|
|
2677
|
+
* @name DeleteFeatures
|
|
2678
|
+
* @operationId LayersController_DeleteFeatures
|
|
2679
|
+
* @summary Delete a list of features by given ids. Example: ids=1,2,3.
|
|
2680
|
+
* @request DELETE:/layers/{name}/features/deleteByIds
|
|
2666
2681
|
* @secure
|
|
2667
2682
|
* @response `200` OK
|
|
2668
2683
|
*/
|
|
2669
|
-
|
|
2670
|
-
return this.http.
|
|
2684
|
+
deleteFeatures({ name, ...query }) {
|
|
2685
|
+
return this.http.delete(`/layers/${name}/features/deleteByIds`, null, query).json();
|
|
2671
2686
|
}
|
|
2672
2687
|
/**
|
|
2673
2688
|
* No description
|
|
2674
2689
|
*
|
|
2675
|
-
* @tags
|
|
2676
|
-
* @name
|
|
2677
|
-
* @operationId
|
|
2678
|
-
* @
|
|
2690
|
+
* @tags Layers
|
|
2691
|
+
* @name DeleteByCondition
|
|
2692
|
+
* @operationId LayersController_DeleteByCondition
|
|
2693
|
+
* @summary Delete a list of features by condition with exclude given ids.
|
|
2694
|
+
* @request DELETE:/layers/{name}/features/deleteByCondition
|
|
2679
2695
|
* @secure
|
|
2680
2696
|
* @response `200` OK
|
|
2681
2697
|
*/
|
|
2682
|
-
|
|
2683
|
-
return this.http.delete(`/
|
|
2698
|
+
deleteByCondition({ name, ...query }) {
|
|
2699
|
+
return this.http.delete(`/layers/${name}/features/deleteByCondition`, null, query).json();
|
|
2684
2700
|
}
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2687
|
-
/* eslint-disable */
|
|
2688
|
-
/* tslint:disable */
|
|
2689
|
-
/*
|
|
2690
|
-
* ---------------------------------------------------------------
|
|
2691
|
-
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
2692
|
-
* ## ##
|
|
2693
|
-
* ## AUTHOR: acacode ##
|
|
2694
|
-
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
2695
|
-
* ---------------------------------------------------------------
|
|
2696
|
-
*/
|
|
2697
|
-
// @ts-nocheck
|
|
2698
|
-
/**
|
|
2699
|
-
* @title Spatial Processing Gateway API
|
|
2700
|
-
* @version 1.5.1.0
|
|
2701
|
-
* @baseUrl /sp
|
|
2702
|
-
*/
|
|
2703
|
-
class SpatialReferencesService extends Service {
|
|
2704
2701
|
/**
|
|
2705
2702
|
* No description
|
|
2706
2703
|
*
|
|
2707
|
-
* @tags
|
|
2708
|
-
* @name
|
|
2709
|
-
* @operationId
|
|
2710
|
-
* @summary Returns
|
|
2711
|
-
* @request GET:/
|
|
2704
|
+
* @tags Layers
|
|
2705
|
+
* @name Classify
|
|
2706
|
+
* @operationId LayersController_Classify
|
|
2707
|
+
* @summary Returns the classified attribute values that correspond to the given number of classes.
|
|
2708
|
+
* @request GET:/layers/{name}/classify
|
|
2712
2709
|
* @secure
|
|
2713
2710
|
* @response `200` OK
|
|
2714
2711
|
*/
|
|
2715
|
-
|
|
2716
|
-
return this.http.get(`/
|
|
2712
|
+
classify({ name, ...query }) {
|
|
2713
|
+
return this.http.get(`/layers/${name}/classify`, query).json();
|
|
2717
2714
|
}
|
|
2718
2715
|
/**
|
|
2719
2716
|
* No description
|
|
2720
2717
|
*
|
|
2721
|
-
* @tags
|
|
2722
|
-
* @name
|
|
2723
|
-
* @operationId
|
|
2724
|
-
* @summary Returns
|
|
2725
|
-
* @request GET:/
|
|
2718
|
+
* @tags Layers
|
|
2719
|
+
* @name Distincts
|
|
2720
|
+
* @operationId LayersController_Distincts
|
|
2721
|
+
* @summary Returns distinct attribute values and their count.
|
|
2722
|
+
* @request GET:/layers/{name}/distincts
|
|
2726
2723
|
* @secure
|
|
2727
2724
|
* @response `200` OK
|
|
2728
2725
|
*/
|
|
2729
|
-
|
|
2730
|
-
return this.http.get(`/
|
|
2726
|
+
distincts({ name, ...query }) {
|
|
2727
|
+
return this.http.get(`/layers/${name}/distincts`, query).json();
|
|
2731
2728
|
}
|
|
2732
2729
|
/**
|
|
2733
2730
|
* No description
|
|
2734
2731
|
*
|
|
2735
|
-
* @tags
|
|
2736
|
-
* @name
|
|
2737
|
-
* @operationId
|
|
2738
|
-
* @summary Returns
|
|
2739
|
-
* @request GET:/
|
|
2732
|
+
* @tags Layers
|
|
2733
|
+
* @name AggregateAttribute
|
|
2734
|
+
* @operationId LayersController_AggregateAttribute
|
|
2735
|
+
* @summary Returns aggregated value of given attribute aggregationAttributeName within a given groups groups.
|
|
2736
|
+
* @request GET:/layers/{name}/aggregate-values
|
|
2740
2737
|
* @secure
|
|
2741
2738
|
* @response `200` OK
|
|
2742
2739
|
*/
|
|
2743
|
-
|
|
2744
|
-
return this.http.get(`/
|
|
2740
|
+
aggregateAttribute({ name, ...query }) {
|
|
2741
|
+
return this.http.get(`/layers/${name}/aggregate-values`, query).json();
|
|
2745
2742
|
}
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
on(type, handler) {
|
|
2760
|
-
if (!this.handlers[type]) {
|
|
2761
|
-
this.handlers[type] = [];
|
|
2762
|
-
}
|
|
2763
|
-
this.handlers[type].push(handler);
|
|
2743
|
+
/**
|
|
2744
|
+
* No description
|
|
2745
|
+
*
|
|
2746
|
+
* @tags Layers
|
|
2747
|
+
* @name GetFilteredFeaturesCount1
|
|
2748
|
+
* @operationId LayersController_GetFilteredFeaturesCount_1
|
|
2749
|
+
* @summary Get features count according layer filter of the given name.
|
|
2750
|
+
* @request GET:/layers/{name}/features/count
|
|
2751
|
+
* @secure
|
|
2752
|
+
* @response `200` OK
|
|
2753
|
+
*/
|
|
2754
|
+
getFilteredFeaturesCount1({ name, ...query }) {
|
|
2755
|
+
return this.http.get(`/layers/${name}/features/count`, query).json();
|
|
2764
2756
|
}
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2757
|
+
/**
|
|
2758
|
+
* No description
|
|
2759
|
+
*
|
|
2760
|
+
* @tags Layers
|
|
2761
|
+
* @name GetFilteredFeaturesCount2
|
|
2762
|
+
* @operationId LayersController_GetFilteredFeaturesCount_2
|
|
2763
|
+
* @summary Get features count according layer filter of the given name.
|
|
2764
|
+
* @request POST:/layers/{name}/features/count
|
|
2765
|
+
* @secure
|
|
2766
|
+
* @response `200` OK
|
|
2767
|
+
*/
|
|
2768
|
+
getFilteredFeaturesCount2(name, data) {
|
|
2769
|
+
return this.http.post(`/layers/${name}/features/count`, data).json();
|
|
2772
2770
|
}
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2771
|
+
/**
|
|
2772
|
+
* No description
|
|
2773
|
+
*
|
|
2774
|
+
* @tags Layers
|
|
2775
|
+
* @name EditAttributes
|
|
2776
|
+
* @operationId LayersController_EditAttributes
|
|
2777
|
+
* @summary Edit attributes with editInfo.
|
|
2778
|
+
* @request POST:/layers/{name}/features/edit-attributes
|
|
2779
|
+
* @secure
|
|
2780
|
+
* @response `200` OK
|
|
2781
|
+
*/
|
|
2782
|
+
editAttributes(name, data) {
|
|
2783
|
+
return this.http.post(`/layers/${name}/features/edit-attributes`, data).json();
|
|
2776
2784
|
}
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2785
|
+
/**
|
|
2786
|
+
* No description
|
|
2787
|
+
*
|
|
2788
|
+
* @tags Layers
|
|
2789
|
+
* @name ValidateExpression
|
|
2790
|
+
* @operationId LayersController_ValidateExpression
|
|
2791
|
+
* @summary Validates the given EQL expression against the requested layer. If the expression is valid, it can be
|
|
2792
|
+
executed on the features in the layer to produce a value of some type. The type of the resulting
|
|
2793
|
+
value will be also returned in the validation result.
|
|
2794
|
+
* @request GET:/layers/{layerName}/validateExpression
|
|
2795
|
+
* @secure
|
|
2796
|
+
* @response `200` OK
|
|
2797
|
+
*/
|
|
2798
|
+
validateExpression({ layerName, ...query }) {
|
|
2799
|
+
return this.http.get(`/layers/${layerName}/validateExpression`, query).json();
|
|
2800
|
+
}
|
|
2801
|
+
/**
|
|
2802
|
+
* No description
|
|
2803
|
+
*
|
|
2804
|
+
* @tags Layers
|
|
2805
|
+
* @name IsExists
|
|
2806
|
+
* @operationId LayersController_IsExistsAsync
|
|
2807
|
+
* @summary Check is resource exists.
|
|
2808
|
+
* @request GET:/layers/{name}/exists
|
|
2809
|
+
* @secure
|
|
2810
|
+
* @response `200` OK
|
|
2811
|
+
*/
|
|
2812
|
+
isExists(name) {
|
|
2813
|
+
return this.http.get(`/layers/${name}/exists`).then(() => { });
|
|
2814
|
+
}
|
|
2815
|
+
/**
|
|
2816
|
+
* No description
|
|
2817
|
+
*
|
|
2818
|
+
* @tags Layers
|
|
2819
|
+
* @name GetResourceDependencies
|
|
2820
|
+
* @operationId LayersController_GetResourceDependencies
|
|
2821
|
+
* @summary Get resource dependencies.
|
|
2822
|
+
* @request GET:/layers/{name}/dependencies
|
|
2823
|
+
* @secure
|
|
2824
|
+
* @response `200` OK
|
|
2825
|
+
*/
|
|
2826
|
+
getResourceDependencies(name) {
|
|
2827
|
+
return this.http.get(`/layers/${name}/dependencies`).json();
|
|
2828
|
+
}
|
|
2829
|
+
/**
|
|
2830
|
+
* No description
|
|
2831
|
+
*
|
|
2832
|
+
* @tags Layers
|
|
2833
|
+
* @name GetResourceReferences
|
|
2834
|
+
* @operationId LayersController_GetResourceReferences
|
|
2835
|
+
* @summary Returns the resource dependency information.
|
|
2836
|
+
* @request GET:/layers/{name}/references
|
|
2837
|
+
* @secure
|
|
2838
|
+
* @response `200` OK
|
|
2839
|
+
*/
|
|
2840
|
+
getResourceReferences(name) {
|
|
2841
|
+
return this.http.get(`/layers/${name}/references`).json();
|
|
2783
2842
|
}
|
|
2784
2843
|
}
|
|
2785
2844
|
|
|
2786
|
-
exports.UrlPath = void 0;
|
|
2787
|
-
(function (UrlPath) {
|
|
2788
|
-
UrlPath["Base"] = "/map";
|
|
2789
|
-
UrlPath["Shared"] = "/shared";
|
|
2790
|
-
UrlPath["Presentation"] = "/presentation";
|
|
2791
|
-
UrlPath["Portal"] = "/portal";
|
|
2792
|
-
})(exports.UrlPath || (exports.UrlPath = {}));
|
|
2793
|
-
/* const apiEventsByResponseStatus: Record<number, ApiEvent> = {
|
|
2794
|
-
401: ApiEvent.Unauthorized,
|
|
2795
|
-
}; */
|
|
2796
|
-
const SHARED_PORT = "8082";
|
|
2797
|
-
const URL_PATHS = Object.values(exports.UrlPath);
|
|
2798
|
-
const DEFAULT_URL_PATH = URL_PATHS[0];
|
|
2799
|
-
class Api extends EventEmitter {
|
|
2800
|
-
url;
|
|
2801
|
-
layers;
|
|
2802
|
-
tables;
|
|
2803
|
-
projects;
|
|
2804
|
-
security;
|
|
2805
|
-
file;
|
|
2806
|
-
filters;
|
|
2807
|
-
resources;
|
|
2808
|
-
geocode;
|
|
2809
|
-
tools;
|
|
2810
|
-
external;
|
|
2811
|
-
account;
|
|
2812
|
-
accountPreview;
|
|
2813
|
-
clientSettings;
|
|
2814
|
-
portalSettings;
|
|
2815
|
-
names;
|
|
2816
|
-
bulk;
|
|
2817
|
-
statistic;
|
|
2818
|
-
feedback;
|
|
2819
|
-
vectorTiles;
|
|
2820
|
-
spatialReference;
|
|
2821
|
-
eql;
|
|
2822
|
-
catalog;
|
|
2823
|
-
queryToken;
|
|
2824
|
-
dataSource;
|
|
2825
|
-
remoteTaskManager;
|
|
2826
|
-
catalogShare;
|
|
2827
|
-
history;
|
|
2828
|
-
http;
|
|
2829
|
-
urlPath;
|
|
2830
|
-
refreshingToken = false;
|
|
2831
|
-
constructor({ url, http, urlPath, httpOptions, }) {
|
|
2832
|
-
super();
|
|
2833
|
-
const { hooks } = httpOptions || {};
|
|
2834
|
-
this.http =
|
|
2835
|
-
http ||
|
|
2836
|
-
new HttpClient({
|
|
2837
|
-
prefixUrl: url,
|
|
2838
|
-
timeout: false,
|
|
2839
|
-
retry: {
|
|
2840
|
-
methods: ["get", "post", "patch", "delete"],
|
|
2841
|
-
limit: 5,
|
|
2842
|
-
statusCodes: [401],
|
|
2843
|
-
},
|
|
2844
|
-
...(httpOptions || {}),
|
|
2845
|
-
hooks: {
|
|
2846
|
-
...(hooks || {}),
|
|
2847
|
-
beforeRequest: [
|
|
2848
|
-
request => {
|
|
2849
|
-
const token = window.localStorage.getItem(STORAGE_TOKEN_KEY);
|
|
2850
|
-
if (token) {
|
|
2851
|
-
request.headers?.set("Authorization", `Bearer ${token || ""}`);
|
|
2852
|
-
}
|
|
2853
|
-
},
|
|
2854
|
-
...(hooks?.beforeRequest ?? []),
|
|
2855
|
-
],
|
|
2856
|
-
beforeRetry: [
|
|
2857
|
-
async ({ request, error, retryCount }) => {
|
|
2858
|
-
if (error instanceof ky.HTTPError &&
|
|
2859
|
-
retryCount === 1) {
|
|
2860
|
-
switch (error.response.status) {
|
|
2861
|
-
case 401:
|
|
2862
|
-
if (this.refreshingToken) {
|
|
2863
|
-
const currentToken = window.localStorage.getItem(STORAGE_TOKEN_KEY);
|
|
2864
|
-
request.headers?.set("Authorization", `Bearer ${currentToken || ""}`);
|
|
2865
|
-
return;
|
|
2866
|
-
}
|
|
2867
|
-
this.refreshingToken = true;
|
|
2868
|
-
try {
|
|
2869
|
-
const refreshToken = window.localStorage.getItem(STORAGE_REFRESH_TOKEN_KEY);
|
|
2870
|
-
if (refreshToken) {
|
|
2871
|
-
const refreshTokenResponse = await this.account.refreshToken({
|
|
2872
|
-
refreshToken,
|
|
2873
|
-
});
|
|
2874
|
-
if (refreshTokenResponse) {
|
|
2875
|
-
window.localStorage.setItem(STORAGE_TOKEN_KEY, refreshTokenResponse.token);
|
|
2876
|
-
window.localStorage.setItem(STORAGE_REFRESH_TOKEN_KEY, refreshTokenResponse.refreshToken);
|
|
2877
|
-
}
|
|
2878
|
-
request.headers?.set("Authorization", `Bearer ${refreshTokenResponse.token || ""}`);
|
|
2879
|
-
}
|
|
2880
|
-
else {
|
|
2881
|
-
await this.logout();
|
|
2882
|
-
}
|
|
2883
|
-
}
|
|
2884
|
-
catch (error) {
|
|
2885
|
-
await this.logout();
|
|
2886
|
-
}
|
|
2887
|
-
finally {
|
|
2888
|
-
this.refreshingToken = false;
|
|
2889
|
-
}
|
|
2890
|
-
break;
|
|
2891
|
-
}
|
|
2892
|
-
}
|
|
2893
|
-
},
|
|
2894
|
-
],
|
|
2895
|
-
},
|
|
2896
|
-
});
|
|
2897
|
-
this.url = url;
|
|
2898
|
-
this.urlPath = urlPath || this.defineUrlPath();
|
|
2899
|
-
this.layers = new Layers(this.http);
|
|
2900
|
-
this.tables = new Tables(this.http);
|
|
2901
|
-
this.projects = new Projects(this.http);
|
|
2902
|
-
this.resources = new Resources(this.projects, this.layers, this.tables);
|
|
2903
|
-
this.external = new External(this.http);
|
|
2904
|
-
this.account = new Account(this.http);
|
|
2905
|
-
this.accountPreview = new AccountPreview(this.http);
|
|
2906
|
-
this.bulk = new BulkOperations(this.http);
|
|
2907
|
-
this.security = new Security(this.http, this.account);
|
|
2908
|
-
this.file = new FileUpload(this.http);
|
|
2909
|
-
this.filters = new Filters(this.http);
|
|
2910
|
-
this.geocode = new Geocode(this.http);
|
|
2911
|
-
this.tools = new Tools(this.http);
|
|
2912
|
-
this.clientSettings = new ClientSettings(this.http);
|
|
2913
|
-
this.portalSettings = new PortalSettings(this.http);
|
|
2914
|
-
this.statistic = new Statistic(this.http);
|
|
2915
|
-
this.feedback = new Feedback(this.http);
|
|
2916
|
-
this.vectorTiles = new VectorTiles(this.http);
|
|
2917
|
-
this.spatialReference = new SpatialReferencesService(this.http);
|
|
2918
|
-
this.eql = new Eql(this.http);
|
|
2919
|
-
this.catalog = new CatalogService(this.http);
|
|
2920
|
-
this.queryToken = new QueryTokenAccessService(this.http);
|
|
2921
|
-
this.dataSource = new DataSourceService(this.http);
|
|
2922
|
-
this.remoteTaskManager = new RemoteTaskManager(this.http);
|
|
2923
|
-
this.catalogShare = new CatalogShare(this.http);
|
|
2924
|
-
this.history = new History(this.http);
|
|
2925
|
-
this.names = new Names({
|
|
2926
|
-
account: this.account,
|
|
2927
|
-
});
|
|
2928
|
-
}
|
|
2929
|
-
get isShared() {
|
|
2930
|
-
return this.urlPath === exports.UrlPath.Shared;
|
|
2931
|
-
}
|
|
2932
|
-
get isPresentation() {
|
|
2933
|
-
return this.urlPath === exports.UrlPath.Presentation || window.location.port === SHARED_PORT;
|
|
2934
|
-
}
|
|
2935
|
-
async init({ authParams, authQueryParams, fetchSettings, fetchUser, useJwt, }) {
|
|
2936
|
-
try {
|
|
2937
|
-
await this.account.login(authParams, authQueryParams, useJwt);
|
|
2938
|
-
if (fetchUser) {
|
|
2939
|
-
await this.account.fetchCurrentUser();
|
|
2940
|
-
}
|
|
2941
|
-
if (fetchSettings) {
|
|
2942
|
-
await this.clientSettings.fetchClientSettings({
|
|
2943
|
-
urlPath: getFetchingUrlPath(this.urlPath),
|
|
2944
|
-
});
|
|
2945
|
-
}
|
|
2946
|
-
}
|
|
2947
|
-
catch (e) {
|
|
2948
|
-
throw errorHandler(e);
|
|
2949
|
-
}
|
|
2950
|
-
}
|
|
2951
|
-
isAcceptedNetwork(network) {
|
|
2952
|
-
return ["vk", "google", "facebook", "yandex"].includes(network);
|
|
2953
|
-
}
|
|
2954
|
-
async socAuthLogin(network) {
|
|
2955
|
-
if (!this.isAcceptedNetwork(network))
|
|
2956
|
-
return;
|
|
2957
|
-
try {
|
|
2958
|
-
await this.clientSettings.fetchClientSettings({ urlPath: exports.UrlPath.Base });
|
|
2959
|
-
}
|
|
2960
|
-
catch (e) {
|
|
2961
|
-
throw errorHandler(e);
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
async logout() {
|
|
2965
|
-
await this.account.logout();
|
|
2966
|
-
await this.security.reset();
|
|
2967
|
-
this.emit(exports.ApiEvent.Unauthorized, null);
|
|
2968
|
-
}
|
|
2969
|
-
defineUrlPath() {
|
|
2970
|
-
const firstPath = (window.location.href.split(window.location.hostname)[1] || "")
|
|
2971
|
-
.split("/")
|
|
2972
|
-
.filter(Boolean)[0];
|
|
2973
|
-
const urlPath = firstPath ? `/${firstPath}` : void 0;
|
|
2974
|
-
return urlPath && URL_PATHS.includes(urlPath) ? urlPath : DEFAULT_URL_PATH;
|
|
2975
|
-
}
|
|
2976
|
-
}
|
|
2977
|
-
|
|
2978
|
-
const addSubDomainToLocation = (subDomain) => `${window.location.protocol}//${subDomain}.${window.location.host}`;
|
|
2979
|
-
const getFetchingUrlPath = (urlPath) => urlPath === exports.UrlPath.Presentation ? exports.UrlPath.Base : urlPath;
|
|
2980
|
-
|
|
2981
|
-
const parseJwt = (token) => {
|
|
2982
|
-
const base64Url = token.split(".")[1];
|
|
2983
|
-
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
2984
|
-
const jsonPayload = decodeURIComponent(atob(base64).split("").map((c) => (`%${("00".concat(c.charCodeAt(0).toString(16)).slice(-2))}`)).join(""));
|
|
2985
|
-
return JSON.parse(jsonPayload);
|
|
2986
|
-
};
|
|
2987
|
-
|
|
2988
|
-
async function promiseAllIgnoreErrors(promises) {
|
|
2989
|
-
const results = await Promise.all(promises.map(promise => promise.catch(e => (isError(e) ? e : new Error(e)))));
|
|
2990
|
-
return results.filter(notError);
|
|
2991
|
-
}
|
|
2992
|
-
function isError(v) {
|
|
2993
|
-
return v instanceof Error;
|
|
2994
|
-
}
|
|
2995
|
-
function notError(v) {
|
|
2996
|
-
return !isError(v);
|
|
2997
|
-
}
|
|
2998
|
-
|
|
2999
|
-
function unique(value, index, array) {
|
|
3000
|
-
return array.indexOf(value) === index;
|
|
3001
|
-
}
|
|
3002
|
-
|
|
3003
|
-
const ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
3004
|
-
/** Generates unique identifier */
|
|
3005
|
-
const generateId = nanoid.customAlphabet(ALPHABET, 12);
|
|
3006
|
-
|
|
3007
|
-
const stripUselessSlashes = (...strings) => strings
|
|
3008
|
-
.join("/")
|
|
3009
|
-
.split("/")
|
|
3010
|
-
.filter(Boolean)
|
|
3011
|
-
.join("/");
|
|
3012
|
-
|
|
3013
2845
|
// @ts-nocheck
|
|
3014
2846
|
exports.AccessMode = void 0;
|
|
3015
2847
|
(function (AccessMode) {
|
|
@@ -3214,6 +3046,12 @@ exports.LayerServiceType = void 0;
|
|
|
3214
3046
|
LayerServiceType["RemoteTileLayerService"] = "RemoteTileLayerService";
|
|
3215
3047
|
LayerServiceType["RouteLayerService"] = "RouteLayerService";
|
|
3216
3048
|
})(exports.LayerServiceType || (exports.LayerServiceType = {}));
|
|
3049
|
+
exports.NameConflictBehavior = void 0;
|
|
3050
|
+
(function (NameConflictBehavior) {
|
|
3051
|
+
NameConflictBehavior["Fail"] = "Fail";
|
|
3052
|
+
NameConflictBehavior["Rewrite"] = "Rewrite";
|
|
3053
|
+
NameConflictBehavior["MakeUnique"] = "MakeUnique";
|
|
3054
|
+
})(exports.NameConflictBehavior || (exports.NameConflictBehavior = {}));
|
|
3217
3055
|
exports.OgcGeometryType = void 0;
|
|
3218
3056
|
(function (OgcGeometryType) {
|
|
3219
3057
|
OgcGeometryType["Unknown"] = "Unknown";
|
|
@@ -3395,6 +3233,97 @@ exports.WorkerSettingsFieldType = void 0;
|
|
|
3395
3233
|
WorkerSettingsFieldType["AttributeArray"] = "AttributeArray";
|
|
3396
3234
|
})(exports.WorkerSettingsFieldType || (exports.WorkerSettingsFieldType = {}));
|
|
3397
3235
|
|
|
3236
|
+
class Layers extends LayersService {
|
|
3237
|
+
getLayerInfos(layers) {
|
|
3238
|
+
return promiseAllIgnoreErrors(layers.map(layer => this.getLayerInfo(layer)));
|
|
3239
|
+
}
|
|
3240
|
+
getLayersDeps(layers) {
|
|
3241
|
+
return promiseAllIgnoreErrors(layers.map(layer => this.getResourceDependencies(layer)));
|
|
3242
|
+
}
|
|
3243
|
+
findOne(name) {
|
|
3244
|
+
return this.getLayerInfo(name);
|
|
3245
|
+
}
|
|
3246
|
+
findMany(layerNames, projectNames) {
|
|
3247
|
+
return this.getLayersInfo({ layerNames, projectNames });
|
|
3248
|
+
}
|
|
3249
|
+
createLayer(configuration) {
|
|
3250
|
+
return this.publishService(configuration);
|
|
3251
|
+
}
|
|
3252
|
+
updateQueryLayer(configuration) {
|
|
3253
|
+
return this.patchQueryLayerService(configuration.name, configuration);
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
function isTileLayerService(layer) {
|
|
3257
|
+
return [exports.LayerServiceType.PostgresTileLayerService, exports.LayerServiceType.RemoteTileLayerService].includes(layer.configuration?.layerType);
|
|
3258
|
+
}
|
|
3259
|
+
|
|
3260
|
+
const RESOURCE_TEMP_WORKSPACE = "temp";
|
|
3261
|
+
const generateFirstLatinLetter = nanoid.customAlphabet("abcdefghijklmnopqrstuvwxyz", 1);
|
|
3262
|
+
exports.ResourceSeparator = void 0;
|
|
3263
|
+
(function (ResourceSeparator) {
|
|
3264
|
+
ResourceSeparator["Server"] = ".";
|
|
3265
|
+
})(exports.ResourceSeparator || (exports.ResourceSeparator = {}));
|
|
3266
|
+
class Names {
|
|
3267
|
+
account;
|
|
3268
|
+
constructor({ account }) {
|
|
3269
|
+
this.account = account;
|
|
3270
|
+
}
|
|
3271
|
+
/** Generates unique identifier */
|
|
3272
|
+
createId() {
|
|
3273
|
+
return generateFirstLatinLetter() + generateId().slice(1);
|
|
3274
|
+
}
|
|
3275
|
+
/** Generates new resource name using for client\server interactions */
|
|
3276
|
+
createResourceName(params = {}) {
|
|
3277
|
+
const workspace = params.workspace ||
|
|
3278
|
+
(this.account.user && this.account.user.namespace) ||
|
|
3279
|
+
"";
|
|
3280
|
+
const name = params.name || this.createId();
|
|
3281
|
+
const separator = params.separator || exports.ResourceSeparator.Server;
|
|
3282
|
+
if (!workspace) {
|
|
3283
|
+
console.warn("Resource should have workspace. Check account api");
|
|
3284
|
+
}
|
|
3285
|
+
return `${workspace}${separator}${name}`;
|
|
3286
|
+
}
|
|
3287
|
+
/** Generates temporary resource name using for client\server interactions */
|
|
3288
|
+
createTempResourceName(params = {}) {
|
|
3289
|
+
return this.createResourceName({
|
|
3290
|
+
workspace: RESOURCE_TEMP_WORKSPACE,
|
|
3291
|
+
...params,
|
|
3292
|
+
});
|
|
3293
|
+
}
|
|
3294
|
+
/** Extract resource information (workspace, name) */
|
|
3295
|
+
extractResource(resourceName) {
|
|
3296
|
+
if (resourceName) {
|
|
3297
|
+
if (resourceName.includes(exports.ResourceSeparator.Server)) {
|
|
3298
|
+
const matches = resourceName.split(exports.ResourceSeparator.Server);
|
|
3299
|
+
const name = matches.pop();
|
|
3300
|
+
const workspace = matches.join(exports.ResourceSeparator.Server);
|
|
3301
|
+
return { workspace, name };
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
return {
|
|
3305
|
+
name: "",
|
|
3306
|
+
workspace: "",
|
|
3307
|
+
};
|
|
3308
|
+
}
|
|
3309
|
+
/** Extract resource name */
|
|
3310
|
+
extractResourceName(resourceName) {
|
|
3311
|
+
return this.extractResource(resourceName).name || resourceName || "";
|
|
3312
|
+
}
|
|
3313
|
+
/** Extract resource workspace */
|
|
3314
|
+
extractResourceWorkspace(resourceName) {
|
|
3315
|
+
return this.extractResource(resourceName).workspace || "";
|
|
3316
|
+
}
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
class PortalSettings extends ClientSettingsService {
|
|
3320
|
+
config = null;
|
|
3321
|
+
async fetchPortalSettings(query) {
|
|
3322
|
+
this.config = await this.getConfiguration(query);
|
|
3323
|
+
return this.config;
|
|
3324
|
+
}
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3398
3327
|
/* eslint-disable */
|
|
3399
3328
|
/* tslint:disable */
|
|
3400
3329
|
/*
|
|
@@ -3411,543 +3340,639 @@ exports.WorkerSettingsFieldType = void 0;
|
|
|
3411
3340
|
* @version 1.5.1.0
|
|
3412
3341
|
* @baseUrl /sp
|
|
3413
3342
|
*/
|
|
3414
|
-
class
|
|
3343
|
+
class ProjectsService extends Service {
|
|
3415
3344
|
/**
|
|
3416
3345
|
* No description
|
|
3417
3346
|
*
|
|
3418
|
-
* @tags
|
|
3419
|
-
* @name
|
|
3420
|
-
* @operationId
|
|
3421
|
-
* @summary
|
|
3422
|
-
* @request POST:/
|
|
3347
|
+
* @tags Projects
|
|
3348
|
+
* @name CreateProject
|
|
3349
|
+
* @operationId ProjectsController_CreateProject
|
|
3350
|
+
* @summary Creates a new project.
|
|
3351
|
+
* @request POST:/projects
|
|
3423
3352
|
* @secure
|
|
3424
3353
|
* @response `200` OK
|
|
3425
3354
|
*/
|
|
3426
|
-
|
|
3427
|
-
return this.http.post(`/
|
|
3355
|
+
createProject(data) {
|
|
3356
|
+
return this.http.post(`/projects`, data).json();
|
|
3428
3357
|
}
|
|
3429
3358
|
/**
|
|
3430
3359
|
* No description
|
|
3431
3360
|
*
|
|
3432
|
-
* @tags
|
|
3433
|
-
* @name
|
|
3434
|
-
* @operationId
|
|
3435
|
-
* @summary
|
|
3436
|
-
* @request
|
|
3361
|
+
* @tags Projects
|
|
3362
|
+
* @name UpdateProject
|
|
3363
|
+
* @operationId ProjectsController_UpdateProject
|
|
3364
|
+
* @summary Update table.
|
|
3365
|
+
* @request PATCH:/projects/{name}
|
|
3437
3366
|
* @secure
|
|
3438
3367
|
* @response `200` OK
|
|
3439
3368
|
*/
|
|
3440
|
-
|
|
3441
|
-
return this.http.
|
|
3369
|
+
updateProject(name, data) {
|
|
3370
|
+
return this.http.patch(`/projects/${name}`, data).json();
|
|
3442
3371
|
}
|
|
3443
3372
|
/**
|
|
3444
3373
|
* No description
|
|
3445
3374
|
*
|
|
3446
|
-
* @tags
|
|
3447
|
-
* @name
|
|
3448
|
-
* @operationId
|
|
3449
|
-
* @summary Returns
|
|
3450
|
-
* @request
|
|
3375
|
+
* @tags Projects
|
|
3376
|
+
* @name GetProjectInfo
|
|
3377
|
+
* @operationId ProjectsController_GetProjectInfo
|
|
3378
|
+
* @summary Returns the project and it's content information.
|
|
3379
|
+
* @request GET:/projects/{name}
|
|
3451
3380
|
* @secure
|
|
3452
3381
|
* @response `200` OK
|
|
3453
3382
|
*/
|
|
3454
|
-
|
|
3455
|
-
return this.http.
|
|
3383
|
+
getProjectInfo(name) {
|
|
3384
|
+
return this.http.get(`/projects/${name}`).json();
|
|
3456
3385
|
}
|
|
3457
3386
|
/**
|
|
3458
3387
|
* No description
|
|
3459
3388
|
*
|
|
3460
|
-
* @tags
|
|
3461
|
-
* @name
|
|
3462
|
-
* @operationId
|
|
3463
|
-
* @summary
|
|
3464
|
-
* @request
|
|
3389
|
+
* @tags Projects
|
|
3390
|
+
* @name UpdateProjectV2
|
|
3391
|
+
* @operationId ProjectsController_UpdateProjectV2
|
|
3392
|
+
* @summary Update table.
|
|
3393
|
+
* @request PATCH:/projects/{name}/v2
|
|
3465
3394
|
* @secure
|
|
3466
3395
|
* @response `200` OK
|
|
3467
3396
|
*/
|
|
3468
|
-
|
|
3469
|
-
return this.http
|
|
3470
|
-
.get(`/layers/${name}`)
|
|
3471
|
-
.json();
|
|
3397
|
+
updateProjectV2(name, data) {
|
|
3398
|
+
return this.http.patch(`/projects/${name}/v2`, data).json();
|
|
3472
3399
|
}
|
|
3473
3400
|
/**
|
|
3474
3401
|
* No description
|
|
3475
3402
|
*
|
|
3476
|
-
* @tags
|
|
3477
|
-
* @name
|
|
3478
|
-
* @operationId
|
|
3479
|
-
* @summary
|
|
3480
|
-
* @request
|
|
3403
|
+
* @tags Projects
|
|
3404
|
+
* @name GetProjectsInfo
|
|
3405
|
+
* @operationId ProjectsController_GetProjectsInfoAsync
|
|
3406
|
+
* @summary Returns the projects information.
|
|
3407
|
+
* @request GET:/projects/batchInfo
|
|
3481
3408
|
* @secure
|
|
3482
3409
|
* @response `200` OK
|
|
3483
3410
|
*/
|
|
3484
|
-
|
|
3485
|
-
return this.http
|
|
3486
|
-
.patch(`/layers/${name}`, data)
|
|
3487
|
-
.json();
|
|
3411
|
+
getProjectsInfo(query) {
|
|
3412
|
+
return this.http.get(`/projects/batchInfo`, query).json();
|
|
3488
3413
|
}
|
|
3489
3414
|
/**
|
|
3490
3415
|
* No description
|
|
3491
3416
|
*
|
|
3492
|
-
* @tags
|
|
3493
|
-
* @name
|
|
3494
|
-
* @operationId
|
|
3495
|
-
* @summary
|
|
3496
|
-
* @request GET:/
|
|
3417
|
+
* @tags Projects
|
|
3418
|
+
* @name IsExists
|
|
3419
|
+
* @operationId ProjectsController_IsExistsAsync
|
|
3420
|
+
* @summary Check is resource exists.
|
|
3421
|
+
* @request GET:/projects/{name}/exists
|
|
3497
3422
|
* @secure
|
|
3498
3423
|
* @response `200` OK
|
|
3499
3424
|
*/
|
|
3500
|
-
|
|
3501
|
-
return this.http
|
|
3502
|
-
.get(`/layers/batchInfo`, query)
|
|
3503
|
-
.json();
|
|
3425
|
+
isExists(name) {
|
|
3426
|
+
return this.http.get(`/projects/${name}/exists`).then(() => { });
|
|
3504
3427
|
}
|
|
3505
3428
|
/**
|
|
3506
3429
|
* No description
|
|
3507
3430
|
*
|
|
3508
|
-
* @tags
|
|
3509
|
-
* @name
|
|
3510
|
-
* @operationId
|
|
3511
|
-
* @summary
|
|
3512
|
-
* @request
|
|
3431
|
+
* @tags Projects
|
|
3432
|
+
* @name GetResourceDependencies
|
|
3433
|
+
* @operationId ProjectsController_GetResourceDependencies
|
|
3434
|
+
* @summary Get resource dependencies.
|
|
3435
|
+
* @request GET:/projects/{name}/dependencies
|
|
3513
3436
|
* @secure
|
|
3514
3437
|
* @response `200` OK
|
|
3515
3438
|
*/
|
|
3516
|
-
|
|
3517
|
-
return this.http
|
|
3518
|
-
.post(`/layers`, data)
|
|
3519
|
-
.json();
|
|
3439
|
+
getResourceDependencies(name) {
|
|
3440
|
+
return this.http.get(`/projects/${name}/dependencies`).json();
|
|
3520
3441
|
}
|
|
3521
3442
|
/**
|
|
3522
3443
|
* No description
|
|
3523
3444
|
*
|
|
3524
|
-
* @tags
|
|
3525
|
-
* @name
|
|
3526
|
-
* @operationId
|
|
3527
|
-
* @summary
|
|
3528
|
-
* @request
|
|
3445
|
+
* @tags Projects
|
|
3446
|
+
* @name GetResourceReferences
|
|
3447
|
+
* @operationId ProjectsController_GetResourceReferences
|
|
3448
|
+
* @summary Returns the resource dependency information.
|
|
3449
|
+
* @request GET:/projects/{name}/references
|
|
3529
3450
|
* @secure
|
|
3530
3451
|
* @response `200` OK
|
|
3531
3452
|
*/
|
|
3532
|
-
|
|
3533
|
-
return this.http.
|
|
3453
|
+
getResourceReferences(name) {
|
|
3454
|
+
return this.http.get(`/projects/${name}/references`).json();
|
|
3455
|
+
}
|
|
3456
|
+
}
|
|
3457
|
+
|
|
3458
|
+
class Projects extends ProjectsService {
|
|
3459
|
+
getProjectInfos(projects) {
|
|
3460
|
+
return promiseAllIgnoreErrors(projects.map(project => this.getProjectInfo(project)));
|
|
3461
|
+
}
|
|
3462
|
+
getProjectsDeps(proejcts) {
|
|
3463
|
+
return promiseAllIgnoreErrors(proejcts.map(project => this.getResourceDependencies(project)));
|
|
3464
|
+
}
|
|
3465
|
+
findOne(name) {
|
|
3466
|
+
return this.getProjectInfo(name);
|
|
3467
|
+
}
|
|
3468
|
+
create(resource) {
|
|
3469
|
+
return this.createProject(resource);
|
|
3470
|
+
}
|
|
3471
|
+
update(resource) {
|
|
3472
|
+
return this.updateProject(resource.name, resource);
|
|
3534
3473
|
}
|
|
3474
|
+
}
|
|
3475
|
+
|
|
3476
|
+
/* eslint-disable */
|
|
3477
|
+
/* tslint:disable */
|
|
3478
|
+
/*
|
|
3479
|
+
* ---------------------------------------------------------------
|
|
3480
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
3481
|
+
* ## ##
|
|
3482
|
+
* ## AUTHOR: acacode ##
|
|
3483
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
3484
|
+
* ---------------------------------------------------------------
|
|
3485
|
+
*/
|
|
3486
|
+
// @ts-nocheck
|
|
3487
|
+
/**
|
|
3488
|
+
* @title Spatial Processing Gateway API
|
|
3489
|
+
* @version 1.5.1.0
|
|
3490
|
+
* @baseUrl /sp
|
|
3491
|
+
*/
|
|
3492
|
+
class RemoteTaskManagerService extends Service {
|
|
3535
3493
|
/**
|
|
3536
3494
|
* No description
|
|
3537
3495
|
*
|
|
3538
|
-
* @tags
|
|
3539
|
-
* @name
|
|
3540
|
-
* @operationId
|
|
3541
|
-
* @summary
|
|
3542
|
-
* @request GET:/
|
|
3496
|
+
* @tags RemoteTaskManager
|
|
3497
|
+
* @name Get
|
|
3498
|
+
* @operationId RemoteTaskManagerController_Get
|
|
3499
|
+
* @summary Shows SubTask in Task.
|
|
3500
|
+
* @request GET:/scheduler/task/{id}/subtasks
|
|
3543
3501
|
* @secure
|
|
3544
3502
|
* @response `200` OK
|
|
3545
3503
|
*/
|
|
3546
|
-
|
|
3547
|
-
return this.http
|
|
3548
|
-
.get(`/layers/${name}/reload`)
|
|
3549
|
-
.json();
|
|
3504
|
+
get(id) {
|
|
3505
|
+
return this.http.get(`/scheduler/task/${id}/subtasks`).json();
|
|
3550
3506
|
}
|
|
3551
3507
|
/**
|
|
3552
3508
|
* No description
|
|
3553
3509
|
*
|
|
3554
|
-
* @tags
|
|
3555
|
-
* @name
|
|
3556
|
-
* @operationId
|
|
3557
|
-
* @summary
|
|
3558
|
-
* @request POST:/
|
|
3510
|
+
* @tags RemoteTaskManager
|
|
3511
|
+
* @name Stop
|
|
3512
|
+
* @operationId RemoteTaskManagerController_Stop
|
|
3513
|
+
* @summary Stop the task.
|
|
3514
|
+
* @request POST:/scheduler/task/{id}/stop
|
|
3559
3515
|
* @secure
|
|
3560
3516
|
* @response `200` OK
|
|
3561
3517
|
*/
|
|
3562
|
-
|
|
3563
|
-
return this.http.post(`/
|
|
3518
|
+
stop(id) {
|
|
3519
|
+
return this.http.post(`/scheduler/task/${id}/stop`, null).text();
|
|
3564
3520
|
}
|
|
3565
3521
|
/**
|
|
3566
3522
|
* No description
|
|
3567
3523
|
*
|
|
3568
|
-
* @tags
|
|
3569
|
-
* @name
|
|
3570
|
-
* @operationId
|
|
3571
|
-
* @summary
|
|
3572
|
-
* @request
|
|
3524
|
+
* @tags RemoteTaskManager
|
|
3525
|
+
* @name CreateTaskPrototype
|
|
3526
|
+
* @operationId RemoteTaskManagerController_CreateTaskPrototype
|
|
3527
|
+
* @summary Creates TaskPrototype.
|
|
3528
|
+
* @request POST:/scheduler
|
|
3573
3529
|
* @secure
|
|
3574
3530
|
* @response `200` OK
|
|
3575
3531
|
*/
|
|
3576
|
-
|
|
3577
|
-
return this.http.
|
|
3532
|
+
createTaskPrototype(data) {
|
|
3533
|
+
return this.http.post(`/scheduler`, data).text();
|
|
3578
3534
|
}
|
|
3579
3535
|
/**
|
|
3580
3536
|
* No description
|
|
3581
3537
|
*
|
|
3582
|
-
* @tags
|
|
3583
|
-
* @name
|
|
3584
|
-
* @operationId
|
|
3585
|
-
* @summary
|
|
3586
|
-
* @request
|
|
3538
|
+
* @tags RemoteTaskManager
|
|
3539
|
+
* @name GetTaskPrototypes
|
|
3540
|
+
* @operationId RemoteTaskManagerController_GetTaskPrototypes
|
|
3541
|
+
* @summary Show TaskPrototypes for user.
|
|
3542
|
+
* @request GET:/scheduler
|
|
3587
3543
|
* @secure
|
|
3588
3544
|
* @response `200` OK
|
|
3589
3545
|
*/
|
|
3590
|
-
|
|
3591
|
-
return this.http.
|
|
3546
|
+
getTaskPrototypes(query) {
|
|
3547
|
+
return this.http.get(`/scheduler`, query).json();
|
|
3592
3548
|
}
|
|
3593
3549
|
/**
|
|
3594
3550
|
* No description
|
|
3595
3551
|
*
|
|
3596
|
-
* @tags
|
|
3597
|
-
* @name
|
|
3598
|
-
* @operationId
|
|
3599
|
-
* @summary
|
|
3600
|
-
* @request
|
|
3552
|
+
* @tags RemoteTaskManager
|
|
3553
|
+
* @name UpdateTaskPrototype
|
|
3554
|
+
* @operationId RemoteTaskManagerController_UpdateTaskPrototype
|
|
3555
|
+
* @summary Updates task prototype.
|
|
3556
|
+
* @request PUT:/scheduler/{id}
|
|
3601
3557
|
* @secure
|
|
3602
3558
|
* @response `200` OK
|
|
3603
3559
|
*/
|
|
3604
|
-
|
|
3605
|
-
return this.http.
|
|
3560
|
+
updateTaskPrototype(id, data) {
|
|
3561
|
+
return this.http.put(`/scheduler/${id}`, data).text();
|
|
3606
3562
|
}
|
|
3607
3563
|
/**
|
|
3608
3564
|
* No description
|
|
3609
3565
|
*
|
|
3610
|
-
* @tags
|
|
3611
|
-
* @name
|
|
3612
|
-
* @operationId
|
|
3613
|
-
* @summary
|
|
3614
|
-
* @request
|
|
3566
|
+
* @tags RemoteTaskManager
|
|
3567
|
+
* @name Delete
|
|
3568
|
+
* @operationId RemoteTaskManagerController_Delete
|
|
3569
|
+
* @summary Delete task prototype.
|
|
3570
|
+
* @request DELETE:/scheduler/{id}
|
|
3615
3571
|
* @secure
|
|
3616
3572
|
* @response `200` OK
|
|
3617
3573
|
*/
|
|
3618
|
-
|
|
3619
|
-
return this.http.
|
|
3574
|
+
delete(id) {
|
|
3575
|
+
return this.http.delete(`/scheduler/${id}`, null).text();
|
|
3620
3576
|
}
|
|
3621
3577
|
/**
|
|
3622
3578
|
* No description
|
|
3623
3579
|
*
|
|
3624
|
-
* @tags
|
|
3625
|
-
* @name
|
|
3626
|
-
* @operationId
|
|
3627
|
-
* @summary
|
|
3628
|
-
* @request
|
|
3580
|
+
* @tags RemoteTaskManager
|
|
3581
|
+
* @name SetEnable
|
|
3582
|
+
* @operationId RemoteTaskManagerController_SetEnable
|
|
3583
|
+
* @summary Enables task prototype.
|
|
3584
|
+
* @request POST:/scheduler/{id}/enable/{enable}
|
|
3629
3585
|
* @secure
|
|
3630
3586
|
* @response `200` OK
|
|
3631
3587
|
*/
|
|
3632
|
-
|
|
3633
|
-
return this.http.
|
|
3588
|
+
setEnable(id, enable) {
|
|
3589
|
+
return this.http.post(`/scheduler/${id}/enable/${enable}`, null).text();
|
|
3634
3590
|
}
|
|
3635
3591
|
/**
|
|
3636
3592
|
* No description
|
|
3637
3593
|
*
|
|
3638
|
-
* @tags
|
|
3639
|
-
* @name
|
|
3640
|
-
* @operationId
|
|
3641
|
-
* @summary
|
|
3642
|
-
* @request GET:/
|
|
3594
|
+
* @tags RemoteTaskManager
|
|
3595
|
+
* @name GetTasksForPrototype
|
|
3596
|
+
* @operationId RemoteTaskManagerController_GetTasksForPrototype
|
|
3597
|
+
* @summary Shows Tasks that created for TaskPrototype.
|
|
3598
|
+
* @request GET:/scheduler/{id}/tasks
|
|
3643
3599
|
* @secure
|
|
3644
3600
|
* @response `200` OK
|
|
3645
3601
|
*/
|
|
3646
|
-
|
|
3647
|
-
return this.http.
|
|
3602
|
+
getTasksForPrototype({ id, ...query }) {
|
|
3603
|
+
return this.http.get(`/scheduler/${id}/tasks`, query).json();
|
|
3648
3604
|
}
|
|
3649
3605
|
/**
|
|
3650
3606
|
* No description
|
|
3651
3607
|
*
|
|
3652
|
-
* @tags
|
|
3653
|
-
* @name
|
|
3654
|
-
* @operationId
|
|
3655
|
-
* @summary
|
|
3656
|
-
* @request
|
|
3608
|
+
* @tags RemoteTaskManager
|
|
3609
|
+
* @name StartTask
|
|
3610
|
+
* @operationId RemoteTaskManagerController_StartTask
|
|
3611
|
+
* @summary Starts new Task for TaskPrototype with task id definition.
|
|
3612
|
+
* @request POST:/scheduler/{id}/start/{taskId}
|
|
3657
3613
|
* @secure
|
|
3658
3614
|
* @response `200` OK
|
|
3659
3615
|
*/
|
|
3660
|
-
|
|
3661
|
-
return this.http.
|
|
3616
|
+
startTask(id, taskId) {
|
|
3617
|
+
return this.http.post(`/scheduler/${id}/start/${taskId}`, null).json();
|
|
3662
3618
|
}
|
|
3663
3619
|
/**
|
|
3664
3620
|
* No description
|
|
3665
3621
|
*
|
|
3666
|
-
* @tags
|
|
3667
|
-
* @name
|
|
3668
|
-
* @operationId
|
|
3669
|
-
* @summary
|
|
3670
|
-
* @request
|
|
3622
|
+
* @tags RemoteTaskManager
|
|
3623
|
+
* @name StartTask1
|
|
3624
|
+
* @operationId RemoteTaskManagerController_StartTask_1
|
|
3625
|
+
* @summary Starts new Task for TaskPrototype .
|
|
3626
|
+
* @request POST:/scheduler/{id}/start
|
|
3671
3627
|
* @secure
|
|
3672
3628
|
* @response `200` OK
|
|
3673
3629
|
*/
|
|
3674
|
-
|
|
3675
|
-
return this.http.
|
|
3630
|
+
startTask1(id) {
|
|
3631
|
+
return this.http.post(`/scheduler/${id}/start`, null).json();
|
|
3676
3632
|
}
|
|
3677
3633
|
/**
|
|
3678
3634
|
* No description
|
|
3679
3635
|
*
|
|
3680
|
-
* @tags
|
|
3681
|
-
* @name
|
|
3682
|
-
* @operationId
|
|
3683
|
-
* @summary
|
|
3684
|
-
* @request GET:/
|
|
3636
|
+
* @tags RemoteTaskManager
|
|
3637
|
+
* @name GetTaskResource
|
|
3638
|
+
* @operationId RemoteTaskManagerController_GetTaskResource
|
|
3639
|
+
* @summary Shows SubTask in Task.
|
|
3640
|
+
* @request GET:/scheduler/taskresource/{id}
|
|
3685
3641
|
* @secure
|
|
3686
3642
|
* @response `200` OK
|
|
3687
3643
|
*/
|
|
3688
|
-
|
|
3689
|
-
return this.http.get(`/
|
|
3644
|
+
getTaskResource({ id, ...query }) {
|
|
3645
|
+
return this.http.get(`/scheduler/taskresource/${id}`, query).json();
|
|
3690
3646
|
}
|
|
3691
3647
|
/**
|
|
3692
3648
|
* No description
|
|
3693
3649
|
*
|
|
3694
|
-
* @tags
|
|
3695
|
-
* @name
|
|
3696
|
-
* @operationId
|
|
3697
|
-
* @summary
|
|
3698
|
-
* @request
|
|
3650
|
+
* @tags RemoteTaskManager
|
|
3651
|
+
* @name UpdatePythonTaskResource
|
|
3652
|
+
* @operationId RemoteTaskManagerController_UpdatePythonTaskResource
|
|
3653
|
+
* @summary Update task resource.
|
|
3654
|
+
* @request PATCH:/scheduler/taskresource/{id}
|
|
3699
3655
|
* @secure
|
|
3700
3656
|
* @response `200` OK
|
|
3701
3657
|
*/
|
|
3702
|
-
|
|
3703
|
-
return this.http.
|
|
3658
|
+
updatePythonTaskResource(id, data) {
|
|
3659
|
+
return this.http.patch(`/scheduler/taskresource/${id}`, data).then(() => { });
|
|
3704
3660
|
}
|
|
3705
3661
|
/**
|
|
3706
3662
|
* No description
|
|
3707
3663
|
*
|
|
3708
|
-
* @tags
|
|
3709
|
-
* @name
|
|
3710
|
-
* @operationId
|
|
3711
|
-
* @summary
|
|
3712
|
-
* @request
|
|
3664
|
+
* @tags RemoteTaskManager
|
|
3665
|
+
* @name CreateTaskResource
|
|
3666
|
+
* @operationId RemoteTaskManagerController_CreateTaskResource
|
|
3667
|
+
* @summary Create task resource.
|
|
3668
|
+
* @request POST:/scheduler/taskresource
|
|
3713
3669
|
* @secure
|
|
3714
3670
|
* @response `200` OK
|
|
3715
3671
|
*/
|
|
3716
|
-
|
|
3717
|
-
return this.http.
|
|
3672
|
+
createTaskResource(data) {
|
|
3673
|
+
return this.http.post(`/scheduler/taskresource`, data).text();
|
|
3718
3674
|
}
|
|
3719
3675
|
/**
|
|
3720
3676
|
* No description
|
|
3721
3677
|
*
|
|
3722
|
-
* @tags
|
|
3723
|
-
* @name
|
|
3724
|
-
* @operationId
|
|
3725
|
-
* @summary
|
|
3726
|
-
* @request GET:/
|
|
3678
|
+
* @tags RemoteTaskManager
|
|
3679
|
+
* @name Get1
|
|
3680
|
+
* @operationId RemoteTaskManagerController_Get_1
|
|
3681
|
+
* @summary Shows active workers.
|
|
3682
|
+
* @request GET:/scheduler/worker
|
|
3727
3683
|
* @secure
|
|
3728
3684
|
* @response `200` OK
|
|
3729
3685
|
*/
|
|
3730
|
-
|
|
3731
|
-
return this.http.get(`/
|
|
3686
|
+
get1(query) {
|
|
3687
|
+
return this.http.get(`/scheduler/worker`, query).json();
|
|
3732
3688
|
}
|
|
3733
3689
|
/**
|
|
3734
3690
|
* No description
|
|
3735
3691
|
*
|
|
3736
|
-
* @tags
|
|
3737
|
-
* @name
|
|
3738
|
-
* @operationId
|
|
3739
|
-
* @summary
|
|
3740
|
-
* @request
|
|
3692
|
+
* @tags RemoteTaskManager
|
|
3693
|
+
* @name Post
|
|
3694
|
+
* @operationId RemoteTaskManagerController_Post
|
|
3695
|
+
* @summary Run method by HttpPost.
|
|
3696
|
+
* @request POST:/scheduler/worker
|
|
3741
3697
|
* @secure
|
|
3742
3698
|
* @response `200` OK
|
|
3743
3699
|
*/
|
|
3744
|
-
|
|
3745
|
-
return this.http.
|
|
3700
|
+
post(data) {
|
|
3701
|
+
return this.http.post(`/scheduler/worker`, data).json();
|
|
3746
3702
|
}
|
|
3747
3703
|
/**
|
|
3748
3704
|
* No description
|
|
3749
3705
|
*
|
|
3750
|
-
* @tags
|
|
3751
|
-
* @name
|
|
3752
|
-
* @operationId
|
|
3753
|
-
* @summary
|
|
3754
|
-
* @request GET:/
|
|
3706
|
+
* @tags RemoteTaskManager
|
|
3707
|
+
* @name GetWorker
|
|
3708
|
+
* @operationId RemoteTaskManagerController_GetWorker
|
|
3709
|
+
* @summary Get worker info by type.
|
|
3710
|
+
* @request GET:/scheduler/worker/{type}
|
|
3755
3711
|
* @secure
|
|
3756
3712
|
* @response `200` OK
|
|
3757
3713
|
*/
|
|
3758
|
-
|
|
3759
|
-
return this.http.get(`/
|
|
3714
|
+
getWorker(type) {
|
|
3715
|
+
return this.http.get(`/scheduler/worker/${type}`).json();
|
|
3760
3716
|
}
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3719
|
+
class RemoteTaskManager extends RemoteTaskManagerService {
|
|
3720
|
+
}
|
|
3721
|
+
|
|
3722
|
+
exports.DependencyType = void 0;
|
|
3723
|
+
(function (DependencyType) {
|
|
3724
|
+
DependencyType["Layer"] = "Layer";
|
|
3725
|
+
DependencyType["Table"] = "Table";
|
|
3726
|
+
DependencyType["Project"] = "Project";
|
|
3727
|
+
})(exports.DependencyType || (exports.DependencyType = {}));
|
|
3728
|
+
class Resources {
|
|
3729
|
+
projects;
|
|
3730
|
+
layers;
|
|
3731
|
+
tables;
|
|
3732
|
+
constructor(projects, layers, tables) {
|
|
3733
|
+
this.projects = projects;
|
|
3734
|
+
this.layers = layers;
|
|
3735
|
+
this.tables = tables;
|
|
3774
3736
|
}
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
getFilteredFeaturesCount2(name, data) {
|
|
3787
|
-
return this.http.post(`/layers/${name}/features/count`, data).json();
|
|
3737
|
+
async getProjectInfosWithDeps(projects) {
|
|
3738
|
+
const projectInfos = await this.projects.getProjectInfos(projects);
|
|
3739
|
+
const projectDeps = await this.projects.getProjectsDeps(projects);
|
|
3740
|
+
const { layers, tables } = await this.getDependencies(projectDeps, true, true);
|
|
3741
|
+
return {
|
|
3742
|
+
projects: projectInfos,
|
|
3743
|
+
deps: {
|
|
3744
|
+
layers,
|
|
3745
|
+
tables,
|
|
3746
|
+
},
|
|
3747
|
+
};
|
|
3788
3748
|
}
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3749
|
+
async getLayerInfosWithDeps(layers) {
|
|
3750
|
+
const layerInfos = await this.layers.getLayerInfos(layers);
|
|
3751
|
+
const layersDeps = await this.layers.getLayersDeps(layers);
|
|
3752
|
+
const { tables } = await this.getDependencies(layersDeps, false, true);
|
|
3753
|
+
return {
|
|
3754
|
+
layers: layerInfos,
|
|
3755
|
+
deps: {
|
|
3756
|
+
tables,
|
|
3757
|
+
},
|
|
3758
|
+
};
|
|
3759
|
+
}
|
|
3760
|
+
async getDependencies(resourceDeps, pickLayers, pickTables) {
|
|
3761
|
+
const { tables, layers } = resourceDeps.reduce((acc, layerDep) => {
|
|
3762
|
+
const deps = layerDep.dependencies || [];
|
|
3763
|
+
if (pickLayers) {
|
|
3764
|
+
const layerNames = this.getDependentNames(deps, exports.DependencyType.Layer);
|
|
3765
|
+
acc.layers.push(...layerNames);
|
|
3766
|
+
}
|
|
3767
|
+
if (pickTables) {
|
|
3768
|
+
const tableNames = this.getDependentNames(deps, exports.DependencyType.Table);
|
|
3769
|
+
acc.tables.push(...tableNames);
|
|
3770
|
+
}
|
|
3771
|
+
return acc;
|
|
3772
|
+
}, {
|
|
3773
|
+
tables: [],
|
|
3774
|
+
layers: [],
|
|
3775
|
+
});
|
|
3776
|
+
return {
|
|
3777
|
+
tables: await this.tables.getTableInfos(tables.filter(unique)),
|
|
3778
|
+
layers: await this.layers.getLayerInfos(layers.filter(unique)),
|
|
3779
|
+
};
|
|
3780
|
+
}
|
|
3781
|
+
getDependentNames(deps, depType) {
|
|
3782
|
+
return deps
|
|
3783
|
+
.filter(({ type }) => type === depType)
|
|
3784
|
+
.map(({ name }) => name)
|
|
3785
|
+
.filter(Boolean);
|
|
3802
3786
|
}
|
|
3787
|
+
}
|
|
3788
|
+
|
|
3789
|
+
/* eslint-disable */
|
|
3790
|
+
/* tslint:disable */
|
|
3791
|
+
/*
|
|
3792
|
+
* ---------------------------------------------------------------
|
|
3793
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
3794
|
+
* ## ##
|
|
3795
|
+
* ## AUTHOR: acacode ##
|
|
3796
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
3797
|
+
* ---------------------------------------------------------------
|
|
3798
|
+
*/
|
|
3799
|
+
// @ts-nocheck
|
|
3800
|
+
/**
|
|
3801
|
+
* @title Spatial Processing Gateway API
|
|
3802
|
+
* @version 1.5.1.0
|
|
3803
|
+
* @baseUrl /sp
|
|
3804
|
+
*/
|
|
3805
|
+
class SecurityService extends Service {
|
|
3803
3806
|
/**
|
|
3804
|
-
*
|
|
3807
|
+
* @description This method requires superuser permission.
|
|
3805
3808
|
*
|
|
3806
|
-
* @tags
|
|
3807
|
-
* @name
|
|
3808
|
-
* @operationId
|
|
3809
|
-
* @summary
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
* @request GET:/layers/{layerName}/validateExpression
|
|
3809
|
+
* @tags SecurityService
|
|
3810
|
+
* @name SetPolicies
|
|
3811
|
+
* @operationId SecurityServiceController_SetPolicies
|
|
3812
|
+
* @summary Adds the given policies to the server policy list. If a policy with the same type and user role already
|
|
3813
|
+
exists, it replaces the existing policy with the new one.
|
|
3814
|
+
* @request POST:/bulk/security/policies
|
|
3813
3815
|
* @secure
|
|
3814
3816
|
* @response `200` OK
|
|
3815
3817
|
*/
|
|
3816
|
-
|
|
3817
|
-
return this.http.
|
|
3818
|
+
setPolicies(data) {
|
|
3819
|
+
return this.http.post(`/bulk/security/policies`, data).then(() => { });
|
|
3818
3820
|
}
|
|
3819
3821
|
/**
|
|
3820
3822
|
* No description
|
|
3821
3823
|
*
|
|
3822
|
-
* @tags
|
|
3823
|
-
* @name
|
|
3824
|
-
* @operationId
|
|
3825
|
-
* @summary
|
|
3826
|
-
* @request GET:/
|
|
3824
|
+
* @tags SecurityService
|
|
3825
|
+
* @name FindUserByNameByRoles
|
|
3826
|
+
* @operationId SecurityServiceController_FindUserByNameByRoles
|
|
3827
|
+
* @summary Get users list with given roles list.
|
|
3828
|
+
* @request GET:/security/findUsersWithRoles
|
|
3827
3829
|
* @secure
|
|
3828
3830
|
* @response `200` OK
|
|
3829
3831
|
*/
|
|
3830
|
-
|
|
3831
|
-
return this.http.get(`/
|
|
3832
|
+
findUserByNameByRoles(query) {
|
|
3833
|
+
return this.http.get(`/security/findUsersWithRoles`, query).json();
|
|
3832
3834
|
}
|
|
3833
3835
|
/**
|
|
3834
3836
|
* No description
|
|
3835
3837
|
*
|
|
3836
|
-
* @tags
|
|
3837
|
-
* @name
|
|
3838
|
-
* @operationId
|
|
3839
|
-
* @summary Get
|
|
3840
|
-
* @request GET:/
|
|
3838
|
+
* @tags SecurityService
|
|
3839
|
+
* @name GetUsersAndRoles
|
|
3840
|
+
* @operationId SecurityServiceController_GetUsersAndRoles
|
|
3841
|
+
* @summary Get users and roles list by filter.
|
|
3842
|
+
* @request GET:/security/usersandroles
|
|
3841
3843
|
* @secure
|
|
3842
3844
|
* @response `200` OK
|
|
3843
3845
|
*/
|
|
3844
|
-
|
|
3845
|
-
return this.http.get(`/
|
|
3846
|
+
getUsersAndRoles(query) {
|
|
3847
|
+
return this.http.get(`/security/usersandroles`, query).json();
|
|
3846
3848
|
}
|
|
3847
3849
|
/**
|
|
3848
3850
|
* No description
|
|
3849
3851
|
*
|
|
3850
|
-
* @tags
|
|
3851
|
-
* @name
|
|
3852
|
-
* @operationId
|
|
3853
|
-
* @summary Returns the
|
|
3854
|
-
* @request GET:/
|
|
3852
|
+
* @tags SecurityService
|
|
3853
|
+
* @name FindUserByName
|
|
3854
|
+
* @operationId SecurityServiceController_FindUserByName
|
|
3855
|
+
* @summary Returns the list of users found by username.
|
|
3856
|
+
* @request GET:/security/users
|
|
3855
3857
|
* @secure
|
|
3856
3858
|
* @response `200` OK
|
|
3857
3859
|
*/
|
|
3858
|
-
|
|
3859
|
-
return this.http.get(`/
|
|
3860
|
+
findUserByName(query) {
|
|
3861
|
+
return this.http.get(`/security/users`, query).json();
|
|
3860
3862
|
}
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
return this.getLayersInfo({ layerNames, projectNames });
|
|
3875
|
-
}
|
|
3876
|
-
createLayer(configuration) {
|
|
3877
|
-
return this.publishService(configuration);
|
|
3878
|
-
}
|
|
3879
|
-
updateQueryLayer(configuration) {
|
|
3880
|
-
return this.patchQueryLayerService(configuration.name, configuration);
|
|
3881
|
-
}
|
|
3882
|
-
}
|
|
3883
|
-
function isTileLayerService(layer) {
|
|
3884
|
-
return [exports.LayerServiceType.PostgresTileLayerService, exports.LayerServiceType.RemoteTileLayerService].includes(layer.configuration?.layerType);
|
|
3885
|
-
}
|
|
3886
|
-
|
|
3887
|
-
const RESOURCE_TEMP_WORKSPACE = "temp";
|
|
3888
|
-
const generateFirstLatinLetter = nanoid.customAlphabet("abcdefghijklmnopqrstuvwxyz", 1);
|
|
3889
|
-
exports.ResourceSeparator = void 0;
|
|
3890
|
-
(function (ResourceSeparator) {
|
|
3891
|
-
ResourceSeparator["Server"] = ".";
|
|
3892
|
-
})(exports.ResourceSeparator || (exports.ResourceSeparator = {}));
|
|
3893
|
-
class Names {
|
|
3894
|
-
account;
|
|
3895
|
-
constructor({ account }) {
|
|
3896
|
-
this.account = account;
|
|
3863
|
+
/**
|
|
3864
|
+
* @description This method requires superuser permission.
|
|
3865
|
+
*
|
|
3866
|
+
* @tags SecurityService
|
|
3867
|
+
* @name GetPolicyList
|
|
3868
|
+
* @operationId SecurityServiceController_GetPolicyList
|
|
3869
|
+
* @summary Returns the list of server authorization policies of the given type.
|
|
3870
|
+
* @request GET:/security/policies
|
|
3871
|
+
* @secure
|
|
3872
|
+
* @response `200` OK
|
|
3873
|
+
*/
|
|
3874
|
+
getPolicyList(query) {
|
|
3875
|
+
return this.http.get(`/security/policies`, query).json();
|
|
3897
3876
|
}
|
|
3898
|
-
/**
|
|
3899
|
-
|
|
3900
|
-
|
|
3877
|
+
/**
|
|
3878
|
+
* @description This method requires superuser permission.
|
|
3879
|
+
*
|
|
3880
|
+
* @tags SecurityService
|
|
3881
|
+
* @name RemovePolicy
|
|
3882
|
+
* @operationId SecurityServiceController_RemovePolicy
|
|
3883
|
+
* @summary Removes the policy of the given type with the given role. If no such policy is found, nothing is done, and
|
|
3884
|
+
OK response is returned.
|
|
3885
|
+
* @request DELETE:/security/policies
|
|
3886
|
+
* @secure
|
|
3887
|
+
* @response `200` OK
|
|
3888
|
+
*/
|
|
3889
|
+
removePolicy(query) {
|
|
3890
|
+
return this.http.delete(`/security/policies`, null, query).then(() => { });
|
|
3901
3891
|
}
|
|
3902
|
-
/**
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3892
|
+
/**
|
|
3893
|
+
* @description This method requires superuser permission.
|
|
3894
|
+
*
|
|
3895
|
+
* @tags SecurityService
|
|
3896
|
+
* @name SetPolicy
|
|
3897
|
+
* @operationId SecurityServiceController_SetPolicy
|
|
3898
|
+
* @summary Adds the given policy to the server policy list. If a policy with the same type and user role already
|
|
3899
|
+
exists, it replaces the existing policy with the new one.
|
|
3900
|
+
* @request POST:/security/policies
|
|
3901
|
+
* @secure
|
|
3902
|
+
* @response `200` OK
|
|
3903
|
+
*/
|
|
3904
|
+
setPolicy(data) {
|
|
3905
|
+
return this.http.post(`/security/policies`, data).then(() => { });
|
|
3913
3906
|
}
|
|
3914
|
-
/**
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3907
|
+
/**
|
|
3908
|
+
* No description
|
|
3909
|
+
*
|
|
3910
|
+
* @tags SecurityService
|
|
3911
|
+
* @name CheckLimitsForUser
|
|
3912
|
+
* @operationId SecurityServiceController_CheckLimitsForUser
|
|
3913
|
+
* @summary Get limits of workspace.
|
|
3914
|
+
* @request GET:/security/limits/user
|
|
3915
|
+
* @secure
|
|
3916
|
+
* @response `200` OK
|
|
3917
|
+
*/
|
|
3918
|
+
checkLimitsForUser() {
|
|
3919
|
+
return this.http.get(`/security/limits/user`).json();
|
|
3920
3920
|
}
|
|
3921
|
-
/**
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
};
|
|
3921
|
+
/**
|
|
3922
|
+
* No description
|
|
3923
|
+
*
|
|
3924
|
+
* @tags SecurityService
|
|
3925
|
+
* @name CheckLimitsForUser1
|
|
3926
|
+
* @operationId SecurityServiceController_CheckLimitsForUser_1
|
|
3927
|
+
* @summary Get limits of workspace.
|
|
3928
|
+
* @request GET:/security/limits/user/{userName}
|
|
3929
|
+
* @secure
|
|
3930
|
+
* @response `200` OK
|
|
3931
|
+
*/
|
|
3932
|
+
checkLimitsForUser1(userName) {
|
|
3933
|
+
return this.http.get(`/security/limits/user/${userName}`).json();
|
|
3935
3934
|
}
|
|
3936
|
-
/**
|
|
3937
|
-
|
|
3938
|
-
|
|
3935
|
+
/**
|
|
3936
|
+
* No description
|
|
3937
|
+
*
|
|
3938
|
+
* @tags SecurityService
|
|
3939
|
+
* @name CheckLimitsForRole
|
|
3940
|
+
* @operationId SecurityServiceController_CheckLimitsForRole
|
|
3941
|
+
* @summary Get limits of workspace.
|
|
3942
|
+
* @request GET:/security/limits/role/{roleName}
|
|
3943
|
+
* @secure
|
|
3944
|
+
* @response `200` OK
|
|
3945
|
+
*/
|
|
3946
|
+
checkLimitsForRole(roleName) {
|
|
3947
|
+
return this.http.get(`/security/limits/role/${roleName}`).json();
|
|
3939
3948
|
}
|
|
3940
|
-
/**
|
|
3941
|
-
|
|
3942
|
-
|
|
3949
|
+
/**
|
|
3950
|
+
* No description
|
|
3951
|
+
*
|
|
3952
|
+
* @tags SecurityService
|
|
3953
|
+
* @name GetDefaultLimits
|
|
3954
|
+
* @operationId SecurityServiceController_GetDefaultLimits
|
|
3955
|
+
* @summary Get default limits of workspace.
|
|
3956
|
+
* @request GET:/security/limits/default
|
|
3957
|
+
* @secure
|
|
3958
|
+
* @response `200` OK
|
|
3959
|
+
*/
|
|
3960
|
+
getDefaultLimits() {
|
|
3961
|
+
return this.http.get(`/security/limits/default`).json();
|
|
3943
3962
|
}
|
|
3944
3963
|
}
|
|
3945
3964
|
|
|
3946
|
-
class
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3965
|
+
class Security extends SecurityService {
|
|
3966
|
+
ownerName = "";
|
|
3967
|
+
ownerRoles = [];
|
|
3968
|
+
constructor(http, { username, roles }) {
|
|
3969
|
+
super(http);
|
|
3970
|
+
this.ownerName = username;
|
|
3971
|
+
this.ownerRoles = roles;
|
|
3972
|
+
}
|
|
3973
|
+
reset() {
|
|
3974
|
+
this.ownerName = "";
|
|
3975
|
+
this.ownerRoles = [];
|
|
3951
3976
|
}
|
|
3952
3977
|
}
|
|
3953
3978
|
|
|
@@ -3967,449 +3992,365 @@ class PortalSettings extends ClientSettingsService {
|
|
|
3967
3992
|
* @version 1.5.1.0
|
|
3968
3993
|
* @baseUrl /sp
|
|
3969
3994
|
*/
|
|
3970
|
-
class
|
|
3995
|
+
class StatisticService extends Service {
|
|
3971
3996
|
/**
|
|
3972
3997
|
* No description
|
|
3973
3998
|
*
|
|
3974
|
-
* @tags
|
|
3975
|
-
* @name
|
|
3976
|
-
* @operationId
|
|
3977
|
-
* @summary
|
|
3978
|
-
* @request POST:/
|
|
3999
|
+
* @tags Statistic
|
|
4000
|
+
* @name StatisticsDb
|
|
4001
|
+
* @operationId StatisticController_StatisticsDb
|
|
4002
|
+
* @summary Calculates statistics for layer attribute.
|
|
4003
|
+
* @request POST:/statistics
|
|
3979
4004
|
* @secure
|
|
3980
4005
|
* @response `200` OK
|
|
3981
4006
|
*/
|
|
3982
|
-
|
|
3983
|
-
return this.http.post(`/
|
|
4007
|
+
statisticsDb(data) {
|
|
4008
|
+
return this.http.post(`/statistics`, data).json();
|
|
3984
4009
|
}
|
|
3985
4010
|
/**
|
|
3986
4011
|
* No description
|
|
3987
4012
|
*
|
|
3988
|
-
* @tags
|
|
3989
|
-
* @name
|
|
3990
|
-
* @operationId
|
|
3991
|
-
* @summary
|
|
3992
|
-
* @request
|
|
4013
|
+
* @tags Statistic
|
|
4014
|
+
* @name Classify
|
|
4015
|
+
* @operationId StatisticController_Classify
|
|
4016
|
+
* @summary Returns the classified attribute values that correspond to the given number of classes and given condition.
|
|
4017
|
+
* @request POST:/statistics/classify
|
|
3993
4018
|
* @secure
|
|
3994
4019
|
* @response `200` OK
|
|
3995
4020
|
*/
|
|
3996
|
-
|
|
3997
|
-
return this.http.
|
|
4021
|
+
classify(data) {
|
|
4022
|
+
return this.http.post(`/statistics/classify`, data).json();
|
|
3998
4023
|
}
|
|
3999
4024
|
/**
|
|
4000
4025
|
* No description
|
|
4001
4026
|
*
|
|
4002
|
-
* @tags
|
|
4003
|
-
* @name
|
|
4004
|
-
* @operationId
|
|
4005
|
-
* @summary
|
|
4006
|
-
* @request
|
|
4027
|
+
* @tags Statistic
|
|
4028
|
+
* @name SumOfProduct
|
|
4029
|
+
* @operationId StatisticController_SumOfProduct
|
|
4030
|
+
* @summary Sum of product.
|
|
4031
|
+
* @request POST:/statistics/sumOfProduct
|
|
4007
4032
|
* @secure
|
|
4008
4033
|
* @response `200` OK
|
|
4009
4034
|
*/
|
|
4010
|
-
|
|
4011
|
-
return this.http.
|
|
4035
|
+
sumOfProduct(data) {
|
|
4036
|
+
return this.http.post(`/statistics/sumOfProduct`, data).json();
|
|
4012
4037
|
}
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
class Statistic extends StatisticService {
|
|
4041
|
+
}
|
|
4042
|
+
|
|
4043
|
+
/* eslint-disable */
|
|
4044
|
+
/* tslint:disable */
|
|
4045
|
+
/*
|
|
4046
|
+
* ---------------------------------------------------------------
|
|
4047
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
4048
|
+
* ## ##
|
|
4049
|
+
* ## AUTHOR: acacode ##
|
|
4050
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
4051
|
+
* ---------------------------------------------------------------
|
|
4052
|
+
*/
|
|
4053
|
+
// @ts-nocheck
|
|
4054
|
+
/**
|
|
4055
|
+
* @title Spatial Processing Gateway API
|
|
4056
|
+
* @version 1.5.1.0
|
|
4057
|
+
* @baseUrl /sp
|
|
4058
|
+
*/
|
|
4059
|
+
class TablesService extends Service {
|
|
4013
4060
|
/**
|
|
4014
4061
|
* No description
|
|
4015
4062
|
*
|
|
4016
|
-
* @tags
|
|
4017
|
-
* @name
|
|
4018
|
-
* @operationId
|
|
4019
|
-
* @summary
|
|
4020
|
-
* @request
|
|
4063
|
+
* @tags Tables
|
|
4064
|
+
* @name CreateTable
|
|
4065
|
+
* @operationId TablesController_CreateTable
|
|
4066
|
+
* @summary Creates a new table.
|
|
4067
|
+
* @request POST:/tables
|
|
4021
4068
|
* @secure
|
|
4022
4069
|
* @response `200` OK
|
|
4023
4070
|
*/
|
|
4024
|
-
|
|
4025
|
-
return this.http.
|
|
4071
|
+
createTable(data) {
|
|
4072
|
+
return this.http.post(`/tables`, data).json();
|
|
4026
4073
|
}
|
|
4027
4074
|
/**
|
|
4028
4075
|
* No description
|
|
4029
4076
|
*
|
|
4030
|
-
* @tags
|
|
4031
|
-
* @name
|
|
4032
|
-
* @operationId
|
|
4033
|
-
* @summary
|
|
4034
|
-
* @request
|
|
4077
|
+
* @tags Tables
|
|
4078
|
+
* @name UpdateTable
|
|
4079
|
+
* @operationId TablesController_UpdateTable
|
|
4080
|
+
* @summary Update exists table.
|
|
4081
|
+
* @request PATCH:/tables/{name}
|
|
4035
4082
|
* @secure
|
|
4036
4083
|
* @response `200` OK
|
|
4037
4084
|
*/
|
|
4038
|
-
|
|
4039
|
-
return this.http.
|
|
4085
|
+
updateTable(name, data) {
|
|
4086
|
+
return this.http.patch(`/tables/${name}`, data).json();
|
|
4040
4087
|
}
|
|
4041
4088
|
/**
|
|
4042
4089
|
* No description
|
|
4043
4090
|
*
|
|
4044
|
-
* @tags
|
|
4045
|
-
* @name
|
|
4046
|
-
* @operationId
|
|
4047
|
-
* @summary
|
|
4048
|
-
* @request
|
|
4091
|
+
* @tags Tables
|
|
4092
|
+
* @name PutTable
|
|
4093
|
+
* @operationId TablesController_PutTable
|
|
4094
|
+
* @summary Override exists table.
|
|
4095
|
+
* @request PUT:/tables/{name}
|
|
4049
4096
|
* @secure
|
|
4050
4097
|
* @response `200` OK
|
|
4051
4098
|
*/
|
|
4052
|
-
|
|
4053
|
-
return this.http.
|
|
4099
|
+
putTable(name, data) {
|
|
4100
|
+
return this.http.put(`/tables/${name}`, data).json();
|
|
4054
4101
|
}
|
|
4055
4102
|
/**
|
|
4056
4103
|
* No description
|
|
4057
4104
|
*
|
|
4058
|
-
* @tags
|
|
4059
|
-
* @name
|
|
4060
|
-
* @operationId
|
|
4061
|
-
* @summary
|
|
4062
|
-
* @request GET:/
|
|
4105
|
+
* @tags Tables
|
|
4106
|
+
* @name GetTableInfo
|
|
4107
|
+
* @operationId TablesController_GetTableInfo
|
|
4108
|
+
* @summary Returns the table information and schema.
|
|
4109
|
+
* @request GET:/tables/{name}
|
|
4063
4110
|
* @secure
|
|
4064
4111
|
* @response `200` OK
|
|
4065
4112
|
*/
|
|
4066
|
-
|
|
4067
|
-
return this.http.get(`/
|
|
4113
|
+
getTableInfo(name) {
|
|
4114
|
+
return this.http.get(`/tables/${name}`).json();
|
|
4068
4115
|
}
|
|
4069
4116
|
/**
|
|
4070
4117
|
* No description
|
|
4071
4118
|
*
|
|
4072
|
-
* @tags
|
|
4073
|
-
* @name
|
|
4074
|
-
* @operationId
|
|
4075
|
-
* @summary Returns the
|
|
4076
|
-
* @request GET:/
|
|
4119
|
+
* @tags Tables
|
|
4120
|
+
* @name GetTablesInfo
|
|
4121
|
+
* @operationId TablesController_GetTablesInfoAsync
|
|
4122
|
+
* @summary Returns the tables information.
|
|
4123
|
+
* @request GET:/tables/batchInfo
|
|
4077
4124
|
* @secure
|
|
4078
4125
|
* @response `200` OK
|
|
4079
4126
|
*/
|
|
4080
|
-
|
|
4081
|
-
return this.http.get(`/
|
|
4082
|
-
}
|
|
4083
|
-
}
|
|
4084
|
-
|
|
4085
|
-
class Projects extends ProjectsService {
|
|
4086
|
-
getProjectInfos(projects) {
|
|
4087
|
-
return promiseAllIgnoreErrors(projects.map(project => this.getProjectInfo(project)));
|
|
4088
|
-
}
|
|
4089
|
-
getProjectsDeps(proejcts) {
|
|
4090
|
-
return promiseAllIgnoreErrors(proejcts.map(project => this.getResourceDependencies(project)));
|
|
4091
|
-
}
|
|
4092
|
-
findOne(name) {
|
|
4093
|
-
return this.getProjectInfo(name);
|
|
4094
|
-
}
|
|
4095
|
-
create(resource) {
|
|
4096
|
-
return this.createProject(resource);
|
|
4097
|
-
}
|
|
4098
|
-
update(resource) {
|
|
4099
|
-
return this.updateProject(resource.name, resource);
|
|
4127
|
+
getTablesInfo(query) {
|
|
4128
|
+
return this.http.get(`/tables/batchInfo`, query).json();
|
|
4100
4129
|
}
|
|
4101
|
-
}
|
|
4102
|
-
|
|
4103
|
-
/* eslint-disable */
|
|
4104
|
-
/* tslint:disable */
|
|
4105
|
-
/*
|
|
4106
|
-
* ---------------------------------------------------------------
|
|
4107
|
-
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
4108
|
-
* ## ##
|
|
4109
|
-
* ## AUTHOR: acacode ##
|
|
4110
|
-
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
4111
|
-
* ---------------------------------------------------------------
|
|
4112
|
-
*/
|
|
4113
|
-
// @ts-nocheck
|
|
4114
|
-
/**
|
|
4115
|
-
* @title Spatial Processing Gateway API
|
|
4116
|
-
* @version 1.5.1.0
|
|
4117
|
-
* @baseUrl /sp
|
|
4118
|
-
*/
|
|
4119
|
-
class RemoteTaskManagerService extends Service {
|
|
4120
4130
|
/**
|
|
4121
4131
|
* No description
|
|
4122
4132
|
*
|
|
4123
|
-
* @tags
|
|
4124
|
-
* @name
|
|
4125
|
-
* @operationId
|
|
4126
|
-
* @summary
|
|
4127
|
-
* @request GET:/
|
|
4133
|
+
* @tags Tables
|
|
4134
|
+
* @name GetTableData
|
|
4135
|
+
* @operationId TablesController_GetTableData
|
|
4136
|
+
* @summary Retrieves the data from the table.
|
|
4137
|
+
* @request GET:/tables/{name}/data
|
|
4128
4138
|
* @secure
|
|
4129
4139
|
* @response `200` OK
|
|
4130
4140
|
*/
|
|
4131
|
-
|
|
4132
|
-
return this.http.get(`/
|
|
4141
|
+
getTableData({ name, ...query }) {
|
|
4142
|
+
return this.http.get(`/tables/${name}/data`, query).json();
|
|
4133
4143
|
}
|
|
4134
4144
|
/**
|
|
4135
4145
|
* No description
|
|
4136
4146
|
*
|
|
4137
|
-
* @tags
|
|
4138
|
-
* @name
|
|
4139
|
-
* @operationId
|
|
4140
|
-
* @summary
|
|
4141
|
-
* @request POST:/
|
|
4147
|
+
* @tags Tables
|
|
4148
|
+
* @name WriteTableData
|
|
4149
|
+
* @operationId TablesController_WriteTableData
|
|
4150
|
+
* @summary Adds the data to the table.
|
|
4151
|
+
* @request POST:/tables/{name}/data
|
|
4142
4152
|
* @secure
|
|
4143
4153
|
* @response `200` OK
|
|
4144
4154
|
*/
|
|
4145
|
-
|
|
4146
|
-
return this.http.post(`/
|
|
4155
|
+
writeTableData(name, data) {
|
|
4156
|
+
return this.http.post(`/tables/${name}/data`, data).then(() => { });
|
|
4147
4157
|
}
|
|
4148
4158
|
/**
|
|
4149
4159
|
* No description
|
|
4150
4160
|
*
|
|
4151
|
-
* @tags
|
|
4152
|
-
* @name
|
|
4153
|
-
* @operationId
|
|
4154
|
-
* @summary
|
|
4155
|
-
* @request
|
|
4161
|
+
* @tags Tables
|
|
4162
|
+
* @name UpdateTableData
|
|
4163
|
+
* @operationId TablesController_UpdateTableData
|
|
4164
|
+
* @summary Updates the data in the table.
|
|
4165
|
+
* @request PATCH:/tables/{name}/data
|
|
4156
4166
|
* @secure
|
|
4157
4167
|
* @response `200` OK
|
|
4158
4168
|
*/
|
|
4159
|
-
|
|
4160
|
-
return this.http.
|
|
4169
|
+
updateTableData({ name, ...query }, data) {
|
|
4170
|
+
return this.http.patch(`/tables/${name}/data`, data, query).then(() => { });
|
|
4161
4171
|
}
|
|
4162
4172
|
/**
|
|
4163
4173
|
* No description
|
|
4164
4174
|
*
|
|
4165
|
-
* @tags
|
|
4166
|
-
* @name
|
|
4167
|
-
* @operationId
|
|
4168
|
-
* @summary
|
|
4169
|
-
* @request
|
|
4175
|
+
* @tags Tables
|
|
4176
|
+
* @name DeleteTableData
|
|
4177
|
+
* @operationId TablesController_DeleteTableData
|
|
4178
|
+
* @summary Delete data rows from the table.
|
|
4179
|
+
* @request DELETE:/tables/{name}/data
|
|
4170
4180
|
* @secure
|
|
4171
4181
|
* @response `200` OK
|
|
4172
4182
|
*/
|
|
4173
|
-
|
|
4174
|
-
return this.http.
|
|
4183
|
+
deleteTableData({ name, ...query }) {
|
|
4184
|
+
return this.http.delete(`/tables/${name}/data`, null, query).then(() => { });
|
|
4175
4185
|
}
|
|
4176
4186
|
/**
|
|
4177
4187
|
* No description
|
|
4178
4188
|
*
|
|
4179
|
-
* @tags
|
|
4180
|
-
* @name
|
|
4181
|
-
* @operationId
|
|
4182
|
-
* @summary
|
|
4183
|
-
* @request
|
|
4189
|
+
* @tags Tables
|
|
4190
|
+
* @name MapTable
|
|
4191
|
+
* @operationId TablesController_MapTable
|
|
4192
|
+
* @summary Map table to exists table.
|
|
4193
|
+
* @request POST:/tables/map-table
|
|
4184
4194
|
* @secure
|
|
4185
4195
|
* @response `200` OK
|
|
4186
4196
|
*/
|
|
4187
|
-
|
|
4188
|
-
return this.http.
|
|
4197
|
+
mapTable(query, data) {
|
|
4198
|
+
return this.http.post(`/tables/map-table`, data, query).json();
|
|
4189
4199
|
}
|
|
4190
4200
|
/**
|
|
4191
4201
|
* No description
|
|
4192
4202
|
*
|
|
4193
|
-
* @tags
|
|
4194
|
-
* @name
|
|
4195
|
-
* @operationId
|
|
4196
|
-
* @summary
|
|
4197
|
-
* @request DELETE:/
|
|
4203
|
+
* @tags Tables
|
|
4204
|
+
* @name UnmapTable
|
|
4205
|
+
* @operationId TablesController_UnmapTableAsync
|
|
4206
|
+
* @summary Unmap datasource from table.
|
|
4207
|
+
* @request DELETE:/tables/map-table/{name}
|
|
4198
4208
|
* @secure
|
|
4199
4209
|
* @response `200` OK
|
|
4200
4210
|
*/
|
|
4201
|
-
|
|
4202
|
-
return this.http.delete(`/
|
|
4211
|
+
unmapTable(name) {
|
|
4212
|
+
return this.http.delete(`/tables/map-table/${name}`, null).then(() => { });
|
|
4203
4213
|
}
|
|
4204
4214
|
/**
|
|
4205
4215
|
* No description
|
|
4206
4216
|
*
|
|
4207
|
-
* @tags
|
|
4208
|
-
* @name
|
|
4209
|
-
* @operationId
|
|
4210
|
-
* @summary
|
|
4211
|
-
* @request POST:/
|
|
4217
|
+
* @tags Tables
|
|
4218
|
+
* @name Enable
|
|
4219
|
+
* @operationId TablesController_EnableAsync
|
|
4220
|
+
* @summary Enable table history.
|
|
4221
|
+
* @request POST:/tables/{tableName}/history/enable
|
|
4212
4222
|
* @secure
|
|
4213
4223
|
* @response `200` OK
|
|
4214
4224
|
*/
|
|
4215
|
-
|
|
4216
|
-
return this.http.post(`/
|
|
4225
|
+
enable({ tableName, ...query }) {
|
|
4226
|
+
return this.http.post(`/tables/${tableName}/history/enable`, null, query).then(() => { });
|
|
4217
4227
|
}
|
|
4218
4228
|
/**
|
|
4219
4229
|
* No description
|
|
4220
4230
|
*
|
|
4221
|
-
* @tags
|
|
4222
|
-
* @name
|
|
4223
|
-
* @operationId
|
|
4224
|
-
* @summary
|
|
4225
|
-
* @request
|
|
4231
|
+
* @tags Tables
|
|
4232
|
+
* @name Disable
|
|
4233
|
+
* @operationId TablesController_DisableAsync
|
|
4234
|
+
* @summary Disable table history.
|
|
4235
|
+
* @request DELETE:/tables/{tableName}/history/disable
|
|
4226
4236
|
* @secure
|
|
4227
4237
|
* @response `200` OK
|
|
4228
4238
|
*/
|
|
4229
|
-
|
|
4230
|
-
return this.http.
|
|
4239
|
+
disable({ tableName, ...query }) {
|
|
4240
|
+
return this.http.delete(`/tables/${tableName}/history/disable`, null, query).then(() => { });
|
|
4231
4241
|
}
|
|
4232
4242
|
/**
|
|
4233
4243
|
* No description
|
|
4234
4244
|
*
|
|
4235
|
-
* @tags
|
|
4236
|
-
* @name
|
|
4237
|
-
* @operationId
|
|
4238
|
-
* @summary
|
|
4239
|
-
* @request
|
|
4245
|
+
* @tags Tables
|
|
4246
|
+
* @name Clean
|
|
4247
|
+
* @operationId TablesController_CleanAsync
|
|
4248
|
+
* @summary Clean table history.
|
|
4249
|
+
* @request DELETE:/tables/{tableName}/history/clean
|
|
4240
4250
|
* @secure
|
|
4241
4251
|
* @response `200` OK
|
|
4242
4252
|
*/
|
|
4243
|
-
|
|
4244
|
-
return this.http.
|
|
4253
|
+
clean({ tableName, ...query }) {
|
|
4254
|
+
return this.http.delete(`/tables/${tableName}/history/clean`, null, query).then(() => { });
|
|
4245
4255
|
}
|
|
4246
4256
|
/**
|
|
4247
4257
|
* No description
|
|
4248
4258
|
*
|
|
4249
|
-
* @tags
|
|
4250
|
-
* @name
|
|
4251
|
-
* @operationId
|
|
4252
|
-
* @summary
|
|
4253
|
-
* @request POST:/
|
|
4259
|
+
* @tags Tables
|
|
4260
|
+
* @name Get
|
|
4261
|
+
* @operationId TablesController_GetAsync
|
|
4262
|
+
* @summary Get history data.
|
|
4263
|
+
* @request POST:/tables/{tableName}/history
|
|
4254
4264
|
* @secure
|
|
4255
4265
|
* @response `200` OK
|
|
4256
4266
|
*/
|
|
4257
|
-
|
|
4258
|
-
return this.http.post(`/
|
|
4267
|
+
get(tableName, data) {
|
|
4268
|
+
return this.http.post(`/tables/${tableName}/history`, data).json();
|
|
4259
4269
|
}
|
|
4260
4270
|
/**
|
|
4261
4271
|
* No description
|
|
4262
4272
|
*
|
|
4263
|
-
* @tags
|
|
4264
|
-
* @name
|
|
4265
|
-
* @operationId
|
|
4266
|
-
* @summary
|
|
4267
|
-
* @request
|
|
4273
|
+
* @tags Tables
|
|
4274
|
+
* @name CreateViewFromQueryLayer
|
|
4275
|
+
* @operationId TablesController_CreateViewFromQueryLayer
|
|
4276
|
+
* @summary Creates a new view from query layer.
|
|
4277
|
+
* @request POST:/tables/fromLayer
|
|
4268
4278
|
* @secure
|
|
4269
4279
|
* @response `200` OK
|
|
4270
4280
|
*/
|
|
4271
|
-
|
|
4272
|
-
return this.http.
|
|
4281
|
+
createViewFromQueryLayer(data) {
|
|
4282
|
+
return this.http.post(`/tables/fromLayer`, data).json();
|
|
4273
4283
|
}
|
|
4274
4284
|
/**
|
|
4275
4285
|
* No description
|
|
4276
4286
|
*
|
|
4277
|
-
* @tags
|
|
4278
|
-
* @name
|
|
4279
|
-
* @operationId
|
|
4280
|
-
* @summary
|
|
4281
|
-
* @request
|
|
4282
|
-
* @secure
|
|
4283
|
-
* @response `200` OK
|
|
4284
|
-
*/
|
|
4285
|
-
updatePythonTaskResource(id, data) {
|
|
4286
|
-
return this.http.patch(`/scheduler/taskresource/${id}`, data).then(() => { });
|
|
4287
|
-
}
|
|
4288
|
-
/**
|
|
4289
|
-
* No description
|
|
4290
|
-
*
|
|
4291
|
-
* @tags RemoteTaskManager
|
|
4292
|
-
* @name CreateTaskResource
|
|
4293
|
-
* @operationId RemoteTaskManagerController_CreateTaskResource
|
|
4294
|
-
* @summary Create task resource.
|
|
4295
|
-
* @request POST:/scheduler/taskresource
|
|
4287
|
+
* @tags Tables
|
|
4288
|
+
* @name CreateViewFromQuery
|
|
4289
|
+
* @operationId TablesController_CreateViewFromQuery
|
|
4290
|
+
* @summary Creates a new view from query.
|
|
4291
|
+
* @request POST:/tables/fromQuery
|
|
4296
4292
|
* @secure
|
|
4297
4293
|
* @response `200` OK
|
|
4298
4294
|
*/
|
|
4299
|
-
|
|
4300
|
-
return this.http.post(`/
|
|
4295
|
+
createViewFromQuery(data) {
|
|
4296
|
+
return this.http.post(`/tables/fromQuery`, data).json();
|
|
4301
4297
|
}
|
|
4302
4298
|
/**
|
|
4303
4299
|
* No description
|
|
4304
4300
|
*
|
|
4305
|
-
* @tags
|
|
4306
|
-
* @name
|
|
4307
|
-
* @operationId
|
|
4308
|
-
* @summary
|
|
4309
|
-
* @request GET:/
|
|
4301
|
+
* @tags Tables
|
|
4302
|
+
* @name IsExists
|
|
4303
|
+
* @operationId TablesController_IsExistsAsync
|
|
4304
|
+
* @summary Check is resource exists.
|
|
4305
|
+
* @request GET:/tables/{name}/exists
|
|
4310
4306
|
* @secure
|
|
4311
4307
|
* @response `200` OK
|
|
4312
4308
|
*/
|
|
4313
|
-
|
|
4314
|
-
return this.http.get(`/
|
|
4309
|
+
isExists(name) {
|
|
4310
|
+
return this.http.get(`/tables/${name}/exists`).then(() => { });
|
|
4315
4311
|
}
|
|
4316
4312
|
/**
|
|
4317
4313
|
* No description
|
|
4318
4314
|
*
|
|
4319
|
-
* @tags
|
|
4320
|
-
* @name
|
|
4321
|
-
* @operationId
|
|
4322
|
-
* @summary
|
|
4323
|
-
* @request
|
|
4315
|
+
* @tags Tables
|
|
4316
|
+
* @name GetResourceDependencies
|
|
4317
|
+
* @operationId TablesController_GetResourceDependencies
|
|
4318
|
+
* @summary Get resource dependencies.
|
|
4319
|
+
* @request GET:/tables/{name}/dependencies
|
|
4324
4320
|
* @secure
|
|
4325
4321
|
* @response `200` OK
|
|
4326
4322
|
*/
|
|
4327
|
-
|
|
4328
|
-
return this.http.
|
|
4323
|
+
getResourceDependencies(name) {
|
|
4324
|
+
return this.http.get(`/tables/${name}/dependencies`).json();
|
|
4329
4325
|
}
|
|
4330
4326
|
/**
|
|
4331
4327
|
* No description
|
|
4332
4328
|
*
|
|
4333
|
-
* @tags
|
|
4334
|
-
* @name
|
|
4335
|
-
* @operationId
|
|
4336
|
-
* @summary
|
|
4337
|
-
* @request GET:/
|
|
4329
|
+
* @tags Tables
|
|
4330
|
+
* @name GetResourceReferences
|
|
4331
|
+
* @operationId TablesController_GetResourceReferences
|
|
4332
|
+
* @summary Returns the resource dependency information.
|
|
4333
|
+
* @request GET:/tables/{name}/references
|
|
4338
4334
|
* @secure
|
|
4339
4335
|
* @response `200` OK
|
|
4340
4336
|
*/
|
|
4341
|
-
|
|
4342
|
-
return this.http.get(`/
|
|
4337
|
+
getResourceReferences(name) {
|
|
4338
|
+
return this.http.get(`/tables/${name}/references`).json();
|
|
4343
4339
|
}
|
|
4344
4340
|
}
|
|
4345
4341
|
|
|
4346
|
-
class
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
exports.DependencyType = void 0;
|
|
4350
|
-
(function (DependencyType) {
|
|
4351
|
-
DependencyType["Layer"] = "Layer";
|
|
4352
|
-
DependencyType["Table"] = "Table";
|
|
4353
|
-
DependencyType["Project"] = "Project";
|
|
4354
|
-
})(exports.DependencyType || (exports.DependencyType = {}));
|
|
4355
|
-
class Resources {
|
|
4356
|
-
projects;
|
|
4357
|
-
layers;
|
|
4358
|
-
tables;
|
|
4359
|
-
constructor(projects, layers, tables) {
|
|
4360
|
-
this.projects = projects;
|
|
4361
|
-
this.layers = layers;
|
|
4362
|
-
this.tables = tables;
|
|
4363
|
-
}
|
|
4364
|
-
async getProjectInfosWithDeps(projects) {
|
|
4365
|
-
const projectInfos = await this.projects.getProjectInfos(projects);
|
|
4366
|
-
const projectDeps = await this.projects.getProjectsDeps(projects);
|
|
4367
|
-
const { layers, tables } = await this.getDependencies(projectDeps, true, true);
|
|
4368
|
-
return {
|
|
4369
|
-
projects: projectInfos,
|
|
4370
|
-
deps: {
|
|
4371
|
-
layers,
|
|
4372
|
-
tables,
|
|
4373
|
-
},
|
|
4374
|
-
};
|
|
4342
|
+
class Tables extends TablesService {
|
|
4343
|
+
getTableInfos(tables) {
|
|
4344
|
+
return promiseAllIgnoreErrors(tables.map(table => this.getTableInfo(table)));
|
|
4375
4345
|
}
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
const layersDeps = await this.layers.getLayersDeps(layers);
|
|
4379
|
-
const { tables } = await this.getDependencies(layersDeps, false, true);
|
|
4380
|
-
return {
|
|
4381
|
-
layers: layerInfos,
|
|
4382
|
-
deps: {
|
|
4383
|
-
tables,
|
|
4384
|
-
},
|
|
4385
|
-
};
|
|
4346
|
+
findOne(name) {
|
|
4347
|
+
return this.getTableInfo(name);
|
|
4386
4348
|
}
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
const deps = layerDep.dependencies || [];
|
|
4390
|
-
if (pickLayers) {
|
|
4391
|
-
const layerNames = this.getDependentNames(deps, exports.DependencyType.Layer);
|
|
4392
|
-
acc.layers.push(...layerNames);
|
|
4393
|
-
}
|
|
4394
|
-
if (pickTables) {
|
|
4395
|
-
const tableNames = this.getDependentNames(deps, exports.DependencyType.Table);
|
|
4396
|
-
acc.tables.push(...tableNames);
|
|
4397
|
-
}
|
|
4398
|
-
return acc;
|
|
4399
|
-
}, {
|
|
4400
|
-
tables: [],
|
|
4401
|
-
layers: [],
|
|
4402
|
-
});
|
|
4403
|
-
return {
|
|
4404
|
-
tables: await this.tables.getTableInfos(tables.filter(unique)),
|
|
4405
|
-
layers: await this.layers.getLayerInfos(layers.filter(unique)),
|
|
4406
|
-
};
|
|
4349
|
+
create(resource) {
|
|
4350
|
+
return this.createTable(resource);
|
|
4407
4351
|
}
|
|
4408
|
-
|
|
4409
|
-
return
|
|
4410
|
-
.filter(({ type }) => type === depType)
|
|
4411
|
-
.map(({ name }) => name)
|
|
4412
|
-
.filter(isString);
|
|
4352
|
+
update(table) {
|
|
4353
|
+
return this.updateTable(table.name, table);
|
|
4413
4354
|
}
|
|
4414
4355
|
}
|
|
4415
4356
|
|
|
@@ -4429,614 +4370,668 @@ class Resources {
|
|
|
4429
4370
|
* @version 1.5.1.0
|
|
4430
4371
|
* @baseUrl /sp
|
|
4431
4372
|
*/
|
|
4432
|
-
class
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4373
|
+
class ToolsService extends Service {
|
|
4374
|
+
}
|
|
4375
|
+
|
|
4376
|
+
class Tools extends ToolsService {
|
|
4377
|
+
}
|
|
4378
|
+
|
|
4379
|
+
/* eslint-disable */
|
|
4380
|
+
/* tslint:disable */
|
|
4381
|
+
/*
|
|
4382
|
+
* ---------------------------------------------------------------
|
|
4383
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
4384
|
+
* ## ##
|
|
4385
|
+
* ## AUTHOR: acacode ##
|
|
4386
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
4387
|
+
* ---------------------------------------------------------------
|
|
4388
|
+
*/
|
|
4389
|
+
// @ts-nocheck
|
|
4390
|
+
/**
|
|
4391
|
+
* @title Spatial Processing Gateway API
|
|
4392
|
+
* @version 1.5.1.0
|
|
4393
|
+
* @baseUrl /sp
|
|
4394
|
+
*/
|
|
4395
|
+
class VectorTileService extends Service {
|
|
4448
4396
|
/**
|
|
4449
4397
|
* No description
|
|
4450
4398
|
*
|
|
4451
|
-
* @tags
|
|
4452
|
-
* @name
|
|
4453
|
-
* @operationId
|
|
4454
|
-
* @summary Get
|
|
4455
|
-
* @request GET:/
|
|
4399
|
+
* @tags VectorTileService
|
|
4400
|
+
* @name GetVectorTile
|
|
4401
|
+
* @operationId VectorTileServiceController_GetVectorTile
|
|
4402
|
+
* @summary Get vector tile from visible project layers or single layer.
|
|
4403
|
+
* @request GET:/vt/{name}/{z}/{x}/{y}.pbf
|
|
4456
4404
|
* @secure
|
|
4457
4405
|
* @response `200` OK
|
|
4458
4406
|
*/
|
|
4459
|
-
|
|
4460
|
-
return this.http.get(`/
|
|
4407
|
+
getVectorTile({ name, z, x, y, ...query }) {
|
|
4408
|
+
return this.http.get(`/vt/${name}/{z}/{x}/{y}.pbf`, query).then(() => { });
|
|
4461
4409
|
}
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4412
|
+
class VectorTiles extends VectorTileService {
|
|
4413
|
+
}
|
|
4414
|
+
|
|
4415
|
+
/* eslint-disable */
|
|
4416
|
+
/* tslint:disable */
|
|
4417
|
+
/*
|
|
4418
|
+
* ---------------------------------------------------------------
|
|
4419
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
4420
|
+
* ## ##
|
|
4421
|
+
* ## AUTHOR: acacode ##
|
|
4422
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
4423
|
+
* ---------------------------------------------------------------
|
|
4424
|
+
*/
|
|
4425
|
+
// @ts-nocheck
|
|
4426
|
+
/**
|
|
4427
|
+
* @title Spatial Processing Gateway API
|
|
4428
|
+
* @version 1.5.1.0
|
|
4429
|
+
* @baseUrl /sp
|
|
4430
|
+
*/
|
|
4431
|
+
class DataSourceService extends Service {
|
|
4462
4432
|
/**
|
|
4463
4433
|
* No description
|
|
4464
4434
|
*
|
|
4465
|
-
* @tags
|
|
4466
|
-
* @name
|
|
4467
|
-
* @operationId
|
|
4468
|
-
* @summary
|
|
4469
|
-
* @request
|
|
4435
|
+
* @tags DataSource
|
|
4436
|
+
* @name TestConnection
|
|
4437
|
+
* @operationId DataSourceController_TestConnection
|
|
4438
|
+
* @summary Test ArcGIS data source connection.
|
|
4439
|
+
* @request POST:/ds/arcgis/test-connection
|
|
4470
4440
|
* @secure
|
|
4471
4441
|
* @response `200` OK
|
|
4472
4442
|
*/
|
|
4473
|
-
|
|
4474
|
-
return this.http.
|
|
4443
|
+
testConnection(data) {
|
|
4444
|
+
return this.http.post(`/ds/arcgis/test-connection`, data).then(() => { });
|
|
4475
4445
|
}
|
|
4476
4446
|
/**
|
|
4477
4447
|
* No description
|
|
4478
4448
|
*
|
|
4479
|
-
* @tags
|
|
4480
|
-
* @name
|
|
4481
|
-
* @operationId
|
|
4482
|
-
* @summary
|
|
4483
|
-
* @request
|
|
4449
|
+
* @tags DataSource
|
|
4450
|
+
* @name CreateArcGisDataSource
|
|
4451
|
+
* @operationId DataSourceController_CreateArcGisDataSource
|
|
4452
|
+
* @summary Create ArcGIS data source.
|
|
4453
|
+
* @request POST:/ds/arcgis
|
|
4484
4454
|
* @secure
|
|
4485
4455
|
* @response `200` OK
|
|
4486
4456
|
*/
|
|
4487
|
-
|
|
4488
|
-
return this.http.
|
|
4457
|
+
createArcGisDataSource(data) {
|
|
4458
|
+
return this.http.post(`/ds/arcgis`, data).then(() => { });
|
|
4489
4459
|
}
|
|
4490
4460
|
/**
|
|
4491
|
-
*
|
|
4461
|
+
* No description
|
|
4492
4462
|
*
|
|
4493
|
-
* @tags
|
|
4494
|
-
* @name
|
|
4495
|
-
* @operationId
|
|
4496
|
-
* @summary
|
|
4497
|
-
* @request
|
|
4463
|
+
* @tags DataSource
|
|
4464
|
+
* @name UpdateArcGisDataSource
|
|
4465
|
+
* @operationId DataSourceController_UpdateArcGisDataSource
|
|
4466
|
+
* @summary Update ArcGIS data source.
|
|
4467
|
+
* @request PATCH:/ds/arcgis
|
|
4498
4468
|
* @secure
|
|
4499
4469
|
* @response `200` OK
|
|
4500
4470
|
*/
|
|
4501
|
-
|
|
4502
|
-
return this.http.
|
|
4503
|
-
}
|
|
4504
|
-
/**
|
|
4505
|
-
* @description This method requires superuser permission.
|
|
4506
|
-
*
|
|
4507
|
-
* @tags SecurityService
|
|
4508
|
-
* @name RemovePolicy
|
|
4509
|
-
* @operationId SecurityServiceController_RemovePolicy
|
|
4510
|
-
* @summary Removes the policy of the given type with the given role. If no such policy is found, nothing is done, and
|
|
4511
|
-
OK response is returned.
|
|
4512
|
-
* @request DELETE:/security/policies
|
|
4513
|
-
* @secure
|
|
4514
|
-
* @response `200` OK
|
|
4515
|
-
*/
|
|
4516
|
-
removePolicy(query) {
|
|
4517
|
-
return this.http.delete(`/security/policies`, null, query).then(() => { });
|
|
4518
|
-
}
|
|
4519
|
-
/**
|
|
4520
|
-
* @description This method requires superuser permission.
|
|
4521
|
-
*
|
|
4522
|
-
* @tags SecurityService
|
|
4523
|
-
* @name SetPolicy
|
|
4524
|
-
* @operationId SecurityServiceController_SetPolicy
|
|
4525
|
-
* @summary Adds the given policy to the server policy list. If a policy with the same type and user role already
|
|
4526
|
-
exists, it replaces the existing policy with the new one.
|
|
4527
|
-
* @request POST:/security/policies
|
|
4528
|
-
* @secure
|
|
4529
|
-
* @response `200` OK
|
|
4530
|
-
*/
|
|
4531
|
-
setPolicy(data) {
|
|
4532
|
-
return this.http.post(`/security/policies`, data).then(() => { });
|
|
4471
|
+
updateArcGisDataSource(data) {
|
|
4472
|
+
return this.http.patch(`/ds/arcgis`, data).then(() => { });
|
|
4533
4473
|
}
|
|
4534
4474
|
/**
|
|
4535
4475
|
* No description
|
|
4536
4476
|
*
|
|
4537
|
-
* @tags
|
|
4538
|
-
* @name
|
|
4539
|
-
* @operationId
|
|
4540
|
-
* @summary
|
|
4541
|
-
* @request GET:/
|
|
4477
|
+
* @tags DataSource
|
|
4478
|
+
* @name GetDataSourcesList
|
|
4479
|
+
* @operationId DataSourceController_GetDataSourcesList
|
|
4480
|
+
* @summary Returns list of the available data sources.
|
|
4481
|
+
* @request GET:/ds
|
|
4542
4482
|
* @secure
|
|
4543
4483
|
* @response `200` OK
|
|
4544
4484
|
*/
|
|
4545
|
-
|
|
4546
|
-
return this.http.get(`/
|
|
4485
|
+
getDataSourcesList(query) {
|
|
4486
|
+
return this.http.get(`/ds`, query).json();
|
|
4547
4487
|
}
|
|
4548
4488
|
/**
|
|
4549
4489
|
* No description
|
|
4550
4490
|
*
|
|
4551
|
-
* @tags
|
|
4552
|
-
* @name
|
|
4553
|
-
* @operationId
|
|
4554
|
-
* @summary
|
|
4555
|
-
* @request
|
|
4491
|
+
* @tags DataSource
|
|
4492
|
+
* @name CreateDataSource
|
|
4493
|
+
* @operationId DataSourceController_CreateDataSource
|
|
4494
|
+
* @summary Create postgresql data source.
|
|
4495
|
+
* @request POST:/ds
|
|
4556
4496
|
* @secure
|
|
4557
4497
|
* @response `200` OK
|
|
4558
4498
|
*/
|
|
4559
|
-
|
|
4560
|
-
return this.http.
|
|
4499
|
+
createDataSource(data) {
|
|
4500
|
+
return this.http.post(`/ds`, data).then(() => { });
|
|
4561
4501
|
}
|
|
4562
4502
|
/**
|
|
4563
4503
|
* No description
|
|
4564
4504
|
*
|
|
4565
|
-
* @tags
|
|
4566
|
-
* @name
|
|
4567
|
-
* @operationId
|
|
4568
|
-
* @summary
|
|
4569
|
-
* @request
|
|
4505
|
+
* @tags DataSource
|
|
4506
|
+
* @name UpdateDataSource
|
|
4507
|
+
* @operationId DataSourceController_UpdateDataSource
|
|
4508
|
+
* @summary Update postgresql data source.
|
|
4509
|
+
* @request PATCH:/ds
|
|
4570
4510
|
* @secure
|
|
4571
4511
|
* @response `200` OK
|
|
4572
4512
|
*/
|
|
4573
|
-
|
|
4574
|
-
return this.http.
|
|
4513
|
+
updateDataSource(data) {
|
|
4514
|
+
return this.http.patch(`/ds`, data).then(() => { });
|
|
4575
4515
|
}
|
|
4576
4516
|
/**
|
|
4577
4517
|
* No description
|
|
4578
4518
|
*
|
|
4579
|
-
* @tags
|
|
4580
|
-
* @name
|
|
4581
|
-
* @operationId
|
|
4582
|
-
* @summary Get
|
|
4583
|
-
* @request GET:/
|
|
4519
|
+
* @tags DataSource
|
|
4520
|
+
* @name GetDataSource
|
|
4521
|
+
* @operationId DataSourceController_GetDataSource
|
|
4522
|
+
* @summary Get data source by name.
|
|
4523
|
+
* @request GET:/ds/{name}
|
|
4584
4524
|
* @secure
|
|
4585
4525
|
* @response `200` OK
|
|
4586
4526
|
*/
|
|
4587
|
-
|
|
4588
|
-
return this.http
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
class Security extends SecurityService {
|
|
4593
|
-
ownerName = "";
|
|
4594
|
-
ownerRoles = [];
|
|
4595
|
-
constructor(http, { username, roles }) {
|
|
4596
|
-
super(http);
|
|
4597
|
-
this.ownerName = username;
|
|
4598
|
-
this.ownerRoles = roles;
|
|
4599
|
-
}
|
|
4600
|
-
reset() {
|
|
4601
|
-
this.ownerName = "";
|
|
4602
|
-
this.ownerRoles = [];
|
|
4527
|
+
getDataSource(name) {
|
|
4528
|
+
return this.http
|
|
4529
|
+
.get(`/ds/${name}`)
|
|
4530
|
+
.json();
|
|
4603
4531
|
}
|
|
4604
|
-
}
|
|
4605
|
-
|
|
4606
|
-
/* eslint-disable */
|
|
4607
|
-
/* tslint:disable */
|
|
4608
|
-
/*
|
|
4609
|
-
* ---------------------------------------------------------------
|
|
4610
|
-
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
4611
|
-
* ## ##
|
|
4612
|
-
* ## AUTHOR: acacode ##
|
|
4613
|
-
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
4614
|
-
* ---------------------------------------------------------------
|
|
4615
|
-
*/
|
|
4616
|
-
// @ts-nocheck
|
|
4617
|
-
/**
|
|
4618
|
-
* @title Spatial Processing Gateway API
|
|
4619
|
-
* @version 1.5.1.0
|
|
4620
|
-
* @baseUrl /sp
|
|
4621
|
-
*/
|
|
4622
|
-
class StatisticService extends Service {
|
|
4623
4532
|
/**
|
|
4624
4533
|
* No description
|
|
4625
4534
|
*
|
|
4626
|
-
* @tags
|
|
4627
|
-
* @name
|
|
4628
|
-
* @operationId
|
|
4629
|
-
* @summary
|
|
4630
|
-
* @request
|
|
4535
|
+
* @tags DataSource
|
|
4536
|
+
* @name RemoveDataSource
|
|
4537
|
+
* @operationId DataSourceController_RemoveDataSource
|
|
4538
|
+
* @summary Remove data source by name.
|
|
4539
|
+
* @request DELETE:/ds/{name}
|
|
4631
4540
|
* @secure
|
|
4632
4541
|
* @response `200` OK
|
|
4633
4542
|
*/
|
|
4634
|
-
|
|
4635
|
-
return this.http.
|
|
4543
|
+
removeDataSource(name) {
|
|
4544
|
+
return this.http.delete(`/ds/${name}`, null).then(() => { });
|
|
4636
4545
|
}
|
|
4637
4546
|
/**
|
|
4638
4547
|
* No description
|
|
4639
4548
|
*
|
|
4640
|
-
* @tags
|
|
4641
|
-
* @name
|
|
4642
|
-
* @operationId
|
|
4643
|
-
* @summary
|
|
4644
|
-
* @request POST:/
|
|
4549
|
+
* @tags DataSource
|
|
4550
|
+
* @name TestConnection1
|
|
4551
|
+
* @operationId DataSourceController_TestConnection_1
|
|
4552
|
+
* @summary Test data.mos.ru data source connection.
|
|
4553
|
+
* @request POST:/ds/dataMosRu/test-connection
|
|
4645
4554
|
* @secure
|
|
4646
4555
|
* @response `200` OK
|
|
4647
4556
|
*/
|
|
4648
|
-
|
|
4649
|
-
return this.http.post(`/
|
|
4557
|
+
testConnection1(data) {
|
|
4558
|
+
return this.http.post(`/ds/dataMosRu/test-connection`, data).then(() => { });
|
|
4650
4559
|
}
|
|
4651
4560
|
/**
|
|
4652
4561
|
* No description
|
|
4653
4562
|
*
|
|
4654
|
-
* @tags
|
|
4655
|
-
* @name
|
|
4656
|
-
* @operationId
|
|
4657
|
-
* @summary
|
|
4658
|
-
* @request POST:/
|
|
4563
|
+
* @tags DataSource
|
|
4564
|
+
* @name CreateMosRuDataSource
|
|
4565
|
+
* @operationId DataSourceController_CreateMosRuDataSource
|
|
4566
|
+
* @summary Create data.mos.ru data source.
|
|
4567
|
+
* @request POST:/ds/dataMosRu
|
|
4659
4568
|
* @secure
|
|
4660
4569
|
* @response `200` OK
|
|
4661
4570
|
*/
|
|
4662
|
-
|
|
4663
|
-
return this.http.post(`/
|
|
4571
|
+
createMosRuDataSource(data) {
|
|
4572
|
+
return this.http.post(`/ds/dataMosRu`, data).then(() => { });
|
|
4664
4573
|
}
|
|
4665
|
-
}
|
|
4666
|
-
|
|
4667
|
-
class Statistic extends StatisticService {
|
|
4668
|
-
}
|
|
4669
|
-
|
|
4670
|
-
/* eslint-disable */
|
|
4671
|
-
/* tslint:disable */
|
|
4672
|
-
/*
|
|
4673
|
-
* ---------------------------------------------------------------
|
|
4674
|
-
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
4675
|
-
* ## ##
|
|
4676
|
-
* ## AUTHOR: acacode ##
|
|
4677
|
-
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
4678
|
-
* ---------------------------------------------------------------
|
|
4679
|
-
*/
|
|
4680
|
-
// @ts-nocheck
|
|
4681
|
-
/**
|
|
4682
|
-
* @title Spatial Processing Gateway API
|
|
4683
|
-
* @version 1.5.1.0
|
|
4684
|
-
* @baseUrl /sp
|
|
4685
|
-
*/
|
|
4686
|
-
class TablesService extends Service {
|
|
4687
4574
|
/**
|
|
4688
4575
|
* No description
|
|
4689
4576
|
*
|
|
4690
|
-
* @tags
|
|
4691
|
-
* @name
|
|
4692
|
-
* @operationId
|
|
4693
|
-
* @summary
|
|
4694
|
-
* @request
|
|
4577
|
+
* @tags DataSource
|
|
4578
|
+
* @name UpdateMosRuDataSource
|
|
4579
|
+
* @operationId DataSourceController_UpdateMosRuDataSource
|
|
4580
|
+
* @summary Update data.mos.ru data source.
|
|
4581
|
+
* @request PATCH:/ds/dataMosRu
|
|
4695
4582
|
* @secure
|
|
4696
4583
|
* @response `200` OK
|
|
4697
4584
|
*/
|
|
4698
|
-
|
|
4699
|
-
return this.http.
|
|
4585
|
+
updateMosRuDataSource(data) {
|
|
4586
|
+
return this.http.patch(`/ds/dataMosRu`, data).then(() => { });
|
|
4700
4587
|
}
|
|
4701
4588
|
/**
|
|
4702
4589
|
* No description
|
|
4703
4590
|
*
|
|
4704
|
-
* @tags
|
|
4705
|
-
* @name
|
|
4706
|
-
* @operationId
|
|
4707
|
-
* @summary
|
|
4708
|
-
* @request
|
|
4591
|
+
* @tags DataSource
|
|
4592
|
+
* @name TestConnection2
|
|
4593
|
+
* @operationId DataSourceController_TestConnection_2
|
|
4594
|
+
* @summary Test PostgreSQL data source connection.
|
|
4595
|
+
* @request POST:/ds/test-connection
|
|
4709
4596
|
* @secure
|
|
4710
4597
|
* @response `200` OK
|
|
4711
4598
|
*/
|
|
4712
|
-
|
|
4713
|
-
return this.http.
|
|
4599
|
+
testConnection2(data) {
|
|
4600
|
+
return this.http.post(`/ds/test-connection`, data).then(() => { });
|
|
4714
4601
|
}
|
|
4715
4602
|
/**
|
|
4716
4603
|
* No description
|
|
4717
4604
|
*
|
|
4718
|
-
* @tags
|
|
4719
|
-
* @name
|
|
4720
|
-
* @operationId
|
|
4721
|
-
* @summary
|
|
4722
|
-
* @request
|
|
4605
|
+
* @tags DataSource
|
|
4606
|
+
* @name TestConnection3
|
|
4607
|
+
* @operationId DataSourceController_TestConnection_3
|
|
4608
|
+
* @summary Test S3 data source connection.
|
|
4609
|
+
* @request POST:/ds/s3/test-connection
|
|
4723
4610
|
* @secure
|
|
4724
4611
|
* @response `200` OK
|
|
4725
4612
|
*/
|
|
4726
|
-
|
|
4727
|
-
return this.http.
|
|
4613
|
+
testConnection3(data) {
|
|
4614
|
+
return this.http.post(`/ds/s3/test-connection`, data).then(() => { });
|
|
4728
4615
|
}
|
|
4729
4616
|
/**
|
|
4730
4617
|
* No description
|
|
4731
4618
|
*
|
|
4732
|
-
* @tags
|
|
4733
|
-
* @name
|
|
4734
|
-
* @operationId
|
|
4735
|
-
* @summary
|
|
4736
|
-
* @request
|
|
4619
|
+
* @tags DataSource
|
|
4620
|
+
* @name CreateS3DataSource
|
|
4621
|
+
* @operationId DataSourceController_CreateS3DataSource
|
|
4622
|
+
* @summary Create S3 data source.
|
|
4623
|
+
* @request POST:/ds/s3
|
|
4737
4624
|
* @secure
|
|
4738
4625
|
* @response `200` OK
|
|
4739
4626
|
*/
|
|
4740
|
-
|
|
4741
|
-
return this.http.
|
|
4627
|
+
createS3DataSource(data) {
|
|
4628
|
+
return this.http.post(`/ds/s3`, data).then(() => { });
|
|
4742
4629
|
}
|
|
4743
4630
|
/**
|
|
4744
4631
|
* No description
|
|
4745
4632
|
*
|
|
4746
|
-
* @tags
|
|
4747
|
-
* @name
|
|
4748
|
-
* @operationId
|
|
4749
|
-
* @summary
|
|
4750
|
-
* @request
|
|
4633
|
+
* @tags DataSource
|
|
4634
|
+
* @name UpdateS3DataSource
|
|
4635
|
+
* @operationId DataSourceController_UpdateS3DataSource
|
|
4636
|
+
* @summary Update S3 data source.
|
|
4637
|
+
* @request PATCH:/ds/s3
|
|
4751
4638
|
* @secure
|
|
4752
4639
|
* @response `200` OK
|
|
4753
4640
|
*/
|
|
4754
|
-
|
|
4755
|
-
return this.http.
|
|
4641
|
+
updateS3DataSource(data) {
|
|
4642
|
+
return this.http.patch(`/ds/s3`, data).then(() => { });
|
|
4756
4643
|
}
|
|
4757
4644
|
/**
|
|
4758
4645
|
* No description
|
|
4759
4646
|
*
|
|
4760
|
-
* @tags
|
|
4761
|
-
* @name
|
|
4762
|
-
* @operationId
|
|
4763
|
-
* @summary
|
|
4764
|
-
* @request
|
|
4765
|
-
* @secure
|
|
4766
|
-
* @response `200` OK
|
|
4767
|
-
*/
|
|
4768
|
-
getTableData({ name, ...query }) {
|
|
4769
|
-
return this.http.get(`/tables/${name}/data`, query).json();
|
|
4770
|
-
}
|
|
4771
|
-
/**
|
|
4772
|
-
* No description
|
|
4773
|
-
*
|
|
4774
|
-
* @tags Tables
|
|
4775
|
-
* @name WriteTableData
|
|
4776
|
-
* @operationId TablesController_WriteTableData
|
|
4777
|
-
* @summary Adds the data to the table.
|
|
4778
|
-
* @request POST:/tables/{name}/data
|
|
4647
|
+
* @tags DataSource
|
|
4648
|
+
* @name CreateSparkDataSource
|
|
4649
|
+
* @operationId DataSourceController_CreateSparkDataSource
|
|
4650
|
+
* @summary Create spark data source.
|
|
4651
|
+
* @request POST:/ds/spark
|
|
4779
4652
|
* @secure
|
|
4780
4653
|
* @response `200` OK
|
|
4781
4654
|
*/
|
|
4782
|
-
|
|
4783
|
-
return this.http.post(`/
|
|
4655
|
+
createSparkDataSource(data) {
|
|
4656
|
+
return this.http.post(`/ds/spark`, data).then(() => { });
|
|
4784
4657
|
}
|
|
4785
4658
|
/**
|
|
4786
4659
|
* No description
|
|
4787
4660
|
*
|
|
4788
|
-
* @tags
|
|
4789
|
-
* @name
|
|
4790
|
-
* @operationId
|
|
4791
|
-
* @summary
|
|
4792
|
-
* @request PATCH:/
|
|
4661
|
+
* @tags DataSource
|
|
4662
|
+
* @name UpdateSparkDataSource
|
|
4663
|
+
* @operationId DataSourceController_UpdateSparkDataSource
|
|
4664
|
+
* @summary Update spark data source.
|
|
4665
|
+
* @request PATCH:/ds/spark
|
|
4793
4666
|
* @secure
|
|
4794
4667
|
* @response `200` OK
|
|
4795
4668
|
*/
|
|
4796
|
-
|
|
4797
|
-
return this.http.patch(`/
|
|
4669
|
+
updateSparkDataSource(data) {
|
|
4670
|
+
return this.http.patch(`/ds/spark`, data).then(() => { });
|
|
4798
4671
|
}
|
|
4672
|
+
}
|
|
4673
|
+
|
|
4674
|
+
/* eslint-disable */
|
|
4675
|
+
/* tslint:disable */
|
|
4676
|
+
/*
|
|
4677
|
+
* ---------------------------------------------------------------
|
|
4678
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
4679
|
+
* ## ##
|
|
4680
|
+
* ## AUTHOR: acacode ##
|
|
4681
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
4682
|
+
* ---------------------------------------------------------------
|
|
4683
|
+
*/
|
|
4684
|
+
// @ts-nocheck
|
|
4685
|
+
/**
|
|
4686
|
+
* @title Spatial Processing Gateway API
|
|
4687
|
+
* @version 1.5.1.0
|
|
4688
|
+
* @baseUrl /sp
|
|
4689
|
+
*/
|
|
4690
|
+
class QueryTokenAccessService extends Service {
|
|
4799
4691
|
/**
|
|
4800
4692
|
* No description
|
|
4801
4693
|
*
|
|
4802
|
-
* @tags
|
|
4803
|
-
* @name
|
|
4804
|
-
* @operationId
|
|
4805
|
-
* @
|
|
4806
|
-
* @request DELETE:/tables/{name}/data
|
|
4694
|
+
* @tags QueryTokenAccess
|
|
4695
|
+
* @name GetTokensList
|
|
4696
|
+
* @operationId QueryTokenAccessController_GetTokensList
|
|
4697
|
+
* @request GET:/accessToken/list/{username}
|
|
4807
4698
|
* @secure
|
|
4808
4699
|
* @response `200` OK
|
|
4809
4700
|
*/
|
|
4810
|
-
|
|
4811
|
-
return this.http.
|
|
4701
|
+
getTokensList({ username, ...query }) {
|
|
4702
|
+
return this.http.get(`/accessToken/list/${username}`, query).json();
|
|
4812
4703
|
}
|
|
4813
4704
|
/**
|
|
4814
4705
|
* No description
|
|
4815
4706
|
*
|
|
4816
|
-
* @tags
|
|
4817
|
-
* @name
|
|
4818
|
-
* @operationId
|
|
4819
|
-
* @
|
|
4820
|
-
* @request POST:/tables/map-table
|
|
4707
|
+
* @tags QueryTokenAccess
|
|
4708
|
+
* @name CreateToken
|
|
4709
|
+
* @operationId QueryTokenAccessController_CreateTokenAsync
|
|
4710
|
+
* @request PUT:/accessToken/{username}
|
|
4821
4711
|
* @secure
|
|
4822
4712
|
* @response `200` OK
|
|
4823
4713
|
*/
|
|
4824
|
-
|
|
4825
|
-
return this.http.
|
|
4714
|
+
createToken({ username, ...query }) {
|
|
4715
|
+
return this.http.put(`/accessToken/${username}`, null, query).text();
|
|
4826
4716
|
}
|
|
4827
4717
|
/**
|
|
4828
4718
|
* No description
|
|
4829
4719
|
*
|
|
4830
|
-
* @tags
|
|
4831
|
-
* @name
|
|
4832
|
-
* @operationId
|
|
4833
|
-
* @
|
|
4834
|
-
* @request DELETE:/tables/map-table/{name}
|
|
4720
|
+
* @tags QueryTokenAccess
|
|
4721
|
+
* @name DisableToken
|
|
4722
|
+
* @operationId QueryTokenAccessController_DisableToken
|
|
4723
|
+
* @request POST:/accessToken/{token}/disable
|
|
4835
4724
|
* @secure
|
|
4836
4725
|
* @response `200` OK
|
|
4837
4726
|
*/
|
|
4838
|
-
|
|
4839
|
-
return this.http.
|
|
4727
|
+
disableToken(token) {
|
|
4728
|
+
return this.http.post(`/accessToken/${token}/disable`, null).then(() => { });
|
|
4840
4729
|
}
|
|
4841
4730
|
/**
|
|
4842
4731
|
* No description
|
|
4843
4732
|
*
|
|
4844
|
-
* @tags
|
|
4845
|
-
* @name
|
|
4846
|
-
* @operationId
|
|
4847
|
-
* @
|
|
4848
|
-
* @request POST:/tables/{tableName}/history/enable
|
|
4733
|
+
* @tags QueryTokenAccess
|
|
4734
|
+
* @name EnableToken
|
|
4735
|
+
* @operationId QueryTokenAccessController_EnableToken
|
|
4736
|
+
* @request POST:/accessToken/{token}/enable
|
|
4849
4737
|
* @secure
|
|
4850
4738
|
* @response `200` OK
|
|
4851
4739
|
*/
|
|
4852
|
-
|
|
4853
|
-
return this.http.post(`/
|
|
4740
|
+
enableToken(token) {
|
|
4741
|
+
return this.http.post(`/accessToken/${token}/enable`, null).then(() => { });
|
|
4854
4742
|
}
|
|
4855
4743
|
/**
|
|
4856
4744
|
* No description
|
|
4857
4745
|
*
|
|
4858
|
-
* @tags
|
|
4859
|
-
* @name
|
|
4860
|
-
* @operationId
|
|
4861
|
-
* @
|
|
4862
|
-
* @request DELETE:/tables/{tableName}/history/disable
|
|
4746
|
+
* @tags QueryTokenAccess
|
|
4747
|
+
* @name RevokeToken
|
|
4748
|
+
* @operationId QueryTokenAccessController_RevokeToken
|
|
4749
|
+
* @request DELETE:/accessToken/{token}
|
|
4863
4750
|
* @secure
|
|
4864
4751
|
* @response `200` OK
|
|
4865
4752
|
*/
|
|
4866
|
-
|
|
4867
|
-
return this.http.delete(`/
|
|
4753
|
+
revokeToken(token) {
|
|
4754
|
+
return this.http.delete(`/accessToken/${token}`, null).then(() => { });
|
|
4868
4755
|
}
|
|
4756
|
+
}
|
|
4757
|
+
|
|
4758
|
+
/* eslint-disable */
|
|
4759
|
+
/* tslint:disable */
|
|
4760
|
+
/*
|
|
4761
|
+
* ---------------------------------------------------------------
|
|
4762
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
4763
|
+
* ## ##
|
|
4764
|
+
* ## AUTHOR: acacode ##
|
|
4765
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
4766
|
+
* ---------------------------------------------------------------
|
|
4767
|
+
*/
|
|
4768
|
+
// @ts-nocheck
|
|
4769
|
+
/**
|
|
4770
|
+
* @title Spatial Processing Gateway API
|
|
4771
|
+
* @version 1.5.1.0
|
|
4772
|
+
* @baseUrl /sp
|
|
4773
|
+
*/
|
|
4774
|
+
class SpatialReferencesService extends Service {
|
|
4869
4775
|
/**
|
|
4870
4776
|
* No description
|
|
4871
4777
|
*
|
|
4872
|
-
* @tags
|
|
4873
|
-
* @name
|
|
4874
|
-
* @operationId
|
|
4875
|
-
* @summary
|
|
4876
|
-
* @request
|
|
4778
|
+
* @tags SpatialReferences
|
|
4779
|
+
* @name GetAvailiableCs
|
|
4780
|
+
* @operationId SpatialReferencesController_GetAvailiableCsAsync
|
|
4781
|
+
* @summary Returns list of available spatial references.
|
|
4782
|
+
* @request GET:/srs/list
|
|
4877
4783
|
* @secure
|
|
4878
4784
|
* @response `200` OK
|
|
4879
4785
|
*/
|
|
4880
|
-
|
|
4881
|
-
return this.http.
|
|
4786
|
+
getAvailiableCs() {
|
|
4787
|
+
return this.http.get(`/srs/list`).json();
|
|
4882
4788
|
}
|
|
4883
4789
|
/**
|
|
4884
4790
|
* No description
|
|
4885
4791
|
*
|
|
4886
|
-
* @tags
|
|
4887
|
-
* @name
|
|
4888
|
-
* @operationId
|
|
4889
|
-
* @summary
|
|
4890
|
-
* @request
|
|
4792
|
+
* @tags SpatialReferences
|
|
4793
|
+
* @name GetProj4Representation
|
|
4794
|
+
* @operationId SpatialReferencesController_GetProj4RepresentationAsync
|
|
4795
|
+
* @summary Returns a WKT representation of spatial reference.
|
|
4796
|
+
* @request GET:/srs/{name}/proj4
|
|
4891
4797
|
* @secure
|
|
4892
4798
|
* @response `200` OK
|
|
4893
4799
|
*/
|
|
4894
|
-
|
|
4895
|
-
return this.http.
|
|
4800
|
+
getProj4Representation(name) {
|
|
4801
|
+
return this.http.get(`/srs/${name}/proj4`).text();
|
|
4896
4802
|
}
|
|
4897
4803
|
/**
|
|
4898
4804
|
* No description
|
|
4899
4805
|
*
|
|
4900
|
-
* @tags
|
|
4901
|
-
* @name
|
|
4902
|
-
* @operationId
|
|
4903
|
-
* @summary
|
|
4904
|
-
* @request
|
|
4806
|
+
* @tags SpatialReferences
|
|
4807
|
+
* @name GetWktRepresentation
|
|
4808
|
+
* @operationId SpatialReferencesController_GetWktRepresentationAsync
|
|
4809
|
+
* @summary Returns a WKT representation of spatial reference.
|
|
4810
|
+
* @request GET:/srs/{name}/wkt
|
|
4905
4811
|
* @secure
|
|
4906
4812
|
* @response `200` OK
|
|
4907
4813
|
*/
|
|
4908
|
-
|
|
4909
|
-
return this.http.
|
|
4814
|
+
getWktRepresentation(name) {
|
|
4815
|
+
return this.http.get(`/srs/${name}/wkt`).text();
|
|
4910
4816
|
}
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
createViewFromQuery(data) {
|
|
4923
|
-
return this.http.post(`/tables/fromQuery`, data).json();
|
|
4817
|
+
}
|
|
4818
|
+
|
|
4819
|
+
class EventEmitter {
|
|
4820
|
+
handlers = {
|
|
4821
|
+
"*": [],
|
|
4822
|
+
};
|
|
4823
|
+
on(type, handler) {
|
|
4824
|
+
if (!this.handlers[type]) {
|
|
4825
|
+
this.handlers[type] = [];
|
|
4826
|
+
}
|
|
4827
|
+
this.handlers[type].push(handler);
|
|
4924
4828
|
}
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
* @response `200` OK
|
|
4935
|
-
*/
|
|
4936
|
-
isExists(name) {
|
|
4937
|
-
return this.http.get(`/tables/${name}/exists`).then(() => { });
|
|
4829
|
+
off(type, handler) {
|
|
4830
|
+
if (!this.handlers[type]) {
|
|
4831
|
+
return;
|
|
4832
|
+
}
|
|
4833
|
+
const index = this.handlers[type].indexOf(handler);
|
|
4834
|
+
if (index === -1) {
|
|
4835
|
+
return;
|
|
4836
|
+
}
|
|
4837
|
+
this.handlers[type].splice(index, 1);
|
|
4938
4838
|
}
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
* @tags Tables
|
|
4943
|
-
* @name GetResourceDependencies
|
|
4944
|
-
* @operationId TablesController_GetResourceDependencies
|
|
4945
|
-
* @summary Get resource dependencies.
|
|
4946
|
-
* @request GET:/tables/{name}/dependencies
|
|
4947
|
-
* @secure
|
|
4948
|
-
* @response `200` OK
|
|
4949
|
-
*/
|
|
4950
|
-
getResourceDependencies(name) {
|
|
4951
|
-
return this.http.get(`/tables/${name}/dependencies`).json();
|
|
4839
|
+
emit(type, event) {
|
|
4840
|
+
this.handlers[type] && this.handlers[type].map(handler => handler(event));
|
|
4841
|
+
this.handlers["*"].map(handler => handler(type, event));
|
|
4952
4842
|
}
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
* @summary Returns the resource dependency information.
|
|
4960
|
-
* @request GET:/tables/{name}/references
|
|
4961
|
-
* @secure
|
|
4962
|
-
* @response `200` OK
|
|
4963
|
-
*/
|
|
4964
|
-
getResourceReferences(name) {
|
|
4965
|
-
return this.http.get(`/tables/${name}/references`).json();
|
|
4843
|
+
once(type, handler) {
|
|
4844
|
+
const onceHandler = event => {
|
|
4845
|
+
this.off(type, onceHandler);
|
|
4846
|
+
handler(event);
|
|
4847
|
+
};
|
|
4848
|
+
this.on(type, onceHandler);
|
|
4966
4849
|
}
|
|
4967
4850
|
}
|
|
4968
4851
|
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4852
|
+
exports.ApiEvent = void 0;
|
|
4853
|
+
(function (ApiEvent) {
|
|
4854
|
+
ApiEvent["Unauthorized"] = "Unauthorized";
|
|
4855
|
+
})(exports.ApiEvent || (exports.ApiEvent = {}));
|
|
4856
|
+
|
|
4857
|
+
exports.UrlPath = void 0;
|
|
4858
|
+
(function (UrlPath) {
|
|
4859
|
+
UrlPath["Base"] = "/map";
|
|
4860
|
+
UrlPath["Portal"] = "/portal";
|
|
4861
|
+
})(exports.UrlPath || (exports.UrlPath = {}));
|
|
4862
|
+
const URL_PATHS = Object.values(exports.UrlPath);
|
|
4863
|
+
const DEFAULT_URL_PATH = URL_PATHS[0];
|
|
4864
|
+
class Api extends EventEmitter {
|
|
4865
|
+
url;
|
|
4866
|
+
layers;
|
|
4867
|
+
tables;
|
|
4868
|
+
projects;
|
|
4869
|
+
security;
|
|
4870
|
+
file;
|
|
4871
|
+
filters;
|
|
4872
|
+
resources;
|
|
4873
|
+
geocode;
|
|
4874
|
+
tools;
|
|
4875
|
+
external;
|
|
4876
|
+
account;
|
|
4877
|
+
accountPreview;
|
|
4878
|
+
clientSettings;
|
|
4879
|
+
portalSettings;
|
|
4880
|
+
names;
|
|
4881
|
+
bulk;
|
|
4882
|
+
statistic;
|
|
4883
|
+
feedback;
|
|
4884
|
+
vectorTiles;
|
|
4885
|
+
spatialReference;
|
|
4886
|
+
eql;
|
|
4887
|
+
catalog;
|
|
4888
|
+
queryToken;
|
|
4889
|
+
dataSource;
|
|
4890
|
+
remoteTaskManager;
|
|
4891
|
+
catalogShare;
|
|
4892
|
+
history;
|
|
4893
|
+
http;
|
|
4894
|
+
urlPath;
|
|
4895
|
+
refreshingToken = false;
|
|
4896
|
+
constructor({ url, http, urlPath, httpOptions, }) {
|
|
4897
|
+
super();
|
|
4898
|
+
const { hooks } = httpOptions || {};
|
|
4899
|
+
this.http =
|
|
4900
|
+
http ||
|
|
4901
|
+
new HttpClient({
|
|
4902
|
+
prefixUrl: url,
|
|
4903
|
+
timeout: false,
|
|
4904
|
+
retry: {
|
|
4905
|
+
methods: ["get", "post", "patch", "delete"],
|
|
4906
|
+
limit: 5,
|
|
4907
|
+
statusCodes: [401],
|
|
4908
|
+
},
|
|
4909
|
+
...(httpOptions || {}),
|
|
4910
|
+
hooks: {
|
|
4911
|
+
...(hooks || {}),
|
|
4912
|
+
beforeRequest: [
|
|
4913
|
+
request => {
|
|
4914
|
+
const token = window.localStorage.getItem(STORAGE_TOKEN_KEY);
|
|
4915
|
+
if (token) {
|
|
4916
|
+
request.headers?.set("Authorization", `Bearer ${token || ""}`);
|
|
4917
|
+
}
|
|
4918
|
+
},
|
|
4919
|
+
...(hooks?.beforeRequest ?? []),
|
|
4920
|
+
],
|
|
4921
|
+
beforeRetry: [
|
|
4922
|
+
async ({ request, error, retryCount }) => {
|
|
4923
|
+
if (error instanceof ky.HTTPError &&
|
|
4924
|
+
retryCount === 1) {
|
|
4925
|
+
switch (error.response.status) {
|
|
4926
|
+
case 401:
|
|
4927
|
+
if (this.refreshingToken) {
|
|
4928
|
+
const currentToken = window.localStorage.getItem(STORAGE_TOKEN_KEY);
|
|
4929
|
+
request.headers?.set("Authorization", `Bearer ${currentToken || ""}`);
|
|
4930
|
+
return;
|
|
4931
|
+
}
|
|
4932
|
+
this.refreshingToken = true;
|
|
4933
|
+
try {
|
|
4934
|
+
const refreshToken = window.localStorage.getItem(STORAGE_REFRESH_TOKEN_KEY);
|
|
4935
|
+
if (refreshToken) {
|
|
4936
|
+
const refreshTokenResponse = await this.account.refreshToken({
|
|
4937
|
+
refreshToken,
|
|
4938
|
+
});
|
|
4939
|
+
if (refreshTokenResponse) {
|
|
4940
|
+
window.localStorage.setItem(STORAGE_TOKEN_KEY, refreshTokenResponse.token);
|
|
4941
|
+
window.localStorage.setItem(STORAGE_REFRESH_TOKEN_KEY, refreshTokenResponse.refreshToken);
|
|
4942
|
+
}
|
|
4943
|
+
request.headers?.set("Authorization", `Bearer ${refreshTokenResponse.token || ""}`);
|
|
4944
|
+
}
|
|
4945
|
+
else {
|
|
4946
|
+
await this.logout();
|
|
4947
|
+
}
|
|
4948
|
+
}
|
|
4949
|
+
catch (error) {
|
|
4950
|
+
await this.logout();
|
|
4951
|
+
}
|
|
4952
|
+
finally {
|
|
4953
|
+
this.refreshingToken = false;
|
|
4954
|
+
}
|
|
4955
|
+
break;
|
|
4956
|
+
}
|
|
4957
|
+
}
|
|
4958
|
+
},
|
|
4959
|
+
],
|
|
4960
|
+
},
|
|
4961
|
+
});
|
|
4962
|
+
this.url = url;
|
|
4963
|
+
this.urlPath = urlPath || this.defineUrlPath();
|
|
4964
|
+
this.layers = new Layers(this.http);
|
|
4965
|
+
this.tables = new Tables(this.http);
|
|
4966
|
+
this.projects = new Projects(this.http);
|
|
4967
|
+
this.resources = new Resources(this.projects, this.layers, this.tables);
|
|
4968
|
+
this.external = new External(this.http);
|
|
4969
|
+
this.account = new Account(this.http);
|
|
4970
|
+
this.accountPreview = new AccountPreview(this.http);
|
|
4971
|
+
this.bulk = new BulkOperations(this.http);
|
|
4972
|
+
this.security = new Security(this.http, this.account);
|
|
4973
|
+
this.file = new FileUpload(this.http);
|
|
4974
|
+
this.filters = new Filters(this.http);
|
|
4975
|
+
this.geocode = new Geocode(this.http);
|
|
4976
|
+
this.tools = new Tools(this.http);
|
|
4977
|
+
this.clientSettings = new ClientSettings(this.http);
|
|
4978
|
+
this.portalSettings = new PortalSettings(this.http);
|
|
4979
|
+
this.statistic = new Statistic(this.http);
|
|
4980
|
+
this.feedback = new Feedback(this.http);
|
|
4981
|
+
this.vectorTiles = new VectorTiles(this.http);
|
|
4982
|
+
this.spatialReference = new SpatialReferencesService(this.http);
|
|
4983
|
+
this.eql = new Eql(this.http);
|
|
4984
|
+
this.catalog = new CatalogService(this.http);
|
|
4985
|
+
this.queryToken = new QueryTokenAccessService(this.http);
|
|
4986
|
+
this.dataSource = new DataSourceService(this.http);
|
|
4987
|
+
this.remoteTaskManager = new RemoteTaskManager(this.http);
|
|
4988
|
+
this.catalogShare = new CatalogShare(this.http);
|
|
4989
|
+
this.history = new History(this.http);
|
|
4990
|
+
this.names = new Names({
|
|
4991
|
+
account: this.account,
|
|
4992
|
+
});
|
|
4972
4993
|
}
|
|
4973
|
-
|
|
4974
|
-
|
|
4994
|
+
async init({ authParams, authQueryParams, fetchSettings, fetchUser, useJwt, }) {
|
|
4995
|
+
try {
|
|
4996
|
+
await this.account.login(authParams, authQueryParams, useJwt);
|
|
4997
|
+
if (fetchUser) {
|
|
4998
|
+
await this.account.fetchCurrentUser();
|
|
4999
|
+
}
|
|
5000
|
+
if (fetchSettings) {
|
|
5001
|
+
await this.clientSettings.fetchClientSettings({
|
|
5002
|
+
urlPath: this.urlPath,
|
|
5003
|
+
});
|
|
5004
|
+
}
|
|
5005
|
+
}
|
|
5006
|
+
catch (e) {
|
|
5007
|
+
throw errorHandler(e);
|
|
5008
|
+
}
|
|
4975
5009
|
}
|
|
4976
|
-
|
|
4977
|
-
return
|
|
5010
|
+
isAcceptedNetwork(network) {
|
|
5011
|
+
return ["vk", "google", "facebook", "yandex"].includes(network);
|
|
4978
5012
|
}
|
|
4979
|
-
|
|
4980
|
-
|
|
5013
|
+
async socAuthLogin(network) {
|
|
5014
|
+
if (!this.isAcceptedNetwork(network))
|
|
5015
|
+
return;
|
|
5016
|
+
try {
|
|
5017
|
+
await this.clientSettings.fetchClientSettings({ urlPath: exports.UrlPath.Base });
|
|
5018
|
+
}
|
|
5019
|
+
catch (e) {
|
|
5020
|
+
throw errorHandler(e);
|
|
5021
|
+
}
|
|
4981
5022
|
}
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
*/
|
|
4994
|
-
// @ts-nocheck
|
|
4995
|
-
/**
|
|
4996
|
-
* @title Spatial Processing Gateway API
|
|
4997
|
-
* @version 1.5.1.0
|
|
4998
|
-
* @baseUrl /sp
|
|
4999
|
-
*/
|
|
5000
|
-
class ToolsService extends Service {
|
|
5001
|
-
}
|
|
5002
|
-
|
|
5003
|
-
class Tools extends ToolsService {
|
|
5004
|
-
}
|
|
5005
|
-
|
|
5006
|
-
/* eslint-disable */
|
|
5007
|
-
/* tslint:disable */
|
|
5008
|
-
/*
|
|
5009
|
-
* ---------------------------------------------------------------
|
|
5010
|
-
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
5011
|
-
* ## ##
|
|
5012
|
-
* ## AUTHOR: acacode ##
|
|
5013
|
-
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
5014
|
-
* ---------------------------------------------------------------
|
|
5015
|
-
*/
|
|
5016
|
-
// @ts-nocheck
|
|
5017
|
-
/**
|
|
5018
|
-
* @title Spatial Processing Gateway API
|
|
5019
|
-
* @version 1.5.1.0
|
|
5020
|
-
* @baseUrl /sp
|
|
5021
|
-
*/
|
|
5022
|
-
class VectorTileService extends Service {
|
|
5023
|
-
/**
|
|
5024
|
-
* No description
|
|
5025
|
-
*
|
|
5026
|
-
* @tags VectorTileService
|
|
5027
|
-
* @name GetVectorTile
|
|
5028
|
-
* @operationId VectorTileServiceController_GetVectorTile
|
|
5029
|
-
* @summary Get vector tile from visible project layers or single layer.
|
|
5030
|
-
* @request GET:/vt/{name}/{z}/{x}/{y}.pbf
|
|
5031
|
-
* @secure
|
|
5032
|
-
* @response `200` OK
|
|
5033
|
-
*/
|
|
5034
|
-
getVectorTile({ name, z, x, y, ...query }) {
|
|
5035
|
-
return this.http.get(`/vt/${name}/{z}/{x}/{y}.pbf`, query).then(() => { });
|
|
5023
|
+
async logout() {
|
|
5024
|
+
await this.account.logout();
|
|
5025
|
+
await this.security.reset();
|
|
5026
|
+
this.emit(exports.ApiEvent.Unauthorized, null);
|
|
5027
|
+
}
|
|
5028
|
+
defineUrlPath() {
|
|
5029
|
+
const firstPath = (window.location.href.split(window.location.hostname)[1] || "")
|
|
5030
|
+
.split("/")
|
|
5031
|
+
.filter(Boolean)[0];
|
|
5032
|
+
const urlPath = firstPath ? `/${firstPath}` : void 0;
|
|
5033
|
+
return urlPath && URL_PATHS.includes(urlPath) ? urlPath : DEFAULT_URL_PATH;
|
|
5036
5034
|
}
|
|
5037
|
-
}
|
|
5038
|
-
|
|
5039
|
-
class VectorTiles extends VectorTileService {
|
|
5040
5035
|
}
|
|
5041
5036
|
|
|
5042
5037
|
Object.defineProperty(exports, "HTTPError", {
|
|
@@ -5075,19 +5070,16 @@ exports.Statistic = Statistic;
|
|
|
5075
5070
|
exports.Tables = Tables;
|
|
5076
5071
|
exports.Tools = Tools;
|
|
5077
5072
|
exports.VectorTiles = VectorTiles;
|
|
5078
|
-
exports.addSubDomainToLocation = addSubDomainToLocation;
|
|
5079
5073
|
exports.errorHandler = errorHandler;
|
|
5080
|
-
exports.formDataFromFile = formDataFromFile;
|
|
5081
5074
|
exports.generateId = generateId;
|
|
5082
|
-
exports.
|
|
5075
|
+
exports.getUserInfo = getUserInfo;
|
|
5083
5076
|
exports.isHTTPError = isHTTPError;
|
|
5084
5077
|
exports.isHandledError = isHandledError;
|
|
5085
|
-
exports.isString = isString;
|
|
5086
5078
|
exports.isTileLayerService = isTileLayerService;
|
|
5087
5079
|
exports.parseJwt = parseJwt;
|
|
5088
5080
|
exports.promiseAllIgnoreErrors = promiseAllIgnoreErrors;
|
|
5089
|
-
exports.stripUselessSlashes = stripUselessSlashes;
|
|
5090
5081
|
exports.toFormData = toFormData;
|
|
5091
5082
|
exports.unique = unique;
|
|
5083
|
+
exports.updateUserInfo = updateUserInfo;
|
|
5092
5084
|
exports.useToken = useToken;
|
|
5093
5085
|
//# sourceMappingURL=index.js.map
|