sentisense 0.35.0 → 0.36.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/README.md +35 -0
- package/dist/index.cjs +52 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +162 -5
- package/dist/index.d.ts +162 -5
- package/dist/index.mjs +52 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -839,6 +839,110 @@ interface GetEarningsCalendarOptions {
|
|
|
839
839
|
/** Session filter. */
|
|
840
840
|
time?: "before_open" | "after_close" | "during_market" | "unknown";
|
|
841
841
|
}
|
|
842
|
+
/**
|
|
843
|
+
* One KPI card on a reported quarter.
|
|
844
|
+
*
|
|
845
|
+
* `value` and `yoy` are display strings, already formatted (`"$109.4B"`,
|
|
846
|
+
* `"+16% YoY"`), not numbers to compute with. `yoy` is absent when the quarter
|
|
847
|
+
* carries no year-over-year comparison for that line, which is common on
|
|
848
|
+
* call highlights.
|
|
849
|
+
*/
|
|
850
|
+
interface EarningsKpiHighlight {
|
|
851
|
+
label: string;
|
|
852
|
+
value: string;
|
|
853
|
+
yoy?: string;
|
|
854
|
+
}
|
|
855
|
+
/** A citation backing a reported quarter. */
|
|
856
|
+
interface EarningsSource {
|
|
857
|
+
title: string;
|
|
858
|
+
url: string;
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* One fiscal quarter of the earnings analysis report, from
|
|
862
|
+
* `client.earnings.getSummaries()`.
|
|
863
|
+
*
|
|
864
|
+
* The wire shape depends on the caller's tier, so branch on the envelope's
|
|
865
|
+
* `isPreview` rather than on field presence. `fiscalPeriod`, `reportDate`,
|
|
866
|
+
* `headline`, `hasTranscript`, `generatedAt` and `source` arrive on both tiers.
|
|
867
|
+
*
|
|
868
|
+
* PRO adds the bodies: `summaryMd`, the full `kpiHighlights`, `guidance`,
|
|
869
|
+
* `transcriptSummaryMd`, `transcriptHighlights`, `transcriptGeneratedAt` and
|
|
870
|
+
* `sources`.
|
|
871
|
+
*
|
|
872
|
+
* The FREE preview replaces those bodies with shape: up to two `kpiHighlights`
|
|
873
|
+
* cards (without `yoy`) plus `kpiHighlightCount`, the section titles in
|
|
874
|
+
* `summaryTopics` and `transcriptTopics`, and `hasGuidance` with
|
|
875
|
+
* `guidanceDirection` in place of the guidance language. It never carries a
|
|
876
|
+
* body, a KPI history, or a guidance figure.
|
|
877
|
+
*
|
|
878
|
+
* Absence is explicit: a quarter with no call summary sets `hasTranscript` to
|
|
879
|
+
* `false` rather than dropping the concept, so a client can say "no call
|
|
880
|
+
* summary yet" instead of rendering nothing.
|
|
881
|
+
*/
|
|
882
|
+
interface EarningsQuarter {
|
|
883
|
+
/** Display fiscal period, e.g. `"Q2 FY2026"`. */
|
|
884
|
+
fiscalPeriod: string;
|
|
885
|
+
/** Date the results were reported, ISO calendar day `"YYYY-MM-DD"`. */
|
|
886
|
+
reportDate: string;
|
|
887
|
+
/** One-line editorial summary of the quarter. */
|
|
888
|
+
headline: string;
|
|
889
|
+
/** True when a summary of the earnings call exists for this quarter. */
|
|
890
|
+
hasTranscript: boolean;
|
|
891
|
+
/** When the quarter summary was generated, epoch seconds. */
|
|
892
|
+
generatedAt: number;
|
|
893
|
+
/** Provenance of the quarter summary. */
|
|
894
|
+
source: "press_release" | "transcript";
|
|
895
|
+
/** PRO: markdown body summarizing the reported results. */
|
|
896
|
+
summaryMd?: string;
|
|
897
|
+
/** PRO carries the full set; a preview carries up to two cards without `yoy`. */
|
|
898
|
+
kpiHighlights?: EarningsKpiHighlight[];
|
|
899
|
+
/** PRO: forward-guidance language as reported. Absent when the quarter carries none. */
|
|
900
|
+
guidance?: string;
|
|
901
|
+
/** PRO: markdown body summarizing the call. Absent when `hasTranscript` is false. */
|
|
902
|
+
transcriptSummaryMd?: string;
|
|
903
|
+
/** PRO: call-specific highlights. Absent when there is no call summary. */
|
|
904
|
+
transcriptHighlights?: EarningsKpiHighlight[];
|
|
905
|
+
/** PRO: when the call summary was generated, epoch seconds. Can post-date `generatedAt`. */
|
|
906
|
+
transcriptGeneratedAt?: number;
|
|
907
|
+
/** PRO: citations backing the quarter. */
|
|
908
|
+
sources?: EarningsSource[];
|
|
909
|
+
/** Preview: how many KPI cards the full quarter carries. */
|
|
910
|
+
kpiHighlightCount?: number;
|
|
911
|
+
/** Preview: section titles of the summary, never body text. */
|
|
912
|
+
summaryTopics?: string[];
|
|
913
|
+
/** Preview: section titles of the call summary, never body text. */
|
|
914
|
+
transcriptTopics?: string[];
|
|
915
|
+
/** Preview: whether the quarter carries guidance at all. */
|
|
916
|
+
hasGuidance?: boolean;
|
|
917
|
+
/** Preview: the direction only, in place of the guidance language. */
|
|
918
|
+
guidanceDirection?: "RAISED" | "CUT" | "HELD" | "MIXED" | null;
|
|
919
|
+
}
|
|
920
|
+
/** One company that reported inside the recent window. */
|
|
921
|
+
interface RecentEarningsEntry {
|
|
922
|
+
ticker: string;
|
|
923
|
+
/** Display fiscal period, e.g. `"Q2 FY2026"`. */
|
|
924
|
+
fiscalPeriod: string;
|
|
925
|
+
/** Date the results were reported, ISO calendar day `"YYYY-MM-DD"`. */
|
|
926
|
+
reportDate: string;
|
|
927
|
+
headline: string;
|
|
928
|
+
/** True when a summary of the earnings call exists for this quarter. */
|
|
929
|
+
hasTranscriptSummary: boolean;
|
|
930
|
+
/** Latest content written for this quarter, epoch seconds. */
|
|
931
|
+
generatedAt: number;
|
|
932
|
+
}
|
|
933
|
+
interface GetEarningsSummariesOptions {
|
|
934
|
+
/**
|
|
935
|
+
* Max quarters returned, 1 to 40. Omitted, the API applies its own default
|
|
936
|
+
* of 12. A FREE key receives one quarter whatever you pass.
|
|
937
|
+
*/
|
|
938
|
+
limit?: number;
|
|
939
|
+
}
|
|
940
|
+
interface GetRecentEarningsOptions {
|
|
941
|
+
/** Look-back window in days, 1 to 31. Omitted, the API applies its own default of 7. */
|
|
942
|
+
days?: number;
|
|
943
|
+
/** Max rows returned, 1 to 100. Omitted, the API applies its own default of 50. */
|
|
944
|
+
limit?: number;
|
|
945
|
+
}
|
|
842
946
|
interface PreviewResponse<T> {
|
|
843
947
|
isPreview: boolean;
|
|
844
948
|
previewReason: "PRO_REQUIRED" | null;
|
|
@@ -1422,6 +1526,58 @@ declare class Documents {
|
|
|
1422
1526
|
getStoriesByTicker(ticker: string, options?: GetStoriesByTickerOptions): Promise<Story[]>;
|
|
1423
1527
|
}
|
|
1424
1528
|
|
|
1529
|
+
/**
|
|
1530
|
+
* Earnings: what a company actually reported, after the fact.
|
|
1531
|
+
*
|
|
1532
|
+
* A quarter's results arrive as a press release, a filing, and a call, none of
|
|
1533
|
+
* which is a data structure. {@link getSummaries} is the assembled version, one
|
|
1534
|
+
* object per fiscal quarter, and {@link getRecent} is the cross-ticker view of
|
|
1535
|
+
* who reported lately. Pair them to drive a post-earnings sweep: list the
|
|
1536
|
+
* window, then pull each ticker's analysis report.
|
|
1537
|
+
*
|
|
1538
|
+
* The forward-looking half of the family lives on `client.calendar.getEarnings()`,
|
|
1539
|
+
* which covers scheduled dates and consensus EPS rather than results.
|
|
1540
|
+
*
|
|
1541
|
+
* @see EarningsQuarter
|
|
1542
|
+
*/
|
|
1543
|
+
declare class Earnings {
|
|
1544
|
+
private client;
|
|
1545
|
+
constructor(client: APIClient);
|
|
1546
|
+
/**
|
|
1547
|
+
* Per-quarter earnings analysis report for one ticker, newest first.
|
|
1548
|
+
*
|
|
1549
|
+
* Each quarter carries the editorial headline, the KPI cards that matter for
|
|
1550
|
+
* that company with year-over-year deltas, the guidance language as
|
|
1551
|
+
* management phrased it, and a summary of the earnings call.
|
|
1552
|
+
*
|
|
1553
|
+
* Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
|
|
1554
|
+
* FREE key receives the latest quarter shaped rather than truncated, plus
|
|
1555
|
+
* `totalCount`. {@link EarningsQuarter} documents which fields each tier
|
|
1556
|
+
* carries.
|
|
1557
|
+
*
|
|
1558
|
+
* A quarter typically appears within 48 hours of the company reporting, and
|
|
1559
|
+
* the call summary can arrive after the press-release content for the same
|
|
1560
|
+
* quarter, so read `generatedAt` and `transcriptGeneratedAt` rather than
|
|
1561
|
+
* assuming a fixed lag. A ticker with no stored quarter answers with an empty
|
|
1562
|
+
* `data` array, not a 404.
|
|
1563
|
+
*
|
|
1564
|
+
* Use canonical ticker symbols: `GOOGL` (not `GOOG`), `BRK.B` (not `BRK-B`).
|
|
1565
|
+
*/
|
|
1566
|
+
getSummaries(ticker: string, options?: GetEarningsSummariesOptions): Promise<PreviewResponse<EarningsQuarter[]>>;
|
|
1567
|
+
/**
|
|
1568
|
+
* Which covered companies reported on or after `today - days`, newest first.
|
|
1569
|
+
*
|
|
1570
|
+
* Every API key receives the full window it asks for, so `isPreview` is
|
|
1571
|
+
* always `false` here. The window is bounded by `reportDate`, so a quarter
|
|
1572
|
+
* reported inside it appears even when its call summary lands later, and an
|
|
1573
|
+
* empty `data` array means nobody in the covered set reported in that window.
|
|
1574
|
+
*
|
|
1575
|
+
* This is the backward-looking feed; `client.calendar.getEarnings()` is the
|
|
1576
|
+
* forward-looking one.
|
|
1577
|
+
*/
|
|
1578
|
+
getRecent(options?: GetRecentEarningsOptions): Promise<PreviewResponse<RecentEarningsEntry[]>>;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1425
1581
|
declare class EntityMetrics {
|
|
1426
1582
|
private client;
|
|
1427
1583
|
constructor(client: APIClient);
|
|
@@ -1615,7 +1771,7 @@ declare class Insider {
|
|
|
1615
1771
|
/**
|
|
1616
1772
|
* Get market-wide insider activity: top buys and sells aggregated by ticker.
|
|
1617
1773
|
*
|
|
1618
|
-
* PRO-gated. Free
|
|
1774
|
+
* PRO-gated. Free-tier users receive a preview (top 5 per direction)
|
|
1619
1775
|
* with `isPreview: true` in the response.
|
|
1620
1776
|
*/
|
|
1621
1777
|
getActivity(options?: GetInsiderOptions): Promise<PreviewResponse<InsiderActivityResponse>>;
|
|
@@ -1639,7 +1795,7 @@ declare class Politicians {
|
|
|
1639
1795
|
/**
|
|
1640
1796
|
* Get recent congressional STOCK Act trading activity across all politicians.
|
|
1641
1797
|
*
|
|
1642
|
-
* PRO-gated. Free
|
|
1798
|
+
* PRO-gated. Free-tier users receive a preview (top 5 trades)
|
|
1643
1799
|
* with `isPreview: true` in the response.
|
|
1644
1800
|
*
|
|
1645
1801
|
* The feed is longer than one response: a default 90-day window is routinely well over a
|
|
@@ -1734,7 +1890,7 @@ declare class Insights {
|
|
|
1734
1890
|
user(options?: GetUserInsightsOptions): Promise<PreviewResponse<Insight[]>>;
|
|
1735
1891
|
/**
|
|
1736
1892
|
* Get available insight types for a specific stock.
|
|
1737
|
-
*
|
|
1893
|
+
* API key required.
|
|
1738
1894
|
*
|
|
1739
1895
|
* Returns an array of insight type strings (e.g., `["sentiment_shift", "options_activity"]`).
|
|
1740
1896
|
*/
|
|
@@ -2048,6 +2204,7 @@ declare class SentiSense implements APIClient {
|
|
|
2048
2204
|
readonly indexes: Indexes;
|
|
2049
2205
|
readonly trackers: Trackers;
|
|
2050
2206
|
readonly calendar: Calendar;
|
|
2207
|
+
readonly earnings: Earnings;
|
|
2051
2208
|
constructor(options?: SentiSenseOptions);
|
|
2052
2209
|
/** @internal */
|
|
2053
2210
|
get<T = unknown>(path: string, params?: object): Promise<T>;
|
|
@@ -2093,6 +2250,6 @@ declare class APIError extends SentiSenseError {
|
|
|
2093
2250
|
constructor(message: string, status: number, code?: string);
|
|
2094
2251
|
}
|
|
2095
2252
|
|
|
2096
|
-
declare const VERSION = "0.
|
|
2253
|
+
declare const VERSION = "0.36.0";
|
|
2097
2254
|
|
|
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 };
|
|
2255
|
+
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 EtfSentimentAggregate, type EtfSentimentReading, 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, 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
|
@@ -839,6 +839,110 @@ interface GetEarningsCalendarOptions {
|
|
|
839
839
|
/** Session filter. */
|
|
840
840
|
time?: "before_open" | "after_close" | "during_market" | "unknown";
|
|
841
841
|
}
|
|
842
|
+
/**
|
|
843
|
+
* One KPI card on a reported quarter.
|
|
844
|
+
*
|
|
845
|
+
* `value` and `yoy` are display strings, already formatted (`"$109.4B"`,
|
|
846
|
+
* `"+16% YoY"`), not numbers to compute with. `yoy` is absent when the quarter
|
|
847
|
+
* carries no year-over-year comparison for that line, which is common on
|
|
848
|
+
* call highlights.
|
|
849
|
+
*/
|
|
850
|
+
interface EarningsKpiHighlight {
|
|
851
|
+
label: string;
|
|
852
|
+
value: string;
|
|
853
|
+
yoy?: string;
|
|
854
|
+
}
|
|
855
|
+
/** A citation backing a reported quarter. */
|
|
856
|
+
interface EarningsSource {
|
|
857
|
+
title: string;
|
|
858
|
+
url: string;
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* One fiscal quarter of the earnings analysis report, from
|
|
862
|
+
* `client.earnings.getSummaries()`.
|
|
863
|
+
*
|
|
864
|
+
* The wire shape depends on the caller's tier, so branch on the envelope's
|
|
865
|
+
* `isPreview` rather than on field presence. `fiscalPeriod`, `reportDate`,
|
|
866
|
+
* `headline`, `hasTranscript`, `generatedAt` and `source` arrive on both tiers.
|
|
867
|
+
*
|
|
868
|
+
* PRO adds the bodies: `summaryMd`, the full `kpiHighlights`, `guidance`,
|
|
869
|
+
* `transcriptSummaryMd`, `transcriptHighlights`, `transcriptGeneratedAt` and
|
|
870
|
+
* `sources`.
|
|
871
|
+
*
|
|
872
|
+
* The FREE preview replaces those bodies with shape: up to two `kpiHighlights`
|
|
873
|
+
* cards (without `yoy`) plus `kpiHighlightCount`, the section titles in
|
|
874
|
+
* `summaryTopics` and `transcriptTopics`, and `hasGuidance` with
|
|
875
|
+
* `guidanceDirection` in place of the guidance language. It never carries a
|
|
876
|
+
* body, a KPI history, or a guidance figure.
|
|
877
|
+
*
|
|
878
|
+
* Absence is explicit: a quarter with no call summary sets `hasTranscript` to
|
|
879
|
+
* `false` rather than dropping the concept, so a client can say "no call
|
|
880
|
+
* summary yet" instead of rendering nothing.
|
|
881
|
+
*/
|
|
882
|
+
interface EarningsQuarter {
|
|
883
|
+
/** Display fiscal period, e.g. `"Q2 FY2026"`. */
|
|
884
|
+
fiscalPeriod: string;
|
|
885
|
+
/** Date the results were reported, ISO calendar day `"YYYY-MM-DD"`. */
|
|
886
|
+
reportDate: string;
|
|
887
|
+
/** One-line editorial summary of the quarter. */
|
|
888
|
+
headline: string;
|
|
889
|
+
/** True when a summary of the earnings call exists for this quarter. */
|
|
890
|
+
hasTranscript: boolean;
|
|
891
|
+
/** When the quarter summary was generated, epoch seconds. */
|
|
892
|
+
generatedAt: number;
|
|
893
|
+
/** Provenance of the quarter summary. */
|
|
894
|
+
source: "press_release" | "transcript";
|
|
895
|
+
/** PRO: markdown body summarizing the reported results. */
|
|
896
|
+
summaryMd?: string;
|
|
897
|
+
/** PRO carries the full set; a preview carries up to two cards without `yoy`. */
|
|
898
|
+
kpiHighlights?: EarningsKpiHighlight[];
|
|
899
|
+
/** PRO: forward-guidance language as reported. Absent when the quarter carries none. */
|
|
900
|
+
guidance?: string;
|
|
901
|
+
/** PRO: markdown body summarizing the call. Absent when `hasTranscript` is false. */
|
|
902
|
+
transcriptSummaryMd?: string;
|
|
903
|
+
/** PRO: call-specific highlights. Absent when there is no call summary. */
|
|
904
|
+
transcriptHighlights?: EarningsKpiHighlight[];
|
|
905
|
+
/** PRO: when the call summary was generated, epoch seconds. Can post-date `generatedAt`. */
|
|
906
|
+
transcriptGeneratedAt?: number;
|
|
907
|
+
/** PRO: citations backing the quarter. */
|
|
908
|
+
sources?: EarningsSource[];
|
|
909
|
+
/** Preview: how many KPI cards the full quarter carries. */
|
|
910
|
+
kpiHighlightCount?: number;
|
|
911
|
+
/** Preview: section titles of the summary, never body text. */
|
|
912
|
+
summaryTopics?: string[];
|
|
913
|
+
/** Preview: section titles of the call summary, never body text. */
|
|
914
|
+
transcriptTopics?: string[];
|
|
915
|
+
/** Preview: whether the quarter carries guidance at all. */
|
|
916
|
+
hasGuidance?: boolean;
|
|
917
|
+
/** Preview: the direction only, in place of the guidance language. */
|
|
918
|
+
guidanceDirection?: "RAISED" | "CUT" | "HELD" | "MIXED" | null;
|
|
919
|
+
}
|
|
920
|
+
/** One company that reported inside the recent window. */
|
|
921
|
+
interface RecentEarningsEntry {
|
|
922
|
+
ticker: string;
|
|
923
|
+
/** Display fiscal period, e.g. `"Q2 FY2026"`. */
|
|
924
|
+
fiscalPeriod: string;
|
|
925
|
+
/** Date the results were reported, ISO calendar day `"YYYY-MM-DD"`. */
|
|
926
|
+
reportDate: string;
|
|
927
|
+
headline: string;
|
|
928
|
+
/** True when a summary of the earnings call exists for this quarter. */
|
|
929
|
+
hasTranscriptSummary: boolean;
|
|
930
|
+
/** Latest content written for this quarter, epoch seconds. */
|
|
931
|
+
generatedAt: number;
|
|
932
|
+
}
|
|
933
|
+
interface GetEarningsSummariesOptions {
|
|
934
|
+
/**
|
|
935
|
+
* Max quarters returned, 1 to 40. Omitted, the API applies its own default
|
|
936
|
+
* of 12. A FREE key receives one quarter whatever you pass.
|
|
937
|
+
*/
|
|
938
|
+
limit?: number;
|
|
939
|
+
}
|
|
940
|
+
interface GetRecentEarningsOptions {
|
|
941
|
+
/** Look-back window in days, 1 to 31. Omitted, the API applies its own default of 7. */
|
|
942
|
+
days?: number;
|
|
943
|
+
/** Max rows returned, 1 to 100. Omitted, the API applies its own default of 50. */
|
|
944
|
+
limit?: number;
|
|
945
|
+
}
|
|
842
946
|
interface PreviewResponse<T> {
|
|
843
947
|
isPreview: boolean;
|
|
844
948
|
previewReason: "PRO_REQUIRED" | null;
|
|
@@ -1422,6 +1526,58 @@ declare class Documents {
|
|
|
1422
1526
|
getStoriesByTicker(ticker: string, options?: GetStoriesByTickerOptions): Promise<Story[]>;
|
|
1423
1527
|
}
|
|
1424
1528
|
|
|
1529
|
+
/**
|
|
1530
|
+
* Earnings: what a company actually reported, after the fact.
|
|
1531
|
+
*
|
|
1532
|
+
* A quarter's results arrive as a press release, a filing, and a call, none of
|
|
1533
|
+
* which is a data structure. {@link getSummaries} is the assembled version, one
|
|
1534
|
+
* object per fiscal quarter, and {@link getRecent} is the cross-ticker view of
|
|
1535
|
+
* who reported lately. Pair them to drive a post-earnings sweep: list the
|
|
1536
|
+
* window, then pull each ticker's analysis report.
|
|
1537
|
+
*
|
|
1538
|
+
* The forward-looking half of the family lives on `client.calendar.getEarnings()`,
|
|
1539
|
+
* which covers scheduled dates and consensus EPS rather than results.
|
|
1540
|
+
*
|
|
1541
|
+
* @see EarningsQuarter
|
|
1542
|
+
*/
|
|
1543
|
+
declare class Earnings {
|
|
1544
|
+
private client;
|
|
1545
|
+
constructor(client: APIClient);
|
|
1546
|
+
/**
|
|
1547
|
+
* Per-quarter earnings analysis report for one ticker, newest first.
|
|
1548
|
+
*
|
|
1549
|
+
* Each quarter carries the editorial headline, the KPI cards that matter for
|
|
1550
|
+
* that company with year-over-year deltas, the guidance language as
|
|
1551
|
+
* management phrased it, and a summary of the earnings call.
|
|
1552
|
+
*
|
|
1553
|
+
* Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
|
|
1554
|
+
* FREE key receives the latest quarter shaped rather than truncated, plus
|
|
1555
|
+
* `totalCount`. {@link EarningsQuarter} documents which fields each tier
|
|
1556
|
+
* carries.
|
|
1557
|
+
*
|
|
1558
|
+
* A quarter typically appears within 48 hours of the company reporting, and
|
|
1559
|
+
* the call summary can arrive after the press-release content for the same
|
|
1560
|
+
* quarter, so read `generatedAt` and `transcriptGeneratedAt` rather than
|
|
1561
|
+
* assuming a fixed lag. A ticker with no stored quarter answers with an empty
|
|
1562
|
+
* `data` array, not a 404.
|
|
1563
|
+
*
|
|
1564
|
+
* Use canonical ticker symbols: `GOOGL` (not `GOOG`), `BRK.B` (not `BRK-B`).
|
|
1565
|
+
*/
|
|
1566
|
+
getSummaries(ticker: string, options?: GetEarningsSummariesOptions): Promise<PreviewResponse<EarningsQuarter[]>>;
|
|
1567
|
+
/**
|
|
1568
|
+
* Which covered companies reported on or after `today - days`, newest first.
|
|
1569
|
+
*
|
|
1570
|
+
* Every API key receives the full window it asks for, so `isPreview` is
|
|
1571
|
+
* always `false` here. The window is bounded by `reportDate`, so a quarter
|
|
1572
|
+
* reported inside it appears even when its call summary lands later, and an
|
|
1573
|
+
* empty `data` array means nobody in the covered set reported in that window.
|
|
1574
|
+
*
|
|
1575
|
+
* This is the backward-looking feed; `client.calendar.getEarnings()` is the
|
|
1576
|
+
* forward-looking one.
|
|
1577
|
+
*/
|
|
1578
|
+
getRecent(options?: GetRecentEarningsOptions): Promise<PreviewResponse<RecentEarningsEntry[]>>;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1425
1581
|
declare class EntityMetrics {
|
|
1426
1582
|
private client;
|
|
1427
1583
|
constructor(client: APIClient);
|
|
@@ -1615,7 +1771,7 @@ declare class Insider {
|
|
|
1615
1771
|
/**
|
|
1616
1772
|
* Get market-wide insider activity: top buys and sells aggregated by ticker.
|
|
1617
1773
|
*
|
|
1618
|
-
* PRO-gated. Free
|
|
1774
|
+
* PRO-gated. Free-tier users receive a preview (top 5 per direction)
|
|
1619
1775
|
* with `isPreview: true` in the response.
|
|
1620
1776
|
*/
|
|
1621
1777
|
getActivity(options?: GetInsiderOptions): Promise<PreviewResponse<InsiderActivityResponse>>;
|
|
@@ -1639,7 +1795,7 @@ declare class Politicians {
|
|
|
1639
1795
|
/**
|
|
1640
1796
|
* Get recent congressional STOCK Act trading activity across all politicians.
|
|
1641
1797
|
*
|
|
1642
|
-
* PRO-gated. Free
|
|
1798
|
+
* PRO-gated. Free-tier users receive a preview (top 5 trades)
|
|
1643
1799
|
* with `isPreview: true` in the response.
|
|
1644
1800
|
*
|
|
1645
1801
|
* The feed is longer than one response: a default 90-day window is routinely well over a
|
|
@@ -1734,7 +1890,7 @@ declare class Insights {
|
|
|
1734
1890
|
user(options?: GetUserInsightsOptions): Promise<PreviewResponse<Insight[]>>;
|
|
1735
1891
|
/**
|
|
1736
1892
|
* Get available insight types for a specific stock.
|
|
1737
|
-
*
|
|
1893
|
+
* API key required.
|
|
1738
1894
|
*
|
|
1739
1895
|
* Returns an array of insight type strings (e.g., `["sentiment_shift", "options_activity"]`).
|
|
1740
1896
|
*/
|
|
@@ -2048,6 +2204,7 @@ declare class SentiSense implements APIClient {
|
|
|
2048
2204
|
readonly indexes: Indexes;
|
|
2049
2205
|
readonly trackers: Trackers;
|
|
2050
2206
|
readonly calendar: Calendar;
|
|
2207
|
+
readonly earnings: Earnings;
|
|
2051
2208
|
constructor(options?: SentiSenseOptions);
|
|
2052
2209
|
/** @internal */
|
|
2053
2210
|
get<T = unknown>(path: string, params?: object): Promise<T>;
|
|
@@ -2093,6 +2250,6 @@ declare class APIError extends SentiSenseError {
|
|
|
2093
2250
|
constructor(message: string, status: number, code?: string);
|
|
2094
2251
|
}
|
|
2095
2252
|
|
|
2096
|
-
declare const VERSION = "0.
|
|
2253
|
+
declare const VERSION = "0.36.0";
|
|
2097
2254
|
|
|
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 };
|
|
2255
|
+
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 EtfSentimentAggregate, type EtfSentimentReading, 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, 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
|
@@ -151,6 +151,53 @@ var Documents = class {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
+
// src/resources/earnings.ts
|
|
155
|
+
var Earnings = class {
|
|
156
|
+
constructor(client) {
|
|
157
|
+
this.client = client;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Per-quarter earnings analysis report for one ticker, newest first.
|
|
161
|
+
*
|
|
162
|
+
* Each quarter carries the editorial headline, the KPI cards that matter for
|
|
163
|
+
* that company with year-over-year deltas, the guidance language as
|
|
164
|
+
* management phrased it, and a summary of the earnings call.
|
|
165
|
+
*
|
|
166
|
+
* Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
|
|
167
|
+
* FREE key receives the latest quarter shaped rather than truncated, plus
|
|
168
|
+
* `totalCount`. {@link EarningsQuarter} documents which fields each tier
|
|
169
|
+
* carries.
|
|
170
|
+
*
|
|
171
|
+
* A quarter typically appears within 48 hours of the company reporting, and
|
|
172
|
+
* the call summary can arrive after the press-release content for the same
|
|
173
|
+
* quarter, so read `generatedAt` and `transcriptGeneratedAt` rather than
|
|
174
|
+
* assuming a fixed lag. A ticker with no stored quarter answers with an empty
|
|
175
|
+
* `data` array, not a 404.
|
|
176
|
+
*
|
|
177
|
+
* Use canonical ticker symbols: `GOOGL` (not `GOOG`), `BRK.B` (not `BRK-B`).
|
|
178
|
+
*/
|
|
179
|
+
async getSummaries(ticker, options) {
|
|
180
|
+
return this.client.get(
|
|
181
|
+
`/api/v1/stocks/${encodeURIComponent(ticker.toUpperCase())}/earnings-summaries`,
|
|
182
|
+
options
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Which covered companies reported on or after `today - days`, newest first.
|
|
187
|
+
*
|
|
188
|
+
* Every API key receives the full window it asks for, so `isPreview` is
|
|
189
|
+
* always `false` here. The window is bounded by `reportDate`, so a quarter
|
|
190
|
+
* reported inside it appears even when its call summary lands later, and an
|
|
191
|
+
* empty `data` array means nobody in the covered set reported in that window.
|
|
192
|
+
*
|
|
193
|
+
* This is the backward-looking feed; `client.calendar.getEarnings()` is the
|
|
194
|
+
* forward-looking one.
|
|
195
|
+
*/
|
|
196
|
+
async getRecent(options) {
|
|
197
|
+
return this.client.get("/api/v1/earnings/recent", options);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
|
|
154
201
|
// src/resources/entityMetrics.ts
|
|
155
202
|
var EntityMetrics = class {
|
|
156
203
|
constructor(client) {
|
|
@@ -251,7 +298,7 @@ var Insider = class {
|
|
|
251
298
|
/**
|
|
252
299
|
* Get market-wide insider activity: top buys and sells aggregated by ticker.
|
|
253
300
|
*
|
|
254
|
-
* PRO-gated. Free
|
|
301
|
+
* PRO-gated. Free-tier users receive a preview (top 5 per direction)
|
|
255
302
|
* with `isPreview: true` in the response.
|
|
256
303
|
*/
|
|
257
304
|
async getActivity(options) {
|
|
@@ -286,7 +333,7 @@ var Politicians = class {
|
|
|
286
333
|
/**
|
|
287
334
|
* Get recent congressional STOCK Act trading activity across all politicians.
|
|
288
335
|
*
|
|
289
|
-
* PRO-gated. Free
|
|
336
|
+
* PRO-gated. Free-tier users receive a preview (top 5 trades)
|
|
290
337
|
* with `isPreview: true` in the response.
|
|
291
338
|
*
|
|
292
339
|
* The feed is longer than one response: a default 90-day window is routinely well over a
|
|
@@ -398,7 +445,7 @@ var Insights = class {
|
|
|
398
445
|
}
|
|
399
446
|
/**
|
|
400
447
|
* Get available insight types for a specific stock.
|
|
401
|
-
*
|
|
448
|
+
* API key required.
|
|
402
449
|
*
|
|
403
450
|
* Returns an array of insight type strings (e.g., `["sentiment_shift", "options_activity"]`).
|
|
404
451
|
*/
|
|
@@ -810,7 +857,7 @@ var Trackers = class {
|
|
|
810
857
|
};
|
|
811
858
|
|
|
812
859
|
// src/version.ts
|
|
813
|
-
var VERSION = "0.
|
|
860
|
+
var VERSION = "0.36.0";
|
|
814
861
|
|
|
815
862
|
// src/client.ts
|
|
816
863
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|
|
@@ -855,6 +902,7 @@ var SentiSense = class {
|
|
|
855
902
|
this.indexes = new Indexes(this);
|
|
856
903
|
this.trackers = new Trackers(this);
|
|
857
904
|
this.calendar = new Calendar(this);
|
|
905
|
+
this.earnings = new Earnings(this);
|
|
858
906
|
}
|
|
859
907
|
/** @internal */
|
|
860
908
|
async get(path, params) {
|