sentisense 0.35.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -17,6 +17,22 @@ interface StockPrice {
17
17
  timestamp: number;
18
18
  /** Extended-hours view (pre-market or after-hours). Null/absent during RTH, overnight, and weekends. */
19
19
  extendedHours?: ExtendedHoursInfo | null;
20
+ /**
21
+ * Listing lifecycle. Absent for an ordinarily listed stock, which is almost every ticker.
22
+ *
23
+ * `"DELISTED"` means the company no longer trades publicly and EVERY price field above is
24
+ * frozen at the last trade before {@link delistedDate}. It is not a live price, so do not
25
+ * render `changePercent` as a market move.
26
+ *
27
+ * `"PENDING_DELISTING"` means a merger or take-private is scheduled but the stock still
28
+ * trades normally, so the figures above ARE current. Treat it as informational, never as a
29
+ * data-quality warning.
30
+ */
31
+ listingStatus?: 'DELISTED' | 'PENDING_DELISTING';
32
+ /** ISO date (YYYY-MM-DD) trading stopped. Absent unless `listingStatus` is `DELISTED`. */
33
+ delistedDate?: string;
34
+ /** Why it delisted. Absent unless `listingStatus` is `DELISTED`. */
35
+ delistingReason?: 'acquired' | 'take_private' | 'bankruptcy' | 'exchange_rule' | 'merged';
20
36
  }
21
37
  /**
22
38
  * Extended-hours session view embedded in price / quote responses when the snapshot sees
@@ -60,6 +76,22 @@ interface StockQuote {
60
76
  * omitted rather than computed in that case, so treat them as possibly absent, not zero.
61
77
  */
62
78
  reportedCurrency?: string;
79
+ /**
80
+ * Listing lifecycle. Absent for an ordinarily listed stock, which is almost every ticker.
81
+ *
82
+ * `"DELISTED"` means the company no longer trades publicly and EVERY price field above is
83
+ * frozen at the last trade before {@link delistedDate}. It is not a live quote, so do not
84
+ * render `changePercent` as a market move.
85
+ *
86
+ * `"PENDING_DELISTING"` means a merger or take-private is scheduled but the stock still
87
+ * trades and reports normally, so the figures above ARE current. Treat it as informational,
88
+ * never as a data-quality warning.
89
+ */
90
+ listingStatus?: 'DELISTED' | 'PENDING_DELISTING';
91
+ /** ISO date (YYYY-MM-DD) trading stopped. Absent unless `listingStatus` is `DELISTED`. */
92
+ delistedDate?: string;
93
+ /** Why it delisted. Absent unless `listingStatus` is `DELISTED`. */
94
+ delistingReason?: 'acquired' | 'take_private' | 'bankruptcy' | 'exchange_rule' | 'merged';
63
95
  timestamp: number | null;
64
96
  /** Extended-hours view (pre-market or after-hours). Null/absent during RTH, overnight, and weekends. */
65
97
  extendedHours?: ExtendedHoursInfo | null;
@@ -90,6 +122,15 @@ interface StockProfile {
90
122
  industry?: string;
91
123
  marketCap?: number;
92
124
  description?: string;
125
+ /**
126
+ * Listing lifecycle. Absent for an ordinarily listed stock. See {@link StockPrice.listingStatus}
127
+ * for what `"DELISTED"` and `"PENDING_DELISTING"` mean for the rest of the payload.
128
+ */
129
+ listingStatus?: 'DELISTED' | 'PENDING_DELISTING';
130
+ /** ISO date (YYYY-MM-DD) trading stopped. Absent unless `listingStatus` is `DELISTED`. */
131
+ delistedDate?: string;
132
+ /** Why it delisted. Absent unless `listingStatus` is `DELISTED`. */
133
+ delistingReason?: 'acquired' | 'take_private' | 'bankruptcy' | 'exchange_rule' | 'merged';
93
134
  [key: string]: unknown;
94
135
  }
95
136
  interface StockEntity {
@@ -839,6 +880,110 @@ interface GetEarningsCalendarOptions {
839
880
  /** Session filter. */
840
881
  time?: "before_open" | "after_close" | "during_market" | "unknown";
841
882
  }
883
+ /**
884
+ * One KPI card on a reported quarter.
885
+ *
886
+ * `value` and `yoy` are display strings, already formatted (`"$109.4B"`,
887
+ * `"+16% YoY"`), not numbers to compute with. `yoy` is absent when the quarter
888
+ * carries no year-over-year comparison for that line, which is common on
889
+ * call highlights.
890
+ */
891
+ interface EarningsKpiHighlight {
892
+ label: string;
893
+ value: string;
894
+ yoy?: string;
895
+ }
896
+ /** A citation backing a reported quarter. */
897
+ interface EarningsSource {
898
+ title: string;
899
+ url: string;
900
+ }
901
+ /**
902
+ * One fiscal quarter of the earnings analysis report, from
903
+ * `client.earnings.getSummaries()`.
904
+ *
905
+ * The wire shape depends on the caller's tier, so branch on the envelope's
906
+ * `isPreview` rather than on field presence. `fiscalPeriod`, `reportDate`,
907
+ * `headline`, `hasTranscript`, `generatedAt` and `source` arrive on both tiers.
908
+ *
909
+ * PRO adds the bodies: `summaryMd`, the full `kpiHighlights`, `guidance`,
910
+ * `transcriptSummaryMd`, `transcriptHighlights`, `transcriptGeneratedAt` and
911
+ * `sources`.
912
+ *
913
+ * The FREE preview replaces those bodies with shape: up to two `kpiHighlights`
914
+ * cards (without `yoy`) plus `kpiHighlightCount`, the section titles in
915
+ * `summaryTopics` and `transcriptTopics`, and `hasGuidance` with
916
+ * `guidanceDirection` in place of the guidance language. It never carries a
917
+ * body, a KPI history, or a guidance figure.
918
+ *
919
+ * Absence is explicit: a quarter with no call summary sets `hasTranscript` to
920
+ * `false` rather than dropping the concept, so a client can say "no call
921
+ * summary yet" instead of rendering nothing.
922
+ */
923
+ interface EarningsQuarter {
924
+ /** Display fiscal period, e.g. `"Q2 FY2026"`. */
925
+ fiscalPeriod: string;
926
+ /** Date the results were reported, ISO calendar day `"YYYY-MM-DD"`. */
927
+ reportDate: string;
928
+ /** One-line editorial summary of the quarter. */
929
+ headline: string;
930
+ /** True when a summary of the earnings call exists for this quarter. */
931
+ hasTranscript: boolean;
932
+ /** When the quarter summary was generated, epoch seconds. */
933
+ generatedAt: number;
934
+ /** Provenance of the quarter summary. */
935
+ source: "press_release" | "transcript";
936
+ /** PRO: markdown body summarizing the reported results. */
937
+ summaryMd?: string;
938
+ /** PRO carries the full set; a preview carries up to two cards without `yoy`. */
939
+ kpiHighlights?: EarningsKpiHighlight[];
940
+ /** PRO: forward-guidance language as reported. Absent when the quarter carries none. */
941
+ guidance?: string;
942
+ /** PRO: markdown body summarizing the call. Absent when `hasTranscript` is false. */
943
+ transcriptSummaryMd?: string;
944
+ /** PRO: call-specific highlights. Absent when there is no call summary. */
945
+ transcriptHighlights?: EarningsKpiHighlight[];
946
+ /** PRO: when the call summary was generated, epoch seconds. Can post-date `generatedAt`. */
947
+ transcriptGeneratedAt?: number;
948
+ /** PRO: citations backing the quarter. */
949
+ sources?: EarningsSource[];
950
+ /** Preview: how many KPI cards the full quarter carries. */
951
+ kpiHighlightCount?: number;
952
+ /** Preview: section titles of the summary, never body text. */
953
+ summaryTopics?: string[];
954
+ /** Preview: section titles of the call summary, never body text. */
955
+ transcriptTopics?: string[];
956
+ /** Preview: whether the quarter carries guidance at all. */
957
+ hasGuidance?: boolean;
958
+ /** Preview: the direction only, in place of the guidance language. */
959
+ guidanceDirection?: "RAISED" | "CUT" | "HELD" | "MIXED" | null;
960
+ }
961
+ /** One company that reported inside the recent window. */
962
+ interface RecentEarningsEntry {
963
+ ticker: string;
964
+ /** Display fiscal period, e.g. `"Q2 FY2026"`. */
965
+ fiscalPeriod: string;
966
+ /** Date the results were reported, ISO calendar day `"YYYY-MM-DD"`. */
967
+ reportDate: string;
968
+ headline: string;
969
+ /** True when a summary of the earnings call exists for this quarter. */
970
+ hasTranscriptSummary: boolean;
971
+ /** Latest content written for this quarter, epoch seconds. */
972
+ generatedAt: number;
973
+ }
974
+ interface GetEarningsSummariesOptions {
975
+ /**
976
+ * Max quarters returned, 1 to 40. Omitted, the API applies its own default
977
+ * of 12. A FREE key receives one quarter whatever you pass.
978
+ */
979
+ limit?: number;
980
+ }
981
+ interface GetRecentEarningsOptions {
982
+ /** Look-back window in days, 1 to 31. Omitted, the API applies its own default of 7. */
983
+ days?: number;
984
+ /** Max rows returned, 1 to 100. Omitted, the API applies its own default of 50. */
985
+ limit?: number;
986
+ }
842
987
  interface PreviewResponse<T> {
843
988
  isPreview: boolean;
844
989
  previewReason: "PRO_REQUIRED" | null;
@@ -1301,6 +1446,259 @@ interface IndexHistoryResponse {
1301
1446
  days: number;
1302
1447
  history: IndexHistoryPoint[];
1303
1448
  }
1449
+ /** One selectable value of an `ENUM` screener field. */
1450
+ interface ScreenerFieldOption {
1451
+ /** The number a filter carries for this reading. */
1452
+ value: number | null;
1453
+ /** Display copy. */
1454
+ label: string;
1455
+ }
1456
+ /**
1457
+ * One filterable field from `client.screener.fields()`.
1458
+ *
1459
+ * Build a filter UI from this rather than hardcoding the field list, and new
1460
+ * fields appear without an SDK release.
1461
+ *
1462
+ * `type` is `"NUMBER"`, `"ENUM"` or `"STRING"`:
1463
+ *
1464
+ * - `NUMBER` takes a scalar `value` and the comparison ops in `ops`.
1465
+ * - `ENUM` is an ordinal with a fixed set of readings; `options` carries them
1466
+ * and `ops` is `["EQ"]`.
1467
+ * - `STRING` (ETF universe only) takes `IN` / `NOT_IN` against `values`, which
1468
+ * is populated from the live universe rather than a static list, so pickers
1469
+ * stay current.
1470
+ */
1471
+ interface ScreenerFieldDescriptor {
1472
+ /** The name a filter's `fieldName` carries, e.g. `"SENTI_SCORE_7D"`. */
1473
+ name: string;
1474
+ label: string;
1475
+ /** UI grouping, e.g. `"Sentiment"`, `"Analyst"`, `"Technical"`. */
1476
+ group: string;
1477
+ type: "NUMBER" | "ENUM" | "STRING" | (string & {});
1478
+ /** e.g. `"SCORE"`, `"PERCENT"`, `"USD"`. `null` on unitless fields. */
1479
+ unit: string | null;
1480
+ ops: string[];
1481
+ sortable: boolean;
1482
+ /** Suggested input step for a numeric control. */
1483
+ step: number | null;
1484
+ placeholder: string | null;
1485
+ description: string;
1486
+ /** `ENUM` fields only; `null` otherwise. */
1487
+ options: ScreenerFieldOption[] | null;
1488
+ /**
1489
+ * Thresholds worth offering as one-tap presets. On the SentiSense Score
1490
+ * fields these are the band edges (5, 13, 23).
1491
+ */
1492
+ quickValues: string[] | null;
1493
+ /** `STRING` fields only, populated from the live universe; `null` otherwise. */
1494
+ values: string[] | null;
1495
+ }
1496
+ /**
1497
+ * Both field catalogs, returned by `client.screener.fields()`.
1498
+ *
1499
+ * `stock` backs {@link Screener.run}; `etf` backs {@link Screener.runEtfs}. The
1500
+ * two universes do not share a field vocabulary, so a name from one is not
1501
+ * valid in the other.
1502
+ */
1503
+ interface ScreenerFieldCatalog {
1504
+ stock: ScreenerFieldDescriptor[];
1505
+ etf: ScreenerFieldDescriptor[];
1506
+ }
1507
+ /**
1508
+ * One filter leg. Filters are ANDed together; there is no OR, so run two
1509
+ * screens and merge.
1510
+ *
1511
+ * Identify the field with `fieldName`. The curated plans from
1512
+ * `client.screener.screens()` use the older `field` key instead, and both are
1513
+ * accepted on the way in, so read either when inspecting a plan you did not
1514
+ * build yourself.
1515
+ *
1516
+ * Numeric ops take `value`; `IN` / `NOT_IN` take `values` and are only
1517
+ * meaningful on the ETF universe's string fields.
1518
+ */
1519
+ interface ScreenerFilter {
1520
+ fieldName?: string;
1521
+ /** Legacy field key, as emitted by the curated screens. */
1522
+ field?: string;
1523
+ op: "GTE" | "LTE" | "GT" | "LT" | "EQ" | "NEQ" | "IN" | "NOT_IN";
1524
+ value?: number;
1525
+ values?: string[];
1526
+ }
1527
+ /** Sort spec. Nulls sort last regardless of direction. */
1528
+ interface ScreenerSort {
1529
+ fieldName?: string;
1530
+ /** Legacy field key, as emitted by the curated screens. */
1531
+ field?: string;
1532
+ dir: "ASC" | "DESC";
1533
+ }
1534
+ /**
1535
+ * A filter and sort plan. The same shape works for both universes; the endpoint
1536
+ * you call decides which one runs, so `universe` on a plan you pass in is a
1537
+ * no-op.
1538
+ *
1539
+ * `limit` is deliberately not on this object: it rides next to the plan on the
1540
+ * request, because a plan is a stored object and paging is a transport concern.
1541
+ */
1542
+ interface ScreenerPlan {
1543
+ universe?: "STOCK" | "ETF";
1544
+ filters: ScreenerFilter[];
1545
+ sort?: ScreenerSort;
1546
+ /** Present on curated plans; ignored on execution. */
1547
+ intent?: string;
1548
+ /** Present on curated plans; ignored on execution. */
1549
+ summary?: string;
1550
+ }
1551
+ /**
1552
+ * A curated screen from `client.screener.screens()`.
1553
+ *
1554
+ * `plan` round-trips straight back into {@link Screener.run} (or
1555
+ * {@link Screener.runEtfs} when `plan.universe === "ETF"`), so a curated screen
1556
+ * is both a ready-made query and a worked example of the plan shape.
1557
+ *
1558
+ * `id` is stable and safe to persist. `name` and `summary` are display copy and
1559
+ * may be revised. Two conventions in the names are load-bearing: `+` means both
1560
+ * conditions hold, `vs` means the two sides disagree.
1561
+ */
1562
+ interface FeaturedScreen {
1563
+ id: string;
1564
+ name: string;
1565
+ summary: string;
1566
+ plan: ScreenerPlan;
1567
+ }
1568
+ /** Envelope returned by `client.screener.screens()`. */
1569
+ interface ScreenerScreensResponse {
1570
+ screens: FeaturedScreen[];
1571
+ }
1572
+ /**
1573
+ * One matching stock. Every row carries the full field set rather than only the
1574
+ * fields you filtered on, so you can sort or post-process client side without a
1575
+ * second call. A field with no data for that ticker is `null`, and a row
1576
+ * missing the field you filtered on never matches in either direction.
1577
+ *
1578
+ * `sentiSenseScore7D` / `sentiSenseScore1M` are the SentiSense Score, not
1579
+ * sentiment polarity: unbounded, banded at 5 / 13 / 23 either side of zero.
1580
+ */
1581
+ interface ScreenerRow {
1582
+ ticker: string;
1583
+ /** 7-day average SentiSense Score. */
1584
+ sentiSenseScore7D: number | null;
1585
+ /** 1-month average SentiSense Score. */
1586
+ sentiSenseScore1M: number | null;
1587
+ /** 7-day Score minus the 1-month baseline; positive means strengthening. */
1588
+ scoreChange7D: number | null;
1589
+ /** Side of the neutral band the 7-day Score sits on: `1` / `0` / `-1`. */
1590
+ sentimentDirection: number | null;
1591
+ socialDominance: number | null;
1592
+ mentionShare: number | null;
1593
+ mentionVelocity: number | null;
1594
+ dominanceChange: number | null;
1595
+ /** USD. */
1596
+ marketCap: number | null;
1597
+ currentPrice: number | null;
1598
+ changePercent: number | null;
1599
+ change: number | null;
1600
+ volume: number | null;
1601
+ week52High: number | null;
1602
+ week52Low: number | null;
1603
+ /** Signed-negative percent below the 52-week high. */
1604
+ pctOff52wHigh: number | null;
1605
+ /** Signed-positive percent above the 52-week low. */
1606
+ pctOff52wLow: number | null;
1607
+ /** Share of rating analysts saying buy, 0..100. Higher is more bullish. */
1608
+ analystBuyRatioPct: number | null;
1609
+ analystTargetUpsidePct: number | null;
1610
+ analystCount: number | null;
1611
+ analystRatingMomentum30D: number | null;
1612
+ /** Vendor 1-to-5 scale. **INVERTED: 1.0 is strong buy.** */
1613
+ analystRatingMean: number | null;
1614
+ pctOff200dMa: number | null;
1615
+ pctOff50dMa: number | null;
1616
+ /** Ordinal: `1` golden cross, `-1` death cross, `0` neither. */
1617
+ maCrossState: number | null;
1618
+ return1M: number | null;
1619
+ return3M: number | null;
1620
+ return6M: number | null;
1621
+ return1Y: number | null;
1622
+ volatility30D: number | null;
1623
+ /** Daily Score values for the last 7 days, oldest first. */
1624
+ sentisenseScoreBars7D: number[] | null;
1625
+ /** Weekly-grouped Score values across the last 30 days, oldest first. */
1626
+ sentisenseScoreBars30D: number[] | null;
1627
+ /** Daily closes for the last 30 days, oldest first. */
1628
+ priceSparkline30D: number[] | null;
1629
+ /** Epoch seconds. */
1630
+ lastUpdated: number | null;
1631
+ }
1632
+ /**
1633
+ * One matching fund.
1634
+ *
1635
+ * The two Score readings answer different questions.
1636
+ * `constituentsWeightedSentisense` is the holdings-weighted SentiSense Score
1637
+ * across what the fund actually owns, which is usually the one you want;
1638
+ * `directSentisense` is the Score from chatter about the fund ticker itself,
1639
+ * which on a broad index fund is mostly macro noise.
1640
+ */
1641
+ interface EtfScreenerRow {
1642
+ ticker: string;
1643
+ name: string;
1644
+ issuer: string | null;
1645
+ assetClass: string | null;
1646
+ trackedIndex: string | null;
1647
+ /** AUM in USD. */
1648
+ marketCap: number | null;
1649
+ /** Percent points: `0.09` means 0.09%. */
1650
+ expenseRatio: number | null;
1651
+ currentPrice: number | null;
1652
+ changePercent: number | null;
1653
+ priceChange: number | null;
1654
+ volume: number | null;
1655
+ week52High: number | null;
1656
+ week52Low: number | null;
1657
+ pctOff52wHigh: number | null;
1658
+ pctOff52wLow: number | null;
1659
+ weightedAnalystUpside: number | null;
1660
+ weightedConsensusLabel: string | null;
1661
+ weightedInsiderNet30d: number | null;
1662
+ weightedInsiderNet90d: number | null;
1663
+ /** Holdings-weighted SentiSense Score across the fund's constituents. */
1664
+ constituentsWeightedSentisense: number | null;
1665
+ /** SentiSense Score from chatter about the fund ticker itself. */
1666
+ directSentisense: number | null;
1667
+ /** How much of the fund's weight had constituent data behind the weighted Score. */
1668
+ weightCoveredPct: number | null;
1669
+ holdingsCount: number | null;
1670
+ totalKnownHoldings: number | null;
1671
+ /** `true` when the holdings set behind the aggregates is incomplete. */
1672
+ partial: boolean | null;
1673
+ /** Epoch seconds. */
1674
+ lastUpdated: number | null;
1675
+ }
1676
+ /** Request body for both execute endpoints. */
1677
+ interface ScreenerExecuteOptions {
1678
+ plan: ScreenerPlan;
1679
+ /** Optional ticker subset. Omit to screen the whole tracked universe. */
1680
+ tickers?: string[];
1681
+ /** Rows to return. Defaults to 100 server-side, caps at 500. */
1682
+ limit?: number;
1683
+ }
1684
+ /**
1685
+ * Stock screen results.
1686
+ *
1687
+ * `matched` is how many rows the plan matched *before* `limit` was applied, so
1688
+ * truncation is visible: when `matched` exceeds `limit` you are looking at the
1689
+ * top slice under the plan's sort, not the whole answer.
1690
+ */
1691
+ interface ScreenerExecuteResponse {
1692
+ results: ScreenerRow[];
1693
+ matched: number;
1694
+ limit: number;
1695
+ }
1696
+ /** ETF screen results. Same envelope; `matched` is the pre-limit count. */
1697
+ interface EtfScreenerExecuteResponse {
1698
+ results: EtfScreenerRow[];
1699
+ matched: number;
1700
+ limit: number;
1701
+ }
1304
1702
 
1305
1703
  interface AnalystConsensus {
1306
1704
  ticker: string;
@@ -1422,6 +1820,58 @@ declare class Documents {
1422
1820
  getStoriesByTicker(ticker: string, options?: GetStoriesByTickerOptions): Promise<Story[]>;
1423
1821
  }
1424
1822
 
1823
+ /**
1824
+ * Earnings: what a company actually reported, after the fact.
1825
+ *
1826
+ * A quarter's results arrive as a press release, a filing, and a call, none of
1827
+ * which is a data structure. {@link getSummaries} is the assembled version, one
1828
+ * object per fiscal quarter, and {@link getRecent} is the cross-ticker view of
1829
+ * who reported lately. Pair them to drive a post-earnings sweep: list the
1830
+ * window, then pull each ticker's analysis report.
1831
+ *
1832
+ * The forward-looking half of the family lives on `client.calendar.getEarnings()`,
1833
+ * which covers scheduled dates and consensus EPS rather than results.
1834
+ *
1835
+ * @see EarningsQuarter
1836
+ */
1837
+ declare class Earnings {
1838
+ private client;
1839
+ constructor(client: APIClient);
1840
+ /**
1841
+ * Per-quarter earnings analysis report for one ticker, newest first.
1842
+ *
1843
+ * Each quarter carries the editorial headline, the KPI cards that matter for
1844
+ * that company with year-over-year deltas, the guidance language as
1845
+ * management phrased it, and a summary of the earnings call.
1846
+ *
1847
+ * Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
1848
+ * FREE key receives the latest quarter shaped rather than truncated, plus
1849
+ * `totalCount`. {@link EarningsQuarter} documents which fields each tier
1850
+ * carries.
1851
+ *
1852
+ * A quarter typically appears within 48 hours of the company reporting, and
1853
+ * the call summary can arrive after the press-release content for the same
1854
+ * quarter, so read `generatedAt` and `transcriptGeneratedAt` rather than
1855
+ * assuming a fixed lag. A ticker with no stored quarter answers with an empty
1856
+ * `data` array, not a 404.
1857
+ *
1858
+ * Use canonical ticker symbols: `GOOGL` (not `GOOG`), `BRK.B` (not `BRK-B`).
1859
+ */
1860
+ getSummaries(ticker: string, options?: GetEarningsSummariesOptions): Promise<PreviewResponse<EarningsQuarter[]>>;
1861
+ /**
1862
+ * Which covered companies reported on or after `today - days`, newest first.
1863
+ *
1864
+ * Every API key receives the full window it asks for, so `isPreview` is
1865
+ * always `false` here. The window is bounded by `reportDate`, so a quarter
1866
+ * reported inside it appears even when its call summary lands later, and an
1867
+ * empty `data` array means nobody in the covered set reported in that window.
1868
+ *
1869
+ * This is the backward-looking feed; `client.calendar.getEarnings()` is the
1870
+ * forward-looking one.
1871
+ */
1872
+ getRecent(options?: GetRecentEarningsOptions): Promise<PreviewResponse<RecentEarningsEntry[]>>;
1873
+ }
1874
+
1425
1875
  declare class EntityMetrics {
1426
1876
  private client;
1427
1877
  constructor(client: APIClient);
@@ -1615,7 +2065,7 @@ declare class Insider {
1615
2065
  /**
1616
2066
  * Get market-wide insider activity: top buys and sells aggregated by ticker.
1617
2067
  *
1618
- * PRO-gated. Free/unauthenticated users receive a preview (top 5 per direction)
2068
+ * PRO-gated. Free-tier users receive a preview (top 5 per direction)
1619
2069
  * with `isPreview: true` in the response.
1620
2070
  */
1621
2071
  getActivity(options?: GetInsiderOptions): Promise<PreviewResponse<InsiderActivityResponse>>;
@@ -1639,7 +2089,7 @@ declare class Politicians {
1639
2089
  /**
1640
2090
  * Get recent congressional STOCK Act trading activity across all politicians.
1641
2091
  *
1642
- * PRO-gated. Free/unauthenticated users receive a preview (top 5 trades)
2092
+ * PRO-gated. Free-tier users receive a preview (top 5 trades)
1643
2093
  * with `isPreview: true` in the response.
1644
2094
  *
1645
2095
  * The feed is longer than one response: a default 90-day window is routinely well over a
@@ -1734,7 +2184,7 @@ declare class Insights {
1734
2184
  user(options?: GetUserInsightsOptions): Promise<PreviewResponse<Insight[]>>;
1735
2185
  /**
1736
2186
  * Get available insight types for a specific stock.
1737
- * No authentication required.
2187
+ * API key required.
1738
2188
  *
1739
2189
  * Returns an array of insight type strings (e.g., `["sentiment_shift", "options_activity"]`).
1740
2190
  */
@@ -1825,6 +2275,113 @@ declare class MarketSummaryResource {
1825
2275
  get(): Promise<MarketSummary>;
1826
2276
  }
1827
2277
 
2278
+ /**
2279
+ * Screener: filter the tracked universe on the SentiSense Score, attention,
2280
+ * analyst consensus, technicals and price in a single query. It is the one
2281
+ * surface where our own signals sit in the same `WHERE` clause as the market
2282
+ * data, which is the point: screening on analyst ratings alone is something a
2283
+ * dozen free tools do, screening on analyst ratings *where the Score disagrees*
2284
+ * is not.
2285
+ *
2286
+ * Every screen is a {@link ScreenerPlan}. Take one from {@link screens} or
2287
+ * build your own, then hand it to {@link run} or {@link runEtfs}.
2288
+ *
2289
+ * Three field semantics are worth knowing before you write a filter, because
2290
+ * guessing them wrong produces a screen that looks fine and means nothing:
2291
+ *
2292
+ * - **`ANALYST_RATING_MEAN` is inverted.** It is the vendor's 1-to-5 scale
2293
+ * where `1.0` is strong buy, so bullish is `LTE 2.5`, not `GTE`. Prefer
2294
+ * `ANALYST_BUY_RATIO_PCT`, which runs the intuitive direction.
2295
+ * - **`MA_CROSS_STATE` is ordinal**, not a percentage: `1` golden cross (50-day
2296
+ * above 200-day), `-1` death cross, `0` neither. Use `EQ`.
2297
+ * - **`SENTIMENT_DIRECTION` is the sign of the 7-day SentiSense Score**
2298
+ * (`1` / `0` / `-1`) with a neutral band of plus-or-minus 5. Despite the name
2299
+ * it is not sentiment polarity, and `0` matches only an exact zero, so it
2300
+ * returns almost nothing.
2301
+ *
2302
+ * The Score fields (`SENTI_SCORE_7D`, `SENTI_SCORE_1M`, `SCORE_CHANGE_7D`) are
2303
+ * the SentiSense Score, not polarity: unbounded, banded at 5 / 13 / 23 either
2304
+ * side of zero. Filter on those band edges, not on values like `0.5`, which
2305
+ * behave as "any positive score".
2306
+ *
2307
+ * Nulls never match, in either direction: `RETURN_1Y >= 0` and `RETURN_1Y < 0`
2308
+ * do not partition the universe, because a stock listed four months ago is in
2309
+ * neither result. If a screen returns fewer rows than you expect, check
2310
+ * coverage before you check your thresholds.
2311
+ *
2312
+ * Screens read a snapshot that refreshes every 20 minutes, so this is not a
2313
+ * quote feed. Use `client.stocks.getQuote()` for live prices.
2314
+ */
2315
+ declare class Screener {
2316
+ private client;
2317
+ constructor(client: APIClient);
2318
+ /**
2319
+ * Every filterable field, with its unit, operators and description, for both
2320
+ * universes.
2321
+ *
2322
+ * Build a filter UI from this rather than hardcoding the list and you inherit
2323
+ * new fields as they ship. The ETF `STRING` fields (`ISSUER`, `ASSET_CLASS`,
2324
+ * `TRACKED_INDEX`) come back with their `values` populated from the live
2325
+ * universe, so pickers stay current without a redeploy.
2326
+ */
2327
+ fields(): Promise<ScreenerFieldCatalog>;
2328
+ /**
2329
+ * The curated screens shipped in the product, each with a runnable plan.
2330
+ *
2331
+ * Each `plan` round-trips straight into {@link run} (or {@link runEtfs} when
2332
+ * `plan.universe === "ETF"`) with nothing to rebuild.
2333
+ *
2334
+ * Their filters identify the field with `field` rather than `fieldName`.
2335
+ * Both keys are accepted on the way in, so read either when inspecting a plan
2336
+ * you did not build yourself.
2337
+ */
2338
+ screens(): Promise<ScreenerScreensResponse>;
2339
+ /**
2340
+ * Run a screen against the stock universe.
2341
+ *
2342
+ * `tickers` is optional: omit it to screen the whole tracked universe, pass a
2343
+ * list to screen a watchlist. `limit` sits next to the plan rather than
2344
+ * inside it, because a plan is a stored object and paging is a transport
2345
+ * concern; it defaults to 100 and caps at 500.
2346
+ *
2347
+ * Read `matched` before you read `results`: it is the count before `limit`
2348
+ * was applied, so a `matched` above your `limit` means you are holding the
2349
+ * top slice under the plan's sort, not the whole answer.
2350
+ *
2351
+ * @example
2352
+ * ```ts
2353
+ * const res = await client.screener.run({
2354
+ * plan: {
2355
+ * filters: [
2356
+ * { fieldName: "SENTI_SCORE_7D", op: "GTE", value: 13 },
2357
+ * { fieldName: "ANALYST_BUY_RATIO_PCT", op: "LTE", value: 30 },
2358
+ * { fieldName: "ANALYST_COUNT", op: "GTE", value: 5 },
2359
+ * ],
2360
+ * sort: { fieldName: "SENTI_SCORE_7D", dir: "DESC" },
2361
+ * },
2362
+ * limit: 25,
2363
+ * });
2364
+ * ```
2365
+ */
2366
+ run(options: ScreenerExecuteOptions): Promise<ScreenerExecuteResponse>;
2367
+ /**
2368
+ * Run a screen against the ETF universe.
2369
+ *
2370
+ * Same request shape as {@link run}, against a different field vocabulary:
2371
+ * take the ETF names from `fields().etf`. `IN` / `NOT_IN` take a `values`
2372
+ * array instead of `value` and are the operators for the string fields
2373
+ * (`ISSUER`, `ASSET_CLASS`, `TRACKED_INDEX`).
2374
+ *
2375
+ * `CONSTITUENTS_WEIGHTED_SENTISENSE` is the holdings-weighted SentiSense
2376
+ * Score across what the fund owns and is usually the one you want;
2377
+ * `DIRECT_SENTISENSE` is the Score from chatter about the fund ticker itself,
2378
+ * which on a broad index fund is mostly macro noise. `WEIGHT_COVERED_PCT`
2379
+ * tells you how much of the fund's weight had constituent data behind the
2380
+ * weighted number.
2381
+ */
2382
+ runEtfs(options: ScreenerExecuteOptions): Promise<EtfScreenerExecuteResponse>;
2383
+ }
2384
+
1828
2385
  declare class Stocks {
1829
2386
  private client;
1830
2387
  constructor(client: APIClient);
@@ -2048,6 +2605,8 @@ declare class SentiSense implements APIClient {
2048
2605
  readonly indexes: Indexes;
2049
2606
  readonly trackers: Trackers;
2050
2607
  readonly calendar: Calendar;
2608
+ readonly earnings: Earnings;
2609
+ readonly screener: Screener;
2051
2610
  constructor(options?: SentiSenseOptions);
2052
2611
  /** @internal */
2053
2612
  get<T = unknown>(path: string, params?: object): Promise<T>;
@@ -2093,6 +2652,6 @@ declare class APIError extends SentiSenseError {
2093
2652
  constructor(message: string, status: number, code?: string);
2094
2653
  }
2095
2654
 
2096
- declare const VERSION = "0.35.0";
2655
+ declare const VERSION = "0.38.0";
2097
2656
 
2098
- export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarningsCalendarResponse, type EarningsEvent, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfSentimentAggregate, type EtfSentimentReading, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticianActivityOptions, type GetPoliticiansOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, type InstitutionalFlows, type InstitutionalFlowsResponse, type KBEntity, type KpiCoverageEntry, type KpiCoverageResponse, type KpiDataPoint, type KpiSeries, type KpiTypeEntry, type ListInstitutionsOptions, type LockedInsight, type MarketMood, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type PoliticianDetail, type PoliticianSummary, type PreviewResponse, type Quarter, RateLimitError, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortVolume, type SimilarStock, type StockDetail, type StockEntity, type StockImage, type StockPrice, type StockProfile, type StockQuote, type Story, type StoryCluster, type TickerHolders, type TrackerEvent, type TrackerGeoEntry, type TrackerHeadlineMetric, type TrackerListResponse, type TrackerListing, type TrackerMetricValue, type TrackerSignal, type TrackerSnapshot, type TrackerSnapshotResponse, type TrackerSourceRef, type TrackerTableRow, type TrackerTimeSeriesPoint, type TtmFundamentals, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
2657
+ export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarningsCalendarResponse, type EarningsEvent, type EarningsKpiHighlight, type EarningsQuarter, type EarningsSource, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticianActivityOptions, type GetPoliticiansOptions, type GetRecentEarningsOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, type InstitutionalFlows, type InstitutionalFlowsResponse, type KBEntity, type KpiCoverageEntry, type KpiCoverageResponse, type KpiDataPoint, type KpiSeries, type KpiTypeEntry, type ListInstitutionsOptions, type LockedInsight, type MarketMood, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type PoliticianDetail, type PoliticianSummary, type PreviewResponse, type Quarter, RateLimitError, type RecentEarningsEntry, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortVolume, type SimilarStock, type StockDetail, type StockEntity, type StockImage, type StockPrice, type StockProfile, type StockQuote, type Story, type StoryCluster, type TickerHolders, type TrackerEvent, type TrackerGeoEntry, type TrackerHeadlineMetric, type TrackerListResponse, type TrackerListing, type TrackerMetricValue, type TrackerSignal, type TrackerSnapshot, type TrackerSnapshotResponse, type TrackerSourceRef, type TrackerTableRow, type TrackerTimeSeriesPoint, type TtmFundamentals, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };