@sensiblestats/widget-sdk 0.77.0 → 0.78.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/CHANGELOG.md +8 -0
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -2
- package/dist/index.d.ts +55 -2
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -131,14 +131,29 @@ interface GreetingDashboardSignalRef {
|
|
|
131
131
|
entityType: string;
|
|
132
132
|
entityId: string;
|
|
133
133
|
}
|
|
134
|
+
interface OddsForms {
|
|
135
|
+
decimal: string;
|
|
136
|
+
american?: string;
|
|
137
|
+
fractional?: string;
|
|
138
|
+
}
|
|
139
|
+
interface PriceOption {
|
|
140
|
+
key: string;
|
|
141
|
+
value: number;
|
|
142
|
+
formats: OddsForms;
|
|
143
|
+
}
|
|
134
144
|
interface GreetingDashboardTile {
|
|
135
145
|
icon: string;
|
|
136
146
|
title: string;
|
|
147
|
+
titleFormats?: OddsForms | null;
|
|
137
148
|
subtitle?: string | null;
|
|
149
|
+
subtitleFormats?: OddsForms | null;
|
|
138
150
|
span: GreetingDashboardSpan;
|
|
139
151
|
badgeText?: string | null;
|
|
152
|
+
badgeFormats?: OddsForms | null;
|
|
140
153
|
imageUrls?: string[] | null;
|
|
141
154
|
actionValue: string;
|
|
155
|
+
actionValueFormats?: OddsForms | null;
|
|
156
|
+
priceFormats?: OddsForms | null;
|
|
142
157
|
actionRef?: string | null;
|
|
143
158
|
signal: GreetingDashboardSignalRef;
|
|
144
159
|
/** "hero": the personalized lead tile (always full width). Older servers omit it. */
|
|
@@ -254,6 +269,7 @@ interface GreetingBuilderPreset {
|
|
|
254
269
|
matchIds: string[];
|
|
255
270
|
legs: number;
|
|
256
271
|
totalTarget: string;
|
|
272
|
+
totalOptions: PriceOption[];
|
|
257
273
|
/** The visitor's usual market first, then pack order. Absent from older servers; never empty when present. */
|
|
258
274
|
marketOptions?: GreetingMarketOption[];
|
|
259
275
|
/** Option ids: 'all' (matchIds [] means widen), 'teams', 'leagues', 'learned', 'league:<id>', 'game:<id>'. Absent from older servers. */
|
|
@@ -671,12 +687,14 @@ interface StreamErrorEventData {
|
|
|
671
687
|
}
|
|
672
688
|
interface BettingInsightOdds {
|
|
673
689
|
value: number;
|
|
690
|
+
valueFormats: OddsForms;
|
|
674
691
|
bookmakerId?: number;
|
|
675
692
|
bookmakerName?: string;
|
|
676
693
|
quotedAtUtc?: string;
|
|
677
694
|
isLive?: boolean;
|
|
678
695
|
matchOddsId?: number;
|
|
679
696
|
previousValue?: number | null;
|
|
697
|
+
previousValueFormats?: OddsForms | null;
|
|
680
698
|
previousValueAtUtc?: string | null;
|
|
681
699
|
movementDirection?: 'shortened' | 'drifted' | null;
|
|
682
700
|
}
|
|
@@ -718,6 +736,7 @@ interface NbaInsightSelection {
|
|
|
718
736
|
side?: string | null;
|
|
719
737
|
line?: string | null;
|
|
720
738
|
price: number;
|
|
739
|
+
priceFormats: OddsForms;
|
|
721
740
|
quotedAtUtc: string;
|
|
722
741
|
matchOddsId?: number | null;
|
|
723
742
|
}
|
|
@@ -751,7 +770,9 @@ interface NbaLinePoint {
|
|
|
751
770
|
atUtc: string;
|
|
752
771
|
line: string;
|
|
753
772
|
price: number;
|
|
773
|
+
priceFormats: OddsForms;
|
|
754
774
|
text: string;
|
|
775
|
+
textFormats: OddsForms;
|
|
755
776
|
}
|
|
756
777
|
interface NbaLineLane {
|
|
757
778
|
points: NbaLinePoint[];
|
|
@@ -823,7 +844,9 @@ interface NbaLadderStat {
|
|
|
823
844
|
stat: string;
|
|
824
845
|
mainLine?: string | null;
|
|
825
846
|
overPrice?: number | null;
|
|
847
|
+
overPriceFormats?: OddsForms | null;
|
|
826
848
|
underPrice?: number | null;
|
|
849
|
+
underPriceFormats?: OddsForms | null;
|
|
827
850
|
rungs: NbaLadderRung[];
|
|
828
851
|
}
|
|
829
852
|
interface NbaLadderEvidence {
|
|
@@ -944,6 +967,7 @@ interface NflInsightSelection {
|
|
|
944
967
|
side: string;
|
|
945
968
|
line?: string | null;
|
|
946
969
|
price: number;
|
|
970
|
+
priceFormats: OddsForms;
|
|
947
971
|
quotedAtUtc: string;
|
|
948
972
|
matchOddsId?: number | null;
|
|
949
973
|
}
|
|
@@ -994,9 +1018,11 @@ interface NflLineMoveLane {
|
|
|
994
1018
|
side: string;
|
|
995
1019
|
openLine?: string | null;
|
|
996
1020
|
openPrice: number;
|
|
1021
|
+
openPriceFormats: OddsForms;
|
|
997
1022
|
openAt: string;
|
|
998
1023
|
line?: string | null;
|
|
999
1024
|
price: number;
|
|
1025
|
+
priceFormats: OddsForms;
|
|
1000
1026
|
quotedAtUtc: string;
|
|
1001
1027
|
}
|
|
1002
1028
|
interface NflLineMoveEvidence {
|
|
@@ -1098,6 +1124,7 @@ interface MarketOddsRow {
|
|
|
1098
1124
|
side?: string | null;
|
|
1099
1125
|
line?: string | null;
|
|
1100
1126
|
price: number;
|
|
1127
|
+
priceFormats: OddsForms;
|
|
1101
1128
|
bookmakerId?: number;
|
|
1102
1129
|
bookmakerName?: string | null;
|
|
1103
1130
|
isLive?: boolean;
|
|
@@ -1109,6 +1136,7 @@ interface MarketOddsRow {
|
|
|
1109
1136
|
/** The selection text exactly as the visitor should read it. Present only when it differs from `selectionLabel` + `line`, which the slip keeps getting raw. */
|
|
1110
1137
|
displayLabel?: string | null;
|
|
1111
1138
|
previousPrice?: number | null;
|
|
1139
|
+
previousPriceFormats?: OddsForms | null;
|
|
1112
1140
|
previousPriceAtUtc?: string | null;
|
|
1113
1141
|
movementDirection?: 'shortened' | 'drifted' | null;
|
|
1114
1142
|
movementLookbackHours?: number | null;
|
|
@@ -1189,6 +1217,7 @@ interface ComboLeg {
|
|
|
1189
1217
|
side?: string | null;
|
|
1190
1218
|
line?: string | null;
|
|
1191
1219
|
price: number;
|
|
1220
|
+
priceFormats: OddsForms;
|
|
1192
1221
|
matchOddsId: number;
|
|
1193
1222
|
bookmakerId: number;
|
|
1194
1223
|
quotedAtUtc: string;
|
|
@@ -1215,11 +1244,13 @@ interface ComboCard {
|
|
|
1215
1244
|
comboId: string;
|
|
1216
1245
|
kind: 'around' | 'at_least';
|
|
1217
1246
|
target: number;
|
|
1247
|
+
targetFormats: OddsForms;
|
|
1218
1248
|
legCount: number;
|
|
1219
1249
|
/** In kickoff order. */
|
|
1220
1250
|
legs: ComboLeg[];
|
|
1221
1251
|
/** Product of leg prices, rounded half-away-from-zero to 2 dp. */
|
|
1222
1252
|
total: number;
|
|
1253
|
+
totalFormats: OddsForms;
|
|
1223
1254
|
/** "1.57 × 2.20 × 1.44 = 4.97", prices with 2 dp, "×" is U+00D7. */
|
|
1224
1255
|
multiplication: string;
|
|
1225
1256
|
/** R12: legs swapped out since the tile was built; usually empty. */
|
|
@@ -1239,6 +1270,7 @@ type PresetPick = ComboLeg;
|
|
|
1239
1270
|
interface PresetSinglesCell {
|
|
1240
1271
|
/** The limit: the max for `singles`, the floor for `singlesFrom`. */
|
|
1241
1272
|
price: number;
|
|
1273
|
+
priceFormats: OddsForms;
|
|
1242
1274
|
count: number;
|
|
1243
1275
|
/** Exactly `count` picks, one per match, in kickoff order. */
|
|
1244
1276
|
picks: PresetPick[];
|
|
@@ -1246,12 +1278,14 @@ interface PresetSinglesCell {
|
|
|
1246
1278
|
interface PresetComboCell {
|
|
1247
1279
|
/** The asked target, e.g. 5.0. */
|
|
1248
1280
|
total: number;
|
|
1281
|
+
totalFormats: OddsForms;
|
|
1249
1282
|
/** The asked leg count. */
|
|
1250
1283
|
legs: number;
|
|
1251
1284
|
combo: {
|
|
1252
1285
|
comboId: string;
|
|
1253
1286
|
/** The built product, 2 dp. */
|
|
1254
1287
|
total: number;
|
|
1288
|
+
totalFormats: OddsForms;
|
|
1255
1289
|
/** "1.57 × 2.20 × 1.44 = 4.97", as ComboCard.multiplication. */
|
|
1256
1290
|
multiplication: string;
|
|
1257
1291
|
/** In kickoff order. */
|
|
@@ -1278,6 +1312,9 @@ interface PresetGrid {
|
|
|
1278
1312
|
singles: PresetSinglesCell[];
|
|
1279
1313
|
singlesFrom: PresetSinglesCell[];
|
|
1280
1314
|
combos: PresetComboCell[];
|
|
1315
|
+
limitOptions: PriceOption[];
|
|
1316
|
+
floorOptions: PriceOption[];
|
|
1317
|
+
totalOptions: PriceOption[];
|
|
1281
1318
|
/** Tier-1 by-market rows, open grid only. Absent (or empty) on non-open grids and when no tier-1 markets have picks. */
|
|
1282
1319
|
markets?: PresetMarketCell[];
|
|
1283
1320
|
[key: string]: unknown;
|
|
@@ -1291,6 +1328,7 @@ interface BuilderGridPayload {
|
|
|
1291
1328
|
totalTarget: string;
|
|
1292
1329
|
widened: boolean;
|
|
1293
1330
|
total: number | null;
|
|
1331
|
+
totalFormats: OddsForms | null;
|
|
1294
1332
|
multiplication: string | null;
|
|
1295
1333
|
legs: ComboLeg[];
|
|
1296
1334
|
legCountThatLands: number | null;
|
|
@@ -1356,6 +1394,7 @@ interface PlayerPropPrice {
|
|
|
1356
1394
|
label: string;
|
|
1357
1395
|
line: number | null;
|
|
1358
1396
|
price: number;
|
|
1397
|
+
priceFormats: OddsForms;
|
|
1359
1398
|
quotedAtUtc: string;
|
|
1360
1399
|
/** Games in the sample that cleared this price. NFL only. */
|
|
1361
1400
|
hits?: number | null;
|
|
@@ -1434,6 +1473,7 @@ interface PlayerPropsBundle {
|
|
|
1434
1473
|
interface OddsMovementPoint {
|
|
1435
1474
|
atUtc?: string | null;
|
|
1436
1475
|
price?: number | null;
|
|
1476
|
+
priceFormats: OddsForms;
|
|
1437
1477
|
}
|
|
1438
1478
|
interface OddsMovementCard {
|
|
1439
1479
|
matchId: number;
|
|
@@ -1449,7 +1489,9 @@ interface OddsMovementCard {
|
|
|
1449
1489
|
bookmakerId?: number;
|
|
1450
1490
|
bookmakerName?: string | null;
|
|
1451
1491
|
openingPrice?: number;
|
|
1492
|
+
openingPriceFormats: OddsForms;
|
|
1452
1493
|
currentPrice?: number;
|
|
1494
|
+
currentPriceFormats: OddsForms;
|
|
1453
1495
|
movementDirection?: 'shortened' | 'drifted' | null;
|
|
1454
1496
|
windowHours?: number;
|
|
1455
1497
|
points?: OddsMovementPoint[];
|
|
@@ -1485,6 +1527,7 @@ interface LiveMonitorStatPrice {
|
|
|
1485
1527
|
marketLabel: string;
|
|
1486
1528
|
selectionLabel: string;
|
|
1487
1529
|
price?: number | null;
|
|
1530
|
+
priceFormats?: OddsForms | null;
|
|
1488
1531
|
matchOddsId?: number | null;
|
|
1489
1532
|
isSuspended: boolean;
|
|
1490
1533
|
addToSlipEnabled: boolean;
|
|
@@ -1907,10 +1950,15 @@ interface StatsWidgetClientOptions {
|
|
|
1907
1950
|
/** Sent as X-SS-Client; set by widget-react. */
|
|
1908
1951
|
client?: string;
|
|
1909
1952
|
}
|
|
1953
|
+
type OddsFormat = 'decimal' | 'american' | 'fractional';
|
|
1954
|
+
interface WidgetSettings {
|
|
1955
|
+
oddsOffered: boolean;
|
|
1956
|
+
}
|
|
1910
1957
|
interface UserContext {
|
|
1911
1958
|
operatorUserId?: string;
|
|
1912
1959
|
defaultLanguage?: string;
|
|
1913
1960
|
anonymousUserId?: string;
|
|
1961
|
+
oddsFormat?: OddsFormat;
|
|
1914
1962
|
}
|
|
1915
1963
|
interface ChatGrounding {
|
|
1916
1964
|
kind?: string;
|
|
@@ -1989,6 +2037,10 @@ interface SlipSelection {
|
|
|
1989
2037
|
matchOddsId: number;
|
|
1990
2038
|
matchId: number;
|
|
1991
2039
|
oddsDecimal: number;
|
|
2040
|
+
odds?: {
|
|
2041
|
+
format: OddsFormat;
|
|
2042
|
+
text: string;
|
|
2043
|
+
};
|
|
1992
2044
|
quotedAtUtc?: string;
|
|
1993
2045
|
insightId?: string;
|
|
1994
2046
|
conversationId?: string;
|
|
@@ -2005,7 +2057,7 @@ type AddToSlipResult = {
|
|
|
2005
2057
|
status: 'duplicate';
|
|
2006
2058
|
} | {
|
|
2007
2059
|
status: 'price_changed';
|
|
2008
|
-
|
|
2060
|
+
newOdds: string;
|
|
2009
2061
|
accepted: boolean;
|
|
2010
2062
|
} | {
|
|
2011
2063
|
status: 'rejected';
|
|
@@ -2044,6 +2096,7 @@ declare class Conversation {
|
|
|
2044
2096
|
constructor(cfg: ResolvedConfig, context?: UserContext | undefined);
|
|
2045
2097
|
send(input: ChatInput, callbacks?: ChatCallbacks): ChatHandle;
|
|
2046
2098
|
sendSignal(input: SignalInput): Promise<void>;
|
|
2099
|
+
getWidgetSettings(): Promise<WidgetSettings>;
|
|
2047
2100
|
getLiveDashboard(): Promise<ClubFanDashboardPayload | null>;
|
|
2048
2101
|
getLiveMonitor(pins: PinRef[], locale?: string): Promise<LiveMonitorSnapshot | null>;
|
|
2049
2102
|
getMarketOdds(matchId: number, marketDeveloperName: string, sport?: SlipSport): Promise<MarketOddsBlock | null>;
|
|
@@ -2323,4 +2376,4 @@ type WidgetTrackingEventName = WidgetTrackingEvent['name'];
|
|
|
2323
2376
|
type WidgetTrackingBody = WidgetTrackingEventBody;
|
|
2324
2377
|
type WidgetTrackingHandler = (event: WidgetTrackingEvent) => void | Promise<void>;
|
|
2325
2378
|
|
|
2326
|
-
export { type ActionButtonEventData, type ActionsLoadingEventData, type AddToSlipHandler, type AddToSlipOutcome, type AddToSlipRejectReason, type AddToSlipResult, type AllTimeRow, type AnswerEventData, AuthError, type AvailableMarket, type BettingInsight, type BettingInsightEventData, type BettingInsightOdds, type BuilderGridPayload, type BuilderGridRequest, type BuilderGridStatus, 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 ComboAddMetadata, 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 FavouriteEntity, type FavouriteKind, type FavouriteStarResponse, type FavouriteStarResult, type FavouritesNoIdentity, type FavouritesPayload, type FetchLike, type FixtureCard, type FixtureCardData, ForbiddenError, type FormAndH2H, type FormMatch, type GameListPayload, type GameResultPayload, type GameStatePayload, type GameSummary, type GreetingBuilderPreset, type GreetingDashboard, type GreetingDashboardLayout, type GreetingDashboardSet, type GreetingDashboardSignalRef, type GreetingDashboardSpan, type GreetingDashboardTile, type GreetingDashboardTileEmphasis, type GreetingEntityChip, type GreetingEntityKind, type GreetingFact, type GreetingFactReference, type GreetingFormResult, type GreetingGameFacts, type GreetingGamesOption, type GreetingGamesScope, type GreetingIdleTeam, type GreetingInjury, type GreetingMarketOption, type GreetingPersonalSection, type GreetingPersonalTier, type GreetingPlayerCard, type GreetingPlayerHit, type GreetingPlayerStatus, type GreetingSetChip, type GreetingTeamCard, 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 NflForm, type NflFormGame, 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 PlayerPropFact, type PlayerPropGame, type PlayerPropPrice, type PlayerPropStat, type PlayerPropStatGame, 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, type QualifiedType, type QuestionSource, 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 WidgetSportSwitchEventInput, type WidgetSportSwitchEventName, type WidgetTrackingBody, type WidgetTrackingEnvelope, type WidgetTrackingEvent, type WidgetTrackingEventName, type WidgetTrackingHandler, type WidgetTrackingTab, type WireEvent, type WireSport, createEventLogger, createNdjsonParser, fromWireSport, isAddToSlipResult, isLimitCode, matchKey, mayPinOrSlip, qualifiedId, slipSportOf, sportOf, toWireSport };
|
|
2379
|
+
export { type ActionButtonEventData, type ActionsLoadingEventData, type AddToSlipHandler, type AddToSlipOutcome, type AddToSlipRejectReason, type AddToSlipResult, type AllTimeRow, type AnswerEventData, AuthError, type AvailableMarket, type BettingInsight, type BettingInsightEventData, type BettingInsightOdds, type BuilderGridPayload, type BuilderGridRequest, type BuilderGridStatus, 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 ComboAddMetadata, 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 FavouriteEntity, type FavouriteKind, type FavouriteStarResponse, type FavouriteStarResult, type FavouritesNoIdentity, type FavouritesPayload, type FetchLike, type FixtureCard, type FixtureCardData, ForbiddenError, type FormAndH2H, type FormMatch, type GameListPayload, type GameResultPayload, type GameStatePayload, type GameSummary, type GreetingBuilderPreset, type GreetingDashboard, type GreetingDashboardLayout, type GreetingDashboardSet, type GreetingDashboardSignalRef, type GreetingDashboardSpan, type GreetingDashboardTile, type GreetingDashboardTileEmphasis, type GreetingEntityChip, type GreetingEntityKind, type GreetingFact, type GreetingFactReference, type GreetingFormResult, type GreetingGameFacts, type GreetingGamesOption, type GreetingGamesScope, type GreetingIdleTeam, type GreetingInjury, type GreetingMarketOption, type GreetingPersonalSection, type GreetingPersonalTier, type GreetingPlayerCard, type GreetingPlayerHit, type GreetingPlayerStatus, type GreetingSetChip, type GreetingTeamCard, 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 NflForm, type NflFormGame, 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 OddsFormat, type OddsForms, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, type PageContext, ParseError, type PinKind, type PinRef, type PlayerPropFact, type PlayerPropGame, type PlayerPropPrice, type PlayerPropStat, type PlayerPropStatGame, 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 PriceOption, type ProgressEventData, type QualifiedType, type QuestionSource, 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 WidgetSettings, type WidgetSportSwitchEventInput, type WidgetSportSwitchEventName, type WidgetTrackingBody, type WidgetTrackingEnvelope, type WidgetTrackingEvent, type WidgetTrackingEventName, type WidgetTrackingHandler, type WidgetTrackingTab, type WireEvent, type WireSport, createEventLogger, createNdjsonParser, fromWireSport, isAddToSlipResult, isLimitCode, matchKey, mayPinOrSlip, qualifiedId, slipSportOf, sportOf, toWireSport };
|
package/dist/index.d.ts
CHANGED
|
@@ -131,14 +131,29 @@ interface GreetingDashboardSignalRef {
|
|
|
131
131
|
entityType: string;
|
|
132
132
|
entityId: string;
|
|
133
133
|
}
|
|
134
|
+
interface OddsForms {
|
|
135
|
+
decimal: string;
|
|
136
|
+
american?: string;
|
|
137
|
+
fractional?: string;
|
|
138
|
+
}
|
|
139
|
+
interface PriceOption {
|
|
140
|
+
key: string;
|
|
141
|
+
value: number;
|
|
142
|
+
formats: OddsForms;
|
|
143
|
+
}
|
|
134
144
|
interface GreetingDashboardTile {
|
|
135
145
|
icon: string;
|
|
136
146
|
title: string;
|
|
147
|
+
titleFormats?: OddsForms | null;
|
|
137
148
|
subtitle?: string | null;
|
|
149
|
+
subtitleFormats?: OddsForms | null;
|
|
138
150
|
span: GreetingDashboardSpan;
|
|
139
151
|
badgeText?: string | null;
|
|
152
|
+
badgeFormats?: OddsForms | null;
|
|
140
153
|
imageUrls?: string[] | null;
|
|
141
154
|
actionValue: string;
|
|
155
|
+
actionValueFormats?: OddsForms | null;
|
|
156
|
+
priceFormats?: OddsForms | null;
|
|
142
157
|
actionRef?: string | null;
|
|
143
158
|
signal: GreetingDashboardSignalRef;
|
|
144
159
|
/** "hero": the personalized lead tile (always full width). Older servers omit it. */
|
|
@@ -254,6 +269,7 @@ interface GreetingBuilderPreset {
|
|
|
254
269
|
matchIds: string[];
|
|
255
270
|
legs: number;
|
|
256
271
|
totalTarget: string;
|
|
272
|
+
totalOptions: PriceOption[];
|
|
257
273
|
/** The visitor's usual market first, then pack order. Absent from older servers; never empty when present. */
|
|
258
274
|
marketOptions?: GreetingMarketOption[];
|
|
259
275
|
/** Option ids: 'all' (matchIds [] means widen), 'teams', 'leagues', 'learned', 'league:<id>', 'game:<id>'. Absent from older servers. */
|
|
@@ -671,12 +687,14 @@ interface StreamErrorEventData {
|
|
|
671
687
|
}
|
|
672
688
|
interface BettingInsightOdds {
|
|
673
689
|
value: number;
|
|
690
|
+
valueFormats: OddsForms;
|
|
674
691
|
bookmakerId?: number;
|
|
675
692
|
bookmakerName?: string;
|
|
676
693
|
quotedAtUtc?: string;
|
|
677
694
|
isLive?: boolean;
|
|
678
695
|
matchOddsId?: number;
|
|
679
696
|
previousValue?: number | null;
|
|
697
|
+
previousValueFormats?: OddsForms | null;
|
|
680
698
|
previousValueAtUtc?: string | null;
|
|
681
699
|
movementDirection?: 'shortened' | 'drifted' | null;
|
|
682
700
|
}
|
|
@@ -718,6 +736,7 @@ interface NbaInsightSelection {
|
|
|
718
736
|
side?: string | null;
|
|
719
737
|
line?: string | null;
|
|
720
738
|
price: number;
|
|
739
|
+
priceFormats: OddsForms;
|
|
721
740
|
quotedAtUtc: string;
|
|
722
741
|
matchOddsId?: number | null;
|
|
723
742
|
}
|
|
@@ -751,7 +770,9 @@ interface NbaLinePoint {
|
|
|
751
770
|
atUtc: string;
|
|
752
771
|
line: string;
|
|
753
772
|
price: number;
|
|
773
|
+
priceFormats: OddsForms;
|
|
754
774
|
text: string;
|
|
775
|
+
textFormats: OddsForms;
|
|
755
776
|
}
|
|
756
777
|
interface NbaLineLane {
|
|
757
778
|
points: NbaLinePoint[];
|
|
@@ -823,7 +844,9 @@ interface NbaLadderStat {
|
|
|
823
844
|
stat: string;
|
|
824
845
|
mainLine?: string | null;
|
|
825
846
|
overPrice?: number | null;
|
|
847
|
+
overPriceFormats?: OddsForms | null;
|
|
826
848
|
underPrice?: number | null;
|
|
849
|
+
underPriceFormats?: OddsForms | null;
|
|
827
850
|
rungs: NbaLadderRung[];
|
|
828
851
|
}
|
|
829
852
|
interface NbaLadderEvidence {
|
|
@@ -944,6 +967,7 @@ interface NflInsightSelection {
|
|
|
944
967
|
side: string;
|
|
945
968
|
line?: string | null;
|
|
946
969
|
price: number;
|
|
970
|
+
priceFormats: OddsForms;
|
|
947
971
|
quotedAtUtc: string;
|
|
948
972
|
matchOddsId?: number | null;
|
|
949
973
|
}
|
|
@@ -994,9 +1018,11 @@ interface NflLineMoveLane {
|
|
|
994
1018
|
side: string;
|
|
995
1019
|
openLine?: string | null;
|
|
996
1020
|
openPrice: number;
|
|
1021
|
+
openPriceFormats: OddsForms;
|
|
997
1022
|
openAt: string;
|
|
998
1023
|
line?: string | null;
|
|
999
1024
|
price: number;
|
|
1025
|
+
priceFormats: OddsForms;
|
|
1000
1026
|
quotedAtUtc: string;
|
|
1001
1027
|
}
|
|
1002
1028
|
interface NflLineMoveEvidence {
|
|
@@ -1098,6 +1124,7 @@ interface MarketOddsRow {
|
|
|
1098
1124
|
side?: string | null;
|
|
1099
1125
|
line?: string | null;
|
|
1100
1126
|
price: number;
|
|
1127
|
+
priceFormats: OddsForms;
|
|
1101
1128
|
bookmakerId?: number;
|
|
1102
1129
|
bookmakerName?: string | null;
|
|
1103
1130
|
isLive?: boolean;
|
|
@@ -1109,6 +1136,7 @@ interface MarketOddsRow {
|
|
|
1109
1136
|
/** The selection text exactly as the visitor should read it. Present only when it differs from `selectionLabel` + `line`, which the slip keeps getting raw. */
|
|
1110
1137
|
displayLabel?: string | null;
|
|
1111
1138
|
previousPrice?: number | null;
|
|
1139
|
+
previousPriceFormats?: OddsForms | null;
|
|
1112
1140
|
previousPriceAtUtc?: string | null;
|
|
1113
1141
|
movementDirection?: 'shortened' | 'drifted' | null;
|
|
1114
1142
|
movementLookbackHours?: number | null;
|
|
@@ -1189,6 +1217,7 @@ interface ComboLeg {
|
|
|
1189
1217
|
side?: string | null;
|
|
1190
1218
|
line?: string | null;
|
|
1191
1219
|
price: number;
|
|
1220
|
+
priceFormats: OddsForms;
|
|
1192
1221
|
matchOddsId: number;
|
|
1193
1222
|
bookmakerId: number;
|
|
1194
1223
|
quotedAtUtc: string;
|
|
@@ -1215,11 +1244,13 @@ interface ComboCard {
|
|
|
1215
1244
|
comboId: string;
|
|
1216
1245
|
kind: 'around' | 'at_least';
|
|
1217
1246
|
target: number;
|
|
1247
|
+
targetFormats: OddsForms;
|
|
1218
1248
|
legCount: number;
|
|
1219
1249
|
/** In kickoff order. */
|
|
1220
1250
|
legs: ComboLeg[];
|
|
1221
1251
|
/** Product of leg prices, rounded half-away-from-zero to 2 dp. */
|
|
1222
1252
|
total: number;
|
|
1253
|
+
totalFormats: OddsForms;
|
|
1223
1254
|
/** "1.57 × 2.20 × 1.44 = 4.97", prices with 2 dp, "×" is U+00D7. */
|
|
1224
1255
|
multiplication: string;
|
|
1225
1256
|
/** R12: legs swapped out since the tile was built; usually empty. */
|
|
@@ -1239,6 +1270,7 @@ type PresetPick = ComboLeg;
|
|
|
1239
1270
|
interface PresetSinglesCell {
|
|
1240
1271
|
/** The limit: the max for `singles`, the floor for `singlesFrom`. */
|
|
1241
1272
|
price: number;
|
|
1273
|
+
priceFormats: OddsForms;
|
|
1242
1274
|
count: number;
|
|
1243
1275
|
/** Exactly `count` picks, one per match, in kickoff order. */
|
|
1244
1276
|
picks: PresetPick[];
|
|
@@ -1246,12 +1278,14 @@ interface PresetSinglesCell {
|
|
|
1246
1278
|
interface PresetComboCell {
|
|
1247
1279
|
/** The asked target, e.g. 5.0. */
|
|
1248
1280
|
total: number;
|
|
1281
|
+
totalFormats: OddsForms;
|
|
1249
1282
|
/** The asked leg count. */
|
|
1250
1283
|
legs: number;
|
|
1251
1284
|
combo: {
|
|
1252
1285
|
comboId: string;
|
|
1253
1286
|
/** The built product, 2 dp. */
|
|
1254
1287
|
total: number;
|
|
1288
|
+
totalFormats: OddsForms;
|
|
1255
1289
|
/** "1.57 × 2.20 × 1.44 = 4.97", as ComboCard.multiplication. */
|
|
1256
1290
|
multiplication: string;
|
|
1257
1291
|
/** In kickoff order. */
|
|
@@ -1278,6 +1312,9 @@ interface PresetGrid {
|
|
|
1278
1312
|
singles: PresetSinglesCell[];
|
|
1279
1313
|
singlesFrom: PresetSinglesCell[];
|
|
1280
1314
|
combos: PresetComboCell[];
|
|
1315
|
+
limitOptions: PriceOption[];
|
|
1316
|
+
floorOptions: PriceOption[];
|
|
1317
|
+
totalOptions: PriceOption[];
|
|
1281
1318
|
/** Tier-1 by-market rows, open grid only. Absent (or empty) on non-open grids and when no tier-1 markets have picks. */
|
|
1282
1319
|
markets?: PresetMarketCell[];
|
|
1283
1320
|
[key: string]: unknown;
|
|
@@ -1291,6 +1328,7 @@ interface BuilderGridPayload {
|
|
|
1291
1328
|
totalTarget: string;
|
|
1292
1329
|
widened: boolean;
|
|
1293
1330
|
total: number | null;
|
|
1331
|
+
totalFormats: OddsForms | null;
|
|
1294
1332
|
multiplication: string | null;
|
|
1295
1333
|
legs: ComboLeg[];
|
|
1296
1334
|
legCountThatLands: number | null;
|
|
@@ -1356,6 +1394,7 @@ interface PlayerPropPrice {
|
|
|
1356
1394
|
label: string;
|
|
1357
1395
|
line: number | null;
|
|
1358
1396
|
price: number;
|
|
1397
|
+
priceFormats: OddsForms;
|
|
1359
1398
|
quotedAtUtc: string;
|
|
1360
1399
|
/** Games in the sample that cleared this price. NFL only. */
|
|
1361
1400
|
hits?: number | null;
|
|
@@ -1434,6 +1473,7 @@ interface PlayerPropsBundle {
|
|
|
1434
1473
|
interface OddsMovementPoint {
|
|
1435
1474
|
atUtc?: string | null;
|
|
1436
1475
|
price?: number | null;
|
|
1476
|
+
priceFormats: OddsForms;
|
|
1437
1477
|
}
|
|
1438
1478
|
interface OddsMovementCard {
|
|
1439
1479
|
matchId: number;
|
|
@@ -1449,7 +1489,9 @@ interface OddsMovementCard {
|
|
|
1449
1489
|
bookmakerId?: number;
|
|
1450
1490
|
bookmakerName?: string | null;
|
|
1451
1491
|
openingPrice?: number;
|
|
1492
|
+
openingPriceFormats: OddsForms;
|
|
1452
1493
|
currentPrice?: number;
|
|
1494
|
+
currentPriceFormats: OddsForms;
|
|
1453
1495
|
movementDirection?: 'shortened' | 'drifted' | null;
|
|
1454
1496
|
windowHours?: number;
|
|
1455
1497
|
points?: OddsMovementPoint[];
|
|
@@ -1485,6 +1527,7 @@ interface LiveMonitorStatPrice {
|
|
|
1485
1527
|
marketLabel: string;
|
|
1486
1528
|
selectionLabel: string;
|
|
1487
1529
|
price?: number | null;
|
|
1530
|
+
priceFormats?: OddsForms | null;
|
|
1488
1531
|
matchOddsId?: number | null;
|
|
1489
1532
|
isSuspended: boolean;
|
|
1490
1533
|
addToSlipEnabled: boolean;
|
|
@@ -1907,10 +1950,15 @@ interface StatsWidgetClientOptions {
|
|
|
1907
1950
|
/** Sent as X-SS-Client; set by widget-react. */
|
|
1908
1951
|
client?: string;
|
|
1909
1952
|
}
|
|
1953
|
+
type OddsFormat = 'decimal' | 'american' | 'fractional';
|
|
1954
|
+
interface WidgetSettings {
|
|
1955
|
+
oddsOffered: boolean;
|
|
1956
|
+
}
|
|
1910
1957
|
interface UserContext {
|
|
1911
1958
|
operatorUserId?: string;
|
|
1912
1959
|
defaultLanguage?: string;
|
|
1913
1960
|
anonymousUserId?: string;
|
|
1961
|
+
oddsFormat?: OddsFormat;
|
|
1914
1962
|
}
|
|
1915
1963
|
interface ChatGrounding {
|
|
1916
1964
|
kind?: string;
|
|
@@ -1989,6 +2037,10 @@ interface SlipSelection {
|
|
|
1989
2037
|
matchOddsId: number;
|
|
1990
2038
|
matchId: number;
|
|
1991
2039
|
oddsDecimal: number;
|
|
2040
|
+
odds?: {
|
|
2041
|
+
format: OddsFormat;
|
|
2042
|
+
text: string;
|
|
2043
|
+
};
|
|
1992
2044
|
quotedAtUtc?: string;
|
|
1993
2045
|
insightId?: string;
|
|
1994
2046
|
conversationId?: string;
|
|
@@ -2005,7 +2057,7 @@ type AddToSlipResult = {
|
|
|
2005
2057
|
status: 'duplicate';
|
|
2006
2058
|
} | {
|
|
2007
2059
|
status: 'price_changed';
|
|
2008
|
-
|
|
2060
|
+
newOdds: string;
|
|
2009
2061
|
accepted: boolean;
|
|
2010
2062
|
} | {
|
|
2011
2063
|
status: 'rejected';
|
|
@@ -2044,6 +2096,7 @@ declare class Conversation {
|
|
|
2044
2096
|
constructor(cfg: ResolvedConfig, context?: UserContext | undefined);
|
|
2045
2097
|
send(input: ChatInput, callbacks?: ChatCallbacks): ChatHandle;
|
|
2046
2098
|
sendSignal(input: SignalInput): Promise<void>;
|
|
2099
|
+
getWidgetSettings(): Promise<WidgetSettings>;
|
|
2047
2100
|
getLiveDashboard(): Promise<ClubFanDashboardPayload | null>;
|
|
2048
2101
|
getLiveMonitor(pins: PinRef[], locale?: string): Promise<LiveMonitorSnapshot | null>;
|
|
2049
2102
|
getMarketOdds(matchId: number, marketDeveloperName: string, sport?: SlipSport): Promise<MarketOddsBlock | null>;
|
|
@@ -2323,4 +2376,4 @@ type WidgetTrackingEventName = WidgetTrackingEvent['name'];
|
|
|
2323
2376
|
type WidgetTrackingBody = WidgetTrackingEventBody;
|
|
2324
2377
|
type WidgetTrackingHandler = (event: WidgetTrackingEvent) => void | Promise<void>;
|
|
2325
2378
|
|
|
2326
|
-
export { type ActionButtonEventData, type ActionsLoadingEventData, type AddToSlipHandler, type AddToSlipOutcome, type AddToSlipRejectReason, type AddToSlipResult, type AllTimeRow, type AnswerEventData, AuthError, type AvailableMarket, type BettingInsight, type BettingInsightEventData, type BettingInsightOdds, type BuilderGridPayload, type BuilderGridRequest, type BuilderGridStatus, 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 ComboAddMetadata, 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 FavouriteEntity, type FavouriteKind, type FavouriteStarResponse, type FavouriteStarResult, type FavouritesNoIdentity, type FavouritesPayload, type FetchLike, type FixtureCard, type FixtureCardData, ForbiddenError, type FormAndH2H, type FormMatch, type GameListPayload, type GameResultPayload, type GameStatePayload, type GameSummary, type GreetingBuilderPreset, type GreetingDashboard, type GreetingDashboardLayout, type GreetingDashboardSet, type GreetingDashboardSignalRef, type GreetingDashboardSpan, type GreetingDashboardTile, type GreetingDashboardTileEmphasis, type GreetingEntityChip, type GreetingEntityKind, type GreetingFact, type GreetingFactReference, type GreetingFormResult, type GreetingGameFacts, type GreetingGamesOption, type GreetingGamesScope, type GreetingIdleTeam, type GreetingInjury, type GreetingMarketOption, type GreetingPersonalSection, type GreetingPersonalTier, type GreetingPlayerCard, type GreetingPlayerHit, type GreetingPlayerStatus, type GreetingSetChip, type GreetingTeamCard, 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 NflForm, type NflFormGame, 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 PlayerPropFact, type PlayerPropGame, type PlayerPropPrice, type PlayerPropStat, type PlayerPropStatGame, 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, type QualifiedType, type QuestionSource, 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 WidgetSportSwitchEventInput, type WidgetSportSwitchEventName, type WidgetTrackingBody, type WidgetTrackingEnvelope, type WidgetTrackingEvent, type WidgetTrackingEventName, type WidgetTrackingHandler, type WidgetTrackingTab, type WireEvent, type WireSport, createEventLogger, createNdjsonParser, fromWireSport, isAddToSlipResult, isLimitCode, matchKey, mayPinOrSlip, qualifiedId, slipSportOf, sportOf, toWireSport };
|
|
2379
|
+
export { type ActionButtonEventData, type ActionsLoadingEventData, type AddToSlipHandler, type AddToSlipOutcome, type AddToSlipRejectReason, type AddToSlipResult, type AllTimeRow, type AnswerEventData, AuthError, type AvailableMarket, type BettingInsight, type BettingInsightEventData, type BettingInsightOdds, type BuilderGridPayload, type BuilderGridRequest, type BuilderGridStatus, 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 ComboAddMetadata, 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 FavouriteEntity, type FavouriteKind, type FavouriteStarResponse, type FavouriteStarResult, type FavouritesNoIdentity, type FavouritesPayload, type FetchLike, type FixtureCard, type FixtureCardData, ForbiddenError, type FormAndH2H, type FormMatch, type GameListPayload, type GameResultPayload, type GameStatePayload, type GameSummary, type GreetingBuilderPreset, type GreetingDashboard, type GreetingDashboardLayout, type GreetingDashboardSet, type GreetingDashboardSignalRef, type GreetingDashboardSpan, type GreetingDashboardTile, type GreetingDashboardTileEmphasis, type GreetingEntityChip, type GreetingEntityKind, type GreetingFact, type GreetingFactReference, type GreetingFormResult, type GreetingGameFacts, type GreetingGamesOption, type GreetingGamesScope, type GreetingIdleTeam, type GreetingInjury, type GreetingMarketOption, type GreetingPersonalSection, type GreetingPersonalTier, type GreetingPlayerCard, type GreetingPlayerHit, type GreetingPlayerStatus, type GreetingSetChip, type GreetingTeamCard, 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 NflForm, type NflFormGame, 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 OddsFormat, type OddsForms, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, type PageContext, ParseError, type PinKind, type PinRef, type PlayerPropFact, type PlayerPropGame, type PlayerPropPrice, type PlayerPropStat, type PlayerPropStatGame, 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 PriceOption, type ProgressEventData, type QualifiedType, type QuestionSource, 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 WidgetSettings, type WidgetSportSwitchEventInput, type WidgetSportSwitchEventName, type WidgetTrackingBody, type WidgetTrackingEnvelope, type WidgetTrackingEvent, type WidgetTrackingEventName, type WidgetTrackingHandler, type WidgetTrackingTab, type WireEvent, type WireSport, createEventLogger, createNdjsonParser, fromWireSport, isAddToSlipResult, isLimitCode, matchKey, mayPinOrSlip, qualifiedId, slipSportOf, sportOf, toWireSport };
|
package/dist/index.js
CHANGED
|
@@ -167,6 +167,11 @@ function postEventsKeepalive(cfg, batch) {
|
|
|
167
167
|
} catch {
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
+
async function getWidgetSettings(cfg) {
|
|
171
|
+
const res = await cfg.fetch(endpoint(cfg, "widget-settings"), { method: "GET", headers: headersFor(cfg, false) });
|
|
172
|
+
if (!res.ok) throw new Error(`widget-settings failed: ${res.status}`);
|
|
173
|
+
return await res.json();
|
|
174
|
+
}
|
|
170
175
|
async function getLiveDashboard(cfg) {
|
|
171
176
|
const res = await cfg.fetch(endpoint(cfg, "live-dashboard"), { method: "GET", headers: headersFor(cfg, false) });
|
|
172
177
|
if (res.status === 204) return null;
|
|
@@ -594,6 +599,9 @@ var Conversation = class {
|
|
|
594
599
|
}
|
|
595
600
|
return postSignal(this.cfg, toSignalWireBody({ ...input, operatorUserId, anonymousUserId }));
|
|
596
601
|
}
|
|
602
|
+
getWidgetSettings() {
|
|
603
|
+
return getWidgetSettings(this.cfg);
|
|
604
|
+
}
|
|
597
605
|
getLiveDashboard() {
|
|
598
606
|
return getLiveDashboard(this.cfg);
|
|
599
607
|
}
|
|
@@ -859,7 +867,7 @@ function isAddToSlipResult(v) {
|
|
|
859
867
|
case "duplicate":
|
|
860
868
|
return true;
|
|
861
869
|
case "price_changed":
|
|
862
|
-
return typeof o.
|
|
870
|
+
return typeof o.newOdds === "string" && o.newOdds.length > 0 && typeof o.accepted === "boolean";
|
|
863
871
|
case "rejected":
|
|
864
872
|
return typeof o.reason === "string" && REJECT_REASONS.includes(o.reason);
|
|
865
873
|
default:
|