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