@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.
Files changed (289) hide show
  1. package/README.md +5 -0
  2. package/contract/edit-session.d.ts +203 -0
  3. package/contract/edit-session.d.ts.map +1 -0
  4. package/contract/edit-session.js +717 -0
  5. package/contract/index.d.ts +20 -0
  6. package/contract/index.d.ts.map +1 -0
  7. package/contract/index.js +15 -0
  8. package/contract/jobs.d.ts +115 -0
  9. package/contract/jobs.d.ts.map +1 -0
  10. package/contract/jobs.js +22 -0
  11. package/contract/source.d.ts +138 -0
  12. package/contract/source.d.ts.map +1 -0
  13. package/contract/source.js +3364 -0
  14. package/contract/spatial-aggregation.d.ts +312 -0
  15. package/contract/spatial-aggregation.d.ts.map +1 -0
  16. package/contract/spatial-aggregation.js +196 -0
  17. package/contract/types.d.ts +542 -0
  18. package/contract/types.d.ts.map +1 -0
  19. package/contract/types.js +171 -0
  20. package/core/batch.d.ts +37 -0
  21. package/core/batch.d.ts.map +1 -0
  22. package/core/batch.js +78 -0
  23. package/core/cache-state.d.ts +76 -0
  24. package/core/cache-state.d.ts.map +1 -0
  25. package/core/cache-state.js +84 -0
  26. package/core/client.d.ts +289 -0
  27. package/core/client.d.ts.map +1 -0
  28. package/core/client.js +2625 -0
  29. package/core/errors.d.ts +68 -0
  30. package/core/errors.d.ts.map +1 -0
  31. package/core/errors.js +116 -0
  32. package/core/grpc-adapter.d.ts +23 -0
  33. package/core/grpc-adapter.d.ts.map +1 -0
  34. package/core/grpc-adapter.js +704 -0
  35. package/core/odata.d.ts +347 -0
  36. package/core/odata.d.ts.map +1 -0
  37. package/core/odata.js +837 -0
  38. package/core/ogc-conformance.d.ts +35 -0
  39. package/core/ogc-conformance.d.ts.map +1 -0
  40. package/core/ogc-conformance.js +121 -0
  41. package/core/ogc-maps.d.ts +45 -0
  42. package/core/ogc-maps.d.ts.map +1 -0
  43. package/core/ogc-maps.js +53 -0
  44. package/core/ogc-processes.d.ts +92 -0
  45. package/core/ogc-processes.d.ts.map +1 -0
  46. package/core/ogc-processes.js +325 -0
  47. package/core/ogc-tiles.d.ts +55 -0
  48. package/core/ogc-tiles.d.ts.map +1 -0
  49. package/core/ogc-tiles.js +81 -0
  50. package/core/pbf-decoder.d.ts +28 -0
  51. package/core/pbf-decoder.d.ts.map +1 -0
  52. package/core/pbf-decoder.js +627 -0
  53. package/core/query-builder.d.ts +261 -0
  54. package/core/query-builder.d.ts.map +1 -0
  55. package/core/query-builder.js +538 -0
  56. package/core/spatial-filter.d.ts +93 -0
  57. package/core/spatial-filter.d.ts.map +1 -0
  58. package/core/spatial-filter.js +153 -0
  59. package/core/stac.d.ts +43 -0
  60. package/core/stac.d.ts.map +1 -0
  61. package/core/stac.js +116 -0
  62. package/core/surfaces.d.ts +464 -0
  63. package/core/surfaces.d.ts.map +1 -0
  64. package/core/surfaces.js +1322 -0
  65. package/core/types.d.ts +1238 -0
  66. package/core/types.d.ts.map +1 -0
  67. package/core/types.js +13 -0
  68. package/core/wfs-capabilities.d.ts +143 -0
  69. package/core/wfs-capabilities.d.ts.map +1 -0
  70. package/core/wfs-capabilities.js +478 -0
  71. package/core/wfs-filter.d.ts +118 -0
  72. package/core/wfs-filter.d.ts.map +1 -0
  73. package/core/wfs-filter.js +586 -0
  74. package/core/wfs.d.ts +219 -0
  75. package/core/wfs.d.ts.map +1 -0
  76. package/core/wfs.js +406 -0
  77. package/core/wms-capabilities.d.ts +110 -0
  78. package/core/wms-capabilities.d.ts.map +1 -0
  79. package/core/wms-capabilities.js +566 -0
  80. package/core/wms-types.d.ts +128 -0
  81. package/core/wms-types.d.ts.map +1 -0
  82. package/core/wms-types.js +32 -0
  83. package/core/wms.d.ts +108 -0
  84. package/core/wms.d.ts.map +1 -0
  85. package/core/wms.js +182 -0
  86. package/core/wmts-capabilities.d.ts +82 -0
  87. package/core/wmts-capabilities.d.ts.map +1 -0
  88. package/core/wmts-capabilities.js +409 -0
  89. package/core/wmts.d.ts +80 -0
  90. package/core/wmts.d.ts.map +1 -0
  91. package/core/wmts.js +173 -0
  92. package/esri-compat/basemap-gallery.d.ts +38 -0
  93. package/esri-compat/basemap-gallery.d.ts.map +1 -0
  94. package/esri-compat/basemap-gallery.js +159 -0
  95. package/esri-compat/basemap-layer-list.d.ts +35 -0
  96. package/esri-compat/basemap-layer-list.d.ts.map +1 -0
  97. package/esri-compat/basemap-layer-list.js +139 -0
  98. package/esri-compat/basemap.d.ts +32 -0
  99. package/esri-compat/basemap.d.ts.map +1 -0
  100. package/esri-compat/basemap.js +84 -0
  101. package/esri-compat/bookmarks.d.ts +36 -0
  102. package/esri-compat/bookmarks.d.ts.map +1 -0
  103. package/esri-compat/bookmarks.js +108 -0
  104. package/esri-compat/class-breaks-renderer.d.ts +50 -0
  105. package/esri-compat/class-breaks-renderer.d.ts.map +1 -0
  106. package/esri-compat/class-breaks-renderer.js +164 -0
  107. package/esri-compat/color.d.ts +22 -0
  108. package/esri-compat/color.d.ts.map +1 -0
  109. package/esri-compat/color.js +106 -0
  110. package/esri-compat/controls.d.ts +174 -0
  111. package/esri-compat/controls.d.ts.map +1 -0
  112. package/esri-compat/controls.js +479 -0
  113. package/esri-compat/coordinate-conversion.d.ts +41 -0
  114. package/esri-compat/coordinate-conversion.d.ts.map +1 -0
  115. package/esri-compat/coordinate-conversion.js +125 -0
  116. package/esri-compat/directions.d.ts +45 -0
  117. package/esri-compat/directions.d.ts.map +1 -0
  118. package/esri-compat/directions.js +123 -0
  119. package/esri-compat/editor.d.ts +47 -0
  120. package/esri-compat/editor.d.ts.map +1 -0
  121. package/esri-compat/editor.js +170 -0
  122. package/esri-compat/esri-config.d.ts +16 -0
  123. package/esri-compat/esri-config.d.ts.map +1 -0
  124. package/esri-compat/esri-config.js +23 -0
  125. package/esri-compat/esri-request.d.ts +17 -0
  126. package/esri-compat/esri-request.d.ts.map +1 -0
  127. package/esri-compat/esri-request.js +66 -0
  128. package/esri-compat/event-bus.d.ts +106 -0
  129. package/esri-compat/event-bus.d.ts.map +1 -0
  130. package/esri-compat/event-bus.js +90 -0
  131. package/esri-compat/expand.d.ts +36 -0
  132. package/esri-compat/expand.d.ts.map +1 -0
  133. package/esri-compat/expand.js +97 -0
  134. package/esri-compat/extent.d.ts +43 -0
  135. package/esri-compat/extent.d.ts.map +1 -0
  136. package/esri-compat/extent.js +140 -0
  137. package/esri-compat/feature-form.d.ts +64 -0
  138. package/esri-compat/feature-form.d.ts.map +1 -0
  139. package/esri-compat/feature-form.js +137 -0
  140. package/esri-compat/feature-layer.d.ts +173 -0
  141. package/esri-compat/feature-layer.d.ts.map +1 -0
  142. package/esri-compat/feature-layer.js +655 -0
  143. package/esri-compat/feature-set.d.ts +32 -0
  144. package/esri-compat/feature-set.d.ts.map +1 -0
  145. package/esri-compat/feature-set.js +80 -0
  146. package/esri-compat/feature-table.d.ts +141 -0
  147. package/esri-compat/feature-table.d.ts.map +1 -0
  148. package/esri-compat/feature-table.js +500 -0
  149. package/esri-compat/feature-templates.d.ts +41 -0
  150. package/esri-compat/feature-templates.d.ts.map +1 -0
  151. package/esri-compat/feature-templates.js +97 -0
  152. package/esri-compat/feature.d.ts +33 -0
  153. package/esri-compat/feature.d.ts.map +1 -0
  154. package/esri-compat/feature.js +83 -0
  155. package/esri-compat/graphic.d.ts +46 -0
  156. package/esri-compat/graphic.d.ts.map +1 -0
  157. package/esri-compat/graphic.js +103 -0
  158. package/esri-compat/graphics-layer.d.ts +49 -0
  159. package/esri-compat/graphics-layer.d.ts.map +1 -0
  160. package/esri-compat/graphics-layer.js +185 -0
  161. package/esri-compat/group-layer.d.ts +48 -0
  162. package/esri-compat/group-layer.d.ts.map +1 -0
  163. package/esri-compat/group-layer.js +212 -0
  164. package/esri-compat/identify.d.ts +71 -0
  165. package/esri-compat/identify.d.ts.map +1 -0
  166. package/esri-compat/identify.js +299 -0
  167. package/esri-compat/identity-manager.d.ts +31 -0
  168. package/esri-compat/identity-manager.d.ts.map +1 -0
  169. package/esri-compat/identity-manager.js +115 -0
  170. package/esri-compat/label-class.d.ts +31 -0
  171. package/esri-compat/label-class.d.ts.map +1 -0
  172. package/esri-compat/label-class.js +102 -0
  173. package/esri-compat/layer-list.d.ts +77 -0
  174. package/esri-compat/layer-list.d.ts.map +1 -0
  175. package/esri-compat/layer-list.js +342 -0
  176. package/esri-compat/legend.d.ts +53 -0
  177. package/esri-compat/legend.d.ts.map +1 -0
  178. package/esri-compat/legend.js +254 -0
  179. package/esri-compat/map-image-layer.d.ts +162 -0
  180. package/esri-compat/map-image-layer.d.ts.map +1 -0
  181. package/esri-compat/map-image-layer.js +704 -0
  182. package/esri-compat/map-view.d.ts +315 -0
  183. package/esri-compat/map-view.d.ts.map +1 -0
  184. package/esri-compat/map-view.js +1110 -0
  185. package/esri-compat/map.d.ts +47 -0
  186. package/esri-compat/map.d.ts.map +1 -0
  187. package/esri-compat/map.js +209 -0
  188. package/esri-compat/measurement-2d.d.ts +61 -0
  189. package/esri-compat/measurement-2d.d.ts.map +1 -0
  190. package/esri-compat/measurement-2d.js +184 -0
  191. package/esri-compat/measurement.d.ts +45 -0
  192. package/esri-compat/measurement.d.ts.map +1 -0
  193. package/esri-compat/measurement.js +193 -0
  194. package/esri-compat/oauth-info.d.ts +35 -0
  195. package/esri-compat/oauth-info.d.ts.map +1 -0
  196. package/esri-compat/oauth-info.js +115 -0
  197. package/esri-compat/picture-marker-symbol.d.ts +35 -0
  198. package/esri-compat/picture-marker-symbol.d.ts.map +1 -0
  199. package/esri-compat/picture-marker-symbol.js +126 -0
  200. package/esri-compat/point.d.ts +31 -0
  201. package/esri-compat/point.d.ts.map +1 -0
  202. package/esri-compat/point.js +102 -0
  203. package/esri-compat/polygon.d.ts +31 -0
  204. package/esri-compat/polygon.d.ts.map +1 -0
  205. package/esri-compat/polygon.js +107 -0
  206. package/esri-compat/polyline.d.ts +31 -0
  207. package/esri-compat/polyline.d.ts.map +1 -0
  208. package/esri-compat/polyline.js +107 -0
  209. package/esri-compat/popup-template.d.ts +55 -0
  210. package/esri-compat/popup-template.d.ts.map +1 -0
  211. package/esri-compat/popup-template.js +128 -0
  212. package/esri-compat/popup.d.ts +54 -0
  213. package/esri-compat/popup.d.ts.map +1 -0
  214. package/esri-compat/popup.js +312 -0
  215. package/esri-compat/print.d.ts +47 -0
  216. package/esri-compat/print.d.ts.map +1 -0
  217. package/esri-compat/print.js +105 -0
  218. package/esri-compat/query.d.ts +46 -0
  219. package/esri-compat/query.d.ts.map +1 -0
  220. package/esri-compat/query.js +119 -0
  221. package/esri-compat/reactive-utils.d.ts +23 -0
  222. package/esri-compat/reactive-utils.d.ts.map +1 -0
  223. package/esri-compat/reactive-utils.js +178 -0
  224. package/esri-compat/request.d.ts +41 -0
  225. package/esri-compat/request.d.ts.map +1 -0
  226. package/esri-compat/request.js +253 -0
  227. package/esri-compat/route-layer.d.ts +59 -0
  228. package/esri-compat/route-layer.d.ts.map +1 -0
  229. package/esri-compat/route-layer.js +223 -0
  230. package/esri-compat/route-task.d.ts +88 -0
  231. package/esri-compat/route-task.d.ts.map +1 -0
  232. package/esri-compat/route-task.js +225 -0
  233. package/esri-compat/scene-view.d.ts +41 -0
  234. package/esri-compat/scene-view.d.ts.map +1 -0
  235. package/esri-compat/scene-view.js +68 -0
  236. package/esri-compat/search.d.ts +112 -0
  237. package/esri-compat/search.d.ts.map +1 -0
  238. package/esri-compat/search.js +820 -0
  239. package/esri-compat/simple-fill-symbol.d.ts +27 -0
  240. package/esri-compat/simple-fill-symbol.d.ts.map +1 -0
  241. package/esri-compat/simple-fill-symbol.js +85 -0
  242. package/esri-compat/simple-line-symbol.d.ts +27 -0
  243. package/esri-compat/simple-line-symbol.d.ts.map +1 -0
  244. package/esri-compat/simple-line-symbol.js +85 -0
  245. package/esri-compat/simple-marker-symbol.d.ts +29 -0
  246. package/esri-compat/simple-marker-symbol.d.ts.map +1 -0
  247. package/esri-compat/simple-marker-symbol.js +92 -0
  248. package/esri-compat/simple-renderer.d.ts +29 -0
  249. package/esri-compat/simple-renderer.d.ts.map +1 -0
  250. package/esri-compat/simple-renderer.js +92 -0
  251. package/esri-compat/sketch.d.ts +64 -0
  252. package/esri-compat/sketch.d.ts.map +1 -0
  253. package/esri-compat/sketch.js +227 -0
  254. package/esri-compat/spatial-reference.d.ts +31 -0
  255. package/esri-compat/spatial-reference.d.ts.map +1 -0
  256. package/esri-compat/spatial-reference.js +102 -0
  257. package/esri-compat/swipe.d.ts +34 -0
  258. package/esri-compat/swipe.d.ts.map +1 -0
  259. package/esri-compat/swipe.js +93 -0
  260. package/esri-compat/table-list.d.ts +36 -0
  261. package/esri-compat/table-list.d.ts.map +1 -0
  262. package/esri-compat/table-list.js +126 -0
  263. package/esri-compat/text-symbol.d.ts +37 -0
  264. package/esri-compat/text-symbol.d.ts.map +1 -0
  265. package/esri-compat/text-symbol.js +123 -0
  266. package/esri-compat/tile-layer.d.ts +52 -0
  267. package/esri-compat/tile-layer.d.ts.map +1 -0
  268. package/esri-compat/tile-layer.js +167 -0
  269. package/esri-compat/time-slider.d.ts +70 -0
  270. package/esri-compat/time-slider.d.ts.map +1 -0
  271. package/esri-compat/time-slider.js +208 -0
  272. package/esri-compat/track.d.ts +51 -0
  273. package/esri-compat/track.d.ts.map +1 -0
  274. package/esri-compat/track.js +174 -0
  275. package/esri-compat/unique-value-renderer.d.ts +41 -0
  276. package/esri-compat/unique-value-renderer.d.ts.map +1 -0
  277. package/esri-compat/unique-value-renderer.js +127 -0
  278. package/esri-compat/url.d.ts +12 -0
  279. package/esri-compat/url.d.ts.map +1 -0
  280. package/esri-compat/url.js +54 -0
  281. package/esri-compat/web-map.d.ts +14 -0
  282. package/esri-compat/web-map.d.ts.map +1 -0
  283. package/esri-compat/web-map.js +24 -0
  284. package/gen/honua/v1/feature_service_pb.d.ts +918 -0
  285. package/gen/honua/v1/feature_service_pb.d.ts.map +1 -0
  286. package/gen/honua/v1/feature_service_pb.js +375 -0
  287. package/index.d.ts +130 -0
  288. package/index.js +65 -0
  289. package/package.json +22 -0
@@ -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"}