@sensiblestats/widget-sdk 0.59.0 → 0.61.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 +14 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +164 -3
- package/dist/index.d.ts +164 -3
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -472,6 +472,154 @@ interface BettingInsight {
|
|
|
472
472
|
interface BettingInsightEventData {
|
|
473
473
|
insight: BettingInsight;
|
|
474
474
|
}
|
|
475
|
+
interface NbaInsightSelection {
|
|
476
|
+
key: string;
|
|
477
|
+
marketDeveloperName: string;
|
|
478
|
+
selectionLabel: string;
|
|
479
|
+
side?: string | null;
|
|
480
|
+
line?: string | null;
|
|
481
|
+
price: number;
|
|
482
|
+
quotedAtUtc: string;
|
|
483
|
+
matchOddsId?: number | null;
|
|
484
|
+
}
|
|
485
|
+
interface NbaGameValue {
|
|
486
|
+
date: string;
|
|
487
|
+
opponent?: string | null;
|
|
488
|
+
value: number;
|
|
489
|
+
minutes: number;
|
|
490
|
+
}
|
|
491
|
+
interface NbaListedTeammate {
|
|
492
|
+
name: string;
|
|
493
|
+
status: string;
|
|
494
|
+
}
|
|
495
|
+
interface NbaPropReasonEvidence {
|
|
496
|
+
playerId: number;
|
|
497
|
+
playerName: string;
|
|
498
|
+
stat: string;
|
|
499
|
+
line: string;
|
|
500
|
+
side: string;
|
|
501
|
+
hits: number;
|
|
502
|
+
n: number;
|
|
503
|
+
pushes: number;
|
|
504
|
+
average: number;
|
|
505
|
+
averageMinutes: number;
|
|
506
|
+
games: NbaGameValue[];
|
|
507
|
+
openingLine?: string | null;
|
|
508
|
+
teammates: NbaListedTeammate[];
|
|
509
|
+
leftOut: string[];
|
|
510
|
+
}
|
|
511
|
+
interface NbaLinePoint {
|
|
512
|
+
atUtc: string;
|
|
513
|
+
line: string;
|
|
514
|
+
price: number;
|
|
515
|
+
text: string;
|
|
516
|
+
}
|
|
517
|
+
interface NbaLineLane {
|
|
518
|
+
points: NbaLinePoint[];
|
|
519
|
+
selectionKey?: string | null;
|
|
520
|
+
}
|
|
521
|
+
interface NbaInjuryEvent {
|
|
522
|
+
atUtc: string;
|
|
523
|
+
teamName: string;
|
|
524
|
+
text: string;
|
|
525
|
+
}
|
|
526
|
+
interface NbaLineMoveEvidence {
|
|
527
|
+
dateLabel: string;
|
|
528
|
+
spread?: NbaLineLane | null;
|
|
529
|
+
total?: NbaLineLane | null;
|
|
530
|
+
injuries: NbaInjuryEvent[];
|
|
531
|
+
}
|
|
532
|
+
interface NbaSplitRow {
|
|
533
|
+
playerId: number;
|
|
534
|
+
playerName: string;
|
|
535
|
+
stat: string;
|
|
536
|
+
line: string;
|
|
537
|
+
withoutHits: number;
|
|
538
|
+
withoutN: number;
|
|
539
|
+
withHits: number;
|
|
540
|
+
withN: number;
|
|
541
|
+
selectionKey: string;
|
|
542
|
+
}
|
|
543
|
+
interface NbaTeammateOutEvidence {
|
|
544
|
+
outPlayerId: number;
|
|
545
|
+
outPlayerName: string;
|
|
546
|
+
teamName: string;
|
|
547
|
+
status: string;
|
|
548
|
+
seenAtUtc?: string | null;
|
|
549
|
+
missedGames: number;
|
|
550
|
+
rows: NbaSplitRow[];
|
|
551
|
+
}
|
|
552
|
+
interface NbaCoHitLeg {
|
|
553
|
+
playerId: number;
|
|
554
|
+
playerName: string;
|
|
555
|
+
stat: string;
|
|
556
|
+
rung: string;
|
|
557
|
+
hits: number;
|
|
558
|
+
n: number;
|
|
559
|
+
selectionKey: string;
|
|
560
|
+
}
|
|
561
|
+
interface NbaJointGame {
|
|
562
|
+
date: string;
|
|
563
|
+
valueA: number;
|
|
564
|
+
valueB: number;
|
|
565
|
+
both: boolean;
|
|
566
|
+
}
|
|
567
|
+
interface NbaCoHitEvidence {
|
|
568
|
+
legs: NbaCoHitLeg[];
|
|
569
|
+
games: NbaJointGame[];
|
|
570
|
+
bothHits: number;
|
|
571
|
+
n: number;
|
|
572
|
+
combinedPrice: number;
|
|
573
|
+
}
|
|
574
|
+
interface NbaLadderRung {
|
|
575
|
+
at: string;
|
|
576
|
+
l5Hits: number;
|
|
577
|
+
l5N: number;
|
|
578
|
+
l8Hits: number;
|
|
579
|
+
l8N: number;
|
|
580
|
+
selectionKey: string;
|
|
581
|
+
}
|
|
582
|
+
interface NbaLadderStat {
|
|
583
|
+
stat: string;
|
|
584
|
+
mainLine?: string | null;
|
|
585
|
+
overPrice?: number | null;
|
|
586
|
+
underPrice?: number | null;
|
|
587
|
+
rungs: NbaLadderRung[];
|
|
588
|
+
}
|
|
589
|
+
interface NbaLadderEvidence {
|
|
590
|
+
playerId: number;
|
|
591
|
+
playerName: string;
|
|
592
|
+
stats: NbaLadderStat[];
|
|
593
|
+
}
|
|
594
|
+
interface NbaInsight {
|
|
595
|
+
insightId: string;
|
|
596
|
+
matchId: number;
|
|
597
|
+
kind: string;
|
|
598
|
+
ruleId: string;
|
|
599
|
+
text: string;
|
|
600
|
+
title: string;
|
|
601
|
+
marketDeveloperName: string;
|
|
602
|
+
marketLabel: string;
|
|
603
|
+
selections: NbaInsightSelection[];
|
|
604
|
+
notes: string[];
|
|
605
|
+
disclaimer?: string | null;
|
|
606
|
+
homeTeamName?: string | null;
|
|
607
|
+
awayTeamName?: string | null;
|
|
608
|
+
competitionName?: string | null;
|
|
609
|
+
addToSlipEnabled: boolean;
|
|
610
|
+
kickoffUtc?: string | null;
|
|
611
|
+
pinEnabled: boolean;
|
|
612
|
+
kickoffLabel?: string | null;
|
|
613
|
+
quotedAtUtc: string;
|
|
614
|
+
propReason?: NbaPropReasonEvidence | null;
|
|
615
|
+
lineMove?: NbaLineMoveEvidence | null;
|
|
616
|
+
teammateOut?: NbaTeammateOutEvidence | null;
|
|
617
|
+
coHit?: NbaCoHitEvidence | null;
|
|
618
|
+
ladder?: NbaLadderEvidence | null;
|
|
619
|
+
}
|
|
620
|
+
interface NbaInsightEventData {
|
|
621
|
+
insight: NbaInsight;
|
|
622
|
+
}
|
|
475
623
|
interface MarketOddsRow {
|
|
476
624
|
selectionLabel: string;
|
|
477
625
|
side?: string | null;
|
|
@@ -809,15 +957,22 @@ interface LiveMonitorSnapshot {
|
|
|
809
957
|
serverNowUtc: string;
|
|
810
958
|
nextPollSeconds: number;
|
|
811
959
|
}
|
|
960
|
+
type ScheduleSport = 'football' | 'basketball';
|
|
812
961
|
interface ScheduleMatch {
|
|
813
962
|
matchId: number;
|
|
963
|
+
/** Absent means football. */
|
|
964
|
+
sport?: ScheduleSport;
|
|
814
965
|
homeTeamName: string;
|
|
815
966
|
awayTeamName: string;
|
|
816
967
|
homeTeamImagePath?: string | null;
|
|
817
968
|
awayTeamImagePath?: string | null;
|
|
969
|
+
homeTeamAbbr?: string | null;
|
|
970
|
+
awayTeamAbbr?: string | null;
|
|
818
971
|
kickoffUnix: number;
|
|
819
972
|
}
|
|
820
973
|
interface ScheduleGroup {
|
|
974
|
+
/** Absent means football. */
|
|
975
|
+
sport?: ScheduleSport;
|
|
821
976
|
competitionId: number;
|
|
822
977
|
competitionName: string;
|
|
823
978
|
/** Catalog country, null for continental competitions. competitionName is not an identity —
|
|
@@ -840,6 +995,8 @@ interface SchedulePayload {
|
|
|
840
995
|
}
|
|
841
996
|
interface MatchState {
|
|
842
997
|
matchId: number;
|
|
998
|
+
/** Absent means football. Football match ids and NBA game ids share a numeric space, so key on both. */
|
|
999
|
+
sport?: ScheduleSport;
|
|
843
1000
|
phase: MonitorPhase;
|
|
844
1001
|
minuteLabel?: string | null;
|
|
845
1002
|
homeScore?: number | null;
|
|
@@ -860,7 +1017,7 @@ interface EventEnvelope<TType extends string, TData> {
|
|
|
860
1017
|
timestamp: string;
|
|
861
1018
|
data: TData;
|
|
862
1019
|
}
|
|
863
|
-
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<'market_odds', MarketOddsEventData> | EventEnvelope<'combo_card', ComboCardEventData> | EventEnvelope<'odds_movement', OddsMovementEventData> | EventEnvelope<'error', StreamErrorEventData>;
|
|
1020
|
+
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>;
|
|
864
1021
|
interface GameSummary {
|
|
865
1022
|
gameId: string;
|
|
866
1023
|
gameDay: string;
|
|
@@ -1156,6 +1313,7 @@ interface SignalInput {
|
|
|
1156
1313
|
/** Zero-based tile position within the dashboard, when it is a dashboard tap. */
|
|
1157
1314
|
tileIndex?: number;
|
|
1158
1315
|
}
|
|
1316
|
+
type SlipSport = 'basketball';
|
|
1159
1317
|
interface SlipSelection {
|
|
1160
1318
|
matchOddsId: number;
|
|
1161
1319
|
matchId: number;
|
|
@@ -1163,6 +1321,7 @@ interface SlipSelection {
|
|
|
1163
1321
|
quotedAtUtc?: string;
|
|
1164
1322
|
insightId?: string;
|
|
1165
1323
|
conversationId?: string;
|
|
1324
|
+
sport?: SlipSport;
|
|
1166
1325
|
}
|
|
1167
1326
|
type AddToSlipRejectReason = 'suspended' | 'closed' | 'login_required' | 'not_found' | 'limit' | 'unsupported';
|
|
1168
1327
|
type AddToSlipResult = {
|
|
@@ -1220,7 +1379,7 @@ declare class Conversation {
|
|
|
1220
1379
|
getPricePresets(locale: string, options?: PresetGridOptions): Promise<PresetGrid | null>;
|
|
1221
1380
|
getSchedule(localDate: string, utcOffsetMinutes: number, operatorUserId?: string, anonymousUserId?: string): Promise<SchedulePayload | null>;
|
|
1222
1381
|
starLeague(competitionId: number, starred: boolean, operatorUserId?: string, anonymousUserId?: string): Promise<LeagueStarResult | null>;
|
|
1223
|
-
getStates(matchIds: number[]): Promise<StatesPayload | null>;
|
|
1382
|
+
getStates(matchIds: number[], nbaGameIds?: number[]): Promise<StatesPayload | null>;
|
|
1224
1383
|
getGames(gameDay?: string): Promise<GameListPayload | null>;
|
|
1225
1384
|
getGameConfig(gameId: string, fixtureId?: number, gameDay?: string, locale?: string): Promise<GameStatePayload | null>;
|
|
1226
1385
|
getGameResult(gameId: string, fixtureId?: number, gameDay?: string, locale?: string): Promise<GameResultPayload | null>;
|
|
@@ -1342,6 +1501,8 @@ declare class StatsWidgetClient {
|
|
|
1342
1501
|
}): EventLogger;
|
|
1343
1502
|
}
|
|
1344
1503
|
|
|
1504
|
+
declare function matchKey(sport: string | undefined, id: number): string;
|
|
1505
|
+
|
|
1345
1506
|
declare const SIGNAL_TYPE_CODES: Record<SignalType, number>;
|
|
1346
1507
|
declare const ENTITY_TYPE_CODES: Record<SignalEntityType, number>;
|
|
1347
1508
|
|
|
@@ -1351,4 +1512,4 @@ interface NdjsonParser {
|
|
|
1351
1512
|
}
|
|
1352
1513
|
declare function createNdjsonParser(): NdjsonParser;
|
|
1353
1514
|
|
|
1354
|
-
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 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 NdjsonParser, NetworkError, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, ParseError, type PinKind, type PinRef, 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 SignalEntityType, type SignalInput, type SignalType, type SlipSelection, 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 };
|
|
1515
|
+
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 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 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 NbaPropReasonEvidence, type NbaSplitRow, type NbaTeammateOutEvidence, type NdjsonParser, NetworkError, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, ParseError, type PinKind, type PinRef, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -472,6 +472,154 @@ interface BettingInsight {
|
|
|
472
472
|
interface BettingInsightEventData {
|
|
473
473
|
insight: BettingInsight;
|
|
474
474
|
}
|
|
475
|
+
interface NbaInsightSelection {
|
|
476
|
+
key: string;
|
|
477
|
+
marketDeveloperName: string;
|
|
478
|
+
selectionLabel: string;
|
|
479
|
+
side?: string | null;
|
|
480
|
+
line?: string | null;
|
|
481
|
+
price: number;
|
|
482
|
+
quotedAtUtc: string;
|
|
483
|
+
matchOddsId?: number | null;
|
|
484
|
+
}
|
|
485
|
+
interface NbaGameValue {
|
|
486
|
+
date: string;
|
|
487
|
+
opponent?: string | null;
|
|
488
|
+
value: number;
|
|
489
|
+
minutes: number;
|
|
490
|
+
}
|
|
491
|
+
interface NbaListedTeammate {
|
|
492
|
+
name: string;
|
|
493
|
+
status: string;
|
|
494
|
+
}
|
|
495
|
+
interface NbaPropReasonEvidence {
|
|
496
|
+
playerId: number;
|
|
497
|
+
playerName: string;
|
|
498
|
+
stat: string;
|
|
499
|
+
line: string;
|
|
500
|
+
side: string;
|
|
501
|
+
hits: number;
|
|
502
|
+
n: number;
|
|
503
|
+
pushes: number;
|
|
504
|
+
average: number;
|
|
505
|
+
averageMinutes: number;
|
|
506
|
+
games: NbaGameValue[];
|
|
507
|
+
openingLine?: string | null;
|
|
508
|
+
teammates: NbaListedTeammate[];
|
|
509
|
+
leftOut: string[];
|
|
510
|
+
}
|
|
511
|
+
interface NbaLinePoint {
|
|
512
|
+
atUtc: string;
|
|
513
|
+
line: string;
|
|
514
|
+
price: number;
|
|
515
|
+
text: string;
|
|
516
|
+
}
|
|
517
|
+
interface NbaLineLane {
|
|
518
|
+
points: NbaLinePoint[];
|
|
519
|
+
selectionKey?: string | null;
|
|
520
|
+
}
|
|
521
|
+
interface NbaInjuryEvent {
|
|
522
|
+
atUtc: string;
|
|
523
|
+
teamName: string;
|
|
524
|
+
text: string;
|
|
525
|
+
}
|
|
526
|
+
interface NbaLineMoveEvidence {
|
|
527
|
+
dateLabel: string;
|
|
528
|
+
spread?: NbaLineLane | null;
|
|
529
|
+
total?: NbaLineLane | null;
|
|
530
|
+
injuries: NbaInjuryEvent[];
|
|
531
|
+
}
|
|
532
|
+
interface NbaSplitRow {
|
|
533
|
+
playerId: number;
|
|
534
|
+
playerName: string;
|
|
535
|
+
stat: string;
|
|
536
|
+
line: string;
|
|
537
|
+
withoutHits: number;
|
|
538
|
+
withoutN: number;
|
|
539
|
+
withHits: number;
|
|
540
|
+
withN: number;
|
|
541
|
+
selectionKey: string;
|
|
542
|
+
}
|
|
543
|
+
interface NbaTeammateOutEvidence {
|
|
544
|
+
outPlayerId: number;
|
|
545
|
+
outPlayerName: string;
|
|
546
|
+
teamName: string;
|
|
547
|
+
status: string;
|
|
548
|
+
seenAtUtc?: string | null;
|
|
549
|
+
missedGames: number;
|
|
550
|
+
rows: NbaSplitRow[];
|
|
551
|
+
}
|
|
552
|
+
interface NbaCoHitLeg {
|
|
553
|
+
playerId: number;
|
|
554
|
+
playerName: string;
|
|
555
|
+
stat: string;
|
|
556
|
+
rung: string;
|
|
557
|
+
hits: number;
|
|
558
|
+
n: number;
|
|
559
|
+
selectionKey: string;
|
|
560
|
+
}
|
|
561
|
+
interface NbaJointGame {
|
|
562
|
+
date: string;
|
|
563
|
+
valueA: number;
|
|
564
|
+
valueB: number;
|
|
565
|
+
both: boolean;
|
|
566
|
+
}
|
|
567
|
+
interface NbaCoHitEvidence {
|
|
568
|
+
legs: NbaCoHitLeg[];
|
|
569
|
+
games: NbaJointGame[];
|
|
570
|
+
bothHits: number;
|
|
571
|
+
n: number;
|
|
572
|
+
combinedPrice: number;
|
|
573
|
+
}
|
|
574
|
+
interface NbaLadderRung {
|
|
575
|
+
at: string;
|
|
576
|
+
l5Hits: number;
|
|
577
|
+
l5N: number;
|
|
578
|
+
l8Hits: number;
|
|
579
|
+
l8N: number;
|
|
580
|
+
selectionKey: string;
|
|
581
|
+
}
|
|
582
|
+
interface NbaLadderStat {
|
|
583
|
+
stat: string;
|
|
584
|
+
mainLine?: string | null;
|
|
585
|
+
overPrice?: number | null;
|
|
586
|
+
underPrice?: number | null;
|
|
587
|
+
rungs: NbaLadderRung[];
|
|
588
|
+
}
|
|
589
|
+
interface NbaLadderEvidence {
|
|
590
|
+
playerId: number;
|
|
591
|
+
playerName: string;
|
|
592
|
+
stats: NbaLadderStat[];
|
|
593
|
+
}
|
|
594
|
+
interface NbaInsight {
|
|
595
|
+
insightId: string;
|
|
596
|
+
matchId: number;
|
|
597
|
+
kind: string;
|
|
598
|
+
ruleId: string;
|
|
599
|
+
text: string;
|
|
600
|
+
title: string;
|
|
601
|
+
marketDeveloperName: string;
|
|
602
|
+
marketLabel: string;
|
|
603
|
+
selections: NbaInsightSelection[];
|
|
604
|
+
notes: string[];
|
|
605
|
+
disclaimer?: string | null;
|
|
606
|
+
homeTeamName?: string | null;
|
|
607
|
+
awayTeamName?: string | null;
|
|
608
|
+
competitionName?: string | null;
|
|
609
|
+
addToSlipEnabled: boolean;
|
|
610
|
+
kickoffUtc?: string | null;
|
|
611
|
+
pinEnabled: boolean;
|
|
612
|
+
kickoffLabel?: string | null;
|
|
613
|
+
quotedAtUtc: string;
|
|
614
|
+
propReason?: NbaPropReasonEvidence | null;
|
|
615
|
+
lineMove?: NbaLineMoveEvidence | null;
|
|
616
|
+
teammateOut?: NbaTeammateOutEvidence | null;
|
|
617
|
+
coHit?: NbaCoHitEvidence | null;
|
|
618
|
+
ladder?: NbaLadderEvidence | null;
|
|
619
|
+
}
|
|
620
|
+
interface NbaInsightEventData {
|
|
621
|
+
insight: NbaInsight;
|
|
622
|
+
}
|
|
475
623
|
interface MarketOddsRow {
|
|
476
624
|
selectionLabel: string;
|
|
477
625
|
side?: string | null;
|
|
@@ -809,15 +957,22 @@ interface LiveMonitorSnapshot {
|
|
|
809
957
|
serverNowUtc: string;
|
|
810
958
|
nextPollSeconds: number;
|
|
811
959
|
}
|
|
960
|
+
type ScheduleSport = 'football' | 'basketball';
|
|
812
961
|
interface ScheduleMatch {
|
|
813
962
|
matchId: number;
|
|
963
|
+
/** Absent means football. */
|
|
964
|
+
sport?: ScheduleSport;
|
|
814
965
|
homeTeamName: string;
|
|
815
966
|
awayTeamName: string;
|
|
816
967
|
homeTeamImagePath?: string | null;
|
|
817
968
|
awayTeamImagePath?: string | null;
|
|
969
|
+
homeTeamAbbr?: string | null;
|
|
970
|
+
awayTeamAbbr?: string | null;
|
|
818
971
|
kickoffUnix: number;
|
|
819
972
|
}
|
|
820
973
|
interface ScheduleGroup {
|
|
974
|
+
/** Absent means football. */
|
|
975
|
+
sport?: ScheduleSport;
|
|
821
976
|
competitionId: number;
|
|
822
977
|
competitionName: string;
|
|
823
978
|
/** Catalog country, null for continental competitions. competitionName is not an identity —
|
|
@@ -840,6 +995,8 @@ interface SchedulePayload {
|
|
|
840
995
|
}
|
|
841
996
|
interface MatchState {
|
|
842
997
|
matchId: number;
|
|
998
|
+
/** Absent means football. Football match ids and NBA game ids share a numeric space, so key on both. */
|
|
999
|
+
sport?: ScheduleSport;
|
|
843
1000
|
phase: MonitorPhase;
|
|
844
1001
|
minuteLabel?: string | null;
|
|
845
1002
|
homeScore?: number | null;
|
|
@@ -860,7 +1017,7 @@ interface EventEnvelope<TType extends string, TData> {
|
|
|
860
1017
|
timestamp: string;
|
|
861
1018
|
data: TData;
|
|
862
1019
|
}
|
|
863
|
-
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<'market_odds', MarketOddsEventData> | EventEnvelope<'combo_card', ComboCardEventData> | EventEnvelope<'odds_movement', OddsMovementEventData> | EventEnvelope<'error', StreamErrorEventData>;
|
|
1020
|
+
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>;
|
|
864
1021
|
interface GameSummary {
|
|
865
1022
|
gameId: string;
|
|
866
1023
|
gameDay: string;
|
|
@@ -1156,6 +1313,7 @@ interface SignalInput {
|
|
|
1156
1313
|
/** Zero-based tile position within the dashboard, when it is a dashboard tap. */
|
|
1157
1314
|
tileIndex?: number;
|
|
1158
1315
|
}
|
|
1316
|
+
type SlipSport = 'basketball';
|
|
1159
1317
|
interface SlipSelection {
|
|
1160
1318
|
matchOddsId: number;
|
|
1161
1319
|
matchId: number;
|
|
@@ -1163,6 +1321,7 @@ interface SlipSelection {
|
|
|
1163
1321
|
quotedAtUtc?: string;
|
|
1164
1322
|
insightId?: string;
|
|
1165
1323
|
conversationId?: string;
|
|
1324
|
+
sport?: SlipSport;
|
|
1166
1325
|
}
|
|
1167
1326
|
type AddToSlipRejectReason = 'suspended' | 'closed' | 'login_required' | 'not_found' | 'limit' | 'unsupported';
|
|
1168
1327
|
type AddToSlipResult = {
|
|
@@ -1220,7 +1379,7 @@ declare class Conversation {
|
|
|
1220
1379
|
getPricePresets(locale: string, options?: PresetGridOptions): Promise<PresetGrid | null>;
|
|
1221
1380
|
getSchedule(localDate: string, utcOffsetMinutes: number, operatorUserId?: string, anonymousUserId?: string): Promise<SchedulePayload | null>;
|
|
1222
1381
|
starLeague(competitionId: number, starred: boolean, operatorUserId?: string, anonymousUserId?: string): Promise<LeagueStarResult | null>;
|
|
1223
|
-
getStates(matchIds: number[]): Promise<StatesPayload | null>;
|
|
1382
|
+
getStates(matchIds: number[], nbaGameIds?: number[]): Promise<StatesPayload | null>;
|
|
1224
1383
|
getGames(gameDay?: string): Promise<GameListPayload | null>;
|
|
1225
1384
|
getGameConfig(gameId: string, fixtureId?: number, gameDay?: string, locale?: string): Promise<GameStatePayload | null>;
|
|
1226
1385
|
getGameResult(gameId: string, fixtureId?: number, gameDay?: string, locale?: string): Promise<GameResultPayload | null>;
|
|
@@ -1342,6 +1501,8 @@ declare class StatsWidgetClient {
|
|
|
1342
1501
|
}): EventLogger;
|
|
1343
1502
|
}
|
|
1344
1503
|
|
|
1504
|
+
declare function matchKey(sport: string | undefined, id: number): string;
|
|
1505
|
+
|
|
1345
1506
|
declare const SIGNAL_TYPE_CODES: Record<SignalType, number>;
|
|
1346
1507
|
declare const ENTITY_TYPE_CODES: Record<SignalEntityType, number>;
|
|
1347
1508
|
|
|
@@ -1351,4 +1512,4 @@ interface NdjsonParser {
|
|
|
1351
1512
|
}
|
|
1352
1513
|
declare function createNdjsonParser(): NdjsonParser;
|
|
1353
1514
|
|
|
1354
|
-
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 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 NdjsonParser, NetworkError, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, ParseError, type PinKind, type PinRef, 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 SignalEntityType, type SignalInput, type SignalType, type SlipSelection, 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 };
|
|
1515
|
+
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 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 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 NbaPropReasonEvidence, type NbaSplitRow, type NbaTeammateOutEvidence, type NdjsonParser, NetworkError, type OddsMovementCard, type OddsMovementEventData, type OddsMovementPoint, ParseError, type PinKind, type PinRef, 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 };
|
package/dist/index.js
CHANGED
|
@@ -171,7 +171,7 @@ async function postSchedule(cfg, localDate, utcOffsetMinutes, operatorUserId, an
|
|
|
171
171
|
const res = await cfg.fetch(endpoint(cfg, "live-monitor/schedule"), {
|
|
172
172
|
method: "POST",
|
|
173
173
|
headers: headersFor(cfg, true),
|
|
174
|
-
body: JSON.stringify({ localDate, utcOffsetMinutes, operatorUserId, anonymousUserId })
|
|
174
|
+
body: JSON.stringify({ localDate, utcOffsetMinutes, sports: ["basketball"], operatorUserId, anonymousUserId })
|
|
175
175
|
});
|
|
176
176
|
if (res.status === 404) return null;
|
|
177
177
|
if (!res.ok) throw new Error(`live-monitor/schedule ${res.status}`);
|
|
@@ -187,11 +187,11 @@ async function postLeagueStar(cfg, competitionId, starred, operatorUserId, anony
|
|
|
187
187
|
if (!res.ok) throw new Error(`leagues/star ${res.status}`);
|
|
188
188
|
return await res.json();
|
|
189
189
|
}
|
|
190
|
-
async function postStates(cfg, matchIds) {
|
|
190
|
+
async function postStates(cfg, matchIds, nbaGameIds) {
|
|
191
191
|
const res = await cfg.fetch(endpoint(cfg, "live-monitor/states"), {
|
|
192
192
|
method: "POST",
|
|
193
193
|
headers: headersFor(cfg, true),
|
|
194
|
-
body: JSON.stringify({ matchIds })
|
|
194
|
+
body: JSON.stringify(nbaGameIds?.length ? { matchIds, nbaGameIds } : { matchIds })
|
|
195
195
|
});
|
|
196
196
|
if (res.status === 404) return null;
|
|
197
197
|
if (!res.ok) throw new Error(`live-monitor/states ${res.status}`);
|
|
@@ -498,8 +498,8 @@ var Conversation = class {
|
|
|
498
498
|
starLeague(competitionId, starred, operatorUserId, anonymousUserId) {
|
|
499
499
|
return postLeagueStar(this.cfg, competitionId, starred, operatorUserId, anonymousUserId);
|
|
500
500
|
}
|
|
501
|
-
getStates(matchIds) {
|
|
502
|
-
return postStates(this.cfg, matchIds);
|
|
501
|
+
getStates(matchIds, nbaGameIds) {
|
|
502
|
+
return postStates(this.cfg, matchIds, nbaGameIds);
|
|
503
503
|
}
|
|
504
504
|
getGames(gameDay) {
|
|
505
505
|
return getGames(this.cfg, this.context?.operatorUserId, gameDay);
|
|
@@ -705,6 +705,11 @@ var StatsWidgetClient = class {
|
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
707
|
|
|
708
|
+
// src/matchKey.ts
|
|
709
|
+
function matchKey(sport, id) {
|
|
710
|
+
return `${sport ?? "football"}:${id}`;
|
|
711
|
+
}
|
|
712
|
+
|
|
708
713
|
// src/types.ts
|
|
709
714
|
var REJECT_REASONS = ["suspended", "closed", "login_required", "not_found", "limit", "unsupported"];
|
|
710
715
|
function isAddToSlipResult(v) {
|
|
@@ -739,6 +744,7 @@ export {
|
|
|
739
744
|
createEventLogger,
|
|
740
745
|
createNdjsonParser,
|
|
741
746
|
isAddToSlipResult,
|
|
742
|
-
isLimitCode
|
|
747
|
+
isLimitCode,
|
|
748
|
+
matchKey
|
|
743
749
|
};
|
|
744
750
|
//# sourceMappingURL=index.js.map
|