sentisense 0.62.0 → 0.63.1
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 +28 -3
- package/dist/cli.cjs +37 -7
- package/dist/index.cjs +25 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +68 -9
- package/dist/index.d.ts +68 -9
- package/dist/index.mjs +25 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -230,7 +230,7 @@ interface StockEntity {
|
|
|
230
230
|
interface GetStockGraphOptions {
|
|
231
231
|
/** Hops from the stock's own company node: `1` (default) or `2`. */
|
|
232
232
|
depth?: 1 | 2;
|
|
233
|
-
/** Maximum nodes
|
|
233
|
+
/** Maximum non-root nodes, 1 to 200 (default 75). The root is always included in addition. */
|
|
234
234
|
cap?: number;
|
|
235
235
|
}
|
|
236
236
|
/** One node in a {@link StockGraph}. Every identifier in the graph is a `slug`. */
|
|
@@ -240,6 +240,8 @@ interface GraphNode {
|
|
|
240
240
|
displayName: string;
|
|
241
241
|
/** `"COMPANY"`, `"PERSON"`, `"PRODUCT_OR_SERVICE"`, `"ORGANIZATION"`, `"PUBLISHER"`, `"TOPIC"`, ... */
|
|
242
242
|
type: string;
|
|
243
|
+
/** Product category, present only on PRODUCT_OR_SERVICE nodes when known. */
|
|
244
|
+
category?: string;
|
|
243
245
|
}
|
|
244
246
|
/** One typed relationship in a {@link StockGraph}, between two node slugs. */
|
|
245
247
|
interface GraphEdge {
|
|
@@ -260,7 +262,7 @@ interface GraphEdge {
|
|
|
260
262
|
}
|
|
261
263
|
/** A product family and the slugs of its member products. */
|
|
262
264
|
interface GraphProductFamily {
|
|
263
|
-
/**
|
|
265
|
+
/** Parent product's slug, e.g. `"iPhone"`. Join to nodes[].slug for its displayName label. */
|
|
264
266
|
family: string;
|
|
265
267
|
/** Slugs of the products in the family. */
|
|
266
268
|
members: string[];
|
|
@@ -914,6 +916,10 @@ interface OptionsSummary {
|
|
|
914
916
|
largestPrintPctl?: number;
|
|
915
917
|
/** Where the intraday board lives and who can open it. */
|
|
916
918
|
capabilities?: OptionsCapabilities;
|
|
919
|
+
/** DELISTED marks a frozen last dossier; absent for listed or pending symbols. */
|
|
920
|
+
listingStatus?: "DELISTED";
|
|
921
|
+
/** ISO day (YYYY-MM-DD) trading stopped; absent when the date is unknown. */
|
|
922
|
+
delistedDate?: string;
|
|
917
923
|
}
|
|
918
924
|
/** Trailing window for `client.stocks.getOptionsHistory()`. */
|
|
919
925
|
type OptionsHistoryWindow = "1y" | "2y" | "5y";
|
|
@@ -1629,6 +1635,38 @@ interface GetHoldersOptions {
|
|
|
1629
1635
|
/** Sort direction. Server default is `"desc"`. Requires `limit`. */
|
|
1630
1636
|
sortDir?: "asc" | "desc";
|
|
1631
1637
|
}
|
|
1638
|
+
/**
|
|
1639
|
+
* Optional wire keys inside an institution detail's preview envelope.
|
|
1640
|
+
* Opt in with PreviewResponse<InstitutionDetail>; getInstitutionDetail retains
|
|
1641
|
+
* Promise<unknown> for compatibility with existing callers and implementations.
|
|
1642
|
+
*/
|
|
1643
|
+
interface InstitutionDetail {
|
|
1644
|
+
filerCik?: string | null;
|
|
1645
|
+
displayName?: string | null;
|
|
1646
|
+
urlSlug?: string | null;
|
|
1647
|
+
filerCategory?: string | null;
|
|
1648
|
+
/** Equity portfolio value in USD. */
|
|
1649
|
+
totalValueUsd?: number;
|
|
1650
|
+
/** Full row count, including synthetic SOLD_OUT rows. */
|
|
1651
|
+
holdingsCount?: number;
|
|
1652
|
+
/** Latest report's ISO calendar day (YYYY-MM-DD). */
|
|
1653
|
+
latestReportDate?: string | null;
|
|
1654
|
+
quartersTracked?: number;
|
|
1655
|
+
newPositions?: number;
|
|
1656
|
+
increasedPositions?: number;
|
|
1657
|
+
decreasedPositions?: number;
|
|
1658
|
+
soldOutPositions?: number;
|
|
1659
|
+
multiCikRollup?: boolean | null;
|
|
1660
|
+
childCikCount?: number | null;
|
|
1661
|
+
childCiks?: string[] | null;
|
|
1662
|
+
holdings?: Record<string, unknown>[] | null;
|
|
1663
|
+
optionPositions?: Record<string, unknown>[];
|
|
1664
|
+
returnedCount?: number;
|
|
1665
|
+
offset?: number;
|
|
1666
|
+
/** max(0, holdingsCount - soldOutPositions), for the full portfolio on every tier. */
|
|
1667
|
+
positionsHeld?: number;
|
|
1668
|
+
[key: string]: unknown;
|
|
1669
|
+
}
|
|
1632
1670
|
/** A single institution summary from the discovery list. */
|
|
1633
1671
|
interface InstitutionSummary {
|
|
1634
1672
|
/** SEC Central Index Key of the (rolled-up) institution. */
|
|
@@ -3162,6 +3200,12 @@ interface AnalystEarningsSurprise {
|
|
|
3162
3200
|
* As sent by the API: a fraction rounded to 2 decimals (0.07 = 7%), despite the name.
|
|
3163
3201
|
*/
|
|
3164
3202
|
surprisePercent: number | null;
|
|
3203
|
+
/**
|
|
3204
|
+
* Signed true percent: (actualEps - estimateEps) * 100 / abs(estimateEps),
|
|
3205
|
+
* rounded half-up to 2 decimals. Null when either EPS is missing or the estimate
|
|
3206
|
+
* is zero. The legacy surprisePercent fraction is unchanged.
|
|
3207
|
+
*/
|
|
3208
|
+
surprisePct?: number | null;
|
|
3165
3209
|
[key: string]: unknown;
|
|
3166
3210
|
}
|
|
3167
3211
|
interface AnalystEstimatesResponse {
|
|
@@ -3561,9 +3605,11 @@ declare class Earnings {
|
|
|
3561
3605
|
* management phrased it, and a summary of the earnings call.
|
|
3562
3606
|
*
|
|
3563
3607
|
* Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
|
|
3564
|
-
* FREE key receives the latest quarter shaped rather than truncated
|
|
3565
|
-
* `totalCount
|
|
3566
|
-
*
|
|
3608
|
+
* FREE key receives the latest quarter shaped rather than truncated.
|
|
3609
|
+
* `totalCount` on the envelope counts indexed quarters on both tiers. The
|
|
3610
|
+
* returned array can be shorter when a body is unavailable or limit cuts it.
|
|
3611
|
+
* Older responses may omit the count. {@link EarningsQuarter} documents
|
|
3612
|
+
* which fields each tier carries.
|
|
3567
3613
|
*
|
|
3568
3614
|
* A quarter typically appears within 48 hours of the company reporting, and
|
|
3569
3615
|
* the call summary can arrive after the press-release content for the same
|
|
@@ -4111,6 +4157,10 @@ declare class Institutional {
|
|
|
4111
4157
|
* Resolved by URL slug (e.g. `Berkshire-Hathaway`) or numeric SEC CIK.
|
|
4112
4158
|
* Free users receive the profile and top 10 holdings; PRO users receive the
|
|
4113
4159
|
* full holdings array. Returns 404 if the slug or CIK is unknown.
|
|
4160
|
+
*
|
|
4161
|
+
* The signature remains unknown for compatibility. Opt in to the exported
|
|
4162
|
+
* PreviewResponse<InstitutionDetail> type to read data.positionsHeld, the full
|
|
4163
|
+
* portfolio count excluding SOLD_OUT rows, even on a truncated holdings list.
|
|
4114
4164
|
*/
|
|
4115
4165
|
getInstitutionDetail(slugOrCik: string): Promise<unknown>;
|
|
4116
4166
|
}
|
|
@@ -4371,8 +4421,9 @@ declare class Stocks {
|
|
|
4371
4421
|
*
|
|
4372
4422
|
* Every identifier in the response is a slug, the same handle the metric and document
|
|
4373
4423
|
* endpoints take, so a node can be passed straight to them. `depth` is 1 (default) or 2,
|
|
4374
|
-
* `cap` limits the
|
|
4375
|
-
* with a 400. A ticker with no
|
|
4424
|
+
* `cap` limits the number of non-root nodes (1 to 200, default 75); the root is always
|
|
4425
|
+
* included in addition. Out-of-range values are rejected with a 400. A ticker with no
|
|
4426
|
+
* graph returns a `NotFoundError`.
|
|
4376
4427
|
*/
|
|
4377
4428
|
getGraph(ticker: string, options?: GetStockGraphOptions): Promise<StockGraph>;
|
|
4378
4429
|
/**
|
|
@@ -4677,6 +4728,14 @@ declare class DeepHistoryUnavailableError extends SentiSenseError {
|
|
|
4677
4728
|
retryAfter?: number;
|
|
4678
4729
|
constructor(message: string, retryAfter?: number);
|
|
4679
4730
|
}
|
|
4731
|
+
/**
|
|
4732
|
+
* A 429. Check `code` to tell the two apart:
|
|
4733
|
+
*
|
|
4734
|
+
* - `"rate_limit_exceeded"`: the per-minute limit. The client retries it after `Retry-After`
|
|
4735
|
+
* before throwing, so you see this only once retries are used up.
|
|
4736
|
+
* - `"quota_exceeded"`: the monthly request allowance is used up. It is thrown on the first
|
|
4737
|
+
* response without retrying, and `message` says when the allowance resets.
|
|
4738
|
+
*/
|
|
4680
4739
|
declare class RateLimitError extends SentiSenseError {
|
|
4681
4740
|
/**
|
|
4682
4741
|
* Seconds to wait before retrying, from the server's `Retry-After` header, clamped to
|
|
@@ -4704,6 +4763,6 @@ declare class APIError extends SentiSenseError {
|
|
|
4704
4763
|
constructor(message: string, status: number, code?: string);
|
|
4705
4764
|
}
|
|
4706
4765
|
|
|
4707
|
-
declare const VERSION = "0.
|
|
4766
|
+
declare const VERSION = "0.63.1";
|
|
4708
4767
|
|
|
4709
|
-
export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystCalledItCall, type AnalystCalledItMove, type AnalystConsensus, type AnalystConsensusHistory, type AnalystConsensusHistoryPoint, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatePeriodType, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AnalystRef, 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 EarningsOutcomeStatistics, type EarningsQuarter, type EarningsReaction, type EarningsReactionsResponse, type EarningsSource, type EarningsStatistics, type EarningsStatisticsBaseline, type EarningsStatisticsDeviation, type EarningsStatisticsThresholds, type EarningsStatisticsWindow, type EntitySearchResult, type EntitySearchType, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfQuote, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type ExtendedHoursInfo, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCalledItOptions, type GetAnalystCallsOptions, type GetAnalystConsensusHistoryOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsStatisticsOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetShortInterestOptions, type GetShortVolumeOptions, type GetStockGraphOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type GraphCounts, type GraphEdge, type GraphGroups, type GraphNode, type GraphProductFamily, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type OptionsAggregate, type OptionsCapabilities, type OptionsContext, type OptionsHighlight, type OptionsHistory, type OptionsHistoryWindow, type OptionsIntradayBoardCapability, type OptionsIntradayFlow, type OptionsOiFollowUp, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, type RankedEarnings, type RankedEarningsSection, type RankedReportedEarnings, type RankedUpcomingEarnings, RateLimitError, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type RiskAdjustment, type RiskCondition, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, type SearchEntitiesOptions, type SearchStoriesOptions, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortInterestDataPoint, type ShortVolume, type ShortVolumeDataPoint, type SimilarStock, type StockDetail, type StockEntity, type StockGraph, type StockImage, type StockNotRated, type StockPrice, type StockProfile, type StockQuote, type StockRating, type StockRatingResponse, type StockSocialDominance, type Story, type StoryCluster, type StoryTimelineEntry, TemporarilyUnavailableError, 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 };
|
|
4768
|
+
export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystCalledItCall, type AnalystCalledItMove, type AnalystConsensus, type AnalystConsensusHistory, type AnalystConsensusHistoryPoint, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatePeriodType, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AnalystRef, 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 EarningsOutcomeStatistics, type EarningsQuarter, type EarningsReaction, type EarningsReactionsResponse, type EarningsSource, type EarningsStatistics, type EarningsStatisticsBaseline, type EarningsStatisticsDeviation, type EarningsStatisticsThresholds, type EarningsStatisticsWindow, type EntitySearchResult, type EntitySearchType, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfQuote, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type ExtendedHoursInfo, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCalledItOptions, type GetAnalystCallsOptions, type GetAnalystConsensusHistoryOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsStatisticsOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetShortInterestOptions, type GetShortVolumeOptions, type GetStockGraphOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type GraphCounts, type GraphEdge, type GraphGroups, type GraphNode, type GraphProductFamily, 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 InstitutionDetail, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type OptionsAggregate, type OptionsCapabilities, type OptionsContext, type OptionsHighlight, type OptionsHistory, type OptionsHistoryWindow, type OptionsIntradayBoardCapability, type OptionsIntradayFlow, type OptionsOiFollowUp, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, type RankedEarnings, type RankedEarningsSection, type RankedReportedEarnings, type RankedUpcomingEarnings, RateLimitError, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type RiskAdjustment, type RiskCondition, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, type SearchEntitiesOptions, type SearchStoriesOptions, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortInterestDataPoint, type ShortVolume, type ShortVolumeDataPoint, type SimilarStock, type StockDetail, type StockEntity, type StockGraph, type StockImage, type StockNotRated, type StockPrice, type StockProfile, type StockQuote, type StockRating, type StockRatingResponse, type StockSocialDominance, type Story, type StoryCluster, type StoryTimelineEntry, TemporarilyUnavailableError, 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
|
@@ -230,7 +230,7 @@ interface StockEntity {
|
|
|
230
230
|
interface GetStockGraphOptions {
|
|
231
231
|
/** Hops from the stock's own company node: `1` (default) or `2`. */
|
|
232
232
|
depth?: 1 | 2;
|
|
233
|
-
/** Maximum nodes
|
|
233
|
+
/** Maximum non-root nodes, 1 to 200 (default 75). The root is always included in addition. */
|
|
234
234
|
cap?: number;
|
|
235
235
|
}
|
|
236
236
|
/** One node in a {@link StockGraph}. Every identifier in the graph is a `slug`. */
|
|
@@ -240,6 +240,8 @@ interface GraphNode {
|
|
|
240
240
|
displayName: string;
|
|
241
241
|
/** `"COMPANY"`, `"PERSON"`, `"PRODUCT_OR_SERVICE"`, `"ORGANIZATION"`, `"PUBLISHER"`, `"TOPIC"`, ... */
|
|
242
242
|
type: string;
|
|
243
|
+
/** Product category, present only on PRODUCT_OR_SERVICE nodes when known. */
|
|
244
|
+
category?: string;
|
|
243
245
|
}
|
|
244
246
|
/** One typed relationship in a {@link StockGraph}, between two node slugs. */
|
|
245
247
|
interface GraphEdge {
|
|
@@ -260,7 +262,7 @@ interface GraphEdge {
|
|
|
260
262
|
}
|
|
261
263
|
/** A product family and the slugs of its member products. */
|
|
262
264
|
interface GraphProductFamily {
|
|
263
|
-
/**
|
|
265
|
+
/** Parent product's slug, e.g. `"iPhone"`. Join to nodes[].slug for its displayName label. */
|
|
264
266
|
family: string;
|
|
265
267
|
/** Slugs of the products in the family. */
|
|
266
268
|
members: string[];
|
|
@@ -914,6 +916,10 @@ interface OptionsSummary {
|
|
|
914
916
|
largestPrintPctl?: number;
|
|
915
917
|
/** Where the intraday board lives and who can open it. */
|
|
916
918
|
capabilities?: OptionsCapabilities;
|
|
919
|
+
/** DELISTED marks a frozen last dossier; absent for listed or pending symbols. */
|
|
920
|
+
listingStatus?: "DELISTED";
|
|
921
|
+
/** ISO day (YYYY-MM-DD) trading stopped; absent when the date is unknown. */
|
|
922
|
+
delistedDate?: string;
|
|
917
923
|
}
|
|
918
924
|
/** Trailing window for `client.stocks.getOptionsHistory()`. */
|
|
919
925
|
type OptionsHistoryWindow = "1y" | "2y" | "5y";
|
|
@@ -1629,6 +1635,38 @@ interface GetHoldersOptions {
|
|
|
1629
1635
|
/** Sort direction. Server default is `"desc"`. Requires `limit`. */
|
|
1630
1636
|
sortDir?: "asc" | "desc";
|
|
1631
1637
|
}
|
|
1638
|
+
/**
|
|
1639
|
+
* Optional wire keys inside an institution detail's preview envelope.
|
|
1640
|
+
* Opt in with PreviewResponse<InstitutionDetail>; getInstitutionDetail retains
|
|
1641
|
+
* Promise<unknown> for compatibility with existing callers and implementations.
|
|
1642
|
+
*/
|
|
1643
|
+
interface InstitutionDetail {
|
|
1644
|
+
filerCik?: string | null;
|
|
1645
|
+
displayName?: string | null;
|
|
1646
|
+
urlSlug?: string | null;
|
|
1647
|
+
filerCategory?: string | null;
|
|
1648
|
+
/** Equity portfolio value in USD. */
|
|
1649
|
+
totalValueUsd?: number;
|
|
1650
|
+
/** Full row count, including synthetic SOLD_OUT rows. */
|
|
1651
|
+
holdingsCount?: number;
|
|
1652
|
+
/** Latest report's ISO calendar day (YYYY-MM-DD). */
|
|
1653
|
+
latestReportDate?: string | null;
|
|
1654
|
+
quartersTracked?: number;
|
|
1655
|
+
newPositions?: number;
|
|
1656
|
+
increasedPositions?: number;
|
|
1657
|
+
decreasedPositions?: number;
|
|
1658
|
+
soldOutPositions?: number;
|
|
1659
|
+
multiCikRollup?: boolean | null;
|
|
1660
|
+
childCikCount?: number | null;
|
|
1661
|
+
childCiks?: string[] | null;
|
|
1662
|
+
holdings?: Record<string, unknown>[] | null;
|
|
1663
|
+
optionPositions?: Record<string, unknown>[];
|
|
1664
|
+
returnedCount?: number;
|
|
1665
|
+
offset?: number;
|
|
1666
|
+
/** max(0, holdingsCount - soldOutPositions), for the full portfolio on every tier. */
|
|
1667
|
+
positionsHeld?: number;
|
|
1668
|
+
[key: string]: unknown;
|
|
1669
|
+
}
|
|
1632
1670
|
/** A single institution summary from the discovery list. */
|
|
1633
1671
|
interface InstitutionSummary {
|
|
1634
1672
|
/** SEC Central Index Key of the (rolled-up) institution. */
|
|
@@ -3162,6 +3200,12 @@ interface AnalystEarningsSurprise {
|
|
|
3162
3200
|
* As sent by the API: a fraction rounded to 2 decimals (0.07 = 7%), despite the name.
|
|
3163
3201
|
*/
|
|
3164
3202
|
surprisePercent: number | null;
|
|
3203
|
+
/**
|
|
3204
|
+
* Signed true percent: (actualEps - estimateEps) * 100 / abs(estimateEps),
|
|
3205
|
+
* rounded half-up to 2 decimals. Null when either EPS is missing or the estimate
|
|
3206
|
+
* is zero. The legacy surprisePercent fraction is unchanged.
|
|
3207
|
+
*/
|
|
3208
|
+
surprisePct?: number | null;
|
|
3165
3209
|
[key: string]: unknown;
|
|
3166
3210
|
}
|
|
3167
3211
|
interface AnalystEstimatesResponse {
|
|
@@ -3561,9 +3605,11 @@ declare class Earnings {
|
|
|
3561
3605
|
* management phrased it, and a summary of the earnings call.
|
|
3562
3606
|
*
|
|
3563
3607
|
* Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
|
|
3564
|
-
* FREE key receives the latest quarter shaped rather than truncated
|
|
3565
|
-
* `totalCount
|
|
3566
|
-
*
|
|
3608
|
+
* FREE key receives the latest quarter shaped rather than truncated.
|
|
3609
|
+
* `totalCount` on the envelope counts indexed quarters on both tiers. The
|
|
3610
|
+
* returned array can be shorter when a body is unavailable or limit cuts it.
|
|
3611
|
+
* Older responses may omit the count. {@link EarningsQuarter} documents
|
|
3612
|
+
* which fields each tier carries.
|
|
3567
3613
|
*
|
|
3568
3614
|
* A quarter typically appears within 48 hours of the company reporting, and
|
|
3569
3615
|
* the call summary can arrive after the press-release content for the same
|
|
@@ -4111,6 +4157,10 @@ declare class Institutional {
|
|
|
4111
4157
|
* Resolved by URL slug (e.g. `Berkshire-Hathaway`) or numeric SEC CIK.
|
|
4112
4158
|
* Free users receive the profile and top 10 holdings; PRO users receive the
|
|
4113
4159
|
* full holdings array. Returns 404 if the slug or CIK is unknown.
|
|
4160
|
+
*
|
|
4161
|
+
* The signature remains unknown for compatibility. Opt in to the exported
|
|
4162
|
+
* PreviewResponse<InstitutionDetail> type to read data.positionsHeld, the full
|
|
4163
|
+
* portfolio count excluding SOLD_OUT rows, even on a truncated holdings list.
|
|
4114
4164
|
*/
|
|
4115
4165
|
getInstitutionDetail(slugOrCik: string): Promise<unknown>;
|
|
4116
4166
|
}
|
|
@@ -4371,8 +4421,9 @@ declare class Stocks {
|
|
|
4371
4421
|
*
|
|
4372
4422
|
* Every identifier in the response is a slug, the same handle the metric and document
|
|
4373
4423
|
* endpoints take, so a node can be passed straight to them. `depth` is 1 (default) or 2,
|
|
4374
|
-
* `cap` limits the
|
|
4375
|
-
* with a 400. A ticker with no
|
|
4424
|
+
* `cap` limits the number of non-root nodes (1 to 200, default 75); the root is always
|
|
4425
|
+
* included in addition. Out-of-range values are rejected with a 400. A ticker with no
|
|
4426
|
+
* graph returns a `NotFoundError`.
|
|
4376
4427
|
*/
|
|
4377
4428
|
getGraph(ticker: string, options?: GetStockGraphOptions): Promise<StockGraph>;
|
|
4378
4429
|
/**
|
|
@@ -4677,6 +4728,14 @@ declare class DeepHistoryUnavailableError extends SentiSenseError {
|
|
|
4677
4728
|
retryAfter?: number;
|
|
4678
4729
|
constructor(message: string, retryAfter?: number);
|
|
4679
4730
|
}
|
|
4731
|
+
/**
|
|
4732
|
+
* A 429. Check `code` to tell the two apart:
|
|
4733
|
+
*
|
|
4734
|
+
* - `"rate_limit_exceeded"`: the per-minute limit. The client retries it after `Retry-After`
|
|
4735
|
+
* before throwing, so you see this only once retries are used up.
|
|
4736
|
+
* - `"quota_exceeded"`: the monthly request allowance is used up. It is thrown on the first
|
|
4737
|
+
* response without retrying, and `message` says when the allowance resets.
|
|
4738
|
+
*/
|
|
4680
4739
|
declare class RateLimitError extends SentiSenseError {
|
|
4681
4740
|
/**
|
|
4682
4741
|
* Seconds to wait before retrying, from the server's `Retry-After` header, clamped to
|
|
@@ -4704,6 +4763,6 @@ declare class APIError extends SentiSenseError {
|
|
|
4704
4763
|
constructor(message: string, status: number, code?: string);
|
|
4705
4764
|
}
|
|
4706
4765
|
|
|
4707
|
-
declare const VERSION = "0.
|
|
4766
|
+
declare const VERSION = "0.63.1";
|
|
4708
4767
|
|
|
4709
|
-
export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystCalledItCall, type AnalystCalledItMove, type AnalystConsensus, type AnalystConsensusHistory, type AnalystConsensusHistoryPoint, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatePeriodType, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AnalystRef, 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 EarningsOutcomeStatistics, type EarningsQuarter, type EarningsReaction, type EarningsReactionsResponse, type EarningsSource, type EarningsStatistics, type EarningsStatisticsBaseline, type EarningsStatisticsDeviation, type EarningsStatisticsThresholds, type EarningsStatisticsWindow, type EntitySearchResult, type EntitySearchType, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfQuote, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type ExtendedHoursInfo, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCalledItOptions, type GetAnalystCallsOptions, type GetAnalystConsensusHistoryOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsStatisticsOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetShortInterestOptions, type GetShortVolumeOptions, type GetStockGraphOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type GraphCounts, type GraphEdge, type GraphGroups, type GraphNode, type GraphProductFamily, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type OptionsAggregate, type OptionsCapabilities, type OptionsContext, type OptionsHighlight, type OptionsHistory, type OptionsHistoryWindow, type OptionsIntradayBoardCapability, type OptionsIntradayFlow, type OptionsOiFollowUp, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, type RankedEarnings, type RankedEarningsSection, type RankedReportedEarnings, type RankedUpcomingEarnings, RateLimitError, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type RiskAdjustment, type RiskCondition, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, type SearchEntitiesOptions, type SearchStoriesOptions, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortInterestDataPoint, type ShortVolume, type ShortVolumeDataPoint, type SimilarStock, type StockDetail, type StockEntity, type StockGraph, type StockImage, type StockNotRated, type StockPrice, type StockProfile, type StockQuote, type StockRating, type StockRatingResponse, type StockSocialDominance, type Story, type StoryCluster, type StoryTimelineEntry, TemporarilyUnavailableError, 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 };
|
|
4768
|
+
export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystCalledItCall, type AnalystCalledItMove, type AnalystConsensus, type AnalystConsensusHistory, type AnalystConsensusHistoryPoint, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatePeriodType, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AnalystRef, 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 EarningsOutcomeStatistics, type EarningsQuarter, type EarningsReaction, type EarningsReactionsResponse, type EarningsSource, type EarningsStatistics, type EarningsStatisticsBaseline, type EarningsStatisticsDeviation, type EarningsStatisticsThresholds, type EarningsStatisticsWindow, type EntitySearchResult, type EntitySearchType, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfQuote, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type ExtendedHoursInfo, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCalledItOptions, type GetAnalystCallsOptions, type GetAnalystConsensusHistoryOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsStatisticsOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetShortInterestOptions, type GetShortVolumeOptions, type GetStockGraphOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type GraphCounts, type GraphEdge, type GraphGroups, type GraphNode, type GraphProductFamily, 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 InstitutionDetail, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type OptionsAggregate, type OptionsCapabilities, type OptionsContext, type OptionsHighlight, type OptionsHistory, type OptionsHistoryWindow, type OptionsIntradayBoardCapability, type OptionsIntradayFlow, type OptionsOiFollowUp, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, type RankedEarnings, type RankedEarningsSection, type RankedReportedEarnings, type RankedUpcomingEarnings, RateLimitError, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type RiskAdjustment, type RiskCondition, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, type SearchEntitiesOptions, type SearchStoriesOptions, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortInterestDataPoint, type ShortVolume, type ShortVolumeDataPoint, type SimilarStock, type StockDetail, type StockEntity, type StockGraph, type StockImage, type StockNotRated, type StockPrice, type StockProfile, type StockQuote, type StockRating, type StockRatingResponse, type StockSocialDominance, type Story, type StoryCluster, type StoryTimelineEntry, TemporarilyUnavailableError, 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
|
@@ -304,9 +304,11 @@ var Earnings = class {
|
|
|
304
304
|
* management phrased it, and a summary of the earnings call.
|
|
305
305
|
*
|
|
306
306
|
* Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
|
|
307
|
-
* FREE key receives the latest quarter shaped rather than truncated
|
|
308
|
-
* `totalCount
|
|
309
|
-
*
|
|
307
|
+
* FREE key receives the latest quarter shaped rather than truncated.
|
|
308
|
+
* `totalCount` on the envelope counts indexed quarters on both tiers. The
|
|
309
|
+
* returned array can be shorter when a body is unavailable or limit cuts it.
|
|
310
|
+
* Older responses may omit the count. {@link EarningsQuarter} documents
|
|
311
|
+
* which fields each tier carries.
|
|
310
312
|
*
|
|
311
313
|
* A quarter typically appears within 48 hours of the company reporting, and
|
|
312
314
|
* the call summary can arrive after the press-release content for the same
|
|
@@ -781,6 +783,10 @@ var Institutional = class {
|
|
|
781
783
|
* Resolved by URL slug (e.g. `Berkshire-Hathaway`) or numeric SEC CIK.
|
|
782
784
|
* Free users receive the profile and top 10 holdings; PRO users receive the
|
|
783
785
|
* full holdings array. Returns 404 if the slug or CIK is unknown.
|
|
786
|
+
*
|
|
787
|
+
* The signature remains unknown for compatibility. Opt in to the exported
|
|
788
|
+
* PreviewResponse<InstitutionDetail> type to read data.positionsHeld, the full
|
|
789
|
+
* portfolio count excluding SOLD_OUT rows, even on a truncated holdings list.
|
|
784
790
|
*/
|
|
785
791
|
async getInstitutionDetail(slugOrCik) {
|
|
786
792
|
return this.client.get(
|
|
@@ -1053,8 +1059,9 @@ var Stocks = class {
|
|
|
1053
1059
|
*
|
|
1054
1060
|
* Every identifier in the response is a slug, the same handle the metric and document
|
|
1055
1061
|
* endpoints take, so a node can be passed straight to them. `depth` is 1 (default) or 2,
|
|
1056
|
-
* `cap` limits the
|
|
1057
|
-
* with a 400. A ticker with no
|
|
1062
|
+
* `cap` limits the number of non-root nodes (1 to 200, default 75); the root is always
|
|
1063
|
+
* included in addition. Out-of-range values are rejected with a 400. A ticker with no
|
|
1064
|
+
* graph returns a `NotFoundError`.
|
|
1058
1065
|
*/
|
|
1059
1066
|
async getGraph(ticker, options) {
|
|
1060
1067
|
return this.client.get(
|
|
@@ -1352,7 +1359,7 @@ var Trackers = class {
|
|
|
1352
1359
|
};
|
|
1353
1360
|
|
|
1354
1361
|
// src/version.ts
|
|
1355
|
-
var VERSION = "0.
|
|
1362
|
+
var VERSION = "0.63.1";
|
|
1356
1363
|
|
|
1357
1364
|
// src/client.ts
|
|
1358
1365
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|
|
@@ -1364,6 +1371,15 @@ var DEEP_HISTORY_FALLBACK_WAIT_S = 3;
|
|
|
1364
1371
|
var MAX_DEEP_HISTORY_WAIT_S = 30;
|
|
1365
1372
|
var MAX_RATE_LIMIT_WAIT_S = 120;
|
|
1366
1373
|
var RATE_LIMIT_FALLBACK_WAIT_S = 60;
|
|
1374
|
+
var QUOTA_EXCEEDED_CODE = "quota_exceeded";
|
|
1375
|
+
async function isQuotaExceeded(response) {
|
|
1376
|
+
try {
|
|
1377
|
+
const body = await response.clone().json();
|
|
1378
|
+
return body?.error === QUOTA_EXCEEDED_CODE;
|
|
1379
|
+
} catch {
|
|
1380
|
+
return false;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1367
1383
|
function clampRetryAfter(raw, maxWaitS) {
|
|
1368
1384
|
if (!raw) return void 0;
|
|
1369
1385
|
const parsed = Number(raw);
|
|
@@ -1449,6 +1465,9 @@ var SentiSense = class {
|
|
|
1449
1465
|
);
|
|
1450
1466
|
}
|
|
1451
1467
|
if (!response.ok) {
|
|
1468
|
+
if (response.status === 429 && await isQuotaExceeded(response)) {
|
|
1469
|
+
await this.handleErrorResponse(response);
|
|
1470
|
+
}
|
|
1452
1471
|
const isRetryable = response.status === 429 || response.status >= 500;
|
|
1453
1472
|
if (isRetryable && attempt < this.maxRetries) {
|
|
1454
1473
|
if (response.status === 429 || response.status === 503) {
|