@honua/sdk-esri-compat 0.0.6-alpha.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/README.md +5 -0
- package/contract/edit-session.d.ts +203 -0
- package/contract/edit-session.d.ts.map +1 -0
- package/contract/edit-session.js +717 -0
- package/contract/index.d.ts +20 -0
- package/contract/index.d.ts.map +1 -0
- package/contract/index.js +15 -0
- package/contract/jobs.d.ts +115 -0
- package/contract/jobs.d.ts.map +1 -0
- package/contract/jobs.js +22 -0
- package/contract/source.d.ts +138 -0
- package/contract/source.d.ts.map +1 -0
- package/contract/source.js +3364 -0
- package/contract/spatial-aggregation.d.ts +312 -0
- package/contract/spatial-aggregation.d.ts.map +1 -0
- package/contract/spatial-aggregation.js +196 -0
- package/contract/types.d.ts +542 -0
- package/contract/types.d.ts.map +1 -0
- package/contract/types.js +171 -0
- package/core/batch.d.ts +37 -0
- package/core/batch.d.ts.map +1 -0
- package/core/batch.js +78 -0
- package/core/cache-state.d.ts +76 -0
- package/core/cache-state.d.ts.map +1 -0
- package/core/cache-state.js +84 -0
- package/core/client.d.ts +289 -0
- package/core/client.d.ts.map +1 -0
- package/core/client.js +2625 -0
- package/core/errors.d.ts +68 -0
- package/core/errors.d.ts.map +1 -0
- package/core/errors.js +116 -0
- package/core/grpc-adapter.d.ts +23 -0
- package/core/grpc-adapter.d.ts.map +1 -0
- package/core/grpc-adapter.js +704 -0
- package/core/odata.d.ts +347 -0
- package/core/odata.d.ts.map +1 -0
- package/core/odata.js +837 -0
- package/core/ogc-conformance.d.ts +35 -0
- package/core/ogc-conformance.d.ts.map +1 -0
- package/core/ogc-conformance.js +121 -0
- package/core/ogc-maps.d.ts +45 -0
- package/core/ogc-maps.d.ts.map +1 -0
- package/core/ogc-maps.js +53 -0
- package/core/ogc-processes.d.ts +92 -0
- package/core/ogc-processes.d.ts.map +1 -0
- package/core/ogc-processes.js +325 -0
- package/core/ogc-tiles.d.ts +55 -0
- package/core/ogc-tiles.d.ts.map +1 -0
- package/core/ogc-tiles.js +81 -0
- package/core/pbf-decoder.d.ts +28 -0
- package/core/pbf-decoder.d.ts.map +1 -0
- package/core/pbf-decoder.js +627 -0
- package/core/query-builder.d.ts +261 -0
- package/core/query-builder.d.ts.map +1 -0
- package/core/query-builder.js +538 -0
- package/core/spatial-filter.d.ts +93 -0
- package/core/spatial-filter.d.ts.map +1 -0
- package/core/spatial-filter.js +153 -0
- package/core/stac.d.ts +43 -0
- package/core/stac.d.ts.map +1 -0
- package/core/stac.js +116 -0
- package/core/surfaces.d.ts +464 -0
- package/core/surfaces.d.ts.map +1 -0
- package/core/surfaces.js +1322 -0
- package/core/types.d.ts +1238 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +13 -0
- package/core/wfs-capabilities.d.ts +143 -0
- package/core/wfs-capabilities.d.ts.map +1 -0
- package/core/wfs-capabilities.js +478 -0
- package/core/wfs-filter.d.ts +118 -0
- package/core/wfs-filter.d.ts.map +1 -0
- package/core/wfs-filter.js +586 -0
- package/core/wfs.d.ts +219 -0
- package/core/wfs.d.ts.map +1 -0
- package/core/wfs.js +406 -0
- package/core/wms-capabilities.d.ts +110 -0
- package/core/wms-capabilities.d.ts.map +1 -0
- package/core/wms-capabilities.js +566 -0
- package/core/wms-types.d.ts +128 -0
- package/core/wms-types.d.ts.map +1 -0
- package/core/wms-types.js +32 -0
- package/core/wms.d.ts +108 -0
- package/core/wms.d.ts.map +1 -0
- package/core/wms.js +182 -0
- package/core/wmts-capabilities.d.ts +82 -0
- package/core/wmts-capabilities.d.ts.map +1 -0
- package/core/wmts-capabilities.js +409 -0
- package/core/wmts.d.ts +80 -0
- package/core/wmts.d.ts.map +1 -0
- package/core/wmts.js +173 -0
- package/esri-compat/basemap-gallery.d.ts +38 -0
- package/esri-compat/basemap-gallery.d.ts.map +1 -0
- package/esri-compat/basemap-gallery.js +159 -0
- package/esri-compat/basemap-layer-list.d.ts +35 -0
- package/esri-compat/basemap-layer-list.d.ts.map +1 -0
- package/esri-compat/basemap-layer-list.js +139 -0
- package/esri-compat/basemap.d.ts +32 -0
- package/esri-compat/basemap.d.ts.map +1 -0
- package/esri-compat/basemap.js +84 -0
- package/esri-compat/bookmarks.d.ts +36 -0
- package/esri-compat/bookmarks.d.ts.map +1 -0
- package/esri-compat/bookmarks.js +108 -0
- package/esri-compat/class-breaks-renderer.d.ts +50 -0
- package/esri-compat/class-breaks-renderer.d.ts.map +1 -0
- package/esri-compat/class-breaks-renderer.js +164 -0
- package/esri-compat/color.d.ts +22 -0
- package/esri-compat/color.d.ts.map +1 -0
- package/esri-compat/color.js +106 -0
- package/esri-compat/controls.d.ts +174 -0
- package/esri-compat/controls.d.ts.map +1 -0
- package/esri-compat/controls.js +479 -0
- package/esri-compat/coordinate-conversion.d.ts +41 -0
- package/esri-compat/coordinate-conversion.d.ts.map +1 -0
- package/esri-compat/coordinate-conversion.js +125 -0
- package/esri-compat/directions.d.ts +45 -0
- package/esri-compat/directions.d.ts.map +1 -0
- package/esri-compat/directions.js +123 -0
- package/esri-compat/editor.d.ts +47 -0
- package/esri-compat/editor.d.ts.map +1 -0
- package/esri-compat/editor.js +170 -0
- package/esri-compat/esri-config.d.ts +16 -0
- package/esri-compat/esri-config.d.ts.map +1 -0
- package/esri-compat/esri-config.js +23 -0
- package/esri-compat/esri-request.d.ts +17 -0
- package/esri-compat/esri-request.d.ts.map +1 -0
- package/esri-compat/esri-request.js +66 -0
- package/esri-compat/event-bus.d.ts +106 -0
- package/esri-compat/event-bus.d.ts.map +1 -0
- package/esri-compat/event-bus.js +90 -0
- package/esri-compat/expand.d.ts +36 -0
- package/esri-compat/expand.d.ts.map +1 -0
- package/esri-compat/expand.js +97 -0
- package/esri-compat/extent.d.ts +43 -0
- package/esri-compat/extent.d.ts.map +1 -0
- package/esri-compat/extent.js +140 -0
- package/esri-compat/feature-form.d.ts +64 -0
- package/esri-compat/feature-form.d.ts.map +1 -0
- package/esri-compat/feature-form.js +137 -0
- package/esri-compat/feature-layer.d.ts +173 -0
- package/esri-compat/feature-layer.d.ts.map +1 -0
- package/esri-compat/feature-layer.js +655 -0
- package/esri-compat/feature-set.d.ts +32 -0
- package/esri-compat/feature-set.d.ts.map +1 -0
- package/esri-compat/feature-set.js +80 -0
- package/esri-compat/feature-table.d.ts +141 -0
- package/esri-compat/feature-table.d.ts.map +1 -0
- package/esri-compat/feature-table.js +500 -0
- package/esri-compat/feature-templates.d.ts +41 -0
- package/esri-compat/feature-templates.d.ts.map +1 -0
- package/esri-compat/feature-templates.js +97 -0
- package/esri-compat/feature.d.ts +33 -0
- package/esri-compat/feature.d.ts.map +1 -0
- package/esri-compat/feature.js +83 -0
- package/esri-compat/graphic.d.ts +46 -0
- package/esri-compat/graphic.d.ts.map +1 -0
- package/esri-compat/graphic.js +103 -0
- package/esri-compat/graphics-layer.d.ts +49 -0
- package/esri-compat/graphics-layer.d.ts.map +1 -0
- package/esri-compat/graphics-layer.js +185 -0
- package/esri-compat/group-layer.d.ts +48 -0
- package/esri-compat/group-layer.d.ts.map +1 -0
- package/esri-compat/group-layer.js +212 -0
- package/esri-compat/identify.d.ts +71 -0
- package/esri-compat/identify.d.ts.map +1 -0
- package/esri-compat/identify.js +299 -0
- package/esri-compat/identity-manager.d.ts +31 -0
- package/esri-compat/identity-manager.d.ts.map +1 -0
- package/esri-compat/identity-manager.js +115 -0
- package/esri-compat/label-class.d.ts +31 -0
- package/esri-compat/label-class.d.ts.map +1 -0
- package/esri-compat/label-class.js +102 -0
- package/esri-compat/layer-list.d.ts +77 -0
- package/esri-compat/layer-list.d.ts.map +1 -0
- package/esri-compat/layer-list.js +342 -0
- package/esri-compat/legend.d.ts +53 -0
- package/esri-compat/legend.d.ts.map +1 -0
- package/esri-compat/legend.js +254 -0
- package/esri-compat/map-image-layer.d.ts +162 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -0
- package/esri-compat/map-image-layer.js +704 -0
- package/esri-compat/map-view.d.ts +315 -0
- package/esri-compat/map-view.d.ts.map +1 -0
- package/esri-compat/map-view.js +1110 -0
- package/esri-compat/map.d.ts +47 -0
- package/esri-compat/map.d.ts.map +1 -0
- package/esri-compat/map.js +209 -0
- package/esri-compat/measurement-2d.d.ts +61 -0
- package/esri-compat/measurement-2d.d.ts.map +1 -0
- package/esri-compat/measurement-2d.js +184 -0
- package/esri-compat/measurement.d.ts +45 -0
- package/esri-compat/measurement.d.ts.map +1 -0
- package/esri-compat/measurement.js +193 -0
- package/esri-compat/oauth-info.d.ts +35 -0
- package/esri-compat/oauth-info.d.ts.map +1 -0
- package/esri-compat/oauth-info.js +115 -0
- package/esri-compat/picture-marker-symbol.d.ts +35 -0
- package/esri-compat/picture-marker-symbol.d.ts.map +1 -0
- package/esri-compat/picture-marker-symbol.js +126 -0
- package/esri-compat/point.d.ts +31 -0
- package/esri-compat/point.d.ts.map +1 -0
- package/esri-compat/point.js +102 -0
- package/esri-compat/polygon.d.ts +31 -0
- package/esri-compat/polygon.d.ts.map +1 -0
- package/esri-compat/polygon.js +107 -0
- package/esri-compat/polyline.d.ts +31 -0
- package/esri-compat/polyline.d.ts.map +1 -0
- package/esri-compat/polyline.js +107 -0
- package/esri-compat/popup-template.d.ts +55 -0
- package/esri-compat/popup-template.d.ts.map +1 -0
- package/esri-compat/popup-template.js +128 -0
- package/esri-compat/popup.d.ts +54 -0
- package/esri-compat/popup.d.ts.map +1 -0
- package/esri-compat/popup.js +312 -0
- package/esri-compat/print.d.ts +47 -0
- package/esri-compat/print.d.ts.map +1 -0
- package/esri-compat/print.js +105 -0
- package/esri-compat/query.d.ts +46 -0
- package/esri-compat/query.d.ts.map +1 -0
- package/esri-compat/query.js +119 -0
- package/esri-compat/reactive-utils.d.ts +23 -0
- package/esri-compat/reactive-utils.d.ts.map +1 -0
- package/esri-compat/reactive-utils.js +178 -0
- package/esri-compat/request.d.ts +41 -0
- package/esri-compat/request.d.ts.map +1 -0
- package/esri-compat/request.js +253 -0
- package/esri-compat/route-layer.d.ts +59 -0
- package/esri-compat/route-layer.d.ts.map +1 -0
- package/esri-compat/route-layer.js +223 -0
- package/esri-compat/route-task.d.ts +88 -0
- package/esri-compat/route-task.d.ts.map +1 -0
- package/esri-compat/route-task.js +225 -0
- package/esri-compat/scene-view.d.ts +41 -0
- package/esri-compat/scene-view.d.ts.map +1 -0
- package/esri-compat/scene-view.js +68 -0
- package/esri-compat/search.d.ts +112 -0
- package/esri-compat/search.d.ts.map +1 -0
- package/esri-compat/search.js +820 -0
- package/esri-compat/simple-fill-symbol.d.ts +27 -0
- package/esri-compat/simple-fill-symbol.d.ts.map +1 -0
- package/esri-compat/simple-fill-symbol.js +85 -0
- package/esri-compat/simple-line-symbol.d.ts +27 -0
- package/esri-compat/simple-line-symbol.d.ts.map +1 -0
- package/esri-compat/simple-line-symbol.js +85 -0
- package/esri-compat/simple-marker-symbol.d.ts +29 -0
- package/esri-compat/simple-marker-symbol.d.ts.map +1 -0
- package/esri-compat/simple-marker-symbol.js +92 -0
- package/esri-compat/simple-renderer.d.ts +29 -0
- package/esri-compat/simple-renderer.d.ts.map +1 -0
- package/esri-compat/simple-renderer.js +92 -0
- package/esri-compat/sketch.d.ts +64 -0
- package/esri-compat/sketch.d.ts.map +1 -0
- package/esri-compat/sketch.js +227 -0
- package/esri-compat/spatial-reference.d.ts +31 -0
- package/esri-compat/spatial-reference.d.ts.map +1 -0
- package/esri-compat/spatial-reference.js +102 -0
- package/esri-compat/swipe.d.ts +34 -0
- package/esri-compat/swipe.d.ts.map +1 -0
- package/esri-compat/swipe.js +93 -0
- package/esri-compat/table-list.d.ts +36 -0
- package/esri-compat/table-list.d.ts.map +1 -0
- package/esri-compat/table-list.js +126 -0
- package/esri-compat/text-symbol.d.ts +37 -0
- package/esri-compat/text-symbol.d.ts.map +1 -0
- package/esri-compat/text-symbol.js +123 -0
- package/esri-compat/tile-layer.d.ts +52 -0
- package/esri-compat/tile-layer.d.ts.map +1 -0
- package/esri-compat/tile-layer.js +167 -0
- package/esri-compat/time-slider.d.ts +70 -0
- package/esri-compat/time-slider.d.ts.map +1 -0
- package/esri-compat/time-slider.js +208 -0
- package/esri-compat/track.d.ts +51 -0
- package/esri-compat/track.d.ts.map +1 -0
- package/esri-compat/track.js +174 -0
- package/esri-compat/unique-value-renderer.d.ts +41 -0
- package/esri-compat/unique-value-renderer.d.ts.map +1 -0
- package/esri-compat/unique-value-renderer.js +127 -0
- package/esri-compat/url.d.ts +12 -0
- package/esri-compat/url.d.ts.map +1 -0
- package/esri-compat/url.js +54 -0
- package/esri-compat/web-map.d.ts +14 -0
- package/esri-compat/web-map.d.ts.map +1 -0
- package/esri-compat/web-map.js +24 -0
- package/gen/honua/v1/feature_service_pb.d.ts +918 -0
- package/gen/honua/v1/feature_service_pb.d.ts.map +1 -0
- package/gen/honua/v1/feature_service_pb.js +375 -0
- package/index.d.ts +130 -0
- package/index.js +65 -0
- package/package.json +22 -0
package/core/errors.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { HonuaWmsCapabilitiesParseError } from "./wms-capabilities.js";
|
|
2
|
+
import { HonuaWmtsCapabilitiesParseError } from "./wmts-capabilities.js";
|
|
3
|
+
export declare class HonuaHttpError extends Error {
|
|
4
|
+
readonly statusCode: number;
|
|
5
|
+
readonly body: unknown;
|
|
6
|
+
constructor(statusCode: number, message: string, body: unknown);
|
|
7
|
+
}
|
|
8
|
+
/** Thrown when a request exceeds the configured timeout. */
|
|
9
|
+
export declare class HonuaTimeoutError extends Error {
|
|
10
|
+
readonly timeoutMs: number;
|
|
11
|
+
constructor(timeoutMs: number);
|
|
12
|
+
}
|
|
13
|
+
/** Thrown when a network-level failure occurs (DNS, connection refused, etc.). */
|
|
14
|
+
export declare class HonuaNetworkError extends Error {
|
|
15
|
+
readonly cause: unknown;
|
|
16
|
+
constructor(message: string, cause: unknown);
|
|
17
|
+
}
|
|
18
|
+
/** Thrown when a request is aborted via a caller-provided AbortSignal. */
|
|
19
|
+
export declare class HonuaAbortError extends Error {
|
|
20
|
+
constructor(message?: string);
|
|
21
|
+
}
|
|
22
|
+
/** Thrown when a gRPC-Web request fails, wrapping the underlying ConnectError. */
|
|
23
|
+
export declare class HonuaGrpcError extends Error {
|
|
24
|
+
readonly code: number;
|
|
25
|
+
readonly details: unknown;
|
|
26
|
+
constructor(code: number, message: string, details?: unknown);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Thrown when a `Source` is asked to perform an operation that the underlying
|
|
30
|
+
* protocol or server does not support and the active capability policy is
|
|
31
|
+
* `strict`. The `capability` field names the missing capability so callers can
|
|
32
|
+
* decide whether to swap protocols, fall back to a degraded strategy, or
|
|
33
|
+
* surface the limitation to the user.
|
|
34
|
+
*/
|
|
35
|
+
export declare class HonuaCapabilityNotSupportedError extends Error {
|
|
36
|
+
readonly capability: string;
|
|
37
|
+
readonly protocol: string;
|
|
38
|
+
readonly sourceId: string | undefined;
|
|
39
|
+
constructor(capability: string, protocol: string, sourceId?: string);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Thrown when an `ExplorationContext` operation is invalid — for example,
|
|
43
|
+
* dispatching an intent against a context that has been disposed, restoring
|
|
44
|
+
* an incompatible snapshot, or binding a view that requests a slice that is
|
|
45
|
+
* not exposed by the current dataset.
|
|
46
|
+
*/
|
|
47
|
+
export declare class HonuaExplorationContextError extends Error {
|
|
48
|
+
readonly code: string;
|
|
49
|
+
constructor(code: string, message: string);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Thrown when a WFS server replies with an `ows:ExceptionReport`. Carries the
|
|
53
|
+
* structured exception metadata so callers can distinguish capability misses
|
|
54
|
+
* (for example `OperationProcessingFailed`, `InvalidParameterValue`) from
|
|
55
|
+
* transport / timeout failures. The XML payload is consumed by
|
|
56
|
+
* `src/core/wfs-capabilities.ts`; raw access lives behind the `protocol("wfs")`
|
|
57
|
+
* escape hatch.
|
|
58
|
+
*/
|
|
59
|
+
export declare class HonuaWfsExceptionError extends Error {
|
|
60
|
+
readonly exceptionCode: string;
|
|
61
|
+
readonly locator: string | undefined;
|
|
62
|
+
constructor(exceptionCode: string, message: string, locator?: string);
|
|
63
|
+
}
|
|
64
|
+
/** All Honua SDK error types that can be discriminated with `instanceof`. */
|
|
65
|
+
export type HonuaError = HonuaHttpError | HonuaTimeoutError | HonuaNetworkError | HonuaAbortError | HonuaGrpcError | HonuaCapabilityNotSupportedError | HonuaExplorationContextError | HonuaWfsExceptionError | HonuaWmsCapabilitiesParseError | HonuaWmtsCapabilitiesParseError;
|
|
66
|
+
/** Type guard that narrows any value to one of the Honua SDK error types. */
|
|
67
|
+
export declare function isHonuaError(error: unknown): error is HonuaError;
|
|
68
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/core/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAEzE,qBAAa,cAAe,SAAQ,KAAK;IACvC,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,IAAI,EAAE,OAAO,CAAC;gBAEX,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;CAMtE;AAED,4DAA4D;AAC5D,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,SAAgB,SAAS,EAAE,MAAM,CAAC;gBAEf,SAAS,EAAE,MAAM;CAKrC;AAED,kFAAkF;AAClF,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,SAAyB,KAAK,EAAE,OAAO,CAAC;gBAErB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAKnD;AAED,0EAA0E;AAC1E,qBAAa,eAAgB,SAAQ,KAAK;gBACrB,OAAO,SAAwB;CAInD;AAED,kFAAkF;AAClF,qBAAa,cAAe,SAAQ,KAAK;IACvC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,OAAO,CAAC;gBAEd,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAMpE;AAED;;;;;;GAMG;AACH,qBAAa,gCAAiC,SAAQ,KAAK;IACzD,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE1B,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAW3E;AAED;;;;;GAKG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,SAAgB,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAKjD;AAED;;;;;;;GAOG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,SAAgB,aAAa,EAAE,MAAM,CAAC;IACtC,SAAgB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEzB,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAU5E;AAED,6EAA6E;AAC7E,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,gCAAgC,GAChC,4BAA4B,GAC5B,sBAAsB,GACtB,8BAA8B,GAC9B,+BAA+B,CAAC;AAEpC,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAahE"}
|
package/core/errors.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { HonuaWmsCapabilitiesParseError } from "./wms-capabilities.js";
|
|
2
|
+
import { HonuaWmtsCapabilitiesParseError } from "./wmts-capabilities.js";
|
|
3
|
+
export class HonuaHttpError extends Error {
|
|
4
|
+
statusCode;
|
|
5
|
+
body;
|
|
6
|
+
constructor(statusCode, message, body) {
|
|
7
|
+
super(`HTTP ${statusCode}: ${message}`);
|
|
8
|
+
this.name = "HonuaHttpError";
|
|
9
|
+
this.statusCode = statusCode;
|
|
10
|
+
this.body = body;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** Thrown when a request exceeds the configured timeout. */
|
|
14
|
+
export class HonuaTimeoutError extends Error {
|
|
15
|
+
timeoutMs;
|
|
16
|
+
constructor(timeoutMs) {
|
|
17
|
+
super(`Request timed out after ${timeoutMs}ms`);
|
|
18
|
+
this.name = "HonuaTimeoutError";
|
|
19
|
+
this.timeoutMs = timeoutMs;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** Thrown when a network-level failure occurs (DNS, connection refused, etc.). */
|
|
23
|
+
export class HonuaNetworkError extends Error {
|
|
24
|
+
cause;
|
|
25
|
+
constructor(message, cause) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.name = "HonuaNetworkError";
|
|
28
|
+
this.cause = cause;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** Thrown when a request is aborted via a caller-provided AbortSignal. */
|
|
32
|
+
export class HonuaAbortError extends Error {
|
|
33
|
+
constructor(message = "Request was aborted") {
|
|
34
|
+
super(message);
|
|
35
|
+
this.name = "HonuaAbortError";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Thrown when a gRPC-Web request fails, wrapping the underlying ConnectError. */
|
|
39
|
+
export class HonuaGrpcError extends Error {
|
|
40
|
+
code;
|
|
41
|
+
details;
|
|
42
|
+
constructor(code, message, details) {
|
|
43
|
+
super(message);
|
|
44
|
+
this.name = "HonuaGrpcError";
|
|
45
|
+
this.code = code;
|
|
46
|
+
this.details = details;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Thrown when a `Source` is asked to perform an operation that the underlying
|
|
51
|
+
* protocol or server does not support and the active capability policy is
|
|
52
|
+
* `strict`. The `capability` field names the missing capability so callers can
|
|
53
|
+
* decide whether to swap protocols, fall back to a degraded strategy, or
|
|
54
|
+
* surface the limitation to the user.
|
|
55
|
+
*/
|
|
56
|
+
export class HonuaCapabilityNotSupportedError extends Error {
|
|
57
|
+
capability;
|
|
58
|
+
protocol;
|
|
59
|
+
sourceId;
|
|
60
|
+
constructor(capability, protocol, sourceId) {
|
|
61
|
+
super(sourceId
|
|
62
|
+
? `Capability "${capability}" is not supported by protocol "${protocol}" on source "${sourceId}"`
|
|
63
|
+
: `Capability "${capability}" is not supported by protocol "${protocol}"`);
|
|
64
|
+
this.name = "HonuaCapabilityNotSupportedError";
|
|
65
|
+
this.capability = capability;
|
|
66
|
+
this.protocol = protocol;
|
|
67
|
+
this.sourceId = sourceId;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Thrown when an `ExplorationContext` operation is invalid — for example,
|
|
72
|
+
* dispatching an intent against a context that has been disposed, restoring
|
|
73
|
+
* an incompatible snapshot, or binding a view that requests a slice that is
|
|
74
|
+
* not exposed by the current dataset.
|
|
75
|
+
*/
|
|
76
|
+
export class HonuaExplorationContextError extends Error {
|
|
77
|
+
code;
|
|
78
|
+
constructor(code, message) {
|
|
79
|
+
super(message);
|
|
80
|
+
this.name = "HonuaExplorationContextError";
|
|
81
|
+
this.code = code;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Thrown when a WFS server replies with an `ows:ExceptionReport`. Carries the
|
|
86
|
+
* structured exception metadata so callers can distinguish capability misses
|
|
87
|
+
* (for example `OperationProcessingFailed`, `InvalidParameterValue`) from
|
|
88
|
+
* transport / timeout failures. The XML payload is consumed by
|
|
89
|
+
* `src/core/wfs-capabilities.ts`; raw access lives behind the `protocol("wfs")`
|
|
90
|
+
* escape hatch.
|
|
91
|
+
*/
|
|
92
|
+
export class HonuaWfsExceptionError extends Error {
|
|
93
|
+
exceptionCode;
|
|
94
|
+
locator;
|
|
95
|
+
constructor(exceptionCode, message, locator) {
|
|
96
|
+
super(locator
|
|
97
|
+
? `WFS ExceptionReport ${exceptionCode} (${locator}): ${message}`
|
|
98
|
+
: `WFS ExceptionReport ${exceptionCode}: ${message}`);
|
|
99
|
+
this.name = "HonuaWfsExceptionError";
|
|
100
|
+
this.exceptionCode = exceptionCode;
|
|
101
|
+
this.locator = locator;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/** Type guard that narrows any value to one of the Honua SDK error types. */
|
|
105
|
+
export function isHonuaError(error) {
|
|
106
|
+
return (error instanceof HonuaHttpError ||
|
|
107
|
+
error instanceof HonuaTimeoutError ||
|
|
108
|
+
error instanceof HonuaNetworkError ||
|
|
109
|
+
error instanceof HonuaAbortError ||
|
|
110
|
+
error instanceof HonuaGrpcError ||
|
|
111
|
+
error instanceof HonuaCapabilityNotSupportedError ||
|
|
112
|
+
error instanceof HonuaExplorationContextError ||
|
|
113
|
+
error instanceof HonuaWfsExceptionError ||
|
|
114
|
+
error instanceof HonuaWmsCapabilitiesParseError ||
|
|
115
|
+
error instanceof HonuaWmtsCapabilitiesParseError);
|
|
116
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type FeaturePage, type QueryFeaturesResponse } from "../gen/honua/v1/feature_service_pb.js";
|
|
2
|
+
import type { HonuaCountResponse, HonuaExtentResponse, HonuaFeature, HonuaObjectIdsResponse, HonuaQueryResponse, QueryFeaturesRequest } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Converts a SDK QueryFeaturesRequest into a proto QueryFeaturesRequest message.
|
|
5
|
+
*/
|
|
6
|
+
export declare function toProtoQueryRequest(request: QueryFeaturesRequest): import("../gen/honua/v1/feature_service_pb.js").QueryFeaturesRequest;
|
|
7
|
+
/**
|
|
8
|
+
* Converts a proto QueryFeaturesResponse into the JSON-compatible shape
|
|
9
|
+
* matching the `f=json` response format.
|
|
10
|
+
*/
|
|
11
|
+
export declare function fromProtoQueryResponse(response: QueryFeaturesResponse): HonuaQueryResponse | HonuaCountResponse | HonuaObjectIdsResponse | HonuaExtentResponse;
|
|
12
|
+
/**
|
|
13
|
+
* Converts a stream of proto FeaturePages into an async generator
|
|
14
|
+
* that yields arrays of JSON-compatible features, matching the
|
|
15
|
+
* existing queryFeaturesStream yield type.
|
|
16
|
+
*/
|
|
17
|
+
export declare function streamProtoPages(stream: AsyncIterable<FeaturePage>): AsyncGenerator<HonuaFeature[], void, undefined>;
|
|
18
|
+
/**
|
|
19
|
+
* Wraps a ConnectError (or any error from the gRPC transport) in a
|
|
20
|
+
* HonuaGrpcError for consistent `instanceof` discrimination.
|
|
21
|
+
*/
|
|
22
|
+
export declare function wrapConnectError(error: unknown): Error;
|
|
23
|
+
//# sourceMappingURL=grpc-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc-adapter.d.ts","sourceRoot":"","sources":["../../../src/core/grpc-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,WAAW,EAWhB,KAAK,qBAAqB,EAM3B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EAEZ,sBAAsB,EACtB,kBAAkB,EAElB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAgFpB;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,wEAoIhE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,qBAAqB,GAC9B,kBAAkB,GAAG,kBAAkB,GAAG,sBAAsB,GAAG,mBAAmB,CAkDxF;AA0UD;;;;GAIG;AACH,wBAAuB,gBAAgB,CACrC,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,GACjC,cAAc,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,CAiBjD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAYtD"}
|