gloomberb 0.20.6 → 0.20.7

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 (67) hide show
  1. package/package.json +1 -1
  2. package/src/api-client/fund-facts.ts +20 -4
  3. package/src/api-client/socket.ts +4 -4
  4. package/src/architecture/shortcut-labels-allowlist.json +1 -0
  5. package/src/cli/commands/market.ts +33 -17
  6. package/src/cli/commands/search.ts +19 -3
  7. package/src/cli/desktop-pane-shot.ts +61 -0
  8. package/src/cli/pane-functions/dom.ts +4 -4
  9. package/src/cli/pane-functions/freshness.ts +38 -5
  10. package/src/cli/pane-functions/screenshot-assessment.ts +16 -4
  11. package/src/cli/quote-answer.ts +57 -1
  12. package/src/cli/result.ts +17 -0
  13. package/src/docs/snapshot.json +55 -16
  14. package/src/i18n/es.ts +2 -0
  15. package/src/i18n/ja.ts +2 -0
  16. package/src/i18n/ko.ts +2 -0
  17. package/src/i18n/zh-cn.ts +2 -0
  18. package/src/i18n/zh-tw.ts +2 -0
  19. package/src/market-data/market/change-basis.ts +49 -8
  20. package/src/market-data/market/dated-previous-close.ts +133 -10
  21. package/src/market-data/market/freshness.ts +18 -6
  22. package/src/market-data/market/status.ts +9 -1
  23. package/src/market-data/published-nse-sessions.ts +16 -1
  24. package/src/market-data/quotes/freshness.ts +15 -0
  25. package/src/plugins/builtin/alerts/alert-engine.ts +15 -0
  26. package/src/plugins/builtin/alerts/cli.ts +22 -9
  27. package/src/plugins/builtin/alerts/headless.ts +1 -1
  28. package/src/plugins/builtin/alerts/index.tsx +5 -1
  29. package/src/plugins/builtin/alerts/metric-command.ts +1 -1
  30. package/src/plugins/builtin/holders/fund-holders.ts +22 -1
  31. package/src/plugins/builtin/holders/headless.ts +5 -4
  32. package/src/plugins/builtin/holders/pane.tsx +7 -3
  33. package/src/plugins/builtin/holders/report-header.ts +23 -0
  34. package/src/plugins/builtin/members/client.ts +1 -1
  35. package/src/plugins/builtin/members/headless.ts +2 -0
  36. package/src/plugins/builtin/members/model.ts +10 -8
  37. package/src/plugins/builtin/members/pane.tsx +4 -1
  38. package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +5 -2
  39. package/src/plugins/builtin/portfolio-list/cli/render.ts +66 -23
  40. package/src/plugins/builtin/portfolio-list/headless.ts +2 -1
  41. package/src/plugins/builtin/portfolio-list/income.ts +46 -22
  42. package/src/plugins/builtin/portfolio-list/pane/data.ts +16 -6
  43. package/src/plugins/builtin/portfolio-list/pane/index.tsx +5 -4
  44. package/src/plugins/builtin/portfolio-list/use-throttled-ticker-order.ts +40 -3
  45. package/src/plugins/builtin/sec/fund-facts.ts +25 -5
  46. package/src/plugins/builtin/shared/report-freshness.ts +15 -6
  47. package/src/plugins/builtin/supply-chain/model.ts +18 -6
  48. package/src/portfolio/column-values.ts +3 -0
  49. package/src/portfolio/valuation-basis.ts +23 -1
  50. package/src/state/hooks/quote-streaming.ts +14 -6
  51. package/src/tickers/instrument-kind.ts +22 -1
  52. package/src/tickers/search/index.ts +5 -0
  53. package/src/tickers/terminal-codes.ts +17 -5
  54. package/src/time-series/fundamentals/current-valuation.ts +244 -0
  55. package/src/time-series/fundamentals/historical-valuation.ts +99 -0
  56. package/src/time-series/fundamentals/metric-ids.ts +61 -0
  57. package/src/time-series/fundamentals/period-points.ts +104 -0
  58. package/src/time-series/fundamentals/quarterly-ttm.ts +220 -0
  59. package/src/time-series/fundamentals/series.ts +164 -0
  60. package/src/time-series/fundamentals/source-statements.ts +177 -0
  61. package/src/time-series/fundamentals/statement-fields.ts +154 -0
  62. package/src/time-series/fundamentals/statement-merge.ts +124 -0
  63. package/src/time-series/fundamentals/statement.ts +114 -0
  64. package/src/time-series/fundamentals/valuation-multiples.ts +50 -0
  65. package/src/time-series/fundamentals.ts +18 -1407
  66. package/src/types/financials.ts +9 -0
  67. package/src/utils/debug-log.ts +29 -0
@@ -173,6 +173,15 @@ export interface Quote extends DepositaryReceiptFacts {
173
173
  * previousClose is from (PreviousCloseDates): its move names no day.
174
174
  */
175
175
  previousCloseUndated?: boolean;
176
+ /**
177
+ * A listing that did not trade in the session its price is from: the price
178
+ * and previous close are the venue's nominal prices (an HKEX counter's
179
+ * USD line, untraded for days), dated by its daily bars
180
+ * (PreviousCloseDates). `session` is the venue date whose nominal price it
181
+ * is; `lastTraded` the latest day its bars show a trade, null when they
182
+ * reach back to none. `lastUpdated` stays the last print.
183
+ */
184
+ nominalPrice?: { session: string; lastTraded: string | null };
176
185
  /** Official close of a completed regular session, in this quote's currency. */
177
186
  regularClose?: number;
178
187
  /** Exchange-local date of regularClose; separate from the daily previous-close reference. */
@@ -10,6 +10,35 @@ export interface LogEntry {
10
10
  data?: unknown;
11
11
  }
12
12
 
13
+ /** How many items of a long list a log entry keeps; the rest is only counted. */
14
+ const LOG_LIST_PREVIEW_LENGTH = 5;
15
+
16
+ export interface ListPreview<T> {
17
+ count: number;
18
+ first: T[];
19
+ }
20
+
21
+ /**
22
+ * A long list as its length and first few items. The log keeps each entry's
23
+ * data for its 5,000 entries, so one that names every row of a 300-row list
24
+ * holds those names for as long as the entry lives.
25
+ */
26
+ export function previewList<T, R = T>(
27
+ items: readonly T[],
28
+ map: (item: T) => R = (item) => item as unknown as R,
29
+ ): ListPreview<R> {
30
+ return { count: items.length, first: items.slice(0, LOG_LIST_PREVIEW_LENGTH).map(map) };
31
+ }
32
+
33
+ /** `data` with each list longer than the preview replaced by its length and first items. */
34
+ export function previewLongLists(data: Record<string, unknown>): Record<string, unknown> {
35
+ const preview: Record<string, unknown> = {};
36
+ for (const [key, value] of Object.entries(data)) {
37
+ preview[key] = Array.isArray(value) && value.length > LOG_LIST_PREVIEW_LENGTH ? previewList(value) : value;
38
+ }
39
+ return preview;
40
+ }
41
+
13
42
  type LogListener = (entry: LogEntry) => void;
14
43
  type ConsoleMethod = (...args: unknown[]) => void;
15
44