@honua/react 0.1.2-beta.0 → 0.1.4-beta.0
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/contract/discovery.d.ts +34 -0
- package/contract/discovery.d.ts.map +1 -1
- package/contract/index.d.ts +7 -5
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +3 -2
- package/contract/pmtiles.d.ts +10 -1
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +10 -2
- package/contract/protocol-module.d.ts +84 -9
- package/contract/protocol-module.d.ts.map +1 -1
- package/contract/query-filter-fes.d.ts +18 -0
- package/contract/query-filter-fes.d.ts.map +1 -0
- package/contract/query-filter-fes.js +122 -0
- package/contract/query-filter.d.ts +300 -0
- package/contract/query-filter.d.ts.map +1 -0
- package/contract/query-filter.js +883 -0
- package/contract/schema.d.ts +12 -0
- package/contract/schema.d.ts.map +1 -1
- package/contract/schema.js +34 -0
- package/contract/source-capability-support.d.ts.map +1 -1
- package/contract/source-capability-support.js +15 -3
- package/contract/source.d.ts +45 -25
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +719 -479
- package/contract/types.d.ts +87 -18
- package/contract/types.d.ts.map +1 -1
- package/contract/widget-source.d.ts.map +1 -1
- package/core/client.d.ts +45 -21
- package/core/client.d.ts.map +1 -1
- package/core/client.js +224 -46
- package/core/error-classifications.d.ts +6 -0
- package/core/error-classifications.d.ts.map +1 -1
- package/core/error-classifications.js +6 -0
- package/core/error-code-registry.d.ts +6 -0
- package/core/error-code-registry.d.ts.map +1 -1
- package/core/error-code-registry.js +6 -0
- package/core/error-envelope.js +2 -0
- package/core/errors.d.ts +1 -1
- package/core/errors.js +1 -1
- package/core/geoparquet-sql.d.ts +68 -4
- package/core/geoparquet-sql.d.ts.map +1 -1
- package/core/geoparquet-sql.js +325 -8
- package/core/odata-write-codec.d.ts.map +1 -1
- package/core/odata-write-codec.js +0 -1
- package/core/odata.d.ts +6 -0
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +6 -1
- package/core/ogc-processes.d.ts +182 -25
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +602 -30
- package/core/process-runner.d.ts +8 -1
- package/core/process-runner.d.ts.map +1 -1
- package/core/process-runner.js +1 -0
- package/core/protocol-transport.d.ts +2 -0
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/stac.d.ts +31 -0
- package/core/stac.d.ts.map +1 -1
- package/core/stac.js +136 -19
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +273 -68
- package/core/types.d.ts +123 -9
- package/core/types.d.ts.map +1 -1
- package/core/wfs-axis-order.d.ts +18 -0
- package/core/wfs-axis-order.d.ts.map +1 -0
- package/core/wfs-axis-order.js +108 -0
- package/core/wfs-capabilities.d.ts +65 -24
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +237 -27
- package/core/wfs-filter.d.ts +26 -3
- package/core/wfs-filter.d.ts.map +1 -1
- package/core/wfs-filter.js +48 -53
- package/core/wfs-protocol-error.d.ts +12 -0
- package/core/wfs-protocol-error.d.ts.map +1 -0
- package/core/wfs-protocol-error.js +13 -0
- package/core/wfs.d.ts +53 -1
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +251 -29
- package/core/wms-feature-info.d.ts +92 -0
- package/core/wms-feature-info.d.ts.map +1 -0
- package/core/wms-feature-info.js +285 -0
- package/core/wms.d.ts +9 -0
- package/core/wms.d.ts.map +1 -1
- package/core/wms.js +17 -5
- package/esri-compat/event-bus.d.ts +20 -0
- package/esri-compat/event-bus.d.ts.map +1 -1
- package/esri-compat/feature-filter.d.ts +46 -1
- package/esri-compat/feature-filter.d.ts.map +1 -1
- package/esri-compat/feature-filter.js +49 -0
- package/esri-compat/geojson-layer.d.ts +4 -2
- package/esri-compat/geojson-layer.d.ts.map +1 -1
- package/esri-compat/geojson-layer.js +4 -2
- package/esri-compat/identity-manager.js +2 -2
- package/esri-compat/imagery-layer.d.ts +2 -1
- package/esri-compat/imagery-layer.d.ts.map +1 -1
- package/esri-compat/imagery-layer.js +2 -1
- package/esri-compat/layer-list.d.ts +8 -1
- package/esri-compat/layer-list.d.ts.map +1 -1
- package/esri-compat/layer-list.js +11 -4
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +1 -1
- package/esri-compat/locator.d.ts +297 -0
- package/esri-compat/locator.d.ts.map +1 -0
- package/esri-compat/locator.js +579 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -1
- package/esri-compat/map-view.d.ts.map +1 -1
- package/esri-compat/map-view.js +1 -1
- package/esri-compat/scene-view.d.ts.map +1 -1
- package/esri-compat/time-slider.d.ts +29 -0
- package/esri-compat/time-slider.d.ts.map +1 -1
- package/esri-compat/time-slider.js +117 -0
- package/esri-compat/wfs-layer.d.ts +2 -1
- package/esri-compat/wfs-layer.d.ts.map +1 -1
- package/esri-compat/wfs-layer.js +2 -1
- package/esri-compat/widget-host.d.ts +42 -6
- package/esri-compat/widget-host.d.ts.map +1 -1
- package/esri-compat/widget-host.js +99 -10
- package/generated-app/projection.d.ts.map +1 -1
- package/generated-app/runtime.d.ts.map +1 -1
- package/map/data-to-map-bridge.d.ts +1 -1
- package/map/data-to-map-bridge.d.ts.map +1 -1
- package/map/data-to-map-bridge.js +1 -2
- package/map/honua-map.d.ts.map +1 -1
- package/map/honua-map.js +1 -1
- package/map/index.d.ts +2 -0
- package/map/index.d.ts.map +1 -1
- package/map/index.js +2 -0
- package/map/realtime-reconciliation-adapter.d.ts +98 -0
- package/map/realtime-reconciliation-adapter.d.ts.map +1 -0
- package/map/realtime-reconciliation-adapter.js +84 -0
- package/map/temporal-playback.d.ts +25 -0
- package/map/temporal-playback.d.ts.map +1 -1
- package/map/temporal-playback.js +29 -1
- package/package.json +4 -3
- package/query-planner/canonical-filter.d.ts +30 -0
- package/query-planner/canonical-filter.d.ts.map +1 -0
- package/query-planner/canonical-filter.js +30 -0
- package/query-planner/columnar-plan.d.ts +63 -0
- package/query-planner/columnar-plan.d.ts.map +1 -0
- package/query-planner/columnar-plan.js +94 -0
- package/query-planner/diagnostics.d.ts +3 -3
- package/query-planner/diagnostics.d.ts.map +1 -1
- package/query-planner/diagnostics.js +17 -4
- package/query-planner/duckdb.d.ts.map +1 -1
- package/query-planner/duckdb.js +16 -2
- package/query-planner/execution-context.d.ts.map +1 -1
- package/query-planner/execution-context.js +3 -1
- package/query-planner/executor.d.ts.map +1 -1
- package/query-planner/executor.js +7 -1
- package/query-planner/geoservices.d.ts.map +1 -1
- package/query-planner/geoservices.js +24 -5
- package/query-planner/grpc.d.ts.map +1 -1
- package/query-planner/grpc.js +29 -5
- package/query-planner/index.d.ts +20 -5
- package/query-planner/index.d.ts.map +1 -1
- package/query-planner/index.js +16 -3
- package/query-planner/ir.d.ts +6 -1
- package/query-planner/ir.d.ts.map +1 -1
- package/query-planner/ir.js +63 -1
- package/query-planner/odata-protocol-module.d.ts +54 -0
- package/query-planner/odata-protocol-module.d.ts.map +1 -0
- package/query-planner/odata-protocol-module.js +199 -0
- package/query-planner/odata-v1.d.ts +23 -0
- package/query-planner/odata-v1.d.ts.map +1 -0
- package/query-planner/odata-v1.js +202 -0
- package/query-planner/odata.d.ts +0 -3
- package/query-planner/odata.d.ts.map +1 -1
- package/query-planner/odata.js +0 -143
- package/query-planner/ogc-features.d.ts.map +1 -1
- package/query-planner/ogc-features.js +23 -1
- package/query-planner/planner.d.ts +2 -2
- package/query-planner/planner.d.ts.map +1 -1
- package/query-planner/planner.js +146 -27
- package/query-planner/representation.d.ts +59 -0
- package/query-planner/representation.d.ts.map +1 -0
- package/query-planner/representation.js +140 -0
- package/query-planner/types.d.ts +153 -3
- package/query-planner/types.d.ts.map +1 -1
- package/query-planner/wfs-protocol-module.d.ts +57 -0
- package/query-planner/wfs-protocol-module.d.ts.map +1 -0
- package/query-planner/wfs-protocol-module.js +731 -0
- package/query-planner/wfs-v1.d.ts +41 -0
- package/query-planner/wfs-v1.d.ts.map +1 -0
- package/query-planner/wfs-v1.js +366 -0
- package/query-planner/wfs.d.ts +1 -3
- package/query-planner/wfs.d.ts.map +1 -1
- package/query-planner/wfs.js +1 -70
- package/react/honua-map.d.ts +3 -1
- package/react/honua-map.d.ts.map +1 -1
- package/react/honua-map.js +11 -1
- package/react/hooks.d.ts +1 -1
- package/react/hooks.js +1 -1
- package/react/selection.d.ts.map +1 -1
- package/react/selection.js +0 -0
- package/react/use-mounted-source.d.ts +1 -1
- package/react/use-mounted-source.js +1 -1
- package/realtime/checkpoint-store.d.ts +206 -0
- package/realtime/checkpoint-store.d.ts.map +1 -0
- package/realtime/checkpoint-store.js +504 -0
- package/realtime/contract.d.ts +142 -0
- package/realtime/contract.d.ts.map +1 -0
- package/realtime/contract.js +154 -0
- package/realtime/exploration.d.ts +16 -0
- package/realtime/exploration.d.ts.map +1 -0
- package/realtime/exploration.js +32 -0
- package/realtime/honua-server.d.ts +131 -0
- package/realtime/honua-server.d.ts.map +1 -0
- package/realtime/honua-server.js +302 -0
- package/realtime/index.d.ts +39 -0
- package/realtime/index.d.ts.map +1 -0
- package/realtime/index.js +26 -0
- package/realtime/odata-delta.d.ts +114 -0
- package/realtime/odata-delta.d.ts.map +1 -0
- package/realtime/odata-delta.js +483 -0
- package/realtime/projections.d.ts +30 -0
- package/realtime/projections.d.ts.map +1 -0
- package/realtime/projections.js +51 -0
- package/realtime/reconciliation.d.ts +245 -0
- package/realtime/reconciliation.d.ts.map +1 -0
- package/realtime/reconciliation.js +377 -0
- package/realtime/reducer.d.ts +14 -0
- package/realtime/reducer.d.ts.map +1 -0
- package/realtime/reducer.js +351 -0
- package/realtime/resumable-transport.d.ts +111 -0
- package/realtime/resumable-transport.d.ts.map +1 -0
- package/realtime/resumable-transport.js +406 -0
- package/realtime/resumable.d.ts +104 -0
- package/realtime/resumable.d.ts.map +1 -0
- package/realtime/resumable.js +632 -0
- package/realtime/sse.d.ts +23 -0
- package/realtime/sse.d.ts.map +1 -0
- package/realtime/sse.js +147 -0
- package/realtime/store.d.ts +18 -0
- package/realtime/store.d.ts.map +1 -0
- package/realtime/store.js +63 -0
- package/realtime/types.d.ts +190 -0
- package/realtime/types.d.ts.map +1 -0
- package/realtime/types.js +10 -0
- package/realtime/websocket.d.ts +60 -0
- package/realtime/websocket.d.ts.map +1 -0
- package/realtime/websocket.js +157 -0
- package/realtime/wire.d.ts +28 -0
- package/realtime/wire.d.ts.map +1 -0
- package/realtime/wire.js +73 -0
- package/runtime/index.d.ts +6 -2
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +3 -1
- package/runtime/load-package.d.ts +24 -0
- package/runtime/load-package.d.ts.map +1 -1
- package/runtime/load-package.js +45 -1
- package/runtime/maplibre-renderer.d.ts +11 -0
- package/runtime/maplibre-renderer.d.ts.map +1 -1
- package/runtime/maplibre-renderer.js +32 -7
- package/runtime/offline-region-protocol.d.ts +73 -0
- package/runtime/offline-region-protocol.d.ts.map +1 -0
- package/runtime/offline-region-protocol.js +63 -0
- package/runtime/offline-region-style.d.ts +78 -0
- package/runtime/offline-region-style.d.ts.map +1 -0
- package/runtime/offline-region-style.js +147 -0
- package/runtime/pmtiles-protocol.d.ts +7 -8
- package/runtime/pmtiles-protocol.d.ts.map +1 -1
- package/runtime/pmtiles-protocol.js +19 -66
- package/runtime/protocol-registry.d.ts +55 -0
- package/runtime/protocol-registry.d.ts.map +1 -0
- package/runtime/protocol-registry.js +103 -0
- package/runtime/runtime.d.ts +2 -0
- package/runtime/runtime.d.ts.map +1 -1
- package/runtime/runtime.js +6 -1
- package/studio/index.d.ts +24 -7
- package/studio/index.d.ts.map +1 -1
- package/studio/index.js +21 -7
- package/studio/lifecycle-client.d.ts +164 -0
- package/studio/lifecycle-client.d.ts.map +1 -0
- package/studio/lifecycle-client.js +299 -0
- package/studio/lifecycle-errors.d.ts +91 -0
- package/studio/lifecycle-errors.d.ts.map +1 -0
- package/studio/lifecycle-errors.js +77 -0
- package/studio/lifecycle-types.d.ts +321 -0
- package/studio/lifecycle-types.d.ts.map +1 -0
- package/studio/lifecycle-types.js +22 -0
- package/webmap/convert-label.js +0 -1
- package/webmap/convert-symbol.d.ts.map +1 -1
package/core/ogc-processes.d.ts
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OGC API Processes surface. Process discovery, execution, and async
|
|
3
|
-
* job tracking
|
|
3
|
+
* job tracking against any conformant Part 1 (Core) server — a raw
|
|
4
|
+
* third-party deployment discovered by `discoverOgcProcesses()` just as much
|
|
5
|
+
* as the Honua facade. Per the ticket constraint, executions return an
|
|
4
6
|
* `IJobRun` (the canonical async-operation surface) rather than an
|
|
5
|
-
* OGC-specific job type
|
|
7
|
+
* OGC-specific job type; a synchronous execution returns an already-terminal
|
|
8
|
+
* `IJobRun` so callers read results through one surface either way.
|
|
9
|
+
*
|
|
10
|
+
* Three properties keep the standalone lane honest:
|
|
11
|
+
*
|
|
12
|
+
* 1. **Nothing is assumed about the layout.** Routes template off the
|
|
13
|
+
* discovered service root, and the job lifecycle prefers the server's own
|
|
14
|
+
* `Location` header and `links[]` over the Core path template.
|
|
15
|
+
* 2. **Capability gaps fail closed.** When the server's conformance
|
|
16
|
+
* declaration (or the process's `jobControlOptions`) is known and does not
|
|
17
|
+
* declare what the caller asked for, the call throws
|
|
18
|
+
* `HonuaCapabilityNotSupportedError` naming the missing construct rather
|
|
19
|
+
* than posting and hoping.
|
|
20
|
+
* 3. **Polling is bounded.** `results()` always runs under a budget — the
|
|
21
|
+
* caller's, the handle's, or a default deadline — and honors an
|
|
22
|
+
* `AbortSignal`.
|
|
6
23
|
*
|
|
7
24
|
* @module
|
|
8
25
|
*/
|
|
@@ -10,9 +27,46 @@ import type { IJobRun, JobProgress, JobResult, JobResultsOptions, JobSnapshot, J
|
|
|
10
27
|
import type { HonuaClient } from "./client.js";
|
|
11
28
|
import { HonuaSdkError } from "./error-envelope.js";
|
|
12
29
|
import type { HonuaProtocolTransport } from "./protocol-transport.js";
|
|
13
|
-
import type { HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcProcessDescription, HonuaOgcProcessJobAccepted, HonuaOgcProcessJobResults, HonuaOgcProcessJobStatus, HonuaOgcProcessesResponse, OgcMetadataRequest, OgcProcessExecuteRequest, OgcProcessStatus } from "./types.js";
|
|
30
|
+
import type { HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcProcessDescription, HonuaOgcProcessJobAccepted, HonuaOgcProcessJobResults, HonuaOgcProcessJobStatus, HonuaOgcProcessesResponse, OgcMetadataRequest, OgcProcessExecuteRequest, OgcProcessJobRequest, OgcProcessStatus } from "./types.js";
|
|
31
|
+
/**
|
|
32
|
+
* Conformance declaration as advertised at `/conformance`. Structurally
|
|
33
|
+
* satisfied by `HonuaOgcConformanceResponse` and by the
|
|
34
|
+
* `discoverOgcProcesses()` result, so either can be handed straight to a
|
|
35
|
+
* processes handle.
|
|
36
|
+
*/
|
|
37
|
+
export interface HonuaOgcProcessesConformanceInput {
|
|
38
|
+
readonly conformsTo?: readonly string[];
|
|
39
|
+
}
|
|
14
40
|
export interface HonuaOgcProcessesOptions {
|
|
15
41
|
client: HonuaClient;
|
|
42
|
+
/** Raw endpoint path prefix (defaults to the Honua facade `/ogc/processes`). */
|
|
43
|
+
basePath?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The server's advertised conformance classes. Supply the
|
|
46
|
+
* `discoverOgcProcesses()` result (or a `/conformance` response) to gate
|
|
47
|
+
* execution and dismissal against what the server actually declares.
|
|
48
|
+
* Omitted under the default policy, nothing is gated on conformance.
|
|
49
|
+
*/
|
|
50
|
+
conformance?: HonuaOgcProcessesConformanceInput;
|
|
51
|
+
/**
|
|
52
|
+
* How hard to gate on server declarations.
|
|
53
|
+
*
|
|
54
|
+
* - `"advertised"` (default) — gate on declarations already in hand
|
|
55
|
+
* (`conformance`, a `describe()` already performed on this handle, or an
|
|
56
|
+
* explicit `jobControlOptions`), and fall back to the Core-mandated route
|
|
57
|
+
* templates when a server advertises no link. No extra requests; existing
|
|
58
|
+
* callers and the Honua facade are unaffected.
|
|
59
|
+
* - `"strict"` — resolve the conformance declaration and the process
|
|
60
|
+
* description first (both through the metadata cache) and refuse anything
|
|
61
|
+
* the server has not declared, including a job lifecycle whose status and
|
|
62
|
+
* results routes are not advertised as links.
|
|
63
|
+
*/
|
|
64
|
+
capabilityPolicy?: "advertised" | "strict";
|
|
65
|
+
/**
|
|
66
|
+
* Default polling budget applied to `results()` on jobs created by this
|
|
67
|
+
* handle. Per-call {@link JobResultsOptions} win field by field.
|
|
68
|
+
*/
|
|
69
|
+
pollBudget?: JobResultsOptions;
|
|
16
70
|
}
|
|
17
71
|
export interface HonuaOgcProcessJobOptions {
|
|
18
72
|
client: HonuaClient;
|
|
@@ -25,26 +79,80 @@ export interface HonuaOgcProcessJobOptions {
|
|
|
25
79
|
pollIntervalMs?: number;
|
|
26
80
|
/** Override of the default polling behavior; useful in tests. */
|
|
27
81
|
pollFn?: (jobId: string, signal?: AbortSignal) => Promise<HonuaOgcProcessJobStatus>;
|
|
82
|
+
/** Raw endpoint path prefix (defaults to the Honua facade `/ogc/processes`). */
|
|
83
|
+
basePath?: string;
|
|
84
|
+
/** Server-advertised status route (same-origin path), when the server published one. */
|
|
85
|
+
statusPath?: string;
|
|
86
|
+
/** Server-advertised results route (same-origin path), when the server published one. */
|
|
87
|
+
resultsPath?: string;
|
|
88
|
+
/** Default polling budget; per-call {@link JobResultsOptions} win field by field. */
|
|
89
|
+
pollBudget?: JobResultsOptions;
|
|
90
|
+
/** Advertised conformance, used to gate `cancel()` on the Dismiss class. */
|
|
91
|
+
conformance?: HonuaOgcProcessesConformanceInput;
|
|
92
|
+
/** The originating process's advertised `jobControlOptions`, when known. */
|
|
93
|
+
jobControlOptions?: readonly string[];
|
|
94
|
+
/** See {@link HonuaOgcProcessesOptions.capabilityPolicy}. */
|
|
95
|
+
capabilityPolicy?: "advertised" | "strict";
|
|
28
96
|
}
|
|
29
97
|
/** Top-level OGC API Processes handle. */
|
|
30
98
|
export declare class HonuaOgcProcesses {
|
|
31
99
|
readonly client: HonuaClient;
|
|
100
|
+
private readonly basePath;
|
|
101
|
+
private readonly capabilityPolicy;
|
|
102
|
+
private readonly pollBudget;
|
|
103
|
+
private declaredConformance;
|
|
104
|
+
private conformancePromise;
|
|
105
|
+
/**
|
|
106
|
+
* `jobControlOptions` learned from `describe()` calls made through this
|
|
107
|
+
* handle. Callers that follow the natural discover → describe → execute flow
|
|
108
|
+
* therefore get process-level gating for free, with no extra round trip.
|
|
109
|
+
*/
|
|
110
|
+
private readonly jobControlByProcess;
|
|
32
111
|
constructor(options: HonuaOgcProcessesOptions);
|
|
112
|
+
private withBase;
|
|
33
113
|
landing(request?: OgcMetadataRequest): Promise<HonuaOgcLandingResponse>;
|
|
34
114
|
conformance(request?: OgcMetadataRequest): Promise<HonuaOgcConformanceResponse>;
|
|
35
115
|
list(request?: OgcMetadataRequest): Promise<HonuaOgcProcessesResponse>;
|
|
36
116
|
describe(processId: string, request?: OgcMetadataRequest): Promise<HonuaOgcProcessDescription>;
|
|
37
117
|
/**
|
|
38
|
-
* Submit a process for execution
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
118
|
+
* Submit a process for execution and return an `IJobRun` — always, so the
|
|
119
|
+
* caller reads results through one surface whichever Core response shape the
|
|
120
|
+
* server chose:
|
|
121
|
+
*
|
|
122
|
+
* - asynchronous (`Prefer: respond-async`, or the server's own default) →
|
|
123
|
+
* a pollable run bound to the advertised job routes.
|
|
124
|
+
* - synchronous (`200` with the results document) → an already-terminal run
|
|
125
|
+
* whose `results()` resolves immediately with zero further requests.
|
|
126
|
+
*
|
|
127
|
+
* Before anything is posted, `mode` is gated against what the server has
|
|
128
|
+
* declared: the Core conformance class when a conformance declaration is in
|
|
129
|
+
* hand, and the process's `jobControlOptions` when the description is (from
|
|
130
|
+
* `request.jobControlOptions`, an earlier `describe()`/`list()` on this
|
|
131
|
+
* handle, or — under `capabilityPolicy: "strict"` — a cached `describe()`
|
|
132
|
+
* performed here). An undeclared mode fails closed with
|
|
133
|
+
* `HonuaCapabilityNotSupportedError`.
|
|
42
134
|
*/
|
|
43
135
|
execute<T = unknown>(request: OgcProcessExecuteRequest): Promise<IJobRun<T>>;
|
|
44
136
|
/** Adopt an existing job by id (useful when reconnecting after navigation). */
|
|
45
137
|
job<T = unknown>(jobId: string, options?: {
|
|
46
138
|
processId?: string;
|
|
139
|
+
basePath?: string;
|
|
140
|
+
statusPath?: string;
|
|
141
|
+
resultsPath?: string;
|
|
47
142
|
}): IJobRun<T>;
|
|
143
|
+
/**
|
|
144
|
+
* Resolve the conformance declaration. Under `"advertised"` only what the
|
|
145
|
+
* caller already supplied (or a `conformance()` call made through this
|
|
146
|
+
* handle) counts; under `"strict"` the declaration is fetched once through
|
|
147
|
+
* the metadata cache so a refusal can be grounded in the server's own words.
|
|
148
|
+
*/
|
|
149
|
+
private resolveConformance;
|
|
150
|
+
/**
|
|
151
|
+
* Fail closed when the server has not declared what the caller asked for.
|
|
152
|
+
* Returns the conformance declaration (when one is in hand) so the created
|
|
153
|
+
* job run can reuse it to gate `cancel()`.
|
|
154
|
+
*/
|
|
155
|
+
private assertExecutionDeclared;
|
|
48
156
|
}
|
|
49
157
|
/**
|
|
50
158
|
* `IJobRun` implementation backed by OGC API Processes 1.0 status / result
|
|
@@ -57,19 +165,41 @@ export declare class HonuaOgcProcessJobRun<T = unknown> implements IJobRun<T> {
|
|
|
57
165
|
readonly id: string;
|
|
58
166
|
readonly type: string;
|
|
59
167
|
private readonly client;
|
|
168
|
+
private readonly basePath;
|
|
60
169
|
private readonly pollIntervalMs;
|
|
61
170
|
private readonly pollFn;
|
|
171
|
+
private readonly pollBudget;
|
|
172
|
+
private readonly conformance;
|
|
173
|
+
private readonly jobControlOptions;
|
|
174
|
+
private readonly capabilityPolicy;
|
|
175
|
+
/** Server-advertised routes, refreshed from every `links[]` the job reports. */
|
|
176
|
+
private statusPath;
|
|
177
|
+
private resultsPath;
|
|
62
178
|
private currentStatus;
|
|
63
179
|
private currentProgress;
|
|
64
180
|
private terminalSnapshot;
|
|
65
181
|
private terminalPromise;
|
|
66
182
|
private readonly listeners;
|
|
67
183
|
constructor(options: HonuaOgcProcessJobOptions);
|
|
184
|
+
private fetchStatus;
|
|
185
|
+
/**
|
|
186
|
+
* Adopt the routes the server advertises on a job document. Every poll can
|
|
187
|
+
* refresh them, so a server that only publishes its results link once the
|
|
188
|
+
* job succeeds is still followed rather than path-guessed.
|
|
189
|
+
*/
|
|
190
|
+
private absorbLinks;
|
|
68
191
|
get status(): JobStatus;
|
|
69
192
|
get progress(): JobProgress | undefined;
|
|
70
193
|
poll(): Promise<JobSnapshot<T>>;
|
|
71
194
|
watch(listener: JobSnapshotListener<T>): () => void;
|
|
72
195
|
results(options?: JobResultsOptions): Promise<JobResult<T>>;
|
|
196
|
+
/**
|
|
197
|
+
* Layer the caller's bounds over the handle's default budget, then guarantee
|
|
198
|
+
* a bound exists. NFR-001: `results()` is never an unbounded retry loop, so a
|
|
199
|
+
* caller that names neither a deadline nor an attempt cap still inherits
|
|
200
|
+
* {@link DEFAULT_POLL_DEADLINE_MS}.
|
|
201
|
+
*/
|
|
202
|
+
private resolveBudget;
|
|
73
203
|
cancel(): Promise<JobStatus>;
|
|
74
204
|
private runUntilTerminal;
|
|
75
205
|
/**
|
|
@@ -79,8 +209,41 @@ export declare class HonuaOgcProcessJobRun<T = unknown> implements IJobRun<T> {
|
|
|
79
209
|
* populated by the time `runUntilTerminal` / `poll` resolves.
|
|
80
210
|
*/
|
|
81
211
|
private handleOgcStatus;
|
|
212
|
+
/**
|
|
213
|
+
* Job-route envelope pinned to the root the job was created against,
|
|
214
|
+
* preferring a route the server advertised over the Core path template.
|
|
215
|
+
*/
|
|
216
|
+
private jobRequest;
|
|
217
|
+
/**
|
|
218
|
+
* Dismissal is an optional Core extension. When the server's declaration is
|
|
219
|
+
* in hand and neither the Dismiss conformance class nor the process's
|
|
220
|
+
* `jobControlOptions` includes `dismiss`, refuse before issuing a DELETE the
|
|
221
|
+
* server never advertised.
|
|
222
|
+
*/
|
|
223
|
+
private assertDismissDeclared;
|
|
82
224
|
private notify;
|
|
83
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* `IJobRun` for a synchronous execution (Core §7.11: `200` with the results
|
|
228
|
+
* document inline). No job resource exists on the server, so the run starts
|
|
229
|
+
* terminal: `results()` resolves from memory, `poll()` replays the terminal
|
|
230
|
+
* snapshot, and `cancel()` is a no-op that reports the outcome that already
|
|
231
|
+
* happened. Callers therefore read a sync and an async execution through one
|
|
232
|
+
* surface.
|
|
233
|
+
*/
|
|
234
|
+
export declare class HonuaOgcProcessSyncRun<T = unknown> implements IJobRun<T> {
|
|
235
|
+
/** Empty: OGC Processes assigns no job identifier to a synchronous execution. */
|
|
236
|
+
readonly id = "";
|
|
237
|
+
readonly type: string;
|
|
238
|
+
readonly status: JobStatus;
|
|
239
|
+
readonly progress: JobProgress | undefined;
|
|
240
|
+
private readonly snapshot;
|
|
241
|
+
constructor(processId: string, outputs: Record<string, T>);
|
|
242
|
+
poll(): Promise<JobSnapshot<T>>;
|
|
243
|
+
watch(listener: JobSnapshotListener<T>): () => void;
|
|
244
|
+
results(): Promise<JobResult<T>>;
|
|
245
|
+
cancel(): Promise<JobStatus>;
|
|
246
|
+
}
|
|
84
247
|
/** Error thrown when `IJobRun.results()` resolves a non-success terminal. */
|
|
85
248
|
export declare class HonuaJobFailedError extends HonuaSdkError {
|
|
86
249
|
readonly status: JobStatus;
|
|
@@ -97,23 +260,17 @@ export declare function listOgcProcesses(transport: HonuaProtocolTransport, requ
|
|
|
97
260
|
export declare function getOgcProcess(transport: HonuaProtocolTransport, request: {
|
|
98
261
|
processId: string;
|
|
99
262
|
} & OgcMetadataRequest): Promise<HonuaOgcProcessDescription>;
|
|
263
|
+
/**
|
|
264
|
+
* `POST /processes/{processId}/execution` (Core §7.11).
|
|
265
|
+
*
|
|
266
|
+
* Core defines two success shapes and a conformant server may choose either:
|
|
267
|
+
* `200` with the results document (synchronous) or `201` + `Location` with a
|
|
268
|
+
* `statusInfo` body (asynchronous). This reads the response rather than
|
|
269
|
+
* assuming one, so the same call works against a raw third-party server and
|
|
270
|
+
* against the async-only Honua facade, and reports which shape came back.
|
|
271
|
+
*/
|
|
100
272
|
export declare function executeOgcProcess(transport: HonuaProtocolTransport, request: OgcProcessExecuteRequest): Promise<HonuaOgcProcessJobAccepted>;
|
|
101
|
-
export declare function getOgcProcessJob(transport: HonuaProtocolTransport, request:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
responseFormat?: string;
|
|
105
|
-
extraParams?: Record<string, string | number | boolean>;
|
|
106
|
-
}): Promise<HonuaOgcProcessJobStatus>;
|
|
107
|
-
export declare function getOgcProcessJobResults(transport: HonuaProtocolTransport, request: {
|
|
108
|
-
jobId: string;
|
|
109
|
-
signal?: AbortSignal;
|
|
110
|
-
responseFormat?: string;
|
|
111
|
-
extraParams?: Record<string, string | number | boolean>;
|
|
112
|
-
}): Promise<HonuaOgcProcessJobResults>;
|
|
113
|
-
export declare function cancelOgcProcessJob(transport: HonuaProtocolTransport, request: {
|
|
114
|
-
jobId: string;
|
|
115
|
-
signal?: AbortSignal;
|
|
116
|
-
responseFormat?: string;
|
|
117
|
-
extraParams?: Record<string, string | number | boolean>;
|
|
118
|
-
}): Promise<HonuaOgcProcessJobStatus>;
|
|
273
|
+
export declare function getOgcProcessJob(transport: HonuaProtocolTransport, request: OgcProcessJobRequest): Promise<HonuaOgcProcessJobStatus>;
|
|
274
|
+
export declare function getOgcProcessJobResults(transport: HonuaProtocolTransport, request: OgcProcessJobRequest): Promise<HonuaOgcProcessJobResults>;
|
|
275
|
+
export declare function cancelOgcProcessJob(transport: HonuaProtocolTransport, request: OgcProcessJobRequest): Promise<HonuaOgcProcessJobStatus>;
|
|
119
276
|
//# sourceMappingURL=ogc-processes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogc-processes.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-processes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ogc-processes.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-processes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EACV,OAAO,EAEP,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EAEvB,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAGpB;;;;;GAKG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,iCAAiC,CAAC;IAChD;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;IAC3C;;;OAGG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;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