gloomberb 0.19.6 → 0.20.1
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/LICENSE +0 -4
- package/package.json +6 -5
- package/patches/electrobun-devkit@2.0.5.patch +408 -0
- package/src/api-client/bond-trades.ts +59 -0
- package/src/api-client/crypto-markets.ts +20 -2
- package/src/api-client/data.ts +21 -0
- package/src/api-client/fund-facts.ts +23 -1
- package/src/api-client/index.ts +2 -0
- package/src/api-client/types/account.ts +86 -0
- package/src/api-client/types/assist.ts +32 -0
- package/src/api-client/types/auth.ts +63 -0
- package/src/api-client/types/billing.ts +54 -0
- package/src/api-client/types/chat.ts +180 -0
- package/src/api-client/types/congress.ts +107 -0
- package/src/api-client/types/credit.ts +110 -0
- package/src/api-client/types/econ.ts +158 -0
- package/src/api-client/types/equity-diagnostic.ts +73 -0
- package/src/api-client/types/filings-and-calls.ts +356 -0
- package/src/api-client/types/index.ts +25 -0
- package/src/api-client/types/jobs.ts +147 -0
- package/src/api-client/types/market.ts +122 -0
- package/src/api-client/types/news.ts +91 -0
- package/src/api-client/types/notes-and-theses.ts +172 -0
- package/src/api-client/types/quotes.ts +28 -0
- package/src/api-client/types/scanners.ts +125 -0
- package/src/api-client/types/screener.ts +65 -0
- package/src/api-client/types/search.ts +107 -0
- package/src/api-client/types/sync.ts +14 -0
- package/src/api-client/types/team-collections.ts +43 -0
- package/src/api-client/types/team-views.ts +32 -0
- package/src/api-client/types/teams.ts +135 -0
- package/src/api-client/types/ticker-data.ts +57 -0
- package/src/api-client/types/tweets.ts +59 -0
- package/src/api-client/types/world-venues.ts +23 -0
- package/src/app/runtime/desktop-deeplink.ts +41 -6
- package/src/app/runtime/plugin-seed.ts +119 -0
- package/src/app/runtime/startup.ts +45 -9
- package/src/app/star-prompt/status-line.tsx +1 -1
- package/src/app.tsx +2 -7
- package/src/architecture/ui-tokens-allowlist.json +0 -8
- package/src/cli/board-coins.ts +38 -5
- package/src/cli/commands/crypto-hints.ts +8 -1
- package/src/cli/commands/market.ts +29 -26
- package/src/cli/commands/overview.ts +13 -6
- package/src/cli/commands/ticker.ts +78 -18
- package/src/cli/company-name-hint.ts +19 -0
- package/src/cli/desktop-pane-shot-browser.ts +69 -3
- package/src/cli/entry.ts +10 -4
- package/src/cli/glossary.ts +25 -0
- package/src/cli/helpers.ts +4 -2
- package/src/cli/not-a-ticker.ts +26 -1
- package/src/cli/pane-functions/catalog.ts +3 -1
- package/src/cli/pane-functions/freshness.ts +45 -29
- package/src/cli/pane-functions/market-session.ts +14 -5
- package/src/cli/restore-plugins.ts +164 -51
- package/src/components/chart/composite/use-composite-chart-keyboard.ts +11 -2
- package/src/components/chart-table/header.tsx +10 -1
- package/src/components/chart-table/layout.ts +14 -5
- package/src/components/command-bar/panel/index.tsx +13 -0
- package/src/components/command-bar/panel/layout.ts +7 -0
- package/src/components/command-bar/panel/runtime.ts +1 -0
- package/src/components/command-bar/panel/types.ts +2 -0
- package/src/components/data-table/export.ts +4 -1
- package/src/components/layout/detached-pane-shell.tsx +10 -37
- package/src/components/layout/double-escape-close.ts +90 -0
- package/src/components/layout/header.tsx +3 -2
- package/src/components/layout/market-summary.ts +6 -3
- package/src/components/layout/pane/footer/index.tsx +2 -6
- package/src/components/layout/pane/footer/model.ts +6 -12
- package/src/components/layout/shell/active-drag.ts +53 -11
- package/src/components/layout/shell/drag/magnets.ts +128 -19
- package/src/components/layout/shell/pane/actions.ts +6 -2
- package/src/components/layout/shell/pane/management-shortcuts.ts +13 -51
- package/src/components/layout/status-bar.tsx +4 -78
- package/src/components/layout/status-widget-space.ts +5 -5
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +1 -1
- package/src/components/ui/data-table/index.tsx +5 -1
- package/src/components/ui/data-table/render-cell.ts +19 -0
- package/src/components/ui/delayed-mark.tsx +59 -7
- package/src/components/ui/icon.tsx +1 -8
- package/src/components/ui/menu.tsx +6 -1
- package/src/i18n/es.ts +6 -3
- package/src/i18n/ja.ts +6 -3
- package/src/i18n/ko.ts +6 -3
- package/src/i18n/zh-cn.ts +6 -3
- package/src/i18n/zh-tw.ts +6 -3
- package/src/market-data/fund-facts.ts +7 -1
- package/src/market-data/market/change-basis.ts +20 -0
- package/src/market-data/market/format.ts +62 -2
- package/src/market-data/market/futures-week.ts +3 -1
- package/src/plugins/builtin/chart-composer/headless.ts +57 -17
- package/src/plugins/builtin/chart-composer/session-range.ts +82 -3
- package/src/plugins/builtin/chat/content/composer.tsx +21 -27
- package/src/plugins/builtin/chat/content/index.tsx +31 -3
- package/src/plugins/builtin/chat/content/shortcuts.ts +4 -2
- package/src/plugins/builtin/chat/content/snapshot.ts +0 -3
- package/src/plugins/builtin/cloud/auth-actions.tsx +51 -23
- package/src/plugins/builtin/cloud/trial-offer-status-widget.tsx +3 -3
- package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +32 -25
- package/src/plugins/builtin/congress-trades/model.ts +2 -1
- package/src/plugins/builtin/congress-trades/pane.tsx +3 -0
- package/src/plugins/builtin/correlation/compute.ts +8 -2
- package/src/plugins/builtin/correlation/headless.ts +10 -9
- package/src/plugins/builtin/correlation/history.ts +30 -0
- package/src/plugins/builtin/correlation/matrix/model.ts +10 -10
- package/src/plugins/builtin/correlation/relationship/model.ts +3 -6
- package/src/plugins/builtin/correlation/relationship/pane.tsx +1 -2
- package/src/plugins/builtin/crypto-board/client.ts +6 -1
- package/src/plugins/builtin/crypto-board/defi-view.tsx +12 -1
- package/src/plugins/builtin/crypto-board/defi.ts +44 -7
- package/src/plugins/builtin/crypto-board/headless.ts +83 -12
- package/src/plugins/builtin/crypto-board/model.ts +30 -6
- package/src/plugins/builtin/crypto-board/pane.tsx +13 -2
- package/src/plugins/builtin/custom-view/index.tsx +1 -1
- package/src/plugins/builtin/custom-view/loader.ts +85 -8
- package/src/plugins/builtin/custom-view/view-spec.ts +28 -0
- package/src/plugins/builtin/equity-screener/criterion-editor.tsx +13 -4
- package/src/plugins/builtin/equity-screener/headless.ts +33 -1
- package/src/plugins/builtin/equity-screener/model.ts +58 -15
- package/src/plugins/builtin/equity-screener/pane.tsx +36 -6
- package/src/plugins/builtin/executives/format.ts +5 -4
- package/src/plugins/builtin/executives/pane.tsx +1 -1
- package/src/plugins/builtin/help/index.tsx +55 -1
- package/src/plugins/builtin/insider/model.ts +30 -2
- package/src/plugins/builtin/jobs/model.ts +2 -2
- package/src/plugins/builtin/mna/model.ts +2 -2
- package/src/plugins/builtin/notes/files.ts +2 -0
- package/src/plugins/builtin/notes/owner.tsx +20 -1
- package/src/plugins/builtin/notes/quick-notes-pane.tsx +22 -4
- package/src/plugins/builtin/notes/store.ts +6 -1
- package/src/plugins/builtin/perps/headless.ts +8 -2
- package/src/plugins/builtin/portfolio-list/header.tsx +1 -1
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +29 -25
- package/src/plugins/builtin/risk-factors/index.tsx +2 -28
- package/src/plugins/builtin/risk-factors/lock-note.ts +58 -0
- package/src/plugins/builtin/risk-factors/pane.tsx +10 -3
- package/src/plugins/builtin/scanner/hilo-model.ts +4 -3
- package/src/plugins/builtin/sec/fund-facts.ts +45 -11
- package/src/plugins/builtin/sec/headless.ts +30 -1
- package/src/plugins/builtin/sec/index.tsx +26 -5
- package/src/plugins/builtin/series-inventory.ts +1 -0
- package/src/plugins/builtin/shared/earnings-report.ts +7 -2
- package/src/plugins/builtin/shared/pro-lock-note.ts +5 -1
- package/src/plugins/builtin/shared/use-quote-board.ts +85 -46
- package/src/plugins/builtin/short-interest/headless.ts +1 -1
- package/src/plugins/builtin/short-interest/model.ts +15 -6
- package/src/plugins/builtin/short-interest/types.ts +2 -0
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +3 -0
- package/src/plugins/builtin/thirteenf/pane.tsx +3 -0
- package/src/plugins/builtin/ticker-detail/overview/model.ts +19 -9
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +4 -4
- package/src/plugins/builtin/time-sales/headless.ts +23 -7
- package/src/plugins/builtin/time-sales/index.tsx +2 -2
- package/src/plugins/builtin/trace-bonds/detail.tsx +198 -0
- package/src/plugins/builtin/trace-bonds/headless.ts +62 -4
- package/src/plugins/builtin/trace-bonds/history.ts +155 -0
- package/src/plugins/builtin/trace-bonds/pane.tsx +64 -5
- package/src/plugins/extracted-plugins.ts +49 -24
- package/src/plugins/installer.ts +234 -32
- package/src/plugins/plugin-names.ts +11 -2
- package/src/plugins/running-installs.ts +34 -0
- package/src/plugins/seed-progress.ts +72 -0
- package/src/remote/controller.ts +9 -2
- package/src/remote/schema.ts +2 -1
- package/src/renderers/cloudflare/http-proxy.ts +67 -8
- package/src/renderers/cloudflare/proxy-session.ts +1 -1
- package/src/renderers/cloudflare/worker.ts +29 -2
- package/src/renderers/dom/desktop/icons.tsx +0 -2
- package/src/renderers/dom/styles.css +0 -3
- package/src/renderers/electrobun/bun/desktop/backend.ts +14 -0
- package/src/renderers/electrobun/bun/desktop/host-requests.ts +14 -7
- package/src/renderers/electrobun/bun/desktop/initialization.ts +24 -14
- package/src/renderers/electrobun/bun/desktop/install-records.ts +59 -0
- package/src/renderers/electrobun/bun/desktop/installer-folder.ts +208 -592
- package/src/renderers/electrobun/bun/desktop/macos-objc.ts +14 -0
- package/src/renderers/electrobun/bun/desktop/update.ts +1 -1
- package/src/renderers/electrobun/bun/index.ts +24 -13
- package/src/renderers/electrobun/bun/window/context-menu-thread.ts +84 -0
- package/src/renderers/electrobun/bun/window/create.ts +23 -3
- package/src/renderers/electrobun/bun/window/electrobun-window-host.ts +4 -4
- package/src/renderers/electrobun/bun/window/events.ts +4 -4
- package/src/renderers/electrobun/bun/window/frame.ts +2 -1
- package/src/renderers/electrobun/bun/window/native-call-thread.ts +224 -0
- package/src/renderers/electrobun/bun/window/native-min-size.ts +322 -0
- package/src/renderers/electrobun/bun/window/native-timing.ts +10 -0
- package/src/renderers/electrobun/bun/window/script-for-webview.ts +15 -0
- package/src/renderers/electrobun/bun/window/webview-script-thread.ts +82 -0
- package/src/renderers/electrobun/shared/protocol.ts +13 -2
- package/src/renderers/electrobun/view/backend-rpc.ts +8 -1
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +1 -1
- package/src/renderers/electrobun/view/main.tsx +4 -3
- package/src/renderers/opentui/start.tsx +3 -0
- package/src/sources/gloomberb-cloud/index.ts +5 -7
- package/src/sources/provider-router/batches.ts +18 -3
- package/src/sources/provider-router/financials.ts +18 -4
- package/src/telemetry/stall-reports.ts +21 -4
- package/src/types/data-provider.ts +14 -0
- package/src/types/financials.ts +15 -3
- package/src/types/headless.ts +2 -0
- package/src/utils/double-escape-close.ts +38 -16
- package/src/utils/format.ts +23 -3
- package/src/utils/main-thread-stall.ts +21 -5
- package/src/utils/perf-marks.ts +88 -9
- package/src/utils/price-earnings.ts +18 -0
- package/src/utils/reported-money.ts +9 -2
- package/src/utils/sec.ts +34 -3
- package/patches/electrobun@1.18.1.patch +0 -633
- package/src/api-client/types.ts +0 -2441
- package/src/plugins/seed-notice.ts +0 -20
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
interface CloudJobsSeriesPoint {
|
|
2
|
+
day: string;
|
|
3
|
+
open: number;
|
|
4
|
+
/** Null on the first observed day, when the whole board is seen for the first time. */
|
|
5
|
+
new: number | null;
|
|
6
|
+
closed: number;
|
|
7
|
+
/** Open standing roles the company hires for continuously. */
|
|
8
|
+
evergreen?: number;
|
|
9
|
+
/** Open contract and temporary roles. */
|
|
10
|
+
contract?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CloudJobsBucket {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
count: number;
|
|
17
|
+
share: number;
|
|
18
|
+
/** Count 30 days ago from the daily roll-up, when the history reaches back. */
|
|
19
|
+
previous: number | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CloudJobsPosting {
|
|
23
|
+
id: number;
|
|
24
|
+
title: string;
|
|
25
|
+
function: string | null;
|
|
26
|
+
seniority: string | null;
|
|
27
|
+
location: string | null;
|
|
28
|
+
country: string | null;
|
|
29
|
+
remote: boolean | null;
|
|
30
|
+
employmentKind?: string | null;
|
|
31
|
+
/** A standing posting for a continuous-hiring role; null when unjudged. */
|
|
32
|
+
evergreen?: boolean | null;
|
|
33
|
+
postedAt: string | null;
|
|
34
|
+
postedPrecision: "exact" | "approximate" | "floor" | null;
|
|
35
|
+
firstSeenAt: string;
|
|
36
|
+
url: string | null;
|
|
37
|
+
salaryMin: number | null;
|
|
38
|
+
salaryMax: number | null;
|
|
39
|
+
salaryCurrency: string | null;
|
|
40
|
+
salaryPeriod: string | null;
|
|
41
|
+
tags: string[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** One posting as its detail view reads it. */
|
|
45
|
+
export interface CloudJobsPostingDetail extends CloudJobsPosting {
|
|
46
|
+
/** The careers system's own id. */
|
|
47
|
+
externalId: string;
|
|
48
|
+
/** As the careers system writes it ("Full time", "FULL_TIME", "CDI"). */
|
|
49
|
+
employmentType: string | null;
|
|
50
|
+
/** The start of the role's description, as read from its page. */
|
|
51
|
+
description: string | null;
|
|
52
|
+
closedAt: string | null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface CloudJobsChange {
|
|
56
|
+
count: number;
|
|
57
|
+
percent: number | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface CloudJobsSummaryPayload {
|
|
61
|
+
status: "ok";
|
|
62
|
+
ticker: string;
|
|
63
|
+
companyName: string | null;
|
|
64
|
+
coverage: {
|
|
65
|
+
status: string;
|
|
66
|
+
vendor: string | null;
|
|
67
|
+
careersUrl: string | null;
|
|
68
|
+
lastCollectedAt: string | null;
|
|
69
|
+
firstObservedAt: string | null;
|
|
70
|
+
daysObserved: number;
|
|
71
|
+
employeeCount: number | null;
|
|
72
|
+
};
|
|
73
|
+
openCount: number;
|
|
74
|
+
openPerThousandEmployees: number | null;
|
|
75
|
+
new7d: number;
|
|
76
|
+
new30d: number;
|
|
77
|
+
closed30d: number;
|
|
78
|
+
change30d: CloudJobsChange | null;
|
|
79
|
+
change90d: CloudJobsChange | null;
|
|
80
|
+
/** False when the careers system re-dates every role on refresh, so dates are withheld. */
|
|
81
|
+
datesReliable?: boolean;
|
|
82
|
+
/** Open postings the system dates within the last 30 days. */
|
|
83
|
+
posted30d?: number | null;
|
|
84
|
+
remoteShare: number | null;
|
|
85
|
+
/**
|
|
86
|
+
* Open roles that are standing postings for continuous-hiring positions
|
|
87
|
+
* (baristas, servers, store associates, nurses). One more of those says
|
|
88
|
+
* nothing about the company's plans; open minus evergreen is the count of
|
|
89
|
+
* specific roles.
|
|
90
|
+
*/
|
|
91
|
+
evergreenCount?: number;
|
|
92
|
+
evergreenShare?: number | null;
|
|
93
|
+
/** Share of open roles that are contract or temporary, among those known. */
|
|
94
|
+
contractShare?: number | null;
|
|
95
|
+
medianAgeDays: number | null;
|
|
96
|
+
series: CloudJobsSeriesPoint[];
|
|
97
|
+
/** The current backlog by how long each role has been posted. */
|
|
98
|
+
ageBuckets?: Array<{ id: string; label: string; count: number }>;
|
|
99
|
+
functions: CloudJobsBucket[];
|
|
100
|
+
countries: CloudJobsBucket[];
|
|
101
|
+
seniority: CloudJobsBucket[];
|
|
102
|
+
tags: CloudJobsBucket[];
|
|
103
|
+
salary: {
|
|
104
|
+
count: number;
|
|
105
|
+
currency: string;
|
|
106
|
+
period: string;
|
|
107
|
+
medianMin: number;
|
|
108
|
+
medianMax: number;
|
|
109
|
+
byFunction: Array<{ id: string; label: string; count: number; medianMin: number; medianMax: number }>;
|
|
110
|
+
} | null;
|
|
111
|
+
recent: CloudJobsPosting[];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface CloudJobsPendingPayload {
|
|
115
|
+
status: "pending";
|
|
116
|
+
ticker: string;
|
|
117
|
+
queued: boolean;
|
|
118
|
+
message: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type CloudJobsResponse = CloudJobsSummaryPayload | CloudJobsPendingPayload;
|
|
122
|
+
|
|
123
|
+
export interface CloudJobsPostingsPayload {
|
|
124
|
+
postings: CloudJobsPosting[];
|
|
125
|
+
total: number;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface CloudJobsMoverPayload {
|
|
129
|
+
ticker: string;
|
|
130
|
+
companyName: string | null;
|
|
131
|
+
openCount: number;
|
|
132
|
+
employeeCount: number | null;
|
|
133
|
+
change30d: CloudJobsChange | null;
|
|
134
|
+
/** Open roles the system dates within the last 30 days, null when its dates cannot be read. */
|
|
135
|
+
posted30d?: number | null;
|
|
136
|
+
new7d: number;
|
|
137
|
+
topFunction: string | null;
|
|
138
|
+
topCountry?: { code: string; share: number } | null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface CloudJobsMoversPayload {
|
|
142
|
+
asOf: string;
|
|
143
|
+
covered: number;
|
|
144
|
+
/** Companies in the ranking; `movers` is one page of them. */
|
|
145
|
+
total?: number;
|
|
146
|
+
movers: CloudJobsMoverPayload[];
|
|
147
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { PriceHistorySource } from "../../types/financials";
|
|
2
|
+
|
|
3
|
+
export interface CloudPricePointPayload {
|
|
4
|
+
/** @deprecated No longer read; a history's boundary is its response `coverage`. */
|
|
5
|
+
historySource?: PriceHistorySource;
|
|
6
|
+
date: string;
|
|
7
|
+
open?: number;
|
|
8
|
+
high?: number;
|
|
9
|
+
low?: number;
|
|
10
|
+
close: number;
|
|
11
|
+
volume?: number;
|
|
12
|
+
/**
|
|
13
|
+
* One venue's count for a bar whose market volume is unavailable (a US session still trading, counted on IEX
|
|
14
|
+
* alone), served in place of `volume`.
|
|
15
|
+
*/
|
|
16
|
+
venueVolume?: { venue: string; volume: number };
|
|
17
|
+
/** What a coin bar's volume counts: `aggregate` across venues, or `3 spot venues` summed. */
|
|
18
|
+
volumeBasis?: string;
|
|
19
|
+
/** A daily bar still forming when served: a coin's UTC day, or the trade date a future is trading. */
|
|
20
|
+
partial?: boolean;
|
|
21
|
+
/** A coin's daily bar whose prices were rebuilt from hourly bars; a day the source left empty has no volume. */
|
|
22
|
+
filled?: boolean;
|
|
23
|
+
/** A future's closed session whose settlement is not confirmed yet: it closes on the last trade. */
|
|
24
|
+
unsettled?: boolean;
|
|
25
|
+
/** A continuous future's calendar bar: the contract it closes on (NGZ26), where the server knows it. */
|
|
26
|
+
contract?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type CloudMarketStatus =
|
|
30
|
+
| "success"
|
|
31
|
+
| "partial"
|
|
32
|
+
| "empty"
|
|
33
|
+
| "unsupported"
|
|
34
|
+
| "retryable_error"
|
|
35
|
+
| "fatal_error";
|
|
36
|
+
|
|
37
|
+
/** The dates a history source vouches for. Which boundary fields appear depends on the reason. */
|
|
38
|
+
export interface CloudHistoryCoverage {
|
|
39
|
+
source: string;
|
|
40
|
+
reasonCode?: string;
|
|
41
|
+
/** First date (YYYY-MM-DD) whose share lineage the source verified. */
|
|
42
|
+
verifiedLineageStart?: string;
|
|
43
|
+
/** First bar date (YYYY-MM-DD) the source serves, such as a fund's inception. */
|
|
44
|
+
firstAllowedBarDate?: string;
|
|
45
|
+
inceptionDate?: string;
|
|
46
|
+
/** Why nothing earlier is served, such as "old-shekel quotes before 1992 are not served". */
|
|
47
|
+
note?: string;
|
|
48
|
+
sourceUrl?: string;
|
|
49
|
+
firstBarDate: string | null;
|
|
50
|
+
lastBarDate: string | null;
|
|
51
|
+
barCount: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface CloudMarketResponse<T> {
|
|
55
|
+
status: CloudMarketStatus;
|
|
56
|
+
data: T | null;
|
|
57
|
+
reasonCode?: string;
|
|
58
|
+
/** Untrusted, human-readable reason the answer is empty. Cleaned before it is shown. */
|
|
59
|
+
message?: string;
|
|
60
|
+
asOf?: string;
|
|
61
|
+
staleAt?: string;
|
|
62
|
+
stale?: boolean;
|
|
63
|
+
currency?: string;
|
|
64
|
+
/** Untrusted history-only failure evidence, validated by the history adapter. */
|
|
65
|
+
historyRetention?: unknown;
|
|
66
|
+
/** Source-declared history semantics; validated separately from quote metadata. */
|
|
67
|
+
historySession?: unknown;
|
|
68
|
+
/** "extended" when the history includes the pre-market and after-hours bars asked for. */
|
|
69
|
+
session?: unknown;
|
|
70
|
+
/** "1day" when daily bars answer an intraday range: the listing has no intraday bars. */
|
|
71
|
+
servedResolution?: unknown;
|
|
72
|
+
/**
|
|
73
|
+
* Untrusted: daily sessions the bars leave out and why, as
|
|
74
|
+
* `[{ date: "2020-04-20", reason: "non-positive-close" }]`. Validated by the history adapter.
|
|
75
|
+
*/
|
|
76
|
+
omittedSessions?: unknown;
|
|
77
|
+
/** Untrusted until the history adapter validates its boundary dates. */
|
|
78
|
+
coverage?: CloudHistoryCoverage;
|
|
79
|
+
/**
|
|
80
|
+
* Untrusted: a US listing that no longer trades, `{ status, lastTradeDate,
|
|
81
|
+
* historyStart }`. Its history ends on `lastTradeDate`. Read by parseListingDelisting.
|
|
82
|
+
*/
|
|
83
|
+
delisting?: unknown;
|
|
84
|
+
providerMeta?: {
|
|
85
|
+
provider?: string;
|
|
86
|
+
upstream?: string;
|
|
87
|
+
status?: CloudMarketStatus;
|
|
88
|
+
reasonCode?: string;
|
|
89
|
+
normalizedSymbol?: string;
|
|
90
|
+
normalizedExchange?: string;
|
|
91
|
+
stale?: boolean;
|
|
92
|
+
fallbackReason?: string;
|
|
93
|
+
requestedResolution?: string;
|
|
94
|
+
servedResolution?: string;
|
|
95
|
+
latencyMs?: number;
|
|
96
|
+
range?: string;
|
|
97
|
+
granularity?: string;
|
|
98
|
+
timezone?: string;
|
|
99
|
+
currency?: string;
|
|
100
|
+
barCount?: number;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface CloudMarketBatchTarget {
|
|
105
|
+
symbol: string;
|
|
106
|
+
exchange?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface CloudMarketBatchItem<T> {
|
|
110
|
+
symbol: string;
|
|
111
|
+
exchange: string;
|
|
112
|
+
status: CloudMarketStatus;
|
|
113
|
+
data: T | null;
|
|
114
|
+
reasonCode?: string;
|
|
115
|
+
/** Untrusted, human-readable reason this item is empty. Cleaned before it is shown. */
|
|
116
|
+
message?: string;
|
|
117
|
+
stale?: boolean;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface CloudMarketBatchPayload<T> {
|
|
121
|
+
items: Array<CloudMarketBatchItem<T>>;
|
|
122
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { CompanyFrom } from "../../types/company-from";
|
|
2
|
+
|
|
3
|
+
interface CloudNewsEntityPayload {
|
|
4
|
+
id: string;
|
|
5
|
+
entityType: string;
|
|
6
|
+
name: string;
|
|
7
|
+
symbol: string | null;
|
|
8
|
+
exchange: string | null;
|
|
9
|
+
canonicalTicker: string | null;
|
|
10
|
+
role: string | null;
|
|
11
|
+
confidence: number | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface CloudNewsTickerLinkPayload {
|
|
15
|
+
symbol: string;
|
|
16
|
+
exchange: string;
|
|
17
|
+
canonicalTicker: string;
|
|
18
|
+
relationType: string;
|
|
19
|
+
displayTier: "primary" | "related";
|
|
20
|
+
confidence: number;
|
|
21
|
+
relevanceScore: number;
|
|
22
|
+
impactScore?: number;
|
|
23
|
+
/** The company's market cap, stated on its home listing and not on a cross-listing. */
|
|
24
|
+
marketCap?: number | null;
|
|
25
|
+
sentiment?: "positive" | "neutral" | "negative" | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface CloudNewsStoryItemPayload {
|
|
29
|
+
id: string;
|
|
30
|
+
sourceKey: string;
|
|
31
|
+
sourceName: string;
|
|
32
|
+
title: string;
|
|
33
|
+
summary?: string;
|
|
34
|
+
url: string;
|
|
35
|
+
publishedAt: string;
|
|
36
|
+
hasArticleText?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface CloudNewsPayload {
|
|
40
|
+
id: string;
|
|
41
|
+
headline: string;
|
|
42
|
+
summary: string;
|
|
43
|
+
topic?: string;
|
|
44
|
+
topics?: string[];
|
|
45
|
+
category: string;
|
|
46
|
+
sentiment: "positive" | "neutral" | "negative";
|
|
47
|
+
sectors: string[];
|
|
48
|
+
scope?: string;
|
|
49
|
+
firstPublishedAt: string;
|
|
50
|
+
lastPublishedAt: string;
|
|
51
|
+
firstSeenAt: string;
|
|
52
|
+
lastSeenAt: string;
|
|
53
|
+
primaryUrl: string;
|
|
54
|
+
/** Routing key of the representative item, for source filters. */
|
|
55
|
+
primarySource: string;
|
|
56
|
+
/** Who published the representative item (FT, SEC, @unusual_whales). */
|
|
57
|
+
primaryPublisher?: string;
|
|
58
|
+
publishers?: string[];
|
|
59
|
+
scores?: {
|
|
60
|
+
importance?: number;
|
|
61
|
+
urgency?: number;
|
|
62
|
+
marketImpact?: number;
|
|
63
|
+
novelty?: number;
|
|
64
|
+
confidence?: number;
|
|
65
|
+
};
|
|
66
|
+
flags?: {
|
|
67
|
+
breaking?: boolean;
|
|
68
|
+
developing?: boolean;
|
|
69
|
+
stale?: boolean;
|
|
70
|
+
};
|
|
71
|
+
variantCount: number;
|
|
72
|
+
sourceCount: number;
|
|
73
|
+
sources: string[];
|
|
74
|
+
entities: CloudNewsEntityPayload[];
|
|
75
|
+
tickerLinks: CloudNewsTickerLinkPayload[];
|
|
76
|
+
items?: CloudNewsStoryItemPayload[];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface CloudNewsListResponse {
|
|
80
|
+
items: CloudNewsPayload[];
|
|
81
|
+
nextCursor: string | null;
|
|
82
|
+
/** Which news the service answered with, when it says: the live wire, or the one held back for a free account. */
|
|
83
|
+
access?: "realtime" | "delayed";
|
|
84
|
+
/**
|
|
85
|
+
* A search asked for its closest stories: `all` when stories have every
|
|
86
|
+
* word, `closest` when none does and these have the most of them.
|
|
87
|
+
*/
|
|
88
|
+
match?: "all" | "closest";
|
|
89
|
+
/** A receipt's or foreign line's feed is its company's: the home line it reads, when not the listing asked. */
|
|
90
|
+
companyFrom?: CompanyFrom;
|
|
91
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// Cloud notes
|
|
2
|
+
|
|
3
|
+
type NoteOwnerKind = "user" | "team";
|
|
4
|
+
export type NoteKind = "ticker" | "quick";
|
|
5
|
+
|
|
6
|
+
interface CloudNoteOwner {
|
|
7
|
+
kind: NoteOwnerKind;
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface CloudNoteSummary {
|
|
12
|
+
id: string;
|
|
13
|
+
owner: CloudNoteOwner;
|
|
14
|
+
kind: NoteKind;
|
|
15
|
+
key: string;
|
|
16
|
+
title: string | null;
|
|
17
|
+
revision: number;
|
|
18
|
+
/** Who wrote the note; null when unknown. Older servers leave it out. */
|
|
19
|
+
createdBy?: string | null;
|
|
20
|
+
updatedBy: { id: string; username: string | null; displayName: string };
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
size: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CloudNote extends Omit<CloudNoteSummary, "size"> {
|
|
27
|
+
content: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface CloudNoteScope {
|
|
31
|
+
scope: NoteOwnerKind;
|
|
32
|
+
teamId?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Theses
|
|
36
|
+
|
|
37
|
+
export type ThesisStatus = "watching" | "active" | "closed";
|
|
38
|
+
export type ThesisHealth = "unverified" | "intact" | "weakening" | "broken";
|
|
39
|
+
export type ThesisPillarStatus = ThesisHealth;
|
|
40
|
+
|
|
41
|
+
interface ThesisInstrument {
|
|
42
|
+
symbol: string;
|
|
43
|
+
exchange?: string;
|
|
44
|
+
side: "long" | "short";
|
|
45
|
+
role: "core" | "hedge";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface ThesisMetricBound {
|
|
49
|
+
key: string;
|
|
50
|
+
op: ">=" | "<=";
|
|
51
|
+
value: number;
|
|
52
|
+
unit?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ThesisPillar {
|
|
56
|
+
id: string;
|
|
57
|
+
text: string;
|
|
58
|
+
kind: "qualitative" | "metric";
|
|
59
|
+
metric?: ThesisMetricBound;
|
|
60
|
+
/** Symbol the claim is about; absent means the thesis as a whole. */
|
|
61
|
+
scope?: string;
|
|
62
|
+
status: ThesisPillarStatus;
|
|
63
|
+
note?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ThesisKillCondition {
|
|
67
|
+
id: string;
|
|
68
|
+
text: string;
|
|
69
|
+
triggered: boolean;
|
|
70
|
+
note?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ThesisCatalyst {
|
|
74
|
+
id: string;
|
|
75
|
+
text: string;
|
|
76
|
+
date?: string;
|
|
77
|
+
status: "pending" | "hit" | "missed";
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ThesisDocument {
|
|
81
|
+
summary: string;
|
|
82
|
+
instruments: ThesisInstrument[];
|
|
83
|
+
evidence: { symbols: string[]; keywords: string[] };
|
|
84
|
+
pillars: ThesisPillar[];
|
|
85
|
+
killConditions: ThesisKillCondition[];
|
|
86
|
+
catalysts: ThesisCatalyst[];
|
|
87
|
+
target?: { price?: number; note?: string };
|
|
88
|
+
entry?: { date?: string; price?: number };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface ThesisOutcome {
|
|
92
|
+
verdict: "right" | "wrong" | "lucky" | "unlucky";
|
|
93
|
+
returnPct?: number;
|
|
94
|
+
lesson?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface ThesisEditor {
|
|
98
|
+
id: string;
|
|
99
|
+
username: string | null;
|
|
100
|
+
displayName: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface CloudThesis {
|
|
104
|
+
id: string;
|
|
105
|
+
owner: CloudNoteOwner;
|
|
106
|
+
title: string;
|
|
107
|
+
status: ThesisStatus;
|
|
108
|
+
conviction: number;
|
|
109
|
+
horizon: string | null;
|
|
110
|
+
reviewEveryDays: number;
|
|
111
|
+
document: ThesisDocument;
|
|
112
|
+
outcome: ThesisOutcome | null;
|
|
113
|
+
health: ThesisHealth;
|
|
114
|
+
revision: number;
|
|
115
|
+
/** Signals waiting for a verdict. */
|
|
116
|
+
openSignals: number;
|
|
117
|
+
createdBy: string;
|
|
118
|
+
updatedBy: ThesisEditor;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
updatedAt: string;
|
|
121
|
+
reviewedAt: string | null;
|
|
122
|
+
closedAt: string | null;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
type ThesisSignalTargetKind = "pillar" | "kill" | "catalyst" | "thesis";
|
|
126
|
+
type ThesisSignalVerdict = "supports" | "challenges" | "breaks" | "neutral";
|
|
127
|
+
type ThesisSignalStatus = "open" | "accepted" | "dismissed" | "snoozed" | "noted";
|
|
128
|
+
|
|
129
|
+
interface ThesisSignalSource {
|
|
130
|
+
kind: "news" | "filing" | "transcript" | "metric" | "review" | "user";
|
|
131
|
+
id?: string;
|
|
132
|
+
title?: string;
|
|
133
|
+
url?: string;
|
|
134
|
+
at?: string;
|
|
135
|
+
symbol?: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface ThesisSignal {
|
|
139
|
+
id: string;
|
|
140
|
+
thesisId: string;
|
|
141
|
+
targetKind: ThesisSignalTargetKind;
|
|
142
|
+
targetId: string | null;
|
|
143
|
+
verdict: ThesisSignalVerdict;
|
|
144
|
+
confidence: number | null;
|
|
145
|
+
reason: string;
|
|
146
|
+
source: ThesisSignalSource | null;
|
|
147
|
+
origin: "ai" | "rule" | "user";
|
|
148
|
+
status: ThesisSignalStatus;
|
|
149
|
+
resolutionNote: string | null;
|
|
150
|
+
createdBy: ThesisEditor | null;
|
|
151
|
+
resolvedBy: ThesisEditor | null;
|
|
152
|
+
createdAt: string;
|
|
153
|
+
resolvedAt: string | null;
|
|
154
|
+
snoozedUntil: string | null;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface ThesisDraft extends ThesisDocument {
|
|
158
|
+
title: string;
|
|
159
|
+
horizon: string | null;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface ThesisPatch {
|
|
163
|
+
title?: string;
|
|
164
|
+
status?: ThesisStatus;
|
|
165
|
+
conviction?: number;
|
|
166
|
+
horizon?: string | null;
|
|
167
|
+
reviewEveryDays?: number;
|
|
168
|
+
document?: ThesisDocument;
|
|
169
|
+
outcome?: ThesisOutcome | null;
|
|
170
|
+
note?: string | null;
|
|
171
|
+
reviewed?: boolean;
|
|
172
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Quote } from "../../types/financials";
|
|
2
|
+
|
|
3
|
+
export interface CloudQuotePayload extends Omit<Quote, "change" | "changePercent" | "priceBasis" | "priceObservation"> {
|
|
4
|
+
/** The service labels daily NAV here; the app separates observation kind from price units. */
|
|
5
|
+
priceBasis?: Quote["priceBasis"] | "nav";
|
|
6
|
+
// JSON encodes the provider's unavailable numeric values as null.
|
|
7
|
+
change?: number | null;
|
|
8
|
+
changePercent?: number | null;
|
|
9
|
+
providerId: "gloomberb-cloud";
|
|
10
|
+
dataSource: "live" | "delayed";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface QuoteStreamTarget {
|
|
14
|
+
symbol: string;
|
|
15
|
+
exchange?: string;
|
|
16
|
+
surface?:
|
|
17
|
+
| "portfolio"
|
|
18
|
+
| "watchlist"
|
|
19
|
+
| "detail"
|
|
20
|
+
| "monitor"
|
|
21
|
+
| "inline"
|
|
22
|
+
| "options"
|
|
23
|
+
| "screener"
|
|
24
|
+
| "unknown";
|
|
25
|
+
visible?: boolean;
|
|
26
|
+
selected?: boolean;
|
|
27
|
+
weight?: number;
|
|
28
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/** Shared server-computed scanners fanned out to every subscriber. */
|
|
2
|
+
export type ScannerKind = "hilo" | "flow";
|
|
3
|
+
|
|
4
|
+
export type ScannerStatus = "live" | "starting" | "closed" | "degraded";
|
|
5
|
+
|
|
6
|
+
interface ScannerWindowCounts {
|
|
7
|
+
highs: number;
|
|
8
|
+
lows: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ScannerHiloExtreme {
|
|
12
|
+
symbol: string;
|
|
13
|
+
price: number;
|
|
14
|
+
volume?: number | null;
|
|
15
|
+
/** Times this symbol printed a new session extreme today. */
|
|
16
|
+
count: number;
|
|
17
|
+
at: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Which entitlement tier produced the payload: free accounts get a delayed instance. */
|
|
21
|
+
interface ScannerAccessInfo {
|
|
22
|
+
access: "realtime" | "delayed";
|
|
23
|
+
/** 0 on the realtime instance, 15 on the delayed one. */
|
|
24
|
+
delayMinutes: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ScannerHiloPayload extends ScannerAccessInfo {
|
|
28
|
+
status: ScannerStatus;
|
|
29
|
+
asOf: number;
|
|
30
|
+
windows: {
|
|
31
|
+
s30: ScannerWindowCounts;
|
|
32
|
+
m1: ScannerWindowCounts;
|
|
33
|
+
m5: ScannerWindowCounts;
|
|
34
|
+
};
|
|
35
|
+
highs: ScannerHiloExtreme[];
|
|
36
|
+
lows: ScannerHiloExtreme[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ScannerFlowEvent {
|
|
40
|
+
id: string;
|
|
41
|
+
at: number;
|
|
42
|
+
underlying: string;
|
|
43
|
+
contract: string;
|
|
44
|
+
right: "C" | "P";
|
|
45
|
+
strike: number;
|
|
46
|
+
expiry: string;
|
|
47
|
+
side: "ask" | "bid" | "mid" | "unknown";
|
|
48
|
+
kind: "sweep" | "block" | "split" | "trade";
|
|
49
|
+
size: number;
|
|
50
|
+
price: number;
|
|
51
|
+
premium: number;
|
|
52
|
+
volume?: number | null;
|
|
53
|
+
openInterest?: number | null;
|
|
54
|
+
volOi?: number | null;
|
|
55
|
+
iv?: number | null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ScannerFlowPayload extends ScannerAccessInfo {
|
|
59
|
+
status: ScannerStatus;
|
|
60
|
+
asOf: number;
|
|
61
|
+
events: ScannerFlowEvent[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Filters for recorded flow prints, matching the FLOW pane's own. */
|
|
65
|
+
export interface ScannerFlowHistoryQuery {
|
|
66
|
+
/** Page before this print (newest first); omit for the latest prints. */
|
|
67
|
+
before?: { at: number; id: string };
|
|
68
|
+
limit?: number;
|
|
69
|
+
minPremium?: number;
|
|
70
|
+
right?: "C" | "P";
|
|
71
|
+
kind?: "sweep" | "block";
|
|
72
|
+
minVolOi?: number;
|
|
73
|
+
maxExpiryDays?: number;
|
|
74
|
+
/** Only these listed symbols (the pane's "mine" universe). */
|
|
75
|
+
symbols?: string[];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface ScannerFlowHistoryPage {
|
|
79
|
+
events: ScannerFlowEvent[];
|
|
80
|
+
hasMore: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Premium of a slice of the session's recorded prints by where it traded: at
|
|
85
|
+
* or above the ask (bought) or at or below the bid (sold). Mid and unknown
|
|
86
|
+
* prints count as neither.
|
|
87
|
+
*/
|
|
88
|
+
interface ScannerFlowSidePremium {
|
|
89
|
+
callAsk: number;
|
|
90
|
+
callBid: number;
|
|
91
|
+
putAsk: number;
|
|
92
|
+
putBid: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** The session's prints in one time bucket, which starts at `at`. */
|
|
96
|
+
export interface ScannerFlowSessionBucket extends ScannerFlowSidePremium {
|
|
97
|
+
at: number;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** What one name printed at one expiry and strike during the session. */
|
|
101
|
+
export interface ScannerFlowSessionStrike extends ScannerFlowSidePremium {
|
|
102
|
+
expiry: string;
|
|
103
|
+
strike: number;
|
|
104
|
+
/** Every call print's premium, mid and unknown included. */
|
|
105
|
+
callPremium: number;
|
|
106
|
+
putPremium: number;
|
|
107
|
+
prints: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** The latest session's recorded prints under the FLOW pane's filters, summed. */
|
|
111
|
+
export interface ScannerFlowSession {
|
|
112
|
+
/** The New York date of the session; null before any print was recorded. */
|
|
113
|
+
session: string | null;
|
|
114
|
+
bucketMs: number;
|
|
115
|
+
/** Buckets with a matching print, oldest first. */
|
|
116
|
+
buckets: ScannerFlowSessionBucket[];
|
|
117
|
+
/** Only when one name was asked for: most premium first. */
|
|
118
|
+
strikes: ScannerFlowSessionStrike[] | null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type ScannerPayload = ScannerHiloPayload | ScannerFlowPayload;
|
|
122
|
+
|
|
123
|
+
/** What a scanner subscriber receives: data, or the entitlement refusal. */
|
|
124
|
+
export type ScannerFeedEvent<T extends ScannerPayload = ScannerPayload> =
|
|
125
|
+
{ type: "data"; payload: T } | { type: "denied"; reason: string };
|