@honua/react 0.1.1-beta.0 → 0.1.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/contract/discovery.d.ts +34 -0
  2. package/contract/discovery.d.ts.map +1 -1
  3. package/contract/index.d.ts +7 -5
  4. package/contract/index.d.ts.map +1 -1
  5. package/contract/index.js +3 -2
  6. package/contract/pmtiles.d.ts +10 -1
  7. package/contract/pmtiles.d.ts.map +1 -1
  8. package/contract/pmtiles.js +10 -2
  9. package/contract/protocol-module.d.ts +84 -9
  10. package/contract/protocol-module.d.ts.map +1 -1
  11. package/contract/query-filter-fes.d.ts +18 -0
  12. package/contract/query-filter-fes.d.ts.map +1 -0
  13. package/contract/query-filter-fes.js +122 -0
  14. package/contract/query-filter.d.ts +300 -0
  15. package/contract/query-filter.d.ts.map +1 -0
  16. package/contract/query-filter.js +883 -0
  17. package/contract/schema.d.ts +12 -0
  18. package/contract/schema.d.ts.map +1 -1
  19. package/contract/schema.js +34 -0
  20. package/contract/source-capability-support.d.ts.map +1 -1
  21. package/contract/source-capability-support.js +15 -3
  22. package/contract/source.d.ts +45 -25
  23. package/contract/source.d.ts.map +1 -1
  24. package/contract/source.js +719 -479
  25. package/contract/types.d.ts +87 -18
  26. package/contract/types.d.ts.map +1 -1
  27. package/contract/widget-source.d.ts.map +1 -1
  28. package/core/client.d.ts +45 -21
  29. package/core/client.d.ts.map +1 -1
  30. package/core/client.js +224 -46
  31. package/core/error-classifications.d.ts +6 -0
  32. package/core/error-classifications.d.ts.map +1 -1
  33. package/core/error-classifications.js +6 -0
  34. package/core/error-code-registry.d.ts +6 -0
  35. package/core/error-code-registry.d.ts.map +1 -1
  36. package/core/error-code-registry.js +6 -0
  37. package/core/error-envelope.js +2 -0
  38. package/core/errors.d.ts +1 -1
  39. package/core/errors.js +1 -1
  40. package/core/geoparquet-sql.d.ts +68 -4
  41. package/core/geoparquet-sql.d.ts.map +1 -1
  42. package/core/geoparquet-sql.js +325 -8
  43. package/core/odata-write-codec.d.ts.map +1 -1
  44. package/core/odata-write-codec.js +0 -1
  45. package/core/odata.d.ts +6 -0
  46. package/core/odata.d.ts.map +1 -1
  47. package/core/odata.js +6 -1
  48. package/core/ogc-processes.d.ts +182 -25
  49. package/core/ogc-processes.d.ts.map +1 -1
  50. package/core/ogc-processes.js +602 -30
  51. package/core/process-runner.d.ts +8 -1
  52. package/core/process-runner.d.ts.map +1 -1
  53. package/core/process-runner.js +1 -0
  54. package/core/protocol-transport.d.ts +2 -0
  55. package/core/protocol-transport.d.ts.map +1 -1
  56. package/core/stac.d.ts +31 -0
  57. package/core/stac.d.ts.map +1 -1
  58. package/core/stac.js +136 -19
  59. package/core/surfaces.d.ts.map +1 -1
  60. package/core/surfaces.js +273 -68
  61. package/core/types.d.ts +123 -9
  62. package/core/types.d.ts.map +1 -1
  63. package/core/wfs-axis-order.d.ts +18 -0
  64. package/core/wfs-axis-order.d.ts.map +1 -0
  65. package/core/wfs-axis-order.js +108 -0
  66. package/core/wfs-capabilities.d.ts +65 -24
  67. package/core/wfs-capabilities.d.ts.map +1 -1
  68. package/core/wfs-capabilities.js +237 -27
  69. package/core/wfs-filter.d.ts +26 -3
  70. package/core/wfs-filter.d.ts.map +1 -1
  71. package/core/wfs-filter.js +48 -53
  72. package/core/wfs-protocol-error.d.ts +12 -0
  73. package/core/wfs-protocol-error.d.ts.map +1 -0
  74. package/core/wfs-protocol-error.js +13 -0
  75. package/core/wfs.d.ts +53 -1
  76. package/core/wfs.d.ts.map +1 -1
  77. package/core/wfs.js +251 -29
  78. package/core/wms-feature-info.d.ts +92 -0
  79. package/core/wms-feature-info.d.ts.map +1 -0
  80. package/core/wms-feature-info.js +285 -0
  81. package/core/wms.d.ts +9 -0
  82. package/core/wms.d.ts.map +1 -1
  83. package/core/wms.js +17 -5
  84. package/esri-compat/event-bus.d.ts +20 -0
  85. package/esri-compat/event-bus.d.ts.map +1 -1
  86. package/esri-compat/feature-filter.d.ts +46 -1
  87. package/esri-compat/feature-filter.d.ts.map +1 -1
  88. package/esri-compat/feature-filter.js +49 -0
  89. package/esri-compat/geojson-layer.d.ts +4 -2
  90. package/esri-compat/geojson-layer.d.ts.map +1 -1
  91. package/esri-compat/geojson-layer.js +4 -2
  92. package/esri-compat/identity-manager.js +2 -2
  93. package/esri-compat/imagery-layer.d.ts +2 -1
  94. package/esri-compat/imagery-layer.d.ts.map +1 -1
  95. package/esri-compat/imagery-layer.js +2 -1
  96. package/esri-compat/layer-list.d.ts +8 -1
  97. package/esri-compat/layer-list.d.ts.map +1 -1
  98. package/esri-compat/layer-list.js +11 -4
  99. package/esri-compat/legend.d.ts.map +1 -1
  100. package/esri-compat/legend.js +1 -1
  101. package/esri-compat/locator.d.ts +297 -0
  102. package/esri-compat/locator.d.ts.map +1 -0
  103. package/esri-compat/locator.js +579 -0
  104. package/esri-compat/map-image-layer.d.ts.map +1 -1
  105. package/esri-compat/map-view.d.ts.map +1 -1
  106. package/esri-compat/map-view.js +1 -1
  107. package/esri-compat/scene-view.d.ts.map +1 -1
  108. package/esri-compat/time-slider.d.ts +29 -0
  109. package/esri-compat/time-slider.d.ts.map +1 -1
  110. package/esri-compat/time-slider.js +117 -0
  111. package/esri-compat/wfs-layer.d.ts +2 -1
  112. package/esri-compat/wfs-layer.d.ts.map +1 -1
  113. package/esri-compat/wfs-layer.js +2 -1
  114. package/esri-compat/widget-host.d.ts +42 -6
  115. package/esri-compat/widget-host.d.ts.map +1 -1
  116. package/esri-compat/widget-host.js +99 -10
  117. package/generated-app/projection.d.ts.map +1 -1
  118. package/generated-app/runtime.d.ts.map +1 -1
  119. package/map/data-to-map-bridge.d.ts +1 -1
  120. package/map/data-to-map-bridge.d.ts.map +1 -1
  121. package/map/data-to-map-bridge.js +1 -2
  122. package/map/honua-map.d.ts.map +1 -1
  123. package/map/honua-map.js +1 -1
  124. package/map/index.d.ts +2 -0
  125. package/map/index.d.ts.map +1 -1
  126. package/map/index.js +2 -0
  127. package/map/realtime-reconciliation-adapter.d.ts +98 -0
  128. package/map/realtime-reconciliation-adapter.d.ts.map +1 -0
  129. package/map/realtime-reconciliation-adapter.js +84 -0
  130. package/map/temporal-playback.d.ts +25 -0
  131. package/map/temporal-playback.d.ts.map +1 -1
  132. package/map/temporal-playback.js +29 -1
  133. package/package.json +4 -3
  134. package/query-planner/canonical-filter.d.ts +30 -0
  135. package/query-planner/canonical-filter.d.ts.map +1 -0
  136. package/query-planner/canonical-filter.js +30 -0
  137. package/query-planner/columnar-plan.d.ts +63 -0
  138. package/query-planner/columnar-plan.d.ts.map +1 -0
  139. package/query-planner/columnar-plan.js +94 -0
  140. package/query-planner/diagnostics.d.ts +3 -3
  141. package/query-planner/diagnostics.d.ts.map +1 -1
  142. package/query-planner/diagnostics.js +17 -4
  143. package/query-planner/duckdb.d.ts.map +1 -1
  144. package/query-planner/duckdb.js +16 -2
  145. package/query-planner/execution-context.d.ts.map +1 -1
  146. package/query-planner/execution-context.js +3 -1
  147. package/query-planner/executor.d.ts.map +1 -1
  148. package/query-planner/executor.js +7 -1
  149. package/query-planner/geoservices.d.ts.map +1 -1
  150. package/query-planner/geoservices.js +24 -5
  151. package/query-planner/grpc.d.ts.map +1 -1
  152. package/query-planner/grpc.js +29 -5
  153. package/query-planner/index.d.ts +20 -5
  154. package/query-planner/index.d.ts.map +1 -1
  155. package/query-planner/index.js +16 -3
  156. package/query-planner/ir.d.ts +6 -1
  157. package/query-planner/ir.d.ts.map +1 -1
  158. package/query-planner/ir.js +63 -1
  159. package/query-planner/odata-protocol-module.d.ts +54 -0
  160. package/query-planner/odata-protocol-module.d.ts.map +1 -0
  161. package/query-planner/odata-protocol-module.js +199 -0
  162. package/query-planner/odata-v1.d.ts +23 -0
  163. package/query-planner/odata-v1.d.ts.map +1 -0
  164. package/query-planner/odata-v1.js +202 -0
  165. package/query-planner/odata.d.ts +0 -3
  166. package/query-planner/odata.d.ts.map +1 -1
  167. package/query-planner/odata.js +0 -143
  168. package/query-planner/ogc-features.d.ts.map +1 -1
  169. package/query-planner/ogc-features.js +23 -1
  170. package/query-planner/planner.d.ts +2 -2
  171. package/query-planner/planner.d.ts.map +1 -1
  172. package/query-planner/planner.js +146 -27
  173. package/query-planner/representation.d.ts +59 -0
  174. package/query-planner/representation.d.ts.map +1 -0
  175. package/query-planner/representation.js +140 -0
  176. package/query-planner/types.d.ts +153 -3
  177. package/query-planner/types.d.ts.map +1 -1
  178. package/query-planner/wfs-protocol-module.d.ts +57 -0
  179. package/query-planner/wfs-protocol-module.d.ts.map +1 -0
  180. package/query-planner/wfs-protocol-module.js +731 -0
  181. package/query-planner/wfs-v1.d.ts +41 -0
  182. package/query-planner/wfs-v1.d.ts.map +1 -0
  183. package/query-planner/wfs-v1.js +366 -0
  184. package/query-planner/wfs.d.ts +1 -3
  185. package/query-planner/wfs.d.ts.map +1 -1
  186. package/query-planner/wfs.js +1 -70
  187. package/react/honua-map.d.ts +3 -1
  188. package/react/honua-map.d.ts.map +1 -1
  189. package/react/honua-map.js +11 -1
  190. package/react/hooks.d.ts +1 -1
  191. package/react/hooks.js +1 -1
  192. package/react/selection.d.ts.map +1 -1
  193. package/react/selection.js +0 -0
  194. package/react/use-mounted-source.d.ts +1 -1
  195. package/react/use-mounted-source.js +1 -1
  196. package/realtime/checkpoint-store.d.ts +206 -0
  197. package/realtime/checkpoint-store.d.ts.map +1 -0
  198. package/realtime/checkpoint-store.js +504 -0
  199. package/realtime/contract.d.ts +142 -0
  200. package/realtime/contract.d.ts.map +1 -0
  201. package/realtime/contract.js +154 -0
  202. package/realtime/exploration.d.ts +16 -0
  203. package/realtime/exploration.d.ts.map +1 -0
  204. package/realtime/exploration.js +32 -0
  205. package/realtime/honua-server.d.ts +131 -0
  206. package/realtime/honua-server.d.ts.map +1 -0
  207. package/realtime/honua-server.js +302 -0
  208. package/realtime/index.d.ts +39 -0
  209. package/realtime/index.d.ts.map +1 -0
  210. package/realtime/index.js +26 -0
  211. package/realtime/odata-delta.d.ts +114 -0
  212. package/realtime/odata-delta.d.ts.map +1 -0
  213. package/realtime/odata-delta.js +483 -0
  214. package/realtime/projections.d.ts +30 -0
  215. package/realtime/projections.d.ts.map +1 -0
  216. package/realtime/projections.js +51 -0
  217. package/realtime/reconciliation.d.ts +245 -0
  218. package/realtime/reconciliation.d.ts.map +1 -0
  219. package/realtime/reconciliation.js +377 -0
  220. package/realtime/reducer.d.ts +14 -0
  221. package/realtime/reducer.d.ts.map +1 -0
  222. package/realtime/reducer.js +351 -0
  223. package/realtime/resumable-transport.d.ts +111 -0
  224. package/realtime/resumable-transport.d.ts.map +1 -0
  225. package/realtime/resumable-transport.js +406 -0
  226. package/realtime/resumable.d.ts +104 -0
  227. package/realtime/resumable.d.ts.map +1 -0
  228. package/realtime/resumable.js +632 -0
  229. package/realtime/sse.d.ts +23 -0
  230. package/realtime/sse.d.ts.map +1 -0
  231. package/realtime/sse.js +147 -0
  232. package/realtime/store.d.ts +18 -0
  233. package/realtime/store.d.ts.map +1 -0
  234. package/realtime/store.js +63 -0
  235. package/realtime/types.d.ts +190 -0
  236. package/realtime/types.d.ts.map +1 -0
  237. package/realtime/types.js +10 -0
  238. package/realtime/websocket.d.ts +60 -0
  239. package/realtime/websocket.d.ts.map +1 -0
  240. package/realtime/websocket.js +157 -0
  241. package/realtime/wire.d.ts +28 -0
  242. package/realtime/wire.d.ts.map +1 -0
  243. package/realtime/wire.js +73 -0
  244. package/runtime/index.d.ts +6 -2
  245. package/runtime/index.d.ts.map +1 -1
  246. package/runtime/index.js +3 -1
  247. package/runtime/load-package.d.ts +24 -0
  248. package/runtime/load-package.d.ts.map +1 -1
  249. package/runtime/load-package.js +45 -1
  250. package/runtime/maplibre-renderer.d.ts +11 -0
  251. package/runtime/maplibre-renderer.d.ts.map +1 -1
  252. package/runtime/maplibre-renderer.js +32 -7
  253. package/runtime/offline-region-protocol.d.ts +73 -0
  254. package/runtime/offline-region-protocol.d.ts.map +1 -0
  255. package/runtime/offline-region-protocol.js +63 -0
  256. package/runtime/offline-region-style.d.ts +78 -0
  257. package/runtime/offline-region-style.d.ts.map +1 -0
  258. package/runtime/offline-region-style.js +147 -0
  259. package/runtime/pmtiles-protocol.d.ts +7 -8
  260. package/runtime/pmtiles-protocol.d.ts.map +1 -1
  261. package/runtime/pmtiles-protocol.js +19 -66
  262. package/runtime/protocol-registry.d.ts +55 -0
  263. package/runtime/protocol-registry.d.ts.map +1 -0
  264. package/runtime/protocol-registry.js +103 -0
  265. package/runtime/runtime.d.ts +2 -0
  266. package/runtime/runtime.d.ts.map +1 -1
  267. package/runtime/runtime.js +6 -1
  268. package/studio/index.d.ts +24 -7
  269. package/studio/index.d.ts.map +1 -1
  270. package/studio/index.js +21 -7
  271. package/studio/lifecycle-client.d.ts +164 -0
  272. package/studio/lifecycle-client.d.ts.map +1 -0
  273. package/studio/lifecycle-client.js +299 -0
  274. package/studio/lifecycle-errors.d.ts +91 -0
  275. package/studio/lifecycle-errors.d.ts.map +1 -0
  276. package/studio/lifecycle-errors.js +77 -0
  277. package/studio/lifecycle-types.d.ts +321 -0
  278. package/studio/lifecycle-types.d.ts.map +1 -0
  279. package/studio/lifecycle-types.js +22 -0
  280. package/webmap/convert-label.js +0 -1
  281. package/webmap/convert-symbol.d.ts.map +1 -1
@@ -0,0 +1,39 @@
1
+ /**
2
+ * `@honua/sdk-js/realtime` — realtime transport adapters. Raw Server-Sent
3
+ * Events (`sse.ts`) and WebSocket (`websocket.ts`) wire adapters pair with
4
+ * the bounded, resumable wrapper in `resumable-transport.ts` (issue #557),
5
+ * which adds the #556 delivery gate, reconnect/backoff, heartbeat timeout,
6
+ * and redacted telemetry on top of either one. `odata-delta.ts` (issue #558)
7
+ * adds a pull-based OData v4 delta-link adapter with its own bounded poll
8
+ * loop and honest, non-live freshness reporting — it satisfies the same
9
+ * `RealtimeFeatureTransport` surface but is not a socket transport, so it
10
+ * does not compose with `resumable-transport.ts`'s reconnect wrapper.
11
+ *
12
+ * @module
13
+ */
14
+ export { createRealtimeServerSentEventsTransport, decodeRealtimeServerSentEvent, encodeDefaultRealtimeRequest, } from "./sse.js";
15
+ export type { RealtimeServerSentEventSource, RealtimeServerSentEventSourceFactory, RealtimeServerSentEventsTransportOptions, } from "./sse.js";
16
+ export { createHonuaServerRealtimeSubscription, decodeHonuaServerRealtimeEvent, encodeHonuaServerRealtimeRequest, honuaServerRealtimePreset, HONUA_SERVER_STREAMING_FEATURES_PATH, } from "./honua-server.js";
17
+ export type { CreateHonuaServerRealtimeSubscriptionOptions, HonuaServerFeatureChange, HonuaServerFeatureChangeEnvelope, } from "./honua-server.js";
18
+ export { emptyRealtimeFeatureState, reconcileRealtimeStaleness, reduceRealtimeFeatureState, realtimeFeatureKey, realtimeResumeCheckpoint, realtimeSubscriptionKey, } from "./reducer.js";
19
+ export { createRealtimeFeatureStore } from "./store.js";
20
+ export type { RealtimeFeatureStore } from "./store.js";
21
+ export { REALTIME_DURABLE_CHECKPOINT_VERSION, HonuaRealtimeResumeError, createResumableRealtimeSubscription, evaluateRealtimeCheckpoint, } from "./resumable.js";
22
+ export type { CreateResumableRealtimeSubscriptionOptions, RealtimeCheckpointCompatibility, RealtimeCheckpointCompatibilityCode, RealtimeCheckpointStore, RealtimeDurableCheckpointV1, RealtimeExternalResnapshotReason, RealtimeResumeContextV1, RealtimeSequencedEvent, ResumableRealtimeDelivery, ResumableRealtimeDeliveryStatus, ResumableRealtimePhase, ResumableRealtimeReasonCode, ResumableRealtimeState, ResumableRealtimeSubscription, } from "./resumable.js";
23
+ export { createIndexedDbCheckpointStorage, createIndexedDbRealtimeCheckpointStore, createMemoryCheckpointStorage, createMemoryRealtimeCheckpointStore, createRealtimeCheckpointStore, DEFAULT_REALTIME_CHECKPOINT_MAX_AGE_MS, DEFAULT_REALTIME_CHECKPOINT_MAX_RECORDS, HONUA_REALTIME_CHECKPOINT_STORE_FORMAT, MAX_REALTIME_CHECKPOINT_MAX_AGE_MS, MAX_REALTIME_CHECKPOINT_RECORDS, realtimeAuthorizationScopeDigest, realtimeCheckpointScopeKey, } from "./checkpoint-store.js";
24
+ export type { IndexedDbRealtimeCheckpointStoreOptions, RealtimeCheckpointRecordStorage, RealtimeCheckpointRecordV1, RealtimeCheckpointStoreDiagnosticV1, RealtimeCheckpointStoreHandle, RealtimeCheckpointStoreOptions, RealtimeCheckpointStoreReason, RealtimeStoredResumePosition, } from "./checkpoint-store.js";
25
+ export { assertRealtimePlanIdentity, deriveRealtimeContractAuthority, realtimePlanFingerprint, redactRealtimeCheckpoint, serializeRealtimeCheckpoint, serializeRedactedRealtimeCheckpoint, } from "./contract.js";
26
+ export type { DeriveRealtimeContractAuthorityOptions, RealtimeContractAuthority, RealtimeContractAuthorityState, RedactedRealtimeCheckpointV1, RedactedRealtimeResumePosition, RedactedResumePosition, } from "./contract.js";
27
+ export { createRealtimeWebSocketTransport } from "./websocket.js";
28
+ export type { RealtimeWebSocket, RealtimeWebSocketCloseEvent, RealtimeWebSocketFactory, RealtimeWebSocketTransportOptions, } from "./websocket.js";
29
+ export { createOdataDeltaTransport } from "./odata-delta.js";
30
+ export type { OdataDeltaEntity, OdataDeltaInitialQuery, OdataDeltaPollTelemetry, OdataDeltaTransportOptions, } from "./odata-delta.js";
31
+ export { computeReconnectDelayMs, createResumableRealtimeTransport, createResumableServerSentEventsTransport, createResumableWebSocketTransport, } from "./resumable-transport.js";
32
+ export type { RealtimeReconnectPolicy, RealtimeResumableTransportOptions, RealtimeResumableTransportTelemetry, } from "./resumable-transport.js";
33
+ export { filterRealtimeSelection, reconcileRealtimeSelection } from "./exploration.js";
34
+ export { HonuaRealtimeReconciliationError, createRealtimeReconciledCache, createRealtimeReconciler, diffRealtimeFeatureState, realtimeReconciliationVersion, reconcileRealtimeKeyedState, reconcileRealtimeViewport, } from "./reconciliation.js";
35
+ export type { RealtimeKeyedStateReconciliation, RealtimeReconciledCache, RealtimeReconciledCacheSnapshot, RealtimeReconciler, RealtimeReconcilerOptions, RealtimeReconciliationChange, RealtimeReconciliationChangeKind, RealtimeReconciliationDiff, RealtimeReconciliationErrorCode, RealtimeReconciliationInvalidation, RealtimeReconciliationInvalidationReason, RealtimeReconciliationMode, RealtimeReconciliationRebuildReason, RealtimeReconciliationResetReasonCode, RealtimeReconciliationResult, RealtimeReconciliationTrigger, RealtimeReconciliationVersion, RealtimeViewportReconciliation, } from "./reconciliation.js";
36
+ export { selectRealtimeDetail, selectRealtimeFeatureRecordMap, selectRealtimeFeatureRecords, selectRealtimeFeatureTombstones, selectRealtimeFeatures, } from "./projections.js";
37
+ export type { RealtimeDetailSelectorOptions, RealtimeDetailState, RealtimeFeatureRecordSelectorOptions, RealtimeFeatureReference, } from "./projections.js";
38
+ export type { RealtimeConnectionStatus, RealtimeDeleteEvent, RealtimeDeletePatch, RealtimeDeltaEvent, RealtimeErrorEvent, RealtimeFeatureEvent, RealtimeFeatureEventBase, RealtimeFeatureObserver, RealtimeFeaturePatch, RealtimeFeatureRecord, RealtimeFeatureState, RealtimeFeatureTombstone, RealtimeFeatureTransport, RealtimeHeartbeatEvent, RealtimeReducerOptions, RealtimeResumeCheckpoint, RealtimeResumeMode, RealtimeSnapshotEvent, RealtimeStateListener, RealtimeStatusEvent, RealtimeStalenessOptions, RealtimeSubscriptionIdentity, RealtimeSubscriptionHandle, RealtimeSubscriptionMode, RealtimeSubscriptionRequest, RealtimeTransportCapabilities, RealtimeTransportKind, RealtimeUpsertEvent, } from "./types.js";
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/realtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,uCAAuC,EACvC,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,6BAA6B,EAC7B,oCAAoC,EACpC,wCAAwC,GACzC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,qCAAqC,EACrC,8BAA8B,EAC9B,gCAAgC,EAChC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6B,EAC7B,mBAAmB,EACnB,oCAAoC,EACpC,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,wBAAwB,EACxB,2BAA2B,EAC3B,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `@honua/sdk-js/realtime` — realtime transport adapters. Raw Server-Sent
3
+ * Events (`sse.ts`) and WebSocket (`websocket.ts`) wire adapters pair with
4
+ * the bounded, resumable wrapper in `resumable-transport.ts` (issue #557),
5
+ * which adds the #556 delivery gate, reconnect/backoff, heartbeat timeout,
6
+ * and redacted telemetry on top of either one. `odata-delta.ts` (issue #558)
7
+ * adds a pull-based OData v4 delta-link adapter with its own bounded poll
8
+ * loop and honest, non-live freshness reporting — it satisfies the same
9
+ * `RealtimeFeatureTransport` surface but is not a socket transport, so it
10
+ * does not compose with `resumable-transport.ts`'s reconnect wrapper.
11
+ *
12
+ * @module
13
+ */
14
+ export { createRealtimeServerSentEventsTransport, decodeRealtimeServerSentEvent, encodeDefaultRealtimeRequest, } from "./sse.js";
15
+ export { createHonuaServerRealtimeSubscription, decodeHonuaServerRealtimeEvent, encodeHonuaServerRealtimeRequest, honuaServerRealtimePreset, HONUA_SERVER_STREAMING_FEATURES_PATH, } from "./honua-server.js";
16
+ export { emptyRealtimeFeatureState, reconcileRealtimeStaleness, reduceRealtimeFeatureState, realtimeFeatureKey, realtimeResumeCheckpoint, realtimeSubscriptionKey, } from "./reducer.js";
17
+ export { createRealtimeFeatureStore } from "./store.js";
18
+ export { REALTIME_DURABLE_CHECKPOINT_VERSION, HonuaRealtimeResumeError, createResumableRealtimeSubscription, evaluateRealtimeCheckpoint, } from "./resumable.js";
19
+ export { createIndexedDbCheckpointStorage, createIndexedDbRealtimeCheckpointStore, createMemoryCheckpointStorage, createMemoryRealtimeCheckpointStore, createRealtimeCheckpointStore, DEFAULT_REALTIME_CHECKPOINT_MAX_AGE_MS, DEFAULT_REALTIME_CHECKPOINT_MAX_RECORDS, HONUA_REALTIME_CHECKPOINT_STORE_FORMAT, MAX_REALTIME_CHECKPOINT_MAX_AGE_MS, MAX_REALTIME_CHECKPOINT_RECORDS, realtimeAuthorizationScopeDigest, realtimeCheckpointScopeKey, } from "./checkpoint-store.js";
20
+ export { assertRealtimePlanIdentity, deriveRealtimeContractAuthority, realtimePlanFingerprint, redactRealtimeCheckpoint, serializeRealtimeCheckpoint, serializeRedactedRealtimeCheckpoint, } from "./contract.js";
21
+ export { createRealtimeWebSocketTransport } from "./websocket.js";
22
+ export { createOdataDeltaTransport } from "./odata-delta.js";
23
+ export { computeReconnectDelayMs, createResumableRealtimeTransport, createResumableServerSentEventsTransport, createResumableWebSocketTransport, } from "./resumable-transport.js";
24
+ export { filterRealtimeSelection, reconcileRealtimeSelection } from "./exploration.js";
25
+ export { HonuaRealtimeReconciliationError, createRealtimeReconciledCache, createRealtimeReconciler, diffRealtimeFeatureState, realtimeReconciliationVersion, reconcileRealtimeKeyedState, reconcileRealtimeViewport, } from "./reconciliation.js";
26
+ export { selectRealtimeDetail, selectRealtimeFeatureRecordMap, selectRealtimeFeatureRecords, selectRealtimeFeatureTombstones, selectRealtimeFeatures, } from "./projections.js";
@@ -0,0 +1,114 @@
1
+ /**
2
+ * OData v4 delta-link pull adapter for `@honua/sdk-js/realtime` (issue #558).
3
+ *
4
+ * OData delta links (`@odata.deltaLink`) are a *pull* change feed, not a
5
+ * socket transport: a client requests a scoped delta-link URL and the
6
+ * server returns only what changed since that link was minted, plus a fresh
7
+ * delta link for the next request. This module maps that request/response
8
+ * paging protocol onto the transport-neutral `RealtimeFeatureTransport`
9
+ * surface (`types.ts`, #556) so it composes with `createRealtimeFeatureStore`
10
+ * / `createResumableRealtimeSubscription` exactly like the SSE and WebSocket
11
+ * adapters (`sse.ts`, `websocket.ts`, #557) — with one deliberate
12
+ * difference dictated by REQ-004: this transport never claims to be live.
13
+ * `capabilities.kind` is `"polling"`, it never emits a `"heartbeat"`, and
14
+ * `onPoll` reports an explicit cadence/freshness snapshot on every request
15
+ * cycle so a consumer can render "checked N seconds ago, next check in M"
16
+ * rather than a live badge that misrepresents a poll as a stream.
17
+ *
18
+ * Ownership split from the SSE/WebSocket adapters: those open exactly one
19
+ * connection per `subscribe()` and never reconnect on their own, deferring
20
+ * reconnect entirely to `resumable-transport.ts`. This transport has no
21
+ * connection to reconnect — every cycle is an independent request/response —
22
+ * so it owns its own bounded poll loop, including the on-expiry resnapshot
23
+ * recovery a socket transport cannot perform for itself: an expired or
24
+ * rejected delta link (REQ per the User Workflow, "Expired/invalid delta
25
+ * state requires an explicit resnapshot") is recovered by re-running a full
26
+ * snapshot cycle and emitting a fresh `type: "snapshot", replace: true`
27
+ * event, bounded by `maxConsecutiveResnapshots` so a server that keeps
28
+ * rejecting the token cannot loop forever.
29
+ *
30
+ * Security posture (REQ-002): every `@odata.nextLink` / `@odata.deltaLink`
31
+ * this transport follows, and any caller-supplied `resumeFrom.deltaToken`,
32
+ * must resolve to the exact same origin and collection path as the
33
+ * configured `url`. A link that does not is rejected rather than followed —
34
+ * a delta token is an opaque, potentially attacker-influenced value once it
35
+ * has round-tripped through a checkpoint store, and this transport never
36
+ * trusts it to redirect a request elsewhere.
37
+ *
38
+ * @module
39
+ */
40
+ import type { FeatureId } from "../contract/types.js";
41
+ import type { RealtimeFeatureTransport } from "./types.js";
42
+ /** Raw OData entity as delivered in a `value[]` array entry, annotations included. */
43
+ export interface OdataDeltaEntity {
44
+ readonly [key: string]: unknown;
45
+ }
46
+ /** `$`-shaped query options applied only to the initial full-collection snapshot request. */
47
+ export interface OdataDeltaInitialQuery {
48
+ readonly filter?: string;
49
+ readonly select?: readonly string[];
50
+ readonly orderBy?: readonly string[];
51
+ readonly top?: number;
52
+ }
53
+ /** Honest pull-cadence/freshness telemetry emitted after every request cycle. Never implies push liveness. */
54
+ export interface OdataDeltaPollTelemetry {
55
+ /** When this cycle's response was accepted, per `now()`. */
56
+ readonly polledAt: number;
57
+ /** When the next poll is scheduled, per `now()`. Absent while a resnapshot recovery is in progress. */
58
+ readonly nextPollAt?: number;
59
+ readonly intervalMs: number;
60
+ readonly sequence: number;
61
+ readonly changed: boolean;
62
+ readonly upsertCount: number;
63
+ readonly deleteCount: number;
64
+ }
65
+ export interface OdataDeltaTransportOptions<TFeature = unknown> {
66
+ /**
67
+ * Absolute OData entity-set collection URL, e.g.
68
+ * `"https://host/odata/Incidents"`. Every `@odata.nextLink` /
69
+ * `@odata.deltaLink` this transport follows, and any resumed
70
+ * `resumeFrom.deltaToken`, must resolve to this exact origin and path
71
+ * (REQ-002).
72
+ */
73
+ readonly url: string;
74
+ /** Delay between the end of one accepted cycle and the start of the next. */
75
+ readonly pollIntervalMs: number;
76
+ /** Extract a stable entity id from a raw OData entity for `RealtimeFeaturePatch.id`. */
77
+ readonly entityId: (entity: OdataDeltaEntity) => FeatureId;
78
+ /** Project a raw OData entity into the feature payload. @default the entity with `@`-prefixed annotations stripped */
79
+ readonly toFeature?: (entity: OdataDeltaEntity) => TFeature;
80
+ /** `$filter` / `$select` / `$orderby` / `$top` applied only to the initial snapshot request. */
81
+ readonly initialQuery?: OdataDeltaInitialQuery;
82
+ /** Request headers, recomputed for every request (e.g. a fresh bearer token). */
83
+ readonly headers?: () => Record<string, string>;
84
+ /** Injectable fetch; defaults to `globalThis.fetch`. */
85
+ readonly fetchImpl?: typeof fetch;
86
+ /**
87
+ * Classify a non-ok response as an expired/rejected delta link that should
88
+ * trigger an explicit resnapshot rather than a generic transport failure.
89
+ * @default status => status === 410
90
+ */
91
+ readonly isDeltaLinkExpiredResponse?: (status: number, body: unknown) => boolean;
92
+ /**
93
+ * Identify an OData delta-payload entry as an unsupported relationship
94
+ * (link) change rather than an entity change, per REQ-003. Relationship
95
+ * deltas fail explicitly instead of being silently dropped or
96
+ * misinterpreted as an entity upsert.
97
+ * @default entry with string `source`, `relationship`, and `target` properties
98
+ */
99
+ readonly isRelationshipDeltaEntry?: (entry: OdataDeltaEntity) => boolean;
100
+ /** Safety bound on `@odata.nextLink` pages followed within one cycle. @default 500 */
101
+ readonly maxPagesPerCycle?: number;
102
+ /** Safety bound on rows collected by one snapshot cycle. @default 50_000 */
103
+ readonly maxSnapshotRows?: number;
104
+ /** Consecutive expired-delta-link resnapshots tolerated before failing closed. @default 3 */
105
+ readonly maxConsecutiveResnapshots?: number;
106
+ readonly onPoll?: (telemetry: OdataDeltaPollTelemetry) => void;
107
+ readonly now?: () => number;
108
+ }
109
+ /**
110
+ * Build a {@link RealtimeFeatureTransport} that polls an OData v4 entity
111
+ * set's delta link. See the module doc for the full recovery/security model.
112
+ */
113
+ export declare function createOdataDeltaTransport<TFeature = unknown>(options: OdataDeltaTransportOptions<TFeature>): RealtimeFeatureTransport<TFeature>;
114
+ //# sourceMappingURL=odata-delta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odata-delta.d.ts","sourceRoot":"","sources":["../../../src/realtime/odata-delta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAIV,wBAAwB,EAEzB,MAAM,YAAY,CAAC;AAGpB,sFAAsF;AACtF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AA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