@sensiblestats/widget-sdk 0.74.1 → 0.76.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 +13 -0
- package/dist/index.cjs +92 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +364 -2
- package/dist/index.d.ts +364 -2
- package/dist/index.js +92 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -154,6 +154,176 @@ interface GreetingDashboard {
|
|
|
154
154
|
subtitle?: string | null;
|
|
155
155
|
footerTip?: string | null;
|
|
156
156
|
tiles: GreetingDashboardTile[];
|
|
157
|
+
/** Per-visitor layer. Absent when the server has nothing to add. */
|
|
158
|
+
personal?: GreetingPersonalSection;
|
|
159
|
+
}
|
|
160
|
+
type GreetingPersonalTier = 'cold' | 'some' | 'known';
|
|
161
|
+
type GreetingEntityKind = 'competition' | 'team' | 'player' | 'match';
|
|
162
|
+
type GreetingGamesScope = 'page' | 'pinned' | 'starredTeams' | 'starredLeagues' | 'learnedTeam' | 'all';
|
|
163
|
+
interface GreetingEntityChip {
|
|
164
|
+
kind: GreetingEntityKind;
|
|
165
|
+
id: string;
|
|
166
|
+
label: string;
|
|
167
|
+
playing: boolean;
|
|
168
|
+
/** True or absent, never false; competitions only: the league has no game in the window. The widget reads `nextGameAtUtc` first and the flag only when there is no usable instant, so a flag beside a parseable instant is ignored. Absent from older servers. */
|
|
169
|
+
noGamesToday?: true;
|
|
170
|
+
/** Competitions only: the kick-off of the league's next game that has not started, omitted when a game is live or the server cannot tell. The widget decides "today" in the visitor's zone. */
|
|
171
|
+
nextGameAtUtc?: string;
|
|
172
|
+
}
|
|
173
|
+
interface GreetingPersonalSection {
|
|
174
|
+
tier: GreetingPersonalTier;
|
|
175
|
+
ribbon?: {
|
|
176
|
+
stars: GreetingEntityChip[];
|
|
177
|
+
moreStars: number;
|
|
178
|
+
usual?: {
|
|
179
|
+
marketKey: string;
|
|
180
|
+
label: string;
|
|
181
|
+
};
|
|
182
|
+
fromChats: GreetingEntityChip[];
|
|
183
|
+
};
|
|
184
|
+
/** followTargets: the team or player itself, or both teams of a pinned match; may be empty. One Follow button per entry. */
|
|
185
|
+
guess?: {
|
|
186
|
+
kind: GreetingEntityKind;
|
|
187
|
+
id: string;
|
|
188
|
+
label: string;
|
|
189
|
+
reason: string;
|
|
190
|
+
followTargets: GreetingEntityChip[];
|
|
191
|
+
card?: GreetingTeamCard;
|
|
192
|
+
};
|
|
193
|
+
/** Absent in cool-off only; with no key it is the default preset (pack's first market, all games, singles). legs 1 = singles. matchIds: bare ids, max 12; send an empty list with gamesScope 'all' to the grid endpoint as widen=true. The only place combo size and total travel; render as control state, never as text. */
|
|
194
|
+
builder?: GreetingBuilderPreset;
|
|
195
|
+
teamCards: GreetingTeamCard[];
|
|
196
|
+
playerCards: GreetingPlayerCard[];
|
|
197
|
+
facts: GreetingFact[];
|
|
198
|
+
/** NBA and NFL only: the team availability line, apart from the facts and not one of the three. `text` carries no time; the widget draws `asOfUtc` beside it. Absent from older servers. */
|
|
199
|
+
injury?: GreetingInjury;
|
|
200
|
+
/** Facts and injury line for each game in the builder's games select. Absent from an older server: the top-level facts then stay. */
|
|
201
|
+
gameFacts?: GreetingGameFacts[];
|
|
202
|
+
/** The bare id of the game the top-level `facts` and `injury` are about; always set when they are about a game, omitted otherwise and by older servers. With it the widget keeps them on the opening choice when that is All games or holds this game, and drops them under a single game or a league that does not. Without it the widget goes by each fact's own `matchId`. */
|
|
203
|
+
factsMatchId?: string;
|
|
204
|
+
asks: {
|
|
205
|
+
actionLabel: string;
|
|
206
|
+
actionValue: string;
|
|
207
|
+
}[];
|
|
208
|
+
since: {
|
|
209
|
+
text: string;
|
|
210
|
+
}[];
|
|
211
|
+
followSuggestions: GreetingEntityChip[];
|
|
212
|
+
/** Starred teams with no game in the window, at most 2. */
|
|
213
|
+
idleTeams?: GreetingIdleTeam[];
|
|
214
|
+
/** True when the visitor has a starred team, player or league in a sport other than this section's. Omitted when false and by older servers. */
|
|
215
|
+
hasStarsElsewhere?: boolean;
|
|
216
|
+
}
|
|
217
|
+
interface GreetingFact {
|
|
218
|
+
marketKey: string;
|
|
219
|
+
text: string;
|
|
220
|
+
hits: number;
|
|
221
|
+
window: number;
|
|
222
|
+
matchId?: string;
|
|
223
|
+
reference?: GreetingFactReference;
|
|
224
|
+
}
|
|
225
|
+
/** What a fact speaks to, never a price: the widget prices it live from the builder grid. Absent means the fact is text only. */
|
|
226
|
+
interface GreetingFactReference {
|
|
227
|
+
/** The value to send as BuilderGridRequest.sport. */
|
|
228
|
+
sport: string;
|
|
229
|
+
/** Bare id, as in the grid's matchIds. */
|
|
230
|
+
matchId: string;
|
|
231
|
+
/** The value to send as BuilderGridRequest.marketKey. */
|
|
232
|
+
marketKey: string;
|
|
233
|
+
/** Omitted when the pick has no line (a spread). */
|
|
234
|
+
line?: number;
|
|
235
|
+
/** The grid leg's own `side`. */
|
|
236
|
+
side?: 'home' | 'away' | 'over';
|
|
237
|
+
/** The player, props only. */
|
|
238
|
+
subject?: string;
|
|
239
|
+
/** Football team totals only, which are Over-only today. The widget shows the leg only if its own `direction` equals this. */
|
|
240
|
+
direction?: 'over';
|
|
241
|
+
}
|
|
242
|
+
interface GreetingInjury {
|
|
243
|
+
text: string;
|
|
244
|
+
asOfUtc: string;
|
|
245
|
+
}
|
|
246
|
+
interface GreetingGameFacts {
|
|
247
|
+
matchId: string;
|
|
248
|
+
facts: GreetingFact[];
|
|
249
|
+
injury?: GreetingInjury;
|
|
250
|
+
}
|
|
251
|
+
interface GreetingBuilderPreset {
|
|
252
|
+
marketKey: string;
|
|
253
|
+
gamesScope: GreetingGamesScope;
|
|
254
|
+
matchIds: string[];
|
|
255
|
+
legs: number;
|
|
256
|
+
totalTarget: string;
|
|
257
|
+
/** The visitor's usual market first, then pack order. Absent from older servers; never empty when present. */
|
|
258
|
+
marketOptions?: GreetingMarketOption[];
|
|
259
|
+
/** Option ids: 'all' (matchIds [] means widen), 'teams', 'leagues', 'learned', 'league:<id>', 'game:<id>'. Absent from older servers. */
|
|
260
|
+
gamesOptions?: GreetingGamesOption[];
|
|
261
|
+
/** The option the preset opens on. */
|
|
262
|
+
gamesOptionId?: string;
|
|
263
|
+
/** A short localized line about when games return ("Next games tomorrow."); shown with the pause note. Omitted when the server has nothing to say. */
|
|
264
|
+
nextGames?: string | null;
|
|
265
|
+
/** The kick-off of the next games, the instant `nextGames` speaks about; the widget writes the sentence in the visitor's zone. Absent from older servers. */
|
|
266
|
+
nextGamesAtUtc?: string;
|
|
267
|
+
/** True or absent, never false: the visitor's usual market had no lines in the first-choice games, so the games slot moved wider (C13). */
|
|
268
|
+
widenedForMarket?: true;
|
|
269
|
+
}
|
|
270
|
+
interface GreetingMarketOption {
|
|
271
|
+
key: string;
|
|
272
|
+
label: string;
|
|
273
|
+
usual?: boolean;
|
|
274
|
+
}
|
|
275
|
+
interface GreetingGamesOption {
|
|
276
|
+
id: string;
|
|
277
|
+
label: string;
|
|
278
|
+
group?: 'league' | 'game';
|
|
279
|
+
matchIds: string[];
|
|
280
|
+
startsAtUtc?: string;
|
|
281
|
+
mine?: boolean;
|
|
282
|
+
}
|
|
283
|
+
interface GreetingIdleTeam {
|
|
284
|
+
teamId: string;
|
|
285
|
+
label: string;
|
|
286
|
+
actionLabel: string;
|
|
287
|
+
actionValue: string;
|
|
288
|
+
}
|
|
289
|
+
type GreetingFormResult = 'W' | 'D' | 'L';
|
|
290
|
+
/** `lines` stays on the wire for older widgets; the widget never draws a team card's lines. `h2h.wins` are the home side's. */
|
|
291
|
+
interface GreetingTeamCard {
|
|
292
|
+
teamId: string;
|
|
293
|
+
label: string;
|
|
294
|
+
matchId?: string;
|
|
295
|
+
form: GreetingFormResult[];
|
|
296
|
+
h2h?: {
|
|
297
|
+
meetings: number;
|
|
298
|
+
wins: number;
|
|
299
|
+
draws: number;
|
|
300
|
+
losses: number;
|
|
301
|
+
};
|
|
302
|
+
lines: string[];
|
|
303
|
+
homeLabel?: string;
|
|
304
|
+
awayLabel?: string;
|
|
305
|
+
homeForm?: GreetingFormResult[];
|
|
306
|
+
awayForm?: GreetingFormResult[];
|
|
307
|
+
startsAtUtc?: string;
|
|
308
|
+
competitionLabel?: string;
|
|
309
|
+
fact?: string;
|
|
310
|
+
}
|
|
311
|
+
type GreetingPlayerStatus = 'available' | 'doubtful' | 'out' | 'unknown';
|
|
312
|
+
interface GreetingPlayerHit {
|
|
313
|
+
label: string;
|
|
314
|
+
hits: number;
|
|
315
|
+
window: number;
|
|
316
|
+
}
|
|
317
|
+
/** `lines` stays on the wire for older widgets: drawn only when `hits` is absent. */
|
|
318
|
+
interface GreetingPlayerCard {
|
|
319
|
+
playerId: string;
|
|
320
|
+
label: string;
|
|
321
|
+
status: GreetingPlayerStatus;
|
|
322
|
+
statusAsOfUtc?: string;
|
|
323
|
+
lines: string[];
|
|
324
|
+
hits?: GreetingPlayerHit[];
|
|
325
|
+
matchLabel?: string;
|
|
326
|
+
startsAtUtc?: string;
|
|
157
327
|
}
|
|
158
328
|
/** One sport's dashboard in a multi-sport greeting. `sport` is the server key ("football", "nba"); `label` is localized by the server. */
|
|
159
329
|
interface GreetingDashboardSet {
|
|
@@ -936,6 +1106,8 @@ interface MarketOddsRow {
|
|
|
936
1106
|
isMainLine?: boolean;
|
|
937
1107
|
/** The bookmaker is not taking this selection. Absent on older servers -> treated as open. */
|
|
938
1108
|
isSuspended?: boolean;
|
|
1109
|
+
/** 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
|
+
displayLabel?: string | null;
|
|
939
1111
|
previousPrice?: number | null;
|
|
940
1112
|
previousPriceAtUtc?: string | null;
|
|
941
1113
|
movementDirection?: 'shortened' | 'drifted' | null;
|
|
@@ -1020,6 +1192,8 @@ interface ComboLeg {
|
|
|
1020
1192
|
matchOddsId: number;
|
|
1021
1193
|
bookmakerId: number;
|
|
1022
1194
|
quotedAtUtc: string;
|
|
1195
|
+
/** Over or Under, derived from the bookmaker's raw label and never from the localized `selectionLabel`. Absent for a market that is not Over/Under and from an older server. */
|
|
1196
|
+
direction?: 'over' | 'under';
|
|
1023
1197
|
/** The server allows pinning this leg's match. Absent on an older server, which means no pin. */
|
|
1024
1198
|
pinEnabled?: boolean;
|
|
1025
1199
|
/** The stat behind the leg. Absent or null on an open answer when the leg has none (stage 3 contract §3);
|
|
@@ -1108,6 +1282,62 @@ interface PresetGrid {
|
|
|
1108
1282
|
markets?: PresetMarketCell[];
|
|
1109
1283
|
[key: string]: unknown;
|
|
1110
1284
|
}
|
|
1285
|
+
/** The sentence builder's grid: GET price-presets with a combo size and a total. Every field is always present; nulls are null. */
|
|
1286
|
+
type BuilderGridStatus = 'ok' | 'miss' | 'paused';
|
|
1287
|
+
interface BuilderGridPayload {
|
|
1288
|
+
status: BuilderGridStatus;
|
|
1289
|
+
sport: string;
|
|
1290
|
+
requestedLegs: number;
|
|
1291
|
+
totalTarget: string;
|
|
1292
|
+
widened: boolean;
|
|
1293
|
+
total: number | null;
|
|
1294
|
+
multiplication: string | null;
|
|
1295
|
+
legs: ComboLeg[];
|
|
1296
|
+
legCountThatLands: number | null;
|
|
1297
|
+
}
|
|
1298
|
+
/** `total` and the combo size are the visitor's control state; the server decides what lands. */
|
|
1299
|
+
interface BuilderGridRequest {
|
|
1300
|
+
sport: string;
|
|
1301
|
+
marketKey?: string | null;
|
|
1302
|
+
matchIds: string[];
|
|
1303
|
+
legs: number;
|
|
1304
|
+
total: string;
|
|
1305
|
+
widen: boolean;
|
|
1306
|
+
/**
|
|
1307
|
+
* Ask for every allowed pick of the market in the one game in `matchIds` (with legs 1, total 'any', widen false) instead of the one best pick.
|
|
1308
|
+
* A fact's price uses it to find its own bet among them. A server that does not know the flag drops it and answers the one pick.
|
|
1309
|
+
*/
|
|
1310
|
+
allLegs?: boolean;
|
|
1311
|
+
operatorUserId?: string;
|
|
1312
|
+
anonymousUserId?: string;
|
|
1313
|
+
}
|
|
1314
|
+
/** Favourites tab. `id` is opaque to the widget (sport-qualified upstream: `nba:team:14`; football is bare). */
|
|
1315
|
+
type FavouriteKind = 'competition' | 'team' | 'player';
|
|
1316
|
+
interface FavouriteEntity {
|
|
1317
|
+
kind: FavouriteKind;
|
|
1318
|
+
id: string;
|
|
1319
|
+
name: string;
|
|
1320
|
+
imageUrl?: string;
|
|
1321
|
+
/** Players only. */
|
|
1322
|
+
teamName?: string;
|
|
1323
|
+
/** Search results only. */
|
|
1324
|
+
starred?: boolean;
|
|
1325
|
+
}
|
|
1326
|
+
interface FavouritesPayload {
|
|
1327
|
+
competitions: FavouriteEntity[];
|
|
1328
|
+
teams: FavouriteEntity[];
|
|
1329
|
+
players: FavouriteEntity[];
|
|
1330
|
+
/** Always present; teams and players only. */
|
|
1331
|
+
suggestions: FavouriteEntity[];
|
|
1332
|
+
}
|
|
1333
|
+
/** The list call's answer when the server refuses the visitor's ids (400 NoAcceptedIdentity): the brand has anonymous ids off. */
|
|
1334
|
+
type FavouritesNoIdentity = 'noAcceptedIdentity';
|
|
1335
|
+
type FavouriteStarResult = 'starred' | 'alreadyStarred' | 'atCap';
|
|
1336
|
+
interface FavouriteStarResponse {
|
|
1337
|
+
status: FavouriteStarResult;
|
|
1338
|
+
count?: number;
|
|
1339
|
+
cap?: number;
|
|
1340
|
+
}
|
|
1111
1341
|
interface AvailableMarket {
|
|
1112
1342
|
marketDeveloperName: string;
|
|
1113
1343
|
marketLabel: string;
|
|
@@ -1230,6 +1460,8 @@ interface OddsMovementCard {
|
|
|
1230
1460
|
matchOddsId?: number | null;
|
|
1231
1461
|
/** Server-rendered kickoff chip in the operator's zone + language. Prefer over local formatting of kickoffUtc. */
|
|
1232
1462
|
kickoffLabel?: string | null;
|
|
1463
|
+
/** The selection as the widget shows it, when selectionLabel and line would not read right joined. selectionLabel and line stay raw for the pin, history and slip. */
|
|
1464
|
+
displayLabel?: string | null;
|
|
1233
1465
|
[key: string]: unknown;
|
|
1234
1466
|
}
|
|
1235
1467
|
interface OddsMovementEventData {
|
|
@@ -1256,6 +1488,8 @@ interface LiveMonitorStatPrice {
|
|
|
1256
1488
|
matchOddsId?: number | null;
|
|
1257
1489
|
isSuspended: boolean;
|
|
1258
1490
|
addToSlipEnabled: boolean;
|
|
1491
|
+
/** The chip's selection text as the visitor should read it; `selectionLabel` is still what the slip gets. */
|
|
1492
|
+
displayLabel?: string | null;
|
|
1259
1493
|
}
|
|
1260
1494
|
interface LiveMonitorStatRow {
|
|
1261
1495
|
label: string;
|
|
@@ -1815,8 +2049,15 @@ declare class Conversation {
|
|
|
1815
2049
|
getMarketOdds(matchId: number, marketDeveloperName: string, sport?: SlipSport): Promise<MarketOddsBlock | null>;
|
|
1816
2050
|
getPlayerProps(matchId: number, sport?: 'americanfootball'): Promise<PlayerPropsBundle | null>;
|
|
1817
2051
|
getPricePresets(locale: string, options?: PresetGridOptions): Promise<PresetGrid | null>;
|
|
2052
|
+
getBuilderGrid(locale: string, req: BuilderGridRequest): Promise<BuilderGridPayload | null>;
|
|
1818
2053
|
getSchedule(localDate: string, utcOffsetMinutes: number, operatorUserId?: string, anonymousUserId?: string): Promise<SchedulePayload | null>;
|
|
1819
2054
|
starLeague(competitionId: number, starred: boolean, operatorUserId?: string, anonymousUserId?: string): Promise<LeagueStarResult | null>;
|
|
2055
|
+
getFavourites(sport: string, operatorUserId?: string, anonymousUserId?: string): Promise<FavouritesPayload | FavouritesNoIdentity | null>;
|
|
2056
|
+
searchFavourites(sport: string, query: string, kind: FavouriteKind, operatorUserId?: string, anonymousUserId?: string): Promise<FavouriteEntity[] | null>;
|
|
2057
|
+
putFavourite(kind: FavouriteKind, id: string, operatorUserId?: string, anonymousUserId?: string): Promise<FavouriteStarResponse | null>;
|
|
2058
|
+
deleteFavourite(kind: FavouriteKind, id: string, operatorUserId?: string, anonymousUserId?: string): Promise<boolean>;
|
|
2059
|
+
clearFavourites(sport: string, operatorUserId?: string, anonymousUserId?: string): Promise<boolean>;
|
|
2060
|
+
hideFavourite(kind: FavouriteKind, id: string, operatorUserId?: string, anonymousUserId?: string): Promise<boolean>;
|
|
1820
2061
|
getStates(matchIds: number[], nbaGameIds?: number[], nflGameIds?: number[]): Promise<StatesPayload | null>;
|
|
1821
2062
|
getGames(gameDay?: string): Promise<GameListPayload | null>;
|
|
1822
2063
|
getGameConfig(gameId: string, fixtureId?: number, gameDay?: string, locale?: string): Promise<GameStatePayload | null>;
|
|
@@ -1831,13 +2072,21 @@ declare class Conversation {
|
|
|
1831
2072
|
getClubRecords(limit?: number): Promise<ClubRecordsPayload | null>;
|
|
1832
2073
|
}
|
|
1833
2074
|
|
|
1834
|
-
type WidgetEntityEventName = 'pin_add' | 'pin_remove' | 'slip_click' | 'slip_result' | '
|
|
2075
|
+
type WidgetEntityEventName = 'pin_add' | 'pin_remove' | 'slip_click' | 'slip_result' | 'tile_tap' | 'slip_remove' | 'bet_placed' | 'match_view' | 'match_open' | 'combo_add';
|
|
1835
2076
|
type WidgetPopupEventName = 'popup_shown' | 'popup_opened' | 'popup_dismissed';
|
|
1836
2077
|
type WidgetPopupAskEventName = 'popup_ask_tap';
|
|
1837
2078
|
type WidgetOpenEventName = 'widget_open';
|
|
1838
2079
|
type WidgetSportSwitchEventName = 'dashboard_sport_switch';
|
|
1839
2080
|
type WidgetEventName = WidgetEntityEventName | WidgetPopupEventName | WidgetPopupAskEventName | WidgetOpenEventName | WidgetSportSwitchEventName;
|
|
1840
2081
|
type WidgetEntityType = 'match' | 'team' | 'player' | 'competition' | 'market';
|
|
2082
|
+
/** `totalChosen` is the visitor's total control as a string on the wire; `totalActual` is the server's total for the shown combo. */
|
|
2083
|
+
interface ComboAddMetadata {
|
|
2084
|
+
sport: string;
|
|
2085
|
+
legs: number;
|
|
2086
|
+
totalChosen: 'any' | '3' | '5' | '10' | '20' | '50';
|
|
2087
|
+
totalActual: number;
|
|
2088
|
+
markets: string[];
|
|
2089
|
+
}
|
|
1841
2090
|
interface WidgetEventInput {
|
|
1842
2091
|
name: WidgetEntityEventName;
|
|
1843
2092
|
entityType: WidgetEntityType;
|
|
@@ -1855,6 +2104,8 @@ interface WidgetEventInput {
|
|
|
1855
2104
|
odds?: number;
|
|
1856
2105
|
/** Wire sport key ('nba'); absent means football. */
|
|
1857
2106
|
sport?: string;
|
|
2107
|
+
/** combo_add only: what the visitor asked for and what the server returned. */
|
|
2108
|
+
metadata?: ComboAddMetadata;
|
|
1858
2109
|
}
|
|
1859
2110
|
/** Launcher popup telemetry: counted server-side, never tied to an entity. */
|
|
1860
2111
|
type WidgetPopupEventInput = {
|
|
@@ -1960,4 +2211,115 @@ interface NdjsonParser {
|
|
|
1960
2211
|
}
|
|
1961
2212
|
declare function createNdjsonParser(): NdjsonParser;
|
|
1962
2213
|
|
|
1963
|
-
|
|
2214
|
+
type WidgetTrackingTab = 'chat' | 'today' | 'following' | 'trends' | 'games' | 'fixtures' | 'standings' | 'squad' | 'records' | 'favourites';
|
|
2215
|
+
type QuestionSource = 'typed' | 'starter' | 'action' | 'tile' | 'preset' | 'live_fact' | 'bubble_ask' | 'retry';
|
|
2216
|
+
/** Fields on every event. `at` is epoch ms, taken when the event happened, not when it was delivered. */
|
|
2217
|
+
interface WidgetTrackingEnvelope {
|
|
2218
|
+
at: number;
|
|
2219
|
+
operatorId: string;
|
|
2220
|
+
widgetVersion: string;
|
|
2221
|
+
language?: string;
|
|
2222
|
+
conversationId?: string;
|
|
2223
|
+
operatorUserId?: string;
|
|
2224
|
+
anonymousUserId?: string;
|
|
2225
|
+
page?: PageContext;
|
|
2226
|
+
}
|
|
2227
|
+
/** What the slip handler resolved to: 'added' also covers an accepted price change; 'timeout' is the widget giving up waiting. */
|
|
2228
|
+
type AddToSlipOutcome = 'added' | 'duplicate' | 'price_changed' | 'timeout' | AddToSlipRejectReason;
|
|
2229
|
+
interface SlipClickFields {
|
|
2230
|
+
matchOddsId: number;
|
|
2231
|
+
matchId: number;
|
|
2232
|
+
odds: number;
|
|
2233
|
+
market?: string;
|
|
2234
|
+
/** Absent means football. */
|
|
2235
|
+
sport?: SlipSport;
|
|
2236
|
+
}
|
|
2237
|
+
type WidgetTrackingEventBody = {
|
|
2238
|
+
name: 'bubble_shown';
|
|
2239
|
+
} | {
|
|
2240
|
+
name: 'bubble_click';
|
|
2241
|
+
} | {
|
|
2242
|
+
name: 'bubble_ask_click';
|
|
2243
|
+
position: number;
|
|
2244
|
+
} | {
|
|
2245
|
+
name: 'bubble_dismiss';
|
|
2246
|
+
} | {
|
|
2247
|
+
name: 'launcher_click';
|
|
2248
|
+
} | {
|
|
2249
|
+
name: 'widget_open';
|
|
2250
|
+
} | {
|
|
2251
|
+
name: 'widget_close';
|
|
2252
|
+
method: 'button' | 'escape';
|
|
2253
|
+
tab: WidgetTrackingTab;
|
|
2254
|
+
answering: boolean;
|
|
2255
|
+
} | {
|
|
2256
|
+
name: 'tab_change';
|
|
2257
|
+
from: WidgetTrackingTab;
|
|
2258
|
+
to: WidgetTrackingTab;
|
|
2259
|
+
} | {
|
|
2260
|
+
name: 'question_asked';
|
|
2261
|
+
turnId: string;
|
|
2262
|
+
source: QuestionSource;
|
|
2263
|
+
length: number;
|
|
2264
|
+
text?: string;
|
|
2265
|
+
} | {
|
|
2266
|
+
name: 'answer_received';
|
|
2267
|
+
turnId: string;
|
|
2268
|
+
conversationId: string;
|
|
2269
|
+
latencyMs: number;
|
|
2270
|
+
cardTypes: string[];
|
|
2271
|
+
} | {
|
|
2272
|
+
name: 'answer_failed';
|
|
2273
|
+
turnId: string;
|
|
2274
|
+
code: string;
|
|
2275
|
+
} | {
|
|
2276
|
+
name: 'answer_stopped';
|
|
2277
|
+
turnId: string;
|
|
2278
|
+
} | {
|
|
2279
|
+
name: 'pin_click';
|
|
2280
|
+
action: 'add' | 'remove';
|
|
2281
|
+
target: 'match' | 'market';
|
|
2282
|
+
matchId?: number;
|
|
2283
|
+
market?: string;
|
|
2284
|
+
sport?: string;
|
|
2285
|
+
} | ({
|
|
2286
|
+
name: 'add_to_slip_click';
|
|
2287
|
+
} & SlipClickFields) | ({
|
|
2288
|
+
name: 'add_to_slip_result';
|
|
2289
|
+
outcome: AddToSlipOutcome;
|
|
2290
|
+
} & SlipClickFields) | {
|
|
2291
|
+
name: 'combo_add_click';
|
|
2292
|
+
sport: string;
|
|
2293
|
+
legs: number;
|
|
2294
|
+
total: string;
|
|
2295
|
+
} | {
|
|
2296
|
+
name: 'all_markets_click';
|
|
2297
|
+
matchId: number;
|
|
2298
|
+
market?: string;
|
|
2299
|
+
surface: string;
|
|
2300
|
+
} | {
|
|
2301
|
+
name: 'dashboard_tile_click';
|
|
2302
|
+
entityType: WidgetEntityType;
|
|
2303
|
+
entityId: string;
|
|
2304
|
+
} | {
|
|
2305
|
+
name: 'sport_switch';
|
|
2306
|
+
sport: string;
|
|
2307
|
+
} | {
|
|
2308
|
+
name: 'new_conversation';
|
|
2309
|
+
} | {
|
|
2310
|
+
name: 'league_star';
|
|
2311
|
+
competitionId: number | string;
|
|
2312
|
+
starred: boolean;
|
|
2313
|
+
} | {
|
|
2314
|
+
name: 'favourite_change';
|
|
2315
|
+
kind: string;
|
|
2316
|
+
id: string;
|
|
2317
|
+
outcome: string;
|
|
2318
|
+
};
|
|
2319
|
+
type WidgetTrackingEvent = WidgetTrackingEventBody & WidgetTrackingEnvelope;
|
|
2320
|
+
type WidgetTrackingEventName = WidgetTrackingEvent['name'];
|
|
2321
|
+
/** The event without its envelope; the tracker adds the envelope. */
|
|
2322
|
+
type WidgetTrackingBody = WidgetTrackingEventBody;
|
|
2323
|
+
type WidgetTrackingHandler = (event: WidgetTrackingEvent) => void | Promise<void>;
|
|
2324
|
+
|
|
2325
|
+
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 };
|