sentisense 0.34.0 → 0.35.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
@@ -308,6 +308,11 @@ interface GetProfileOptions {
308
308
  }
309
309
  interface GetAISummaryOptions {
310
310
  depth?: "basic" | "deep";
311
+ /**
312
+ * @deprecated Has no effect and is no longer sent. Reports are curated and served
313
+ * as published, so there is nothing for a caller to regenerate on demand. Accepted
314
+ * only so existing code keeps compiling; drop it from your call.
315
+ */
311
316
  forceRefresh?: boolean;
312
317
  }
313
318
  interface GetMetricsBreakdownOptions {
@@ -1188,6 +1193,114 @@ interface TrackerSnapshotResponse {
1188
1193
  totalCount?: number;
1189
1194
  data: TrackerSnapshot;
1190
1195
  }
1196
+ /** Per-index discovery row returned by `client.indexes.list()`. */
1197
+ interface IndexListing {
1198
+ indexId: string;
1199
+ displayName: string;
1200
+ /** One-sentence summary, suitable for a card subtitle. */
1201
+ description: string;
1202
+ /** Output scale: `"SENTIMENT"` (signed, -1 to +1) or `"PERCENT_0_100"`. Set axis bounds from this, not from the id. */
1203
+ scale: string;
1204
+ /** Access tier: `"free"` or `"pro"`. Every index is `"free"` today; read it rather than assuming. */
1205
+ accessTier?: string;
1206
+ /**
1207
+ * Richest view of this index, which is NOT always the detail route. Market
1208
+ * Mood points at `/api/v2/market-mood`, which carries a phase band, weekly
1209
+ * change, per-signal breakdown and per-sector map that the shared envelope
1210
+ * cannot hold. Every advertised `indexId` still resolves on
1211
+ * {@link Indexes.get}, so a generic client can iterate the listing without
1212
+ * special-casing anything.
1213
+ */
1214
+ canonicalUrl: string;
1215
+ }
1216
+ /** Discovery envelope returned by `client.indexes.list()`. */
1217
+ interface IndexListResponse {
1218
+ indexes: IndexListing[];
1219
+ }
1220
+ /** One entity's row in a basket index's constituent breakdown. */
1221
+ interface IndexConstituent {
1222
+ /** Ontology entity id, resolvable via the entities API. */
1223
+ kbEntityId: string;
1224
+ displayName: string;
1225
+ /** The entity's role in this basket; the role is what carries the weight. */
1226
+ role: string;
1227
+ /** Relative weight on this date. `0` when `staleness` is `"OUT_OF_SEGMENT"`. */
1228
+ weight: number;
1229
+ /** The entity's own reading. */
1230
+ value: number | null;
1231
+ /** Mentions behind that reading in the lookback window. */
1232
+ mentionsCount: number | null;
1233
+ /**
1234
+ * `"FRESH"` (mentioned inside the lookback), `"CARRIED_FORWARD"` (last known
1235
+ * value standing in), `"EXCLUDED"` (no usable reading, renormalized out), or
1236
+ * `"OUT_OF_SEGMENT"` (not in the basket on this date, reported only for
1237
+ * transparency).
1238
+ */
1239
+ staleness: string;
1240
+ /**
1241
+ * Reserved. The API currently returns `null` here on every constituent, so do
1242
+ * not build on it. To get the same number today, compute `weight * value`
1243
+ * over the sum of `weight` across constituents whose `staleness` is not
1244
+ * `"EXCLUDED"`.
1245
+ */
1246
+ contribution: number | null;
1247
+ /** Detail page for the entity, or `null` when there is no resolvable target. */
1248
+ link: string | null;
1249
+ }
1250
+ /**
1251
+ * Latest reading for one index, returned by `client.indexes.get()`.
1252
+ *
1253
+ * Two archetypes share this envelope, and the difference is load-bearing. A
1254
+ * **basket** index (`fed-sentiment`, `ai-sentiment`) weight-averages tracked
1255
+ * entities, so `constituents`, `basketSize`, `coverage` and `totalMentions`
1256
+ * describe how the headline was built. A **composite** index (`market-mood`) is
1257
+ * built from signals rather than entities, so those four are `null` *by
1258
+ * construction*, not because data is missing. Branch on them; never treat
1259
+ * `null` there as an error.
1260
+ */
1261
+ interface IndexSnapshot {
1262
+ indexId: string;
1263
+ displayName: string;
1264
+ /** Date the reading covers, `"YYYY-MM-DD"`. Bucket start for weekly indexes. */
1265
+ asOf: string;
1266
+ /** The headline scalar, on `scale`. */
1267
+ value: number | null;
1268
+ scale: string;
1269
+ /** Constituents that actually contributed. `null` on a composite index. */
1270
+ coverage: number | null;
1271
+ /** Constituents in the basket on this date. `null` on a composite index. */
1272
+ basketSize: number | null;
1273
+ /** Mentions behind the reading. `null` on a composite index. */
1274
+ totalMentions: number | null;
1275
+ /** How the value was computed, and what any `null` fields mean. */
1276
+ methodologyNote: string;
1277
+ /** Per-entity breakdown. `null` on a composite index. */
1278
+ constituents: IndexConstituent[] | null;
1279
+ }
1280
+ /** One point on an index's scalar series. */
1281
+ interface IndexHistoryPoint {
1282
+ /** `"YYYY-MM-DD"`. */
1283
+ date: string;
1284
+ value: number | null;
1285
+ }
1286
+ /**
1287
+ * Historical series returned by `client.indexes.history()`.
1288
+ *
1289
+ * Point spacing follows the index, not the calendar: a weekly index emits one
1290
+ * point per Monday-Sunday bucket, a daily index one per day, and Market Mood
1291
+ * trading days only. Thin or low-coverage buckets are withheld rather than
1292
+ * published, so `history` can be shorter than `days` and can contain gaps. Plot
1293
+ * against `date`; never assume a fixed interval, and never read a missing date
1294
+ * as zero.
1295
+ */
1296
+ interface IndexHistoryResponse {
1297
+ indexId: string;
1298
+ displayName: string;
1299
+ scale: string;
1300
+ /** The window you requested, echoed back. */
1301
+ days: number;
1302
+ history: IndexHistoryPoint[];
1303
+ }
1191
1304
 
1192
1305
  interface AnalystConsensus {
1193
1306
  ticker: string;
@@ -1755,7 +1868,14 @@ declare class Stocks {
1755
1868
  getSentiment(ticker: string): Promise<PreviewResponse<StockSentiment>>;
1756
1869
  /** Get related KB entities (people, products, partners). */
1757
1870
  getEntities(ticker: string): Promise<StockEntity[]>;
1758
- /** Get AI-generated stock analysis report. Requires PRO tier. */
1871
+ /**
1872
+ * Get AI-generated stock analysis report. Requires PRO tier.
1873
+ *
1874
+ * `depth: "deep"` returns the full curated report and consumes one report view on
1875
+ * metered tiers; the default `"basic"` returns the one-paragraph summary.
1876
+ *
1877
+ * The deprecated `forceRefresh` option is accepted and discarded, not forwarded.
1878
+ */
1759
1879
  getAISummary(ticker: string, options?: GetAISummaryOptions): Promise<AISummary>;
1760
1880
  /** Get sentiment/mention metrics breakdown by entity. */
1761
1881
  getMetricsBreakdown(ticker: string, metricType: string, options?: GetMetricsBreakdownOptions): Promise<MetricsBreakdown>;
@@ -1823,6 +1943,54 @@ declare class Stocks {
1823
1943
  getKpiTypes(ticker: string): Promise<KpiTypeEntry[]>;
1824
1944
  }
1825
1945
 
1946
+ /**
1947
+ * Indexes: composite scalars tracked over time, each blending its own inputs
1948
+ * into one number on a stated scale. Every index answers on the same envelope,
1949
+ * so you write one renderer and get every current and future SentiSense index.
1950
+ *
1951
+ * Two archetypes share that envelope. A **basket** index weight-averages
1952
+ * tracked entities and fills `constituents` / `basketSize` / `coverage` /
1953
+ * `totalMentions`; a **composite** index is built from signals instead and
1954
+ * returns `null` for all four by construction. See {@link IndexSnapshot}.
1955
+ *
1956
+ * @see IndexSnapshot
1957
+ */
1958
+ declare class Indexes {
1959
+ private client;
1960
+ constructor(client: APIClient);
1961
+ /**
1962
+ * List every index the platform publishes: id, display name, one-line
1963
+ * description, the scale it lives on, its access tier, and where its richest
1964
+ * view lives.
1965
+ *
1966
+ * Iterate this rather than hardcoding ids. Every `indexId` it advertises
1967
+ * resolves on {@link get} and {@link history}.
1968
+ */
1969
+ list(): Promise<IndexListResponse>;
1970
+ /**
1971
+ * Latest reading for one index.
1972
+ *
1973
+ * Check `constituents` for `null` before iterating: it is `null` on a
1974
+ * composite index like `market-mood`, which has no constituents by
1975
+ * construction. For Market Mood this is the narrowed view; the phase band,
1976
+ * weekly change, per-signal breakdown and per-sector map live on
1977
+ * `client.marketMood.get()`, and both report the same headline number.
1978
+ *
1979
+ * @param indexId slug from {@link list}, e.g. `"fed-sentiment"`.
1980
+ */
1981
+ get(indexId: string): Promise<IndexSnapshot>;
1982
+ /**
1983
+ * Historical scalar series for one index, for charting.
1984
+ *
1985
+ * Thin or low-coverage buckets are withheld, so the series can be shorter
1986
+ * than `days` and can contain gaps. Plot against each point's `date`.
1987
+ *
1988
+ * @param indexId slug from {@link list}.
1989
+ * @param days days of history to return. Defaults to the API's own 180.
1990
+ */
1991
+ history(indexId: string, days?: number): Promise<IndexHistoryResponse>;
1992
+ }
1993
+
1826
1994
  /**
1827
1995
  * Trackers: observational data products published as a standardized
1828
1996
  * `TrackerSnapshot` envelope. Every tracker (institution rankings,
@@ -1877,6 +2045,7 @@ declare class SentiSense implements APIClient {
1877
2045
  readonly marketMood: MarketMoodResource;
1878
2046
  readonly marketSummary: MarketSummaryResource;
1879
2047
  readonly kb: KB;
2048
+ readonly indexes: Indexes;
1880
2049
  readonly trackers: Trackers;
1881
2050
  readonly calendar: Calendar;
1882
2051
  constructor(options?: SentiSenseOptions);
@@ -1924,6 +2093,6 @@ declare class APIError extends SentiSenseError {
1924
2093
  constructor(message: string, status: number, code?: string);
1925
2094
  }
1926
2095
 
1927
- declare const VERSION = "0.34.0";
2096
+ declare const VERSION = "0.35.0";
1928
2097
 
1929
- 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 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -308,6 +308,11 @@ interface GetProfileOptions {
308
308
  }
309
309
  interface GetAISummaryOptions {
310
310
  depth?: "basic" | "deep";
311
+ /**
312
+ * @deprecated Has no effect and is no longer sent. Reports are curated and served
313
+ * as published, so there is nothing for a caller to regenerate on demand. Accepted
314
+ * only so existing code keeps compiling; drop it from your call.
315
+ */
311
316
  forceRefresh?: boolean;
312
317
  }
313
318
  interface GetMetricsBreakdownOptions {
@@ -1188,6 +1193,114 @@ interface TrackerSnapshotResponse {
1188
1193
  totalCount?: number;
1189
1194
  data: TrackerSnapshot;
1190
1195
  }
1196
+ /** Per-index discovery row returned by `client.indexes.list()`. */
1197
+ interface IndexListing {
1198
+ indexId: string;
1199
+ displayName: string;
1200
+ /** One-sentence summary, suitable for a card subtitle. */
1201
+ description: string;
1202
+ /** Output scale: `"SENTIMENT"` (signed, -1 to +1) or `"PERCENT_0_100"`. Set axis bounds from this, not from the id. */
1203
+ scale: string;
1204
+ /** Access tier: `"free"` or `"pro"`. Every index is `"free"` today; read it rather than assuming. */
1205
+ accessTier?: string;
1206
+ /**
1207
+ * Richest view of this index, which is NOT always the detail route. Market
1208
+ * Mood points at `/api/v2/market-mood`, which carries a phase band, weekly
1209
+ * change, per-signal breakdown and per-sector map that the shared envelope
1210
+ * cannot hold. Every advertised `indexId` still resolves on
1211
+ * {@link Indexes.get}, so a generic client can iterate the listing without
1212
+ * special-casing anything.
1213
+ */
1214
+ canonicalUrl: string;
1215
+ }
1216
+ /** Discovery envelope returned by `client.indexes.list()`. */
1217
+ interface IndexListResponse {
1218
+ indexes: IndexListing[];
1219
+ }
1220
+ /** One entity's row in a basket index's constituent breakdown. */
1221
+ interface IndexConstituent {
1222
+ /** Ontology entity id, resolvable via the entities API. */
1223
+ kbEntityId: string;
1224
+ displayName: string;
1225
+ /** The entity's role in this basket; the role is what carries the weight. */
1226
+ role: string;
1227
+ /** Relative weight on this date. `0` when `staleness` is `"OUT_OF_SEGMENT"`. */
1228
+ weight: number;
1229
+ /** The entity's own reading. */
1230
+ value: number | null;
1231
+ /** Mentions behind that reading in the lookback window. */
1232
+ mentionsCount: number | null;
1233
+ /**
1234
+ * `"FRESH"` (mentioned inside the lookback), `"CARRIED_FORWARD"` (last known
1235
+ * value standing in), `"EXCLUDED"` (no usable reading, renormalized out), or
1236
+ * `"OUT_OF_SEGMENT"` (not in the basket on this date, reported only for
1237
+ * transparency).
1238
+ */
1239
+ staleness: string;
1240
+ /**
1241
+ * Reserved. The API currently returns `null` here on every constituent, so do
1242
+ * not build on it. To get the same number today, compute `weight * value`
1243
+ * over the sum of `weight` across constituents whose `staleness` is not
1244
+ * `"EXCLUDED"`.
1245
+ */
1246
+ contribution: number | null;
1247
+ /** Detail page for the entity, or `null` when there is no resolvable target. */
1248
+ link: string | null;
1249
+ }
1250
+ /**
1251
+ * Latest reading for one index, returned by `client.indexes.get()`.
1252
+ *
1253
+ * Two archetypes share this envelope, and the difference is load-bearing. A
1254
+ * **basket** index (`fed-sentiment`, `ai-sentiment`) weight-averages tracked
1255
+ * entities, so `constituents`, `basketSize`, `coverage` and `totalMentions`
1256
+ * describe how the headline was built. A **composite** index (`market-mood`) is
1257
+ * built from signals rather than entities, so those four are `null` *by
1258
+ * construction*, not because data is missing. Branch on them; never treat
1259
+ * `null` there as an error.
1260
+ */
1261
+ interface IndexSnapshot {
1262
+ indexId: string;
1263
+ displayName: string;
1264
+ /** Date the reading covers, `"YYYY-MM-DD"`. Bucket start for weekly indexes. */
1265
+ asOf: string;
1266
+ /** The headline scalar, on `scale`. */
1267
+ value: number | null;
1268
+ scale: string;
1269
+ /** Constituents that actually contributed. `null` on a composite index. */
1270
+ coverage: number | null;
1271
+ /** Constituents in the basket on this date. `null` on a composite index. */
1272
+ basketSize: number | null;
1273
+ /** Mentions behind the reading. `null` on a composite index. */
1274
+ totalMentions: number | null;
1275
+ /** How the value was computed, and what any `null` fields mean. */
1276
+ methodologyNote: string;
1277
+ /** Per-entity breakdown. `null` on a composite index. */
1278
+ constituents: IndexConstituent[] | null;
1279
+ }
1280
+ /** One point on an index's scalar series. */
1281
+ interface IndexHistoryPoint {
1282
+ /** `"YYYY-MM-DD"`. */
1283
+ date: string;
1284
+ value: number | null;
1285
+ }
1286
+ /**
1287
+ * Historical series returned by `client.indexes.history()`.
1288
+ *
1289
+ * Point spacing follows the index, not the calendar: a weekly index emits one
1290
+ * point per Monday-Sunday bucket, a daily index one per day, and Market Mood
1291
+ * trading days only. Thin or low-coverage buckets are withheld rather than
1292
+ * published, so `history` can be shorter than `days` and can contain gaps. Plot
1293
+ * against `date`; never assume a fixed interval, and never read a missing date
1294
+ * as zero.
1295
+ */
1296
+ interface IndexHistoryResponse {
1297
+ indexId: string;
1298
+ displayName: string;
1299
+ scale: string;
1300
+ /** The window you requested, echoed back. */
1301
+ days: number;
1302
+ history: IndexHistoryPoint[];
1303
+ }
1191
1304
 
1192
1305
  interface AnalystConsensus {
1193
1306
  ticker: string;
@@ -1755,7 +1868,14 @@ declare class Stocks {
1755
1868
  getSentiment(ticker: string): Promise<PreviewResponse<StockSentiment>>;
1756
1869
  /** Get related KB entities (people, products, partners). */
1757
1870
  getEntities(ticker: string): Promise<StockEntity[]>;
1758
- /** Get AI-generated stock analysis report. Requires PRO tier. */
1871
+ /**
1872
+ * Get AI-generated stock analysis report. Requires PRO tier.
1873
+ *
1874
+ * `depth: "deep"` returns the full curated report and consumes one report view on
1875
+ * metered tiers; the default `"basic"` returns the one-paragraph summary.
1876
+ *
1877
+ * The deprecated `forceRefresh` option is accepted and discarded, not forwarded.
1878
+ */
1759
1879
  getAISummary(ticker: string, options?: GetAISummaryOptions): Promise<AISummary>;
1760
1880
  /** Get sentiment/mention metrics breakdown by entity. */
1761
1881
  getMetricsBreakdown(ticker: string, metricType: string, options?: GetMetricsBreakdownOptions): Promise<MetricsBreakdown>;
@@ -1823,6 +1943,54 @@ declare class Stocks {
1823
1943
  getKpiTypes(ticker: string): Promise<KpiTypeEntry[]>;
1824
1944
  }
1825
1945
 
1946
+ /**
1947
+ * Indexes: composite scalars tracked over time, each blending its own inputs
1948
+ * into one number on a stated scale. Every index answers on the same envelope,
1949
+ * so you write one renderer and get every current and future SentiSense index.
1950
+ *
1951
+ * Two archetypes share that envelope. A **basket** index weight-averages
1952
+ * tracked entities and fills `constituents` / `basketSize` / `coverage` /
1953
+ * `totalMentions`; a **composite** index is built from signals instead and
1954
+ * returns `null` for all four by construction. See {@link IndexSnapshot}.
1955
+ *
1956
+ * @see IndexSnapshot
1957
+ */
1958
+ declare class Indexes {
1959
+ private client;
1960
+ constructor(client: APIClient);
1961
+ /**
1962
+ * List every index the platform publishes: id, display name, one-line
1963
+ * description, the scale it lives on, its access tier, and where its richest
1964
+ * view lives.
1965
+ *
1966
+ * Iterate this rather than hardcoding ids. Every `indexId` it advertises
1967
+ * resolves on {@link get} and {@link history}.
1968
+ */
1969
+ list(): Promise<IndexListResponse>;
1970
+ /**
1971
+ * Latest reading for one index.
1972
+ *
1973
+ * Check `constituents` for `null` before iterating: it is `null` on a
1974
+ * composite index like `market-mood`, which has no constituents by
1975
+ * construction. For Market Mood this is the narrowed view; the phase band,
1976
+ * weekly change, per-signal breakdown and per-sector map live on
1977
+ * `client.marketMood.get()`, and both report the same headline number.
1978
+ *
1979
+ * @param indexId slug from {@link list}, e.g. `"fed-sentiment"`.
1980
+ */
1981
+ get(indexId: string): Promise<IndexSnapshot>;
1982
+ /**
1983
+ * Historical scalar series for one index, for charting.
1984
+ *
1985
+ * Thin or low-coverage buckets are withheld, so the series can be shorter
1986
+ * than `days` and can contain gaps. Plot against each point's `date`.
1987
+ *
1988
+ * @param indexId slug from {@link list}.
1989
+ * @param days days of history to return. Defaults to the API's own 180.
1990
+ */
1991
+ history(indexId: string, days?: number): Promise<IndexHistoryResponse>;
1992
+ }
1993
+
1826
1994
  /**
1827
1995
  * Trackers: observational data products published as a standardized
1828
1996
  * `TrackerSnapshot` envelope. Every tracker (institution rankings,
@@ -1877,6 +2045,7 @@ declare class SentiSense implements APIClient {
1877
2045
  readonly marketMood: MarketMoodResource;
1878
2046
  readonly marketSummary: MarketSummaryResource;
1879
2047
  readonly kb: KB;
2048
+ readonly indexes: Indexes;
1880
2049
  readonly trackers: Trackers;
1881
2050
  readonly calendar: Calendar;
1882
2051
  constructor(options?: SentiSenseOptions);
@@ -1924,6 +2093,6 @@ declare class APIError extends SentiSenseError {
1924
2093
  constructor(message: string, status: number, code?: string);
1925
2094
  }
1926
2095
 
1927
- declare const VERSION = "0.34.0";
2096
+ declare const VERSION = "0.35.0";
1928
2097
 
1929
- 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 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 };
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 };
package/dist/index.mjs CHANGED
@@ -519,7 +519,11 @@ var MarketMoodResource = class {
519
519
  return this.client.get("/api/v2/market-mood");
520
520
  }
521
521
  // TODO: accept a `days` param to control history length (the endpoint supports ?days=N).
522
- // TODO: add a sibling `indexes` resource for /api/v1/indexes/{id} (+ /history), e.g. fed-sentiment.
522
+ //
523
+ // Market Mood is also reachable through `client.indexes`, which serves it in the shared
524
+ // index envelope alongside fed-sentiment and ai-sentiment. Use this resource when you want
525
+ // the phase band, weekly change, per-signal breakdown and per-sector map; use `indexes`
526
+ // when you want every index to answer the same shape. Both report the same headline number.
523
527
  };
524
528
 
525
529
  // src/resources/marketSummary.ts
@@ -614,9 +618,17 @@ var Stocks = class {
614
618
  async getEntities(ticker) {
615
619
  return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/entities`);
616
620
  }
617
- /** Get AI-generated stock analysis report. Requires PRO tier. */
621
+ /**
622
+ * Get AI-generated stock analysis report. Requires PRO tier.
623
+ *
624
+ * `depth: "deep"` returns the full curated report and consumes one report view on
625
+ * metered tiers; the default `"basic"` returns the one-paragraph summary.
626
+ *
627
+ * The deprecated `forceRefresh` option is accepted and discarded, not forwarded.
628
+ */
618
629
  async getAISummary(ticker, options) {
619
- return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/ai-summary`, options);
630
+ const { forceRefresh: _forceRefresh, ...params } = options ?? {};
631
+ return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/ai-summary`, params);
620
632
  }
621
633
  /** Get sentiment/mention metrics breakdown by entity. */
622
634
  async getMetricsBreakdown(ticker, metricType, options) {
@@ -721,6 +733,53 @@ var Stocks = class {
721
733
  }
722
734
  };
723
735
 
736
+ // src/resources/indexes.ts
737
+ var Indexes = class {
738
+ constructor(client) {
739
+ this.client = client;
740
+ }
741
+ /**
742
+ * List every index the platform publishes: id, display name, one-line
743
+ * description, the scale it lives on, its access tier, and where its richest
744
+ * view lives.
745
+ *
746
+ * Iterate this rather than hardcoding ids. Every `indexId` it advertises
747
+ * resolves on {@link get} and {@link history}.
748
+ */
749
+ async list() {
750
+ return this.client.get("/api/v1/indexes");
751
+ }
752
+ /**
753
+ * Latest reading for one index.
754
+ *
755
+ * Check `constituents` for `null` before iterating: it is `null` on a
756
+ * composite index like `market-mood`, which has no constituents by
757
+ * construction. For Market Mood this is the narrowed view; the phase band,
758
+ * weekly change, per-signal breakdown and per-sector map live on
759
+ * `client.marketMood.get()`, and both report the same headline number.
760
+ *
761
+ * @param indexId slug from {@link list}, e.g. `"fed-sentiment"`.
762
+ */
763
+ async get(indexId) {
764
+ return this.client.get(`/api/v1/indexes/${indexId}`);
765
+ }
766
+ /**
767
+ * Historical scalar series for one index, for charting.
768
+ *
769
+ * Thin or low-coverage buckets are withheld, so the series can be shorter
770
+ * than `days` and can contain gaps. Plot against each point's `date`.
771
+ *
772
+ * @param indexId slug from {@link list}.
773
+ * @param days days of history to return. Defaults to the API's own 180.
774
+ */
775
+ async history(indexId, days) {
776
+ return this.client.get(
777
+ `/api/v1/indexes/${indexId}/history`,
778
+ days === void 0 ? void 0 : { days }
779
+ );
780
+ }
781
+ };
782
+
724
783
  // src/resources/trackers.ts
725
784
  var Trackers = class {
726
785
  constructor(client) {
@@ -751,7 +810,7 @@ var Trackers = class {
751
810
  };
752
811
 
753
812
  // src/version.ts
754
- var VERSION = "0.34.0";
813
+ var VERSION = "0.35.0";
755
814
 
756
815
  // src/client.ts
757
816
  var DEFAULT_BASE_URL = "https://app.sentisense.ai";
@@ -793,6 +852,7 @@ var SentiSense = class {
793
852
  this.marketMood = new MarketMoodResource(this);
794
853
  this.marketSummary = new MarketSummaryResource(this);
795
854
  this.kb = new KB(this);
855
+ this.indexes = new Indexes(this);
796
856
  this.trackers = new Trackers(this);
797
857
  this.calendar = new Calendar(this);
798
858
  }