@honua/react 0.0.20-alpha.0 → 0.1.1-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.
Files changed (363) hide show
  1. package/contract/discovery.d.ts +231 -0
  2. package/contract/discovery.d.ts.map +1 -0
  3. package/contract/discovery.js +554 -0
  4. package/contract/edit-sketch.d.ts +8 -0
  5. package/contract/edit-sketch.d.ts.map +1 -1
  6. package/contract/edit-sketch.js +15 -0
  7. package/contract/edit-snapping.d.ts +160 -0
  8. package/contract/edit-snapping.d.ts.map +1 -0
  9. package/contract/edit-snapping.js +675 -0
  10. package/contract/generated/projjson-v0.7-crs-validator.d.ts +35 -0
  11. package/contract/generated/projjson-v0.7-crs-validator.d.ts.map +1 -0
  12. package/contract/generated/projjson-v0.7-crs-validator.js +3941 -0
  13. package/contract/index.d.ts +12 -1
  14. package/contract/index.d.ts.map +1 -1
  15. package/contract/index.js +4 -0
  16. package/contract/pmtiles.d.ts +193 -0
  17. package/contract/pmtiles.d.ts.map +1 -0
  18. package/contract/pmtiles.js +195 -0
  19. package/contract/protocol-module.d.ts +70 -0
  20. package/contract/protocol-module.d.ts.map +1 -0
  21. package/contract/protocol-module.js +1 -0
  22. package/contract/schema-envelope.d.ts +26 -0
  23. package/contract/schema-envelope.d.ts.map +1 -0
  24. package/contract/schema-envelope.js +25 -0
  25. package/contract/schema.d.ts +582 -0
  26. package/contract/schema.d.ts.map +1 -0
  27. package/contract/schema.js +2483 -0
  28. package/contract/source-capability-support.d.ts +6 -0
  29. package/contract/source-capability-support.d.ts.map +1 -0
  30. package/contract/source-capability-support.js +154 -0
  31. package/contract/source.d.ts +57 -15
  32. package/contract/source.d.ts.map +1 -1
  33. package/contract/source.js +368 -65
  34. package/contract/types.d.ts +171 -6
  35. package/contract/types.d.ts.map +1 -1
  36. package/contract/types.js +14 -14
  37. package/core/auth/client-credentials-provider.d.ts +51 -0
  38. package/core/auth/client-credentials-provider.d.ts.map +1 -0
  39. package/core/auth/client-credentials-provider.js +115 -0
  40. package/core/auth/credential-store.d.ts +52 -0
  41. package/core/auth/credential-store.d.ts.map +1 -0
  42. package/core/auth/credential-store.js +82 -0
  43. package/core/auth/index.d.ts +23 -0
  44. package/core/auth/index.d.ts.map +1 -0
  45. package/core/auth/index.js +20 -0
  46. package/core/auth/oauth2-provider.d.ts +114 -0
  47. package/core/auth/oauth2-provider.d.ts.map +1 -0
  48. package/core/auth/oauth2-provider.js +408 -0
  49. package/core/auth/pkce.d.ts +25 -0
  50. package/core/auth/pkce.d.ts.map +1 -0
  51. package/core/auth/pkce.js +46 -0
  52. package/core/auth/static-providers.d.ts +20 -0
  53. package/core/auth/static-providers.d.ts.map +1 -0
  54. package/core/auth/static-providers.js +26 -0
  55. package/core/auth/token-endpoint.d.ts +40 -0
  56. package/core/auth/token-endpoint.d.ts.map +1 -0
  57. package/core/auth/token-endpoint.js +133 -0
  58. package/core/auth/types.d.ts +144 -0
  59. package/core/auth/types.d.ts.map +1 -0
  60. package/core/auth/types.js +8 -0
  61. package/core/bounded-json.d.ts +4 -0
  62. package/core/bounded-json.d.ts.map +1 -0
  63. package/core/bounded-json.js +38 -0
  64. package/core/cache-state.d.ts +9 -0
  65. package/core/cache-state.d.ts.map +1 -1
  66. package/core/cache-state.js +10 -0
  67. package/core/capabilities-xml.d.ts +33 -0
  68. package/core/capabilities-xml.d.ts.map +1 -0
  69. package/core/capabilities-xml.js +331 -0
  70. package/core/client.d.ts +35 -2
  71. package/core/client.d.ts.map +1 -1
  72. package/core/client.js +167 -29
  73. package/core/error-classifications.d.ts +153 -0
  74. package/core/error-classifications.d.ts.map +1 -0
  75. package/core/error-classifications.js +140 -0
  76. package/core/error-code-registry.d.ts +158 -0
  77. package/core/error-code-registry.d.ts.map +1 -0
  78. package/core/error-code-registry.js +143 -0
  79. package/core/error-envelope.d.ts +68 -0
  80. package/core/error-envelope.d.ts.map +1 -0
  81. package/core/error-envelope.js +357 -0
  82. package/core/errors.d.ts +73 -25
  83. package/core/errors.d.ts.map +1 -1
  84. package/core/errors.js +113 -46
  85. package/core/geoparquet-sql.d.ts +190 -0
  86. package/core/geoparquet-sql.d.ts.map +1 -0
  87. package/core/geoparquet-sql.js +368 -0
  88. package/core/odata-key-path.d.ts +12 -0
  89. package/core/odata-key-path.d.ts.map +1 -0
  90. package/core/odata-key-path.js +28 -0
  91. package/core/odata-write-codec.d.ts +66 -0
  92. package/core/odata-write-codec.d.ts.map +1 -0
  93. package/core/odata-write-codec.js +1083 -0
  94. package/core/odata.d.ts +59 -7
  95. package/core/odata.d.ts.map +1 -1
  96. package/core/odata.js +431 -99
  97. package/core/ogc-endpoint-layout.d.ts +70 -0
  98. package/core/ogc-endpoint-layout.d.ts.map +1 -0
  99. package/core/ogc-endpoint-layout.js +173 -0
  100. package/core/ogc-features.d.ts.map +1 -1
  101. package/core/ogc-features.js +35 -17
  102. package/core/ogc-maps.d.ts +7 -0
  103. package/core/ogc-maps.d.ts.map +1 -1
  104. package/core/ogc-maps.js +46 -7
  105. package/core/ogc-processes.d.ts +2 -1
  106. package/core/ogc-processes.d.ts.map +1 -1
  107. package/core/ogc-processes.js +33 -5
  108. package/core/ogc-records.d.ts +9 -0
  109. package/core/ogc-records.d.ts.map +1 -1
  110. package/core/ogc-records.js +78 -29
  111. package/core/ogc-tiles.d.ts +10 -1
  112. package/core/ogc-tiles.d.ts.map +1 -1
  113. package/core/ogc-tiles.js +56 -17
  114. package/core/path-utils.d.ts +9 -0
  115. package/core/path-utils.d.ts.map +1 -1
  116. package/core/path-utils.js +19 -0
  117. package/core/protocol-transport.d.ts +1 -0
  118. package/core/protocol-transport.d.ts.map +1 -1
  119. package/core/request-pipeline.d.ts.map +1 -1
  120. package/core/request-pipeline.js +1 -1
  121. package/core/spatial-filter.d.ts +8 -4
  122. package/core/spatial-filter.d.ts.map +1 -1
  123. package/core/spatial-filter.js +206 -16
  124. package/core/stac-static.d.ts +55 -0
  125. package/core/stac-static.d.ts.map +1 -0
  126. package/core/stac-static.js +386 -0
  127. package/core/stac.d.ts +12 -0
  128. package/core/stac.d.ts.map +1 -1
  129. package/core/stac.js +45 -15
  130. package/core/surfaces.d.ts +13 -0
  131. package/core/surfaces.d.ts.map +1 -1
  132. package/core/surfaces.js +127 -16
  133. package/core/types.d.ts +174 -7
  134. package/core/types.d.ts.map +1 -1
  135. package/core/wfs-capabilities.d.ts +12 -0
  136. package/core/wfs-capabilities.d.ts.map +1 -1
  137. package/core/wfs-capabilities.js +22 -3
  138. package/core/wfs.d.ts +13 -0
  139. package/core/wfs.d.ts.map +1 -1
  140. package/core/wfs.js +35 -5
  141. package/core/wms-capabilities.d.ts +56 -84
  142. package/core/wms-capabilities.d.ts.map +1 -1
  143. package/core/wms-capabilities.js +212 -509
  144. package/core/wmts-capabilities.d.ts +62 -62
  145. package/core/wmts-capabilities.d.ts.map +1 -1
  146. package/core/wmts-capabilities.js +224 -371
  147. package/esri-compat/editor.d.ts +8 -0
  148. package/esri-compat/editor.d.ts.map +1 -1
  149. package/esri-compat/editor.js +13 -0
  150. package/esri-compat/feature-layer.d.ts +2 -0
  151. package/esri-compat/feature-layer.d.ts.map +1 -1
  152. package/esri-compat/feature-layer.js +1 -0
  153. package/esri-compat/identity-manager.d.ts +43 -0
  154. package/esri-compat/identity-manager.d.ts.map +1 -1
  155. package/esri-compat/identity-manager.js +131 -1
  156. package/esri-compat/layer-list.d.ts +11 -0
  157. package/esri-compat/layer-list.d.ts.map +1 -1
  158. package/esri-compat/layer-list.js +49 -0
  159. package/esri-compat/legend.d.ts +10 -0
  160. package/esri-compat/legend.d.ts.map +1 -1
  161. package/esri-compat/legend.js +27 -0
  162. package/esri-compat/oauth-info.d.ts +15 -0
  163. package/esri-compat/oauth-info.d.ts.map +1 -1
  164. package/esri-compat/oauth-info.js +27 -0
  165. package/esri-compat/portal.d.ts +197 -0
  166. package/esri-compat/portal.d.ts.map +1 -0
  167. package/esri-compat/portal.js +251 -0
  168. package/esri-compat/renderer-objects.d.ts +40 -0
  169. package/esri-compat/renderer-objects.d.ts.map +1 -0
  170. package/esri-compat/renderer-objects.js +62 -0
  171. package/esri-compat/sketch.d.ts +43 -0
  172. package/esri-compat/sketch.d.ts.map +1 -1
  173. package/esri-compat/sketch.js +46 -0
  174. package/esri-compat/snapping.d.ts +43 -0
  175. package/esri-compat/snapping.d.ts.map +1 -0
  176. package/esri-compat/snapping.js +45 -0
  177. package/esri-compat/url.d.ts.map +1 -1
  178. package/esri-compat/url.js +1 -1
  179. package/esri-compat/widget-host.d.ts +84 -0
  180. package/esri-compat/widget-host.d.ts.map +1 -0
  181. package/esri-compat/widget-host.js +159 -0
  182. package/filter-registry/index.d.ts +145 -0
  183. package/filter-registry/index.d.ts.map +1 -0
  184. package/filter-registry/index.js +531 -0
  185. package/generated-app/errors.d.ts +18 -2
  186. package/generated-app/errors.d.ts.map +1 -1
  187. package/generated-app/errors.js +44 -11
  188. package/map/automatic-mount-integration.d.ts +134 -0
  189. package/map/automatic-mount-integration.d.ts.map +1 -0
  190. package/map/automatic-mount-integration.js +305 -0
  191. package/map/automatic-source-strategy.d.ts +125 -0
  192. package/map/automatic-source-strategy.d.ts.map +1 -0
  193. package/map/automatic-source-strategy.js +494 -0
  194. package/map/data-to-map-bridge.d.ts +293 -0
  195. package/map/data-to-map-bridge.d.ts.map +1 -0
  196. package/map/data-to-map-bridge.js +817 -0
  197. package/map/geojson-projection.d.ts +33 -0
  198. package/map/geojson-projection.d.ts.map +1 -0
  199. package/map/geojson-projection.js +118 -0
  200. package/map/index.d.ts +14 -0
  201. package/map/index.d.ts.map +1 -1
  202. package/map/index.js +8 -0
  203. package/map/raster-source-spec.d.ts +30 -0
  204. package/map/raster-source-spec.d.ts.map +1 -0
  205. package/map/raster-source-spec.js +190 -0
  206. package/map/raster-source-strategy.d.ts +65 -0
  207. package/map/raster-source-strategy.d.ts.map +1 -0
  208. package/map/raster-source-strategy.js +232 -0
  209. package/map/source-to-maplibre.d.ts +91 -0
  210. package/map/source-to-maplibre.d.ts.map +1 -0
  211. package/map/source-to-maplibre.js +454 -0
  212. package/map/temporal-playback.d.ts +139 -0
  213. package/map/temporal-playback.d.ts.map +1 -0
  214. package/map/temporal-playback.js +247 -0
  215. package/package.json +19 -1
  216. package/query-planner/canonical.d.ts +7 -0
  217. package/query-planner/canonical.d.ts.map +1 -0
  218. package/query-planner/canonical.js +145 -0
  219. package/query-planner/cql2-json.d.ts +17 -0
  220. package/query-planner/cql2-json.d.ts.map +1 -0
  221. package/query-planner/cql2-json.js +646 -0
  222. package/query-planner/diagnostics.d.ts +35 -0
  223. package/query-planner/diagnostics.d.ts.map +1 -0
  224. package/query-planner/diagnostics.js +373 -0
  225. package/query-planner/duckdb.d.ts +79 -0
  226. package/query-planner/duckdb.d.ts.map +1 -0
  227. package/query-planner/duckdb.js +758 -0
  228. package/query-planner/execution-context.d.ts +5 -0
  229. package/query-planner/execution-context.d.ts.map +1 -0
  230. package/query-planner/execution-context.js +50 -0
  231. package/query-planner/executor.d.ts +5 -0
  232. package/query-planner/executor.d.ts.map +1 -0
  233. package/query-planner/executor.js +223 -0
  234. package/query-planner/geoservices.d.ts +91 -0
  235. package/query-planner/geoservices.d.ts.map +1 -0
  236. package/query-planner/geoservices.js +667 -0
  237. package/query-planner/grpc.d.ts +100 -0
  238. package/query-planner/grpc.d.ts.map +1 -0
  239. package/query-planner/grpc.js +736 -0
  240. package/query-planner/index.d.ts +44 -0
  241. package/query-planner/index.d.ts.map +1 -0
  242. package/query-planner/index.js +30 -0
  243. package/query-planner/ir.d.ts +20 -0
  244. package/query-planner/ir.d.ts.map +1 -0
  245. package/query-planner/ir.js +417 -0
  246. package/query-planner/local-aggregate.d.ts +5 -0
  247. package/query-planner/local-aggregate.d.ts.map +1 -0
  248. package/query-planner/local-aggregate.js +126 -0
  249. package/query-planner/odata.d.ts +48 -0
  250. package/query-planner/odata.d.ts.map +1 -0
  251. package/query-planner/odata.js +662 -0
  252. package/query-planner/ogc-compiler.d.ts +55 -0
  253. package/query-planner/ogc-compiler.d.ts.map +1 -0
  254. package/query-planner/ogc-compiler.js +480 -0
  255. package/query-planner/ogc-features.d.ts +53 -0
  256. package/query-planner/ogc-features.d.ts.map +1 -0
  257. package/query-planner/ogc-features.js +617 -0
  258. package/query-planner/planner.d.ts +17 -0
  259. package/query-planner/planner.d.ts.map +1 -0
  260. package/query-planner/planner.js +818 -0
  261. package/query-planner/resource.d.ts +94 -0
  262. package/query-planner/resource.d.ts.map +1 -0
  263. package/query-planner/resource.js +526 -0
  264. package/query-planner/semantic-canonical.d.ts +15 -0
  265. package/query-planner/semantic-canonical.d.ts.map +1 -0
  266. package/query-planner/semantic-canonical.js +62 -0
  267. package/query-planner/semantic-compat.d.ts +10 -0
  268. package/query-planner/semantic-compat.d.ts.map +1 -0
  269. package/query-planner/semantic-compat.js +35 -0
  270. package/query-planner/semantic-compiler.d.ts +64 -0
  271. package/query-planner/semantic-compiler.d.ts.map +1 -0
  272. package/query-planner/semantic-compiler.js +81 -0
  273. package/query-planner/semantic-literals.d.ts +30 -0
  274. package/query-planner/semantic-literals.d.ts.map +1 -0
  275. package/query-planner/semantic-literals.js +133 -0
  276. package/query-planner/semantic-types.d.ts +265 -0
  277. package/query-planner/semantic-types.d.ts.map +1 -0
  278. package/query-planner/semantic-types.js +1 -0
  279. package/query-planner/semantic.d.ts +54 -0
  280. package/query-planner/semantic.d.ts.map +1 -0
  281. package/query-planner/semantic.js +1421 -0
  282. package/query-planner/types.d.ts +560 -0
  283. package/query-planner/types.d.ts.map +1 -0
  284. package/query-planner/types.js +49 -0
  285. package/query-planner/wfs-semantic.d.ts +58 -0
  286. package/query-planner/wfs-semantic.d.ts.map +1 -0
  287. package/query-planner/wfs-semantic.js +547 -0
  288. package/query-planner/wfs.d.ts +6 -0
  289. package/query-planner/wfs.d.ts.map +1 -0
  290. package/query-planner/wfs.js +71 -0
  291. package/react/external-map.d.ts +67 -0
  292. package/react/external-map.d.ts.map +1 -0
  293. package/react/external-map.js +63 -0
  294. package/react/honua-map.d.ts.map +1 -1
  295. package/react/honua-map.js +3 -2
  296. package/react/honua-source-layer.d.ts +110 -0
  297. package/react/honua-source-layer.d.ts.map +1 -0
  298. package/react/honua-source-layer.js +101 -0
  299. package/react/hooks.d.ts +28 -0
  300. package/react/hooks.d.ts.map +1 -1
  301. package/react/hooks.js +26 -4
  302. package/react/index.d.ts +8 -0
  303. package/react/index.d.ts.map +1 -1
  304. package/react/index.js +5 -0
  305. package/react/query-cache.d.ts +26 -4
  306. package/react/query-cache.d.ts.map +1 -1
  307. package/react/query-cache.js +51 -8
  308. package/react/selection.d.ts +177 -0
  309. package/react/selection.d.ts.map +1 -0
  310. package/react/selection.js +0 -0
  311. package/react/use-mounted-source.d.ts +69 -0
  312. package/react/use-mounted-source.d.ts.map +1 -0
  313. package/react/use-mounted-source.js +346 -0
  314. package/runtime/edit-snapping.d.ts +107 -0
  315. package/runtime/edit-snapping.d.ts.map +1 -0
  316. package/runtime/edit-snapping.js +190 -0
  317. package/runtime/errors.d.ts +3 -2
  318. package/runtime/errors.d.ts.map +1 -1
  319. package/runtime/errors.js +19 -2
  320. package/runtime/index.d.ts +8 -2
  321. package/runtime/index.d.ts.map +1 -1
  322. package/runtime/index.js +4 -4
  323. package/runtime/load-package.d.ts.map +1 -1
  324. package/runtime/load-package.js +8 -0
  325. package/runtime/map-package-validation.d.ts +0 -13
  326. package/runtime/map-package-validation.d.ts.map +1 -1
  327. package/runtime/map-package-validation.js +0 -12
  328. package/runtime/map-package.d.ts +1 -1
  329. package/runtime/map-package.d.ts.map +1 -1
  330. package/runtime/maplibre-renderer.d.ts +41 -0
  331. package/runtime/maplibre-renderer.d.ts.map +1 -0
  332. package/runtime/maplibre-renderer.js +322 -0
  333. package/runtime/pmtiles-protocol.d.ts +77 -0
  334. package/runtime/pmtiles-protocol.d.ts.map +1 -0
  335. package/runtime/pmtiles-protocol.js +120 -0
  336. package/runtime/query-tiles.d.ts +2 -1
  337. package/runtime/query-tiles.d.ts.map +1 -1
  338. package/runtime/query-tiles.js +6 -2
  339. package/runtime/source-bridge.d.ts +4 -4
  340. package/runtime/source-bridge.d.ts.map +1 -1
  341. package/runtime/source-bridge.js +36 -56
  342. package/runtime/style-interactions.d.ts +3 -2
  343. package/runtime/style-interactions.d.ts.map +1 -1
  344. package/runtime/style-interactions.js +11 -3
  345. package/runtime/terra-draw-sketch.d.ts +275 -0
  346. package/runtime/terra-draw-sketch.d.ts.map +1 -0
  347. package/runtime/terra-draw-sketch.js +404 -0
  348. package/source-capability-registry.d.ts +1 -0
  349. package/source-capability-registry.js +1 -0
  350. package/source-capability-types.d.ts +186 -0
  351. package/source-capability-types.js +7 -0
  352. package/style/index.d.ts +2 -0
  353. package/style/index.d.ts.map +1 -1
  354. package/style/index.js +2 -0
  355. package/style/renderers.d.ts +326 -0
  356. package/style/renderers.d.ts.map +1 -0
  357. package/style/renderers.js +517 -0
  358. package/webmap/convert-renderer.d.ts +24 -3
  359. package/webmap/convert-renderer.d.ts.map +1 -1
  360. package/webmap/convert-renderer.js +93 -112
  361. package/webmap/index.d.ts +1 -1
  362. package/webmap/index.d.ts.map +1 -1
  363. package/webmap/index.js +1 -1
@@ -12,10 +12,14 @@ import type { HonuaProtocolTransport } from "./protocol-transport.js";
12
12
  import type { HonuaOgcCollectionMetadata, HonuaOgcCollectionsResponse, HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcRecordResponse, HonuaOgcRecordsResponse, OgcCollectionRequest, OgcMetadataRequest, OgcRecordItemRequest, OgcRecordRawItemRequest, OgcRecordsRawSearchRequest, OgcRecordsSearchRequest } from "./types.js";
13
13
  export interface HonuaOgcRecordsOptions {
14
14
  client: HonuaClient;
15
+ /** Raw endpoint path prefix (defaults to the Honua facade `/ogc/records`). */
16
+ basePath?: string;
15
17
  }
16
18
  export interface HonuaOgcRecordCollectionOptions {
17
19
  client: HonuaClient;
18
20
  collectionId: string | number;
21
+ /** Raw endpoint path prefix (defaults to the Honua facade `/ogc/records`). */
22
+ basePath?: string;
19
23
  }
20
24
  export interface HonuaOgcRecordsSearchAllRequest extends OgcRecordsSearchRequest {
21
25
  /** Maximum number of records to request per page. */
@@ -34,7 +38,9 @@ export type HonuaOgcRecordCollectionRawItemRequest = Omit<OgcRecordRawItemReques
34
38
  /** Top-level OGC API Records handle. */
35
39
  export declare class HonuaOgcRecords {
36
40
  readonly client: HonuaClient;
41
+ private readonly basePath;
37
42
  constructor(options: HonuaOgcRecordsOptions);
43
+ private withBase;
38
44
  collection(collectionId: string | number): HonuaOgcRecordCollection;
39
45
  landing(request?: OgcMetadataRequest): Promise<HonuaOgcLandingResponse>;
40
46
  conformance(request?: OgcMetadataRequest): Promise<HonuaOgcConformanceResponse>;
@@ -54,7 +60,10 @@ export declare class HonuaOgcRecords {
54
60
  export declare class HonuaOgcRecordCollection {
55
61
  readonly client: HonuaClient;
56
62
  readonly collectionId: string | number;
63
+ private readonly basePath;
57
64
  constructor(options: HonuaOgcRecordCollectionOptions);
65
+ private bind;
66
+ private rootHandle;
58
67
  metadata(request?: OgcMetadataRequest): Promise<HonuaOgcCollectionMetadata>;
59
68
  search(request?: HonuaOgcRecordCollectionSearchRequest): Promise<HonuaOgcRecordsResponse>;
60
69
  record(request: HonuaOgcRecordCollectionItemRequest): Promise<HonuaOgcRecordResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"ogc-records.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-records.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,YAAY,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AAE,sBAAsB,EACjC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,QAAQ,CAAC,CAYnB"}
@@ -8,40 +8,73 @@
8
8
  * @module
9
9
  */
10
10
  import { createOgcMetadataParams, mergeHeaders, normalizeCsv, normalizeStringCsv } from "./wire-shared.js";
11
+ /** Honua facade path prefix for OGC API Records. */
12
+ const RECORDS_FACADE_BASE = "/ogc/records";
13
+ /**
14
+ * Resolve the OGC API Records path prefix: the caller-supplied raw
15
+ * `basePath` (a `connect()`-discovered third-party service root) or the Honua
16
+ * facade default. Trailing slashes are trimmed so a discovered root and the
17
+ * facade compose the same sub-paths.
18
+ */
19
+ function recordsBase(request) {
20
+ // An omitted basePath uses the Honua facade; an explicit "" is a legitimate
21
+ // root-mounted raw service and must NOT fall back to the facade prefix.
22
+ if (request.basePath === undefined)
23
+ return RECORDS_FACADE_BASE;
24
+ const base = request.basePath;
25
+ let end = base.length;
26
+ while (end > 0 && base.charCodeAt(end - 1) === 0x2f)
27
+ end--;
28
+ return base.slice(0, end);
29
+ }
30
+ /** Cache-key discriminator so a discovered root never collides with the facade. */
31
+ function recordsBaseKey(request) {
32
+ const base = recordsBase(request);
33
+ return base === RECORDS_FACADE_BASE ? "" : `${base}:`;
34
+ }
11
35
  const DEFAULT_RECORDS_PAGE_SIZE = 100;
12
36
  const DEFAULT_RECORDS_MAX_PAGES = 100;
13
37
  /** Top-level OGC API Records handle. */
14
38
  export class HonuaOgcRecords {
15
39
  client;
40
+ basePath;
16
41
  constructor(options) {
17
42
  this.client = options.client;
43
+ this.basePath = options.basePath;
44
+ }
45
+ withBase(request) {
46
+ return this.basePath !== undefined ? { ...request, basePath: this.basePath } : request;
18
47
  }
19
48
  collection(collectionId) {
20
- return new HonuaOgcRecordCollection({ client: this.client, collectionId });
49
+ return new HonuaOgcRecordCollection({
50
+ client: this.client,
51
+ collectionId,
52
+ ...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
53
+ });
21
54
  }
22
55
  async landing(request = {}) {
23
- return this.client.getOgcRecordsLanding(request);
56
+ return this.client.getOgcRecordsLanding(this.withBase(request));
24
57
  }
25
58
  async conformance(request = {}) {
26
- return this.client.getOgcRecordsConformance(request);
59
+ return this.client.getOgcRecordsConformance(this.withBase(request));
27
60
  }
28
61
  async collections(request = {}) {
29
- return this.client.listOgcRecordCollections(request);
62
+ return this.client.listOgcRecordCollections(this.withBase(request));
30
63
  }
31
64
  async collectionMetadata(request) {
32
- return this.client.getOgcRecordCollection(request);
65
+ return this.client.getOgcRecordCollection(this.withBase(request));
33
66
  }
34
67
  async search(request) {
35
- return this.client.searchOgcRecords(request);
68
+ return this.client.searchOgcRecords(this.withBase(request));
36
69
  }
37
70
  async record(request) {
38
- return this.client.getOgcRecord(request);
71
+ return this.client.getOgcRecord(this.withBase(request));
39
72
  }
40
73
  async rawSearch(request) {
41
- return this.client.fetchOgcRecordsRaw(request);
74
+ return this.client.fetchOgcRecordsRaw(this.withBase(request));
42
75
  }
43
76
  async rawRecord(request) {
44
- return this.client.fetchOgcRecordRaw(request);
77
+ return this.client.fetchOgcRecordRaw(this.withBase(request));
45
78
  }
46
79
  async searchAll(request) {
47
80
  const pageSize = request.pageSize ?? request.limit ?? DEFAULT_RECORDS_PAGE_SIZE;
@@ -49,11 +82,11 @@ export class HonuaOgcRecords {
49
82
  const records = [];
50
83
  let cursor = { offset: request.offset };
51
84
  for (let page = 0; page < maxPages; page += 1) {
52
- const response = await this.client.searchOgcRecords({
85
+ const response = await this.client.searchOgcRecords(this.withBase({
53
86
  ...request,
54
87
  limit: pageSize,
55
88
  offset: cursor.offset,
56
- });
89
+ }));
57
90
  const pageRecords = response.features ?? [];
58
91
  if (pageRecords.length === 0)
59
92
  break;
@@ -73,11 +106,11 @@ export class HonuaOgcRecords {
73
106
  const maxPages = request.maxPages ?? DEFAULT_RECORDS_MAX_PAGES;
74
107
  let cursor = { offset: request.offset };
75
108
  for (let page = 0; page < maxPages; page += 1) {
76
- const response = await this.client.searchOgcRecords({
109
+ const response = await this.client.searchOgcRecords(this.withBase({
77
110
  ...request,
78
111
  limit: pageSize,
79
112
  offset: cursor.offset,
80
- });
113
+ }));
81
114
  const pageRecords = response.features ?? [];
82
115
  if (pageRecords.length === 0)
83
116
  break;
@@ -97,32 +130,45 @@ export class HonuaOgcRecords {
97
130
  export class HonuaOgcRecordCollection {
98
131
  client;
99
132
  collectionId;
133
+ basePath;
100
134
  constructor(options) {
101
135
  this.client = options.client;
102
136
  this.collectionId = options.collectionId;
137
+ this.basePath = options.basePath;
138
+ }
139
+ bind(request) {
140
+ return {
141
+ ...request,
142
+ collectionId: this.collectionId,
143
+ ...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
144
+ };
145
+ }
146
+ rootHandle() {
147
+ return new HonuaOgcRecords({
148
+ client: this.client,
149
+ ...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
150
+ });
103
151
  }
104
152
  async metadata(request = {}) {
105
- return this.client.getOgcRecordCollection({ ...request, collectionId: this.collectionId });
153
+ return this.client.getOgcRecordCollection(this.bind(request));
106
154
  }
107
155
  async search(request = {}) {
108
- return this.client.searchOgcRecords({ ...request, collectionId: this.collectionId });
156
+ return this.client.searchOgcRecords(this.bind(request));
109
157
  }
110
158
  async record(request) {
111
- return this.client.getOgcRecord({ ...request, collectionId: this.collectionId });
159
+ return this.client.getOgcRecord(this.bind(request));
112
160
  }
113
161
  async rawSearch(request = {}) {
114
- return this.client.fetchOgcRecordsRaw({ ...request, collectionId: this.collectionId });
162
+ return this.client.fetchOgcRecordsRaw(this.bind(request));
115
163
  }
116
164
  async rawRecord(request) {
117
- return this.client.fetchOgcRecordRaw({ ...request, collectionId: this.collectionId });
165
+ return this.client.fetchOgcRecordRaw(this.bind(request));
118
166
  }
119
167
  async searchAll(request = {}) {
120
- const root = new HonuaOgcRecords({ client: this.client });
121
- return root.searchAll({ ...request, collectionId: this.collectionId });
168
+ return this.rootHandle().searchAll({ ...request, collectionId: this.collectionId });
122
169
  }
123
170
  searchStream(request = {}) {
124
- const root = new HonuaOgcRecords({ client: this.client });
125
- return root.searchStream({ ...request, collectionId: this.collectionId });
171
+ return this.rootHandle().searchStream({ ...request, collectionId: this.collectionId });
126
172
  }
127
173
  }
128
174
  /**
@@ -170,20 +216,23 @@ export function createHonuaOgcRecords(client) {
170
216
  // ── OGC API Records wire methods ────────────────────────────────
171
217
  export async function getOgcRecordsLanding(transport, request = {}) {
172
218
  const params = createOgcMetadataParams(request);
173
- return transport.requestCachedMetadataJson(`ogc-records:landing:${params.toString()}`, `/ogc/records?${params.toString()}`, request);
219
+ const base = recordsBase(request);
220
+ return transport.requestCachedMetadataJson(`ogc-records:landing:${recordsBaseKey(request)}${params.toString()}`, `${base}?${params.toString()}`, request);
174
221
  }
175
222
  export async function getOgcRecordsConformance(transport, request = {}) {
176
223
  const params = createOgcMetadataParams(request);
177
- return transport.requestCachedMetadataJson(`ogc-records:conformance:${params.toString()}`, `/ogc/records/conformance?${params.toString()}`, request);
224
+ const base = recordsBase(request);
225
+ return transport.requestCachedMetadataJson(`ogc-records:conformance:${recordsBaseKey(request)}${params.toString()}`, `${base}/conformance?${params.toString()}`, request);
178
226
  }
179
227
  export async function listOgcRecordCollections(transport, request = {}) {
180
228
  const params = createOgcMetadataParams(request);
181
- return transport.requestCachedMetadataJson(`ogc-records:collections:${params.toString()}`, `/ogc/records/collections?${params.toString()}`, request);
229
+ const base = recordsBase(request);
230
+ return transport.requestCachedMetadataJson(`ogc-records:collections:${recordsBaseKey(request)}${params.toString()}`, `${base}/collections?${params.toString()}`, request);
182
231
  }
183
232
  export async function getOgcRecordCollection(transport, request) {
184
233
  const params = createOgcMetadataParams(request);
185
- const path = `/ogc/records/collections/${encodeURIComponent(String(request.collectionId))}`;
186
- return transport.requestCachedMetadataJson(`ogc-records:collection:${request.collectionId}:${params.toString()}`, `${path}?${params.toString()}`, request);
234
+ const path = `${recordsBase(request)}/collections/${encodeURIComponent(String(request.collectionId))}`;
235
+ return transport.requestCachedMetadataJson(`ogc-records:collection:${recordsBaseKey(request)}${request.collectionId}:${params.toString()}`, `${path}?${params.toString()}`, request);
187
236
  }
188
237
  export async function searchOgcRecords(transport, request) {
189
238
  return transport.requestJson("GET", buildOgcRecordsSearchPath(request), undefined, request.signal);
@@ -207,7 +256,7 @@ function normalizeRecordsBbox(value) {
207
256
  function buildOgcRecordsSearchPath(request) {
208
257
  const collection = encodeURIComponent(String(request.collectionId));
209
258
  const params = serializeOgcRecordsSearchParams(request);
210
- return `/ogc/records/collections/${collection}/items?${params.toString()}`;
259
+ return `${recordsBase(request)}/collections/${collection}/items?${params.toString()}`;
211
260
  }
212
261
  function buildOgcRecordPath(request) {
213
262
  const collection = encodeURIComponent(String(request.collectionId));
@@ -215,7 +264,7 @@ function buildOgcRecordPath(request) {
215
264
  const params = createOgcMetadataParams(request);
216
265
  if (request.profile !== undefined)
217
266
  params.set("profile", normalizeStringCsv(request.profile));
218
- return `/ogc/records/collections/${collection}/items/${record}?${params.toString()}`;
267
+ return `${recordsBase(request)}/collections/${collection}/items/${record}?${params.toString()}`;
219
268
  }
220
269
  function serializeOgcRecordsSearchParams(request) {
221
270
  const params = createOgcMetadataParams(request);
@@ -15,6 +15,8 @@ import type { HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcTile
15
15
  export declare const DEFAULT_OGC_TILE_MATRIX_SET: OgcTileMatrixSetId;
16
16
  export interface HonuaOgcTilesOptions {
17
17
  client: HonuaClient;
18
+ /** Raw endpoint path prefix (defaults to the Honua facade `/ogc/tiles`). */
19
+ basePath?: string;
18
20
  }
19
21
  /**
20
22
  * Structural shape of a MapLibre `VectorSourceSpecification` for tiled
@@ -47,6 +49,8 @@ export interface HonuaOgcTilesetOptions {
47
49
  client: HonuaClient;
48
50
  collectionId: string | number;
49
51
  tileMatrixSetId: string;
52
+ /** Raw endpoint path prefix (defaults to the Honua facade `/ogc/tiles`). */
53
+ basePath?: string;
50
54
  }
51
55
  export type HonuaOgcCollectionTilesetRequest = Omit<OgcTilesetRequest, "collectionId" | "tileMatrixSetId">;
52
56
  export type HonuaOgcCollectionTilesetsRequest = Omit<OgcTilesetsRequest, "collectionId">;
@@ -57,7 +61,9 @@ export type HonuaOgcCollectionTileRequest = Omit<OgcTileRequest, "collectionId"
57
61
  */
58
62
  export declare class HonuaOgcTiles {
59
63
  readonly client: HonuaClient;
64
+ private readonly basePath;
60
65
  constructor(options: HonuaOgcTilesOptions);
66
+ private withBase;
61
67
  tileset(collectionId: string | number, tileMatrixSetId: string): HonuaOgcTileset;
62
68
  landing(request?: OgcMetadataRequest): Promise<HonuaOgcLandingResponse>;
63
69
  conformance(request?: OgcMetadataRequest): Promise<HonuaOgcConformanceResponse>;
@@ -106,6 +112,7 @@ export declare class HonuaOgcTileset {
106
112
  readonly client: HonuaClient;
107
113
  readonly collectionId: string | number;
108
114
  readonly tileMatrixSetId: string;
115
+ private readonly basePath;
109
116
  constructor(options: HonuaOgcTilesetOptions);
110
117
  metadata(request?: HonuaOgcCollectionTilesetRequest): Promise<HonuaOgcTilesetMetadata>;
111
118
  tile(request: HonuaOgcCollectionTileRequest): Promise<HonuaOgcTileResponse>;
@@ -118,7 +125,9 @@ export declare function getOgcTileMatrixSet(transport: HonuaProtocolTransport, r
118
125
  tileMatrixSetId: string;
119
126
  responseFormat?: string;
120
127
  extraParams?: Record<string, string | number | boolean>;
121
- } & HonuaMetadataRequestOptions): Promise<HonuaOgcTileMatrixSet>;
128
+ } & HonuaMetadataRequestOptions & {
129
+ basePath?: string;
130
+ }): Promise<HonuaOgcTileMatrixSet>;
122
131
  export declare function listOgcCollectionTilesets(transport: HonuaProtocolTransport, request: OgcTilesetsRequest): Promise<HonuaOgcTilesetsResponse>;
123
132
  export declare function getOgcCollectionTileset(transport: HonuaProtocolTransport, request: OgcTilesetRequest): Promise<HonuaOgcTilesetMetadata>;
124
133
  export declare function fetchOgcTile(transport: HonuaProtocolTransport, request: OgcTileRequest): Promise<HonuaOgcTileResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":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AC,8BAA8B,CAAC,CAQzC;AAED,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE;IACP,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACzD,GAAG,2BAA2B,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GACtD,OAAO,CAAC,qBAAqB,CAAC,CAQhC;AAED,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,wBAAwB,CAAC,CAQnC;AAED,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,uBAAuB,CAAC,CAUlC;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,oBAAoB,CAAC,CAa/B"}
package/core/ogc-tiles.js CHANGED
@@ -11,42 +11,72 @@ import { encodePathSegments, trimTrailingSlashes } from "./path-utils.js";
11
11
  import { createOgcMetadataParams } from "./wire-shared.js";
12
12
  /** Default OGC tile-matrix-set used when none is specified (Web Mercator XYZ). */
13
13
  export const DEFAULT_OGC_TILE_MATRIX_SET = "WebMercatorQuad";
14
+ /** Honua facade path prefix for OGC API Tiles. */
15
+ const TILES_FACADE_BASE = "/ogc/tiles";
16
+ /**
17
+ * Resolve the OGC API Tiles path prefix: the caller-supplied raw `basePath` (a
18
+ * `connect()`-discovered third-party service root) or the Honua facade default.
19
+ * Trailing slashes are trimmed so a discovered root and the facade compose the
20
+ * same sub-paths. Mirrors the OGC API Records seam in `ogc-records.ts`.
21
+ */
22
+ function tilesBase(request) {
23
+ // An omitted basePath uses the Honua facade; an explicit "" is a legitimate
24
+ // root-mounted raw service and must NOT fall back to the facade prefix.
25
+ if (request.basePath === undefined)
26
+ return TILES_FACADE_BASE;
27
+ const base = request.basePath;
28
+ let end = base.length;
29
+ while (end > 0 && base.charCodeAt(end - 1) === 0x2f)
30
+ end--;
31
+ return base.slice(0, end);
32
+ }
33
+ /** Cache-key discriminator so a discovered root never collides with the facade. */
34
+ function tilesBaseKey(request) {
35
+ const base = tilesBase(request);
36
+ return base === TILES_FACADE_BASE ? "" : `${base}:`;
37
+ }
14
38
  /**
15
39
  * Top-level OGC API Tiles handle. Mirrors `HonuaOgcFeatures` for the
16
40
  * tiles conformance classes.
17
41
  */
18
42
  export class HonuaOgcTiles {
19
43
  client;
44
+ basePath;
20
45
  constructor(options) {
21
46
  this.client = options.client;
47
+ this.basePath = options.basePath;
48
+ }
49
+ withBase(request) {
50
+ return this.basePath !== undefined ? { ...request, basePath: this.basePath } : request;
22
51
  }
23
52
  tileset(collectionId, tileMatrixSetId) {
24
53
  return new HonuaOgcTileset({
25
54
  client: this.client,
26
55
  collectionId,
27
56
  tileMatrixSetId,
57
+ ...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
28
58
  });
29
59
  }
30
60
  async landing(request = {}) {
31
- return this.client.getOgcTilesLanding(request);
61
+ return this.client.getOgcTilesLanding(this.withBase(request));
32
62
  }
33
63
  async conformance(request = {}) {
34
- return this.client.getOgcTilesConformance(request);
64
+ return this.client.getOgcTilesConformance(this.withBase(request));
35
65
  }
36
66
  async tileMatrixSets(request = {}) {
37
- return this.client.listOgcTileMatrixSets(request);
67
+ return this.client.listOgcTileMatrixSets(this.withBase(request));
38
68
  }
39
69
  async tileMatrixSet(tileMatrixSetId, request = {}) {
40
- return this.client.getOgcTileMatrixSet({ ...request, tileMatrixSetId });
70
+ return this.client.getOgcTileMatrixSet(this.withBase({ ...request, tileMatrixSetId }));
41
71
  }
42
72
  async tilesets(request) {
43
- return this.client.listOgcCollectionTilesets(request);
73
+ return this.client.listOgcCollectionTilesets(this.withBase(request));
44
74
  }
45
75
  async tilesetMetadata(request) {
46
- return this.client.getOgcCollectionTileset(request);
76
+ return this.client.getOgcCollectionTileset(this.withBase(request));
47
77
  }
48
78
  async tile(request) {
49
- return this.client.fetchOgcTile(request);
79
+ return this.client.fetchOgcTile(this.withBase(request));
50
80
  }
51
81
  /**
52
82
  * Build a MapLibre-ready vector source definition for a tiled collection.
@@ -67,7 +97,8 @@ export class HonuaOgcTiles {
67
97
  const baseUrl = trimTrailingSlashes(this.client.serverBaseUrl);
68
98
  const collection = encodePathSegments(serviceId);
69
99
  const matrixSet = encodeURIComponent(tileMatrixSetId);
70
- const template = `${baseUrl}/ogc/tiles/collections/${collection}/tiles/${matrixSet}/{z}/{y}/{x}`;
100
+ const base = tilesBase({ ...(this.basePath !== undefined ? { basePath: this.basePath } : {}) });
101
+ const template = `${baseUrl}${base}/collections/${collection}/tiles/${matrixSet}/{z}/{y}/{x}`;
71
102
  const source = {
72
103
  type: "vector",
73
104
  tiles: [template],
@@ -112,16 +143,19 @@ export class HonuaOgcTileset {
112
143
  client;
113
144
  collectionId;
114
145
  tileMatrixSetId;
146
+ basePath;
115
147
  constructor(options) {
116
148
  this.client = options.client;
117
149
  this.collectionId = options.collectionId;
118
150
  this.tileMatrixSetId = options.tileMatrixSetId;
151
+ this.basePath = options.basePath;
119
152
  }
120
153
  async metadata(request = {}) {
121
154
  return this.client.getOgcCollectionTileset({
122
155
  ...request,
123
156
  collectionId: this.collectionId,
124
157
  tileMatrixSetId: this.tileMatrixSetId,
158
+ ...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
125
159
  });
126
160
  }
127
161
  async tile(request) {
@@ -129,6 +163,7 @@ export class HonuaOgcTileset {
129
163
  ...request,
130
164
  collectionId: this.collectionId,
131
165
  tileMatrixSetId: this.tileMatrixSetId,
166
+ ...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
132
167
  });
133
168
  }
134
169
  }
@@ -142,30 +177,34 @@ export function createHonuaOgcTiles(client) {
142
177
  // exposes thin `get*/list*/fetch*` delegators that call these.
143
178
  export async function getOgcTilesLanding(transport, request = {}) {
144
179
  const params = createOgcMetadataParams(request);
145
- return transport.requestCachedMetadataJson(`ogc-tiles:landing:${params.toString()}`, `/ogc/tiles?${params.toString()}`, request);
180
+ const base = tilesBase(request);
181
+ return transport.requestCachedMetadataJson(`ogc-tiles:landing:${tilesBaseKey(request)}${params.toString()}`, `${base}?${params.toString()}`, request);
146
182
  }
147
183
  export async function getOgcTilesConformance(transport, request = {}) {
148
184
  const params = createOgcMetadataParams(request);
149
- return transport.requestCachedMetadataJson(`ogc-tiles:conformance:${params.toString()}`, `/ogc/tiles/conformance?${params.toString()}`, request);
185
+ const base = tilesBase(request);
186
+ return transport.requestCachedMetadataJson(`ogc-tiles:conformance:${tilesBaseKey(request)}${params.toString()}`, `${base}/conformance?${params.toString()}`, request);
150
187
  }
151
188
  export async function listOgcTileMatrixSets(transport, request = {}) {
152
189
  const params = createOgcMetadataParams(request);
153
- return transport.requestCachedMetadataJson(`ogc-tiles:tile-matrix-sets:${params.toString()}`, `/ogc/tiles/tileMatrixSets?${params.toString()}`, request);
190
+ const base = tilesBase(request);
191
+ return transport.requestCachedMetadataJson(`ogc-tiles:tile-matrix-sets:${tilesBaseKey(request)}${params.toString()}`, `${base}/tileMatrixSets?${params.toString()}`, request);
154
192
  }
155
193
  export async function getOgcTileMatrixSet(transport, request) {
156
194
  const params = createOgcMetadataParams(request);
157
- return transport.requestCachedMetadataJson(`ogc-tiles:tile-matrix-set:${request.tileMatrixSetId}:${params.toString()}`, `/ogc/tiles/tileMatrixSets/${encodeURIComponent(request.tileMatrixSetId)}?${params.toString()}`, request);
195
+ const base = tilesBase(request);
196
+ return transport.requestCachedMetadataJson(`ogc-tiles:tile-matrix-set:${tilesBaseKey(request)}${request.tileMatrixSetId}:${params.toString()}`, `${base}/tileMatrixSets/${encodeURIComponent(request.tileMatrixSetId)}?${params.toString()}`, request);
158
197
  }
159
198
  export async function listOgcCollectionTilesets(transport, request) {
160
199
  const params = createOgcMetadataParams(request);
161
- const path = `/ogc/tiles/collections/${encodeURIComponent(String(request.collectionId))}/tiles`;
162
- return transport.requestCachedMetadataJson(`ogc-tiles:tilesets:${request.collectionId}:${params.toString()}`, `${path}?${params.toString()}`, request);
200
+ const path = `${tilesBase(request)}/collections/${encodeURIComponent(String(request.collectionId))}/tiles`;
201
+ return transport.requestCachedMetadataJson(`ogc-tiles:tilesets:${tilesBaseKey(request)}${request.collectionId}:${params.toString()}`, `${path}?${params.toString()}`, request);
163
202
  }
164
203
  export async function getOgcCollectionTileset(transport, request) {
165
204
  const params = createOgcMetadataParams(request);
166
- const path = `/ogc/tiles/collections/${encodeURIComponent(String(request.collectionId))}` +
205
+ const path = `${tilesBase(request)}/collections/${encodeURIComponent(String(request.collectionId))}` +
167
206
  `/tiles/${encodeURIComponent(request.tileMatrixSetId)}`;
168
- return transport.requestCachedMetadataJson(`ogc-tiles:tileset:${request.collectionId}:${request.tileMatrixSetId}:${params.toString()}`, `${path}?${params.toString()}`, request);
207
+ return transport.requestCachedMetadataJson(`ogc-tiles:tileset:${tilesBaseKey(request)}${request.collectionId}:${request.tileMatrixSetId}:${params.toString()}`, `${path}?${params.toString()}`, request);
169
208
  }
170
209
  export async function fetchOgcTile(transport, request) {
171
210
  const params = new URLSearchParams();
@@ -178,6 +217,6 @@ export async function fetchOgcTile(transport, request) {
178
217
  const matrixSet = encodeURIComponent(request.tileMatrixSetId);
179
218
  const matrix = encodeURIComponent(String(request.tileMatrix));
180
219
  const query = params.size > 0 ? `?${params.toString()}` : "";
181
- const path = `/ogc/tiles/collections/${collection}/tiles/${matrixSet}/${matrix}/${request.tileRow}/${request.tileCol}${query}`;
220
+ const path = `${tilesBase(request)}/collections/${collection}/tiles/${matrixSet}/${matrix}/${request.tileRow}/${request.tileCol}${query}`;
182
221
  return transport.requestBytes("GET", path, request.accept, undefined, request.signal);
183
222
  }
@@ -21,6 +21,15 @@ export declare function trimSurroundingSlashes(value: string): string;
21
21
  * or `_` padding) without anchored `^x+|x+$` regexes.
22
22
  */
23
23
  export declare function trimChar(value: string, char: string): string;
24
+ /**
25
+ * Remove a trailing run of characters from `value` that belong to `chars`.
26
+ *
27
+ * Equivalent to `value.replace(new RegExp(\`[${chars}]+$\`), "")` but avoids
28
+ * building an anchored character-class regex (which can exhibit polynomial
29
+ * matching on adversarial input) by scanning backward from the end with
30
+ * simple index arithmetic instead.
31
+ */
32
+ export declare function trimTrailingCharsIn(value: string, chars: string): string;
24
33
  /**
25
34
  * Return `value` with any `?query` and `#fragment` suffix removed.
26
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"path-utils.d.ts","sourceRoot":"","sources":["../../../src/core/path-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED,uDAAuD;AACvD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAW5D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU3D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAS7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQxD"}
1
+ {"version":3,"file":"path-utils.d.ts","sourceRoot":"","sources":["../../../src/core/path-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED,uDAAuD;AACvD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAW5D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAUxE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU3D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAS7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQxD"}
@@ -46,6 +46,25 @@ export function trimChar(value, char) {
46
46
  }
47
47
  return start === 0 && end === value.length ? value : value.slice(start, end);
48
48
  }
49
+ /**
50
+ * Remove a trailing run of characters from `value` that belong to `chars`.
51
+ *
52
+ * Equivalent to `value.replace(new RegExp(\`[${chars}]+$\`), "")` but avoids
53
+ * building an anchored character-class regex (which can exhibit polynomial
54
+ * matching on adversarial input) by scanning backward from the end with
55
+ * simple index arithmetic instead.
56
+ */
57
+ export function trimTrailingCharsIn(value, chars) {
58
+ const allowed = new Set();
59
+ for (let i = 0; i < chars.length; i += 1) {
60
+ allowed.add(chars.charCodeAt(i));
61
+ }
62
+ let end = value.length;
63
+ while (end > 0 && allowed.has(value.charCodeAt(end - 1))) {
64
+ end -= 1;
65
+ }
66
+ return end === value.length ? value : value.slice(0, end);
67
+ }
49
68
  /**
50
69
  * Return `value` with any `?query` and `#fragment` suffix removed.
51
70
  *
@@ -66,6 +66,7 @@ export interface HonuaProtocolTransport {
66
66
  */
67
67
  pipelineFetch(method: QueryMethod, path: string, init?: RequestInit, callerSignal?: AbortSignal, options?: {
68
68
  okStatuses?: readonly number[];
69
+ redirect?: "safe-follow" | "error";
69
70
  }): Promise<Response>;
70
71
  /**
71
72
  * Request a PBF binary response and decode it, transparently falling back to
@@ -1 +1 @@
1
- {"version":3,"file":"protocol-transport.d.ts","sourceRoot":"","sources":["../../../src/core/protocol-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAElH;;;OAGG;IACH,WAAW,CACT,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACzF,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;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
  import { HonuaAbortError, HonuaHttpError, HonuaNetworkError, HonuaTimeoutError } from "./errors.js";
2
2
  export const DEFAULT_RETRY_STATUSES = new Set([429, 502, 503, 504]);
3
- export const DEFAULT_RETRY_METHODS = new Set(["GET", "PUT", "DELETE"]);
3
+ export const DEFAULT_RETRY_METHODS = new Set(["GET", "HEAD", "PUT", "DELETE"]);
4
4
  export function normalizeTimeoutMs(timeoutMs) {
5
5
  if (typeof timeoutMs !== "number" || !Number.isFinite(timeoutMs)) {
6
6
  return undefined;
@@ -45,8 +45,12 @@ export declare function point(x: number, y: number, spatialReference?: HonuaSpat
45
45
  */
46
46
  export declare function polygon(rings: number[][][], spatialReference?: HonuaSpatialReference): SpatialFilter;
47
47
  /**
48
- * Create an envelope spatial filter centered on a point, approximating a
49
- * circular buffer as a bounding box.
48
+ * Create an axis-aligned envelope spatial filter centered on a point.
49
+ *
50
+ * This is a planar expansion in the input coordinate system's units. It is an
51
+ * envelope approximation, not a circular, geodesic, or topological geometry
52
+ * buffer. Use `buffer` from `@honua/sdk-js/geometry` when a true geometry
53
+ * buffer is required.
50
54
  *
51
55
  * @param x - Center x coordinate
52
56
  * @param y - Center y coordinate
@@ -58,11 +62,11 @@ export declare function polygon(rings: number[][][], spatialReference?: HonuaSpa
58
62
  * // 0.5-degree bounding box around a point
59
63
  * const req: QueryFeaturesRequest = {
60
64
  * serviceId: "svc", layerId: 0,
61
- * ...buffer(-118.24, 34.05, 0.5),
65
+ * ...bufferEnvelope(-118.24, 34.05, 0.5),
62
66
  * };
63
67
  * ```
64
68
  */
65
- export declare function buffer(x: number, y: number, distance: number, spatialReference?: HonuaSpatialReference): SpatialFilter;
69
+ export declare function bufferEnvelope(x: number, y: number, distance: number, spatialReference?: HonuaSpatialReference): SpatialFilter;
66
70
  /**
67
71
  * Wrap an existing geometry with `esriSpatialRelIntersects`.
68
72
  *
@@ -1 +1 @@
1
- {"version":3,"file":"spatial-filter.d.ts","sourceRoot":"","sources":["../../../src/core/spatial-filter.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