@orangecharts/wrun-chart-host 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -4
- package/dist/constants/exchange-names.leaf.d.ts +8 -0
- package/dist/constants/exchange-names.leaf.js +101 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +15 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.js +40 -0
- package/dist/constants/opra-compliance.constants.d.ts +19 -0
- package/dist/constants/opra-compliance.constants.js +19 -0
- package/dist/constants/replay-ladder.leaf.d.ts +30 -0
- package/dist/constants/replay-ladder.leaf.js +99 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +168 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.js +398 -0
- package/dist/constants/scriptEditor/converted-script-id.leaf.d.ts +8 -0
- package/dist/constants/scriptEditor/converted-script-id.leaf.js +10 -0
- package/dist/constants/scriptEditor/execution.constants.d.ts +4 -0
- package/dist/constants/scriptEditor/execution.constants.js +14 -0
- package/dist/constants/wrun-prefix-safe.constants.d.ts +23 -0
- package/dist/constants/wrun-prefix-safe.constants.js +26 -0
- package/dist/host-env.d.ts +313 -18
- package/dist/host-env.js +15 -0
- package/dist/host-ports.types.d.ts +853 -16
- package/dist/index.d.ts +139 -2
- package/dist/index.js +139 -2
- package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +31 -0
- package/dist/instances/script-engine-worker-ohlcv-transfer.js +164 -0
- package/dist/interfaces/market-event.interface.d.ts +231 -0
- package/dist/interfaces/market-event.interface.js +15 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +70 -134
- package/dist/interfaces/opra-realtime.interface.js +34 -59
- package/dist/interfaces/replay.interface.d.ts +285 -0
- package/dist/interfaces/replay.interface.js +1 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +1 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.js +93 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +5 -1
- package/dist/kscript-data/controls/live-trades-merge.util.js +2 -2
- package/dist/market-data/billing.interface.d.ts +219 -0
- package/dist/market-data/billing.interface.js +58 -0
- package/dist/market-data/venue-governed.util.d.ts +2 -0
- package/dist/market-data/venue-governed.util.js +10 -0
- package/dist/market-data/venue.d.ts +122 -0
- package/dist/market-data/venue.js +1 -0
- package/dist/market-data/venues/index.d.ts +97 -0
- package/dist/market-data/venues/index.js +33 -0
- package/dist/market-data/venues/opra.contract.copy.json +35 -0
- package/dist/market-data/venues/opra.d.ts +70 -0
- package/dist/market-data/venues/opra.js +74 -0
- package/dist/replay/replayIndicatorRows.d.ts +31 -0
- package/dist/replay/replayIndicatorRows.js +117 -0
- package/dist/replay/replayLadder.d.ts +85 -0
- package/dist/replay/replayLadder.js +388 -0
- package/dist/utility/auth/server-clock.util.d.ts +81 -0
- package/dist/utility/auth/server-clock.util.js +238 -0
- package/dist/utility/chart/builtin-identity.util.d.ts +18 -0
- package/dist/utility/chart/builtin-identity.util.js +51 -0
- package/dist/utility/chart/cache-alignment.util.d.ts +454 -0
- package/dist/utility/chart/cache-alignment.util.js +926 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +15 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.js +22 -0
- package/dist/utility/chart/chart-mount-epoch.util.d.ts +5 -0
- package/dist/utility/chart/chart-mount-epoch.util.js +29 -0
- package/dist/utility/chart/chart-time-domain.util.d.ts +12 -0
- package/dist/utility/chart/chart-time-domain.util.js +23 -0
- package/dist/utility/chart/color-customization.leaf.d.ts +10 -0
- package/dist/utility/chart/color-customization.leaf.js +16 -0
- package/dist/utility/chart/footprint-tick-grid.util.d.ts +106 -0
- package/dist/utility/chart/footprint-tick-grid.util.js +167 -0
- package/dist/utility/chart/gesture-timing.leaf.d.ts +29 -0
- package/dist/utility/chart/gesture-timing.leaf.js +29 -0
- package/dist/utility/chart/governed-contract-coin.util.d.ts +22 -0
- package/dist/utility/chart/governed-contract-coin.util.js +39 -0
- package/dist/utility/chart/host-bar-placement.util.d.ts +107 -0
- package/dist/utility/chart/host-bar-placement.util.js +447 -0
- package/dist/utility/chart/index-host-tier.util.d.ts +31 -0
- package/dist/utility/chart/index-host-tier.util.js +118 -0
- package/dist/utility/chart/index-mode-admission.util.d.ts +34 -0
- package/dist/utility/chart/index-mode-admission.util.js +67 -0
- package/dist/utility/chart/indicator-error-message.util.d.ts +35 -0
- package/dist/utility/chart/indicator-error-message.util.js +44 -0
- package/dist/utility/chart/kscript-apply-fingerprint.util.d.ts +65 -0
- package/dist/utility/chart/kscript-apply-fingerprint.util.js +357 -0
- package/dist/utility/chart/kscript-chart-flush.leaf.d.ts +22 -0
- package/dist/utility/chart/kscript-chart-flush.leaf.js +13 -0
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +6 -0
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +27 -0
- package/dist/utility/chart/kscript-integration-decision.leaf.d.ts +89 -0
- package/dist/utility/chart/kscript-integration-decision.leaf.js +80 -0
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +76 -0
- package/dist/utility/chart/kscript-live-coalesce.util.js +156 -0
- package/dist/utility/chart/kscript-live-rest-pace.util.d.ts +34 -0
- package/dist/utility/chart/kscript-live-rest-pace.util.js +134 -0
- package/dist/utility/chart/kscript-live-source-identity.util.d.ts +98 -0
- package/dist/utility/chart/kscript-live-source-identity.util.js +121 -0
- package/dist/utility/chart/kscript-mounted-plot-set.leaf.d.ts +48 -0
- package/dist/utility/chart/kscript-mounted-plot-set.leaf.js +145 -0
- package/dist/utility/chart/kscript-perf-tracker.util.d.ts +243 -0
- package/dist/utility/chart/kscript-perf-tracker.util.js +522 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +43 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.js +471 -0
- package/dist/utility/chart/kscript-run-result-equality.util.d.ts +38 -0
- package/dist/utility/chart/kscript-run-result-equality.util.js +89 -0
- package/dist/utility/chart/kscript-settings-revision.leaf.d.ts +2 -0
- package/dist/utility/chart/kscript-settings-revision.leaf.js +12 -0
- package/dist/utility/chart/kscript-source-degrade.leaf.d.ts +63 -0
- package/dist/utility/chart/kscript-source-degrade.leaf.js +68 -0
- package/dist/utility/chart/kscript-source-retention.util.d.ts +134 -0
- package/dist/utility/chart/kscript-source-retention.util.js +218 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +57 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.js +61 -0
- package/dist/utility/chart/kscript-titancharts-preparation.util.d.ts +15 -0
- package/dist/utility/chart/kscript-titancharts-preparation.util.js +376 -0
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +9 -0
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +130 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +217 -0
- package/dist/utility/chart/kscript-venue-policy.util.js +324 -0
- package/dist/utility/chart/live-cadence.util.d.ts +38 -0
- package/dist/utility/chart/live-cadence.util.js +37 -0
- package/dist/utility/chart/live-feed-series-match.leaf.d.ts +13 -0
- package/dist/utility/chart/live-feed-series-match.leaf.js +21 -0
- package/dist/utility/chart/local-engine-self-heal-backoff.util.d.ts +46 -0
- package/dist/utility/chart/local-engine-self-heal-backoff.util.js +46 -0
- package/dist/utility/chart/local-engine-uninit.leaf.d.ts +21 -0
- package/dist/utility/chart/local-engine-uninit.leaf.js +22 -0
- package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +62 -0
- package/dist/utility/chart/local-kscript-source-revalidation.util.js +123 -0
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +214 -0
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +376 -0
- package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.d.ts +85 -0
- package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.js +197 -0
- package/dist/utility/chart/local-technical-script-range.leaf.d.ts +72 -0
- package/dist/utility/chart/local-technical-script-range.leaf.js +126 -0
- package/dist/utility/chart/mixed-mode.util.d.ts +167 -0
- package/dist/utility/chart/mixed-mode.util.js +139 -0
- package/dist/utility/chart/ohlcv-row-readiness.util.d.ts +36 -0
- package/dist/utility/chart/ohlcv-row-readiness.util.js +90 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +19 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.js +32 -0
- package/dist/utility/chart/overlay-execution-guard-key.leaf.d.ts +8 -0
- package/dist/utility/chart/overlay-execution-guard-key.leaf.js +10 -0
- package/dist/utility/chart/price-precision.util.d.ts +40 -0
- package/dist/utility/chart/price-precision.util.js +70 -0
- package/dist/utility/chart/profile-block-size.util.d.ts +64 -0
- package/dist/utility/chart/profile-block-size.util.js +141 -0
- package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.d.ts +11 -0
- package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.js +29 -0
- package/dist/utility/chart/protected-kscript-empty-output.util.d.ts +28 -0
- package/dist/utility/chart/protected-kscript-empty-output.util.js +84 -0
- package/dist/utility/chart/run-interval-unservable.leaf.d.ts +9 -0
- package/dist/utility/chart/run-interval-unservable.leaf.js +20 -0
- package/dist/utility/chart/run-interval-warmup.leaf.d.ts +19 -0
- package/dist/utility/chart/run-interval-warmup.leaf.js +35 -0
- package/dist/utility/chart/titan-constants.pin.d.ts +9 -5
- package/dist/utility/chart/titan-constants.pin.js +18 -5
- package/dist/utility/chart/warmup-backfill-retry.leaf.d.ts +9 -0
- package/dist/utility/chart/warmup-backfill-retry.leaf.js +9 -0
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +11 -2
- package/dist/utility/chart/wrun-bar-session-facts.util.js +10 -3
- package/dist/utility/chart/wrun-run-result.util.d.ts +5 -1
- package/dist/utility/chart/wrun-run-result.util.js +20 -14
- package/dist/utility/common/data-processing.util.d.ts +138 -0
- package/dist/utility/common/data-processing.util.js +346 -0
- package/dist/utility/common/visible-timeout.util.d.ts +13 -4
- package/dist/utility/common/visible-timeout.util.js +23 -8
- package/dist/utility/exchange-format.leaf.d.ts +1 -0
- package/dist/utility/exchange-format.leaf.js +47 -0
- package/dist/utility/market-events/earnings-scope.util.d.ts +60 -0
- package/dist/utility/market-events/earnings-scope.util.js +92 -0
- package/dist/utility/market-events/market-events.util.d.ts +147 -0
- package/dist/utility/market-events/market-events.util.js +392 -0
- package/dist/utility/market-events/zoned-clock.util.d.ts +1 -0
- package/dist/utility/market-events/zoned-clock.util.js +11 -0
- package/dist/utility/options/option-venue-disclosure.util.d.ts +43 -0
- package/dist/utility/options/option-venue-disclosure.util.js +56 -0
- package/dist/utility/scriptEditor/package-semver.util.d.ts +51 -0
- package/dist/utility/scriptEditor/package-semver.util.js +120 -0
- package/dist/utility/scriptEditor/temp-script-id.util.d.ts +18 -0
- package/dist/utility/scriptEditor/temp-script-id.util.js +25 -0
- package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.d.ts +20 -0
- package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.js +81 -0
- package/dist/utility/v2/governed-tier.leaf.d.ts +103 -0
- package/dist/utility/v2/governed-tier.leaf.js +113 -0
- package/dist/utility/watchlist/import/import-request.leaf.d.ts +10 -0
- package/dist/utility/watchlist/import/import-request.leaf.js +10 -0
- package/dist/utility/wrun/sources/lanes/series.js +2 -2
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +4 -4
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +5 -6
- package/dist/utility/wrun/wrun-alert-outputs.registry.d.ts +166 -0
- package/dist/utility/wrun/wrun-alert-outputs.registry.js +219 -0
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +83 -0
- package/dist/utility/wrun/wrun-bar-count.util.js +259 -0
- package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-chart-context-names.util.js +186 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +253 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +731 -0
- package/dist/utility/wrun/wrun-cloud-opra-stamp.util.d.ts +28 -0
- package/dist/utility/wrun/wrun-cloud-opra-stamp.util.js +45 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +47 -0
- package/dist/utility/wrun/wrun-deadline.util.js +2 -1
- package/dist/utility/wrun/wrun-debug-output.util.d.ts +39 -0
- package/dist/utility/wrun/wrun-debug-output.util.js +63 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +113 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.js +181 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +43 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +158 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +181 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.js +357 -0
- package/dist/utility/wrun/wrun-draw-skipped.leaf.d.ts +16 -0
- package/dist/utility/wrun/wrun-draw-skipped.leaf.js +16 -0
- package/dist/utility/wrun/wrun-earnings-facts.util.d.ts +42 -0
- package/dist/utility/wrun/wrun-earnings-facts.util.js +131 -0
- package/dist/utility/wrun/wrun-first-run-depth.util.d.ts +32 -0
- package/dist/utility/wrun/wrun-first-run-depth.util.js +118 -0
- package/dist/utility/wrun/wrun-gate-plane-readers.util.d.ts +24 -0
- package/dist/utility/wrun/wrun-gate-plane-readers.util.js +31 -0
- package/dist/utility/wrun/wrun-held-lanes.util.d.ts +32 -0
- package/dist/utility/wrun/wrun-held-lanes.util.js +94 -0
- package/dist/utility/wrun/wrun-host-visible-clock.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-host-visible-clock.util.js +17 -0
- package/dist/utility/wrun/wrun-host.service.d.ts +266 -0
- package/dist/utility/wrun/wrun-host.service.js +655 -0
- package/dist/utility/wrun/wrun-inert-legend.util.d.ts +33 -0
- package/dist/utility/wrun/wrun-inert-legend.util.js +125 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +155 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +450 -0
- package/dist/utility/wrun/wrun-integration-route.util.d.ts +51 -0
- package/dist/utility/wrun/wrun-integration-route.util.js +59 -0
- package/dist/utility/wrun/wrun-latest-history.leaf.d.ts +8 -0
- package/dist/utility/wrun/wrun-latest-history.leaf.js +8 -0
- package/dist/utility/wrun/wrun-legend-hover.lazy.d.ts +12 -0
- package/dist/utility/wrun/wrun-legend-hover.lazy.js +96 -0
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +21 -0
- package/dist/utility/wrun/wrun-live-hidden-hold.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-live-hidden-hold.util.js +13 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +374 -0
- package/dist/utility/wrun/wrun-live-intake.util.js +2027 -0
- package/dist/utility/wrun/wrun-live-patch.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-live-patch.util.js +523 -0
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +619 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +4974 -0
- package/dist/utility/wrun/wrun-loading-owner.util.d.ts +58 -0
- package/dist/utility/wrun/wrun-loading-owner.util.js +89 -0
- package/dist/utility/wrun/wrun-official-scope.leaf.d.ts +29 -0
- package/dist/utility/wrun/wrun-official-scope.leaf.js +36 -0
- package/dist/utility/wrun/wrun-oi-lane.util.d.ts +27 -0
- package/dist/utility/wrun/wrun-oi-lane.util.js +42 -0
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-options-stop.util.js +123 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +719 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +1180 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +50 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +131 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +118 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +466 -0
- package/dist/utility/wrun/wrun-overlay-metadata.util.d.ts +45 -0
- package/dist/utility/wrun/wrun-overlay-metadata.util.js +112 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +114 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +971 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +858 -0
- package/dist/utility/wrun/wrun-overlay-run.util.js +11013 -0
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +24 -9
- package/dist/utility/wrun/wrun-panel-mount.util.js +138 -43
- package/dist/utility/wrun/wrun-param-map.util.d.ts +19 -4
- package/dist/utility/wrun/wrun-param-map.util.js +40 -47
- package/dist/utility/wrun/wrun-param-values.util.d.ts +9 -3
- package/dist/utility/wrun/wrun-param-values.util.js +5 -5
- package/dist/utility/wrun/wrun-prefix-cohort.util.d.ts +93 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +484 -0
- package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +114 -0
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +486 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +317 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.js +630 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +73 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.js +380 -0
- package/dist/utility/wrun/wrun-refusal-text.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-refusal-text.util.js +40 -0
- package/dist/utility/wrun/wrun-replay-lane.util.d.ts +139 -0
- package/dist/utility/wrun/wrun-replay-lane.util.js +520 -0
- package/dist/utility/wrun/wrun-replay-rows.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-replay-rows.util.js +172 -0
- package/dist/utility/wrun/wrun-row-source-factory.d.ts +53 -0
- package/dist/utility/wrun/wrun-row-source-factory.js +435 -0
- package/dist/utility/wrun/wrun-run-cells.util.d.ts +36 -0
- package/dist/utility/wrun/wrun-run-cells.util.js +46 -0
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +133 -0
- package/dist/utility/wrun/wrun-run-interval-session.util.js +121 -0
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +98 -0
- package/dist/utility/wrun/wrun-run-interval.util.js +207 -0
- package/dist/utility/wrun/wrun-run-retained.util.d.ts +122 -0
- package/dist/utility/wrun/wrun-run-retained.util.js +255 -0
- package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +184 -0
- package/dist/utility/wrun/wrun-sandbox-row-source.js +444 -0
- package/dist/utility/wrun/wrun-script-inputs.util.js +4 -4
- package/dist/utility/wrun/wrun-series-stream.util.d.ts +86 -0
- package/dist/utility/wrun/wrun-series-stream.util.js +537 -0
- package/dist/utility/wrun/wrun-sheet-remembered.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-sheet-remembered.util.js +36 -0
- package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.d.ts +7 -0
- package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.js +12 -0
- package/dist/utility/wrun/wrun-socket-row-source.js +4 -2
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +175 -3
- package/dist/utility/wrun/wrun-source-rows.util.js +294 -8
- package/dist/utility/wrun/wrun-stats-strip.util.d.ts +46 -0
- package/dist/utility/wrun/wrun-stats-strip.util.js +87 -0
- package/dist/utility/wrun/wrun-table-chrome.util.d.ts +163 -0
- package/dist/utility/wrun/wrun-table-chrome.util.js +557 -0
- package/dist/utility/wrun/wrun-text-params.util.d.ts +11 -6
- package/dist/utility/wrun/wrun-text-params.util.js +19 -30
- package/dist/utility/wrun/wrun-transient-rerun.util.d.ts +64 -0
- package/dist/utility/wrun/wrun-transient-rerun.util.js +317 -0
- package/dist/utility/wrun/wrun-twin-lookback.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-twin-lookback.util.js +43 -0
- package/dist/utility/wrun/wrun-warmup-head-store.util.d.ts +41 -0
- package/dist/utility/wrun/wrun-warmup-head-store.util.js +120 -0
- package/dist/utility/wrun-alert-params.leaf.d.ts +24 -0
- package/dist/utility/wrun-alert-params.leaf.js +24 -0
- package/dist/utils/replay/replay-buffer-math.d.ts +148 -0
- package/dist/utils/replay/replay-buffer-math.js +684 -0
- package/dist/workers/wrun/wrun-abi-host.d.ts +190 -0
- package/dist/workers/wrun/wrun-abi-host.js +1201 -0
- package/dist/workers/wrun/wrun-engine-handler.d.ts +37 -0
- package/dist/workers/wrun/wrun-engine-handler.js +211 -0
- package/package.json +3 -3
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `earnings` and `dividend` rows are served only to a kind query
|
|
3
|
+
* (`kind=earnings|dividend`), never in the asset-class envelope, and never
|
|
4
|
+
* count down (`countsDown` in market-events.util.ts).
|
|
5
|
+
*/
|
|
6
|
+
export type MarketEventKind = 'macro' | 'central_bank' | 'auction' | 'expiry' | 'holiday' | 'earnings' | 'dividend';
|
|
7
|
+
/** Every kind, in the order the Events tab lists its kind chips. The `marketEventsKinds` pref defaults to all of them. */
|
|
8
|
+
export declare const MARKET_EVENT_KINDS: readonly MarketEventKind[];
|
|
9
|
+
/** The two kinds served by a kind query (`MarketEventsKindQuery`). */
|
|
10
|
+
export type EarningsEventKind = 'earnings' | 'dividend';
|
|
11
|
+
type MarketEventTiming = 'exact' | 'tentative' | 'date_only';
|
|
12
|
+
/**
|
|
13
|
+
* `agency` rows come from the official release calendars (BLS, BEA, Federal
|
|
14
|
+
* Reserve, ONS, Eurostat) and carry no forecast, previous or actual: the
|
|
15
|
+
* chart reads the linked series instead. `benzinga` rows are earnings reports,
|
|
16
|
+
* `massive` rows dividends; neither source is ever named on a surface.
|
|
17
|
+
*/
|
|
18
|
+
type MarketEventSource = 'fxmacrodata' | 'treasurydirect' | 'deribit' | 'cme-rules' | 'agency' | 'benzinga' | 'massive';
|
|
19
|
+
export type MarketAssetClass = 'crypto' | 'cme' | 'tradfi' | 'hip3' | 'polymarket';
|
|
20
|
+
export declare const MARKET_ASSET_CLASSES: readonly MarketAssetClass[];
|
|
21
|
+
type MarketEventSurprise = 'above' | 'below' | 'inline';
|
|
22
|
+
/** 3 = high, 2 = medium, 1 = low; for earnings and dividends the market-cap tier (3 = $100B and up, 2 = $10B and up). */
|
|
23
|
+
export type MarketEventImpact = 1 | 2 | 3;
|
|
24
|
+
/**
|
|
25
|
+
* A chart series the event prints: `ECONOMICS` plus a catalog symbol
|
|
26
|
+
* (`US_BLS_CUUR0000SA0_YOY`), `FRED` plus a FRED id (`CPIAUCSL`), or, for an
|
|
27
|
+
* earnings or dividend row, `POLYGON` plus the stock (`DAL/USD`).
|
|
28
|
+
*/
|
|
29
|
+
export interface MarketEventSeriesLink {
|
|
30
|
+
exchange: string;
|
|
31
|
+
symbol: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* When a report lands against the US session, from its Eastern clock: before
|
|
35
|
+
* the open (< 09:30), after the close (>= 16:00), during the session, or
|
|
36
|
+
* `unknown` for a date-only row.
|
|
37
|
+
*/
|
|
38
|
+
export type EarningsSlot = 'bmo' | 'amc' | 'session' | 'unknown';
|
|
39
|
+
/** Which closes a report's own move compares: the report day against the one before (`bmo`, `session`) or after (`amc`). */
|
|
40
|
+
export type EarningsMoveBasis = 'bmo' | 'amc' | 'session';
|
|
41
|
+
export type EarningsEpsMethod = 'adj' | 'gaap' | 'ffo';
|
|
42
|
+
export type EarningsRevenueMethod = 'gaap' | 'adj' | 'rental';
|
|
43
|
+
/** The next ex-dividend date of the reporting company, when one is on the calendar. */
|
|
44
|
+
export interface EarningsNextExDividend {
|
|
45
|
+
/** `YYYY-MM-DD`. */
|
|
46
|
+
date: string;
|
|
47
|
+
cashAmount: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The earnings block of a `kind: 'earnings'` row. Public facts only: no
|
|
51
|
+
* estimate, surprise, importance or note ever rides the wire. The row's own
|
|
52
|
+
* `previous` / `actual` carry the EPS as strings, exactly as printed.
|
|
53
|
+
*/
|
|
54
|
+
export interface MarketEventEarnings {
|
|
55
|
+
ticker: string;
|
|
56
|
+
companyName: string;
|
|
57
|
+
/** `Q3`, `FY`. */
|
|
58
|
+
fiscalPeriod: string;
|
|
59
|
+
fiscalYear: number;
|
|
60
|
+
slot: EarningsSlot;
|
|
61
|
+
epsMethod: EarningsEpsMethod | null;
|
|
62
|
+
/** (actual − previous) / |previous| × 100; null without both, or when previous is 0. */
|
|
63
|
+
epsYoyPct: number | null;
|
|
64
|
+
revenueActual: number | null;
|
|
65
|
+
revenuePrevious: number | null;
|
|
66
|
+
revenueMethod: EarningsRevenueMethod | null;
|
|
67
|
+
revenueYoyPct: number | null;
|
|
68
|
+
currency: string;
|
|
69
|
+
marketCap: number | null;
|
|
70
|
+
sector: string | null;
|
|
71
|
+
/** MIC of the listing (`XNYS`). */
|
|
72
|
+
primaryExchange: string | null;
|
|
73
|
+
/** This report's own move, percent, once the closes it needs exist; `moveBasis` says which. */
|
|
74
|
+
movePct: number | null;
|
|
75
|
+
moveBasis: EarningsMoveBasis | null;
|
|
76
|
+
/** Mean |movePct| over the newest four earlier reports with a move; null below two. */
|
|
77
|
+
typicalMovePct: number | null;
|
|
78
|
+
/** Short interest over shares OUTSTANDING (never float), percent. */
|
|
79
|
+
shortInterestPct: number | null;
|
|
80
|
+
daysToCover: number | null;
|
|
81
|
+
/** `YYYY-MM-DD` of the settlement the short interest is from. */
|
|
82
|
+
shortSettlementDate: string | null;
|
|
83
|
+
nextExDividend: EarningsNextExDividend | null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The dividend block of a `kind: 'dividend'` row. The amount rides here, never
|
|
87
|
+
* in `actual` (which stays null), so a future ex-date reads as upcoming.
|
|
88
|
+
*/
|
|
89
|
+
export interface MarketEventDividend {
|
|
90
|
+
ticker: string;
|
|
91
|
+
cashAmount: number;
|
|
92
|
+
currency: string;
|
|
93
|
+
/** `YYYY-MM-DD`; the row's `at` is this day at 09:30 ET, for ordering only. */
|
|
94
|
+
exDate: string;
|
|
95
|
+
payDate: string | null;
|
|
96
|
+
recordDate: string | null;
|
|
97
|
+
/** Payments a year (4 = quarterly); null when unknown. */
|
|
98
|
+
frequency: number | null;
|
|
99
|
+
/** `CD` regular cash, `SC` special cash, ... as served. */
|
|
100
|
+
dividendType: string | null;
|
|
101
|
+
}
|
|
102
|
+
export interface MarketEvent {
|
|
103
|
+
id: string;
|
|
104
|
+
releaseGroupId: string;
|
|
105
|
+
kind: MarketEventKind;
|
|
106
|
+
title: string;
|
|
107
|
+
period: string | null;
|
|
108
|
+
region: string;
|
|
109
|
+
impact: MarketEventImpact;
|
|
110
|
+
/** Release instant, epoch ms. */
|
|
111
|
+
at: number;
|
|
112
|
+
timing: MarketEventTiming;
|
|
113
|
+
forecast: string | null;
|
|
114
|
+
forecastSource: 'model' | null;
|
|
115
|
+
previous: string | null;
|
|
116
|
+
actual: string | null;
|
|
117
|
+
revisedPrevious: string | null;
|
|
118
|
+
surprise: MarketEventSurprise | null;
|
|
119
|
+
source: MarketEventSource;
|
|
120
|
+
sourceUrl: string | null;
|
|
121
|
+
assetClasses: MarketAssetClass[];
|
|
122
|
+
/** ISO 3166-1 alpha-2, or `EU` for euro-area aggregates; null when unknown or from an older backend. */
|
|
123
|
+
country: string | null;
|
|
124
|
+
/** The publishing agency's display name; null when the release map does not know the release. */
|
|
125
|
+
publisher: string | null;
|
|
126
|
+
/** The chart series this release prints, headline first; empty when nothing is linked. */
|
|
127
|
+
seriesLinks: MarketEventSeriesLink[];
|
|
128
|
+
updatedAt: number;
|
|
129
|
+
/** Present exactly on `kind: 'earnings'` rows (the runtime guard drops an earnings row without it). */
|
|
130
|
+
earnings?: MarketEventEarnings;
|
|
131
|
+
/** Present exactly on `kind: 'dividend'` rows (the runtime guard drops a dividend row without it). */
|
|
132
|
+
dividend?: MarketEventDividend;
|
|
133
|
+
}
|
|
134
|
+
export interface MarketEventsSourceStatus {
|
|
135
|
+
lastSyncAt: number | null;
|
|
136
|
+
ok: boolean;
|
|
137
|
+
error: string | null;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The span a kind query's calendar is complete for (epoch ms), intersected
|
|
141
|
+
* with the request. A day outside it is unavailable, which is not the same as
|
|
142
|
+
* a day with zero reports.
|
|
143
|
+
*/
|
|
144
|
+
export interface MarketEventsCoverage {
|
|
145
|
+
from: number;
|
|
146
|
+
to: number;
|
|
147
|
+
}
|
|
148
|
+
export interface MarketEventsEnvelope {
|
|
149
|
+
serverNow: number;
|
|
150
|
+
revision: string;
|
|
151
|
+
nextEventAt: number | null;
|
|
152
|
+
sources: Record<string, MarketEventsSourceStatus>;
|
|
153
|
+
events: MarketEvent[];
|
|
154
|
+
/** Kind queries only: null before any complete pull, or when the request misses it. Asset-class envelopes parse to null. */
|
|
155
|
+
coverage?: MarketEventsCoverage | null;
|
|
156
|
+
}
|
|
157
|
+
/** The asset-class calendar (macro, central banks, auctions, expiries, holidays). */
|
|
158
|
+
export interface MarketEventsAssetClassQuery {
|
|
159
|
+
assetClass: MarketAssetClass;
|
|
160
|
+
from: number;
|
|
161
|
+
to: number;
|
|
162
|
+
}
|
|
163
|
+
/** One kind's window: every ticker or one, every company or the major ones (`impact >= 2`). */
|
|
164
|
+
export interface MarketEventsKindQuery {
|
|
165
|
+
kind: EarningsEventKind;
|
|
166
|
+
ticker: string | null;
|
|
167
|
+
majorOnly: boolean;
|
|
168
|
+
from: number;
|
|
169
|
+
to: number;
|
|
170
|
+
}
|
|
171
|
+
export type MarketEventsQuery = MarketEventsAssetClassQuery | MarketEventsKindQuery;
|
|
172
|
+
export interface EarningsDetailFacts {
|
|
173
|
+
name: string | null;
|
|
174
|
+
sector: string | null;
|
|
175
|
+
sicDescription: string | null;
|
|
176
|
+
marketCap: number | null;
|
|
177
|
+
employees: number | null;
|
|
178
|
+
/** `YYYY-MM-DD`. */
|
|
179
|
+
listDate: string | null;
|
|
180
|
+
primaryExchange: string | null;
|
|
181
|
+
description: string | null;
|
|
182
|
+
homepage: string | null;
|
|
183
|
+
/** When the facts were last refreshed, epoch ms. */
|
|
184
|
+
factsAt: number | null;
|
|
185
|
+
}
|
|
186
|
+
/** One stored report with an actual, newest first. EPS values are strings, as the list rows carry them. */
|
|
187
|
+
export interface EarningsDetailReport {
|
|
188
|
+
id: string;
|
|
189
|
+
/** `YYYY-MM-DD`. */
|
|
190
|
+
date: string;
|
|
191
|
+
at: number;
|
|
192
|
+
slot: EarningsSlot;
|
|
193
|
+
fiscalPeriod: string | null;
|
|
194
|
+
fiscalYear: number | null;
|
|
195
|
+
eps: string | null;
|
|
196
|
+
previousEps: string | null;
|
|
197
|
+
epsYoyPct: number | null;
|
|
198
|
+
epsMethod: EarningsEpsMethod | null;
|
|
199
|
+
revenue: number | null;
|
|
200
|
+
previousRevenue: number | null;
|
|
201
|
+
revenueYoyPct: number | null;
|
|
202
|
+
movePct: number | null;
|
|
203
|
+
moveBasis: EarningsMoveBasis | null;
|
|
204
|
+
}
|
|
205
|
+
export interface EarningsDetailShortInterest {
|
|
206
|
+
/** `YYYY-MM-DD`. */
|
|
207
|
+
settlementDate: string;
|
|
208
|
+
shortInterest: number | null;
|
|
209
|
+
avgDailyVolume: number | null;
|
|
210
|
+
daysToCover: number | null;
|
|
211
|
+
/** Of shares outstanding, percent. */
|
|
212
|
+
shortInterestPct: number | null;
|
|
213
|
+
}
|
|
214
|
+
export interface EarningsDetailDividend {
|
|
215
|
+
/** `YYYY-MM-DD`. */
|
|
216
|
+
exDate: string;
|
|
217
|
+
payDate: string | null;
|
|
218
|
+
cashAmount: number;
|
|
219
|
+
currency: string;
|
|
220
|
+
}
|
|
221
|
+
export interface EarningsDetail {
|
|
222
|
+
ticker: string;
|
|
223
|
+
serverNow: number;
|
|
224
|
+
facts: EarningsDetailFacts | null;
|
|
225
|
+
/** Newest first, up to 8. */
|
|
226
|
+
reports: EarningsDetailReport[];
|
|
227
|
+
typicalMovePct: number | null;
|
|
228
|
+
shortInterest: EarningsDetailShortInterest | null;
|
|
229
|
+
nextDividend: EarningsDetailDividend | null;
|
|
230
|
+
}
|
|
231
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Wire shape of GET /api/v1/market-events (orange-v2-backend,
|
|
2
|
+
// src/interfaces/market-event.interface.ts is the source of truth). Mirrored
|
|
3
|
+
// here until the contract moves into an @orangecharts package; the service
|
|
4
|
+
// validates the envelope at runtime so a drift never reaches the chart.
|
|
5
|
+
/** Every kind, in the order the Events tab lists its kind chips. The `marketEventsKinds` pref defaults to all of them. */
|
|
6
|
+
export const MARKET_EVENT_KINDS = [
|
|
7
|
+
'macro',
|
|
8
|
+
'central_bank',
|
|
9
|
+
'earnings',
|
|
10
|
+
'dividend',
|
|
11
|
+
'expiry',
|
|
12
|
+
'auction',
|
|
13
|
+
'holiday',
|
|
14
|
+
];
|
|
15
|
+
export const MARKET_ASSET_CLASSES = ['crypto', 'cme', 'tradfi', 'hip3', 'polymarket'];
|
|
@@ -1,118 +1,101 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { OPRA_VENUE } from '../market-data/venues/opra.js';
|
|
2
|
+
import { MarketDataBillingError, type AcceptMarketDataDataTermsDto, type GetMarketDataAttestationResponseDto, type GetMarketDataSubscriptionResponseDto, type MarketDataAgreement, type MarketDataAttestation, type MarketDataAttestationDto, type MarketDataAttestationRecordDto, type MarketDataAttestationSubmitResult, type MarketDataAttestationWithdrawal, type MarketDataBillingErrorKind, type MarketDataBillingRepository, type MarketDataCancelResponseDto, type MarketDataCheckoutDto, type MarketDataCheckoutResponseDto, type MarketDataCheckoutResult, type MarketDataDataTermsDto, type MarketDataPurchaseRefusalCode, type MarketDataSubscription, type MarketDataSubscriptionDto, type MarketDataSubscriptionHold, type SubmitMarketDataAttestationResponseDto } from '../market-data/billing.interface.js';
|
|
3
|
+
import type { MarketDataClassification } from '../market-data/venue.js';
|
|
2
4
|
/**
|
|
3
|
-
* OPRA (US equity and index options) governed plane: the exchange catalog the
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* OPRA (US equity and index options) governed plane: the exchange catalog the plane keys on, and the OPRA billing
|
|
6
|
+
* contract of the `/opra/*` routes. Deliberately separate from `CME_EXCHANGE_CATALOG`: that catalog is also the CME
|
|
7
|
+
* Stripe bundle, the Surface A guest snapshot and the futures session lattice, none of which apply to OPRA.
|
|
8
|
+
*
|
|
9
|
+
* Every value here is OPRA's venue card (market-data/venues/opra.ts) and every shape the venue-generic contract
|
|
10
|
+
* (market-data/billing.interface.ts): this module keeps the OPRA names every OPRA surface, worker and spec reads, so
|
|
11
|
+
* the venue-generic subscription flow (docs/features/market-data/plane.md) moved nothing.
|
|
8
12
|
*/
|
|
9
13
|
export type OpraGovernedExchange = 'OPRA';
|
|
10
|
-
/** Every OPRA-governed exchange code (one consolidated venue by design). */
|
|
14
|
+
/** Every OPRA-governed exchange code (one consolidated venue by design): the OPRA card's product groups. */
|
|
11
15
|
export declare const OPRA_GOVERNED_EXCHANGES: readonly OpraGovernedExchange[];
|
|
12
16
|
/** OPRA defines delayed data as at least 15 minutes old; the gate's delayed window matches. */
|
|
13
|
-
export declare const OPRA_DELAY_MINUTES
|
|
17
|
+
export declare const OPRA_DELAY_MINUTES: 15;
|
|
14
18
|
/** The one OPRA plan: real-time top of book, billed monthly. */
|
|
15
|
-
export declare const OPRA_REALTIME_MONTHLY_USD
|
|
16
|
-
export type OpraBillingInterval = '
|
|
19
|
+
export declare const OPRA_REALTIME_MONTHLY_USD: 4.95;
|
|
20
|
+
export type OpraBillingInterval = (typeof OPRA_VENUE.products)[number]['interval'];
|
|
17
21
|
/**
|
|
18
22
|
* Both declarations go to the server: a non-professional one makes the account eligible for real-time, a
|
|
19
23
|
* professional one is recorded too and withdraws real-time eligibility for good (the server cancels an owned
|
|
20
24
|
* subscription and keeps the account on the delayed tier). Never a re-price.
|
|
21
25
|
*/
|
|
22
|
-
export type OpraClassification =
|
|
23
|
-
|
|
26
|
+
export type OpraClassification = MarketDataClassification;
|
|
27
|
+
/**
|
|
28
|
+
* v2 asks questions 3 to 5 as one group ("Do any of these apply to you?") and adds the subscriber's country and
|
|
29
|
+
* address. A record of any other version reads as no declaration: the subscriber declares again.
|
|
30
|
+
*/
|
|
31
|
+
export declare const OPRA_ATTESTATION_FORM_VERSION: "opra-v2";
|
|
32
|
+
/** The server's bound on each identity field (`legalName`, `employer`, `occupation`), trimmed. */
|
|
33
|
+
export declare const OPRA_IDENTITY_FIELD_MAX_LENGTH: 200;
|
|
34
|
+
/** The server's bound on the one-line `address`, trimmed. */
|
|
35
|
+
export declare const OPRA_ADDRESS_FIELD_MAX_LENGTH: 300;
|
|
24
36
|
/**
|
|
25
37
|
* POST /opra/attestation request body (201 for both classifications). The server derives the classification
|
|
26
38
|
* from `answers` and refuses a body whose `classification` disagrees, so the client sends the one
|
|
27
39
|
* `isOpraNonProfessional` reads from the same answers.
|
|
28
40
|
*/
|
|
29
|
-
|
|
30
|
-
export declare const OPRA_IDENTITY_FIELD_MAX_LENGTH = 200;
|
|
31
|
-
export interface OpraAttestationDto {
|
|
32
|
-
classification: OpraClassification;
|
|
33
|
-
/** Keyed by stable machine question ids, never translated question text. */
|
|
34
|
-
answers: Record<string, unknown>;
|
|
35
|
-
legalName: string;
|
|
36
|
-
employer?: string;
|
|
37
|
-
occupation?: string;
|
|
41
|
+
export interface OpraAttestationDto extends MarketDataAttestationDto {
|
|
38
42
|
formVersion: typeof OPRA_ATTESTATION_FORM_VERSION;
|
|
39
43
|
}
|
|
40
|
-
export
|
|
41
|
-
id: number;
|
|
42
|
-
classification: OpraClassification;
|
|
43
|
-
attestedAt: string;
|
|
44
|
-
formVersion: string;
|
|
45
|
-
/**
|
|
46
|
-
* ISO end of the declaration's validity (a year after it was made). Additive: a server that names none
|
|
47
|
-
* leaves the record without a client-side expiry, and the checkout's refusal stays the authority.
|
|
48
|
-
*/
|
|
49
|
-
expiresAt?: string;
|
|
50
|
-
}
|
|
44
|
+
export type OpraAttestationRecordDto = MarketDataAttestationRecordDto;
|
|
51
45
|
/** GET /opra/attestation -> 200 body. */
|
|
52
|
-
export
|
|
53
|
-
attestation: OpraAttestationRecordDto | null;
|
|
54
|
-
}
|
|
46
|
+
export type GetOpraAttestationResponseDto = GetMarketDataAttestationResponseDto;
|
|
55
47
|
/** POST /opra/checkout request body. */
|
|
56
|
-
export interface OpraCheckoutDto {
|
|
57
|
-
interval: OpraBillingInterval;
|
|
58
|
-
locale?: string;
|
|
59
|
-
}
|
|
60
|
-
/** POST /opra/checkout -> 200: a Stripe redirect, or a terminal refusal the UI shows as "not available". */
|
|
61
|
-
export type OpraCheckoutResponseDto = {
|
|
62
|
-
url: string;
|
|
63
|
-
} | {
|
|
64
|
-
refused: OpraPurchaseRefusalCode;
|
|
65
|
-
};
|
|
66
|
-
export type OpraPurchaseRefusalCode = 'professional_unavailable' | 'agreement_required' | 'attestation_required';
|
|
67
|
-
/** Subscription as served by GET /opra/subscription. */
|
|
68
|
-
export interface OpraSubscriptionDto {
|
|
48
|
+
export interface OpraCheckoutDto extends MarketDataCheckoutDto {
|
|
69
49
|
interval: OpraBillingInterval;
|
|
70
|
-
/** ISO timestamp of the current period end. */
|
|
71
|
-
renewsAt: string;
|
|
72
|
-
pendingCancellation: boolean;
|
|
73
|
-
priceUsd: number;
|
|
74
|
-
}
|
|
75
|
-
export interface GetOpraSubscriptionResponseDto {
|
|
76
|
-
subscription: OpraSubscriptionDto | null;
|
|
77
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* POST /opra/checkout -> 200: a Stripe redirect, or a refusal. 'professional_unavailable' is terminal (the UI shows
|
|
53
|
+
* "not available"). Pay first, the server no longer answers 'attestation_required' or 'agreement_required'; they stay
|
|
54
|
+
* in the union and are handled defensively (the flow routes into that step).
|
|
55
|
+
*/
|
|
56
|
+
export type OpraCheckoutResponseDto = MarketDataCheckoutResponseDto;
|
|
57
|
+
export type OpraPurchaseRefusalCode = MarketDataPurchaseRefusalCode;
|
|
58
|
+
/**
|
|
59
|
+
* Why the server set a subscription to end at its period end on its own: 'unqualified', the account is paid but has
|
|
60
|
+
* not completed the subscriber questions and the agreement.
|
|
61
|
+
*/
|
|
62
|
+
export type OpraSubscriptionHold = MarketDataSubscriptionHold;
|
|
63
|
+
/** Subscription as served by GET /opra/subscription (`hold`: the server's hold, null for the subscriber's cancel). */
|
|
64
|
+
export type OpraSubscriptionDto = MarketDataSubscriptionDto;
|
|
65
|
+
export type GetOpraSubscriptionResponseDto = GetMarketDataSubscriptionResponseDto;
|
|
78
66
|
/**
|
|
79
67
|
* GET /opra/data-terms -> 200; POST /opra/data-terms -> 201. Acceptance is an explicit record of
|
|
80
68
|
* the OPRA subscriber agreement version the user accepted; a grant or a subscription never
|
|
81
69
|
* implies it (the CME shape infers acceptance, OPRA must not).
|
|
82
70
|
*/
|
|
83
|
-
export
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
export
|
|
90
|
-
attestationId: number;
|
|
91
|
-
}
|
|
71
|
+
export type OpraDataTermsDto = MarketDataDataTermsDto;
|
|
72
|
+
/** What a professional declaration did to the account's subscription, as the server reports it. */
|
|
73
|
+
export type OpraAttestationWithdrawal = MarketDataAttestationWithdrawal;
|
|
74
|
+
/** POST /opra/attestation -> 201 body; `withdrawal` only for a professional declaration. */
|
|
75
|
+
export type SubmitOpraAttestationResponseDto = SubmitMarketDataAttestationResponseDto;
|
|
76
|
+
/** The submit's answer in the domain: the record id, and what a professional declaration withdrew (else null). */
|
|
77
|
+
export type OpraAttestationSubmitResult = MarketDataAttestationSubmitResult;
|
|
92
78
|
/** POST /opra/data-terms request body: the agreement version the subscriber was shown and accepted. */
|
|
93
|
-
export
|
|
94
|
-
agreementVersion: string;
|
|
95
|
-
}
|
|
79
|
+
export type AcceptOpraDataTermsDto = AcceptMarketDataDataTermsDto;
|
|
96
80
|
/** POST /opra/subscription/cancel and DELETE /opra/subscription/cancel -> 200 body. */
|
|
97
|
-
export
|
|
98
|
-
message?: string;
|
|
99
|
-
}
|
|
81
|
+
export type OpraCancelResponseDto = MarketDataCancelResponseDto;
|
|
100
82
|
/**
|
|
101
83
|
* The OPRA subscriber agreement version this build presents and posts. Bump on ANY change to the
|
|
102
84
|
* agreement text the dialog shows or links: a new version is a new acceptance, and the store reads a
|
|
103
85
|
* record of any other version as not accepted. RELEASE BLOCKER (named, do not bury): the agreement
|
|
104
86
|
* text, this version id and the link below need the compliance sign-off before the flag is lit.
|
|
105
87
|
*/
|
|
106
|
-
export declare const OPRA_SUBSCRIBER_AGREEMENT_VERSION
|
|
88
|
+
export declare const OPRA_SUBSCRIBER_AGREEMENT_VERSION: "opra-subscriber-2026-10";
|
|
107
89
|
/** Where the agreement step links for OPRA's own subscriber terms (see the release blocker above). */
|
|
108
|
-
export declare const OPRA_SUBSCRIBER_AGREEMENT_URL
|
|
90
|
+
export declare const OPRA_SUBSCRIBER_AGREEMENT_URL: "https://www.opraplan.com/";
|
|
109
91
|
/**
|
|
110
92
|
* OPRA's non-professional qualification, one stable machine id per question: these ids key the
|
|
111
93
|
* submitted `answers` record and are never swapped for translated question text. `qualifying` is the
|
|
112
94
|
* answer a non-professional gives. Every answer must match it; anything else is a professional
|
|
113
|
-
* declaration, which
|
|
114
|
-
* and then ends in "not available".
|
|
115
|
-
*
|
|
95
|
+
* declaration, which is not sold: it is submitted (the server records it and withdraws eligibility)
|
|
96
|
+
* and then ends in "not available". The form asks the three whose qualifying answer is No as one group
|
|
97
|
+
* question; the record still carries all five. Bump OPRA_ATTESTATION_FORM_VERSION on any change to this
|
|
98
|
+
* set, its order or its wording.
|
|
116
99
|
*/
|
|
117
100
|
export declare const OPRA_QUALIFICATION_QUESTIONS: readonly [{
|
|
118
101
|
readonly id: "natural_person";
|
|
@@ -134,16 +117,12 @@ export type OpraQualificationQuestionId = (typeof OPRA_QUALIFICATION_QUESTIONS)[
|
|
|
134
117
|
export type OpraQualificationAnswers = Partial<Record<OpraQualificationQuestionId, boolean>>;
|
|
135
118
|
/** Every question answered with its qualifying answer. A missing answer never qualifies. */
|
|
136
119
|
export declare function isOpraNonProfessional(answers: OpraQualificationAnswers): boolean;
|
|
137
|
-
export type OpraAttestation =
|
|
138
|
-
export type OpraSubscription =
|
|
120
|
+
export type OpraAttestation = MarketDataAttestation;
|
|
121
|
+
export type OpraSubscription = MarketDataSubscription;
|
|
139
122
|
/** The explicit agreement record: accepted, for which version, and when. */
|
|
140
|
-
export
|
|
141
|
-
accepted: boolean;
|
|
142
|
-
agreementVersion: string;
|
|
143
|
-
acceptedAt: string | null;
|
|
144
|
-
}
|
|
123
|
+
export type OpraAgreement = MarketDataAgreement;
|
|
145
124
|
/** How long before a declaration's expiry the management page asks the subscriber to renew it. */
|
|
146
|
-
export declare const OPRA_ATTESTATION_RENEW_WINDOW_DAYS
|
|
125
|
+
export declare const OPRA_ATTESTATION_RENEW_WINDOW_DAYS: 30;
|
|
147
126
|
/**
|
|
148
127
|
* A declaration on the current form (a new question set means a new declaration) whose validity has not
|
|
149
128
|
* ended at `now`, either classification. The client owns expiry: `now` is the caller's clock (the store's
|
|
@@ -163,62 +142,19 @@ export declare function opraAttestationRenewBy(attestation: OpraAttestation | nu
|
|
|
163
142
|
/** An acceptance counts only for the version this build presents, never for an older text. */
|
|
164
143
|
export declare function isOpraAgreementCurrent(agreement: OpraAgreement | null | undefined): boolean;
|
|
165
144
|
/**
|
|
166
|
-
* Normalized checkout outcome. 'redirect' = leave for Stripe. 'refused' = the server (or the
|
|
167
|
-
*
|
|
145
|
+
* Normalized checkout outcome. 'redirect' = leave for Stripe. 'refused' = the server declined (or the
|
|
146
|
+
* store answered a professional account itself); 'professional_unavailable' is terminal, never a re-price.
|
|
168
147
|
* 'busy' = a checkout is already in flight, or the guest wall took the click.
|
|
169
148
|
*/
|
|
170
|
-
export type OpraCheckoutResult =
|
|
171
|
-
kind: 'redirect';
|
|
172
|
-
url: string;
|
|
173
|
-
} | {
|
|
174
|
-
kind: 'refused';
|
|
175
|
-
code: OpraPurchaseRefusalCode;
|
|
176
|
-
} | {
|
|
177
|
-
kind: 'busy';
|
|
178
|
-
};
|
|
149
|
+
export type OpraCheckoutResult = MarketDataCheckoutResult;
|
|
179
150
|
/**
|
|
180
151
|
* Transport-free failure surface for the OPRA billing calls. Unlike CME, a 403 is NOT an attestation
|
|
181
152
|
* gate (refusals ride the 200 checkout body), so it never routes back into the declaration.
|
|
182
153
|
* 'invoice_owed' is the tagged 409 while Stripe still collects an invoice on the line.
|
|
183
154
|
*/
|
|
184
|
-
export type OpraBillingErrorKind =
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
/** Raw backend message: diagnostic content only, never primary UI copy. */
|
|
189
|
-
readonly diagnosticMessage: string | null;
|
|
190
|
-
/** Stripe's hosted invoice on an 'invoice_owed' refusal; null otherwise. */
|
|
191
|
-
readonly invoiceUrl: string | null;
|
|
192
|
-
constructor(kind: OpraBillingErrorKind, options?: {
|
|
193
|
-
status?: number | null;
|
|
194
|
-
diagnosticMessage?: string | null;
|
|
195
|
-
invoiceUrl?: string | null;
|
|
196
|
-
});
|
|
197
|
-
}
|
|
155
|
+
export type OpraBillingErrorKind = MarketDataBillingErrorKind;
|
|
156
|
+
/** The venue-generic billing error (market-data/billing.interface.ts): one class for every venue's calls. */
|
|
157
|
+
export declare const OpraBillingError: typeof MarketDataBillingError;
|
|
158
|
+
export type OpraBillingError = MarketDataBillingError;
|
|
198
159
|
/** The live repository's boundary (implemented in the service; specs substitute it through the accessor). */
|
|
199
|
-
export
|
|
200
|
-
getAttestation(signal?: AbortSignal): Promise<OpraAttestation | null>;
|
|
201
|
-
submitAttestation(body: OpraAttestationDto, signal?: AbortSignal): Promise<{
|
|
202
|
-
attestationId: number;
|
|
203
|
-
}>;
|
|
204
|
-
getSubscription(signal?: AbortSignal): Promise<OpraSubscription | null>;
|
|
205
|
-
/** Never resolves 'busy' (that is the store's own answer); a refusal resolves, a failure throws. */
|
|
206
|
-
checkout(body: OpraCheckoutDto, options: {
|
|
207
|
-
idempotencyId: string;
|
|
208
|
-
signal?: AbortSignal;
|
|
209
|
-
}): Promise<Exclude<OpraCheckoutResult, {
|
|
210
|
-
kind: 'busy';
|
|
211
|
-
}>>;
|
|
212
|
-
/**
|
|
213
|
-
* Cancels at period end (OPRA has one classification, so there is no immediate switch-cancel), with the
|
|
214
|
-
* subscriber's optional reason as the body.
|
|
215
|
-
*/
|
|
216
|
-
cancelSubscription(signal?: AbortSignal, feedback?: CancelFeedback): Promise<{
|
|
217
|
-
message: string | null;
|
|
218
|
-
}>;
|
|
219
|
-
retractCancellation(signal?: AbortSignal): Promise<{
|
|
220
|
-
message: string | null;
|
|
221
|
-
}>;
|
|
222
|
-
getDataTerms(signal?: AbortSignal): Promise<OpraAgreement>;
|
|
223
|
-
acceptDataTerms(agreementVersion: string, signal?: AbortSignal): Promise<OpraAgreement>;
|
|
224
|
-
}
|
|
160
|
+
export type OpraBillingRepository = MarketDataBillingRepository;
|