gloomberb 0.15.8 → 0.16.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 +10 -2
- package/package.json +1 -1
- package/src/api-client/app-attention.ts +147 -0
- package/src/api-client/attention.ts +26 -0
- package/src/api-client/awards.ts +215 -0
- package/src/api-client/catalysts.ts +160 -0
- package/src/api-client/chat.ts +137 -14
- package/src/api-client/company-kpis.ts +153 -0
- package/src/api-client/cpi.ts +52 -0
- package/src/api-client/credit-documents.ts +107 -0
- package/src/api-client/data.ts +187 -3
- package/src/api-client/distress.ts +164 -0
- package/src/api-client/equity-screener.ts +11 -0
- package/src/api-client/exposure.ts +202 -0
- package/src/api-client/gpu.ts +93 -0
- package/src/api-client/hiring.ts +110 -0
- package/src/api-client/index.ts +77 -3
- package/src/api-client/normalizers.ts +31 -1
- package/src/api-client/perps.ts +127 -0
- package/src/api-client/power.ts +148 -0
- package/src/api-client/request.ts +58 -1
- package/src/api-client/research-activity.ts +172 -13
- package/src/api-client/socket.ts +75 -27
- package/src/api-client/supply-chain-graph.ts +40 -0
- package/src/api-client/supply-chain.ts +98 -0
- package/src/api-client/telemetry.ts +29 -0
- package/src/api-client/themes.ts +28 -0
- package/src/api-client/types.ts +31 -1
- package/src/api-client/wall-experiments.ts +100 -0
- package/src/api-client/wall-summary.ts +49 -0
- package/src/api-client/web-experiments.ts +136 -0
- package/src/app/pane-runtime/plugin-bindings.ts +5 -0
- package/src/app/pane-runtime/ticker-open-runtime.ts +8 -2
- package/src/app/runtime/update.ts +13 -1
- package/src/cli/commands/system.ts +2 -0
- package/src/cli/desktop-pane-shot.ts +3 -4
- package/src/cli/pane-functions/data.ts +78 -0
- package/src/cli/pane-functions/financial-ratio-shot.ts +160 -0
- package/src/cli/pane-functions/function-help.ts +205 -8
- package/src/cli/pane-functions/headless.ts +4 -0
- package/src/cli/pane-functions/screenshot-evidence.ts +21 -0
- package/src/cli/pane-functions/screenshot.ts +49 -5
- package/src/components/chart-table/index.ts +1 -0
- package/src/components/chart-table/layout.ts +15 -0
- package/src/components/command-bar/action-runtime.ts +1 -0
- package/src/components/command-bar/commands/direct/index.ts +32 -0
- package/src/components/command-bar/commands/registry.ts +7 -0
- package/src/components/command-bar/pane-templates/items.ts +11 -0
- package/src/components/command-bar/pane-templates/workflow.ts +19 -4
- package/src/components/command-bar/routes/root/command-items.ts +6 -0
- package/src/components/command-bar/routes/root/provider-search.ts +2 -0
- package/src/components/command-bar/routes/root/results.ts +64 -0
- package/src/components/command-bar/routes/root/runtime.ts +8 -0
- package/src/components/command-bar/routes/ticker-search/results.ts +89 -24
- package/src/components/command-bar/routes/ticker-search/route.ts +2 -0
- package/src/components/command-bar/surface/index.tsx +15 -0
- package/src/components/command-bar/view-model.ts +3 -0
- package/src/components/command-bar/workflow/ops.ts +19 -0
- package/src/components/command-bar/workflow/tickers.ts +5 -0
- package/src/components/company-logo.tsx +15 -2
- package/src/components/data-table/table-pane.ts +2 -1
- package/src/components/index.ts +1 -0
- package/src/components/layout/detached-pane-shell.tsx +12 -1
- package/src/components/layout/missing-pane.tsx +87 -23
- package/src/components/layout/pane/footer/index.tsx +64 -18
- package/src/components/layout/pane/footer/model.ts +85 -0
- package/src/components/layout/pane/sidebar.tsx +19 -1
- package/src/components/layout/shell/pane/management-shortcuts.ts +13 -1
- package/src/components/layout/status-bar.tsx +93 -28
- package/src/components/layout/status-widget-space.ts +72 -0
- package/src/components/onboarding/first-run-workspace.ts +8 -2
- package/src/components/onboarding/onboarding-wizard.tsx +35 -16
- package/src/components/price-performance.tsx +31 -34
- package/src/components/ui/data-table/index.tsx +11 -8
- package/src/components/ui/display.tsx +9 -3
- package/src/components/ui/figure.tsx +94 -0
- package/src/components/ui/icon.tsx +3 -1
- package/src/components/ui/message-composer.tsx +8 -1
- package/src/components/ui/ratio-bar.tsx +84 -0
- package/src/components/ui/toggle.tsx +3 -1
- package/src/components/use-scrollbox-layout.ts +17 -0
- package/src/core/state/app/layout.ts +35 -1
- package/src/core/state/app/state.ts +15 -0
- package/src/core/state/app/types.ts +1 -0
- package/src/data/config/store/normalize.ts +24 -0
- package/src/i18n/es.ts +1 -0
- package/src/i18n/ja.ts +1 -0
- package/src/i18n/ko.ts +1 -0
- package/src/i18n/zh-cn.ts +1 -0
- package/src/i18n/zh-tw.ts +1 -0
- package/src/layout-marketplace/pane-imagery.ts +1 -0
- package/src/market-data/coordinator/entries.ts +13 -0
- package/src/market-data/coordinator/financials.ts +33 -8
- package/src/market-data/market/freshness.ts +16 -5
- package/src/market-data/published-cn-sessions.ts +25 -0
- package/src/market-data/published-nse-sessions.ts +20 -0
- package/src/news/aggregator.ts +4 -0
- package/src/plugins/builtin/account-management/model.ts +6 -1
- package/src/plugins/builtin/account-management/pane.tsx +36 -25
- package/src/plugins/builtin/alerts/catalysts.ts +77 -0
- package/src/plugins/builtin/alerts/events-pane.tsx +3 -0
- package/src/plugins/builtin/alerts/events.ts +10 -4
- package/src/plugins/builtin/alerts/history-pane.tsx +1 -1
- package/src/plugins/builtin/alerts/history.ts +1 -0
- package/src/plugins/builtin/alerts/index.tsx +6 -0
- package/src/plugins/builtin/alerts/research-builder.ts +10 -3
- package/src/plugins/builtin/alerts/research-rules.ts +15 -1
- package/src/plugins/builtin/analytics/risk-client.ts +15 -3
- package/src/plugins/builtin/analytics/risk-headless.ts +123 -18
- package/src/plugins/builtin/attention/client.ts +80 -0
- package/src/plugins/builtin/attention/evidence.ts +30 -0
- package/src/plugins/builtin/attention/headless.ts +33 -0
- package/src/plugins/builtin/attention/index.tsx +18 -0
- package/src/plugins/builtin/attention/model.ts +59 -0
- package/src/plugins/builtin/attention/pane.tsx +211 -0
- package/src/plugins/builtin/attention/trending.tsx +59 -0
- package/src/plugins/builtin/awards/alerts.ts +32 -0
- package/src/plugins/builtin/awards/client.ts +82 -0
- package/src/plugins/builtin/awards/detail.tsx +107 -0
- package/src/plugins/builtin/awards/evidence.ts +36 -0
- package/src/plugins/builtin/awards/headless.ts +55 -0
- package/src/plugins/builtin/awards/index.tsx +20 -0
- package/src/plugins/builtin/awards/model.ts +42 -0
- package/src/plugins/builtin/awards/pane.tsx +263 -0
- package/src/plugins/builtin/catalysts/client.ts +28 -0
- package/src/plugins/builtin/catalysts/detail.tsx +88 -0
- package/src/plugins/builtin/catalysts/evidence.ts +47 -0
- package/src/plugins/builtin/catalysts/headless.ts +42 -0
- package/src/plugins/builtin/catalysts/history.ts +26 -0
- package/src/plugins/builtin/catalysts/index.tsx +29 -0
- package/src/plugins/builtin/catalysts/model.ts +135 -0
- package/src/plugins/builtin/catalysts/pane.tsx +159 -0
- package/src/plugins/builtin/chart-composer/index.tsx +8 -1
- package/src/plugins/builtin/chat/attachments/desktop.tsx +610 -0
- package/src/plugins/builtin/chat/attachments/files.ts +45 -0
- package/src/plugins/builtin/chat/attachments/model.ts +164 -0
- package/src/plugins/builtin/chat/attachments/terminal.tsx +72 -0
- package/src/plugins/builtin/chat/attachments/transfer.ts +165 -0
- package/src/plugins/builtin/chat/content/channel-navigation.ts +13 -12
- package/src/plugins/builtin/chat/content/composer-runtime.ts +25 -4
- package/src/plugins/builtin/chat/content/composer.tsx +46 -4
- package/src/plugins/builtin/chat/content/footer.tsx +46 -8
- package/src/plugins/builtin/chat/content/index.tsx +263 -62
- package/src/plugins/builtin/chat/content/layout-metrics.ts +10 -2
- package/src/plugins/builtin/chat/content/open-targets.ts +17 -3
- package/src/plugins/builtin/chat/content/scroll.ts +7 -1
- package/src/plugins/builtin/chat/content/shortcuts.ts +36 -11
- package/src/plugins/builtin/chat/content/snapshot.ts +3 -0
- package/src/plugins/builtin/chat/content/transcript.tsx +17 -1
- package/src/plugins/builtin/chat/content/types.ts +7 -0
- package/src/plugins/builtin/chat/controller/attachments.ts +213 -0
- package/src/plugins/builtin/chat/controller/connections.ts +3 -1
- package/src/plugins/builtin/chat/controller/index.ts +114 -2
- package/src/plugins/builtin/chat/controller/lifecycle.ts +9 -0
- package/src/plugins/builtin/chat/controller/messages.ts +35 -2
- package/src/plugins/builtin/chat/controller/send.ts +128 -25
- package/src/plugins/builtin/chat/controller/state.ts +12 -1
- package/src/plugins/builtin/chat/controller/utils.ts +7 -5
- package/src/plugins/builtin/chat/controller/view.ts +2 -0
- package/src/plugins/builtin/chat/index.tsx +21 -0
- package/src/plugins/builtin/chat/layout.ts +9 -4
- package/src/plugins/builtin/chat/message/desktop.tsx +55 -20
- package/src/plugins/builtin/chat/message/header.tsx +30 -5
- package/src/plugins/builtin/chat/message/inline-tokens.tsx +9 -0
- package/src/plugins/builtin/chat/message/pending-send.ts +35 -0
- package/src/plugins/builtin/chat/message/profile-popover.tsx +5 -1
- package/src/plugins/builtin/chat/message/render-state.ts +12 -2
- package/src/plugins/builtin/chat/message/terminal.tsx +51 -4
- package/src/plugins/builtin/chat/message/types.ts +6 -1
- package/src/plugins/builtin/chat/pane-state.ts +59 -1
- package/src/plugins/builtin/chat/profile-popover.ts +50 -1
- package/src/plugins/builtin/chat/sidebar.tsx +8 -3
- package/src/plugins/builtin/chat/status-widget.tsx +29 -12
- package/src/plugins/builtin/chat/unread-inbox-pane.tsx +143 -0
- package/src/plugins/builtin/chat/unread-inbox.ts +91 -0
- package/src/plugins/builtin/clinical-trials/client.ts +237 -0
- package/src/plugins/builtin/clinical-trials/index.tsx +74 -0
- package/src/plugins/builtin/clinical-trials/pane.tsx +225 -0
- package/src/plugins/builtin/clinical-trials/types.ts +2 -0
- package/src/plugins/builtin/cloud/askg/controller.ts +37 -6
- package/src/plugins/builtin/cloud/askg/executor.ts +59 -44
- package/src/plugins/builtin/cloud/askg/host.ts +8 -1
- package/src/plugins/builtin/cloud/askg/manifest.ts +29 -2
- package/src/plugins/builtin/cloud/askg/model.ts +47 -13
- package/src/plugins/builtin/cloud/askg/notes.ts +100 -0
- package/src/plugins/builtin/cloud/askg/pane.tsx +50 -14
- package/src/plugins/builtin/cloud/askg/protocol.ts +39 -1
- package/src/plugins/builtin/cloud/askg/result-budget.ts +156 -0
- package/src/plugins/builtin/cloud/askg/user-data.ts +89 -0
- package/src/plugins/builtin/cloud/auth-actions.tsx +55 -31
- package/src/plugins/builtin/cloud/plugin.tsx +4 -1
- package/src/plugins/builtin/cloud/team/pane-sections.tsx +10 -1
- package/src/plugins/builtin/cloud/team/pane.tsx +3 -2
- package/src/plugins/builtin/cloud/thesis/board-pane.tsx +2 -2
- package/src/plugins/builtin/cloud/thesis/detail.tsx +1 -1
- package/src/plugins/builtin/cloud/thesis/ticker-tab.tsx +2 -2
- package/src/plugins/builtin/cloud/trial-offer-status-widget.tsx +202 -0
- package/src/plugins/builtin/cloud/upgrade-command.ts +1 -1
- package/src/plugins/builtin/cloud/upgrade-dialog.tsx +29 -3
- package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +1 -1
- package/src/plugins/builtin/cloud-tweets/table.tsx +1 -1
- package/src/plugins/builtin/comment-letters/client.ts +342 -0
- package/src/plugins/builtin/comment-letters/index.tsx +74 -0
- package/src/plugins/builtin/comment-letters/pane.tsx +295 -0
- package/src/plugins/builtin/comment-letters/types.ts +43 -0
- package/src/plugins/builtin/company-attention/app-rank.tsx +79 -0
- package/src/plugins/builtin/company-attention/client.ts +69 -0
- package/src/plugins/builtin/company-attention/evidence.ts +45 -0
- package/src/plugins/builtin/company-attention/headless.ts +47 -0
- package/src/plugins/builtin/company-attention/index.tsx +30 -0
- package/src/plugins/builtin/company-attention/model.ts +129 -0
- package/src/plugins/builtin/company-attention/pane.tsx +183 -0
- package/src/plugins/builtin/company-kpis/client.ts +92 -0
- package/src/plugins/builtin/company-kpis/headless.ts +32 -0
- package/src/plugins/builtin/company-kpis/index.tsx +26 -0
- package/src/plugins/builtin/company-kpis/model.ts +124 -0
- package/src/plugins/builtin/company-kpis/pane.tsx +226 -0
- package/src/plugins/builtin/company-kpis/related.ts +11 -0
- package/src/plugins/builtin/company-kpis/screenshot-evidence.ts +44 -0
- package/src/plugins/builtin/composite-plugins.ts +32 -0
- package/src/plugins/builtin/correlation/history.ts +4 -1
- package/src/plugins/builtin/correlation/index.tsx +139 -80
- package/src/plugins/builtin/correlation/matrix/pair-chart.tsx +48 -0
- package/src/plugins/builtin/correlation/matrix/selection.ts +77 -0
- package/src/plugins/builtin/correlation/relationship/model.ts +2 -2
- package/src/plugins/builtin/cpi/client.ts +66 -0
- package/src/plugins/builtin/cpi/headless.ts +78 -0
- package/src/plugins/builtin/cpi/index.tsx +31 -0
- package/src/plugins/builtin/cpi/model.ts +198 -0
- package/src/plugins/builtin/cpi/pane.tsx +157 -0
- package/src/plugins/builtin/credit-documents/client.ts +99 -0
- package/src/plugins/builtin/credit-documents/detail.tsx +109 -0
- package/src/plugins/builtin/credit-documents/evidence.ts +64 -0
- package/src/plugins/builtin/credit-documents/gauge.tsx +55 -0
- package/src/plugins/builtin/credit-documents/headless.ts +40 -0
- package/src/plugins/builtin/credit-documents/index.tsx +19 -0
- package/src/plugins/builtin/credit-documents/model.ts +336 -0
- package/src/plugins/builtin/credit-documents/pane.tsx +185 -0
- package/src/plugins/builtin/custom-view/view-spec.ts +14 -2
- package/src/plugins/builtin/debt-maturities/pane.tsx +1 -0
- package/src/plugins/builtin/dividend-yield/pane.tsx +1 -1
- package/src/plugins/builtin/earnings/board.tsx +3 -0
- package/src/plugins/builtin/earnings/index.tsx +2 -0
- package/src/plugins/builtin/earnings-calls/pane.tsx +7 -1
- package/src/plugins/builtin/earnings-ripple/client.ts +60 -0
- package/src/plugins/builtin/earnings-ripple/headless.ts +35 -0
- package/src/plugins/builtin/earnings-ripple/index.tsx +35 -0
- package/src/plugins/builtin/earnings-ripple/model.ts +98 -0
- package/src/plugins/builtin/earnings-ripple/pane.tsx +103 -0
- package/src/plugins/builtin/equity-screener/client.ts +1 -1
- package/src/plugins/builtin/equity-screener/criterion-editor.tsx +1 -1
- package/src/plugins/builtin/equity-screener/model.ts +74 -9
- package/src/plugins/builtin/equity-screener/pane.tsx +2 -0
- package/src/plugins/builtin/estimate-revisions/pane.tsx +3 -0
- package/src/plugins/builtin/executives/pane.tsx +3 -1
- package/src/plugins/builtin/exposure/charts.tsx +66 -0
- package/src/plugins/builtin/exposure/client.ts +53 -0
- package/src/plugins/builtin/exposure/drivers.ts +29 -0
- package/src/plugins/builtin/exposure/editor.tsx +61 -0
- package/src/plugins/builtin/exposure/evidence.ts +39 -0
- package/src/plugins/builtin/exposure/headless.ts +51 -0
- package/src/plugins/builtin/exposure/holdings.ts +56 -0
- package/src/plugins/builtin/exposure/index.tsx +13 -0
- package/src/plugins/builtin/exposure/model.ts +104 -0
- package/src/plugins/builtin/exposure/pane.tsx +247 -0
- package/src/plugins/builtin/fear-greed/pane.tsx +2 -9
- package/src/plugins/builtin/filing-events/pane.tsx +2 -1
- package/src/plugins/builtin/gpu/board.tsx +163 -0
- package/src/plugins/builtin/gpu/changes.tsx +94 -0
- package/src/plugins/builtin/gpu/client.ts +130 -0
- package/src/plugins/builtin/gpu/equities.tsx +112 -0
- package/src/plugins/builtin/gpu/headless.ts +67 -0
- package/src/plugins/builtin/gpu/history.tsx +140 -0
- package/src/plugins/builtin/gpu/index.tsx +18 -0
- package/src/plugins/builtin/gpu/ladder.tsx +127 -0
- package/src/plugins/builtin/gpu/model.ts +317 -0
- package/src/plugins/builtin/gpu/pane.tsx +63 -0
- package/src/plugins/builtin/help/index.tsx +19 -2
- package/src/plugins/builtin/holders/pane.tsx +4 -8
- package/src/plugins/builtin/insider/detail.tsx +119 -0
- package/src/plugins/builtin/insider/display.ts +221 -0
- package/src/plugins/builtin/insider/headless.ts +24 -3
- package/src/plugins/builtin/insider/index.tsx +206 -108
- package/src/plugins/builtin/insider/insider-data.ts +31 -3
- package/src/plugins/builtin/insider/model.ts +53 -4
- package/src/plugins/builtin/insider/table-model.ts +226 -0
- package/src/plugins/builtin/insider/table.tsx +79 -0
- package/src/plugins/builtin/iv-history/screen-pane.tsx +1 -1
- package/src/plugins/builtin/jobs/pane.tsx +14 -7
- package/src/plugins/builtin/macro-day/client.ts +50 -0
- package/src/plugins/builtin/macro-day/headless.ts +51 -0
- package/src/plugins/builtin/macro-day/index.tsx +21 -0
- package/src/plugins/builtin/macro-day/model.ts +137 -0
- package/src/plugins/builtin/macro-day/pane.tsx +118 -0
- package/src/plugins/builtin/macro-day/releases.ts +58 -0
- package/src/plugins/builtin/market-halts/model.ts +30 -17
- package/src/plugins/builtin/market-halts/pane.tsx +15 -21
- package/src/plugins/builtin/market-heatmap/data.ts +1 -1
- package/src/plugins/builtin/market-heatmap/index.tsx +198 -50
- package/src/plugins/builtin/market-heatmap/portfolio.ts +220 -0
- package/src/plugins/builtin/market-movers/index.tsx +1 -0
- package/src/plugins/builtin/market-movers/session-body.tsx +5 -2
- package/src/plugins/builtin/mna/distress/client.ts +326 -0
- package/src/plugins/builtin/mna/distress/detail.tsx +247 -0
- package/src/plugins/builtin/mna/distress/headless.ts +257 -0
- package/src/plugins/builtin/mna/distress/model.ts +427 -0
- package/src/plugins/builtin/mna/distress/pane.tsx +606 -0
- package/src/plugins/builtin/mna/index.tsx +15 -0
- package/src/plugins/builtin/mna/pane.tsx +42 -1
- package/src/plugins/builtin/news/index.tsx +62 -16
- package/src/plugins/builtin/news/wire/filter-articles.ts +54 -0
- package/src/plugins/builtin/news/wire/index.tsx +37 -3
- package/src/plugins/builtin/news/wire/industry-pane.tsx +29 -13
- package/src/plugins/builtin/news/wire/mutes.ts +253 -0
- package/src/plugins/builtin/news/wire/news/command-bar-search.ts +117 -0
- package/src/plugins/builtin/news/wire/news/footer.ts +4 -0
- package/src/plugins/builtin/news/wire/news/list-search.ts +34 -0
- package/src/plugins/builtin/news/wire/news/pop-out.tsx +158 -0
- package/src/plugins/builtin/news/wire/news/preset-pane.tsx +64 -19
- package/src/plugins/builtin/openfda/client.ts +300 -0
- package/src/plugins/builtin/openfda/index.tsx +71 -0
- package/src/plugins/builtin/openfda/pane.tsx +382 -0
- package/src/plugins/builtin/openfda/types.ts +76 -0
- package/src/plugins/builtin/options/footer.ts +1 -0
- package/src/plugins/builtin/options-calculator/pane.tsx +0 -1
- package/src/plugins/builtin/options-positioning/index.tsx +4 -2
- package/src/plugins/builtin/options-positioning/pane.tsx +1 -1
- package/src/plugins/builtin/pe-band/client.ts +61 -0
- package/src/plugins/builtin/pe-band/headless.ts +51 -0
- package/src/plugins/builtin/pe-band/index.tsx +20 -0
- package/src/plugins/builtin/pe-band/model.ts +267 -0
- package/src/plugins/builtin/pe-band/pane.tsx +159 -0
- package/src/plugins/builtin/perps/client.ts +66 -0
- package/src/plugins/builtin/perps/equity-row.tsx +28 -0
- package/src/plugins/builtin/perps/headless.ts +34 -0
- package/src/plugins/builtin/perps/index.tsx +14 -0
- package/src/plugins/builtin/perps/model.ts +58 -0
- package/src/plugins/builtin/perps/pane.tsx +185 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +0 -1
- package/src/plugins/builtin/portfolio-list/cli/render.ts +177 -87
- package/src/plugins/builtin/portfolio-list/headless.ts +237 -0
- package/src/plugins/builtin/portfolio-list/index.tsx +2 -0
- package/src/plugins/builtin/portfolio-list/mutations.ts +17 -0
- package/src/plugins/builtin/portfolio-list/pane/data.ts +17 -0
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +88 -5
- package/src/plugins/builtin/portfolio-list/pane/remove-ticker.ts +85 -0
- package/src/plugins/builtin/portfolio-list/pane/streaming.ts +18 -12
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +6 -0
- package/src/plugins/builtin/power/client.ts +100 -0
- package/src/plugins/builtin/power/detail.tsx +82 -0
- package/src/plugins/builtin/power/evidence.ts +56 -0
- package/src/plugins/builtin/power/generation.tsx +37 -0
- package/src/plugins/builtin/power/headless.ts +43 -0
- package/src/plugins/builtin/power/index.tsx +16 -0
- package/src/plugins/builtin/power/model.ts +89 -0
- package/src/plugins/builtin/power/pane.tsx +209 -0
- package/src/plugins/builtin/power/query.ts +25 -0
- package/src/plugins/builtin/relative-rotation/pane.tsx +3 -3
- package/src/plugins/builtin/research/analyst-pane.tsx +1 -1
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +13 -4
- package/src/plugins/builtin/research/equity-diagnostic-pane.tsx +5 -3
- package/src/plugins/builtin/research-search/pane.tsx +21 -7
- package/src/plugins/builtin/revenue-breakdown/pane.tsx +1 -1
- package/src/plugins/builtin/reverse-dcf/client.ts +35 -0
- package/src/plugins/builtin/reverse-dcf/headless.ts +44 -0
- package/src/plugins/builtin/reverse-dcf/index.tsx +20 -0
- package/src/plugins/builtin/reverse-dcf/model.ts +87 -0
- package/src/plugins/builtin/reverse-dcf/pane.tsx +107 -0
- package/src/plugins/builtin/risk-factors/pane.tsx +2 -1
- package/src/plugins/builtin/scanner/denied.tsx +4 -2
- package/src/plugins/builtin/scanner/feed.ts +1 -0
- package/src/plugins/builtin/scanner/flow-pane.tsx +3 -2
- package/src/plugins/builtin/scanner/hilo-pane.tsx +1 -1
- package/src/plugins/builtin/seasonality/client.ts +4 -1
- package/src/plugins/builtin/sec/command-bar-search.ts +217 -0
- package/src/plugins/builtin/sec/forms.ts +54 -0
- package/src/plugins/builtin/sec/headless.ts +31 -5
- package/src/plugins/builtin/sec/index.tsx +67 -11
- package/src/plugins/builtin/sec/model.ts +35 -5
- package/src/plugins/builtin/sectors/headless.ts +1 -0
- package/src/plugins/builtin/sectors/index.tsx +72 -26
- package/src/plugins/builtin/shared/cloud-upgrade.ts +143 -39
- package/src/plugins/builtin/shared/pro-feature-wall.tsx +8 -4
- package/src/plugins/builtin/shared/research-cells.tsx +107 -0
- package/src/plugins/builtin/shared/series-list-detail.tsx +5 -1
- package/src/plugins/builtin/shared/wall-teaser-catalog.ts +80 -0
- package/src/plugins/builtin/shared/wall-teaser.tsx +192 -0
- package/src/plugins/builtin/shared/wall-view-lifecycle.ts +43 -0
- package/src/plugins/builtin/short-interest/index.tsx +31 -0
- package/src/plugins/builtin/short-interest/watch-client.ts +70 -0
- package/src/plugins/builtin/short-interest/watch-headless.ts +49 -0
- package/src/plugins/builtin/short-interest/watch-model.ts +185 -0
- package/src/plugins/builtin/short-interest/watch-pane.tsx +169 -0
- package/src/plugins/builtin/short-volume/pane.tsx +1 -1
- package/src/plugins/builtin/social-mentions/pane.tsx +1 -1
- package/src/plugins/builtin/supply-chain/client.ts +104 -0
- package/src/plugins/builtin/supply-chain/disclosure-quote.tsx +17 -0
- package/src/plugins/builtin/supply-chain/evidence.ts +88 -0
- package/src/plugins/builtin/supply-chain/flow-layout.ts +133 -0
- package/src/plugins/builtin/supply-chain/flow.tsx +323 -0
- package/src/plugins/builtin/supply-chain/graph-client.ts +83 -0
- package/src/plugins/builtin/supply-chain/graph-evidence.ts +25 -0
- package/src/plugins/builtin/supply-chain/graph-model.ts +45 -0
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +218 -0
- package/src/plugins/builtin/supply-chain/graph.tsx +163 -0
- package/src/plugins/builtin/supply-chain/headless.ts +105 -0
- package/src/plugins/builtin/supply-chain/index.tsx +17 -0
- package/src/plugins/builtin/supply-chain/model.ts +145 -0
- package/src/plugins/builtin/supply-chain/pane.tsx +276 -0
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +96 -0
- package/src/plugins/builtin/supply-chain/trust.ts +34 -0
- package/src/plugins/builtin/themes/client.ts +39 -0
- package/src/plugins/builtin/themes/headless.ts +38 -0
- package/src/plugins/builtin/themes/model.ts +92 -0
- package/src/plugins/builtin/themes/pane.tsx +125 -0
- package/src/plugins/builtin/thirteenf/pane.tsx +6 -15
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +5 -6
- package/src/plugins/builtin/ticker-detail/data-panes/returns-model.ts +201 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +327 -0
- package/src/plugins/builtin/ticker-detail/financials/period-end-history.ts +5 -2
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +18 -2
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +2 -1
- package/src/plugins/builtin/ticker-detail/headless.ts +7 -2
- package/src/plugins/builtin/ticker-detail/index.tsx +22 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +53 -30
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +2 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +111 -46
- package/src/plugins/builtin/ticker-detail/pane.tsx +50 -6
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +20 -41
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +3 -0
- package/src/plugins/builtin/time-sales/pane.tsx +1 -1
- package/src/plugins/builtin/world-indices/indices.ts +1 -0
- package/src/plugins/catalog-browser.ts +38 -0
- package/src/plugins/catalog-manifest.ts +3 -0
- package/src/plugins/catalog-ui.ts +6 -0
- package/src/plugins/current-target.ts +0 -9
- package/src/public/__snapshots__/public-api.test.ts.snap +1 -0
- package/src/renderers/browser/cloud-transport.ts +66 -1
- package/src/renderers/browser/main.tsx +2 -0
- package/src/renderers/dom/data-table/row.tsx +2 -0
- package/src/renderers/dom/desktop/controls.tsx +38 -25
- package/src/renderers/dom/desktop/icons.tsx +8 -0
- package/src/renderers/dom/host/chart-surface.tsx +36 -2
- package/src/renderers/dom/host/focus-scope.ts +11 -1
- package/src/renderers/dom/styles.css +28 -0
- package/src/renderers/electrobun/view/backend-rpc.ts +3 -2
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +1 -1
- package/src/renderers/electrobun/view/http-fetch.ts +2 -0
- package/src/renderers/electrobun/view/main.tsx +3 -1
- package/src/renderers/electrobun/view/rpc-timeout.ts +59 -0
- package/src/renderers/opentui/start.tsx +3 -0
- package/src/shares/api.ts +3 -1
- package/src/sources/sec-edgar/identity.ts +36 -0
- package/src/sources/sec-edgar.ts +1 -34
- package/src/state/app/context/index.tsx +8 -0
- package/src/sync/core-contributors.ts +2 -0
- package/src/telemetry/attention-counts.ts +164 -0
- package/src/telemetry/live-config.ts +7 -0
- package/src/test-support/rpc-loopback.ts +7 -3
- package/src/test-support/shell-pane-keys.tsx +34 -0
- package/src/tickers/instrument-kind.ts +12 -6
- package/src/tickers/search/asset-classes.ts +91 -0
- package/src/tickers/search/index.ts +18 -4
- package/src/tickers/search/ranking.ts +22 -3
- package/src/types/config.ts +23 -1
- package/src/types/headless.ts +17 -0
- package/src/ui/host.tsx +6 -0
- package/src/utils/double-escape-close.ts +20 -0
- package/src/utils/html-entities.ts +15 -0
- package/src/utils/http-proxy-response.ts +44 -7
- package/src/utils/plugin-proxy-hosts.json +3 -0
- package/src/utils/sec.ts +19 -1
- package/src/utils/text-wrap.ts +13 -8
package/src/api-client/chat.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
normalizeChatAttachments,
|
|
2
3
|
normalizeChatChannel,
|
|
3
4
|
normalizeChatMessage,
|
|
4
5
|
normalizeChatMessages,
|
|
5
6
|
normalizeChatState,
|
|
6
7
|
} from "./normalizers";
|
|
7
|
-
import type
|
|
8
|
+
import { CHAT_ATTACHMENTS_FEATURE, type CloudApiSocket } from "./socket";
|
|
8
9
|
import type {
|
|
10
|
+
ChatAttachment,
|
|
9
11
|
ChatChannel,
|
|
10
12
|
ChatChannelState,
|
|
11
13
|
ChatMessage,
|
|
@@ -16,26 +18,114 @@ import type { CloudApiRequest } from "./request";
|
|
|
16
18
|
type ChatNotificationListener = (notification: ChatNotification) => void;
|
|
17
19
|
type ChatPresenceListener = (onlineCount: number) => void;
|
|
18
20
|
|
|
21
|
+
/** REST requests list the protocol features this client reads, comma separated. */
|
|
22
|
+
const CHAT_FEATURES_HEADER = "X-Gloom-Features";
|
|
23
|
+
|
|
24
|
+
/** The bytes of one image to upload, with the type and name the picker or clipboard gave it. */
|
|
25
|
+
export interface ChatAttachmentUpload {
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
data: Blob | Uint8Array;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ChatAttachmentUploadOptions {
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
/** The fraction of the body sent, where the transport can tell. */
|
|
34
|
+
onProgress?: (fraction: number) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type CloudChatUpload = <T>(
|
|
38
|
+
path: string,
|
|
39
|
+
body: Blob | Uint8Array,
|
|
40
|
+
options: {
|
|
41
|
+
contentType: string;
|
|
42
|
+
headers?: HeadersInit;
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
onProgress?: (fraction: number) => void;
|
|
45
|
+
},
|
|
46
|
+
) => Promise<T>;
|
|
47
|
+
|
|
19
48
|
interface CloudChatApiOptions {
|
|
20
49
|
request: CloudApiRequest;
|
|
50
|
+
upload: CloudChatUpload;
|
|
21
51
|
socket: CloudApiSocket;
|
|
22
52
|
}
|
|
23
53
|
|
|
54
|
+
function withChatFeatures(options: RequestInit = {}): RequestInit {
|
|
55
|
+
const headers = new Headers(options.headers);
|
|
56
|
+
headers.set(CHAT_FEATURES_HEADER, CHAT_ATTACHMENTS_FEATURE);
|
|
57
|
+
return { ...options, headers };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** A server that knows images sends `attachments` on every message, empty or not. */
|
|
61
|
+
function carriesAttachments(messages: readonly unknown[]): boolean {
|
|
62
|
+
return messages.some((message) => (
|
|
63
|
+
!!message && typeof message === "object" && Array.isArray((message as { attachments?: unknown }).attachments)
|
|
64
|
+
));
|
|
65
|
+
}
|
|
66
|
+
|
|
24
67
|
export class CloudChatApi {
|
|
68
|
+
/** Set once a REST answer showed the server knows images, whatever the socket said. */
|
|
69
|
+
private restAttachmentSupport = false;
|
|
70
|
+
private readonly attachmentSupportListeners = new Set<() => void>();
|
|
71
|
+
private unsubscribeServerFeatures: (() => void) | null = null;
|
|
72
|
+
private announcedSupport = false;
|
|
73
|
+
|
|
25
74
|
constructor(private readonly options: CloudChatApiOptions) {}
|
|
26
75
|
|
|
76
|
+
private request<T>(path: string, options?: RequestInit): Promise<T> {
|
|
77
|
+
return this.options.request<T>(path, withChatFeatures(options));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Whether the server takes images: its socket "ready" frame offered
|
|
82
|
+
* chat.attachments, or a REST answer carried them. Until then the client
|
|
83
|
+
* keeps to text, so an older server never sees an upload.
|
|
84
|
+
*/
|
|
85
|
+
attachmentsSupported(): boolean {
|
|
86
|
+
return this.restAttachmentSupport || this.options.socket.serverOffers(CHAT_ATTACHMENTS_FEATURE);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
subscribeAttachmentSupport(listener: () => void): () => void {
|
|
90
|
+
if (this.attachmentSupportListeners.size === 0) this.announcedSupport = this.attachmentsSupported();
|
|
91
|
+
this.attachmentSupportListeners.add(listener);
|
|
92
|
+
this.unsubscribeServerFeatures ??= this.options.socket.subscribeServerFeatures(() => {
|
|
93
|
+
this.emitAttachmentSupport();
|
|
94
|
+
});
|
|
95
|
+
return () => {
|
|
96
|
+
this.attachmentSupportListeners.delete(listener);
|
|
97
|
+
if (this.attachmentSupportListeners.size > 0) return;
|
|
98
|
+
this.unsubscribeServerFeatures?.();
|
|
99
|
+
this.unsubscribeServerFeatures = null;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
private emitAttachmentSupport(): void {
|
|
104
|
+
const supported = this.attachmentsSupported();
|
|
105
|
+
if (supported === this.announcedSupport) return;
|
|
106
|
+
this.announcedSupport = supported;
|
|
107
|
+
for (const listener of this.attachmentSupportListeners) listener();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private noteMessages(messages: readonly unknown[]): void {
|
|
111
|
+
if (this.restAttachmentSupport || !carriesAttachments(messages)) return;
|
|
112
|
+
this.restAttachmentSupport = true;
|
|
113
|
+
this.emitAttachmentSupport();
|
|
114
|
+
}
|
|
115
|
+
|
|
27
116
|
async getChannels(): Promise<ChatChannel[]> {
|
|
28
117
|
const channels =
|
|
29
|
-
await this.
|
|
118
|
+
await this.request<ChatChannel[]>("/chat/channels");
|
|
30
119
|
return channels.map((channel) => normalizeChatChannel(channel));
|
|
31
120
|
}
|
|
32
121
|
|
|
33
122
|
async getPresence(): Promise<{ onlineCount: number }> {
|
|
34
|
-
return this.
|
|
123
|
+
return this.request<{ onlineCount: number }>("/chat/presence");
|
|
35
124
|
}
|
|
36
125
|
|
|
37
126
|
async getState(): Promise<ChatStateResponse> {
|
|
38
|
-
const state = await this.
|
|
127
|
+
const state = await this.request<ChatStateResponse>("/chat/state");
|
|
128
|
+
this.noteMessages((state.notifications ?? []).map((notification) => notification?.message));
|
|
39
129
|
return normalizeChatState(state);
|
|
40
130
|
}
|
|
41
131
|
|
|
@@ -43,7 +133,7 @@ export class CloudChatApi {
|
|
|
43
133
|
channelId: string,
|
|
44
134
|
body: { notificationsEnabled?: boolean; readThroughMessageId?: string },
|
|
45
135
|
): Promise<ChatChannelState> {
|
|
46
|
-
return this.
|
|
136
|
+
return this.request<ChatChannelState>(
|
|
47
137
|
`/chat/channels/${channelId}/state`,
|
|
48
138
|
{
|
|
49
139
|
method: "PATCH",
|
|
@@ -55,7 +145,7 @@ export class CloudChatApi {
|
|
|
55
145
|
async markNotificationsDelivered(
|
|
56
146
|
notificationIds: string[],
|
|
57
147
|
): Promise<{ delivered: number }> {
|
|
58
|
-
return this.
|
|
148
|
+
return this.request<{ delivered: number }>(
|
|
59
149
|
"/chat/notifications/delivered",
|
|
60
150
|
{
|
|
61
151
|
method: "POST",
|
|
@@ -68,7 +158,7 @@ export class CloudChatApi {
|
|
|
68
158
|
userId?: string;
|
|
69
159
|
username?: string;
|
|
70
160
|
}): Promise<ChatChannel> {
|
|
71
|
-
const channel = await this.
|
|
161
|
+
const channel = await this.request<ChatChannel>("/chat/direct", {
|
|
72
162
|
method: "POST",
|
|
73
163
|
body: JSON.stringify(target),
|
|
74
164
|
});
|
|
@@ -80,7 +170,7 @@ export class CloudChatApi {
|
|
|
80
170
|
usernames?: string[];
|
|
81
171
|
name?: string;
|
|
82
172
|
}): Promise<ChatChannel> {
|
|
83
|
-
const channel = await this.
|
|
173
|
+
const channel = await this.request<ChatChannel>("/chat/groups", {
|
|
84
174
|
method: "POST",
|
|
85
175
|
body: JSON.stringify(body),
|
|
86
176
|
});
|
|
@@ -96,25 +186,58 @@ export class CloudChatApi {
|
|
|
96
186
|
if (opts?.before) params.set("before", opts.before);
|
|
97
187
|
if (opts?.limit) params.set("limit", String(opts.limit));
|
|
98
188
|
const qs = params.toString();
|
|
99
|
-
const messages = await this.
|
|
189
|
+
const messages = await this.request<ChatMessage[]>(
|
|
100
190
|
`/chat/channels/${channelId}/messages${qs ? `?${qs}` : ""}`,
|
|
101
191
|
);
|
|
192
|
+
this.noteMessages(messages);
|
|
102
193
|
return normalizeChatMessages(messages);
|
|
103
194
|
}
|
|
104
195
|
|
|
196
|
+
/**
|
|
197
|
+
* Uploads one image to a channel ahead of the message that shows it. The
|
|
198
|
+
* answer describes the stored copy (it may be smaller, or WebP) and its `id`
|
|
199
|
+
* goes into `sendMessage`'s `attachmentIds`.
|
|
200
|
+
*/
|
|
201
|
+
async uploadAttachment(
|
|
202
|
+
channelId: string,
|
|
203
|
+
upload: ChatAttachmentUpload,
|
|
204
|
+
options: ChatAttachmentUploadOptions = {},
|
|
205
|
+
): Promise<ChatAttachment> {
|
|
206
|
+
const stored = await this.options.upload<ChatAttachment>(
|
|
207
|
+
`/chat/channels/${channelId}/attachments`,
|
|
208
|
+
upload.data,
|
|
209
|
+
{
|
|
210
|
+
contentType: upload.type || "application/octet-stream",
|
|
211
|
+
headers: { [CHAT_FEATURES_HEADER]: CHAT_ATTACHMENTS_FEATURE },
|
|
212
|
+
signal: options.signal,
|
|
213
|
+
onProgress: options.onProgress,
|
|
214
|
+
},
|
|
215
|
+
);
|
|
216
|
+
const [attachment] = normalizeChatAttachments([stored]);
|
|
217
|
+
if (!attachment) throw new Error("The upload answer had no image.");
|
|
218
|
+
return attachment;
|
|
219
|
+
}
|
|
220
|
+
|
|
105
221
|
async sendMessage(
|
|
106
222
|
channelId: string,
|
|
107
223
|
content: string,
|
|
108
224
|
replyToId?: string,
|
|
109
225
|
clientMessageId?: string,
|
|
226
|
+
attachmentIds?: string[],
|
|
110
227
|
): Promise<ChatMessage> {
|
|
111
|
-
const message = await this.
|
|
228
|
+
const message = await this.request<ChatMessage>(
|
|
112
229
|
`/chat/channels/${channelId}/messages`,
|
|
113
230
|
{
|
|
114
231
|
method: "POST",
|
|
115
|
-
body: JSON.stringify({
|
|
232
|
+
body: JSON.stringify({
|
|
233
|
+
content,
|
|
234
|
+
replyToId,
|
|
235
|
+
clientMessageId,
|
|
236
|
+
...(attachmentIds?.length ? { attachmentIds } : {}),
|
|
237
|
+
}),
|
|
116
238
|
},
|
|
117
239
|
);
|
|
240
|
+
this.noteMessages([message]);
|
|
118
241
|
return normalizeChatMessage(message);
|
|
119
242
|
}
|
|
120
243
|
|
|
@@ -123,7 +246,7 @@ export class CloudChatApi {
|
|
|
123
246
|
messageId: string,
|
|
124
247
|
content: string,
|
|
125
248
|
): Promise<ChatMessage> {
|
|
126
|
-
const message = await this.
|
|
249
|
+
const message = await this.request<ChatMessage>(
|
|
127
250
|
`/chat/channels/${channelId}/messages/${messageId}`,
|
|
128
251
|
{
|
|
129
252
|
method: "PATCH",
|
|
@@ -142,8 +265,8 @@ export class CloudChatApi {
|
|
|
142
265
|
channelId,
|
|
143
266
|
onMessage,
|
|
144
267
|
onError,
|
|
145
|
-
(content, replyToId, clientMessageId) =>
|
|
146
|
-
this.sendMessage(channelId, content, replyToId, clientMessageId),
|
|
268
|
+
(content, replyToId, clientMessageId, attachmentIds) =>
|
|
269
|
+
this.sendMessage(channelId, content, replyToId, clientMessageId, attachmentIds),
|
|
147
270
|
);
|
|
148
271
|
}
|
|
149
272
|
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
type QuoteMatchMode = "exact" | "whitespace" | "nfkc_whitespace";
|
|
2
|
+
|
|
3
|
+
type KpiBasis = "reported" | "adjusted" | "constant_currency" | "organic"
|
|
4
|
+
export type KpiUnit = "currency" | "currency_per_share" | "currency_per_unit" | "percent" | "basis_points" | "count" | "ratio" | "volume"
|
|
5
|
+
type KpiSourceKind = "press_release" | "filing" | "transcript" | "opendart" | "ir" | "esef" | "edinet"
|
|
6
|
+
type GuidanceDirection = "raised" | "cut" | "reiterated" | "mixed" | "initiated" | "withdrawn" | "not_comparable"
|
|
7
|
+
type GuidanceHedge = "exact" | "approximately" | "at_least" | "at_most" | "greater_than" | "less_than" | "qualitative" | "withdrawn"
|
|
8
|
+
|
|
9
|
+
export interface KpiPeriod {
|
|
10
|
+
/** ISO dates; a quarter's dates must never be inferred from its fiscal label. */
|
|
11
|
+
start: string | null
|
|
12
|
+
end: string | null
|
|
13
|
+
kind: "quarter" | "half" | "year" | "ytd" | "instant" | "other"
|
|
14
|
+
fiscalYear: number | null
|
|
15
|
+
fiscalQuarter: number | null
|
|
16
|
+
label: string
|
|
17
|
+
}
|
|
18
|
+
interface KpiMetric {
|
|
19
|
+
id: string
|
|
20
|
+
name: string
|
|
21
|
+
sector: string
|
|
22
|
+
unit: KpiUnit
|
|
23
|
+
definition: string
|
|
24
|
+
aliases: Record<string, string[]>
|
|
25
|
+
/** Economic preference, independent of whether the numeric guide was raised. */
|
|
26
|
+
favorable: "higher" | "lower" | "neutral"
|
|
27
|
+
}
|
|
28
|
+
export interface KpiEvidence {
|
|
29
|
+
id: string
|
|
30
|
+
documentId: string
|
|
31
|
+
sourceId: string
|
|
32
|
+
sourceKind: KpiSourceKind
|
|
33
|
+
url: string
|
|
34
|
+
title: string
|
|
35
|
+
publishedAt: string
|
|
36
|
+
country: string
|
|
37
|
+
language: string
|
|
38
|
+
quote: string
|
|
39
|
+
quoteOffset: number
|
|
40
|
+
quoteSourceLength: number
|
|
41
|
+
quoteMatchMode: QuoteMatchMode
|
|
42
|
+
confidence: number
|
|
43
|
+
}
|
|
44
|
+
interface KpiObservationInput {
|
|
45
|
+
metricId: string
|
|
46
|
+
period: KpiPeriod
|
|
47
|
+
value: number
|
|
48
|
+
valueQualifier?: "exact" | "approximately" | "at_least" | "at_most" | "greater_than" | "less_than"
|
|
49
|
+
unit: KpiUnit
|
|
50
|
+
currency: string | null
|
|
51
|
+
/** Scale of the supplied numeric value (1e6 means millions). Stored values use scale 1. */
|
|
52
|
+
scale?: number
|
|
53
|
+
basis: KpiBasis
|
|
54
|
+
/** Named segment, geography, product, cohort, denominator or physical volume unit. */
|
|
55
|
+
dimensions: Record<string, string>
|
|
56
|
+
quote: string
|
|
57
|
+
confidence: number
|
|
58
|
+
/** Required when an actual explicitly restates a prior disclosed observation. */
|
|
59
|
+
revisionReason?: string | null
|
|
60
|
+
}
|
|
61
|
+
interface KpiGuidanceInput extends Omit<KpiObservationInput, "value" | "valueQualifier"> {
|
|
62
|
+
issuedDate: string
|
|
63
|
+
low: number | null
|
|
64
|
+
high: number | null
|
|
65
|
+
point: number | null
|
|
66
|
+
hedge: GuidanceHedge
|
|
67
|
+
/** Exact source phrasing, including qualitative ranges and conditions. */
|
|
68
|
+
rangeText: string
|
|
69
|
+
conditions?: string | null
|
|
70
|
+
status: "active" | "withdrawn"
|
|
71
|
+
}
|
|
72
|
+
export interface KpiObservation extends Omit<KpiObservationInput, "quote" | "scale"> {
|
|
73
|
+
id: string
|
|
74
|
+
symbol: string
|
|
75
|
+
metric: KpiMetric
|
|
76
|
+
seriesKey: string
|
|
77
|
+
asOf: string
|
|
78
|
+
supersedesId: string | null
|
|
79
|
+
revision: number
|
|
80
|
+
current: boolean
|
|
81
|
+
conflict: boolean
|
|
82
|
+
contested?: boolean
|
|
83
|
+
evidence: KpiEvidence[]
|
|
84
|
+
}
|
|
85
|
+
export interface KpiGuidance extends Omit<KpiGuidanceInput, "quote" | "scale"> {
|
|
86
|
+
id: string
|
|
87
|
+
symbol: string
|
|
88
|
+
metric: KpiMetric
|
|
89
|
+
seriesKey: string
|
|
90
|
+
asOf: string
|
|
91
|
+
supersedesId: string | null
|
|
92
|
+
revision: number
|
|
93
|
+
current: boolean
|
|
94
|
+
evidence: KpiEvidence[]
|
|
95
|
+
direction: GuidanceDirection
|
|
96
|
+
previousId: string | null
|
|
97
|
+
midpointChangePct: number | null
|
|
98
|
+
actual: { observationId: string; value: number; outcome: "above" | "below" | "within"; favorable: "beat" | "miss" | "in_line" | "neutral"; difference: number; differencePct: number | null } | null
|
|
99
|
+
}
|
|
100
|
+
interface KpiCoverage {
|
|
101
|
+
country: string | null
|
|
102
|
+
languages: string[]
|
|
103
|
+
documents: number
|
|
104
|
+
observations: number
|
|
105
|
+
guidance: number
|
|
106
|
+
firstPeriod: string | null
|
|
107
|
+
lastPeriod: string | null
|
|
108
|
+
lastPublishedAt: string | null
|
|
109
|
+
sourceKinds: KpiSourceKind[]
|
|
110
|
+
conflicts: number
|
|
111
|
+
}
|
|
112
|
+
export interface KpiSeries {
|
|
113
|
+
key: string
|
|
114
|
+
metric: KpiMetric
|
|
115
|
+
unit: KpiUnit
|
|
116
|
+
currency: string | null
|
|
117
|
+
basis: KpiBasis
|
|
118
|
+
dimensions: Record<string, string>
|
|
119
|
+
latest: KpiObservation
|
|
120
|
+
observations: KpiObservation[]
|
|
121
|
+
}
|
|
122
|
+
export interface KpisPayload {
|
|
123
|
+
symbol: string
|
|
124
|
+
status: "available" | "unavailable"
|
|
125
|
+
asOf: string | null
|
|
126
|
+
coverage: KpiCoverage
|
|
127
|
+
series: KpiSeries[]
|
|
128
|
+
/** Immutable prior actuals, including unresolved conflicting disclosures. */
|
|
129
|
+
revisions: KpiObservation[]
|
|
130
|
+
dictionary: KpiMetric[]
|
|
131
|
+
access: "full" | "preview"
|
|
132
|
+
lockedRows: number
|
|
133
|
+
totalRows: number
|
|
134
|
+
truncated: boolean
|
|
135
|
+
previewRows: number | null
|
|
136
|
+
methodology: string
|
|
137
|
+
}
|
|
138
|
+
export interface GuidancePayload extends Omit<KpisPayload, "series" | "revisions"> {
|
|
139
|
+
guidance: KpiGuidance[]
|
|
140
|
+
history: KpiGuidance[]
|
|
141
|
+
}
|
|
142
|
+
export interface KpiQueryOptions {
|
|
143
|
+
metric?: string
|
|
144
|
+
basis?: KpiBasis
|
|
145
|
+
from?: string
|
|
146
|
+
to?: string
|
|
147
|
+
/** Point-in-time publication cutoff; excludes later restatements and actuals. */
|
|
148
|
+
asOf?: string
|
|
149
|
+
}
|
|
150
|
+
export function companyDisclosurePath(section: "kpis" | "guidance", symbol: string, options: KpiQueryOptions): string {
|
|
151
|
+
const query = new URLSearchParams(Object.entries(options).filter((entry): entry is [string, string] => entry[1] != null));
|
|
152
|
+
return `/cloud/company-${section}/${encodeURIComponent(symbol)}?${query}`;
|
|
153
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** US consumer prices by component, as GET /cloud/cpi/board serves them. */
|
|
2
|
+
|
|
3
|
+
export interface CpiRow {
|
|
4
|
+
id: string;
|
|
5
|
+
/** BLS item code; null for a row computed from two published ones (services ex shelter). */
|
|
6
|
+
code: string | null;
|
|
7
|
+
label: string;
|
|
8
|
+
/** 0 at the top level. */
|
|
9
|
+
depth: number;
|
|
10
|
+
parent: string | null;
|
|
11
|
+
/** All items and core, which stay on top whatever the sort. */
|
|
12
|
+
pinned: boolean;
|
|
13
|
+
derived: boolean;
|
|
14
|
+
/** Relative importance of the month before, percent of all items. */
|
|
15
|
+
weight: number | null;
|
|
16
|
+
/** Seasonally adjusted change on the month, percent. */
|
|
17
|
+
change: number | null;
|
|
18
|
+
/** Seasonally adjusted change over three and six months, annualised, percent. */
|
|
19
|
+
annualized3m: number | null;
|
|
20
|
+
annualized6m: number | null;
|
|
21
|
+
/** Unadjusted change over twelve months, percent. */
|
|
22
|
+
yoy: number | null;
|
|
23
|
+
/** Effect on the headline's monthly change, percentage points. */
|
|
24
|
+
contribution: number | null;
|
|
25
|
+
/** Effect on the headline's twelve-month change, percentage points. */
|
|
26
|
+
contributionYoy: number | null;
|
|
27
|
+
/** One plain sentence worked out from the numbers. */
|
|
28
|
+
read: string | null;
|
|
29
|
+
/** [YYYY-MM, change on the month, change over twelve months], oldest first. */
|
|
30
|
+
history: Array<[string, number | null, number | null]>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface CpiReleaseStatus {
|
|
34
|
+
/** The month the board covers, YYYY-MM. */
|
|
35
|
+
period: string | null;
|
|
36
|
+
releasedAt: string | null;
|
|
37
|
+
/** The month the weights refer to, YYYY-MM. */
|
|
38
|
+
weightsPeriod: string | null;
|
|
39
|
+
nextPeriod: string | null;
|
|
40
|
+
nextReleaseAt: string | null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CpiBoardPayload {
|
|
44
|
+
source: "BLS";
|
|
45
|
+
generatedAt: string;
|
|
46
|
+
/** When the index levels were last retrieved. */
|
|
47
|
+
retrievedAt: string | null;
|
|
48
|
+
status: "available" | "partial" | "unavailable";
|
|
49
|
+
gaps: string[];
|
|
50
|
+
release: CpiReleaseStatus;
|
|
51
|
+
rows: CpiRow[];
|
|
52
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export type CreditValue = string | number | boolean | null | CreditValue[] | { [key: string]: CreditValue };
|
|
2
|
+
export interface CreditFact {
|
|
3
|
+
id: string;
|
|
4
|
+
instrumentId: string;
|
|
5
|
+
documentId: string;
|
|
6
|
+
instrumentKey: string;
|
|
7
|
+
instrumentName: string;
|
|
8
|
+
field: string;
|
|
9
|
+
factKey: string;
|
|
10
|
+
value: CreditValue;
|
|
11
|
+
unit: string | null;
|
|
12
|
+
currency: string | null;
|
|
13
|
+
asOf: string;
|
|
14
|
+
confidence: number;
|
|
15
|
+
quote: string;
|
|
16
|
+
source: string;
|
|
17
|
+
filingUrl: string;
|
|
18
|
+
form: string;
|
|
19
|
+
filedAt: string;
|
|
20
|
+
periodEnd: string | null;
|
|
21
|
+
effectiveDate?: string | null;
|
|
22
|
+
language: string;
|
|
23
|
+
quoteOffset: number;
|
|
24
|
+
quoteSourceLength: number;
|
|
25
|
+
quoteMatchMode: string;
|
|
26
|
+
status: "active" | "superseded" | "pending";
|
|
27
|
+
supersedesId: string | null;
|
|
28
|
+
}
|
|
29
|
+
export interface CreditInstrument {
|
|
30
|
+
lifecycle?: string | null;
|
|
31
|
+
id: string;
|
|
32
|
+
key: string;
|
|
33
|
+
name: string;
|
|
34
|
+
currency: string | null;
|
|
35
|
+
facilityType: string | null;
|
|
36
|
+
principal: number | null;
|
|
37
|
+
commitment: number | null;
|
|
38
|
+
drawn: number | null;
|
|
39
|
+
maturity: string | null;
|
|
40
|
+
facts: CreditFact[];
|
|
41
|
+
history?: CreditFact[];
|
|
42
|
+
}
|
|
43
|
+
export interface CreditHeadroom {
|
|
44
|
+
id: string;
|
|
45
|
+
instrumentId: string;
|
|
46
|
+
instrumentName: string;
|
|
47
|
+
metric: string;
|
|
48
|
+
comparator: "maximum" | "minimum";
|
|
49
|
+
inclusive?: boolean;
|
|
50
|
+
threshold: number;
|
|
51
|
+
current: number | null;
|
|
52
|
+
headroomPercent: number | null;
|
|
53
|
+
asOf: string;
|
|
54
|
+
testDate: string | null;
|
|
55
|
+
status: "compliant" | "breach" | "uncomputable" | "stale" | "conditional";
|
|
56
|
+
reason: string | null;
|
|
57
|
+
evidenceIds: string[];
|
|
58
|
+
}
|
|
59
|
+
export interface CreditMaturityBucket {
|
|
60
|
+
year: number;
|
|
61
|
+
currency: string;
|
|
62
|
+
principal: number;
|
|
63
|
+
instruments: Array<{ id: string; name: string; principal: number; evidenceIds: string[] }>;
|
|
64
|
+
}
|
|
65
|
+
interface CreditControlExposure {
|
|
66
|
+
instrumentId: string;
|
|
67
|
+
instrumentName: string;
|
|
68
|
+
currency: string | null;
|
|
69
|
+
principal: number | null;
|
|
70
|
+
trigger: string;
|
|
71
|
+
putPercent: number | null;
|
|
72
|
+
evidenceIds: string[];
|
|
73
|
+
}
|
|
74
|
+
export interface CreditDocumentsPayload {
|
|
75
|
+
version: 1;
|
|
76
|
+
symbol: string;
|
|
77
|
+
issuer: { id: string; name: string; jurisdiction: string } | null;
|
|
78
|
+
status: "available" | "partial" | "unavailable";
|
|
79
|
+
asOf: string | null;
|
|
80
|
+
access: "full" | "preview";
|
|
81
|
+
lockedRows: number;
|
|
82
|
+
instruments: CreditInstrument[];
|
|
83
|
+
covenants: CreditHeadroom[];
|
|
84
|
+
maturities: CreditMaturityBucket[];
|
|
85
|
+
changeOfControl: CreditControlExposure[];
|
|
86
|
+
warnings: string[];
|
|
87
|
+
}
|
|
88
|
+
export interface CreditScreenRow {
|
|
89
|
+
symbol: string;
|
|
90
|
+
issuerName: string;
|
|
91
|
+
instrumentId: string;
|
|
92
|
+
instrumentName: string;
|
|
93
|
+
kind: "headroom" | "springing_maturity";
|
|
94
|
+
value: number | null;
|
|
95
|
+
date: string | null;
|
|
96
|
+
currency: string | null;
|
|
97
|
+
reason: string;
|
|
98
|
+
evidence: CreditFact[];
|
|
99
|
+
}
|
|
100
|
+
export interface CreditScreenPayload {
|
|
101
|
+
truncated: boolean;
|
|
102
|
+
rows: CreditScreenRow[];
|
|
103
|
+
access: "full" | "preview";
|
|
104
|
+
lockedRows: number;
|
|
105
|
+
asOf: string | null;
|
|
106
|
+
}
|
|
107
|
+
export interface CreditScreenQuery { headroomBelow?: number; springingWithinMonths?: number; limit?: number }
|