@sensiblestats/widget-sdk 0.66.0 → 0.68.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.cts CHANGED
@@ -40,6 +40,38 @@ declare class ParseError extends WidgetSdkError {
40
40
  constructor(message?: string, line?: string);
41
41
  }
42
42
 
43
+ interface SportSpec {
44
+ readonly slipPrefix: string;
45
+ readonly monitorPrefix: string;
46
+ readonly label: string;
47
+ readonly slippable: boolean;
48
+ }
49
+ declare const SPORTS: {
50
+ readonly basketball: {
51
+ readonly slipPrefix: "bb:";
52
+ readonly monitorPrefix: "nba:";
53
+ readonly label: "NBA";
54
+ readonly slippable: true;
55
+ };
56
+ readonly americanfootball: {
57
+ readonly slipPrefix: "af:";
58
+ readonly monitorPrefix: "nfl:";
59
+ readonly label: "NFL";
60
+ readonly slippable: true;
61
+ };
62
+ };
63
+ type NonFootballSport = keyof typeof SPORTS;
64
+ /** The sports whose prices can reach an operator slip or a pin: those the map marks slippable. */
65
+ type SlipSport = {
66
+ [K in NonFootballSport]: (typeof SPORTS)[K]['slippable'] extends true ? K : never;
67
+ }[NonFootballSport];
68
+ /** undefined means football: every sport the map does not know is football. */
69
+ declare function sportOf(v: unknown): NonFootballSport | undefined;
70
+ /** True for football (no sport) and for a sport the map marks slippable: the only cases that may pin or slip. */
71
+ declare function mayPinOrSlip(v: unknown): boolean;
72
+ /** The sport when it may take a slip pick or a pin; undefined for football and for a sport that never does. */
73
+ declare function slipSportOf(v: unknown): SlipSport | undefined;
74
+
43
75
  interface ProgressEventData {
44
76
  phase: string;
45
77
  message: string;
@@ -701,6 +733,163 @@ interface NbaInsight {
701
733
  interface NbaInsightEventData {
702
734
  insight: NbaInsight;
703
735
  }
736
+ type NflInsightKind = 'settle_recap' | 'prop_reason' | 'ladder' | 'injury_report' | 'line_move' | 'ats_record' | 'matchup';
737
+ interface NflInsightSelection {
738
+ key: string;
739
+ marketDeveloperName: string;
740
+ selectionLabel: string;
741
+ side: string;
742
+ line?: string | null;
743
+ price: number;
744
+ quotedAtUtc: string;
745
+ matchOddsId?: number | null;
746
+ }
747
+ interface NflPropReasonGame {
748
+ week: number;
749
+ opponent: string;
750
+ value?: number | null;
751
+ result?: string | null;
752
+ }
753
+ interface NflPropReasonEvidence {
754
+ playerId: number;
755
+ playerName: string;
756
+ propType: string;
757
+ line: string;
758
+ hits: number;
759
+ misses: number;
760
+ pushes: number;
761
+ n: number;
762
+ games: NflPropReasonGame[];
763
+ }
764
+ interface NflLadderRung {
765
+ at: string;
766
+ hits: number;
767
+ selectionKey: string;
768
+ }
769
+ interface NflLadderEvidence {
770
+ playerId: number;
771
+ playerName: string;
772
+ propType: string;
773
+ n: number;
774
+ rungs: NflLadderRung[];
775
+ }
776
+ interface NflInjuryPlayer {
777
+ name: string;
778
+ position?: string | null;
779
+ status: string;
780
+ }
781
+ interface NflInjuryReportEvidence {
782
+ teamId: number;
783
+ teamName: string;
784
+ teamAbbr: string;
785
+ opponentAbbr: string;
786
+ players: NflInjuryPlayer[];
787
+ morePlayers: number;
788
+ }
789
+ interface NflLineMoveLane {
790
+ market: string;
791
+ side: string;
792
+ openLine?: string | null;
793
+ openPrice: number;
794
+ openAt: string;
795
+ line?: string | null;
796
+ price: number;
797
+ quotedAtUtc: string;
798
+ }
799
+ interface NflLineMoveEvidence {
800
+ lanes: NflLineMoveLane[];
801
+ }
802
+ interface NflAtsGame {
803
+ week: number;
804
+ opponentAbbr: string;
805
+ spreadLine: string;
806
+ result: string;
807
+ }
808
+ interface NflAtsRecordEvidence {
809
+ teamId: number;
810
+ teamName: string;
811
+ teamAbbr: string;
812
+ finishedGames: number;
813
+ n: number;
814
+ w: number;
815
+ l: number;
816
+ p: number;
817
+ withoutOpening: number;
818
+ games: NflAtsGame[];
819
+ }
820
+ interface NflMatchupEvidence {
821
+ defenseTeamName: string;
822
+ defenseAbbr: string;
823
+ offenseTeamName: string;
824
+ offenseAbbr: string;
825
+ position: string;
826
+ basis: string;
827
+ yardsPerGame: number;
828
+ touchdownsPerGame: number;
829
+ rank: number;
830
+ rankedTeams: number;
831
+ n: number;
832
+ }
833
+ interface NflSettleRecapLine {
834
+ propType: string;
835
+ line?: string | null;
836
+ actual?: number | null;
837
+ result: string;
838
+ }
839
+ interface NflSettleRecapPlayer {
840
+ playerId: number;
841
+ name: string;
842
+ lines: NflSettleRecapLine[];
843
+ }
844
+ interface NflSettleRecapSummary {
845
+ over: number;
846
+ under: number;
847
+ pushes: number;
848
+ yes: number;
849
+ no: number;
850
+ voids: number;
851
+ n: number;
852
+ }
853
+ interface NflSettleRecapEvidence {
854
+ finalScore: string;
855
+ lineBasis: string;
856
+ players: NflSettleRecapPlayer[];
857
+ morePlayers: number;
858
+ summary: NflSettleRecapSummary;
859
+ }
860
+ interface NflInsight {
861
+ insightId: string;
862
+ matchId: number;
863
+ kind: string;
864
+ text: string;
865
+ title: string;
866
+ marketDeveloperName?: string | null;
867
+ marketLabel?: string | null;
868
+ selections: NflInsightSelection[];
869
+ disclaimer?: string | null;
870
+ homeTeamName: string;
871
+ awayTeamName: string;
872
+ homeTeamAbbr: string;
873
+ awayTeamAbbr: string;
874
+ competitionName: string;
875
+ addToSlipEnabled: boolean;
876
+ pinEnabled: boolean;
877
+ kickoffUtc?: string | null;
878
+ kickoffLabel?: string | null;
879
+ quotedAtUtc?: string | null;
880
+ sport: string;
881
+ propReason?: NflPropReasonEvidence | null;
882
+ ladder?: NflLadderEvidence | null;
883
+ injuryReport?: NflInjuryReportEvidence | null;
884
+ lineMove?: NflLineMoveEvidence | null;
885
+ atsRecord?: NflAtsRecordEvidence | null;
886
+ matchup?: NflMatchupEvidence | null;
887
+ settleRecap?: NflSettleRecapEvidence | null;
888
+ [key: string]: unknown;
889
+ }
890
+ interface NflInsightEventData {
891
+ insight: NflInsight;
892
+ }
704
893
  interface MarketOddsRow {
705
894
  selectionLabel: string;
706
895
  side?: string | null;
@@ -738,8 +927,11 @@ interface MarketOddsCard {
738
927
  competitionImagePath?: string | null;
739
928
  /** Server-rendered kickoff chip in the operator's zone + language. Prefer over local formatting of kickoffUtc. */
740
929
  kickoffLabel?: string | null;
741
- /** `basketball` on an NBA game card; absent or null reads as football. */
930
+ /** `basketball` on an NBA game card, `americanfootball` on an NFL one; absent or null reads as football. */
742
931
  sport?: string | null;
932
+ /** Short team names (NFL), drawn as the badge in place of a crest. */
933
+ homeTeamAbbr?: string | null;
934
+ awayTeamAbbr?: string | null;
743
935
  /** The strongest stat for this card's market and fixture, already in the turn's language. */
744
936
  insight?: MarketOddsCardInsight | null;
745
937
  /** Up to 2 stats for this card's exact market, strongest first; insights[0] is always the same
@@ -981,7 +1173,7 @@ interface PinRef {
981
1173
  matchOddsId?: number | null;
982
1174
  withHistory?: boolean;
983
1175
  /** Absent reads as football on the server, so football pins and stored pins stay unchanged. */
984
- sport?: 'basketball';
1176
+ sport?: SlipSport;
985
1177
  }
986
1178
  interface LiveMonitorStatPrice {
987
1179
  marketDeveloperName: string;
@@ -1029,7 +1221,7 @@ interface LiveMonitorFact {
1029
1221
  basis: string;
1030
1222
  market?: LiveMonitorStatPrice | null;
1031
1223
  }
1032
- type MonitorSport = 'football' | 'basketball';
1224
+ type MonitorSport = 'football' | SlipSport;
1033
1225
  /** Basketball block of a followed game. Away is the visitor. */
1034
1226
  interface LiveMonitorBasketball {
1035
1227
  period: number;
@@ -1045,6 +1237,18 @@ interface LiveMonitorBasketball {
1045
1237
  homeTimeoutsLeft?: number | null;
1046
1238
  awayTimeoutsLeft?: number | null;
1047
1239
  }
1240
+ /** American football block of a followed game. Away is the visitor. Period is null before kickoff and after the game. */
1241
+ interface LiveMonitorAmericanFootball {
1242
+ period: number | null;
1243
+ clock: string | null;
1244
+ statusText: string | null;
1245
+ homeAbbreviation: string;
1246
+ awayAbbreviation: string;
1247
+ homeNickname: string;
1248
+ awayNickname: string;
1249
+ homePeriods: (number | null)[];
1250
+ awayPeriods: (number | null)[];
1251
+ }
1048
1252
  interface LiveMonitorMatch {
1049
1253
  matchId: number;
1050
1254
  phase: MonitorPhase;
@@ -1075,6 +1279,8 @@ interface LiveMonitorMatch {
1075
1279
  sport?: MonitorSport;
1076
1280
  /** Set only on a basketball match. */
1077
1281
  basketball?: LiveMonitorBasketball | null;
1282
+ /** Set only on an American football match. */
1283
+ americanFootball?: LiveMonitorAmericanFootball | null;
1078
1284
  [key: string]: unknown;
1079
1285
  }
1080
1286
  interface LiveMonitorMarket {
@@ -1102,7 +1308,7 @@ interface LiveMonitorSnapshot {
1102
1308
  serverNowUtc: string;
1103
1309
  nextPollSeconds: number;
1104
1310
  }
1105
- type ScheduleSport = 'football' | 'basketball';
1311
+ type ScheduleSport = 'football' | 'basketball' | 'americanfootball';
1106
1312
  interface ScheduleMatch {
1107
1313
  matchId: number;
1108
1314
  /** Absent means football. */
@@ -1162,7 +1368,7 @@ interface EventEnvelope<TType extends string, TData> {
1162
1368
  timestamp: string;
1163
1369
  data: TData;
1164
1370
  }
1165
- type ChatEvent = EventEnvelope<'progress', ProgressEventData> | EventEnvelope<'answer', AnswerEventData> | EventEnvelope<'entity_card', EntityCardEventData> | EventEnvelope<'action_button', ActionButtonEventData> | EventEnvelope<'intent_chip', IntentChipEventData> | EventEnvelope<'actions_loading', ActionsLoadingEventData> | EventEnvelope<'turn_complete', TurnCompleteEventData> | EventEnvelope<'betting_insight', BettingInsightEventData> | EventEnvelope<'nba_insight', NbaInsightEventData> | EventEnvelope<'market_odds', MarketOddsEventData> | EventEnvelope<'combo_card', ComboCardEventData> | EventEnvelope<'odds_movement', OddsMovementEventData> | EventEnvelope<'error', StreamErrorEventData>;
1371
+ type ChatEvent = EventEnvelope<'progress', ProgressEventData> | EventEnvelope<'answer', AnswerEventData> | EventEnvelope<'entity_card', EntityCardEventData> | EventEnvelope<'action_button', ActionButtonEventData> | EventEnvelope<'intent_chip', IntentChipEventData> | EventEnvelope<'actions_loading', ActionsLoadingEventData> | EventEnvelope<'turn_complete', TurnCompleteEventData> | EventEnvelope<'betting_insight', BettingInsightEventData> | EventEnvelope<'nba_insight', NbaInsightEventData> | EventEnvelope<'nfl_insight', NflInsightEventData> | EventEnvelope<'market_odds', MarketOddsEventData> | EventEnvelope<'combo_card', ComboCardEventData> | EventEnvelope<'odds_movement', OddsMovementEventData> | EventEnvelope<'error', StreamErrorEventData>;
1166
1372
  interface GameSummary {
1167
1373
  gameId: string;
1168
1374
  gameDay: string;
@@ -1467,7 +1673,7 @@ interface SignalInput {
1467
1673
  /** Zero-based tile position within the dashboard, when it is a dashboard tap. */
1468
1674
  tileIndex?: number;
1469
1675
  }
1470
- type SlipSport = 'basketball';
1676
+
1471
1677
  interface SlipSelection {
1472
1678
  matchOddsId: number;
1473
1679
  matchId: number;
@@ -1529,7 +1735,7 @@ declare class Conversation {
1529
1735
  sendSignal(input: SignalInput): Promise<void>;
1530
1736
  getLiveDashboard(): Promise<ClubFanDashboardPayload | null>;
1531
1737
  getLiveMonitor(pins: PinRef[], locale?: string): Promise<LiveMonitorSnapshot | null>;
1532
- getMarketOdds(matchId: number, marketDeveloperName: string, sport?: 'basketball'): Promise<MarketOddsBlock | null>;
1738
+ getMarketOdds(matchId: number, marketDeveloperName: string, sport?: SlipSport): Promise<MarketOddsBlock | null>;
1533
1739
  getPlayerProps(matchId: number): Promise<PlayerPropsBundle | null>;
1534
1740
  getPricePresets(locale: string, options?: PresetGridOptions): Promise<PresetGrid | null>;
1535
1741
  getSchedule(localDate: string, utcOffsetMinutes: number, operatorUserId?: string, anonymousUserId?: string): Promise<SchedulePayload | null>;
@@ -1667,4 +1873,4 @@ interface NdjsonParser {
1667
1873
  }
1668
1874
  declare function createNdjsonParser(): NdjsonParser;
1669
1875
 
1670
- export { type ActionButtonEventData, type ActionsLoadingEventData, type AddToSlipHandler, type AddToSlipRejectReason, type AddToSlipResult, type AllTimeRow, type AnswerEventData, AuthError, type AvailableMarket, type BettingInsight, type BettingInsightEventData, type BettingInsightOdds, type ChatCallbacks, type ChatEvent, type ChatGrounding, type ChatHandle, type ChatInput, type ChatPreset, type ClubFanDashboardCard, type ClubFanDashboardHeadToHead, type ClubFanDashboardPayload, type ClubFixture, type ClubFixturesPayload, type ClubMatchLogRow, type ClubNextFixture, type ClubPerformanceMetric, type ClubPlayerAvailability, type ClubPlayerAvailabilityStatus, type ClubPlayerDetailPayload, type ClubPlayerPerformance, type ClubPlayerSeasonStats, type ClubRecordEntry, type ClubRecordsPayload, type ClubSquadPayload, type ClubSquadPlayer, type ClubSquadStatsPayload, type ClubStandingRow, type ClubStandingsPayload, type ComboCard, type ComboCardEventData, type ComboLeg, type ComboReplacedLeg, type CongestedWeekCard, type CongestedWeekData, type CongestedWeekEntry, Conversation, type CountdownCard, type CountdownData, ENTITY_TYPE_CODES, type EntityCard, type EntityCardEventData, type EntityCardScope, type EntityCardStat, type EventBatch, type EventLogger, type EventLoggerOptions, type FetchLike, type FixtureCard, type FixtureCardData, ForbiddenError, type FormAndH2H, type FormMatch, type GameListPayload, type GameResultPayload, type GameStatePayload, type GameSummary, type GreetingDashboard, type GreetingDashboardLayout, type GreetingDashboardSignalRef, type GreetingDashboardSpan, type GreetingDashboardTile, type GreetingDashboardTileEmphasis, type HeadToHead, type InjuriesCard, type InjuriesCardData, type InjuryRow, type IntentChipEventData, LIMIT_CODES, type LeaderboardChampion, type LeaderboardPayload, type LeaderboardRow, type LeagueStarResult, type LimitCode, type LimitDetails, LimitError, type LinkRow, type LinksCard, type LinksData, type LiveEventLine, type LiveMonitorBasketball, type LiveMonitorEvent, type LiveMonitorFact, type LiveMonitorMarket, type LiveMonitorMatch, type LiveMonitorSnapshot, type LiveMonitorStatPrice, type LiveMonitorStatRow, type LiveScoreCard, type LiveScoreData, type LiveStatRow, type LiveStatsCard, type LiveStatsData, type LiveTimelineCard, type LiveTimelineData, type MarketOddsBlock, type MarketOddsCard, type MarketOddsCardInsight, type MarketOddsEventData, type MarketOddsLiveBlock, type MarketOddsRow, type MatchState, type MomentumPoint, type MonitorPhase, type MonitorSport, type NbaCoHitEvidence, type NbaCoHitLeg, type NbaGameValue, type NbaInjuryEvent, type NbaInsight, type NbaInsightEventData, type NbaInsightSelection, type NbaJointGame, type NbaLadderEvidence, type NbaLadderRung, type NbaLadderStat, type NbaLineLane, type NbaLineMoveEvidence, type NbaLinePoint, type NbaListedTeammate, type NbaMatchupEvidence, type NbaMatchupPosition, type NbaMatchupTeam, type NbaPropReasonEvidence, type NbaQuarterLadderEvidence, type NbaQuarterRung, type NbaQuarterStat, type NbaSettleLine, type NbaSettlePlayer, type NbaSettleRecapEvidence, type NbaSettleSummary, type NbaSplitRow, type NbaTeammateOutEvidence, type NdjsonParser, NetworkError, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, type PageContext, ParseError, type PinKind, type PinRef, type PlayerPropGame, type PlayerPropPrice, type PlayerPropStat, type PlayerPropsBundle, type PostMatchGoalLine, type PostMatchGoalsCard, type PostMatchGoalsData, type PostMatchNextCard, type PostMatchNextData, type PostMatchResultCard, type PostMatchResultData, type PostMatchStatRow, type PostMatchStatsCard, type PostMatchStatsData, type PostMatchTopPerformerCard, type PostMatchTopPerformerData, type PresetComboCell, type PresetGrid, type PresetGridOptions, type PresetMarketCell, type PresetPick, type PresetSinglesCell, type ProgressEventData, RateLimitError, type ReasonToBetCard, type ReasonToBetData, type RestingFormCard, type RestingFormData, type RestingNextCard, type RestingNextData, type RestingSeasonCard, type RestingSeasonData, type RestingStandingsCard, type RestingStandingsData, SIGNAL_TYPE_CODES, type ScheduleGroup, type ScheduleMatch, type SchedulePayload, type ScheduleSport, type SignalEntityType, type SignalInput, type SignalType, type SlipSelection, type SlipSport, type StatesPayload, StatsWidgetClient, type StatsWidgetClientOptions, type StreamErrorEventData, type SubmitPlayBody, type SubmitPlayResult, type TransferRow, type TransfersCard, type TransfersData, type TurnCompleteEventData, UpstreamError, type UserContext, type WhereToWatchCard, type WhereToWatchData, type WidgetEntityEventName, type WidgetEntityType, type WidgetEventInput, type WidgetEventName, type WidgetLogInput, type WidgetOpenEventInput, type WidgetOpenEventName, type WidgetPopupAskEventInput, type WidgetPopupAskEventName, type WidgetPopupEventInput, type WidgetPopupEventName, WidgetSdkError, type WireEvent, createEventLogger, createNdjsonParser, isAddToSlipResult, isLimitCode, matchKey };
1876
+ export { type ActionButtonEventData, type ActionsLoadingEventData, type AddToSlipHandler, type AddToSlipRejectReason, type AddToSlipResult, type AllTimeRow, type AnswerEventData, AuthError, type AvailableMarket, type BettingInsight, type BettingInsightEventData, type BettingInsightOdds, type ChatCallbacks, type ChatEvent, type ChatGrounding, type ChatHandle, type ChatInput, type ChatPreset, type ClubFanDashboardCard, type ClubFanDashboardHeadToHead, type ClubFanDashboardPayload, type ClubFixture, type ClubFixturesPayload, type ClubMatchLogRow, type ClubNextFixture, type ClubPerformanceMetric, type ClubPlayerAvailability, type ClubPlayerAvailabilityStatus, type ClubPlayerDetailPayload, type ClubPlayerPerformance, type ClubPlayerSeasonStats, type ClubRecordEntry, type ClubRecordsPayload, type ClubSquadPayload, type ClubSquadPlayer, type ClubSquadStatsPayload, type ClubStandingRow, type ClubStandingsPayload, type ComboCard, type ComboCardEventData, type ComboLeg, type ComboReplacedLeg, type CongestedWeekCard, type CongestedWeekData, type CongestedWeekEntry, Conversation, type CountdownCard, type CountdownData, ENTITY_TYPE_CODES, type EntityCard, type EntityCardEventData, type EntityCardScope, type EntityCardStat, type EventBatch, type EventLogger, type EventLoggerOptions, type FetchLike, type FixtureCard, type FixtureCardData, ForbiddenError, type FormAndH2H, type FormMatch, type GameListPayload, type GameResultPayload, type GameStatePayload, type GameSummary, type GreetingDashboard, type GreetingDashboardLayout, type GreetingDashboardSignalRef, type GreetingDashboardSpan, type GreetingDashboardTile, type GreetingDashboardTileEmphasis, type HeadToHead, type InjuriesCard, type InjuriesCardData, type InjuryRow, type IntentChipEventData, LIMIT_CODES, type LeaderboardChampion, type LeaderboardPayload, type LeaderboardRow, type LeagueStarResult, type LimitCode, type LimitDetails, LimitError, type LinkRow, type LinksCard, type LinksData, type LiveEventLine, type LiveMonitorAmericanFootball, type LiveMonitorBasketball, type LiveMonitorEvent, type LiveMonitorFact, type LiveMonitorMarket, type LiveMonitorMatch, type LiveMonitorSnapshot, type LiveMonitorStatPrice, type LiveMonitorStatRow, type LiveScoreCard, type LiveScoreData, type LiveStatRow, type LiveStatsCard, type LiveStatsData, type LiveTimelineCard, type LiveTimelineData, type MarketOddsBlock, type MarketOddsCard, type MarketOddsCardInsight, type MarketOddsEventData, type MarketOddsLiveBlock, type MarketOddsRow, type MatchState, type MomentumPoint, type MonitorPhase, type MonitorSport, type NbaCoHitEvidence, type NbaCoHitLeg, type NbaGameValue, type NbaInjuryEvent, type NbaInsight, type NbaInsightEventData, type NbaInsightSelection, type NbaJointGame, type NbaLadderEvidence, type NbaLadderRung, type NbaLadderStat, type NbaLineLane, type NbaLineMoveEvidence, type NbaLinePoint, type NbaListedTeammate, type NbaMatchupEvidence, type NbaMatchupPosition, type NbaMatchupTeam, type NbaPropReasonEvidence, type NbaQuarterLadderEvidence, type NbaQuarterRung, type NbaQuarterStat, type NbaSettleLine, type NbaSettlePlayer, type NbaSettleRecapEvidence, type NbaSettleSummary, type NbaSplitRow, type NbaTeammateOutEvidence, type NdjsonParser, NetworkError, type NflAtsGame, type NflAtsRecordEvidence, type NflInjuryPlayer, type NflInjuryReportEvidence, type NflInsight, type NflInsightEventData, type NflInsightKind, type NflInsightSelection, type NflLadderEvidence, type NflLadderRung, type NflLineMoveEvidence, type NflLineMoveLane, type NflMatchupEvidence, type NflPropReasonEvidence, type NflPropReasonGame, type NflSettleRecapEvidence, type NflSettleRecapLine, type NflSettleRecapPlayer, type NflSettleRecapSummary, type NonFootballSport, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, type PageContext, ParseError, type PinKind, type PinRef, type PlayerPropGame, type PlayerPropPrice, type PlayerPropStat, type PlayerPropsBundle, type PostMatchGoalLine, type PostMatchGoalsCard, type PostMatchGoalsData, type PostMatchNextCard, type PostMatchNextData, type PostMatchResultCard, type PostMatchResultData, type PostMatchStatRow, type PostMatchStatsCard, type PostMatchStatsData, type PostMatchTopPerformerCard, type PostMatchTopPerformerData, type PresetComboCell, type PresetGrid, type PresetGridOptions, type PresetMarketCell, type PresetPick, type PresetSinglesCell, type ProgressEventData, RateLimitError, type ReasonToBetCard, type ReasonToBetData, type RestingFormCard, type RestingFormData, type RestingNextCard, type RestingNextData, type RestingSeasonCard, type RestingSeasonData, type RestingStandingsCard, type RestingStandingsData, SIGNAL_TYPE_CODES, SPORTS, type ScheduleGroup, type ScheduleMatch, type SchedulePayload, type ScheduleSport, type SignalEntityType, type SignalInput, type SignalType, type SlipSelection, type SlipSport, type SportSpec, type StatesPayload, StatsWidgetClient, type StatsWidgetClientOptions, type StreamErrorEventData, type SubmitPlayBody, type SubmitPlayResult, type TransferRow, type TransfersCard, type TransfersData, type TurnCompleteEventData, UpstreamError, type UserContext, type WhereToWatchCard, type WhereToWatchData, type WidgetEntityEventName, type WidgetEntityType, type WidgetEventInput, type WidgetEventName, type WidgetLogInput, type WidgetOpenEventInput, type WidgetOpenEventName, type WidgetPopupAskEventInput, type WidgetPopupAskEventName, type WidgetPopupEventInput, type WidgetPopupEventName, WidgetSdkError, type WireEvent, createEventLogger, createNdjsonParser, isAddToSlipResult, isLimitCode, matchKey, mayPinOrSlip, slipSportOf, sportOf };
package/dist/index.d.ts CHANGED
@@ -40,6 +40,38 @@ declare class ParseError extends WidgetSdkError {
40
40
  constructor(message?: string, line?: string);
41
41
  }
42
42
 
43
+ interface SportSpec {
44
+ readonly slipPrefix: string;
45
+ readonly monitorPrefix: string;
46
+ readonly label: string;
47
+ readonly slippable: boolean;
48
+ }
49
+ declare const SPORTS: {
50
+ readonly basketball: {
51
+ readonly slipPrefix: "bb:";
52
+ readonly monitorPrefix: "nba:";
53
+ readonly label: "NBA";
54
+ readonly slippable: true;
55
+ };
56
+ readonly americanfootball: {
57
+ readonly slipPrefix: "af:";
58
+ readonly monitorPrefix: "nfl:";
59
+ readonly label: "NFL";
60
+ readonly slippable: true;
61
+ };
62
+ };
63
+ type NonFootballSport = keyof typeof SPORTS;
64
+ /** The sports whose prices can reach an operator slip or a pin: those the map marks slippable. */
65
+ type SlipSport = {
66
+ [K in NonFootballSport]: (typeof SPORTS)[K]['slippable'] extends true ? K : never;
67
+ }[NonFootballSport];
68
+ /** undefined means football: every sport the map does not know is football. */
69
+ declare function sportOf(v: unknown): NonFootballSport | undefined;
70
+ /** True for football (no sport) and for a sport the map marks slippable: the only cases that may pin or slip. */
71
+ declare function mayPinOrSlip(v: unknown): boolean;
72
+ /** The sport when it may take a slip pick or a pin; undefined for football and for a sport that never does. */
73
+ declare function slipSportOf(v: unknown): SlipSport | undefined;
74
+
43
75
  interface ProgressEventData {
44
76
  phase: string;
45
77
  message: string;
@@ -701,6 +733,163 @@ interface NbaInsight {
701
733
  interface NbaInsightEventData {
702
734
  insight: NbaInsight;
703
735
  }
736
+ type NflInsightKind = 'settle_recap' | 'prop_reason' | 'ladder' | 'injury_report' | 'line_move' | 'ats_record' | 'matchup';
737
+ interface NflInsightSelection {
738
+ key: string;
739
+ marketDeveloperName: string;
740
+ selectionLabel: string;
741
+ side: string;
742
+ line?: string | null;
743
+ price: number;
744
+ quotedAtUtc: string;
745
+ matchOddsId?: number | null;
746
+ }
747
+ interface NflPropReasonGame {
748
+ week: number;
749
+ opponent: string;
750
+ value?: number | null;
751
+ result?: string | null;
752
+ }
753
+ interface NflPropReasonEvidence {
754
+ playerId: number;
755
+ playerName: string;
756
+ propType: string;
757
+ line: string;
758
+ hits: number;
759
+ misses: number;
760
+ pushes: number;
761
+ n: number;
762
+ games: NflPropReasonGame[];
763
+ }
764
+ interface NflLadderRung {
765
+ at: string;
766
+ hits: number;
767
+ selectionKey: string;
768
+ }
769
+ interface NflLadderEvidence {
770
+ playerId: number;
771
+ playerName: string;
772
+ propType: string;
773
+ n: number;
774
+ rungs: NflLadderRung[];
775
+ }
776
+ interface NflInjuryPlayer {
777
+ name: string;
778
+ position?: string | null;
779
+ status: string;
780
+ }
781
+ interface NflInjuryReportEvidence {
782
+ teamId: number;
783
+ teamName: string;
784
+ teamAbbr: string;
785
+ opponentAbbr: string;
786
+ players: NflInjuryPlayer[];
787
+ morePlayers: number;
788
+ }
789
+ interface NflLineMoveLane {
790
+ market: string;
791
+ side: string;
792
+ openLine?: string | null;
793
+ openPrice: number;
794
+ openAt: string;
795
+ line?: string | null;
796
+ price: number;
797
+ quotedAtUtc: string;
798
+ }
799
+ interface NflLineMoveEvidence {
800
+ lanes: NflLineMoveLane[];
801
+ }
802
+ interface NflAtsGame {
803
+ week: number;
804
+ opponentAbbr: string;
805
+ spreadLine: string;
806
+ result: string;
807
+ }
808
+ interface NflAtsRecordEvidence {
809
+ teamId: number;
810
+ teamName: string;
811
+ teamAbbr: string;
812
+ finishedGames: number;
813
+ n: number;
814
+ w: number;
815
+ l: number;
816
+ p: number;
817
+ withoutOpening: number;
818
+ games: NflAtsGame[];
819
+ }
820
+ interface NflMatchupEvidence {
821
+ defenseTeamName: string;
822
+ defenseAbbr: string;
823
+ offenseTeamName: string;
824
+ offenseAbbr: string;
825
+ position: string;
826
+ basis: string;
827
+ yardsPerGame: number;
828
+ touchdownsPerGame: number;
829
+ rank: number;
830
+ rankedTeams: number;
831
+ n: number;
832
+ }
833
+ interface NflSettleRecapLine {
834
+ propType: string;
835
+ line?: string | null;
836
+ actual?: number | null;
837
+ result: string;
838
+ }
839
+ interface NflSettleRecapPlayer {
840
+ playerId: number;
841
+ name: string;
842
+ lines: NflSettleRecapLine[];
843
+ }
844
+ interface NflSettleRecapSummary {
845
+ over: number;
846
+ under: number;
847
+ pushes: number;
848
+ yes: number;
849
+ no: number;
850
+ voids: number;
851
+ n: number;
852
+ }
853
+ interface NflSettleRecapEvidence {
854
+ finalScore: string;
855
+ lineBasis: string;
856
+ players: NflSettleRecapPlayer[];
857
+ morePlayers: number;
858
+ summary: NflSettleRecapSummary;
859
+ }
860
+ interface NflInsight {
861
+ insightId: string;
862
+ matchId: number;
863
+ kind: string;
864
+ text: string;
865
+ title: string;
866
+ marketDeveloperName?: string | null;
867
+ marketLabel?: string | null;
868
+ selections: NflInsightSelection[];
869
+ disclaimer?: string | null;
870
+ homeTeamName: string;
871
+ awayTeamName: string;
872
+ homeTeamAbbr: string;
873
+ awayTeamAbbr: string;
874
+ competitionName: string;
875
+ addToSlipEnabled: boolean;
876
+ pinEnabled: boolean;
877
+ kickoffUtc?: string | null;
878
+ kickoffLabel?: string | null;
879
+ quotedAtUtc?: string | null;
880
+ sport: string;
881
+ propReason?: NflPropReasonEvidence | null;
882
+ ladder?: NflLadderEvidence | null;
883
+ injuryReport?: NflInjuryReportEvidence | null;
884
+ lineMove?: NflLineMoveEvidence | null;
885
+ atsRecord?: NflAtsRecordEvidence | null;
886
+ matchup?: NflMatchupEvidence | null;
887
+ settleRecap?: NflSettleRecapEvidence | null;
888
+ [key: string]: unknown;
889
+ }
890
+ interface NflInsightEventData {
891
+ insight: NflInsight;
892
+ }
704
893
  interface MarketOddsRow {
705
894
  selectionLabel: string;
706
895
  side?: string | null;
@@ -738,8 +927,11 @@ interface MarketOddsCard {
738
927
  competitionImagePath?: string | null;
739
928
  /** Server-rendered kickoff chip in the operator's zone + language. Prefer over local formatting of kickoffUtc. */
740
929
  kickoffLabel?: string | null;
741
- /** `basketball` on an NBA game card; absent or null reads as football. */
930
+ /** `basketball` on an NBA game card, `americanfootball` on an NFL one; absent or null reads as football. */
742
931
  sport?: string | null;
932
+ /** Short team names (NFL), drawn as the badge in place of a crest. */
933
+ homeTeamAbbr?: string | null;
934
+ awayTeamAbbr?: string | null;
743
935
  /** The strongest stat for this card's market and fixture, already in the turn's language. */
744
936
  insight?: MarketOddsCardInsight | null;
745
937
  /** Up to 2 stats for this card's exact market, strongest first; insights[0] is always the same
@@ -981,7 +1173,7 @@ interface PinRef {
981
1173
  matchOddsId?: number | null;
982
1174
  withHistory?: boolean;
983
1175
  /** Absent reads as football on the server, so football pins and stored pins stay unchanged. */
984
- sport?: 'basketball';
1176
+ sport?: SlipSport;
985
1177
  }
986
1178
  interface LiveMonitorStatPrice {
987
1179
  marketDeveloperName: string;
@@ -1029,7 +1221,7 @@ interface LiveMonitorFact {
1029
1221
  basis: string;
1030
1222
  market?: LiveMonitorStatPrice | null;
1031
1223
  }
1032
- type MonitorSport = 'football' | 'basketball';
1224
+ type MonitorSport = 'football' | SlipSport;
1033
1225
  /** Basketball block of a followed game. Away is the visitor. */
1034
1226
  interface LiveMonitorBasketball {
1035
1227
  period: number;
@@ -1045,6 +1237,18 @@ interface LiveMonitorBasketball {
1045
1237
  homeTimeoutsLeft?: number | null;
1046
1238
  awayTimeoutsLeft?: number | null;
1047
1239
  }
1240
+ /** American football block of a followed game. Away is the visitor. Period is null before kickoff and after the game. */
1241
+ interface LiveMonitorAmericanFootball {
1242
+ period: number | null;
1243
+ clock: string | null;
1244
+ statusText: string | null;
1245
+ homeAbbreviation: string;
1246
+ awayAbbreviation: string;
1247
+ homeNickname: string;
1248
+ awayNickname: string;
1249
+ homePeriods: (number | null)[];
1250
+ awayPeriods: (number | null)[];
1251
+ }
1048
1252
  interface LiveMonitorMatch {
1049
1253
  matchId: number;
1050
1254
  phase: MonitorPhase;
@@ -1075,6 +1279,8 @@ interface LiveMonitorMatch {
1075
1279
  sport?: MonitorSport;
1076
1280
  /** Set only on a basketball match. */
1077
1281
  basketball?: LiveMonitorBasketball | null;
1282
+ /** Set only on an American football match. */
1283
+ americanFootball?: LiveMonitorAmericanFootball | null;
1078
1284
  [key: string]: unknown;
1079
1285
  }
1080
1286
  interface LiveMonitorMarket {
@@ -1102,7 +1308,7 @@ interface LiveMonitorSnapshot {
1102
1308
  serverNowUtc: string;
1103
1309
  nextPollSeconds: number;
1104
1310
  }
1105
- type ScheduleSport = 'football' | 'basketball';
1311
+ type ScheduleSport = 'football' | 'basketball' | 'americanfootball';
1106
1312
  interface ScheduleMatch {
1107
1313
  matchId: number;
1108
1314
  /** Absent means football. */
@@ -1162,7 +1368,7 @@ interface EventEnvelope<TType extends string, TData> {
1162
1368
  timestamp: string;
1163
1369
  data: TData;
1164
1370
  }
1165
- type ChatEvent = EventEnvelope<'progress', ProgressEventData> | EventEnvelope<'answer', AnswerEventData> | EventEnvelope<'entity_card', EntityCardEventData> | EventEnvelope<'action_button', ActionButtonEventData> | EventEnvelope<'intent_chip', IntentChipEventData> | EventEnvelope<'actions_loading', ActionsLoadingEventData> | EventEnvelope<'turn_complete', TurnCompleteEventData> | EventEnvelope<'betting_insight', BettingInsightEventData> | EventEnvelope<'nba_insight', NbaInsightEventData> | EventEnvelope<'market_odds', MarketOddsEventData> | EventEnvelope<'combo_card', ComboCardEventData> | EventEnvelope<'odds_movement', OddsMovementEventData> | EventEnvelope<'error', StreamErrorEventData>;
1371
+ type ChatEvent = EventEnvelope<'progress', ProgressEventData> | EventEnvelope<'answer', AnswerEventData> | EventEnvelope<'entity_card', EntityCardEventData> | EventEnvelope<'action_button', ActionButtonEventData> | EventEnvelope<'intent_chip', IntentChipEventData> | EventEnvelope<'actions_loading', ActionsLoadingEventData> | EventEnvelope<'turn_complete', TurnCompleteEventData> | EventEnvelope<'betting_insight', BettingInsightEventData> | EventEnvelope<'nba_insight', NbaInsightEventData> | EventEnvelope<'nfl_insight', NflInsightEventData> | EventEnvelope<'market_odds', MarketOddsEventData> | EventEnvelope<'combo_card', ComboCardEventData> | EventEnvelope<'odds_movement', OddsMovementEventData> | EventEnvelope<'error', StreamErrorEventData>;
1166
1372
  interface GameSummary {
1167
1373
  gameId: string;
1168
1374
  gameDay: string;
@@ -1467,7 +1673,7 @@ interface SignalInput {
1467
1673
  /** Zero-based tile position within the dashboard, when it is a dashboard tap. */
1468
1674
  tileIndex?: number;
1469
1675
  }
1470
- type SlipSport = 'basketball';
1676
+
1471
1677
  interface SlipSelection {
1472
1678
  matchOddsId: number;
1473
1679
  matchId: number;
@@ -1529,7 +1735,7 @@ declare class Conversation {
1529
1735
  sendSignal(input: SignalInput): Promise<void>;
1530
1736
  getLiveDashboard(): Promise<ClubFanDashboardPayload | null>;
1531
1737
  getLiveMonitor(pins: PinRef[], locale?: string): Promise<LiveMonitorSnapshot | null>;
1532
- getMarketOdds(matchId: number, marketDeveloperName: string, sport?: 'basketball'): Promise<MarketOddsBlock | null>;
1738
+ getMarketOdds(matchId: number, marketDeveloperName: string, sport?: SlipSport): Promise<MarketOddsBlock | null>;
1533
1739
  getPlayerProps(matchId: number): Promise<PlayerPropsBundle | null>;
1534
1740
  getPricePresets(locale: string, options?: PresetGridOptions): Promise<PresetGrid | null>;
1535
1741
  getSchedule(localDate: string, utcOffsetMinutes: number, operatorUserId?: string, anonymousUserId?: string): Promise<SchedulePayload | null>;
@@ -1667,4 +1873,4 @@ interface NdjsonParser {
1667
1873
  }
1668
1874
  declare function createNdjsonParser(): NdjsonParser;
1669
1875
 
1670
- export { type ActionButtonEventData, type ActionsLoadingEventData, type AddToSlipHandler, type AddToSlipRejectReason, type AddToSlipResult, type AllTimeRow, type AnswerEventData, AuthError, type AvailableMarket, type BettingInsight, type BettingInsightEventData, type BettingInsightOdds, type ChatCallbacks, type ChatEvent, type ChatGrounding, type ChatHandle, type ChatInput, type ChatPreset, type ClubFanDashboardCard, type ClubFanDashboardHeadToHead, type ClubFanDashboardPayload, type ClubFixture, type ClubFixturesPayload, type ClubMatchLogRow, type ClubNextFixture, type ClubPerformanceMetric, type ClubPlayerAvailability, type ClubPlayerAvailabilityStatus, type ClubPlayerDetailPayload, type ClubPlayerPerformance, type ClubPlayerSeasonStats, type ClubRecordEntry, type ClubRecordsPayload, type ClubSquadPayload, type ClubSquadPlayer, type ClubSquadStatsPayload, type ClubStandingRow, type ClubStandingsPayload, type ComboCard, type ComboCardEventData, type ComboLeg, type ComboReplacedLeg, type CongestedWeekCard, type CongestedWeekData, type CongestedWeekEntry, Conversation, type CountdownCard, type CountdownData, ENTITY_TYPE_CODES, type EntityCard, type EntityCardEventData, type EntityCardScope, type EntityCardStat, type EventBatch, type EventLogger, type EventLoggerOptions, type FetchLike, type FixtureCard, type FixtureCardData, ForbiddenError, type FormAndH2H, type FormMatch, type GameListPayload, type GameResultPayload, type GameStatePayload, type GameSummary, type GreetingDashboard, type GreetingDashboardLayout, type GreetingDashboardSignalRef, type GreetingDashboardSpan, type GreetingDashboardTile, type GreetingDashboardTileEmphasis, type HeadToHead, type InjuriesCard, type InjuriesCardData, type InjuryRow, type IntentChipEventData, LIMIT_CODES, type LeaderboardChampion, type LeaderboardPayload, type LeaderboardRow, type LeagueStarResult, type LimitCode, type LimitDetails, LimitError, type LinkRow, type LinksCard, type LinksData, type LiveEventLine, type LiveMonitorBasketball, type LiveMonitorEvent, type LiveMonitorFact, type LiveMonitorMarket, type LiveMonitorMatch, type LiveMonitorSnapshot, type LiveMonitorStatPrice, type LiveMonitorStatRow, type LiveScoreCard, type LiveScoreData, type LiveStatRow, type LiveStatsCard, type LiveStatsData, type LiveTimelineCard, type LiveTimelineData, type MarketOddsBlock, type MarketOddsCard, type MarketOddsCardInsight, type MarketOddsEventData, type MarketOddsLiveBlock, type MarketOddsRow, type MatchState, type MomentumPoint, type MonitorPhase, type MonitorSport, type NbaCoHitEvidence, type NbaCoHitLeg, type NbaGameValue, type NbaInjuryEvent, type NbaInsight, type NbaInsightEventData, type NbaInsightSelection, type NbaJointGame, type NbaLadderEvidence, type NbaLadderRung, type NbaLadderStat, type NbaLineLane, type NbaLineMoveEvidence, type NbaLinePoint, type NbaListedTeammate, type NbaMatchupEvidence, type NbaMatchupPosition, type NbaMatchupTeam, type NbaPropReasonEvidence, type NbaQuarterLadderEvidence, type NbaQuarterRung, type NbaQuarterStat, type NbaSettleLine, type NbaSettlePlayer, type NbaSettleRecapEvidence, type NbaSettleSummary, type NbaSplitRow, type NbaTeammateOutEvidence, type NdjsonParser, NetworkError, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, type PageContext, ParseError, type PinKind, type PinRef, type PlayerPropGame, type PlayerPropPrice, type PlayerPropStat, type PlayerPropsBundle, type PostMatchGoalLine, type PostMatchGoalsCard, type PostMatchGoalsData, type PostMatchNextCard, type PostMatchNextData, type PostMatchResultCard, type PostMatchResultData, type PostMatchStatRow, type PostMatchStatsCard, type PostMatchStatsData, type PostMatchTopPerformerCard, type PostMatchTopPerformerData, type PresetComboCell, type PresetGrid, type PresetGridOptions, type PresetMarketCell, type PresetPick, type PresetSinglesCell, type ProgressEventData, RateLimitError, type ReasonToBetCard, type ReasonToBetData, type RestingFormCard, type RestingFormData, type RestingNextCard, type RestingNextData, type RestingSeasonCard, type RestingSeasonData, type RestingStandingsCard, type RestingStandingsData, SIGNAL_TYPE_CODES, type ScheduleGroup, type ScheduleMatch, type SchedulePayload, type ScheduleSport, type SignalEntityType, type SignalInput, type SignalType, type SlipSelection, type SlipSport, type StatesPayload, StatsWidgetClient, type StatsWidgetClientOptions, type StreamErrorEventData, type SubmitPlayBody, type SubmitPlayResult, type TransferRow, type TransfersCard, type TransfersData, type TurnCompleteEventData, UpstreamError, type UserContext, type WhereToWatchCard, type WhereToWatchData, type WidgetEntityEventName, type WidgetEntityType, type WidgetEventInput, type WidgetEventName, type WidgetLogInput, type WidgetOpenEventInput, type WidgetOpenEventName, type WidgetPopupAskEventInput, type WidgetPopupAskEventName, type WidgetPopupEventInput, type WidgetPopupEventName, WidgetSdkError, type WireEvent, createEventLogger, createNdjsonParser, isAddToSlipResult, isLimitCode, matchKey };
1876
+ export { type ActionButtonEventData, type ActionsLoadingEventData, type AddToSlipHandler, type AddToSlipRejectReason, type AddToSlipResult, type AllTimeRow, type AnswerEventData, AuthError, type AvailableMarket, type BettingInsight, type BettingInsightEventData, type BettingInsightOdds, type ChatCallbacks, type ChatEvent, type ChatGrounding, type ChatHandle, type ChatInput, type ChatPreset, type ClubFanDashboardCard, type ClubFanDashboardHeadToHead, type ClubFanDashboardPayload, type ClubFixture, type ClubFixturesPayload, type ClubMatchLogRow, type ClubNextFixture, type ClubPerformanceMetric, type ClubPlayerAvailability, type ClubPlayerAvailabilityStatus, type ClubPlayerDetailPayload, type ClubPlayerPerformance, type ClubPlayerSeasonStats, type ClubRecordEntry, type ClubRecordsPayload, type ClubSquadPayload, type ClubSquadPlayer, type ClubSquadStatsPayload, type ClubStandingRow, type ClubStandingsPayload, type ComboCard, type ComboCardEventData, type ComboLeg, type ComboReplacedLeg, type CongestedWeekCard, type CongestedWeekData, type CongestedWeekEntry, Conversation, type CountdownCard, type CountdownData, ENTITY_TYPE_CODES, type EntityCard, type EntityCardEventData, type EntityCardScope, type EntityCardStat, type EventBatch, type EventLogger, type EventLoggerOptions, type FetchLike, type FixtureCard, type FixtureCardData, ForbiddenError, type FormAndH2H, type FormMatch, type GameListPayload, type GameResultPayload, type GameStatePayload, type GameSummary, type GreetingDashboard, type GreetingDashboardLayout, type GreetingDashboardSignalRef, type GreetingDashboardSpan, type GreetingDashboardTile, type GreetingDashboardTileEmphasis, type HeadToHead, type InjuriesCard, type InjuriesCardData, type InjuryRow, type IntentChipEventData, LIMIT_CODES, type LeaderboardChampion, type LeaderboardPayload, type LeaderboardRow, type LeagueStarResult, type LimitCode, type LimitDetails, LimitError, type LinkRow, type LinksCard, type LinksData, type LiveEventLine, type LiveMonitorAmericanFootball, type LiveMonitorBasketball, type LiveMonitorEvent, type LiveMonitorFact, type LiveMonitorMarket, type LiveMonitorMatch, type LiveMonitorSnapshot, type LiveMonitorStatPrice, type LiveMonitorStatRow, type LiveScoreCard, type LiveScoreData, type LiveStatRow, type LiveStatsCard, type LiveStatsData, type LiveTimelineCard, type LiveTimelineData, type MarketOddsBlock, type MarketOddsCard, type MarketOddsCardInsight, type MarketOddsEventData, type MarketOddsLiveBlock, type MarketOddsRow, type MatchState, type MomentumPoint, type MonitorPhase, type MonitorSport, type NbaCoHitEvidence, type NbaCoHitLeg, type NbaGameValue, type NbaInjuryEvent, type NbaInsight, type NbaInsightEventData, type NbaInsightSelection, type NbaJointGame, type NbaLadderEvidence, type NbaLadderRung, type NbaLadderStat, type NbaLineLane, type NbaLineMoveEvidence, type NbaLinePoint, type NbaListedTeammate, type NbaMatchupEvidence, type NbaMatchupPosition, type NbaMatchupTeam, type NbaPropReasonEvidence, type NbaQuarterLadderEvidence, type NbaQuarterRung, type NbaQuarterStat, type NbaSettleLine, type NbaSettlePlayer, type NbaSettleRecapEvidence, type NbaSettleSummary, type NbaSplitRow, type NbaTeammateOutEvidence, type NdjsonParser, NetworkError, type NflAtsGame, type NflAtsRecordEvidence, type NflInjuryPlayer, type NflInjuryReportEvidence, type NflInsight, type NflInsightEventData, type NflInsightKind, type NflInsightSelection, type NflLadderEvidence, type NflLadderRung, type NflLineMoveEvidence, type NflLineMoveLane, type NflMatchupEvidence, type NflPropReasonEvidence, type NflPropReasonGame, type NflSettleRecapEvidence, type NflSettleRecapLine, type NflSettleRecapPlayer, type NflSettleRecapSummary, type NonFootballSport, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, type PageContext, ParseError, type PinKind, type PinRef, type PlayerPropGame, type PlayerPropPrice, type PlayerPropStat, type PlayerPropsBundle, type PostMatchGoalLine, type PostMatchGoalsCard, type PostMatchGoalsData, type PostMatchNextCard, type PostMatchNextData, type PostMatchResultCard, type PostMatchResultData, type PostMatchStatRow, type PostMatchStatsCard, type PostMatchStatsData, type PostMatchTopPerformerCard, type PostMatchTopPerformerData, type PresetComboCell, type PresetGrid, type PresetGridOptions, type PresetMarketCell, type PresetPick, type PresetSinglesCell, type ProgressEventData, RateLimitError, type ReasonToBetCard, type ReasonToBetData, type RestingFormCard, type RestingFormData, type RestingNextCard, type RestingNextData, type RestingSeasonCard, type RestingSeasonData, type RestingStandingsCard, type RestingStandingsData, SIGNAL_TYPE_CODES, SPORTS, type ScheduleGroup, type ScheduleMatch, type SchedulePayload, type ScheduleSport, type SignalEntityType, type SignalInput, type SignalType, type SlipSelection, type SlipSport, type SportSpec, type StatesPayload, StatsWidgetClient, type StatsWidgetClientOptions, type StreamErrorEventData, type SubmitPlayBody, type SubmitPlayResult, type TransferRow, type TransfersCard, type TransfersData, type TurnCompleteEventData, UpstreamError, type UserContext, type WhereToWatchCard, type WhereToWatchData, type WidgetEntityEventName, type WidgetEntityType, type WidgetEventInput, type WidgetEventName, type WidgetLogInput, type WidgetOpenEventInput, type WidgetOpenEventName, type WidgetPopupAskEventInput, type WidgetPopupAskEventName, type WidgetPopupEventInput, type WidgetPopupEventName, WidgetSdkError, type WireEvent, createEventLogger, createNdjsonParser, isAddToSlipResult, isLimitCode, matchKey, mayPinOrSlip, slipSportOf, sportOf };
package/dist/index.js CHANGED
@@ -742,6 +742,23 @@ function isAddToSlipResult(v) {
742
742
  return false;
743
743
  }
744
744
  }
745
+
746
+ // src/sports.ts
747
+ var SPORTS = {
748
+ basketball: { slipPrefix: "bb:", monitorPrefix: "nba:", label: "NBA", slippable: true },
749
+ americanfootball: { slipPrefix: "af:", monitorPrefix: "nfl:", label: "NFL", slippable: true }
750
+ };
751
+ function sportOf(v) {
752
+ return typeof v === "string" && Object.prototype.hasOwnProperty.call(SPORTS, v) ? v : void 0;
753
+ }
754
+ function mayPinOrSlip(v) {
755
+ const sport = sportOf(v);
756
+ return sport === void 0 || SPORTS[sport].slippable;
757
+ }
758
+ function slipSportOf(v) {
759
+ const sport = sportOf(v);
760
+ return sport !== void 0 && SPORTS[sport].slippable ? sport : void 0;
761
+ }
745
762
  export {
746
763
  AuthError,
747
764
  Conversation,
@@ -753,6 +770,7 @@ export {
753
770
  ParseError,
754
771
  RateLimitError,
755
772
  SIGNAL_TYPE_CODES,
773
+ SPORTS,
756
774
  StatsWidgetClient,
757
775
  UpstreamError,
758
776
  WidgetSdkError,
@@ -760,6 +778,9 @@ export {
760
778
  createNdjsonParser,
761
779
  isAddToSlipResult,
762
780
  isLimitCode,
763
- matchKey
781
+ matchKey,
782
+ mayPinOrSlip,
783
+ slipSportOf,
784
+ sportOf
764
785
  };
765
786
  //# sourceMappingURL=index.js.map