sentisense 0.20.0 → 0.22.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
@@ -440,6 +440,50 @@ interface GetPoliticiansOptions {
440
440
  lookbackDays?: number;
441
441
  }
442
442
  /** Generic preview wrapper used by PRO-gated endpoints. */
443
+ interface EarningsEvent {
444
+ ticker: string;
445
+ companyName: string;
446
+ /** Report date, ISO calendar day "YYYY-MM-DD". */
447
+ earningsDate: string;
448
+ /** Session timing. */
449
+ earningsTime: "before_open" | "after_close" | "during_market" | "unknown";
450
+ /** Fiscal period label (e.g. "Q2 2026"), nullable. */
451
+ fiscalQuarter: string | null;
452
+ /** Whether the company has confirmed the date (vs. estimated/projected). */
453
+ confirmed: boolean;
454
+ /** Consensus EPS estimate, nullable. */
455
+ estimatedEps: number | null;
456
+ }
457
+ interface CalendarMeta {
458
+ /** When the snapshot was generated, epoch seconds. */
459
+ generatedAt: number | null;
460
+ /** First day covered, ISO "YYYY-MM-DD". */
461
+ windowStart: string | null;
462
+ /** Last day covered, ISO "YYYY-MM-DD". */
463
+ windowEnd: string | null;
464
+ /** Number of events in this response. */
465
+ count: number;
466
+ /** Always "sentisense". */
467
+ source: string;
468
+ }
469
+ interface EarningsCalendarResponse {
470
+ earnings: EarningsEvent[];
471
+ metadata: CalendarMeta;
472
+ }
473
+ interface GetEarningsCalendarOptions {
474
+ /** Filter to a single ticker. */
475
+ ticker?: string;
476
+ /** Shorthand window: "this" (current Mon-Sun) or "next". */
477
+ week?: "this" | "next";
478
+ /** Inclusive lower date bound, ISO "YYYY-MM-DD". Overrides `week`. */
479
+ from?: string;
480
+ /** Inclusive upper date bound, ISO "YYYY-MM-DD". */
481
+ to?: string;
482
+ /** When true, only company-confirmed dates. */
483
+ confirmed?: boolean;
484
+ /** Session filter. */
485
+ time?: "before_open" | "after_close" | "during_market" | "unknown";
486
+ }
443
487
  interface PreviewResponse<T> {
444
488
  isPreview: boolean;
445
489
  previewReason: "LOGIN_REQUIRED" | "PRO_REQUIRED" | null;
@@ -631,6 +675,161 @@ interface KBEntity {
631
675
  name: string;
632
676
  [key: string]: unknown;
633
677
  }
678
+ /** Per-tracker discovery row returned by `client.trackers.list()`. */
679
+ interface TrackerListing {
680
+ trackerId: string;
681
+ displayName: string;
682
+ /** Coarse grouping for hub filtering: `"institutional"`, `"epidemiology"`, etc. */
683
+ category: string;
684
+ /** Sentence-long subtitle for hub cards + API discovery. */
685
+ description: string;
686
+ /** Renderer hint: `"table"`, `"choropleth"`, `"timeseries"`, `"heatmap"`. */
687
+ viewType: string;
688
+ /** Access tier: `"free"` or `"pro"`. A `pro` tracker truncates to a free preview for FREE callers; a `free` tracker returns the full snapshot to everyone. */
689
+ accessTier?: string;
690
+ /** Fragment on `/methodology` explaining the tracker (e.g. `"#institution-rankings"`). */
691
+ methodologyAnchor: string;
692
+ /** Expected snapshot refresh cadence, in seconds. Informational. */
693
+ refreshIntervalSeconds: number;
694
+ /** Canonical detail URL (e.g. `"/api/v1/trackers/institution-concentration"`). */
695
+ canonicalUrl: string;
696
+ }
697
+ /** Discovery envelope returned by `client.trackers.list()`. */
698
+ interface TrackerListResponse {
699
+ trackers: TrackerListing[];
700
+ }
701
+ /** One row of a `viewType: "table"` tracker — a ranked leaderboard cell. */
702
+ interface TrackerTableRow {
703
+ /** 1-based rank on the sort the tracker is built for; may be null. */
704
+ rank: number | null;
705
+ /** Stable identifier for the entity (CIK, ticker, etc.). */
706
+ rowId: string;
707
+ /** Display name. */
708
+ name: string;
709
+ /** Optional category tag (e.g. `"HEDGE_FUND"`). */
710
+ category: string | null;
711
+ /** Optional canonical link to the entity behind the row (e.g. `"/institutions/Berkshire-Hathaway"`). */
712
+ url: string | null;
713
+ /** Per-cell metric values; each carries its own label and unit. */
714
+ metrics: TrackerMetricValue[];
715
+ }
716
+ /**
717
+ * A labeled quantitative reading attached to a row, geo region, or
718
+ * time-series point. `value` is `unknown` because it can be a number or a
719
+ * status string ("Severe", "Resolved") without forcing a separate type.
720
+ */
721
+ interface TrackerMetricValue {
722
+ label: string;
723
+ value: unknown;
724
+ unit?: string | null;
725
+ trend?: string | null;
726
+ /** Primary-source URL for this cell's value, when the tracker is citation-backed. */
727
+ sourceUrl?: string | null;
728
+ /** Short quote from the primary source supporting this cell's value. */
729
+ sourceQuote?: string | null;
730
+ /** The period this cell refers to (e.g. "2025", "2026-YTD"), when it varies per row. */
731
+ periodLabel?: string | null;
732
+ }
733
+ /** Top-of-page stat tile. A tracker may have 0–N headline metrics. */
734
+ interface TrackerHeadlineMetric {
735
+ label: string;
736
+ value: unknown;
737
+ unit?: string | null;
738
+ asOf?: string | null;
739
+ methodologyNote?: string | null;
740
+ trend?: string | null;
741
+ }
742
+ /** One geographic row for a `viewType: "choropleth"` tracker. */
743
+ interface TrackerGeoEntry {
744
+ geoId?: string | null;
745
+ /** Two-letter ISO country code, when applicable. */
746
+ isoCode?: string | null;
747
+ /** FIPS code with leading zeros preserved (e.g. `"06"`), when applicable. */
748
+ fips?: string | null;
749
+ name: string;
750
+ metrics: TrackerMetricValue[];
751
+ lastEvent?: {
752
+ date?: string;
753
+ url?: string;
754
+ summary?: string;
755
+ } | null;
756
+ }
757
+ /** One point on a time series for a `viewType: "timeseries"` tracker. */
758
+ interface TrackerTimeSeriesPoint {
759
+ /** Free-form date string; trackers pick the granularity. */
760
+ date: string;
761
+ label?: string | null;
762
+ values: TrackerMetricValue[];
763
+ }
764
+ /** A notable event (outbreak, disruption, enforcement action). */
765
+ interface TrackerEvent {
766
+ id: string;
767
+ title: string;
768
+ status: string;
769
+ asOf?: string | null;
770
+ severity?: string | null;
771
+ geoIds?: string[] | null;
772
+ metrics?: TrackerMetricValue[] | null;
773
+ summary?: string | null;
774
+ sources?: TrackerSourceRef[] | null;
775
+ }
776
+ /** Recent news/alert signal. `tier`: 1=authoritative, 2=secondary, 3=mainstream press. */
777
+ interface TrackerSignal {
778
+ tier?: number | null;
779
+ source: string;
780
+ publishedAt: string;
781
+ url: string;
782
+ summary?: string | null;
783
+ }
784
+ /** Citation reference. */
785
+ interface TrackerSourceRef {
786
+ name: string;
787
+ url: string;
788
+ date?: string | null;
789
+ }
790
+ /**
791
+ * Standardized envelope every tracker returns. Exactly one of the payload
792
+ * fields (`rows`, `geo`, `timeSeries`) is populated based on `viewType`;
793
+ * `headline`, `events`, `signals`, `sources`, and `narrative` are
794
+ * companion fields that may appear on any tracker.
795
+ */
796
+ interface TrackerSnapshot {
797
+ trackerId: string;
798
+ /** Optional sub-scope (e.g. `"us"` for hantavirus). Null for unscoped trackers. */
799
+ scope?: string | null;
800
+ schemaVersion: string;
801
+ displayName: string;
802
+ description?: string | null;
803
+ /** Renderer hint: `"table"`, `"choropleth"`, `"timeseries"`, `"heatmap"`. */
804
+ viewType: string;
805
+ /** Free-form "data as of" label (typically a quarter, date, or week). */
806
+ asOf?: string | null;
807
+ generatedAt?: string | null;
808
+ generatedBy?: string | null;
809
+ /** Optional Markdown narrative. */
810
+ narrative?: string | null;
811
+ headline?: TrackerHeadlineMetric[] | null;
812
+ geo?: TrackerGeoEntry[] | null;
813
+ timeSeries?: TrackerTimeSeriesPoint[] | null;
814
+ /** Populated when `viewType === "table"`. */
815
+ rows?: TrackerTableRow[] | null;
816
+ events?: TrackerEvent[] | null;
817
+ signals?: TrackerSignal[] | null;
818
+ sources?: TrackerSourceRef[] | null;
819
+ }
820
+ /**
821
+ * Wire response from `client.trackers.get()`. The snapshot is at `.data`;
822
+ * for FREE callers on a PRO-gated tracker, `isPreview` is `true`, `data`
823
+ * carries a truncated row set, and `totalCount` reports the full set size.
824
+ */
825
+ interface TrackerSnapshotResponse {
826
+ isPreview: boolean;
827
+ /** `"PRO_REQUIRED"` for FREE callers on a gated tracker; otherwise `null`. */
828
+ previewReason: "PRO_REQUIRED" | null;
829
+ /** Full row count before truncation. Only set on preview responses. */
830
+ totalCount?: number;
831
+ data: TrackerSnapshot;
832
+ }
634
833
 
635
834
  interface AnalystConsensus {
636
835
  ticker: string;
@@ -717,6 +916,20 @@ declare class Analyst {
717
916
  marketActivity(options?: GetAnalystMarketActivityOptions): Promise<PreviewResponse<AnalystAction[]>>;
718
917
  }
719
918
 
919
+ declare class Calendar {
920
+ private client;
921
+ constructor(client: APIClient);
922
+ /**
923
+ * Upcoming company earnings, sorted by date.
924
+ *
925
+ * Key-required. A FREE key returns the current week (`isPreview: true`); a PRO
926
+ * key returns the full forward window (about 30 days). Field richness is
927
+ * identical across tiers: the gate is how far ahead you can see, not which
928
+ * columns you get. On a preview, `totalCount` is the full-window event count.
929
+ */
930
+ getEarnings(options?: GetEarningsCalendarOptions): Promise<PreviewResponse<EarningsCalendarResponse>>;
931
+ }
932
+
720
933
  declare class Documents {
721
934
  private client;
722
935
  constructor(client: APIClient);
@@ -1208,6 +1421,38 @@ declare class Stocks {
1208
1421
  getKpiTypes(ticker: string): Promise<KpiTypeEntry[]>;
1209
1422
  }
1210
1423
 
1424
+ /**
1425
+ * Trackers — observational data products published as a standardized
1426
+ * `TrackerSnapshot` envelope. Every tracker (institution rankings,
1427
+ * hedge-fund reported returns, social trackers, surveillance dashboards)
1428
+ * returns the same shape — consumers write one renderer per `viewType` and
1429
+ * get every current and future SentiSense tracker for free.
1430
+ *
1431
+ * @see TrackerSnapshot
1432
+ */
1433
+ declare class Trackers {
1434
+ private client;
1435
+ constructor(client: APIClient);
1436
+ /**
1437
+ * List every publicly-visible tracker — id, display name, category,
1438
+ * one-line description, and the methodology anchor to link out to.
1439
+ */
1440
+ list(): Promise<TrackerListResponse>;
1441
+ /**
1442
+ * Standardized snapshot envelope for one tracker.
1443
+ *
1444
+ * Returns the envelope as-is: `{ isPreview, previewReason, totalCount?, data }`.
1445
+ * When `data.viewType === "table"` the rows live at `data.rows[]`; when
1446
+ * `"choropleth"` they live at `data.geo[]`; etc. Dispatch on `viewType`
1447
+ * in your renderer.
1448
+ *
1449
+ * @param trackerId — slug from {@link list}, e.g. `"institution-concentration"`.
1450
+ * @param params — provider-specific query params (e.g. `{ scope: "us" }` for
1451
+ * geographically-scoped trackers like hantavirus). Unknown keys are ignored.
1452
+ */
1453
+ get(trackerId: string, params?: Record<string, string | number | boolean>): Promise<TrackerSnapshotResponse>;
1454
+ }
1455
+
1211
1456
  /** @internal HTTP interface exposed to resource classes. */
1212
1457
  interface APIClient {
1213
1458
  get<T = unknown>(path: string, params?: object): Promise<T>;
@@ -1230,6 +1475,8 @@ declare class SentiSense implements APIClient {
1230
1475
  readonly marketMood: MarketMoodResource;
1231
1476
  readonly marketSummary: MarketSummaryResource;
1232
1477
  readonly kb: KB;
1478
+ readonly trackers: Trackers;
1479
+ readonly calendar: Calendar;
1233
1480
  constructor(options?: SentiSenseOptions);
1234
1481
  /** @internal */
1235
1482
  get<T = unknown>(path: string, params?: object): Promise<T>;
@@ -1258,6 +1505,6 @@ declare class APIError extends SentiSenseError {
1258
1505
  constructor(message: string, status: number, code?: string);
1259
1506
  }
1260
1507
 
1261
- declare const VERSION = "0.20.0";
1508
+ declare const VERSION = "0.22.0";
1262
1509
 
1263
- export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, AuthenticationError, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, type Document, type DocumentSource, 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 GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEtfInsiderAggregateOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticiansOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, 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 MentionCount, type MentionData, 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 SentimentData, 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, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
1510
+ export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, type Document, 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 GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEtfInsiderAggregateOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticiansOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, 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 MentionCount, type MentionData, 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 SentimentData, 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 TrackerEvent, type TrackerGeoEntry, type TrackerHeadlineMetric, type TrackerListResponse, type TrackerListing, type TrackerMetricValue, type TrackerSignal, type TrackerSnapshot, type TrackerSnapshotResponse, type TrackerSourceRef, type TrackerTableRow, type TrackerTimeSeriesPoint, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
package/dist/index.d.ts CHANGED
@@ -440,6 +440,50 @@ interface GetPoliticiansOptions {
440
440
  lookbackDays?: number;
441
441
  }
442
442
  /** Generic preview wrapper used by PRO-gated endpoints. */
443
+ interface EarningsEvent {
444
+ ticker: string;
445
+ companyName: string;
446
+ /** Report date, ISO calendar day "YYYY-MM-DD". */
447
+ earningsDate: string;
448
+ /** Session timing. */
449
+ earningsTime: "before_open" | "after_close" | "during_market" | "unknown";
450
+ /** Fiscal period label (e.g. "Q2 2026"), nullable. */
451
+ fiscalQuarter: string | null;
452
+ /** Whether the company has confirmed the date (vs. estimated/projected). */
453
+ confirmed: boolean;
454
+ /** Consensus EPS estimate, nullable. */
455
+ estimatedEps: number | null;
456
+ }
457
+ interface CalendarMeta {
458
+ /** When the snapshot was generated, epoch seconds. */
459
+ generatedAt: number | null;
460
+ /** First day covered, ISO "YYYY-MM-DD". */
461
+ windowStart: string | null;
462
+ /** Last day covered, ISO "YYYY-MM-DD". */
463
+ windowEnd: string | null;
464
+ /** Number of events in this response. */
465
+ count: number;
466
+ /** Always "sentisense". */
467
+ source: string;
468
+ }
469
+ interface EarningsCalendarResponse {
470
+ earnings: EarningsEvent[];
471
+ metadata: CalendarMeta;
472
+ }
473
+ interface GetEarningsCalendarOptions {
474
+ /** Filter to a single ticker. */
475
+ ticker?: string;
476
+ /** Shorthand window: "this" (current Mon-Sun) or "next". */
477
+ week?: "this" | "next";
478
+ /** Inclusive lower date bound, ISO "YYYY-MM-DD". Overrides `week`. */
479
+ from?: string;
480
+ /** Inclusive upper date bound, ISO "YYYY-MM-DD". */
481
+ to?: string;
482
+ /** When true, only company-confirmed dates. */
483
+ confirmed?: boolean;
484
+ /** Session filter. */
485
+ time?: "before_open" | "after_close" | "during_market" | "unknown";
486
+ }
443
487
  interface PreviewResponse<T> {
444
488
  isPreview: boolean;
445
489
  previewReason: "LOGIN_REQUIRED" | "PRO_REQUIRED" | null;
@@ -631,6 +675,161 @@ interface KBEntity {
631
675
  name: string;
632
676
  [key: string]: unknown;
633
677
  }
678
+ /** Per-tracker discovery row returned by `client.trackers.list()`. */
679
+ interface TrackerListing {
680
+ trackerId: string;
681
+ displayName: string;
682
+ /** Coarse grouping for hub filtering: `"institutional"`, `"epidemiology"`, etc. */
683
+ category: string;
684
+ /** Sentence-long subtitle for hub cards + API discovery. */
685
+ description: string;
686
+ /** Renderer hint: `"table"`, `"choropleth"`, `"timeseries"`, `"heatmap"`. */
687
+ viewType: string;
688
+ /** Access tier: `"free"` or `"pro"`. A `pro` tracker truncates to a free preview for FREE callers; a `free` tracker returns the full snapshot to everyone. */
689
+ accessTier?: string;
690
+ /** Fragment on `/methodology` explaining the tracker (e.g. `"#institution-rankings"`). */
691
+ methodologyAnchor: string;
692
+ /** Expected snapshot refresh cadence, in seconds. Informational. */
693
+ refreshIntervalSeconds: number;
694
+ /** Canonical detail URL (e.g. `"/api/v1/trackers/institution-concentration"`). */
695
+ canonicalUrl: string;
696
+ }
697
+ /** Discovery envelope returned by `client.trackers.list()`. */
698
+ interface TrackerListResponse {
699
+ trackers: TrackerListing[];
700
+ }
701
+ /** One row of a `viewType: "table"` tracker — a ranked leaderboard cell. */
702
+ interface TrackerTableRow {
703
+ /** 1-based rank on the sort the tracker is built for; may be null. */
704
+ rank: number | null;
705
+ /** Stable identifier for the entity (CIK, ticker, etc.). */
706
+ rowId: string;
707
+ /** Display name. */
708
+ name: string;
709
+ /** Optional category tag (e.g. `"HEDGE_FUND"`). */
710
+ category: string | null;
711
+ /** Optional canonical link to the entity behind the row (e.g. `"/institutions/Berkshire-Hathaway"`). */
712
+ url: string | null;
713
+ /** Per-cell metric values; each carries its own label and unit. */
714
+ metrics: TrackerMetricValue[];
715
+ }
716
+ /**
717
+ * A labeled quantitative reading attached to a row, geo region, or
718
+ * time-series point. `value` is `unknown` because it can be a number or a
719
+ * status string ("Severe", "Resolved") without forcing a separate type.
720
+ */
721
+ interface TrackerMetricValue {
722
+ label: string;
723
+ value: unknown;
724
+ unit?: string | null;
725
+ trend?: string | null;
726
+ /** Primary-source URL for this cell's value, when the tracker is citation-backed. */
727
+ sourceUrl?: string | null;
728
+ /** Short quote from the primary source supporting this cell's value. */
729
+ sourceQuote?: string | null;
730
+ /** The period this cell refers to (e.g. "2025", "2026-YTD"), when it varies per row. */
731
+ periodLabel?: string | null;
732
+ }
733
+ /** Top-of-page stat tile. A tracker may have 0–N headline metrics. */
734
+ interface TrackerHeadlineMetric {
735
+ label: string;
736
+ value: unknown;
737
+ unit?: string | null;
738
+ asOf?: string | null;
739
+ methodologyNote?: string | null;
740
+ trend?: string | null;
741
+ }
742
+ /** One geographic row for a `viewType: "choropleth"` tracker. */
743
+ interface TrackerGeoEntry {
744
+ geoId?: string | null;
745
+ /** Two-letter ISO country code, when applicable. */
746
+ isoCode?: string | null;
747
+ /** FIPS code with leading zeros preserved (e.g. `"06"`), when applicable. */
748
+ fips?: string | null;
749
+ name: string;
750
+ metrics: TrackerMetricValue[];
751
+ lastEvent?: {
752
+ date?: string;
753
+ url?: string;
754
+ summary?: string;
755
+ } | null;
756
+ }
757
+ /** One point on a time series for a `viewType: "timeseries"` tracker. */
758
+ interface TrackerTimeSeriesPoint {
759
+ /** Free-form date string; trackers pick the granularity. */
760
+ date: string;
761
+ label?: string | null;
762
+ values: TrackerMetricValue[];
763
+ }
764
+ /** A notable event (outbreak, disruption, enforcement action). */
765
+ interface TrackerEvent {
766
+ id: string;
767
+ title: string;
768
+ status: string;
769
+ asOf?: string | null;
770
+ severity?: string | null;
771
+ geoIds?: string[] | null;
772
+ metrics?: TrackerMetricValue[] | null;
773
+ summary?: string | null;
774
+ sources?: TrackerSourceRef[] | null;
775
+ }
776
+ /** Recent news/alert signal. `tier`: 1=authoritative, 2=secondary, 3=mainstream press. */
777
+ interface TrackerSignal {
778
+ tier?: number | null;
779
+ source: string;
780
+ publishedAt: string;
781
+ url: string;
782
+ summary?: string | null;
783
+ }
784
+ /** Citation reference. */
785
+ interface TrackerSourceRef {
786
+ name: string;
787
+ url: string;
788
+ date?: string | null;
789
+ }
790
+ /**
791
+ * Standardized envelope every tracker returns. Exactly one of the payload
792
+ * fields (`rows`, `geo`, `timeSeries`) is populated based on `viewType`;
793
+ * `headline`, `events`, `signals`, `sources`, and `narrative` are
794
+ * companion fields that may appear on any tracker.
795
+ */
796
+ interface TrackerSnapshot {
797
+ trackerId: string;
798
+ /** Optional sub-scope (e.g. `"us"` for hantavirus). Null for unscoped trackers. */
799
+ scope?: string | null;
800
+ schemaVersion: string;
801
+ displayName: string;
802
+ description?: string | null;
803
+ /** Renderer hint: `"table"`, `"choropleth"`, `"timeseries"`, `"heatmap"`. */
804
+ viewType: string;
805
+ /** Free-form "data as of" label (typically a quarter, date, or week). */
806
+ asOf?: string | null;
807
+ generatedAt?: string | null;
808
+ generatedBy?: string | null;
809
+ /** Optional Markdown narrative. */
810
+ narrative?: string | null;
811
+ headline?: TrackerHeadlineMetric[] | null;
812
+ geo?: TrackerGeoEntry[] | null;
813
+ timeSeries?: TrackerTimeSeriesPoint[] | null;
814
+ /** Populated when `viewType === "table"`. */
815
+ rows?: TrackerTableRow[] | null;
816
+ events?: TrackerEvent[] | null;
817
+ signals?: TrackerSignal[] | null;
818
+ sources?: TrackerSourceRef[] | null;
819
+ }
820
+ /**
821
+ * Wire response from `client.trackers.get()`. The snapshot is at `.data`;
822
+ * for FREE callers on a PRO-gated tracker, `isPreview` is `true`, `data`
823
+ * carries a truncated row set, and `totalCount` reports the full set size.
824
+ */
825
+ interface TrackerSnapshotResponse {
826
+ isPreview: boolean;
827
+ /** `"PRO_REQUIRED"` for FREE callers on a gated tracker; otherwise `null`. */
828
+ previewReason: "PRO_REQUIRED" | null;
829
+ /** Full row count before truncation. Only set on preview responses. */
830
+ totalCount?: number;
831
+ data: TrackerSnapshot;
832
+ }
634
833
 
635
834
  interface AnalystConsensus {
636
835
  ticker: string;
@@ -717,6 +916,20 @@ declare class Analyst {
717
916
  marketActivity(options?: GetAnalystMarketActivityOptions): Promise<PreviewResponse<AnalystAction[]>>;
718
917
  }
719
918
 
919
+ declare class Calendar {
920
+ private client;
921
+ constructor(client: APIClient);
922
+ /**
923
+ * Upcoming company earnings, sorted by date.
924
+ *
925
+ * Key-required. A FREE key returns the current week (`isPreview: true`); a PRO
926
+ * key returns the full forward window (about 30 days). Field richness is
927
+ * identical across tiers: the gate is how far ahead you can see, not which
928
+ * columns you get. On a preview, `totalCount` is the full-window event count.
929
+ */
930
+ getEarnings(options?: GetEarningsCalendarOptions): Promise<PreviewResponse<EarningsCalendarResponse>>;
931
+ }
932
+
720
933
  declare class Documents {
721
934
  private client;
722
935
  constructor(client: APIClient);
@@ -1208,6 +1421,38 @@ declare class Stocks {
1208
1421
  getKpiTypes(ticker: string): Promise<KpiTypeEntry[]>;
1209
1422
  }
1210
1423
 
1424
+ /**
1425
+ * Trackers — observational data products published as a standardized
1426
+ * `TrackerSnapshot` envelope. Every tracker (institution rankings,
1427
+ * hedge-fund reported returns, social trackers, surveillance dashboards)
1428
+ * returns the same shape — consumers write one renderer per `viewType` and
1429
+ * get every current and future SentiSense tracker for free.
1430
+ *
1431
+ * @see TrackerSnapshot
1432
+ */
1433
+ declare class Trackers {
1434
+ private client;
1435
+ constructor(client: APIClient);
1436
+ /**
1437
+ * List every publicly-visible tracker — id, display name, category,
1438
+ * one-line description, and the methodology anchor to link out to.
1439
+ */
1440
+ list(): Promise<TrackerListResponse>;
1441
+ /**
1442
+ * Standardized snapshot envelope for one tracker.
1443
+ *
1444
+ * Returns the envelope as-is: `{ isPreview, previewReason, totalCount?, data }`.
1445
+ * When `data.viewType === "table"` the rows live at `data.rows[]`; when
1446
+ * `"choropleth"` they live at `data.geo[]`; etc. Dispatch on `viewType`
1447
+ * in your renderer.
1448
+ *
1449
+ * @param trackerId — slug from {@link list}, e.g. `"institution-concentration"`.
1450
+ * @param params — provider-specific query params (e.g. `{ scope: "us" }` for
1451
+ * geographically-scoped trackers like hantavirus). Unknown keys are ignored.
1452
+ */
1453
+ get(trackerId: string, params?: Record<string, string | number | boolean>): Promise<TrackerSnapshotResponse>;
1454
+ }
1455
+
1211
1456
  /** @internal HTTP interface exposed to resource classes. */
1212
1457
  interface APIClient {
1213
1458
  get<T = unknown>(path: string, params?: object): Promise<T>;
@@ -1230,6 +1475,8 @@ declare class SentiSense implements APIClient {
1230
1475
  readonly marketMood: MarketMoodResource;
1231
1476
  readonly marketSummary: MarketSummaryResource;
1232
1477
  readonly kb: KB;
1478
+ readonly trackers: Trackers;
1479
+ readonly calendar: Calendar;
1233
1480
  constructor(options?: SentiSenseOptions);
1234
1481
  /** @internal */
1235
1482
  get<T = unknown>(path: string, params?: object): Promise<T>;
@@ -1258,6 +1505,6 @@ declare class APIError extends SentiSenseError {
1258
1505
  constructor(message: string, status: number, code?: string);
1259
1506
  }
1260
1507
 
1261
- declare const VERSION = "0.20.0";
1508
+ declare const VERSION = "0.22.0";
1262
1509
 
1263
- export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, AuthenticationError, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, type Document, type DocumentSource, 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 GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEtfInsiderAggregateOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticiansOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, 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 MentionCount, type MentionData, 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 SentimentData, 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, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
1510
+ export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, type Document, 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 GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEtfInsiderAggregateOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticiansOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, 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 MentionCount, type MentionData, 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 SentimentData, 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 TrackerEvent, type TrackerGeoEntry, type TrackerHeadlineMetric, type TrackerListResponse, type TrackerListing, type TrackerMetricValue, type TrackerSignal, type TrackerSnapshot, type TrackerSnapshotResponse, type TrackerSourceRef, type TrackerTableRow, type TrackerTimeSeriesPoint, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
package/dist/index.mjs CHANGED
@@ -75,6 +75,24 @@ var Analyst = class {
75
75
  }
76
76
  };
77
77
 
78
+ // src/resources/calendar.ts
79
+ var Calendar = class {
80
+ constructor(client) {
81
+ this.client = client;
82
+ }
83
+ /**
84
+ * Upcoming company earnings, sorted by date.
85
+ *
86
+ * Key-required. A FREE key returns the current week (`isPreview: true`); a PRO
87
+ * key returns the full forward window (about 30 days). Field richness is
88
+ * identical across tiers: the gate is how far ahead you can see, not which
89
+ * columns you get. On a preview, `totalCount` is the full-window event count.
90
+ */
91
+ async getEarnings(options) {
92
+ return this.client.get("/api/v1/calendar/earnings", options);
93
+ }
94
+ };
95
+
78
96
  // src/resources/documents.ts
79
97
  var Documents = class {
80
98
  constructor(client) {
@@ -680,8 +698,37 @@ var Stocks = class {
680
698
  }
681
699
  };
682
700
 
701
+ // src/resources/trackers.ts
702
+ var Trackers = class {
703
+ constructor(client) {
704
+ this.client = client;
705
+ }
706
+ /**
707
+ * List every publicly-visible tracker — id, display name, category,
708
+ * one-line description, and the methodology anchor to link out to.
709
+ */
710
+ async list() {
711
+ return this.client.get("/api/v1/trackers");
712
+ }
713
+ /**
714
+ * Standardized snapshot envelope for one tracker.
715
+ *
716
+ * Returns the envelope as-is: `{ isPreview, previewReason, totalCount?, data }`.
717
+ * When `data.viewType === "table"` the rows live at `data.rows[]`; when
718
+ * `"choropleth"` they live at `data.geo[]`; etc. Dispatch on `viewType`
719
+ * in your renderer.
720
+ *
721
+ * @param trackerId — slug from {@link list}, e.g. `"institution-concentration"`.
722
+ * @param params — provider-specific query params (e.g. `{ scope: "us" }` for
723
+ * geographically-scoped trackers like hantavirus). Unknown keys are ignored.
724
+ */
725
+ async get(trackerId, params) {
726
+ return this.client.get(`/api/v1/trackers/${trackerId}`, params);
727
+ }
728
+ };
729
+
683
730
  // src/version.ts
684
- var VERSION = "0.20.0";
731
+ var VERSION = "0.22.0";
685
732
 
686
733
  // src/client.ts
687
734
  var DEFAULT_BASE_URL = "https://app.sentisense.ai";
@@ -710,6 +757,8 @@ var SentiSense = class {
710
757
  this.marketMood = new MarketMoodResource(this);
711
758
  this.marketSummary = new MarketSummaryResource(this);
712
759
  this.kb = new KB(this);
760
+ this.trackers = new Trackers(this);
761
+ this.calendar = new Calendar(this);
713
762
  }
714
763
  /** @internal */
715
764
  async get(path, params) {