@gloom-sh/terminal 0.19.6 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/LICENSE +0 -4
  2. package/package.json +6 -5
  3. package/patches/electrobun-devkit@2.0.5.patch +148 -0
  4. package/src/api-client/bond-trades.ts +59 -0
  5. package/src/api-client/data.ts +21 -0
  6. package/src/api-client/index.ts +2 -0
  7. package/src/api-client/types/account.ts +86 -0
  8. package/src/api-client/types/assist.ts +32 -0
  9. package/src/api-client/types/auth.ts +63 -0
  10. package/src/api-client/types/billing.ts +54 -0
  11. package/src/api-client/types/chat.ts +180 -0
  12. package/src/api-client/types/congress.ts +107 -0
  13. package/src/api-client/types/credit.ts +110 -0
  14. package/src/api-client/types/econ.ts +158 -0
  15. package/src/api-client/types/equity-diagnostic.ts +73 -0
  16. package/src/api-client/types/filings-and-calls.ts +350 -0
  17. package/src/api-client/types/index.ts +25 -0
  18. package/src/api-client/types/jobs.ts +147 -0
  19. package/src/api-client/types/market.ts +122 -0
  20. package/src/api-client/types/news.ts +91 -0
  21. package/src/api-client/types/notes-and-theses.ts +172 -0
  22. package/src/api-client/types/quotes.ts +28 -0
  23. package/src/api-client/types/scanners.ts +125 -0
  24. package/src/api-client/types/screener.ts +65 -0
  25. package/src/api-client/types/search.ts +107 -0
  26. package/src/api-client/types/sync.ts +14 -0
  27. package/src/api-client/types/team-collections.ts +43 -0
  28. package/src/api-client/types/team-views.ts +32 -0
  29. package/src/api-client/types/teams.ts +135 -0
  30. package/src/api-client/types/ticker-data.ts +57 -0
  31. package/src/api-client/types/tweets.ts +59 -0
  32. package/src/api-client/types/world-venues.ts +23 -0
  33. package/src/app/runtime/desktop-deeplink.ts +41 -6
  34. package/src/app/star-prompt/status-line.tsx +1 -1
  35. package/src/app.tsx +1 -7
  36. package/src/architecture/ui-tokens-allowlist.json +0 -8
  37. package/src/cli/commands/ticker.ts +17 -4
  38. package/src/cli/desktop-pane-shot-browser.ts +69 -3
  39. package/src/cli/pane-functions/catalog.ts +3 -1
  40. package/src/components/chart/composite/use-composite-chart-keyboard.ts +11 -2
  41. package/src/components/data-table/export.ts +4 -1
  42. package/src/components/layout/detached-pane-shell.tsx +10 -37
  43. package/src/components/layout/double-escape-close.ts +90 -0
  44. package/src/components/layout/header.tsx +3 -2
  45. package/src/components/layout/market-summary.ts +6 -3
  46. package/src/components/layout/pane/footer/index.tsx +2 -6
  47. package/src/components/layout/pane/footer/model.ts +6 -12
  48. package/src/components/layout/shell/active-drag.ts +53 -11
  49. package/src/components/layout/shell/drag/magnets.ts +128 -19
  50. package/src/components/layout/shell/pane/actions.ts +6 -2
  51. package/src/components/layout/shell/pane/management-shortcuts.ts +13 -51
  52. package/src/components/layout/status-bar.tsx +4 -78
  53. package/src/components/layout/status-widget-space.ts +5 -5
  54. package/src/components/onboarding/portfolio-step/positions-panel.tsx +1 -1
  55. package/src/components/ui/data-table/index.tsx +5 -1
  56. package/src/components/ui/data-table/render-cell.ts +19 -0
  57. package/src/components/ui/delayed-mark.tsx +59 -7
  58. package/src/components/ui/icon.tsx +1 -8
  59. package/src/components/ui/menu.tsx +6 -1
  60. package/src/i18n/es.ts +3 -3
  61. package/src/i18n/ja.ts +3 -3
  62. package/src/i18n/ko.ts +3 -3
  63. package/src/i18n/zh-cn.ts +3 -3
  64. package/src/i18n/zh-tw.ts +3 -3
  65. package/src/plugins/builtin/chat/content/composer.tsx +21 -27
  66. package/src/plugins/builtin/chat/content/index.tsx +31 -3
  67. package/src/plugins/builtin/chat/content/shortcuts.ts +4 -2
  68. package/src/plugins/builtin/chat/content/snapshot.ts +0 -3
  69. package/src/plugins/builtin/cloud/auth-actions.tsx +51 -23
  70. package/src/plugins/builtin/cloud/trial-offer-status-widget.tsx +3 -3
  71. package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +32 -25
  72. package/src/plugins/builtin/congress-trades/model.ts +2 -1
  73. package/src/plugins/builtin/congress-trades/pane.tsx +3 -0
  74. package/src/plugins/builtin/custom-view/index.tsx +1 -1
  75. package/src/plugins/builtin/custom-view/loader.ts +85 -8
  76. package/src/plugins/builtin/custom-view/view-spec.ts +28 -0
  77. package/src/plugins/builtin/equity-screener/criterion-editor.tsx +13 -4
  78. package/src/plugins/builtin/equity-screener/headless.ts +33 -1
  79. package/src/plugins/builtin/equity-screener/model.ts +58 -15
  80. package/src/plugins/builtin/equity-screener/pane.tsx +36 -6
  81. package/src/plugins/builtin/executives/format.ts +5 -4
  82. package/src/plugins/builtin/executives/pane.tsx +1 -1
  83. package/src/plugins/builtin/help/index.tsx +55 -1
  84. package/src/plugins/builtin/insider/model.ts +30 -2
  85. package/src/plugins/builtin/jobs/model.ts +2 -2
  86. package/src/plugins/builtin/mna/model.ts +2 -2
  87. package/src/plugins/builtin/notes/files.ts +2 -0
  88. package/src/plugins/builtin/notes/owner.tsx +20 -1
  89. package/src/plugins/builtin/notes/quick-notes-pane.tsx +22 -4
  90. package/src/plugins/builtin/notes/store.ts +6 -1
  91. package/src/plugins/builtin/portfolio-list/header.tsx +1 -1
  92. package/src/plugins/builtin/research/corporate-actions-pane.tsx +29 -25
  93. package/src/plugins/builtin/series-inventory.ts +1 -0
  94. package/src/plugins/builtin/shared/earnings-report.ts +7 -2
  95. package/src/plugins/builtin/shared/use-quote-board.ts +85 -46
  96. package/src/plugins/builtin/short-interest/headless.ts +1 -1
  97. package/src/plugins/builtin/short-interest/model.ts +15 -6
  98. package/src/plugins/builtin/short-interest/types.ts +2 -0
  99. package/src/plugins/builtin/thirteenf/overlap-pane.tsx +3 -0
  100. package/src/plugins/builtin/thirteenf/pane.tsx +3 -0
  101. package/src/plugins/builtin/ticker-detail/overview/model.ts +5 -3
  102. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +4 -4
  103. package/src/plugins/builtin/trace-bonds/detail.tsx +198 -0
  104. package/src/plugins/builtin/trace-bonds/headless.ts +62 -4
  105. package/src/plugins/builtin/trace-bonds/history.ts +155 -0
  106. package/src/plugins/builtin/trace-bonds/pane.tsx +64 -5
  107. package/src/plugins/installer.ts +16 -3
  108. package/src/plugins/plugin-names.ts +11 -2
  109. package/src/remote/controller.ts +9 -2
  110. package/src/remote/schema.ts +2 -1
  111. package/src/renderers/cloudflare/http-proxy.ts +67 -8
  112. package/src/renderers/cloudflare/proxy-session.ts +1 -1
  113. package/src/renderers/cloudflare/worker.ts +29 -2
  114. package/src/renderers/dom/desktop/icons.tsx +0 -2
  115. package/src/renderers/dom/styles.css +0 -3
  116. package/src/renderers/electrobun/bun/desktop/install-records.ts +59 -0
  117. package/src/renderers/electrobun/bun/desktop/installer-folder.ts +208 -592
  118. package/src/renderers/electrobun/bun/desktop/macos-objc.ts +14 -0
  119. package/src/renderers/electrobun/bun/desktop/update.ts +1 -1
  120. package/src/renderers/electrobun/bun/index.ts +19 -13
  121. package/src/renderers/electrobun/bun/window/create.ts +23 -3
  122. package/src/renderers/electrobun/bun/window/electrobun-window-host.ts +4 -4
  123. package/src/renderers/electrobun/bun/window/events.ts +4 -4
  124. package/src/renderers/electrobun/bun/window/frame.ts +2 -1
  125. package/src/renderers/electrobun/bun/window/native-min-size.ts +322 -0
  126. package/src/renderers/electrobun/view/backend-rpc.ts +1 -1
  127. package/src/sources/gloomberb-cloud/index.ts +5 -7
  128. package/src/sources/provider-router/batches.ts +18 -3
  129. package/src/sources/provider-router/financials.ts +18 -4
  130. package/src/types/data-provider.ts +14 -0
  131. package/src/types/financials.ts +15 -3
  132. package/src/types/headless.ts +2 -0
  133. package/src/utils/double-escape-close.ts +38 -16
  134. package/src/utils/format.ts +23 -3
  135. package/src/utils/price-earnings.ts +18 -0
  136. package/patches/electrobun@1.18.1.patch +0 -633
  137. package/src/api-client/types.ts +0 -2441
@@ -1,2441 +0,0 @@
1
- import type { CompanyFrom } from "../types/company-from";
2
- import type {
3
- AnalystResearchData,
4
- CorporateActionsData,
5
- HolderData,
6
- HolderRecord,
7
- OptionsChain,
8
- PriceHistorySource,
9
- Quote,
10
- TickerFinancials,
11
- } from "../types/financials";
12
- import type { SyncSettings, SyncSnapshot } from "../sync/types";
13
- import type { ChatPaneLink } from "./chat-pane-link";
14
- import type { CreditLevelKind } from "./credit-boards";
15
-
16
- /**
17
- * What stands behind a chat account. `discord` is a person on the Gloom
18
- * Discord who has not linked a Gloom account: a ghost with no profile, no DMs.
19
- * A server that predates the field leaves it out, which reads as a human.
20
- */
21
- export type ChatAccountType = "human" | "managed_llm" | "discord";
22
-
23
- /** Where a message was written. A message without one came from the app. */
24
- export type ChatMessageOrigin = "app" | "discord";
25
-
26
- /** A badge an account earns in chat: `team` for Gloom staff, `pro` with Pro access. */
27
- export type ChatUserBadge = "team" | "pro";
28
-
29
- export interface ChatUserSummary {
30
- id: string;
31
- /** A person, a managed assistant (Gloombot), or a Discord user bridged into public channels. */
32
- accountType?: ChatAccountType;
33
- username: string | null;
34
- displayName: string;
35
- bio?: string | null;
36
- company?: string | null;
37
- title?: string | null;
38
- profilePublic?: boolean;
39
- acceptUnknownDms?: boolean;
40
- portfolioAnalytics?: PublicPortfolioAnalytics | null;
41
- /** Badges the account earns. A server that predates them, or a person with none, leaves this out. */
42
- badges?: ChatUserBadge[];
43
- /**
44
- * The person's current offset from UTC in minutes, as their app last
45
- * reported it: left out while they keep their local time hidden.
46
- */
47
- utcOffsetMinutes?: number;
48
- /** The desks (equities, options, ...) the person chose to show; left out unless they did. */
49
- desks?: string[];
50
- }
51
-
52
- /**
53
- * An image in a chat message, as the server stored it: `width`, `height`,
54
- * `size` and `mime` describe the stored copy, not the upload. `url` opens in an
55
- * <img> without headers; signed links last one to two hours, and a fresh copy
56
- * of the message carries a fresh one.
57
- */
58
- export interface ChatAttachment {
59
- id: string;
60
- mime: string;
61
- width: number;
62
- height: number;
63
- size: number;
64
- url: string;
65
- }
66
-
67
- /** Someone who reacted, as a reaction lists the first few. */
68
- export interface ChatReactionUser {
69
- id: string;
70
- username: string | null;
71
- displayName: string;
72
- accountType?: ChatAccountType | null;
73
- }
74
-
75
- /**
76
- * One emoji on a message: how many reacted, whether you did, and the first
77
- * few who did, oldest first. `emoji` is the character, or `:name:` for a
78
- * custom Discord server emoji.
79
- */
80
- export interface ChatReaction {
81
- emoji: string;
82
- count: number;
83
- me: boolean;
84
- users?: ChatReactionUser[];
85
- }
86
-
87
- /** A message's reactions as they stand after a change, from the `chat.reactions` frame or a reaction request. */
88
- export interface ChatReactionsUpdate {
89
- channelId: string;
90
- messageId: string;
91
- reactions: ChatReaction[];
92
- }
93
-
94
- export interface ChatMessage {
95
- id: string;
96
- channelId: string;
97
- content: string;
98
- replyToId: string | null;
99
- createdAt: string;
100
- editedAt?: string | null;
101
- user: ChatUserSummary;
102
- origin?: ChatMessageOrigin;
103
- replyTo?: {
104
- content: string;
105
- user: { id?: string; username: string };
106
- /** Images on the quoted message. */
107
- attachmentCount?: number;
108
- } | null;
109
- /** Images in display order. A server that predates them leaves this out. */
110
- attachments?: ChatAttachment[];
111
- /**
112
- * Emoji reactions in the order they first appeared. Message lists from a
113
- * server that knows reactions always carry it; a live copy of a message
114
- * (an edit) leaves it out, and the reactions held stay.
115
- */
116
- reactions?: ChatReaction[];
117
- /**
118
- * Only on the author's copy of a public message whose images are still being
119
- * checked ("pending") or could not be checked ("failed"). Nobody else has the
120
- * message yet.
121
- */
122
- attachmentReview?: "pending" | "failed";
123
- /** What the message opens in the terminal (a Gloom Wire story or calendar). Only the server sets it. */
124
- paneLink?: ChatPaneLink;
125
- /**
126
- * An announcement Gloom posted, drawn as one. Only the server sets it, and
127
- * only on one that still stands: a retracted announcement is the removal
128
- * placeholder without it.
129
- */
130
- announcement?: true;
131
- clientStatus?: "sending" | "failed";
132
- clientError?: string | null;
133
- /** The idempotency key a local send went out with, so a retry repeats it. */
134
- clientMessageId?: string;
135
- }
136
-
137
- /** Whether this account is tied to a person on the Gloom Discord, and whether its public messages go there. */
138
- export interface ChatDiscordLink {
139
- linked: boolean;
140
- discordUsername?: string;
141
- mirror: boolean;
142
- /** False when the server has linking switched off. A server that predates the field is available. */
143
- available: boolean;
144
- }
145
-
146
- export interface ChatChannel {
147
- id: string;
148
- name: string;
149
- kind?: "public" | "direct" | "group" | "team";
150
- created_at: string;
151
- teamId?: string;
152
- dmUser?: ChatUserSummary | null;
153
- members?: ChatUserSummary[];
154
- /**
155
- * When the newest message you can see in a direct or group conversation was
156
- * sent; null when it has none. Absent from channels of other kinds and from
157
- * servers that do not report it.
158
- */
159
- lastMessageAt?: string | null;
160
- }
161
-
162
- /** Minimal identities scoped by the server to this channel and existing DMs. */
163
- export interface ChatMentionCandidate {
164
- id: string;
165
- username: string;
166
- displayName: string | null;
167
- channelActivityAt: string | null;
168
- conversationActivityAt: string | null;
169
- }
170
-
171
- export interface ChatChannelState {
172
- channelId: string;
173
- notificationsEnabled: boolean;
174
- lastReadMessageId: string | null;
175
- unreadCount: number;
176
- }
177
-
178
- export interface ChatNotification {
179
- id: string;
180
- type: "reply" | "mention" | "channel";
181
- channelId: string;
182
- messageId: string;
183
- createdAt: string;
184
- message: ChatMessage;
185
- }
186
-
187
- export interface ChatStateResponse {
188
- channels: ChatChannel[];
189
- onlineCount: number;
190
- channelStates: ChatChannelState[];
191
- notifications: ChatNotification[];
192
- }
193
-
194
- export interface AuthUser {
195
- id: string;
196
- name: string;
197
- email: string;
198
- username: string | null;
199
- emailVerified: boolean;
200
- image: string | null;
201
- plan?: "free" | "pro";
202
- /** ISO timestamp when the free Pro trial ends; null once it has lapsed or was never started. */
203
- trialEndsAt?: string | null;
204
- /** Plan the server actually entitles right now, i.e. `plan` upgraded to "pro" while a trial is running. */
205
- effectivePlan?: "free" | "pro";
206
- company?: string | null;
207
- title?: string | null;
208
- bio?: string | null;
209
- profilePublic?: boolean;
210
- publicEmail?: string | null;
211
- xAccount?: string | null;
212
- sharedPortfolioId?: string | null;
213
- acceptUnknownDms?: boolean;
214
- chatEmailNotificationsEnabled?: boolean;
215
- portfolioAnalytics?: PublicPortfolioAnalytics | null;
216
- syncEnabled?: boolean;
217
- weeklyRoundupEnabled?: boolean;
218
- positionAlertsEnabled?: boolean;
219
- lastSyncAt?: string | null;
220
- lastRoundupEmailAt?: string | null;
221
- createdAt: string;
222
- updatedAt: string;
223
- }
224
-
225
- export type PersistedAuthUser = Pick<AuthUser, "id" | "emailVerified"> &
226
- Partial<AuthUser>;
227
-
228
- export interface AccountProfile {
229
- id: string;
230
- email: string;
231
- emailVerified: boolean;
232
- plan: "free" | "pro";
233
- /** ISO timestamp when the free Pro trial ends; null once it has lapsed or was never started. */
234
- trialEndsAt?: string | null;
235
- /** Plan the server actually entitles right now, i.e. `plan` upgraded to "pro" while a trial is running. */
236
- effectivePlan?: "free" | "pro";
237
- username: string | null;
238
- name: string;
239
- company: string | null;
240
- title: string | null;
241
- bio: string | null;
242
- profilePublic: boolean;
243
- publicEmail: string | null;
244
- xAccount: string | null;
245
- sharedPortfolioId: string | null;
246
- acceptUnknownDms: boolean;
247
- chatEmailNotificationsEnabled: boolean;
248
- portfolioAnalytics?: PublicPortfolioAnalytics | null;
249
- /** Chat shows your local time on your card. A server that predates the setting leaves it out. */
250
- showLocalTime?: boolean;
251
- /** The desks chat shows beside your name; empty shows none. */
252
- chatDesks?: string[];
253
- /** Your answer to "What do you trade most?" at the first run: private, it pre-fills `chatDesks`. */
254
- onboardingDesks?: string[];
255
- syncEnabled: boolean;
256
- weeklyRoundupEnabled: boolean;
257
- positionAlertsEnabled: boolean;
258
- lastSyncAt: string | null;
259
- lastRoundupEmailAt: string | null;
260
- updatedAt: string | null;
261
- }
262
-
263
- export interface PublicPortfolioAnalytics {
264
- oneYearReturn?: number | null;
265
- spyBeta?: number | null;
266
- /** "account": the broker's own returns. "holdings": estimated from today's holdings. */
267
- basis?: "account" | "holdings" | null;
268
- }
269
-
270
- export interface BuildoutAccountResponse {
271
- user: {
272
- id: string;
273
- email: string;
274
- emailVerified: boolean;
275
- };
276
- subscription: {
277
- product: "buildout";
278
- plan: "free" | "pro";
279
- active: boolean;
280
- billingInterval: "month" | "year" | null;
281
- stripeSubscriptionId: string | null;
282
- stripeSubscriptionStatus: string | null;
283
- };
284
- prices: {
285
- monthly: {
286
- priceId: string;
287
- amountUsd: number;
288
- interval: "month";
289
- };
290
- yearly: {
291
- priceId: string;
292
- amountUsd: number;
293
- interval: "year";
294
- };
295
- };
296
- }
297
-
298
- export interface BuildoutTokenResponse {
299
- token: string;
300
- expiresAt: string;
301
- }
302
-
303
- interface CloudPricingTier {
304
- /** Charged amount, in integer cents. */
305
- amount: number;
306
- }
307
-
308
- /** `/account/cloud`, reduced to the plan fields the apps read. */
309
- export interface CloudAccountPlan {
310
- effectivePlan?: "free" | "pro";
311
- /** Whether a checkout started now comes with the free trial attached. */
312
- trialAvailable?: boolean;
313
- /** The last charge failed; checkout opens the unpaid invoice instead. */
314
- paymentFailed?: boolean;
315
- }
316
-
317
- /** Public `/pricing` payload; no session required. */
318
- export interface CloudPricing {
319
- currency: "usd";
320
- trialDays: number;
321
- monthly: CloudPricingTier;
322
- yearly: CloudPricingTier;
323
- }
324
-
325
- /**
326
- * What an MCP key reaches beyond market data: `data` is market and filing
327
- * tools only, `read` adds notes, teams and collections, `write` lets the agent
328
- * save notes and change collection items.
329
- */
330
- export type McpKeyScope = "data" | "read" | "write";
331
-
332
- /**
333
- * A key just created with `POST /account/mcp/keys`. `token` is the secret,
334
- * which the server never returns again: show it once, never store it.
335
- */
336
- export interface CreatedMcpKey {
337
- token: string;
338
- apiKey: { id: string; name: string; scope: McpKeyScope };
339
- }
340
-
341
- /** The account's private calendar feed link (`/account/calendar-feed`). */
342
- export interface CalendarFeed {
343
- url: string;
344
- createdAt: string;
345
- /** The last time a calendar app read it, to the hour. */
346
- lastFetchedAt: string | null;
347
- }
348
-
349
- /** One command-bar prefix described for `/assist/command`. */
350
- export interface AssistCommandDescriptor {
351
- prefix: string;
352
- name: string;
353
- description?: string;
354
- arg?: {
355
- placeholder?: string;
356
- kind: "text" | "ticker" | "ticker-list";
357
- /** The command also runs with no argument at all. */
358
- optional?: boolean;
359
- /** Named values the argument accepts; a command may take others too (COT takes any CFTC code). */
360
- options?: { value: string; label: string }[];
361
- };
362
- }
363
-
364
- /** A command-bar line the assistant believes answers the query. */
365
- export interface AssistCommandCandidate {
366
- /** Exact command-bar text to run, e.g. "G NVDA AMD". */
367
- input: string;
368
- title: string;
369
- prefix: string;
370
- confidence: number;
371
- }
372
-
373
- export interface AssistCommandResponse {
374
- candidates: AssistCommandCandidate[];
375
- /**
376
- * The server's record of this ask, for the command-search report to point
377
- * at. Only present when the ask was sent with `log: true`.
378
- */
379
- searchId?: string;
380
- }
381
-
382
- export type AccountProfileUpdate = Partial<{
383
- username: string;
384
- name: string;
385
- company: string | null;
386
- title: string | null;
387
- bio: string | null;
388
- profilePublic: boolean;
389
- publicEmail: string | null;
390
- xAccount: string | null;
391
- sharedPortfolioId: string | null;
392
- acceptUnknownDms: boolean;
393
- chatEmailNotificationsEnabled: boolean;
394
- portfolioAnalytics: PublicPortfolioAnalytics | null;
395
- syncEnabled: boolean;
396
- weeklyRoundupEnabled: boolean;
397
- positionAlertsEnabled: boolean;
398
- showLocalTime: boolean;
399
- /** Null or empty shows no desks. */
400
- chatDesks: string[] | null;
401
- }>;
402
-
403
- export interface CloudSyncSnapshotResponse {
404
- snapshot: SyncSnapshot | null;
405
- revision: number | null;
406
- updatedAt: string | null;
407
- settings: SyncSettings;
408
- }
409
-
410
- export interface CloudSyncPushResponse {
411
- revision: number;
412
- updatedAt: string;
413
- settings: SyncSettings;
414
- }
415
-
416
- export interface CloudQuotePayload extends Omit<Quote, "change" | "changePercent" | "priceBasis" | "priceObservation"> {
417
- /** The service labels daily NAV here; the app separates observation kind from price units. */
418
- priceBasis?: Quote["priceBasis"] | "nav";
419
- // JSON encodes the provider's unavailable numeric values as null.
420
- change?: number | null;
421
- changePercent?: number | null;
422
- providerId: "gloomberb-cloud";
423
- dataSource: "live" | "delayed";
424
- }
425
-
426
- export interface CloudFinancialsPayload extends Omit<TickerFinancials, "quote"> {
427
- quote?: CloudQuotePayload;
428
- }
429
-
430
- export interface CloudWorldVenuePayload {
431
- mic: string;
432
- name: string;
433
- title: string;
434
- country: string;
435
- countryCode: string;
436
- city: string;
437
- timezone: string;
438
- latitude: number;
439
- longitude: number;
440
- isOpen: boolean;
441
- timeAfterOpenSeconds?: number;
442
- timeToOpenSeconds?: number;
443
- timeToCloseSeconds?: number;
444
- }
445
-
446
- export interface CloudWorldVenueMapPayload {
447
- providerId: "gloomberb-cloud";
448
- checkedAt: number;
449
- refreshAt: number;
450
- stale?: boolean;
451
- venues: CloudWorldVenuePayload[];
452
- }
453
-
454
- export interface CloudOptionsChainPayload extends OptionsChain {
455
- providerId: "gloomberb-cloud";
456
- }
457
-
458
- interface CloudHolderPayload extends HolderRecord {
459
- providerId: "gloomberb-cloud";
460
- ownerType: "institution";
461
- }
462
-
463
- export interface CloudHoldersPayload extends HolderData {
464
- providerId: "gloomberb-cloud";
465
- holders: CloudHolderPayload[];
466
- }
467
-
468
- export interface CloudAnalystResearchPayload extends AnalystResearchData {
469
- providerId: "gloomberb-cloud";
470
- }
471
-
472
- export interface CloudCorporateActionsPayload extends CorporateActionsData {
473
- providerId: "gloomberb-cloud";
474
- }
475
-
476
- export interface CloudPricePointPayload {
477
- /** @deprecated No longer read; a history's boundary is its response `coverage`. */
478
- historySource?: PriceHistorySource;
479
- date: string;
480
- open?: number;
481
- high?: number;
482
- low?: number;
483
- close: number;
484
- volume?: number;
485
- /**
486
- * One venue's count for a bar whose market volume is unavailable (a US session still trading, counted on IEX
487
- * alone), served in place of `volume`.
488
- */
489
- venueVolume?: { venue: string; volume: number };
490
- /** What a coin bar's volume counts: `aggregate` across venues, or `3 spot venues` summed. */
491
- volumeBasis?: string;
492
- /** A daily bar still forming when served: a coin's UTC day, or the trade date a future is trading. */
493
- partial?: boolean;
494
- /** A coin's daily bar whose prices were rebuilt from hourly bars; a day the source left empty has no volume. */
495
- filled?: boolean;
496
- /** A future's closed session whose settlement is not confirmed yet: it closes on the last trade. */
497
- unsettled?: boolean;
498
- /** A continuous future's calendar bar: the contract it closes on (NGZ26), where the server knows it. */
499
- contract?: string;
500
- }
501
-
502
- type CloudEconImpact = "high" | "medium" | "low";
503
-
504
- export interface CloudEconEventPayload {
505
- id: string;
506
- date: string;
507
- time: string;
508
- country: string;
509
- event: string;
510
- actual: string | null;
511
- forecast: string | null;
512
- prior: string | null;
513
- impact: CloudEconImpact;
514
- /** Rows the calendar adds beside its feeds: a central bank's kept decision or a statistics office's listed release. */
515
- kind?: "central-bank-decision" | "statistics-release";
516
- /** The publisher's own clock time and its IANA zone; null when it states no time. */
517
- localTime?: string | null;
518
- timeZone?: string;
519
- /** Why a row has no time, when its publisher states none. */
520
- timeNote?: string | null;
521
- priorAsOf?: string | null;
522
- referencePeriod?: string | null;
523
- /** Who publishes the release (Freddie Mac for the 30-year mortgage rate), and its page when one is named. */
524
- source?: { name: string; url?: string };
525
- /**
526
- * The indicator this release is of, the same from one release to the next
527
- * (`us-unemployment-rate` on every month's row), where `id` names the one
528
- * row. Absent from a server that names none; exports leave the column empty.
529
- */
530
- indicatorId?: string | null;
531
- /**
532
- * Where the forecast (the consensus) was read from, `week-feed` or
533
- * `release-calendar`, and when that feed was read. Absent on a row with no
534
- * forecast and on one kept before the read was recorded.
535
- */
536
- consensus?: { source: string; readAt: string } | null;
537
- }
538
-
539
- /** One currency's short-term rate, as GET /cloud/econ/short-rates serves it. */
540
- export interface CloudShortRate {
541
- currency: string;
542
- /** "SOFR", "TIIE 28d". */
543
- name: string;
544
- /** "overnight" or the term the rate is for. */
545
- tenor: string;
546
- tenorDays: number;
547
- /** Days in the year the rate is quoted over. */
548
- dayCountBasis: 360 | 365;
549
- publisher: string;
550
- sourceUrl: string;
551
- /** Percent a year; null when it could not be read. */
552
- value: number | null;
553
- /** The day the rate is for. */
554
- asOf: string | null;
555
- fetchedAt: string | null;
556
- stale: boolean;
557
- unavailableReason: string | null;
558
- }
559
-
560
- export interface CloudShortRatesPayload {
561
- generatedAt: string;
562
- rates: CloudShortRate[];
563
- }
564
-
565
- /** CPI, payrolls and FOMC statement days as published, as GET /cloud/econ/release-days serves them. */
566
- export interface CloudMacroReleaseDaysPayload {
567
- /** When the publishers' pages were read, ISO. */
568
- checkedAt: string;
569
- /** The last New York day the lists are complete for. */
570
- coveredThrough: string;
571
- sources: string[];
572
- /** New York dates, oldest first. Brazil's IPCA days when the server can vouch for them. */
573
- releases: Record<"cpi" | "jobs" | "fomc", string[]> & { ipca?: string[] };
574
- /** Each kind's figures by New York release day, for the days they are known. */
575
- figures?: Partial<Record<"cpi" | "jobs" | "fomc" | "ipca", Record<string, {
576
- event: string;
577
- actual: string | null;
578
- forecast: string | null;
579
- prior: string | null;
580
- /** Above the consensus (hot), below it (cool), at it (in-line); null without both. */
581
- surprise: "hot" | "cool" | "in-line" | null;
582
- }>>>;
583
- }
584
-
585
- export interface CloudFredObservationPayload {
586
- date: string;
587
- value: number | null;
588
- /**
589
- * Who published a value FRED does not list yet, such as a Treasury yield
590
- * Gloom Cloud read from the Treasury first. Absent on FRED's own values.
591
- */
592
- publisher?: string;
593
- /** When that publisher's value was first read, ISO in UTC. */
594
- publishedAt?: string;
595
- /**
596
- * The day FRED's source released this value (`YYYY-MM-DD`), on the newest
597
- * observation of a weekly to annual series: September's permits are dated
598
- * 1 Sep and were released 20 Oct. Absent on daily series and older points.
599
- */
600
- releasedOn?: string;
601
- }
602
-
603
- export interface CloudFredSeriesInfoPayload {
604
- id: string;
605
- title: string;
606
- units: string;
607
- frequency: string;
608
- seasonalAdjustment: string;
609
- source: string;
610
- notes: string;
611
- lastUpdated?: string;
612
- observationStart?: string;
613
- observationEnd?: string;
614
- }
615
-
616
- export interface CloudFredSeriesPayload {
617
- observations: CloudFredObservationPayload[];
618
- info: CloudFredSeriesInfoPayload | null;
619
- fetchedAt?: string;
620
- stale?: boolean;
621
- coverage?: { observations: "available"; info: "available" | "unavailable" };
622
- }
623
-
624
- /** The FRED series Gloom Cloud serves, from `GET /cloud/econ/series`; any other id is refused. */
625
- export interface CloudFredSeriesCatalogPayload {
626
- series: Array<{ id: string; title?: string | null; group?: string | null }>;
627
- }
628
-
629
- /**
630
- * One month of Robert Shiller's dataset. FRED carries no long-run S&P earnings,
631
- * so this is what every earnings-based valuation ratio is built from.
632
- */
633
- interface CloudShillerObservationPayload {
634
- date: string;
635
- price: number | null;
636
- dividend: number | null;
637
- earnings: number | null;
638
- cpi: number | null;
639
- longRate: number | null;
640
- cape: number | null;
641
- /** CAPE earnings yield over the real 10-year rate; Shiller's equity risk premium. */
642
- excessCapeYield: number | null;
643
- }
644
-
645
- export interface CloudShillerPayload {
646
- observations: CloudShillerObservationPayload[];
647
- sourceUrl: string;
648
- fetchedAt: string;
649
- }
650
-
651
- /** One publicly disseminated single-name CDS transaction report. */
652
- export interface CloudCdsTradePayload {
653
- disseminationId: string;
654
- originalDisseminationId: string | null;
655
- actionType: string;
656
- eventTimestamp: string;
657
- executionTimestamp: string | null;
658
- effectiveDate: string | null;
659
- expirationDate: string | null;
660
- maturityDate: string | null;
661
- issuerName: string | null;
662
- underlierId: string | null;
663
- underlierIdSource: string | null;
664
- upi: string | null;
665
- upiFisn: string | null;
666
- upiUnderlierName: string | null;
667
- notionalAmount: number | null;
668
- /** Reported notional is a regulatory cap, so the real trade was at least this size. */
669
- notionalCapped: boolean;
670
- notionalCurrency: string | null;
671
- fixedRate: number | null;
672
- reportedSpread: number | null;
673
- /** Unit of `reportedSpread`, e.g. basis points or percent. */
674
- spreadNotation: string | null;
675
- upfrontAmount: number | null;
676
- upfrontCurrency: string | null;
677
- }
678
-
679
- export interface CloudCdsResponse {
680
- source: string;
681
- asOf: string | null;
682
- trades: CloudCdsTradePayload[];
683
- }
684
-
685
- /** One New York trade date of an issuer's on-the-run 5Y spread. */
686
- export interface CloudCdsHistoryPointPayload {
687
- date: string;
688
- /** Median of the day's prints in basis points. */
689
- spreadBp: number;
690
- prints: number;
691
- /** Prints that reported the spread; the rest were converted from their upfront. */
692
- reported: number;
693
- /** The contract on the run that day, e.g. "2031-12-20". */
694
- maturity: string;
695
- /** For a line quoted upfront: that day's level in points on the line's coupon. */
696
- upfrontPts?: number;
697
- /** The day's trades, or the settlement price on a day without enough of them (`prints` 0). */
698
- kind?: CreditLevelKind;
699
- }
700
-
701
- /**
702
- * Past 2,000bp a name is quoted in points upfront on its running coupon, the
703
- * level and its moves alike; `spreadBp` and the bp moves stay beside them.
704
- * Absent from servers before it, which read as `spread`.
705
- */
706
- interface CloudCdsUpfrontQuote {
707
- quote?: "spread" | "upfront";
708
- /** The line's running coupon, bp. */
709
- couponBp?: number | null;
710
- upfrontPts?: number | null;
711
- change1WPts?: number | null;
712
- change1MPts?: number | null;
713
- }
714
-
715
- export interface CloudCdsHistoryResponse extends CloudCdsUpfrontQuote {
716
- source: string;
717
- /** The matched reference entity, or null when nothing on the tape matched. */
718
- issuer: string | null;
719
- tenor: string;
720
- currency: string | null;
721
- asOf: string | null;
722
- points: CloudCdsHistoryPointPayload[];
723
- /**
724
- * The last point's move over a week and a month in bp, on one contract and
725
- * chained through the contract before across a roll, as the index board's.
726
- * Null without a comparable level, or once the level is more than 5 trading
727
- * days behind the tape; absent from servers before them.
728
- */
729
- change1W?: number | null;
730
- change1M?: number | null;
731
- /**
732
- * Why the line has no level in the month to its newest print, when one
733
- * cause explains it: `upfront-side-unknown` when the prints carry an
734
- * upfront without the side that paid it and nothing else places the level.
735
- */
736
- noLevelReason?: string | null;
737
- }
738
-
739
- /** An issuer's latest 5Y level: the last point of its history over the last month. */
740
- export interface CloudCdsLevelPayload extends CloudCdsUpfrontQuote {
741
- /** The reference entity as the history response names it. */
742
- issuer: string;
743
- spreadBp: number;
744
- date: string;
745
- /** As the history response's last point. */
746
- kind?: CreditLevelKind;
747
- /** As the history response's moves for the same name. */
748
- change1W?: number | null;
749
- change1M?: number | null;
750
- }
751
-
752
- export interface CloudCdsLevelsResponse {
753
- source: string;
754
- tenor: string;
755
- asOf: string | null;
756
- /** Every issuer traded in the last month whose 5Y line has a level in it. */
757
- levels: CloudCdsLevelPayload[];
758
- }
759
-
760
- interface CloudShortInterestPointPayload {
761
- settlementDate: string;
762
- shortPercentFloat?: number | null;
763
- /** The 10-K or 10-Q cover share count known when FINRA published the settlement. Absent on servers older than the field. */
764
- sharesOutstanding?: number;
765
- /** YYYY-MM-DD that count was taken. */
766
- sharesOutstandingAsOf?: string;
767
- sharesShort: number;
768
- previousSharesShort: number | null;
769
- averageDailyVolume: number | null;
770
- daysToCover: number | null;
771
- changePercent: number | null;
772
- revised: boolean;
773
- }
774
-
775
- export interface CloudShortInterestPayload {
776
- source?: "finra" | "gloom";
777
- symbol: string;
778
- issueName: string | null;
779
- points: CloudShortInterestPointPayload[];
780
- }
781
-
782
- export interface CloudYieldPointPayload {
783
- maturity: string;
784
- maturityYears: number;
785
- yield: number | null;
786
- /** FRED observation date. Absent on servers older than the field. */
787
- asOf?: string | null;
788
- fetchedAt?: string;
789
- stale?: boolean;
790
- }
791
-
792
- type CloudCongressTradeSide = "BUY" | "SELL" | "EXCHANGE" | "OTHER";
793
-
794
- export interface CloudCongressTradePayload {
795
- id: string;
796
- chamber: "house" | "senate";
797
- filingId: string;
798
- docId: string;
799
- memberName: string;
800
- stateDistrict: string;
801
- filingDate: string;
802
- transactionDate: string | null;
803
- notificationDate: string | null;
804
- lagDays: number | null;
805
- side: CloudCongressTradeSide;
806
- transactionType: string;
807
- ticker: string | null;
808
- assetName: string;
809
- assetType: string | null;
810
- owner: string;
811
- rawOwner: string;
812
- amount: string;
813
- amountLow: number | null;
814
- amountHigh: number | null;
815
- capGainsOver200: boolean | null;
816
- filingStatus: string | null;
817
- subholdingOf: string | null;
818
- description: string | null;
819
- sourceUrl: string;
820
- returnSinceTx?: number | null;
821
- returnSinceFiling?: number | null;
822
- /** SPY's return over the same days as returnSinceTx, percent. */
823
- spyReturnSinceTx?: number | null;
824
- spyReturnSinceFiling?: number | null;
825
- /** returnSinceTx less spyReturnSinceTx, percentage points. */
826
- excessSinceTx?: number | null;
827
- excessSinceFiling?: number | null;
828
- returnAsOf?: string | null;
829
- party?: string | null;
830
- committees?: string[];
831
- }
832
-
833
- export interface CloudCongressMemberPayload {
834
- id: string;
835
- memberName: string;
836
- stateDistrict: string;
837
- tradeCount: number;
838
- buyCount: number;
839
- sellCount: number;
840
- exchangeCount: number;
841
- otherCount: number;
842
- estimatedLow: number | null;
843
- estimatedHigh: number | null;
844
- lastFilingDate: string | null;
845
- avgLagDays: number | null;
846
- medianReturn?: number | null;
847
- /** Median of the trades' excessSinceFiling. */
848
- medianExcessSinceFiling?: number | null;
849
- buyHitRate?: number | null;
850
- pricedTradeCount?: number;
851
- pricedBuyCount?: number;
852
- excessTradeCount?: number;
853
- party?: string | null;
854
- committees?: string[];
855
- }
856
-
857
- export interface CloudCongressTickerPayload {
858
- ticker: string;
859
- tradeCount: number;
860
- buyCount: number;
861
- sellCount: number;
862
- exchangeCount: number;
863
- otherCount: number;
864
- memberCount: number;
865
- memberIds: string[];
866
- estimatedLow: number | null;
867
- estimatedHigh: number | null;
868
- lastFilingDate: string | null;
869
- }
870
-
871
- export interface CloudCongressHousePayload {
872
- asOf: string;
873
- /** "all" pages both chambers' filings as one date-ordered index. */
874
- chamber: "house" | "senate" | "all";
875
- source: "house-clerk" | "senate-efd" | "congress";
876
- year: number;
877
- indexUpdatedAt: string | null;
878
- filingsScanned: number;
879
- /** Filings in the window the server could read. */
880
- filingsParsed?: number;
881
- /** Filings the source refused; the server retries them on its own schedule. */
882
- filingsFailed?: number;
883
- /** Filings left unread because the server's daily document budget is spent. */
884
- filingsPending?: number;
885
- /** Scanned Senate paper filings: listed and linked, not read. */
886
- filingsPaper?: number;
887
- /** The merged feed could not reach the Senate source; this window is House only. */
888
- senateUnavailable?: boolean;
889
- filingCount: number;
890
- filingOffset?: number;
891
- hasMore?: boolean;
892
- hasMoreFilings?: boolean;
893
- nextOffset?: number;
894
- nextFilingOffset?: number;
895
- trades: CloudCongressTradePayload[];
896
- members: CloudCongressMemberPayload[];
897
- tickers?: CloudCongressTickerPayload[];
898
- }
899
-
900
- export interface CloudEarningsCallPayload {
901
- id: string;
902
- ticker: string;
903
- companyName: string | null;
904
- fiscalYear: number | null;
905
- fiscalQuarter: number | null;
906
- callAt: string | null;
907
- status: string;
908
- durationSeconds: number | null;
909
- wordCount: number | null;
910
- hasTranscript: boolean;
911
- sentiment: number | null;
912
- /** The replay or event page the transcript came from. */
913
- webcastUrl?: string | null;
914
- /**
915
- * Whether `callAt` is the call's start or its day alone (00:00 UTC of that
916
- * New York day). Absent from a server that predates it.
917
- */
918
- callTimeKnown?: boolean;
919
- /**
920
- * "other" for an event that is not an earnings call (a deal call, a
921
- * conference, an investor day), named by eventLabel and with no fiscal
922
- * period; null when unclear. Older servers omit both.
923
- */
924
- eventKind?: "earnings" | "other" | null;
925
- eventLabel?: string | null;
926
- }
927
-
928
- interface CloudJobsSeriesPoint {
929
- day: string;
930
- open: number;
931
- /** Null on the first observed day, when the whole board is seen for the first time. */
932
- new: number | null;
933
- closed: number;
934
- /** Open standing roles the company hires for continuously. */
935
- evergreen?: number;
936
- /** Open contract and temporary roles. */
937
- contract?: number;
938
- }
939
-
940
- export interface CloudJobsBucket {
941
- id: string;
942
- label: string;
943
- count: number;
944
- share: number;
945
- /** Count 30 days ago from the daily roll-up, when the history reaches back. */
946
- previous: number | null;
947
- }
948
-
949
- export interface CloudJobsPosting {
950
- id: number;
951
- title: string;
952
- function: string | null;
953
- seniority: string | null;
954
- location: string | null;
955
- country: string | null;
956
- remote: boolean | null;
957
- employmentKind?: string | null;
958
- /** A standing posting for a continuous-hiring role; null when unjudged. */
959
- evergreen?: boolean | null;
960
- postedAt: string | null;
961
- postedPrecision: "exact" | "approximate" | "floor" | null;
962
- firstSeenAt: string;
963
- url: string | null;
964
- salaryMin: number | null;
965
- salaryMax: number | null;
966
- salaryCurrency: string | null;
967
- salaryPeriod: string | null;
968
- tags: string[];
969
- }
970
-
971
- /** One posting as its detail view reads it. */
972
- export interface CloudJobsPostingDetail extends CloudJobsPosting {
973
- /** The careers system's own id. */
974
- externalId: string;
975
- /** As the careers system writes it ("Full time", "FULL_TIME", "CDI"). */
976
- employmentType: string | null;
977
- /** The start of the role's description, as read from its page. */
978
- description: string | null;
979
- closedAt: string | null;
980
- }
981
-
982
- export interface CloudJobsChange {
983
- count: number;
984
- percent: number | null;
985
- }
986
-
987
- export interface CloudJobsSummaryPayload {
988
- status: "ok";
989
- ticker: string;
990
- companyName: string | null;
991
- coverage: {
992
- status: string;
993
- vendor: string | null;
994
- careersUrl: string | null;
995
- lastCollectedAt: string | null;
996
- firstObservedAt: string | null;
997
- daysObserved: number;
998
- employeeCount: number | null;
999
- };
1000
- openCount: number;
1001
- openPerThousandEmployees: number | null;
1002
- new7d: number;
1003
- new30d: number;
1004
- closed30d: number;
1005
- change30d: CloudJobsChange | null;
1006
- change90d: CloudJobsChange | null;
1007
- /** False when the careers system re-dates every role on refresh, so dates are withheld. */
1008
- datesReliable?: boolean;
1009
- /** Open postings the system dates within the last 30 days. */
1010
- posted30d?: number | null;
1011
- remoteShare: number | null;
1012
- /**
1013
- * Open roles that are standing postings for continuous-hiring positions
1014
- * (baristas, servers, store associates, nurses). One more of those says
1015
- * nothing about the company's plans; open minus evergreen is the count of
1016
- * specific roles.
1017
- */
1018
- evergreenCount?: number;
1019
- evergreenShare?: number | null;
1020
- /** Share of open roles that are contract or temporary, among those known. */
1021
- contractShare?: number | null;
1022
- medianAgeDays: number | null;
1023
- series: CloudJobsSeriesPoint[];
1024
- /** The current backlog by how long each role has been posted. */
1025
- ageBuckets?: Array<{ id: string; label: string; count: number }>;
1026
- functions: CloudJobsBucket[];
1027
- countries: CloudJobsBucket[];
1028
- seniority: CloudJobsBucket[];
1029
- tags: CloudJobsBucket[];
1030
- salary: {
1031
- count: number;
1032
- currency: string;
1033
- period: string;
1034
- medianMin: number;
1035
- medianMax: number;
1036
- byFunction: Array<{ id: string; label: string; count: number; medianMin: number; medianMax: number }>;
1037
- } | null;
1038
- recent: CloudJobsPosting[];
1039
- }
1040
-
1041
- interface CloudJobsPendingPayload {
1042
- status: "pending";
1043
- ticker: string;
1044
- queued: boolean;
1045
- message: string;
1046
- }
1047
-
1048
- export type CloudJobsResponse = CloudJobsSummaryPayload | CloudJobsPendingPayload;
1049
-
1050
- export interface CloudJobsPostingsPayload {
1051
- postings: CloudJobsPosting[];
1052
- total: number;
1053
- }
1054
-
1055
- export interface CloudJobsMoverPayload {
1056
- ticker: string;
1057
- companyName: string | null;
1058
- openCount: number;
1059
- employeeCount: number | null;
1060
- change30d: CloudJobsChange | null;
1061
- /** Open roles the system dates within the last 30 days, null when its dates cannot be read. */
1062
- posted30d?: number | null;
1063
- new7d: number;
1064
- topFunction: string | null;
1065
- topCountry?: { code: string; share: number } | null;
1066
- }
1067
-
1068
- export interface CloudJobsMoversPayload {
1069
- asOf: string;
1070
- covered: number;
1071
- /** Companies in the ranking; `movers` is one page of them. */
1072
- total?: number;
1073
- movers: CloudJobsMoverPayload[];
1074
- }
1075
-
1076
- export interface CloudEarningsCallListPayload {
1077
- calls: CloudEarningsCallPayload[];
1078
- /** Set when asking about a company started a search that is still running. */
1079
- pending?: boolean;
1080
- /** Set when the requested symbol is not one the SEC knows. */
1081
- unknownTicker?: boolean;
1082
- /** The company's home line the calls are read from, when not the listing asked (a receipt, a foreign line). */
1083
- companyFrom?: CompanyFrom;
1084
- }
1085
-
1086
- /** One row of a proxy statement's Summary Compensation Table, in dollars. */
1087
- export interface CloudExecutiveRowPayload {
1088
- name: string;
1089
- title: string;
1090
- salary: number | null;
1091
- bonus: number | null;
1092
- stockAwards: number | null;
1093
- optionAwards: number | null;
1094
- nonEquityIncentive: number | null;
1095
- pensionAndDeferred: number | null;
1096
- allOther: number | null;
1097
- total: number | null;
1098
- }
1099
-
1100
- interface CloudProxyStatementSummaryPayload {
1101
- id: string;
1102
- ticker: string;
1103
- company: {
1104
- ticker: string;
1105
- cik: string | null;
1106
- name: string;
1107
- shortName: string;
1108
- };
1109
- /** Year of the filing date: what people call "the 2026 proxy". */
1110
- proxyYear: number;
1111
- fiscalYear: number | null;
1112
- fiscalYearLabel: string | null;
1113
- filedAt: string;
1114
- meetingDate: string | null;
1115
- updatedAt: string;
1116
- ceoName: string | null;
1117
- ceoTitle: string | null;
1118
- ceoTotal: number | null;
1119
- ceoPriorYearTotal: number | null;
1120
- payRatio: number | null;
1121
- medianEmployeePay: number | null;
1122
- }
1123
-
1124
- export interface CloudProxyStatementPayload extends CloudProxyStatementSummaryPayload {
1125
- /**
1126
- * `preview` for an account without Pro: each executive's total pay from
1127
- * the latest proxy, with the breakdown, the year before, the pay ratio,
1128
- * say-on-pay, highlights, key figures and other years null or empty.
1129
- * Absent on Pro's full statement.
1130
- */
1131
- access?: "preview";
1132
- docUrl: string;
1133
- ceo: (CloudExecutiveRowPayload & { priorYearTotal: number | null }) | null;
1134
- namedExecutives: CloudExecutiveRowPayload[];
1135
- sayOnPayPriorSupport: number | null;
1136
- highlights: string | null;
1137
- keyFigures: CloudTranscriptKeyFigurePayload[];
1138
- otherYears: CloudProxyStatementSummaryPayload[];
1139
- }
1140
-
1141
- interface CloudRiskFactorPayload {
1142
- heading: string;
1143
- group: string | null;
1144
- excerpt: string;
1145
- words: number;
1146
- }
1147
-
1148
- export interface CloudRiskNotePayload {
1149
- /** Position of the risk in `risks` (or in the prior year's list, for removed). */
1150
- index: number;
1151
- text: string;
1152
- }
1153
-
1154
- interface CloudRiskReportSummaryPayload {
1155
- id: string;
1156
- ticker: string;
1157
- company: {
1158
- ticker: string;
1159
- cik: string | null;
1160
- name: string;
1161
- shortName: string;
1162
- };
1163
- /** Year of the filing date: "the 2026 10-K". */
1164
- reportYear: number;
1165
- filedAt: string;
1166
- updatedAt: string;
1167
- riskCount: number;
1168
- groupCount: number;
1169
- wordCount: number;
1170
- addedCount: number | null;
1171
- removedCount: number | null;
1172
- rewordedCount: number | null;
1173
- overview: string | null;
1174
- }
1175
-
1176
- export interface CloudRiskReportPayload extends CloudRiskReportSummaryPayload {
1177
- docUrl: string;
1178
- groups: string[];
1179
- risks: CloudRiskFactorPayload[];
1180
- diff: {
1181
- added: number[];
1182
- removed: Array<{ heading: string; group: string | null; excerpt: string }>;
1183
- reworded: Array<{
1184
- index: number;
1185
- similarity: number;
1186
- headingChanged: boolean;
1187
- priorHeading: string | null;
1188
- }>;
1189
- matched: number;
1190
- priorRiskCount: number;
1191
- } | null;
1192
- notes: {
1193
- added: CloudRiskNotePayload[];
1194
- removed: CloudRiskNotePayload[];
1195
- reworded: CloudRiskNotePayload[];
1196
- top: CloudRiskNotePayload[];
1197
- };
1198
- otherYears: CloudRiskReportSummaryPayload[];
1199
- }
1200
-
1201
- export interface CloudRiskReportListPayload {
1202
- company: {
1203
- ticker: string;
1204
- cik: string | null;
1205
- name: string;
1206
- shortName: string;
1207
- } | null;
1208
- reports: CloudRiskReportSummaryPayload[];
1209
- }
1210
-
1211
- interface CloudFilingPersonPayload {
1212
- name: string;
1213
- role: string;
1214
- action: string;
1215
- effective: string | null;
1216
- }
1217
-
1218
- /** An 8-K, classified by its items and, when it carried news, read. */
1219
- export interface CloudFilingEventPayload {
1220
- id: string;
1221
- ticker: string;
1222
- company: {
1223
- ticker: string;
1224
- cik: string | null;
1225
- name: string;
1226
- shortName: string;
1227
- };
1228
- filedAt: string;
1229
- /** Verified SEC filing calendar date; filedAt may instead be an acceptance instant. */
1230
- filingDate?: string | null;
1231
- /** "8-K", or "8-K/A" for an amendment. Older servers omit it. */
1232
- form?: string;
1233
- docUrl: string;
1234
- items: string[];
1235
- labels: string[];
1236
- kinds: string[];
1237
- material: boolean;
1238
- headline: string | null;
1239
- summary: string | null;
1240
- people: CloudFilingPersonPayload[];
1241
- /** True when the headline and points are the model's reading rather than the item labels. */
1242
- read: boolean;
1243
- }
1244
-
1245
- export interface CloudProxyStatementListPayload {
1246
- company: {
1247
- ticker: string;
1248
- cik: string | null;
1249
- name: string;
1250
- shortName: string;
1251
- };
1252
- proxies: CloudProxyStatementSummaryPayload[];
1253
- /** `preview` for an account without Pro: the latest proxy alone, without the year before or the pay ratio. */
1254
- access?: "preview";
1255
- }
1256
-
1257
- export interface CloudTranscriptTurnPayload {
1258
- speaker: string;
1259
- role?: string;
1260
- company?: string;
1261
- text: string;
1262
- /** `text` cut where the speaker paused or changed topic; absent on older transcripts. */
1263
- paragraphs?: string[];
1264
- isQa: boolean;
1265
- /** Offset into the recording; null when the company published the transcript as a document. */
1266
- startSeconds: number | null;
1267
- /** Where each of `paragraphs` starts in the recording, in seconds; absent without timings or on older servers. */
1268
- paragraphStarts?: number[];
1269
- }
1270
-
1271
- interface CloudTranscriptKeyFigurePayload {
1272
- /** What the number is, e.g. "Q3 revenue guidance". */
1273
- label: string;
1274
- /** As management said it, e.g. "$108B ± 2%". */
1275
- value: string;
1276
- /** Comparison or qualifier, e.g. "vs $96B in Q2". */
1277
- note?: string;
1278
- }
1279
-
1280
- interface CloudTranscriptParticipantPayload {
1281
- name: string;
1282
- role?: string;
1283
- company?: string;
1284
- }
1285
-
1286
- export interface CloudEarningsTranscriptPayload {
1287
- id: string;
1288
- ticker: string;
1289
- companyName: string | null;
1290
- fiscalYear: number | null;
1291
- fiscalQuarter: number | null;
1292
- /**
1293
- * "other" for an event that is not an earnings call (a deal call, a
1294
- * conference, an investor day), named by eventLabel and with no fiscal
1295
- * period; null when unclear. Older servers omit both.
1296
- */
1297
- eventKind?: "earnings" | "other" | null;
1298
- eventLabel?: string | null;
1299
- callAt: string | null;
1300
- timing: string | null;
1301
- webcastUrl: string | null;
1302
- durationSeconds: number | null;
1303
- status: string;
1304
- fullText: string;
1305
- turns: CloudTranscriptTurnPayload[];
1306
- participants: CloudTranscriptParticipantPayload[];
1307
- /** The numbers management gave, picked for a card; empty on older transcripts. */
1308
- keyFigures?: CloudTranscriptKeyFigurePayload[];
1309
- summary: string | null;
1310
- guidance: string | null;
1311
- riskFactors: string | null;
1312
- analystFocus: string | null;
1313
- notable: string | null;
1314
- sentiment: number | null;
1315
- sentimentRationale: string | null;
1316
- qaStartTurn: number | null;
1317
- wordCount: number | null;
1318
- asrModel: string | null;
1319
- updatedAt: string | null;
1320
- }
1321
-
1322
- /**
1323
- * A call's audio to play beside its transcript. `kind` names what it is; a
1324
- * stored recording is the only kind so far.
1325
- */
1326
- export interface CloudEarningsCallAudioPayload {
1327
- kind: "recording";
1328
- /** A signed address that plays until `expiresAt`, seeking included. */
1329
- url: string;
1330
- expiresAt: string;
1331
- durationSeconds: number | null;
1332
- bytes?: number;
1333
- contentType?: string;
1334
- }
1335
-
1336
- export type CloudSearchDocType = "transcript" | "news" | "filing";
1337
-
1338
- export type CloudSearchSort = "relevance" | "newest" | "oldest";
1339
-
1340
- /**
1341
- * Per-chunk provenance. Which keys are present depends on `docType`: transcripts
1342
- * carry speaker attribution, news carries the wire source, filings carry the
1343
- * form and section. Kept as one optional-key record so an unknown docType from a
1344
- * newer server still renders instead of failing to parse.
1345
- */
1346
- export interface CloudSearchChunkMetadata {
1347
- speaker?: string;
1348
- role?: string;
1349
- company?: string;
1350
- isQa?: boolean;
1351
- startSeconds?: number;
1352
- turnIndex?: number;
1353
- source?: string;
1354
- summary?: string;
1355
- form?: string;
1356
- accession?: string;
1357
- section?: string;
1358
- }
1359
-
1360
- export interface CloudSearchHit {
1361
- id: string;
1362
- docType: CloudSearchDocType;
1363
- sourceId: string;
1364
- chunkIndex: number;
1365
- ticker: string;
1366
- publishedAt: string;
1367
- title: string;
1368
- url: string;
1369
- /** Matched terms wrapped in `<mark>`, fragments joined by an ellipsis. */
1370
- snippet: string;
1371
- score: number;
1372
- metadata: CloudSearchChunkMetadata;
1373
- /**
1374
- * Chunks of this document that matched. Only sent for a distinct search,
1375
- * where the row stands for the document rather than for one chunk.
1376
- */
1377
- matchCount?: number;
1378
- }
1379
-
1380
- export interface CloudSearchResponse {
1381
- hits: CloudSearchHit[];
1382
- total: number;
1383
- /** The server stopped counting past its cap, so `total` is a lower bound. */
1384
- countCapped: boolean;
1385
- hasMore: boolean;
1386
- nextOffset: number;
1387
- tookMs: number;
1388
- }
1389
-
1390
- interface CloudSearchDocumentChunk {
1391
- id: string;
1392
- chunkIndex: number;
1393
- body: string;
1394
- metadata: CloudSearchChunkMetadata;
1395
- }
1396
-
1397
- export interface CloudSearchDocument {
1398
- docType: CloudSearchDocType;
1399
- sourceId: string;
1400
- ticker: string;
1401
- title: string;
1402
- url: string;
1403
- publishedAt: string;
1404
- chunks: CloudSearchDocumentChunk[];
1405
- }
1406
-
1407
- export interface CloudSearchDocumentResponse {
1408
- document: CloudSearchDocument;
1409
- }
1410
-
1411
- export interface CloudSavedSearchFilters {
1412
- tickers?: string[];
1413
- docTypes?: CloudSearchDocType[];
1414
- sources?: string[];
1415
- from?: string;
1416
- to?: string;
1417
- }
1418
-
1419
- export interface CloudSavedSearch {
1420
- id: string;
1421
- name: string;
1422
- query: string;
1423
- filters: CloudSavedSearchFilters;
1424
- alertEnabled: boolean;
1425
- alertChannels: string[];
1426
- lastRunAt: string | null;
1427
- lastMatchAt: string | null;
1428
- matchCount: number;
1429
- createdAt: string;
1430
- }
1431
-
1432
- export interface CloudSavedSearchListResponse {
1433
- searches: CloudSavedSearch[];
1434
- }
1435
-
1436
- export interface CloudSavedSearchInput {
1437
- name: string;
1438
- query: string;
1439
- filters?: CloudSavedSearchFilters;
1440
- alertEnabled?: boolean;
1441
- alertChannels?: string[];
1442
- }
1443
-
1444
- interface CloudSecFilingPayload {
1445
- accessionNumber: string;
1446
- form: string;
1447
- filingDate: string;
1448
- acceptedAt?: string;
1449
- /** Unmodified SEC acceptanceDateTime; a missing timezone is not inferred. */
1450
- acceptedAtRaw?: string;
1451
- primaryDocument?: string;
1452
- primaryDocDescription?: string;
1453
- items?: string;
1454
- /** SEC's period of report, YYYY-MM-DD: a 10-Q's or 10-K's balance-sheet date. Absent from older servers. */
1455
- reportDate?: string;
1456
- cik: string;
1457
- companyName?: string;
1458
- filingUrl: string;
1459
- primaryDocumentUrl?: string;
1460
- /** The filing's SEC file number for this company, empty when it has none. Absent from older servers. */
1461
- fileNumber?: string;
1462
- /** In a fund's list from a trust that runs several funds: filed for the fund's own series. Absent from older servers. */
1463
- fundSeries?: boolean;
1464
- }
1465
-
1466
- interface CloudSecDocumentPayload {
1467
- sequence?: string;
1468
- type: string;
1469
- description?: string;
1470
- document: string;
1471
- url: string;
1472
- size?: string;
1473
- isPrimary: boolean;
1474
- }
1475
-
1476
- export interface CloudSecFilingsResponse {
1477
- filings: CloudSecFilingPayload[];
1478
- hasMore: boolean;
1479
- nextOffset: number;
1480
- /** The company's home line the filings are read from, when not the listing asked (a foreign line). */
1481
- companyFrom?: CompanyFrom;
1482
- }
1483
-
1484
- export interface CloudSecDocumentsResponse {
1485
- documents: CloudSecDocumentPayload[];
1486
- }
1487
-
1488
- interface CloudSecForm4Payload {
1489
- filingDate: string;
1490
- reportedName: string;
1491
- title: string;
1492
- transactionType: "P" | "S" | "A" | "D" | "";
1493
- shares: number;
1494
- pricePerShare: number | null;
1495
- totalValue: number | null;
1496
- sharesOwned: number | null;
1497
- form: string;
1498
- }
1499
-
1500
- export interface CloudSecContentResponse {
1501
- content: string | null;
1502
- form4: CloudSecForm4Payload | null;
1503
- }
1504
-
1505
- interface CloudNewsEntityPayload {
1506
- id: string;
1507
- entityType: string;
1508
- name: string;
1509
- symbol: string | null;
1510
- exchange: string | null;
1511
- canonicalTicker: string | null;
1512
- role: string | null;
1513
- confidence: number | null;
1514
- }
1515
-
1516
- interface CloudNewsTickerLinkPayload {
1517
- symbol: string;
1518
- exchange: string;
1519
- canonicalTicker: string;
1520
- relationType: string;
1521
- displayTier: "primary" | "related";
1522
- confidence: number;
1523
- relevanceScore: number;
1524
- impactScore?: number;
1525
- /** The company's market cap, stated on its home listing and not on a cross-listing. */
1526
- marketCap?: number | null;
1527
- sentiment?: "positive" | "neutral" | "negative" | null;
1528
- }
1529
-
1530
- export interface CloudNewsStoryItemPayload {
1531
- id: string;
1532
- sourceKey: string;
1533
- sourceName: string;
1534
- title: string;
1535
- summary?: string;
1536
- url: string;
1537
- publishedAt: string;
1538
- hasArticleText?: boolean;
1539
- }
1540
-
1541
- export interface CloudNewsPayload {
1542
- id: string;
1543
- headline: string;
1544
- summary: string;
1545
- topic?: string;
1546
- topics?: string[];
1547
- category: string;
1548
- sentiment: "positive" | "neutral" | "negative";
1549
- sectors: string[];
1550
- scope?: string;
1551
- firstPublishedAt: string;
1552
- lastPublishedAt: string;
1553
- firstSeenAt: string;
1554
- lastSeenAt: string;
1555
- primaryUrl: string;
1556
- /** Routing key of the representative item, for source filters. */
1557
- primarySource: string;
1558
- /** Who published the representative item (FT, SEC, @unusual_whales). */
1559
- primaryPublisher?: string;
1560
- publishers?: string[];
1561
- scores?: {
1562
- importance?: number;
1563
- urgency?: number;
1564
- marketImpact?: number;
1565
- novelty?: number;
1566
- confidence?: number;
1567
- };
1568
- flags?: {
1569
- breaking?: boolean;
1570
- developing?: boolean;
1571
- stale?: boolean;
1572
- };
1573
- variantCount: number;
1574
- sourceCount: number;
1575
- sources: string[];
1576
- entities: CloudNewsEntityPayload[];
1577
- tickerLinks: CloudNewsTickerLinkPayload[];
1578
- items?: CloudNewsStoryItemPayload[];
1579
- }
1580
-
1581
- export interface CloudNewsListResponse {
1582
- items: CloudNewsPayload[];
1583
- nextCursor: string | null;
1584
- /** Which news the service answered with, when it says: the live wire, or the one held back for a free account. */
1585
- access?: "realtime" | "delayed";
1586
- /**
1587
- * A search asked for its closest stories: `all` when stories have every
1588
- * word, `closest` when none does and these have the most of them.
1589
- */
1590
- match?: "all" | "closest";
1591
- /** A receipt's or foreign line's feed is its company's: the home line it reads, when not the listing asked. */
1592
- companyFrom?: CompanyFrom;
1593
- }
1594
-
1595
- interface CloudTweetUserPayload {
1596
- id: string;
1597
- userName: string;
1598
- name: string;
1599
- }
1600
-
1601
- interface CloudTweetMetricsPayload {
1602
- retweets: number | null;
1603
- replies: number | null;
1604
- likes: number | null;
1605
- quotes: number | null;
1606
- views: number | null;
1607
- bookmarks: number | null;
1608
- }
1609
-
1610
- interface CloudTweetMediaPayload {
1611
- type?: string;
1612
- url?: string;
1613
- mediaUrl?: string;
1614
- media_url?: string;
1615
- media_url_https?: string;
1616
- previewImageUrl?: string;
1617
- preview_image_url?: string;
1618
- }
1619
-
1620
- export interface CloudTweetPayload {
1621
- id: string;
1622
- url: string;
1623
- text: string;
1624
- createdAt: string;
1625
- lang: string;
1626
- isReply: boolean;
1627
- author: CloudTweetUserPayload;
1628
- metrics: CloudTweetMetricsPayload;
1629
- media?: CloudTweetMediaPayload[];
1630
- photos?: CloudTweetMediaPayload[];
1631
- images?: CloudTweetMediaPayload[];
1632
- }
1633
-
1634
- export type CloudTweetQueryType = "Latest" | "Top";
1635
-
1636
- export interface CloudTweetSearchResponse {
1637
- ticker?: string;
1638
- cashtag?: string;
1639
- query: string;
1640
- queryType: CloudTweetQueryType;
1641
- since: string;
1642
- until: string;
1643
- limit: number;
1644
- offset?: number;
1645
- /** More tweets sit behind this page. Absent on servers without paging. */
1646
- hasMore?: boolean;
1647
- hours: number;
1648
- includeReplies?: boolean;
1649
- cached: boolean;
1650
- cacheTtlMs: number;
1651
- asOf: string;
1652
- tweets: CloudTweetPayload[];
1653
- }
1654
-
1655
- type CloudMarketStatus =
1656
- | "success"
1657
- | "partial"
1658
- | "empty"
1659
- | "unsupported"
1660
- | "retryable_error"
1661
- | "fatal_error";
1662
-
1663
- /** The dates a history source vouches for. Which boundary fields appear depends on the reason. */
1664
- export interface CloudHistoryCoverage {
1665
- source: string;
1666
- reasonCode?: string;
1667
- /** First date (YYYY-MM-DD) whose share lineage the source verified. */
1668
- verifiedLineageStart?: string;
1669
- /** First bar date (YYYY-MM-DD) the source serves, such as a fund's inception. */
1670
- firstAllowedBarDate?: string;
1671
- inceptionDate?: string;
1672
- /** Why nothing earlier is served, such as "old-shekel quotes before 1992 are not served". */
1673
- note?: string;
1674
- sourceUrl?: string;
1675
- firstBarDate: string | null;
1676
- lastBarDate: string | null;
1677
- barCount: number;
1678
- }
1679
-
1680
- export interface CloudMarketResponse<T> {
1681
- status: CloudMarketStatus;
1682
- data: T | null;
1683
- reasonCode?: string;
1684
- /** Untrusted, human-readable reason the answer is empty. Cleaned before it is shown. */
1685
- message?: string;
1686
- asOf?: string;
1687
- staleAt?: string;
1688
- stale?: boolean;
1689
- currency?: string;
1690
- /** Untrusted history-only failure evidence, validated by the history adapter. */
1691
- historyRetention?: unknown;
1692
- /** Source-declared history semantics; validated separately from quote metadata. */
1693
- historySession?: unknown;
1694
- /** "extended" when the history includes the pre-market and after-hours bars asked for. */
1695
- session?: unknown;
1696
- /** "1day" when daily bars answer an intraday range: the listing has no intraday bars. */
1697
- servedResolution?: unknown;
1698
- /**
1699
- * Untrusted: daily sessions the bars leave out and why, as
1700
- * `[{ date: "2020-04-20", reason: "non-positive-close" }]`. Validated by the history adapter.
1701
- */
1702
- omittedSessions?: unknown;
1703
- /** Untrusted until the history adapter validates its boundary dates. */
1704
- coverage?: CloudHistoryCoverage;
1705
- /**
1706
- * Untrusted: a US listing that no longer trades, `{ status, lastTradeDate,
1707
- * historyStart }`. Its history ends on `lastTradeDate`. Read by parseListingDelisting.
1708
- */
1709
- delisting?: unknown;
1710
- providerMeta?: {
1711
- provider?: string;
1712
- upstream?: string;
1713
- status?: CloudMarketStatus;
1714
- reasonCode?: string;
1715
- normalizedSymbol?: string;
1716
- normalizedExchange?: string;
1717
- stale?: boolean;
1718
- fallbackReason?: string;
1719
- requestedResolution?: string;
1720
- servedResolution?: string;
1721
- latencyMs?: number;
1722
- range?: string;
1723
- granularity?: string;
1724
- timezone?: string;
1725
- currency?: string;
1726
- barCount?: number;
1727
- };
1728
- }
1729
-
1730
- export interface CloudMarketBatchTarget {
1731
- symbol: string;
1732
- exchange?: string;
1733
- }
1734
-
1735
- export interface CloudMarketBatchItem<T> {
1736
- symbol: string;
1737
- exchange: string;
1738
- status: CloudMarketStatus;
1739
- data: T | null;
1740
- reasonCode?: string;
1741
- /** Untrusted, human-readable reason this item is empty. Cleaned before it is shown. */
1742
- message?: string;
1743
- stale?: boolean;
1744
- }
1745
-
1746
- export interface CloudMarketBatchPayload<T> {
1747
- items: Array<CloudMarketBatchItem<T>>;
1748
- }
1749
-
1750
- export type CloudMarketScreenerCategory = "gainers" | "losers" | "most-active";
1751
-
1752
- /**
1753
- * What Gloom Cloud selects and ranks Gainers and Losers by: `regular` the last
1754
- * completed regular session's move, the Chg% a row shows; `extended` the
1755
- * latest print, after-hours or pre-market included. While the regular session
1756
- * trades the two are one list. A server that predates the choice ignores it
1757
- * and ranks by the latest print.
1758
- */
1759
- export type CloudMoverSession = "regular" | "extended";
1760
-
1761
- /**
1762
- * A movers row's quote sessions, under the quote's field names and meaning:
1763
- * the session it was read in, the day its change is dated to, the last
1764
- * completed regular session's close and move, and an open pre-market or
1765
- * after-hours print with its move from that close. Older servers send none.
1766
- */
1767
- export type CloudMoverSessionFields = Partial<Pick<Quote,
1768
- | "marketState" | "changeSessionDate"
1769
- | "regularClose" | "regularCloseSessionDate" | "regularChange" | "regularChangePercent"
1770
- | "preMarketPrice" | "preMarketChange" | "preMarketChangePercent"
1771
- | "postMarketPrice" | "postMarketChange" | "postMarketChangePercent">>;
1772
-
1773
- /** price, change and changePercent are the live print the server ranks the list by; the session fields say how it reads. */
1774
- export interface CloudMarketScreenerItem extends CloudMoverSessionFields {
1775
- rank: number;
1776
- symbol: string;
1777
- name: string;
1778
- price: number;
1779
- change: number;
1780
- changePercent: number;
1781
- previousClose?: number;
1782
- volume: number;
1783
- /** Available average volume for this listing, independent of public ranking membership. */
1784
- avgVolume?: number;
1785
- /** Observation time of the optional retained metadata. */
1786
- metadataAsOf?: string;
1787
- tradeCount?: number;
1788
- currency: string;
1789
- high52w?: number;
1790
- low52w?: number;
1791
- dayHigh?: number;
1792
- dayLow?: number;
1793
- exchange: string;
1794
- lastUpdated: number;
1795
- dataSource: "live";
1796
- /** The listing's float as the equity screener serves it; absent where it serves none. */
1797
- floatShares?: number;
1798
- /** Set with a float the source states no measurement date for: `partial`. */
1799
- floatSharesState?: "partial";
1800
- /** Why the float is partial, as the server says it. */
1801
- floatSharesReason?: string;
1802
- /** When the statistics the float is read from were retrieved (ISO). */
1803
- floatSharesRetrievedAt?: string;
1804
- }
1805
-
1806
- export interface CloudMarketScreenerPayload {
1807
- providerId: "gloomberb-cloud";
1808
- category: CloudMarketScreenerCategory;
1809
- asOf: string;
1810
- stale?: boolean;
1811
- items: CloudMarketScreenerItem[];
1812
- }
1813
-
1814
- /** Cache reuse policy for one Equity Diagnostic request. */
1815
- export type CloudEquityDiagnosticMode = "cache-first" | "refresh";
1816
-
1817
- export type CloudEquityDiagnosticFindingKind =
1818
- "red_flag" | "green_flag" | "anomaly";
1819
-
1820
- /** 3 is the most severe. */
1821
- type CloudEquityDiagnosticSeverity = 1 | 2 | 3;
1822
-
1823
- export interface CloudEquityDiagnosticFinding {
1824
- id: string;
1825
- kind: CloudEquityDiagnosticFindingKind;
1826
- severity: CloudEquityDiagnosticSeverity;
1827
- confidence: number;
1828
- title: string;
1829
- /** What the data says, with no reading attached. */
1830
- observation: string;
1831
- /** What the observation may mean; kept apart from the observation on purpose. */
1832
- interpretation: string;
1833
- /** Ids into `evidence`; unresolved ids are dropped by the client. */
1834
- evidenceIds: string[];
1835
- }
1836
-
1837
- export interface CloudEquityDiagnosticCoverage {
1838
- dataset: string;
1839
- status: "available" | "no_data" | "unsupported" | "failed";
1840
- asOf?: string;
1841
- provider?: string;
1842
- note?: string;
1843
- }
1844
-
1845
- /** The server owns citation URLs; the client never builds them. */
1846
- export interface CloudEquityDiagnosticEvidence {
1847
- id: string;
1848
- dataset: string;
1849
- label: string;
1850
- asOf?: string;
1851
- provider?: string;
1852
- url?: string;
1853
- }
1854
-
1855
- interface CloudEquityDiagnosticPending {
1856
- status: "generating";
1857
- retryAfterMs: number;
1858
- }
1859
-
1860
- export interface CloudEquityDiagnosticResponse {
1861
- schemaVersion: 1;
1862
- access: "preview" | "full";
1863
- symbol: string;
1864
- exchange: string;
1865
- companyName?: string;
1866
- status: "complete" | "partial" | "insufficient_data";
1867
- verdict: "risk_skewed" | "balanced" | "opportunity_skewed" | "unclear";
1868
- summary: string;
1869
- confidence: number;
1870
- findings: CloudEquityDiagnosticFinding[];
1871
- watchItems: string[];
1872
- coverage: CloudEquityDiagnosticCoverage[];
1873
- evidence: CloudEquityDiagnosticEvidence[];
1874
- generatedAt: string;
1875
- expiresAt: string;
1876
- /** Before this instant a `refresh` request may still answer from cache. */
1877
- refreshAllowedAt: string;
1878
- cached: boolean;
1879
- stale: boolean;
1880
- promptVersion: 1;
1881
- /** The model that answered. Diagnostic only: never rendered to the user. */
1882
- model: string;
1883
- }
1884
-
1885
- export type CloudEquityDiagnosticResult =
1886
- CloudEquityDiagnosticPending | CloudEquityDiagnosticResponse;
1887
-
1888
- export interface CloudVerificationResponse {
1889
- sent: boolean;
1890
- email?: string;
1891
- alreadyVerified?: boolean;
1892
- }
1893
-
1894
- /** A short-lived, single-use browser URL that establishes the existing desktop session. */
1895
- export interface CloudBrowserHandoffResponse {
1896
- url: string;
1897
- }
1898
-
1899
- export interface DeviceAuthStartResponse {
1900
- deviceCode: string;
1901
- /** 8 characters formatted "XXXX-XXXX", shown so a user without the app can type it. */
1902
- userCode: string;
1903
- expiresAt: string;
1904
- /** Like https://gloom.sh/link/<userCode>; this is what the QR code encodes. */
1905
- verificationUri: string;
1906
- pollIntervalMs: number;
1907
- }
1908
-
1909
- /** The approved response is single-use; polling again returns a non-approved status. */
1910
- export type DeviceAuthTokenResponse =
1911
- | { status: "pending" }
1912
- | { status: "denied" }
1913
- | { status: "expired" }
1914
- | { status: "approved"; sessionToken: string; user: AuthUser };
1915
-
1916
- /** Shared server-computed scanners fanned out to every subscriber. */
1917
- export type ScannerKind = "hilo" | "flow";
1918
-
1919
- export type ScannerStatus = "live" | "starting" | "closed" | "degraded";
1920
-
1921
- interface ScannerWindowCounts {
1922
- highs: number;
1923
- lows: number;
1924
- }
1925
-
1926
- export interface ScannerHiloExtreme {
1927
- symbol: string;
1928
- price: number;
1929
- volume?: number | null;
1930
- /** Times this symbol printed a new session extreme today. */
1931
- count: number;
1932
- at: number;
1933
- }
1934
-
1935
- /** Which entitlement tier produced the payload: free accounts get a delayed instance. */
1936
- interface ScannerAccessInfo {
1937
- access: "realtime" | "delayed";
1938
- /** 0 on the realtime instance, 15 on the delayed one. */
1939
- delayMinutes: number;
1940
- }
1941
-
1942
- export interface ScannerHiloPayload extends ScannerAccessInfo {
1943
- status: ScannerStatus;
1944
- asOf: number;
1945
- windows: {
1946
- s30: ScannerWindowCounts;
1947
- m1: ScannerWindowCounts;
1948
- m5: ScannerWindowCounts;
1949
- };
1950
- highs: ScannerHiloExtreme[];
1951
- lows: ScannerHiloExtreme[];
1952
- }
1953
-
1954
- export interface ScannerFlowEvent {
1955
- id: string;
1956
- at: number;
1957
- underlying: string;
1958
- contract: string;
1959
- right: "C" | "P";
1960
- strike: number;
1961
- expiry: string;
1962
- side: "ask" | "bid" | "mid" | "unknown";
1963
- kind: "sweep" | "block" | "split" | "trade";
1964
- size: number;
1965
- price: number;
1966
- premium: number;
1967
- volume?: number | null;
1968
- openInterest?: number | null;
1969
- volOi?: number | null;
1970
- iv?: number | null;
1971
- }
1972
-
1973
- export interface ScannerFlowPayload extends ScannerAccessInfo {
1974
- status: ScannerStatus;
1975
- asOf: number;
1976
- events: ScannerFlowEvent[];
1977
- }
1978
-
1979
- /** Filters for recorded flow prints, matching the FLOW pane's own. */
1980
- export interface ScannerFlowHistoryQuery {
1981
- /** Page before this print (newest first); omit for the latest prints. */
1982
- before?: { at: number; id: string };
1983
- limit?: number;
1984
- minPremium?: number;
1985
- right?: "C" | "P";
1986
- kind?: "sweep" | "block";
1987
- minVolOi?: number;
1988
- maxExpiryDays?: number;
1989
- /** Only these listed symbols (the pane's "mine" universe). */
1990
- symbols?: string[];
1991
- }
1992
-
1993
- export interface ScannerFlowHistoryPage {
1994
- events: ScannerFlowEvent[];
1995
- hasMore: boolean;
1996
- }
1997
-
1998
- /**
1999
- * Premium of a slice of the session's recorded prints by where it traded: at
2000
- * or above the ask (bought) or at or below the bid (sold). Mid and unknown
2001
- * prints count as neither.
2002
- */
2003
- interface ScannerFlowSidePremium {
2004
- callAsk: number;
2005
- callBid: number;
2006
- putAsk: number;
2007
- putBid: number;
2008
- }
2009
-
2010
- /** The session's prints in one time bucket, which starts at `at`. */
2011
- export interface ScannerFlowSessionBucket extends ScannerFlowSidePremium {
2012
- at: number;
2013
- }
2014
-
2015
- /** What one name printed at one expiry and strike during the session. */
2016
- export interface ScannerFlowSessionStrike extends ScannerFlowSidePremium {
2017
- expiry: string;
2018
- strike: number;
2019
- /** Every call print's premium, mid and unknown included. */
2020
- callPremium: number;
2021
- putPremium: number;
2022
- prints: number;
2023
- }
2024
-
2025
- /** The latest session's recorded prints under the FLOW pane's filters, summed. */
2026
- export interface ScannerFlowSession {
2027
- /** The New York date of the session; null before any print was recorded. */
2028
- session: string | null;
2029
- bucketMs: number;
2030
- /** Buckets with a matching print, oldest first. */
2031
- buckets: ScannerFlowSessionBucket[];
2032
- /** Only when one name was asked for: most premium first. */
2033
- strikes: ScannerFlowSessionStrike[] | null;
2034
- }
2035
-
2036
- export type ScannerPayload = ScannerHiloPayload | ScannerFlowPayload;
2037
-
2038
- /** What a scanner subscriber receives: data, or the entitlement refusal. */
2039
- export type ScannerFeedEvent<T extends ScannerPayload = ScannerPayload> =
2040
- { type: "data"; payload: T } | { type: "denied"; reason: string };
2041
-
2042
- export interface QuoteStreamTarget {
2043
- symbol: string;
2044
- exchange?: string;
2045
- surface?:
2046
- | "portfolio"
2047
- | "watchlist"
2048
- | "detail"
2049
- | "monitor"
2050
- | "inline"
2051
- | "options"
2052
- | "screener"
2053
- | "unknown";
2054
- visible?: boolean;
2055
- selected?: boolean;
2056
- weight?: number;
2057
- }
2058
-
2059
- const TEAM_ACCENT_COLORS = [
2060
- "amber",
2061
- "blue",
2062
- "cyan",
2063
- "green",
2064
- "magenta",
2065
- "orange",
2066
- "red",
2067
- "violet",
2068
- ] as const;
2069
-
2070
- export type TeamAccentColor = (typeof TEAM_ACCENT_COLORS)[number];
2071
-
2072
- export type TeamRole = "owner" | "admin" | "member";
2073
-
2074
- export interface TeamSummary {
2075
- id: string;
2076
- name: string;
2077
- slug: string;
2078
- accentColor: TeamAccentColor;
2079
- shortName: string;
2080
- allowMemberInvites: boolean;
2081
- /** Seats the team can fill; a Team plan deal sets it, otherwise 25. */
2082
- memberLimit?: number;
2083
- channelId: string;
2084
- createdAt: string;
2085
- role: TeamRole;
2086
- memberCount: number;
2087
- }
2088
-
2089
- export interface TeamMember {
2090
- id: string;
2091
- role: TeamRole;
2092
- joinedAt: string;
2093
- user: { id: string; username: string | null; displayName: string };
2094
- }
2095
-
2096
- export interface TeamInviteLink {
2097
- token: string;
2098
- url: string;
2099
- teamId: string;
2100
- createdBy: string;
2101
- expiresAt: string;
2102
- maxUses: number | null;
2103
- uses: number;
2104
- createdAt: string;
2105
- }
2106
-
2107
- /** A Better Auth organization invitation as returned by /auth/organization/* endpoints. */
2108
- export interface TeamUser {
2109
- id: string;
2110
- username: string | null;
2111
- displayName: string;
2112
- }
2113
-
2114
- /** An invitation addressed to the signed-in person. */
2115
- export interface TeamReceivedInvitation {
2116
- id: string;
2117
- role: TeamRole;
2118
- expiresAt: string;
2119
- createdAt: string;
2120
- team: {
2121
- id: string;
2122
- name: string;
2123
- slug: string;
2124
- accentColor: TeamAccentColor;
2125
- shortName: string;
2126
- memberCount: number;
2127
- };
2128
- inviter: TeamUser;
2129
- }
2130
-
2131
- /** An invitation a team sent; the invitee is null for addresses without an account. */
2132
- export interface TeamSentInvitation {
2133
- id: string;
2134
- status: string;
2135
- role: TeamRole;
2136
- expiresAt: string;
2137
- createdAt: string;
2138
- inviter: TeamUser;
2139
- invitee: TeamUser | null;
2140
- }
2141
-
2142
- export interface TeamUpdatedEvent {
2143
- teamId: string;
2144
- change: "settings" | "members" | "channels" | "deleted";
2145
- }
2146
-
2147
- export interface TeamUsernameInvitation {
2148
- id: string;
2149
- status: string;
2150
- expiresAt: string;
2151
- invitee: { id: string; username: string | null; displayName: string };
2152
- }
2153
-
2154
- interface TeamActor {
2155
- id: string;
2156
- username: string | null;
2157
- displayName: string;
2158
- }
2159
-
2160
- interface TeamNotificationTeam {
2161
- id: string;
2162
- name: string;
2163
- accentColor: TeamAccentColor;
2164
- shortName: string;
2165
- }
2166
-
2167
- type TeamNotificationData =
2168
- | {
2169
- kind: "team-invite";
2170
- team: TeamNotificationTeam;
2171
- invitationId: string;
2172
- expiresAt: string;
2173
- inviter: TeamActor;
2174
- }
2175
- | { kind: "team-joined"; team: TeamNotificationTeam; member: TeamActor }
2176
- | {
2177
- kind: "layout-updated";
2178
- team: TeamNotificationTeam;
2179
- layoutId: string;
2180
- layoutName: string;
2181
- revision: number;
2182
- author: TeamActor;
2183
- };
2184
-
2185
- type TeamNotificationType = TeamNotificationData["kind"];
2186
-
2187
- export interface TeamNotification {
2188
- id: string;
2189
- type: TeamNotificationType;
2190
- channelId: string;
2191
- createdAt: string;
2192
- data: TeamNotificationData;
2193
- }
2194
-
2195
- // Cloud notes
2196
-
2197
- type NoteOwnerKind = "user" | "team";
2198
- export type NoteKind = "ticker" | "quick";
2199
-
2200
- interface CloudNoteOwner {
2201
- kind: NoteOwnerKind;
2202
- id: string;
2203
- }
2204
-
2205
- export interface CloudNoteSummary {
2206
- id: string;
2207
- owner: CloudNoteOwner;
2208
- kind: NoteKind;
2209
- key: string;
2210
- title: string | null;
2211
- revision: number;
2212
- updatedBy: { id: string; username: string | null; displayName: string };
2213
- createdAt: string;
2214
- updatedAt: string;
2215
- size: number;
2216
- }
2217
-
2218
- export interface CloudNote extends Omit<CloudNoteSummary, "size"> {
2219
- content: string;
2220
- }
2221
-
2222
- export interface CloudNoteScope {
2223
- scope: NoteOwnerKind;
2224
- teamId?: string;
2225
- }
2226
-
2227
- // Theses
2228
-
2229
- export type ThesisStatus = "watching" | "active" | "closed";
2230
- export type ThesisHealth = "unverified" | "intact" | "weakening" | "broken";
2231
- export type ThesisPillarStatus = ThesisHealth;
2232
-
2233
- interface ThesisInstrument {
2234
- symbol: string;
2235
- exchange?: string;
2236
- side: "long" | "short";
2237
- role: "core" | "hedge";
2238
- }
2239
-
2240
- interface ThesisMetricBound {
2241
- key: string;
2242
- op: ">=" | "<=";
2243
- value: number;
2244
- unit?: string;
2245
- }
2246
-
2247
- export interface ThesisPillar {
2248
- id: string;
2249
- text: string;
2250
- kind: "qualitative" | "metric";
2251
- metric?: ThesisMetricBound;
2252
- /** Symbol the claim is about; absent means the thesis as a whole. */
2253
- scope?: string;
2254
- status: ThesisPillarStatus;
2255
- note?: string;
2256
- }
2257
-
2258
- export interface ThesisKillCondition {
2259
- id: string;
2260
- text: string;
2261
- triggered: boolean;
2262
- note?: string;
2263
- }
2264
-
2265
- export interface ThesisCatalyst {
2266
- id: string;
2267
- text: string;
2268
- date?: string;
2269
- status: "pending" | "hit" | "missed";
2270
- }
2271
-
2272
- export interface ThesisDocument {
2273
- summary: string;
2274
- instruments: ThesisInstrument[];
2275
- evidence: { symbols: string[]; keywords: string[] };
2276
- pillars: ThesisPillar[];
2277
- killConditions: ThesisKillCondition[];
2278
- catalysts: ThesisCatalyst[];
2279
- target?: { price?: number; note?: string };
2280
- entry?: { date?: string; price?: number };
2281
- }
2282
-
2283
- interface ThesisOutcome {
2284
- verdict: "right" | "wrong" | "lucky" | "unlucky";
2285
- returnPct?: number;
2286
- lesson?: string;
2287
- }
2288
-
2289
- interface ThesisEditor {
2290
- id: string;
2291
- username: string | null;
2292
- displayName: string;
2293
- }
2294
-
2295
- export interface CloudThesis {
2296
- id: string;
2297
- owner: CloudNoteOwner;
2298
- title: string;
2299
- status: ThesisStatus;
2300
- conviction: number;
2301
- horizon: string | null;
2302
- reviewEveryDays: number;
2303
- document: ThesisDocument;
2304
- outcome: ThesisOutcome | null;
2305
- health: ThesisHealth;
2306
- revision: number;
2307
- /** Signals waiting for a verdict. */
2308
- openSignals: number;
2309
- createdBy: string;
2310
- updatedBy: ThesisEditor;
2311
- createdAt: string;
2312
- updatedAt: string;
2313
- reviewedAt: string | null;
2314
- closedAt: string | null;
2315
- }
2316
-
2317
- type ThesisSignalTargetKind = "pillar" | "kill" | "catalyst" | "thesis";
2318
- type ThesisSignalVerdict = "supports" | "challenges" | "breaks" | "neutral";
2319
- type ThesisSignalStatus = "open" | "accepted" | "dismissed" | "snoozed" | "noted";
2320
-
2321
- interface ThesisSignalSource {
2322
- kind: "news" | "filing" | "transcript" | "metric" | "review" | "user";
2323
- id?: string;
2324
- title?: string;
2325
- url?: string;
2326
- at?: string;
2327
- symbol?: string;
2328
- }
2329
-
2330
- export interface ThesisSignal {
2331
- id: string;
2332
- thesisId: string;
2333
- targetKind: ThesisSignalTargetKind;
2334
- targetId: string | null;
2335
- verdict: ThesisSignalVerdict;
2336
- confidence: number | null;
2337
- reason: string;
2338
- source: ThesisSignalSource | null;
2339
- origin: "ai" | "rule" | "user";
2340
- status: ThesisSignalStatus;
2341
- resolutionNote: string | null;
2342
- createdBy: ThesisEditor | null;
2343
- resolvedBy: ThesisEditor | null;
2344
- createdAt: string;
2345
- resolvedAt: string | null;
2346
- snoozedUntil: string | null;
2347
- }
2348
-
2349
- export interface ThesisDraft extends ThesisDocument {
2350
- title: string;
2351
- horizon: string | null;
2352
- }
2353
-
2354
- export interface ThesisPatch {
2355
- title?: string;
2356
- status?: ThesisStatus;
2357
- conviction?: number;
2358
- horizon?: string | null;
2359
- reviewEveryDays?: number;
2360
- document?: ThesisDocument;
2361
- outcome?: ThesisOutcome | null;
2362
- note?: string | null;
2363
- reviewed?: boolean;
2364
- }
2365
-
2366
- // Team collections
2367
-
2368
- export type TeamCollectionKind = "watchlist" | "portfolio";
2369
-
2370
- export interface TeamCollection {
2371
- id: string;
2372
- teamId: string;
2373
- kind: TeamCollectionKind;
2374
- name: string;
2375
- currency: string | null;
2376
- createdBy: string;
2377
- createdAt: string;
2378
- updatedAt: string;
2379
- itemCount: number;
2380
- }
2381
-
2382
- export interface TeamCollectionItem {
2383
- collectionId: string;
2384
- symbol: string;
2385
- exchange: string;
2386
- quantity: number | null;
2387
- note: string | null;
2388
- /**
2389
- * A portfolio holding's purchase date (YYYY-MM-DD), its currency, and the
2390
- * rate its cost was bought at (one unit of `currency` in `costFxCurrency`).
2391
- * Null when no one has sent one; missing from a server that keeps none.
2392
- */
2393
- dateAcquired?: string | null;
2394
- currency?: string | null;
2395
- costFxRate?: number | null;
2396
- costFxCurrency?: string | null;
2397
- addedBy: string;
2398
- addedAt: string;
2399
- updatedAt: string;
2400
- }
2401
-
2402
- type TeamCollectionChange =
2403
- | { change: "created"; collection: TeamCollection }
2404
- | { change: "updated"; collection: TeamCollection }
2405
- | { change: "deleted"; collectionId: string }
2406
- | { change: "item-added" | "item-updated" | "item-removed"; collectionId: string; item: TeamCollectionItem };
2407
-
2408
- export type TeamCollectionEvent = TeamCollectionChange & { teamId: string; actorId: string };
2409
-
2410
- // Team views and plugin state
2411
-
2412
- export interface TeamView {
2413
- id: string;
2414
- teamId: string;
2415
- name: string;
2416
- revision: number;
2417
- spec: Record<string, unknown>;
2418
- createdBy: string;
2419
- author: { username: string | null; displayName: string };
2420
- createdAt: string;
2421
- updatedAt: string;
2422
- publishedAt: string;
2423
- }
2424
-
2425
- export type TeamViewEvent =
2426
- | { teamId: string; actorId: string; view: TeamView }
2427
- | { teamId: string; actorId: string; viewId: string };
2428
-
2429
- export interface TeamPluginStateEntry {
2430
- teamId: string;
2431
- pluginId: string;
2432
- key: string;
2433
- value: unknown;
2434
- revision: number;
2435
- updatedBy: string;
2436
- updatedAt: string;
2437
- }
2438
-
2439
- export type TeamPluginStateEvent =
2440
- | { teamId: string; actorId: string; state: TeamPluginStateEntry }
2441
- | { teamId: string; actorId: string; pluginId: string; key: string; deleted: true };