@centia-io/sdk 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +639 -570
- package/dist/centia-io-sdk-node.js.map +1 -1
- package/dist/centia-io-sdk.cjs +306 -3
- package/dist/centia-io-sdk.d.cts +229 -3
- package/dist/centia-io-sdk.d.cts.map +1 -1
- package/dist/centia-io-sdk.d.ts +229 -3
- package/dist/centia-io-sdk.d.ts.map +1 -1
- package/dist/centia-io-sdk.js +305 -4
- package/dist/centia-io-sdk.js.map +1 -1
- package/dist/centia-io-sdk.umd.js +306 -3
- package/node.d.ts +1 -1
- package/package.json +48 -48
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"centia-io-sdk-node.js","names":["configstoreInstance: any | null","setChain: Promise<void>","Configstore: any","result: StoredCredentials","filePath: string","e: any"],"sources":["../src/auth/configstoreTokenStore.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"centia-io-sdk-node.js","names":["configstoreInstance: any | null","setChain: Promise<void>","Configstore: any","result: StoredCredentials","filePath: string","e: any"],"sources":["../src/auth/configstoreTokenStore.ts"],"sourcesContent":["/**\n * @author Martin Høgh <mh@mapcentia.com>\n * @copyright 2013-2026 MapCentia ApS\n * @license https://opensource.org/license/mit The MIT License\n *\n */\n\nimport type { StoredCredentials, TokenStore } from './types'\n\nconst LOCK_RETRIES = 5\nconst LOCK_RETRY_MIN_MS = 100\nconst LOCK_RETRY_MAX_MS = 500\nconst LOCK_STALE_MS = 10_000\n\n/**\n * Build a Node-only file-backed {@link TokenStore} that persists OAuth\n * credentials at `~/.config/configstore/<name>.json` (or\n * `$XDG_CONFIG_HOME/configstore/<name>.json` if set), with both in-process\n * and cross-process write safety.\n *\n * **Shared-state intent.** The `name` is the file name on disk. Two processes\n * (e.g. `gc2-cli` and a local MCP server) that pass the same name share the\n * same on-disk credentials and therefore the same login session. The default\n * `'gc2-env'` matches the name `gc2-cli` already uses, so a one-time\n * `gc2 login` is observable to every process that calls\n * `createConfigstoreTokenStore()` with no argument. Pass a different name\n * to isolate.\n *\n * **In-process correctness.** A serial promise chain on `set()` ensures\n * concurrent same-process calls do not race on the shared configstore cache.\n *\n * **Cross-process correctness.** `proper-lockfile` serializes the\n * read-merge-write critical section across processes so two simultaneous\n * `set()` calls from different processes cannot corrupt the file.\n *\n * **Node-only.** The dynamic imports keep `configstore` and `proper-lockfile`\n * out of browser bundles even when this module is imported through the SDK\n * barrel. Calling this function in a browser environment will fail at\n * runtime when the deferred `await import('configstore')` cannot resolve.\n *\n * @param name - configstore file name (without `.json`). Default `'gc2-env'`\n * matches `gc2-cli`'s configstore so credentials are shared.\n * @returns A {@link TokenStore} suitable for passing to {@link createTokenProvider}.\n */\nexport function createConfigstoreTokenStore(name = 'gc2-env'): TokenStore {\n let configstoreInstance: any | null = null\n let setChain: Promise<void> = Promise.resolve()\n\n async function getConfigstore(): Promise<any> {\n if (configstoreInstance) return configstoreInstance\n const mod = await import('configstore')\n const Configstore: any = (mod as any).default ?? mod\n const { homedir } = await import('node:os')\n const { join } = await import('node:path')\n // Resolve XDG_CONFIG_HOME at call time (not at module-load time):\n // configstore@7's transitive xdg-basedir snapshots the env var when\n // first imported, which would ignore per-test mutations and (more\n // importantly) couple our path to xdg-basedir's caching across\n // process lifetimes. Computing configPath ourselves keeps the\n // SDK's storage location stable regardless of dep version churn.\n const xdgConfig = process.env.XDG_CONFIG_HOME || join(homedir(), '.config')\n const configPath = join(xdgConfig, 'configstore', `${name}.json`)\n configstoreInstance = new Configstore(name, undefined, { configPath })\n return configstoreInstance\n }\n\n async function getLockfile(): Promise<typeof import('proper-lockfile')> {\n const mod = await import('proper-lockfile')\n return ((mod as any).default ?? mod) as typeof import('proper-lockfile')\n }\n\n function readAll(cs: any): StoredCredentials {\n const result: StoredCredentials = {}\n const token = cs.get('token')\n const refresh_token = cs.get('refresh_token')\n const host = cs.get('host')\n if (token !== undefined) result.token = token\n if (refresh_token !== undefined) result.refresh_token = refresh_token\n if (host !== undefined) result.host = host\n return result\n }\n\n async function doLockedSet(patch: Partial<StoredCredentials>): Promise<void> {\n const cs = await getConfigstore()\n const lockfile = await getLockfile()\n const filePath: string = cs.path\n\n // Ensure the file (and its directory) exist so proper-lockfile has\n // something to anchor on. `wx` is atomic create-if-not-exists, so this\n // is safe even if another process is racing to create the same file.\n const { mkdirSync, writeFileSync } = await import('node:fs')\n const { dirname } = await import('node:path')\n try {\n mkdirSync(dirname(filePath), { recursive: true })\n writeFileSync(filePath, '{}', { flag: 'wx' })\n } catch (e: any) {\n if (e?.code !== 'EEXIST') throw e\n }\n\n // realpath:false skips symlink resolution. configstore returns an\n // already-absolute path, and resolving symlinks would force an extra\n // stat (and breaks on macOS test tmpdirs which are symlinks).\n const release = await lockfile.lock(filePath, {\n retries: {\n retries: LOCK_RETRIES,\n minTimeout: LOCK_RETRY_MIN_MS,\n maxTimeout: LOCK_RETRY_MAX_MS,\n factor: 2,\n },\n stale: LOCK_STALE_MS,\n realpath: false,\n })\n\n try {\n // Force configstore to re-read the on-disk state so we merge\n // against the latest cross-process value, not a stale cache.\n configstoreInstance = null\n const fresh = await getConfigstore()\n const merged: StoredCredentials = { ...readAll(fresh), ...patch }\n ;(fresh as any).all = merged\n } finally {\n await release()\n }\n }\n\n return {\n async get(): Promise<StoredCredentials> {\n const cs = await getConfigstore()\n return readAll(cs)\n },\n\n async set(patch: Partial<StoredCredentials>): Promise<void> {\n const next = setChain.then(() => doLockedSet(patch))\n // Don't poison the chain on a rejection; the original error still\n // propagates via `next` to the caller.\n setChain = next.catch(() => {})\n return next\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,oBAAoB;AAC1B,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCtB,SAAgB,4BAA4B,OAAO,WAAuB;CACtE,IAAIA,sBAAkC;CACtC,IAAIC,WAA0B,QAAQ,SAAS;CAE/C,eAAe,iBAA+B;;AAC1C,MAAI,oBAAqB,QAAO;EAChC,MAAM,MAAM,MAAM,OAAO;EACzB,MAAMC,0BAAoB,IAAY,sDAAW;EACjD,MAAM,EAAE,YAAY,MAAM,OAAO;EACjC,MAAM,EAAE,SAAS,MAAM,OAAO;AAS9B,wBAAsB,IAAI,YAAY,MAAM,QAAW,EAAE,YADtC,KADD,QAAQ,IAAI,mBAAmB,KAAK,SAAS,EAAE,UAAU,EACxC,eAAe,GAAG,KAAK,OAAO,EACI,CAAC;AACtE,SAAO;;CAGX,eAAe,cAAyD;;EACpE,MAAM,MAAM,MAAM,OAAO;AACzB,sBAAS,IAAY,wDAAW;;CAGpC,SAAS,QAAQ,IAA4B;EACzC,MAAMC,SAA4B,EAAE;EACpC,MAAM,QAAQ,GAAG,IAAI,QAAQ;EAC7B,MAAM,gBAAgB,GAAG,IAAI,gBAAgB;EAC7C,MAAM,OAAO,GAAG,IAAI,OAAO;AAC3B,MAAI,UAAU,OAAW,QAAO,QAAQ;AACxC,MAAI,kBAAkB,OAAW,QAAO,gBAAgB;AACxD,MAAI,SAAS,OAAW,QAAO,OAAO;AACtC,SAAO;;CAGX,eAAe,YAAY,OAAkD;EACzE,MAAM,KAAK,MAAM,gBAAgB;EACjC,MAAM,WAAW,MAAM,aAAa;EACpC,MAAMC,WAAmB,GAAG;EAK5B,MAAM,EAAE,WAAW,kBAAkB,MAAM,OAAO;EAClD,MAAM,EAAE,YAAY,MAAM,OAAO;AACjC,MAAI;AACA,aAAU,QAAQ,SAAS,EAAE,EAAE,WAAW,MAAM,CAAC;AACjD,iBAAc,UAAU,MAAM,EAAE,MAAM,MAAM,CAAC;WACxCC,GAAQ;AACb,8CAAI,EAAG,UAAS,SAAU,OAAM;;EAMpC,MAAM,UAAU,MAAM,SAAS,KAAK,UAAU;GAC1C,SAAS;IACL,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,QAAQ;IACX;GACD,OAAO;GACP,UAAU;GACb,CAAC;AAEF,MAAI;AAGA,yBAAsB;GACtB,MAAM,QAAQ,MAAM,gBAAgB;AAEnC,GAAC,MAAc,wCADuB,QAAQ,MAAM,GAAK;YAEpD;AACN,SAAM,SAAS;;;AAIvB,QAAO;EACH,MAAM,MAAkC;AAEpC,UAAO,QADI,MAAM,gBAAgB,CACf;;EAGtB,MAAM,IAAI,OAAkD;GACxD,MAAM,OAAO,SAAS,WAAW,YAAY,MAAM,CAAC;AAGpD,cAAW,KAAK,YAAY,GAAG;AAC/B,UAAO;;EAEd"}
|
package/dist/centia-io-sdk.cjs
CHANGED
|
@@ -2352,6 +2352,169 @@ var Rules = class {
|
|
|
2352
2352
|
}
|
|
2353
2353
|
};
|
|
2354
2354
|
|
|
2355
|
+
//#endregion
|
|
2356
|
+
//#region src/provisioning/Layers.ts
|
|
2357
|
+
var Layers = class {
|
|
2358
|
+
constructor(client) {
|
|
2359
|
+
this.client = client;
|
|
2360
|
+
}
|
|
2361
|
+
layerPath(layer) {
|
|
2362
|
+
return `api/v4/layers/${encodeURIComponent(layer)}`;
|
|
2363
|
+
}
|
|
2364
|
+
classPath(layer, classId) {
|
|
2365
|
+
return `${this.layerPath(layer)}/classes/${encodeURIComponent(classId)}`;
|
|
2366
|
+
}
|
|
2367
|
+
async getLayer(layer, opts) {
|
|
2368
|
+
var _this = this;
|
|
2369
|
+
const path = layer ? _this.layerPath(layer) : "api/v4/layers";
|
|
2370
|
+
const query = {};
|
|
2371
|
+
if (opts === null || opts === void 0 ? void 0 : opts.namesOnly) query.namesOnly = "true";
|
|
2372
|
+
return _this.client.request({
|
|
2373
|
+
path,
|
|
2374
|
+
method: "GET",
|
|
2375
|
+
query: Object.keys(query).length > 0 ? query : void 0
|
|
2376
|
+
});
|
|
2377
|
+
}
|
|
2378
|
+
/** Configure existing layer(s): set properties and replace classes. */
|
|
2379
|
+
async postLayer(body) {
|
|
2380
|
+
var _this2 = this;
|
|
2381
|
+
var _res$getHeader;
|
|
2382
|
+
return { location: (_res$getHeader = (await _this2.client.requestFull({
|
|
2383
|
+
path: "api/v4/layers",
|
|
2384
|
+
method: "POST",
|
|
2385
|
+
body,
|
|
2386
|
+
expectedStatus: 201
|
|
2387
|
+
})).getHeader("Location")) !== null && _res$getHeader !== void 0 ? _res$getHeader : "" };
|
|
2388
|
+
}
|
|
2389
|
+
/** Update layer properties (key-merge on the def JSON). */
|
|
2390
|
+
async patchLayer(layer, body) {
|
|
2391
|
+
var _this3 = this;
|
|
2392
|
+
var _res$getHeader2;
|
|
2393
|
+
return { location: (_res$getHeader2 = (await _this3.client.requestFull({
|
|
2394
|
+
path: _this3.layerPath(layer),
|
|
2395
|
+
method: "PATCH",
|
|
2396
|
+
body,
|
|
2397
|
+
expectedStatus: 303
|
|
2398
|
+
})).getHeader("Location")) !== null && _res$getHeader2 !== void 0 ? _res$getHeader2 : "" };
|
|
2399
|
+
}
|
|
2400
|
+
async getLayerClass(layer, classId) {
|
|
2401
|
+
var _this4 = this;
|
|
2402
|
+
const path = classId != null ? _this4.classPath(layer, classId) : `${_this4.layerPath(layer)}/classes`;
|
|
2403
|
+
return _this4.client.request({
|
|
2404
|
+
path,
|
|
2405
|
+
method: "GET"
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
async postLayerClass(layer, body) {
|
|
2409
|
+
var _this5 = this;
|
|
2410
|
+
var _res$getHeader3;
|
|
2411
|
+
return { location: (_res$getHeader3 = (await _this5.client.requestFull({
|
|
2412
|
+
path: `${_this5.layerPath(layer)}/classes`,
|
|
2413
|
+
method: "POST",
|
|
2414
|
+
body,
|
|
2415
|
+
expectedStatus: 201
|
|
2416
|
+
})).getHeader("Location")) !== null && _res$getHeader3 !== void 0 ? _res$getHeader3 : "" };
|
|
2417
|
+
}
|
|
2418
|
+
/** Update a class (key-merge). Styles/labels are managed via their own methods. */
|
|
2419
|
+
async patchLayerClass(layer, classId, body) {
|
|
2420
|
+
var _this6 = this;
|
|
2421
|
+
var _res$getHeader4;
|
|
2422
|
+
return { location: (_res$getHeader4 = (await _this6.client.requestFull({
|
|
2423
|
+
path: _this6.classPath(layer, classId),
|
|
2424
|
+
method: "PATCH",
|
|
2425
|
+
body,
|
|
2426
|
+
expectedStatus: 303
|
|
2427
|
+
})).getHeader("Location")) !== null && _res$getHeader4 !== void 0 ? _res$getHeader4 : "" };
|
|
2428
|
+
}
|
|
2429
|
+
/** Delete class(es). `classId` may be a comma-separated list of ids. */
|
|
2430
|
+
async deleteLayerClass(layer, classId) {
|
|
2431
|
+
var _this7 = this;
|
|
2432
|
+
await _this7.client.request({
|
|
2433
|
+
path: _this7.classPath(layer, classId),
|
|
2434
|
+
method: "DELETE",
|
|
2435
|
+
expectedStatus: 204
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
async getStyle(layer, classId, styleId) {
|
|
2439
|
+
var _this8 = this;
|
|
2440
|
+
const base = `${_this8.classPath(layer, classId)}/styles`;
|
|
2441
|
+
const path = styleId != null ? `${base}/${encodeURIComponent(styleId)}` : base;
|
|
2442
|
+
return _this8.client.request({
|
|
2443
|
+
path,
|
|
2444
|
+
method: "GET"
|
|
2445
|
+
});
|
|
2446
|
+
}
|
|
2447
|
+
async postStyle(layer, classId, body) {
|
|
2448
|
+
var _this9 = this;
|
|
2449
|
+
var _res$getHeader5;
|
|
2450
|
+
return { location: (_res$getHeader5 = (await _this9.client.requestFull({
|
|
2451
|
+
path: `${_this9.classPath(layer, classId)}/styles`,
|
|
2452
|
+
method: "POST",
|
|
2453
|
+
body,
|
|
2454
|
+
expectedStatus: 201
|
|
2455
|
+
})).getHeader("Location")) !== null && _res$getHeader5 !== void 0 ? _res$getHeader5 : "" };
|
|
2456
|
+
}
|
|
2457
|
+
/** Update a style (key-merge). */
|
|
2458
|
+
async patchStyle(layer, classId, styleId, body) {
|
|
2459
|
+
var _this10 = this;
|
|
2460
|
+
var _res$getHeader6;
|
|
2461
|
+
return { location: (_res$getHeader6 = (await _this10.client.requestFull({
|
|
2462
|
+
path: `${_this10.classPath(layer, classId)}/styles/${encodeURIComponent(styleId)}`,
|
|
2463
|
+
method: "PATCH",
|
|
2464
|
+
body,
|
|
2465
|
+
expectedStatus: 303
|
|
2466
|
+
})).getHeader("Location")) !== null && _res$getHeader6 !== void 0 ? _res$getHeader6 : "" };
|
|
2467
|
+
}
|
|
2468
|
+
/** Delete style(s). `styleId` may be a comma-separated list of ids. */
|
|
2469
|
+
async deleteStyle(layer, classId, styleId) {
|
|
2470
|
+
var _this11 = this;
|
|
2471
|
+
await _this11.client.request({
|
|
2472
|
+
path: `${_this11.classPath(layer, classId)}/styles/${encodeURIComponent(styleId)}`,
|
|
2473
|
+
method: "DELETE",
|
|
2474
|
+
expectedStatus: 204
|
|
2475
|
+
});
|
|
2476
|
+
}
|
|
2477
|
+
async getLabel(layer, classId, labelId) {
|
|
2478
|
+
var _this12 = this;
|
|
2479
|
+
const base = `${_this12.classPath(layer, classId)}/labels`;
|
|
2480
|
+
const path = labelId != null ? `${base}/${encodeURIComponent(labelId)}` : base;
|
|
2481
|
+
return _this12.client.request({
|
|
2482
|
+
path,
|
|
2483
|
+
method: "GET"
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
async postLabel(layer, classId, body) {
|
|
2487
|
+
var _this13 = this;
|
|
2488
|
+
var _res$getHeader7;
|
|
2489
|
+
return { location: (_res$getHeader7 = (await _this13.client.requestFull({
|
|
2490
|
+
path: `${_this13.classPath(layer, classId)}/labels`,
|
|
2491
|
+
method: "POST",
|
|
2492
|
+
body,
|
|
2493
|
+
expectedStatus: 201
|
|
2494
|
+
})).getHeader("Location")) !== null && _res$getHeader7 !== void 0 ? _res$getHeader7 : "" };
|
|
2495
|
+
}
|
|
2496
|
+
/** Update a label (key-merge). */
|
|
2497
|
+
async patchLabel(layer, classId, labelId, body) {
|
|
2498
|
+
var _this14 = this;
|
|
2499
|
+
var _res$getHeader8;
|
|
2500
|
+
return { location: (_res$getHeader8 = (await _this14.client.requestFull({
|
|
2501
|
+
path: `${_this14.classPath(layer, classId)}/labels/${encodeURIComponent(labelId)}`,
|
|
2502
|
+
method: "PATCH",
|
|
2503
|
+
body,
|
|
2504
|
+
expectedStatus: 303
|
|
2505
|
+
})).getHeader("Location")) !== null && _res$getHeader8 !== void 0 ? _res$getHeader8 : "" };
|
|
2506
|
+
}
|
|
2507
|
+
/** Delete label(s). `labelId` may be a comma-separated list of ids. */
|
|
2508
|
+
async deleteLabel(layer, classId, labelId) {
|
|
2509
|
+
var _this15 = this;
|
|
2510
|
+
await _this15.client.request({
|
|
2511
|
+
path: `${_this15.classPath(layer, classId)}/labels/${encodeURIComponent(labelId)}`,
|
|
2512
|
+
method: "DELETE",
|
|
2513
|
+
expectedStatus: 204
|
|
2514
|
+
});
|
|
2515
|
+
}
|
|
2516
|
+
};
|
|
2517
|
+
|
|
2355
2518
|
//#endregion
|
|
2356
2519
|
//#region src/provisioning/Privileges.ts
|
|
2357
2520
|
var Privileges = class {
|
|
@@ -2525,11 +2688,14 @@ var MetadataWrite = class {
|
|
|
2525
2688
|
this.client = client;
|
|
2526
2689
|
}
|
|
2527
2690
|
async patchMetaData(body) {
|
|
2528
|
-
|
|
2691
|
+
var _this = this;
|
|
2692
|
+
var _res$getHeader;
|
|
2693
|
+
return { location: (_res$getHeader = (await _this.client.requestFull({
|
|
2529
2694
|
path: "api/v4/meta",
|
|
2530
2695
|
method: "PATCH",
|
|
2531
|
-
body
|
|
2532
|
-
|
|
2696
|
+
body,
|
|
2697
|
+
expectedStatus: 303
|
|
2698
|
+
})).getHeader("Location")) !== null && _res$getHeader !== void 0 ? _res$getHeader : "" };
|
|
2533
2699
|
}
|
|
2534
2700
|
};
|
|
2535
2701
|
|
|
@@ -2651,6 +2817,7 @@ function createCentiaAdminClient(config) {
|
|
|
2651
2817
|
users: new ProvisioningUsers(http),
|
|
2652
2818
|
clients: new ProvisioningClients(http),
|
|
2653
2819
|
rules: new Rules(http),
|
|
2820
|
+
layers: new Layers(http),
|
|
2654
2821
|
privileges: new Privileges(http),
|
|
2655
2822
|
rpcMethods: new RpcMethods(http),
|
|
2656
2823
|
functions: new Functions(http),
|
|
@@ -2662,6 +2829,140 @@ function createCentiaAdminClient(config) {
|
|
|
2662
2829
|
};
|
|
2663
2830
|
}
|
|
2664
2831
|
|
|
2832
|
+
//#endregion
|
|
2833
|
+
//#region src/ogc/Ows.ts
|
|
2834
|
+
function toQuery$1(params) {
|
|
2835
|
+
if (!params) return void 0;
|
|
2836
|
+
const query = {};
|
|
2837
|
+
for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null) query[key] = String(value);
|
|
2838
|
+
return Object.keys(query).length > 0 ? query : void 0;
|
|
2839
|
+
}
|
|
2840
|
+
/**
|
|
2841
|
+
* OWS (WMS/WFS/UTFGRID) endpoint wrapper.
|
|
2842
|
+
*
|
|
2843
|
+
* Token-authenticated clients use `getOws`/`postOws`; anonymous and HTTP-Basic
|
|
2844
|
+
* clients use the `...NoToken` variants, which include the database in the path.
|
|
2845
|
+
*
|
|
2846
|
+
* Responses are streamed from the backend and returned as text (XML) or, for
|
|
2847
|
+
* JSON responses such as UTFGRID, as parsed JSON. Binary responses (e.g. WMS
|
|
2848
|
+
* GetMap images) are not supported by this wrapper — request those directly.
|
|
2849
|
+
*/
|
|
2850
|
+
var Ows = class {
|
|
2851
|
+
constructor(client) {
|
|
2852
|
+
this.client = client;
|
|
2853
|
+
}
|
|
2854
|
+
/** Token-authenticated OWS GET (WMS/WFS/UTFGRID). */
|
|
2855
|
+
async getOws(schema, params) {
|
|
2856
|
+
return this.client.request({
|
|
2857
|
+
path: `api/v4/ows/schema/${encodeURIComponent(schema)}`,
|
|
2858
|
+
method: "GET",
|
|
2859
|
+
query: toQuery$1(params),
|
|
2860
|
+
accept: "*/*"
|
|
2861
|
+
});
|
|
2862
|
+
}
|
|
2863
|
+
/** Token-authenticated OWS POST (WFS XML). */
|
|
2864
|
+
async postOws(schema, xml) {
|
|
2865
|
+
return this.client.request({
|
|
2866
|
+
path: `api/v4/ows/schema/${encodeURIComponent(schema)}`,
|
|
2867
|
+
method: "POST",
|
|
2868
|
+
body: xml,
|
|
2869
|
+
contentType: "text/xml",
|
|
2870
|
+
accept: "*/*"
|
|
2871
|
+
});
|
|
2872
|
+
}
|
|
2873
|
+
/** Anonymous/HTTP-Basic OWS GET (WMS/WFS/UTFGRID). */
|
|
2874
|
+
async getOwsNoToken(schema, database, params) {
|
|
2875
|
+
return this.client.request({
|
|
2876
|
+
path: `api/v4/ows/schema/${encodeURIComponent(schema)}/database/${encodeURIComponent(database)}`,
|
|
2877
|
+
method: "GET",
|
|
2878
|
+
query: toQuery$1(params),
|
|
2879
|
+
accept: "*/*"
|
|
2880
|
+
});
|
|
2881
|
+
}
|
|
2882
|
+
/** Anonymous/HTTP-Basic OWS POST (WFS XML). */
|
|
2883
|
+
async postOwsNoToken(schema, database, xml) {
|
|
2884
|
+
return this.client.request({
|
|
2885
|
+
path: `api/v4/ows/schema/${encodeURIComponent(schema)}/database/${encodeURIComponent(database)}`,
|
|
2886
|
+
method: "POST",
|
|
2887
|
+
body: xml,
|
|
2888
|
+
contentType: "text/xml",
|
|
2889
|
+
accept: "*/*"
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
};
|
|
2893
|
+
|
|
2894
|
+
//#endregion
|
|
2895
|
+
//#region src/ogc/Wfs.ts
|
|
2896
|
+
function wfsPath(base, options) {
|
|
2897
|
+
let path = base;
|
|
2898
|
+
if ((options === null || options === void 0 ? void 0 : options.timeSlice) != null && options.srs == null) throw new Error("timeSlice requires srs to be set");
|
|
2899
|
+
if ((options === null || options === void 0 ? void 0 : options.srs) != null) {
|
|
2900
|
+
path += `/srs/${encodeURIComponent(options.srs)}`;
|
|
2901
|
+
if (options.timeSlice != null) path += `/${encodeURIComponent(options.timeSlice)}`;
|
|
2902
|
+
}
|
|
2903
|
+
return path;
|
|
2904
|
+
}
|
|
2905
|
+
function toQuery(params) {
|
|
2906
|
+
const query = { SERVICE: "WFS" };
|
|
2907
|
+
for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null) query[key] = String(value);
|
|
2908
|
+
return query;
|
|
2909
|
+
}
|
|
2910
|
+
/**
|
|
2911
|
+
* WFS endpoint wrapper (GetCapabilities, DescribeFeatureType, GetFeature and
|
|
2912
|
+
* WFS-T transactions).
|
|
2913
|
+
*
|
|
2914
|
+
* Token-authenticated clients use `getWfs`/`postWfs`; anonymous and HTTP-Basic
|
|
2915
|
+
* clients (e.g. QGIS) use the `...NoToken` variants, which include the
|
|
2916
|
+
* database in the path. Responses are returned as XML text.
|
|
2917
|
+
*/
|
|
2918
|
+
var Wfs = class {
|
|
2919
|
+
constructor(client) {
|
|
2920
|
+
this.client = client;
|
|
2921
|
+
}
|
|
2922
|
+
/** Token-authenticated WFS GET. */
|
|
2923
|
+
async getWfs(schema, params, options) {
|
|
2924
|
+
return this.client.request({
|
|
2925
|
+
path: wfsPath(`api/v4/wfs/schema/${encodeURIComponent(schema)}`, options),
|
|
2926
|
+
method: "GET",
|
|
2927
|
+
query: toQuery(params),
|
|
2928
|
+
accept: "text/xml"
|
|
2929
|
+
});
|
|
2930
|
+
}
|
|
2931
|
+
/** Token-authenticated WFS POST (XML-encoded GetFeature or Transaction). */
|
|
2932
|
+
async postWfs(schema, xml, options) {
|
|
2933
|
+
return this.client.request({
|
|
2934
|
+
path: wfsPath(`api/v4/wfs/schema/${encodeURIComponent(schema)}`, options),
|
|
2935
|
+
method: "POST",
|
|
2936
|
+
body: xml,
|
|
2937
|
+
contentType: "text/xml",
|
|
2938
|
+
accept: "text/xml"
|
|
2939
|
+
});
|
|
2940
|
+
}
|
|
2941
|
+
/** Anonymous/HTTP-Basic WFS GET. */
|
|
2942
|
+
async getWfsNoToken(schema, database, params, options) {
|
|
2943
|
+
var _this3 = this;
|
|
2944
|
+
const base = `api/v4/wfs/schema/${encodeURIComponent(schema)}/database/${encodeURIComponent(database)}`;
|
|
2945
|
+
return _this3.client.request({
|
|
2946
|
+
path: wfsPath(base, options),
|
|
2947
|
+
method: "GET",
|
|
2948
|
+
query: toQuery(params),
|
|
2949
|
+
accept: "text/xml"
|
|
2950
|
+
});
|
|
2951
|
+
}
|
|
2952
|
+
/** Anonymous/HTTP-Basic WFS POST (XML-encoded GetFeature or Transaction). */
|
|
2953
|
+
async postWfsNoToken(schema, database, xml, options) {
|
|
2954
|
+
var _this4 = this;
|
|
2955
|
+
const base = `api/v4/wfs/schema/${encodeURIComponent(schema)}/database/${encodeURIComponent(database)}`;
|
|
2956
|
+
return _this4.client.request({
|
|
2957
|
+
path: wfsPath(base, options),
|
|
2958
|
+
method: "POST",
|
|
2959
|
+
body: xml,
|
|
2960
|
+
contentType: "text/xml",
|
|
2961
|
+
accept: "text/xml"
|
|
2962
|
+
});
|
|
2963
|
+
}
|
|
2964
|
+
};
|
|
2965
|
+
|
|
2665
2966
|
//#endregion
|
|
2666
2967
|
//#region src/auth/errors.ts
|
|
2667
2968
|
/**
|
|
@@ -2790,6 +3091,7 @@ exports.CodeFlow = CodeFlow;
|
|
|
2790
3091
|
exports.Gql = Gql;
|
|
2791
3092
|
exports.Meta = Meta;
|
|
2792
3093
|
exports.NotLoggedInError = NotLoggedInError;
|
|
3094
|
+
exports.Ows = Ows;
|
|
2793
3095
|
exports.PasswordFlow = PasswordFlow;
|
|
2794
3096
|
exports.Rpc = Rpc;
|
|
2795
3097
|
exports.SessionExpiredError = SessionExpiredError;
|
|
@@ -2800,6 +3102,7 @@ exports.Stats = Stats;
|
|
|
2800
3102
|
exports.Status = Status;
|
|
2801
3103
|
exports.Tables = Tables;
|
|
2802
3104
|
exports.Users = Users;
|
|
3105
|
+
exports.Wfs = Wfs;
|
|
2803
3106
|
exports.Ws = Ws;
|
|
2804
3107
|
exports.createApi = createApi;
|
|
2805
3108
|
exports.createCentiaAdminClient = createCentiaAdminClient;
|
package/dist/centia-io-sdk.d.cts
CHANGED
|
@@ -1094,6 +1094,116 @@ interface FileProcessResponse {
|
|
|
1094
1094
|
auth_str: string;
|
|
1095
1095
|
error: string;
|
|
1096
1096
|
}
|
|
1097
|
+
type LayerGeotype = 'Default' | 'POINT' | 'LINE' | 'POLYGON';
|
|
1098
|
+
type LayerTileFormat = 'PNG' | 'jpeg_low' | 'jpeg_medium' | 'jpeg_high';
|
|
1099
|
+
type LayerCacheType = 'disk' | 'sqlite' | 's3' | 'memcache';
|
|
1100
|
+
type LabelPosition = 'auto' | 'ul' | 'uc' | 'ur' | 'cl' | 'cc' | 'cr' | 'll' | 'lc' | 'lr';
|
|
1101
|
+
type FontWeight = 'normal' | 'bold' | 'italic' | 'bolditalic';
|
|
1102
|
+
type LineCap = 'round' | 'butt' | 'square';
|
|
1103
|
+
type GeomTransform = 'bbox' | 'centroid' | 'end' | 'labelpnt' | 'labelpoly' | 'start' | 'vertices';
|
|
1104
|
+
/** Layer properties (the def JSON). Numeric values are stored as strings, empty string when unset. */
|
|
1105
|
+
interface LayerProperties {
|
|
1106
|
+
theme_column?: string;
|
|
1107
|
+
label_column?: string;
|
|
1108
|
+
opacity?: string;
|
|
1109
|
+
label_max_scale?: string;
|
|
1110
|
+
label_min_scale?: string;
|
|
1111
|
+
cluster?: string;
|
|
1112
|
+
meta_tiles?: string;
|
|
1113
|
+
meta_size?: string;
|
|
1114
|
+
meta_buffer?: string;
|
|
1115
|
+
ttl?: string;
|
|
1116
|
+
auto_expire?: string;
|
|
1117
|
+
maxscaledenom?: string;
|
|
1118
|
+
minscaledenom?: string;
|
|
1119
|
+
symbolscaledenom?: string;
|
|
1120
|
+
geotype?: LayerGeotype;
|
|
1121
|
+
offsite?: string;
|
|
1122
|
+
format?: LayerTileFormat;
|
|
1123
|
+
lock?: boolean;
|
|
1124
|
+
layers?: string;
|
|
1125
|
+
bands?: string;
|
|
1126
|
+
cache?: LayerCacheType;
|
|
1127
|
+
s3_tile_set?: string;
|
|
1128
|
+
label_no_clip?: boolean;
|
|
1129
|
+
polyline_no_clip?: boolean;
|
|
1130
|
+
}
|
|
1131
|
+
/** Style entry of a class. Property keys follow MapServer STYLE parameters. */
|
|
1132
|
+
interface Style {
|
|
1133
|
+
id?: string;
|
|
1134
|
+
sortid?: number;
|
|
1135
|
+
name?: string;
|
|
1136
|
+
color?: string;
|
|
1137
|
+
width?: string;
|
|
1138
|
+
outlinecolor?: string;
|
|
1139
|
+
symbol?: string;
|
|
1140
|
+
size?: string;
|
|
1141
|
+
angle?: string;
|
|
1142
|
+
gap?: string;
|
|
1143
|
+
opacity?: string;
|
|
1144
|
+
pattern?: string;
|
|
1145
|
+
linecap?: LineCap;
|
|
1146
|
+
geomtransform?: GeomTransform;
|
|
1147
|
+
minsize?: string;
|
|
1148
|
+
maxsize?: string;
|
|
1149
|
+
offsetx?: string;
|
|
1150
|
+
offsety?: string;
|
|
1151
|
+
polaroffsetr?: string;
|
|
1152
|
+
polaroffsetd?: string;
|
|
1153
|
+
}
|
|
1154
|
+
/** Label entry of a class. Property keys follow MapServer LABEL parameters. */
|
|
1155
|
+
interface Label {
|
|
1156
|
+
id?: string;
|
|
1157
|
+
sortid?: number;
|
|
1158
|
+
name?: string;
|
|
1159
|
+
on?: boolean;
|
|
1160
|
+
text?: string;
|
|
1161
|
+
force?: boolean;
|
|
1162
|
+
minscaledenom?: string;
|
|
1163
|
+
maxscaledenom?: string;
|
|
1164
|
+
position?: LabelPosition;
|
|
1165
|
+
size?: string;
|
|
1166
|
+
color?: string;
|
|
1167
|
+
outlinecolor?: string;
|
|
1168
|
+
buffer?: string;
|
|
1169
|
+
repeatdistance?: string;
|
|
1170
|
+
angle?: string;
|
|
1171
|
+
backgroundcolor?: string;
|
|
1172
|
+
backgroundpadding?: string;
|
|
1173
|
+
offsetx?: string;
|
|
1174
|
+
offsety?: string;
|
|
1175
|
+
font?: string;
|
|
1176
|
+
fontweight?: FontWeight;
|
|
1177
|
+
expression?: string;
|
|
1178
|
+
maxsize?: string;
|
|
1179
|
+
minfeaturesize?: string;
|
|
1180
|
+
}
|
|
1181
|
+
/** Class definition with styles and labels. */
|
|
1182
|
+
interface LayerClass {
|
|
1183
|
+
id?: string;
|
|
1184
|
+
name?: string;
|
|
1185
|
+
sortid?: number;
|
|
1186
|
+
expression?: string;
|
|
1187
|
+
styles?: Style[];
|
|
1188
|
+
labels?: Label[];
|
|
1189
|
+
minscaledenom?: string;
|
|
1190
|
+
maxscaledenom?: string;
|
|
1191
|
+
leader?: boolean;
|
|
1192
|
+
leader_gridstep?: string;
|
|
1193
|
+
leader_maxdistance?: string;
|
|
1194
|
+
leader_color?: string;
|
|
1195
|
+
}
|
|
1196
|
+
/** Layer definition: properties (the def JSON) and classes with styles and labels. */
|
|
1197
|
+
interface Layer {
|
|
1198
|
+
/** Layer key: schema.table.geometry_column. */
|
|
1199
|
+
name: string;
|
|
1200
|
+
properties?: LayerProperties;
|
|
1201
|
+
classes?: LayerClass[];
|
|
1202
|
+
}
|
|
1203
|
+
interface GetLayerOptions {
|
|
1204
|
+
/** Return only layer keys. */
|
|
1205
|
+
namesOnly?: boolean;
|
|
1206
|
+
}
|
|
1097
1207
|
interface CommitRequest {
|
|
1098
1208
|
schema: string;
|
|
1099
1209
|
repo: string;
|
|
@@ -1212,6 +1322,41 @@ declare class Rules {
|
|
|
1212
1322
|
deleteRule(id: number): Promise<void>;
|
|
1213
1323
|
}
|
|
1214
1324
|
//#endregion
|
|
1325
|
+
//#region src/provisioning/Layers.d.ts
|
|
1326
|
+
declare class Layers {
|
|
1327
|
+
private readonly client;
|
|
1328
|
+
constructor(client: CentiaHttpClient);
|
|
1329
|
+
private layerPath;
|
|
1330
|
+
private classPath;
|
|
1331
|
+
getLayer(layer?: undefined, opts?: GetLayerOptions): Promise<Layer[]>;
|
|
1332
|
+
getLayer(layer: string, opts?: GetLayerOptions): Promise<Layer>;
|
|
1333
|
+
/** Configure existing layer(s): set properties and replace classes. */
|
|
1334
|
+
postLayer(body: Layer | Layer[]): Promise<LocationResponse>;
|
|
1335
|
+
/** Update layer properties (key-merge on the def JSON). */
|
|
1336
|
+
patchLayer(layer: string, body: Layer): Promise<LocationResponse>;
|
|
1337
|
+
getLayerClass(layer: string): Promise<LayerClass[]>;
|
|
1338
|
+
getLayerClass(layer: string, classId: string): Promise<LayerClass>;
|
|
1339
|
+
postLayerClass(layer: string, body: LayerClass | LayerClass[]): Promise<LocationResponse>;
|
|
1340
|
+
/** Update a class (key-merge). Styles/labels are managed via their own methods. */
|
|
1341
|
+
patchLayerClass(layer: string, classId: string, body: LayerClass): Promise<LocationResponse>;
|
|
1342
|
+
/** Delete class(es). `classId` may be a comma-separated list of ids. */
|
|
1343
|
+
deleteLayerClass(layer: string, classId: string): Promise<void>;
|
|
1344
|
+
getStyle(layer: string, classId: string): Promise<Style[]>;
|
|
1345
|
+
getStyle(layer: string, classId: string, styleId: string): Promise<Style>;
|
|
1346
|
+
postStyle(layer: string, classId: string, body: Style | Style[]): Promise<LocationResponse>;
|
|
1347
|
+
/** Update a style (key-merge). */
|
|
1348
|
+
patchStyle(layer: string, classId: string, styleId: string, body: Style): Promise<LocationResponse>;
|
|
1349
|
+
/** Delete style(s). `styleId` may be a comma-separated list of ids. */
|
|
1350
|
+
deleteStyle(layer: string, classId: string, styleId: string): Promise<void>;
|
|
1351
|
+
getLabel(layer: string, classId: string): Promise<Label[]>;
|
|
1352
|
+
getLabel(layer: string, classId: string, labelId: string): Promise<Label>;
|
|
1353
|
+
postLabel(layer: string, classId: string, body: Label | Label[]): Promise<LocationResponse>;
|
|
1354
|
+
/** Update a label (key-merge). */
|
|
1355
|
+
patchLabel(layer: string, classId: string, labelId: string, body: Label): Promise<LocationResponse>;
|
|
1356
|
+
/** Delete label(s). `labelId` may be a comma-separated list of ids. */
|
|
1357
|
+
deleteLabel(layer: string, classId: string, labelId: string): Promise<void>;
|
|
1358
|
+
}
|
|
1359
|
+
//#endregion
|
|
1215
1360
|
//#region src/provisioning/Privileges.d.ts
|
|
1216
1361
|
declare class Privileges {
|
|
1217
1362
|
private readonly client;
|
|
@@ -1265,7 +1410,7 @@ declare class Functions {
|
|
|
1265
1410
|
declare class MetadataWrite {
|
|
1266
1411
|
private readonly client;
|
|
1267
1412
|
constructor(client: CentiaHttpClient);
|
|
1268
|
-
patchMetaData(body: PatchMetadataRequest): Promise<
|
|
1413
|
+
patchMetaData(body: PatchMetadataRequest): Promise<LocationResponse>;
|
|
1269
1414
|
}
|
|
1270
1415
|
//#endregion
|
|
1271
1416
|
//#region src/provisioning/TypeScriptInterfaces.d.ts
|
|
@@ -1302,7 +1447,7 @@ declare class GitCommit {
|
|
|
1302
1447
|
interface CentiaAdminClient {
|
|
1303
1448
|
/** The underlying HTTP client. */
|
|
1304
1449
|
readonly http: CentiaHttpClient;
|
|
1305
|
-
/** Schema, table, column, constraint, index, sequence, user, client, rule, privilege, RPC, metadata, file import, git, and SQL management. */
|
|
1450
|
+
/** Schema, table, column, constraint, index, sequence, user, client, rule, privilege, RPC, layer, metadata, file import, git, and SQL management. */
|
|
1306
1451
|
readonly provisioning: {
|
|
1307
1452
|
readonly schemas: Schemas;
|
|
1308
1453
|
readonly tables: ProvisioningTables;
|
|
@@ -1313,6 +1458,7 @@ interface CentiaAdminClient {
|
|
|
1313
1458
|
readonly users: ProvisioningUsers;
|
|
1314
1459
|
readonly clients: ProvisioningClients;
|
|
1315
1460
|
readonly rules: Rules;
|
|
1461
|
+
readonly layers: Layers;
|
|
1316
1462
|
readonly privileges: Privileges;
|
|
1317
1463
|
readonly rpcMethods: RpcMethods;
|
|
1318
1464
|
readonly functions: Functions;
|
|
@@ -1336,6 +1482,86 @@ interface CentiaAdminClient {
|
|
|
1336
1482
|
*/
|
|
1337
1483
|
declare function createCentiaAdminClient(config: CentiaClientConfig): CentiaAdminClient;
|
|
1338
1484
|
//#endregion
|
|
1485
|
+
//#region src/ogc/Ows.d.ts
|
|
1486
|
+
/**
|
|
1487
|
+
* Query parameters for OWS (WMS/WFS/UTFGRID) requests, e.g.
|
|
1488
|
+
* `{ SERVICE: 'WMS', REQUEST: 'GetCapabilities' }`.
|
|
1489
|
+
*/
|
|
1490
|
+
type OwsParams = Record<string, string | number | boolean>;
|
|
1491
|
+
/**
|
|
1492
|
+
* OWS (WMS/WFS/UTFGRID) endpoint wrapper.
|
|
1493
|
+
*
|
|
1494
|
+
* Token-authenticated clients use `getOws`/`postOws`; anonymous and HTTP-Basic
|
|
1495
|
+
* clients use the `...NoToken` variants, which include the database in the path.
|
|
1496
|
+
*
|
|
1497
|
+
* Responses are streamed from the backend and returned as text (XML) or, for
|
|
1498
|
+
* JSON responses such as UTFGRID, as parsed JSON. Binary responses (e.g. WMS
|
|
1499
|
+
* GetMap images) are not supported by this wrapper — request those directly.
|
|
1500
|
+
*/
|
|
1501
|
+
declare class Ows {
|
|
1502
|
+
private readonly client;
|
|
1503
|
+
constructor(client: CentiaHttpClient);
|
|
1504
|
+
/** Token-authenticated OWS GET (WMS/WFS/UTFGRID). */
|
|
1505
|
+
getOws<T = string>(schema: string, params?: OwsParams): Promise<T>;
|
|
1506
|
+
/** Token-authenticated OWS POST (WFS XML). */
|
|
1507
|
+
postOws(schema: string, xml: string): Promise<string>;
|
|
1508
|
+
/** Anonymous/HTTP-Basic OWS GET (WMS/WFS/UTFGRID). */
|
|
1509
|
+
getOwsNoToken<T = string>(schema: string, database: string, params?: OwsParams): Promise<T>;
|
|
1510
|
+
/** Anonymous/HTTP-Basic OWS POST (WFS XML). */
|
|
1511
|
+
postOwsNoToken(schema: string, database: string, xml: string): Promise<string>;
|
|
1512
|
+
}
|
|
1513
|
+
//#endregion
|
|
1514
|
+
//#region src/ogc/Wfs.d.ts
|
|
1515
|
+
/** Query parameters for WFS GET requests. Extra vendor parameters are allowed. */
|
|
1516
|
+
interface WfsGetParams {
|
|
1517
|
+
/** OGC service. Defaults to `WFS`. */
|
|
1518
|
+
SERVICE?: string;
|
|
1519
|
+
/** WFS operation. */
|
|
1520
|
+
REQUEST: 'GetCapabilities' | 'DescribeFeatureType' | 'GetFeature';
|
|
1521
|
+
/** WFS protocol version. */
|
|
1522
|
+
VERSION?: '1.0.0' | '1.1.0';
|
|
1523
|
+
/** Feature type (table) name(s), comma-separated. */
|
|
1524
|
+
TYPENAME?: string;
|
|
1525
|
+
/** Output format, e.g. `gml3`. */
|
|
1526
|
+
OUTPUTFORMAT?: string;
|
|
1527
|
+
/** Requested output CRS, e.g. `urn:ogc:def:crs:EPSG::25832`. */
|
|
1528
|
+
SRSNAME?: string;
|
|
1529
|
+
/** Bounding-box filter (minx,miny,maxx,maxy). */
|
|
1530
|
+
BBOX?: string;
|
|
1531
|
+
/** Maximum number of features to return. */
|
|
1532
|
+
MAXFEATURES?: number;
|
|
1533
|
+
/** OGC Filter Encoding XML. */
|
|
1534
|
+
FILTER?: string;
|
|
1535
|
+
[key: string]: string | number | boolean | undefined;
|
|
1536
|
+
}
|
|
1537
|
+
/** Optional path segments for WFS requests. */
|
|
1538
|
+
interface WfsPathOptions {
|
|
1539
|
+
/** Output EPSG code (SRID). */
|
|
1540
|
+
srs?: number;
|
|
1541
|
+
/** Version time slice (ISO date) for versioned layers. Requires `srs`. */
|
|
1542
|
+
timeSlice?: string;
|
|
1543
|
+
}
|
|
1544
|
+
/**
|
|
1545
|
+
* WFS endpoint wrapper (GetCapabilities, DescribeFeatureType, GetFeature and
|
|
1546
|
+
* WFS-T transactions).
|
|
1547
|
+
*
|
|
1548
|
+
* Token-authenticated clients use `getWfs`/`postWfs`; anonymous and HTTP-Basic
|
|
1549
|
+
* clients (e.g. QGIS) use the `...NoToken` variants, which include the
|
|
1550
|
+
* database in the path. Responses are returned as XML text.
|
|
1551
|
+
*/
|
|
1552
|
+
declare class Wfs {
|
|
1553
|
+
private readonly client;
|
|
1554
|
+
constructor(client: CentiaHttpClient);
|
|
1555
|
+
/** Token-authenticated WFS GET. */
|
|
1556
|
+
getWfs(schema: string, params: WfsGetParams, options?: WfsPathOptions): Promise<string>;
|
|
1557
|
+
/** Token-authenticated WFS POST (XML-encoded GetFeature or Transaction). */
|
|
1558
|
+
postWfs(schema: string, xml: string, options?: WfsPathOptions): Promise<string>;
|
|
1559
|
+
/** Anonymous/HTTP-Basic WFS GET. */
|
|
1560
|
+
getWfsNoToken(schema: string, database: string, params: WfsGetParams, options?: WfsPathOptions): Promise<string>;
|
|
1561
|
+
/** Anonymous/HTTP-Basic WFS POST (XML-encoded GetFeature or Transaction). */
|
|
1562
|
+
postWfsNoToken(schema: string, database: string, xml: string, options?: WfsPathOptions): Promise<string>;
|
|
1563
|
+
}
|
|
1564
|
+
//#endregion
|
|
1339
1565
|
//#region src/auth/types.d.ts
|
|
1340
1566
|
interface StoredCredentials {
|
|
1341
1567
|
token?: string;
|
|
@@ -1445,5 +1671,5 @@ declare class SessionExpiredError extends Error {
|
|
|
1445
1671
|
*/
|
|
1446
1672
|
|
|
1447
1673
|
//#endregion
|
|
1448
|
-
export { type AsyncInvocationAccepted, type AuthService, type BatchMessage, type CentiaAdminClient, CentiaApiError, type CentiaApiErrorOptions, type CentiaAuth, type CentiaClientConfig, type CentiaHttpClient, Claims, type ClientInfo, CodeFlow, type CodeFlowOptions, type ColumnDef, type ColumnInfo, type CommitRequest, type CommitResult, type ConstraintInfo, type CreateClientRequest, type CreateClientResponse, type CreateColumnRequest, type CreateConstraintRequest, type CreateFunctionRequest, type CreateIndexRequest, type CreateRpcMethodRequest, type CreateRuleRequest, type CreateSchemaRequest, type CreateSequenceRequest, type CreateTokenProviderOptions, type CreateUserRequest, type DBSchema, type DryRunResult, type FileProcessRequest, type FileProcessResponse, type FileUploadOptions, type FullResponse, type FunctionEventOp, type FunctionInfo, type FunctionInvocationRecord, type FunctionInvocationResult, type FunctionPackage, type FunctionRuntime, type FunctionStatus, type FunctionTriggers, type GetSchemaOptions, Gql, type GqlRequest, type GqlResponse, type IndexInfo, type LocationResponse, Meta, type MetadataFieldInfo, type MetadataRelationInfo, NotLoggedInError, type Options, type ParamsOfApiMethod, PasswordFlow, type PasswordFlowOptions, type PatchClientRequest, type PatchColumnRequest, type PatchFunctionRequest, type PatchMetadataRequest, type PatchPrivilegeRequest, type PatchRpcMethodRequest, type PatchRuleRequest, type PatchSequenceRequest, type PatchUserRequest, type pgTypes_d_exports as PgTypes, type PickRow, type PrivilegeInfo, type PrivilegeLevel, type RenameSchemaRequest, type RequestOptions, type RowForTable, type RowOfApiCall, type RowOfApiMethod, type RowOfRequest, type RowOfSelect, type RowsOfApiCall, type RowsOfApiMethod, type RowsOfRequest, type RowsOfSelect, Rpc, type RpcMethodInfo, type RpcRequest, type RpcResponse, type RuleAccess, type RuleInfo, type RuleRequest, type RuleService, type SchemaInfo, type SequenceInfo, SessionExpiredError, SignUp, Sql, SqlNoToken, type SqlNoTokenRequest, type SqlRequest, type SqlResponse, Stats, Status, type StoredCredentials, type SubscriptionAckMessage, type SubscriptionRequest, type TableBatch, type TableDef, type TableInfo, Tables, type TokenProvider, type TokenStore, type UserInfo, Users, Ws, type WsErrorMessage, type WsMessage, type WsOptions, createApi, createCentiaAdminClient, createCentiaClient, createSqlBuilder, createTokenProvider, isCentiaApiError };
|
|
1674
|
+
export { type AsyncInvocationAccepted, type AuthService, type BatchMessage, type CentiaAdminClient, CentiaApiError, type CentiaApiErrorOptions, type CentiaAuth, type CentiaClientConfig, type CentiaHttpClient, Claims, type ClientInfo, CodeFlow, type CodeFlowOptions, type ColumnDef, type ColumnInfo, type CommitRequest, type CommitResult, type ConstraintInfo, type CreateClientRequest, type CreateClientResponse, type CreateColumnRequest, type CreateConstraintRequest, type CreateFunctionRequest, type CreateIndexRequest, type CreateRpcMethodRequest, type CreateRuleRequest, type CreateSchemaRequest, type CreateSequenceRequest, type CreateTokenProviderOptions, type CreateUserRequest, type DBSchema, type DryRunResult, type FileProcessRequest, type FileProcessResponse, type FileUploadOptions, type FontWeight, type FullResponse, type FunctionEventOp, type FunctionInfo, type FunctionInvocationRecord, type FunctionInvocationResult, type FunctionPackage, type FunctionRuntime, type FunctionStatus, type FunctionTriggers, type GeomTransform, type GetLayerOptions, type GetSchemaOptions, Gql, type GqlRequest, type GqlResponse, type IndexInfo, type Label, type LabelPosition, type Layer, type LayerCacheType, type LayerClass, type LayerGeotype, type LayerProperties, type LayerTileFormat, type LineCap, type LocationResponse, Meta, type MetadataFieldInfo, type MetadataRelationInfo, NotLoggedInError, type Options, Ows, type OwsParams, type ParamsOfApiMethod, PasswordFlow, type PasswordFlowOptions, type PatchClientRequest, type PatchColumnRequest, type PatchFunctionRequest, type PatchMetadataRequest, type PatchPrivilegeRequest, type PatchRpcMethodRequest, type PatchRuleRequest, type PatchSequenceRequest, type PatchUserRequest, type pgTypes_d_exports as PgTypes, type PickRow, type PrivilegeInfo, type PrivilegeLevel, type RenameSchemaRequest, type RequestOptions, type RowForTable, type RowOfApiCall, type RowOfApiMethod, type RowOfRequest, type RowOfSelect, type RowsOfApiCall, type RowsOfApiMethod, type RowsOfRequest, type RowsOfSelect, Rpc, type RpcMethodInfo, type RpcRequest, type RpcResponse, type RuleAccess, type RuleInfo, type RuleRequest, type RuleService, type SchemaInfo, type SequenceInfo, SessionExpiredError, SignUp, Sql, SqlNoToken, type SqlNoTokenRequest, type SqlRequest, type SqlResponse, Stats, Status, type StoredCredentials, type Style, type SubscriptionAckMessage, type SubscriptionRequest, type TableBatch, type TableDef, type TableInfo, Tables, type TokenProvider, type TokenStore, type UserInfo, Users, Wfs, type WfsGetParams, type WfsPathOptions, Ws, type WsErrorMessage, type WsMessage, type WsOptions, createApi, createCentiaAdminClient, createCentiaClient, createSqlBuilder, createTokenProvider, isCentiaApiError };
|
|
1449
1675
|
//# sourceMappingURL=centia-io-sdk.d.cts.map
|