@maestro_io/maestro-web-sdk 4.0.0-beta.4 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1733 -0
- package/dist/maestro-web-sdk.esm.js +1 -1
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +1 -1
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/package.json +3 -2
- package/dist/f8820fca3a2a7957f753167da0884f9d.png +0 -0
- package/dist/package.json +0 -91
- package/dist/src/__mocks__/sentry.d.ts +0 -4
- package/dist/src/components/atoms/BaseButton/BaseButton.d.ts +0 -7
- package/dist/src/components/atoms/BaseButton/BaseButton.js +0 -11
- package/dist/src/components/atoms/BaseButton/index.d.ts +0 -2
- package/dist/src/components/atoms/BaseButton/index.js +0 -2
- package/dist/src/components/atoms/Image/index.d.ts +0 -13
- package/dist/src/components/atoms/Image/index.js +0 -34
- package/dist/src/components/atoms/Rive/index.d.ts +0 -219
- package/dist/src/components/atoms/Rive/index.js +0 -53
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.js +0 -9
- package/dist/src/components/atoms/SvgIcon/BetsIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/BetsIcon.js +0 -11
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.js +0 -11
- package/dist/src/components/atoms/SvgIcon/ChatIcon.d.ts +0 -4
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.js +0 -15
- package/dist/src/components/atoms/SvgIcon/FlameIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/FlameIcon.js +0 -11
- package/dist/src/components/atoms/SvgIcon/HelloWorldIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/Icon.d.ts +0 -40
- package/dist/src/components/atoms/SvgIcon/Icon.js +0 -44
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.d.ts +0 -6
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.js +0 -10
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.d.ts +0 -7
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.js +0 -11
- package/dist/src/components/atoms/SvgIcon/PlayIcon.d.ts +0 -6
- package/dist/src/components/atoms/SvgIcon/PlayIcon.js +0 -8
- package/dist/src/components/atoms/SvgIcon/ShopIcon.d.ts +0 -5
- package/dist/src/components/atoms/SvgIcon/ShopIcon.js +0 -7
- package/dist/src/components/atoms/SvgIcon/ShopifyIcon.d.ts +0 -4
- package/dist/src/components/atoms/SvgIcon/StatsIcon.d.ts +0 -6
- package/dist/src/components/atoms/SvgIcon/StatsIcon.js +0 -12
- package/dist/src/components/atoms/SvgIcon/TimesIcon.d.ts +0 -3
- package/dist/src/components/atoms/SvgIcon/TimesIcon.js +0 -6
- package/dist/src/components/atoms/SvgIcon/WarningIcon.d.ts +0 -6
- package/dist/src/components/atoms/SvgIcon/WarningIcon.js +0 -8
- package/dist/src/components/atoms/SvgIcon/index.d.ts +0 -2
- package/dist/src/components/atoms/SvgIcon/index.js +0 -2
- package/dist/src/components/core/App/App.d.ts +0 -11
- package/dist/src/components/core/App/App.js +0 -35
- package/dist/src/components/core/App/index.d.ts +0 -2
- package/dist/src/components/core/App/index.js +0 -2
- package/dist/src/components/core/OverlayContainer.d.ts +0 -3
- package/dist/src/components/core/OverlayContainer.js +0 -58
- package/dist/src/components/core/PanelManager/PanelManager.d.ts +0 -21
- package/dist/src/components/core/PanelManager/PanelManager.js +0 -86
- package/dist/src/components/core/PanelManager/index.d.ts +0 -2
- package/dist/src/components/core/PanelManager/index.js +0 -2
- package/dist/src/components/core/ScrollableContainer/FocusableItem.d.ts +0 -6
- package/dist/src/components/core/ScrollableContainer/FocusableItem.js +0 -38
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.d.ts +0 -78
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +0 -169
- package/dist/src/components/core/ScrollableContainer/index.d.ts +0 -2
- package/dist/src/components/core/ScrollableContainer/index.js +0 -2
- package/dist/src/components/molecules/ActionButton/ActionButton.d.ts +0 -94
- package/dist/src/components/molecules/ActionButton/ActionButton.js +0 -10
- package/dist/src/components/molecules/ActionButton/index.d.ts +0 -2
- package/dist/src/components/molecules/ActionButton/index.js +0 -2
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.d.ts +0 -16
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.js +0 -50
- package/dist/src/components/molecules/HeadshotImage/index.d.ts +0 -2
- package/dist/src/components/molecules/HeadshotImage/index.js +0 -2
- package/dist/src/components/molecules/Overlay/Overlay.d.ts +0 -34
- package/dist/src/components/molecules/Overlay/Overlay.js +0 -139
- package/dist/src/components/molecules/Overlay/index.d.ts +0 -2
- package/dist/src/components/molecules/Overlay/index.js +0 -2
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.d.ts +0 -104
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.js +0 -27
- package/dist/src/components/molecules/PanelNavButton/index.d.ts +0 -2
- package/dist/src/components/molecules/PanelNavButton/index.js +0 -2
- package/dist/src/components/molecules/SegmentButton/SegmentButton.d.ts +0 -9
- package/dist/src/components/molecules/SegmentButton/SegmentButton.js +0 -10
- package/dist/src/components/molecules/SegmentButton/index.d.ts +0 -2
- package/dist/src/components/molecules/SegmentButton/index.js +0 -2
- package/dist/src/components/molecules/TabLoadError/TabLoadError.d.ts +0 -94
- package/dist/src/components/molecules/TabLoadError/TabLoadError.js +0 -14
- package/dist/src/components/molecules/TabLoadError/index.d.ts +0 -2
- package/dist/src/components/molecules/TabLoadError/index.js +0 -2
- package/dist/src/components/molecules/WatchButton/WatchButton.d.ts +0 -10
- package/dist/src/components/molecules/WatchButton/WatchButton.js +0 -15
- package/dist/src/components/molecules/WatchButton/index.d.ts +0 -2
- package/dist/src/components/molecules/WatchButton/index.js +0 -2
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.d.ts +0 -16
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.js +0 -60
- package/dist/src/components/organisms/PanelNavigation/index.d.ts +0 -2
- package/dist/src/components/organisms/PanelNavigation/index.js +0 -2
- package/dist/src/components/organisms/SegmentController/SegmentController.d.ts +0 -30
- package/dist/src/components/organisms/SegmentController/SegmentController.js +0 -76
- package/dist/src/components/organisms/SegmentController/index.d.ts +0 -3
- package/dist/src/components/organisms/SegmentController/index.js +0 -2
- package/dist/src/development/MaestroEventDelegate.d.ts +0 -27
- package/dist/src/development/MaestroEventDelegate.js +0 -109
- package/dist/src/development/TimeSeek.d.ts +0 -22
- package/dist/src/development/TimeSeek.js +0 -218
- package/dist/src/development/development.d.ts +0 -1
- package/dist/src/development/development.js +0 -36
- package/dist/src/external/AxiosNetworkClient.d.ts +0 -28
- package/dist/src/external/AxiosNetworkClient.js +0 -110
- package/dist/src/external/LocalStorageCacheManager.d.ts +0 -65
- package/dist/src/external/LocalStorageCacheManager.js +0 -213
- package/dist/src/external/ReactRenderer.d.ts +0 -17
- package/dist/src/external/ReactRenderer.js +0 -65
- package/dist/src/external/mocks/MockExternalNetworkClient.d.ts +0 -104
- package/dist/src/external/mocks/MockExternalNetworkClient.js +0 -187
- package/dist/src/external/ports/cacheManager.d.ts +0 -17
- package/dist/src/external/ports/cacheManager.js +0 -1
- package/dist/src/external/ports/networkClient.d.ts +0 -19
- package/dist/src/external/ports/networkClient.js +0 -1
- package/dist/src/external/ports/renderer.d.ts +0 -4
- package/dist/src/external/ports/renderer.js +0 -1
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.d.ts +0 -8
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.js +0 -7
- package/dist/src/external/spatial-navigation/index.d.ts +0 -4
- package/dist/src/external/spatial-navigation/index.js +0 -3
- package/dist/src/external/spatial-navigation/measureLayout.d.ts +0 -2
- package/dist/src/external/spatial-navigation/measureLayout.js +0 -30
- package/dist/src/external/spatial-navigation/spatialNavigation.d.ts +0 -155
- package/dist/src/external/spatial-navigation/spatialNavigation.js +0 -876
- package/dist/src/external/spatial-navigation/utils.d.ts +0 -20
- package/dist/src/external/spatial-navigation/utils.js +0 -6
- package/dist/src/external/spatial-navigation/visualDebugger.d.ts +0 -17
- package/dist/src/external/spatial-navigation/visualDebugger.js +0 -76
- package/dist/src/external/spatial-navigation/withFocusable.d.ts +0 -123
- package/dist/src/external/spatial-navigation/withFocusable.js +0 -245
- package/dist/src/helpers/Observable.d.ts +0 -12
- package/dist/src/helpers/Observable.js +0 -37
- package/dist/src/helpers/strings.d.ts +0 -2
- package/dist/src/helpers/strings.js +0 -14
- package/dist/src/helpers/url.d.ts +0 -1
- package/dist/src/helpers/url.js +0 -12
- package/dist/src/index.d.ts +0 -54
- package/dist/src/index.js +0 -165
- package/dist/src/interfaces/IMaestroEvent.d.ts +0 -126
- package/dist/src/interfaces/IMaestroEvent.js +0 -18
- package/dist/src/interfaces/IMaestroEventDelegate.d.ts +0 -74
- package/dist/src/interfaces/IMaestroEventDelegate.js +0 -1
- package/dist/src/interfaces/IMaestroManager.d.ts +0 -45
- package/dist/src/interfaces/IMaestroManager.js +0 -1
- package/dist/src/interfaces/IUserSettings.d.ts +0 -44
- package/dist/src/interfaces/IUserSettings.js +0 -20
- package/dist/src/models/IModel.d.ts +0 -7
- package/dist/src/models/IModel.js +0 -1
- package/dist/src/models/IPanel.d.ts +0 -15
- package/dist/src/models/IPanel.js +0 -40
- package/dist/src/models/ITheme.d.ts +0 -77
- package/dist/src/models/ITheme.js +0 -20
- package/dist/src/models/IWinningBet.d.ts +0 -7
- package/dist/src/models/IWinningBet.js +0 -1
- package/dist/src/modules/bets/interfaces/IBets.d.ts +0 -192
- package/dist/src/modules/bets/interfaces/IBets.js +0 -1
- package/dist/src/modules/bets/mocks.d.ts +0 -2
- package/dist/src/modules/bets/mocks.js +0 -573
- package/dist/src/modules/bets/types/BetsAnalyticsTypes.d.ts +0 -8
- package/dist/src/modules/bets/types/BetsAnalyticsTypes.js +0 -1
- package/dist/src/modules/bets/view/BetsView.d.ts +0 -28
- package/dist/src/modules/bets/view/BetsView.js +0 -143
- package/dist/src/modules/bets/view/HotProps/HotPropsView.d.ts +0 -100
- package/dist/src/modules/bets/view/HotProps/HotPropsView.js +0 -150
- package/dist/src/modules/bets/view/SixPack/SixPackView.d.ts +0 -23
- package/dist/src/modules/bets/view/SixPack/SixPackView.js +0 -110
- package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.d.ts +0 -6
- package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.js +0 -6
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.d.ts +0 -101
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.js +0 -149
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +0 -26
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +0 -34
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +0 -7
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +0 -18
- package/dist/src/modules/bets/view/UserBets/Boost/Boost.d.ts +0 -7
- package/dist/src/modules/bets/view/UserBets/Boost/Boost.js +0 -6
- package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +0 -6
- package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +0 -9
- package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.d.ts +0 -8
- package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.js +0 -13
- package/dist/src/modules/bets/view/UserBets/Straight/Straight.d.ts +0 -7
- package/dist/src/modules/bets/view/UserBets/Straight/Straight.js +0 -6
- package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.d.ts +0 -7
- package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.js +0 -13
- package/dist/src/modules/bets/view/UserBets/UserBetsView.d.ts +0 -25
- package/dist/src/modules/bets/view/UserBets/UserBetsView.js +0 -107
- package/dist/src/modules/bets/view/components/Bet/Bet.d.ts +0 -158
- package/dist/src/modules/bets/view/components/Bet/Bet.js +0 -32
- package/dist/src/modules/bets/view/components/BetPill/BetPill.d.ts +0 -6
- package/dist/src/modules/bets/view/components/BetPill/BetPill.js +0 -6
- package/dist/src/modules/bets/view/components/BetsCard/BetsCard.d.ts +0 -10
- package/dist/src/modules/bets/view/components/BetsCard/BetsCard.js +0 -15
- package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.d.ts +0 -16
- package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.js +0 -20
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +0 -8
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +0 -14
- package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.d.ts +0 -10
- package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.js +0 -16
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +0 -18
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +0 -78
- package/dist/src/modules/bets/view/components/PromoCodeBanner/index.d.ts +0 -1
- package/dist/src/modules/bets/view/components/PromoCodeBanner/index.js +0 -1
- package/dist/src/modules/bets/view-model/BetsViewModel.d.ts +0 -219
- package/dist/src/modules/bets/view-model/BetsViewModel.js +0 -974
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.d.ts +0 -28
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.js +0 -107
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/index.d.ts +0 -1
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/index.js +0 -1
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.d.ts +0 -102
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.js +0 -20
- package/dist/src/modules/fantasy/components/LeagueCard/index.d.ts +0 -2
- package/dist/src/modules/fantasy/components/LeagueCard/index.js +0 -2
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.d.ts +0 -99
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.js +0 -29
- package/dist/src/modules/fantasy/components/TopPlayerCard/index.d.ts +0 -2
- package/dist/src/modules/fantasy/components/TopPlayerCard/index.js +0 -2
- package/dist/src/modules/fantasy/mocks.d.ts +0 -7620
- package/dist/src/modules/fantasy/mocks.js +0 -3682
- package/dist/src/modules/fantasy/types.d.ts +0 -176
- package/dist/src/modules/fantasy/types.js +0 -6
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.d.ts +0 -21
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.js +0 -74
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/index.js +0 -2
- package/dist/src/modules/fantasy/view/ErrorBoundary.d.ts +0 -13
- package/dist/src/modules/fantasy/view/FantasyItemView.d.ts +0 -22
- package/dist/src/modules/fantasy/view/FantasyItemView.js +0 -74
- package/dist/src/modules/fantasy/view/FantasyView.d.ts +0 -27
- package/dist/src/modules/fantasy/view/FantasyView.js +0 -133
- package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.d.ts +0 -23
- package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.js +0 -95
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.d.ts +0 -98
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.js +0 -13
- package/dist/src/modules/fantasy/view/InactiveLeague/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/InactiveLeague/index.js +0 -2
- package/dist/src/modules/fantasy/view/LoginView/LoginView.d.ts +0 -94
- package/dist/src/modules/fantasy/view/LoginView/LoginView.js +0 -27
- package/dist/src/modules/fantasy/view/LoginView/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/LoginView/index.js +0 -2
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.d.ts +0 -95
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.js +0 -25
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/index.js +0 -2
- package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.d.ts +0 -14
- package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.js +0 -9
- package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.d.ts +0 -100
- package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.js +0 -118
- package/dist/src/modules/fantasy/view/MatchupPair/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/MatchupPair/index.js +0 -2
- package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.d.ts +0 -14
- package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.js +0 -9
- package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.d.ts +0 -100
- package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.js +0 -108
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.d.ts +0 -95
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.js +0 -18
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/index.js +0 -2
- package/dist/src/modules/fantasy/view/MatchupSingle/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/MatchupSingle/index.js +0 -2
- package/dist/src/modules/fantasy/view/PromoView/PromoView.d.ts +0 -98
- package/dist/src/modules/fantasy/view/PromoView/PromoView.js +0 -12
- package/dist/src/modules/fantasy/view/PromoView/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/PromoView/index.js +0 -2
- package/dist/src/modules/fantasy/view/index.d.ts +0 -2
- package/dist/src/modules/fantasy/view/index.js +0 -2
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.FantasyPolling.d.ts +0 -32
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.FantasyPolling.js +0 -132
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.d.ts +0 -32
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.js +0 -141
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.d.ts +0 -148
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.js +0 -534
- package/dist/src/modules/hello-world/HelloWorldImage.d.ts +0 -3
- package/dist/src/modules/hello-world/HelloWorldView.d.ts +0 -11
- package/dist/src/modules/hello-world/HelloWorldView.js +0 -33
- package/dist/src/modules/hello-world/index.d.ts +0 -2
- package/dist/src/modules/hello-world/index.js +0 -2
- package/dist/src/modules/key-plays/constants.d.ts +0 -3
- package/dist/src/modules/key-plays/constants.js +0 -292
- package/dist/src/modules/key-plays/interfaces/IKeyPlays.d.ts +0 -32
- package/dist/src/modules/key-plays/interfaces/IKeyPlays.js +0 -14
- package/dist/src/modules/key-plays/interfaces/IKeyPlaysResponse.d.ts +0 -44
- package/dist/src/modules/key-plays/interfaces/IKeyPlaysResponse.js +0 -1
- package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.d.ts +0 -9
- package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.js +0 -16
- package/dist/src/modules/key-plays/view/KeyPlayCardView.d.ts +0 -39
- package/dist/src/modules/key-plays/view/KeyPlayCardView.js +0 -139
- package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.d.ts +0 -13
- package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.js +0 -65
- package/dist/src/modules/key-plays/view/KeyPlaysView.d.ts +0 -37
- package/dist/src/modules/key-plays/view/KeyPlaysView.js +0 -151
- package/dist/src/modules/key-plays/view-model/KeyPlaysViewModel.d.ts +0 -37
- package/dist/src/modules/key-plays/view-model/KeyPlaysViewModel.js +0 -246
- package/dist/src/modules/shop/mocks.d.ts +0 -22
- package/dist/src/modules/shop/mocks.js +0 -391
- package/dist/src/modules/shop/types.d.ts +0 -161
- package/dist/src/modules/shop/types.js +0 -7
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.d.ts +0 -9
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.js +0 -60
- package/dist/src/modules/shop/view/ProductDetailView/index.d.ts +0 -2
- package/dist/src/modules/shop/view/ProductDetailView/index.js +0 -2
- package/dist/src/modules/shop/view/ShopView.d.ts +0 -35
- package/dist/src/modules/shop/view/ShopView.js +0 -182
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.d.ts +0 -101
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.js +0 -23
- package/dist/src/modules/shop/view/components/BrowseCard/index.d.ts +0 -2
- package/dist/src/modules/shop/view/components/BrowseCard/index.js +0 -2
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.d.ts +0 -102
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.js +0 -26
- package/dist/src/modules/shop/view/components/ProductSummaryCard/index.d.ts +0 -2
- package/dist/src/modules/shop/view/components/ProductSummaryCard/index.js +0 -1
- package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.d.ts +0 -8
- package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.js +0 -19
- package/dist/src/modules/shop/view/components/ShopPromoView/index.d.ts +0 -1
- package/dist/src/modules/shop/view/components/ShopPromoView/index.js +0 -1
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.d.ts +0 -23
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.js +0 -61
- package/dist/src/modules/shop/view/components/ShopSection/ShopSectionItem.d.ts +0 -18
- package/dist/src/modules/shop/view/components/ShopSection/ShopSectionItem.js +0 -22
- package/dist/src/modules/shop/view/components/ShopSection/index.d.ts +0 -1
- package/dist/src/modules/shop/view/components/ShopSection/index.js +0 -1
- package/dist/src/modules/shop/view/index.d.ts +0 -2
- package/dist/src/modules/shop/view/index.js +0 -2
- package/dist/src/modules/shop/view-model/ShopViewModel.ShopPolling.d.ts +0 -31
- package/dist/src/modules/shop/view-model/ShopViewModel.ShopPolling.js +0 -111
- package/dist/src/modules/shop/view-model/ShopViewModel.d.ts +0 -77
- package/dist/src/modules/shop/view-model/ShopViewModel.js +0 -357
- package/dist/src/modules/stats/interfaces/IStats.d.ts +0 -226
- package/dist/src/modules/stats/interfaces/IStats.js +0 -1
- package/dist/src/modules/stats/mocks.d.ts +0 -2
- package/dist/src/modules/stats/mocks.js +0 -746
- package/dist/src/modules/stats/utils/driveSummaryUtils.d.ts +0 -18
- package/dist/src/modules/stats/utils/driveSummaryUtils.js +0 -48
- package/dist/src/modules/stats/utils/renderTeamStatistic.d.ts +0 -20
- package/dist/src/modules/stats/utils/renderTeamStatistic.js +0 -16
- package/dist/src/modules/stats/utils.d.ts +0 -39
- package/dist/src/modules/stats/utils.js +0 -62
- package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.d.ts +0 -22
- package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.js +0 -98
- package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +0 -4
- package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +0 -27
- package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +0 -22
- package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +0 -89
- package/dist/src/modules/stats/view/ActiveAthletes/index.d.ts +0 -2
- package/dist/src/modules/stats/view/ActiveAthletes/index.js +0 -2
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +0 -106
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.js +0 -70
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.d.ts +0 -17
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.js +0 -87
- package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.d.ts +0 -27
- package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.js +0 -129
- package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.d.ts +0 -12
- package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.js +0 -26
- package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.d.ts +0 -10
- package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.js +0 -24
- package/dist/src/modules/stats/view/DriveSummary/index.d.ts +0 -2
- package/dist/src/modules/stats/view/DriveSummary/index.js +0 -2
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.d.ts +0 -21
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.js +0 -48
- package/dist/src/modules/stats/view/GameLeaders/index.d.ts +0 -2
- package/dist/src/modules/stats/view/GameLeaders/index.js +0 -2
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.d.ts +0 -17
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +0 -55
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/index.d.ts +0 -2
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/index.js +0 -1
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +0 -98
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.js +0 -60
- package/dist/src/modules/stats/view/MatchPredictor/index.d.ts +0 -3
- package/dist/src/modules/stats/view/MatchPredictor/index.js +0 -2
- package/dist/src/modules/stats/view/Penalties/Penalties.d.ts +0 -9
- package/dist/src/modules/stats/view/Penalties/Penalties.js +0 -6
- package/dist/src/modules/stats/view/Penalties/index.d.ts +0 -2
- package/dist/src/modules/stats/view/Penalties/index.js +0 -2
- package/dist/src/modules/stats/view/RecentGames/RecentGames.d.ts +0 -98
- package/dist/src/modules/stats/view/RecentGames/RecentGames.js +0 -23
- package/dist/src/modules/stats/view/RecentGames/index.d.ts +0 -2
- package/dist/src/modules/stats/view/RecentGames/index.js +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.d.ts +0 -30
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.js +0 -123
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.d.ts +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.js +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.d.ts +0 -98
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.js +0 -62
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/index.d.ts +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/index.js +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.d.ts +0 -6
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.js +0 -23
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/index.d.ts +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/index.js +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.d.ts +0 -29
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.js +0 -125
- package/dist/src/modules/stats/view/ScoringSummary/index.d.ts +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/index.js +0 -2
- package/dist/src/modules/stats/view/StatsItemView.d.ts +0 -22
- package/dist/src/modules/stats/view/StatsItemView.js +0 -92
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.d.ts +0 -98
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.js +0 -36
- package/dist/src/modules/stats/view/StatsQRCode/index.d.ts +0 -2
- package/dist/src/modules/stats/view/StatsQRCode/index.js +0 -1
- package/dist/src/modules/stats/view/StatsView.d.ts +0 -27
- package/dist/src/modules/stats/view/StatsView.js +0 -137
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.d.ts +0 -98
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.js +0 -43
- package/dist/src/modules/stats/view/TeamStats/index.d.ts +0 -2
- package/dist/src/modules/stats/view/TeamStats/index.js +0 -1
- package/dist/src/modules/stats/view/Teams/StatsCarousel.d.ts +0 -25
- package/dist/src/modules/stats/view/Teams/StatsCarousel.js +0 -83
- package/dist/src/modules/stats/view/Teams/StatsProgressBar.d.ts +0 -6
- package/dist/src/modules/stats/view/Teams/StatsProgressBar.js +0 -19
- package/dist/src/modules/stats/view/Teams/Teams.d.ts +0 -98
- package/dist/src/modules/stats/view/Teams/Teams.js +0 -43
- package/dist/src/modules/stats/view/Teams/index.d.ts +0 -2
- package/dist/src/modules/stats/view/Teams/index.js +0 -2
- package/dist/src/modules/stats/view/WinProbability/WinProbability.d.ts +0 -98
- package/dist/src/modules/stats/view/WinProbability/WinProbability.js +0 -28
- package/dist/src/modules/stats/view/WinProbability/index.d.ts +0 -2
- package/dist/src/modules/stats/view/WinProbability/index.js +0 -2
- package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +0 -113
- package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +0 -89
- package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.d.ts +0 -3
- package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.js +0 -12
- package/dist/src/modules/stats/view/components/AthletesStatistics/index.d.ts +0 -2
- package/dist/src/modules/stats/view/components/AthletesStatistics/index.js +0 -2
- package/dist/src/modules/stats/view/index.d.ts +0 -2
- package/dist/src/modules/stats/view/index.js +0 -2
- package/dist/src/modules/stats/view-model/StatsViewModel.d.ts +0 -241
- package/dist/src/modules/stats/view-model/StatsViewModel.js +0 -989
- package/dist/src/sentry.d.ts +0 -3
- package/dist/src/sentry.js +0 -31
- package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +0 -84
- package/dist/src/services/AnalyticsService/AnalyticsService.js +0 -404
- package/dist/src/services/AnalyticsService/types.d.ts +0 -65
- package/dist/src/services/AnalyticsService/types.js +0 -1
- package/dist/src/services/BetsService.d.ts +0 -81
- package/dist/src/services/BetsService.js +0 -122
- package/dist/src/services/FantasyService.d.ts +0 -53
- package/dist/src/services/FantasyService.js +0 -92
- package/dist/src/services/GlobalService/GlobalService.d.ts +0 -9
- package/dist/src/services/GlobalService/PageService.d.ts +0 -9
- package/dist/src/services/GlobalService/index.d.ts +0 -2
- package/dist/src/services/GlobalService/mocks.d.ts +0 -2
- package/dist/src/services/GlobalService/types.d.ts +0 -11
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +0 -279
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.js +0 -386
- package/dist/src/services/InsightsService/InsightsService.d.ts +0 -11
- package/dist/src/services/InsightsService/InsightsService.js +0 -74
- package/dist/src/services/NetworkManager/NetworkManager.d.ts +0 -147
- package/dist/src/services/NetworkManager/NetworkManager.js +0 -457
- package/dist/src/services/NetworkManager/NetworkManagerFactory.d.ts +0 -42
- package/dist/src/services/NetworkManager/NetworkManagerFactory.js +0 -101
- package/dist/src/services/NetworkManager/errors.d.ts +0 -17
- package/dist/src/services/NetworkManager/errors.js +0 -45
- package/dist/src/services/NetworkManager/types.d.ts +0 -103
- package/dist/src/services/NetworkManager/types.js +0 -10
- package/dist/src/services/PageService/PageService.d.ts +0 -9
- package/dist/src/services/PageService/PageService.js +0 -39
- package/dist/src/services/PageService/index.d.ts +0 -2
- package/dist/src/services/PageService/index.js +0 -2
- package/dist/src/services/PageService/mocks.d.ts +0 -2
- package/dist/src/services/PageService/mocks.js +0 -104
- package/dist/src/services/PageService/types.d.ts +0 -76
- package/dist/src/services/PageService/types.js +0 -1
- package/dist/src/services/ShopService.d.ts +0 -23
- package/dist/src/services/ShopService.js +0 -46
- package/dist/src/services/StaticService/PageService.d.ts +0 -9
- package/dist/src/services/StaticService/StaticService.d.ts +0 -12
- package/dist/src/services/StaticService/StaticService.js +0 -59
- package/dist/src/services/StaticService/index.d.ts +0 -2
- package/dist/src/services/StaticService/index.js +0 -2
- package/dist/src/services/StaticService/mocks.d.ts +0 -2
- package/dist/src/services/StaticService/mocks.js +0 -104
- package/dist/src/services/StaticService/types.d.ts +0 -76
- package/dist/src/services/StaticService/types.js +0 -1
- package/dist/src/services/StatsService.d.ts +0 -46
- package/dist/src/services/StatsService.js +0 -147
- package/dist/src/services/ThemeManager/constants.d.ts +0 -2
- package/dist/src/services/ThemeManager/constants.js +0 -47
- package/dist/src/services/UserSettingsManager.d.ts +0 -63
- package/dist/src/services/UserSettingsManager.js +0 -155
- package/dist/src/test-polyfills.d.ts +0 -1
- package/dist/src/test-polyfills.js +0 -15
- package/dist/src/types/OverlayTypes.d.ts +0 -43
- package/dist/src/types/OverlayTypes.js +0 -4
- package/dist/src/view-models/MaestroEventViewModel.d.ts +0 -63
- package/dist/src/view-models/MaestroEventViewModel.js +0 -304
- package/dist/src/view-models/OverlayViewModel.d.ts +0 -33
- package/dist/src/view-models/OverlayViewModel.js +0 -222
- package/dist/src/view-models/PanelManagerViewModel.d.ts +0 -46
- package/dist/src/view-models/PanelManagerViewModel.js +0 -212
- package/dist/src/view-models/ViewModel.d.ts +0 -12
- package/dist/src/view-models/ViewModel.js +0 -32
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1733 @@
|
|
|
1
|
+
// Generated by dts-bundle v0.7.3
|
|
2
|
+
// Dependencies for this module:
|
|
3
|
+
// ../../../@/services/AnalyticsService/types
|
|
4
|
+
// ../../../@/models/IPanel
|
|
5
|
+
// ../../../@/external/spatial-navigation/spatialNavigation
|
|
6
|
+
// ../../../@/modules/fantasy/view-model/FantasyViewModel
|
|
7
|
+
// ../../../@/modules/shop/view-model/ShopViewModel
|
|
8
|
+
// ../../../@/models/ITheme
|
|
9
|
+
// ../../../react
|
|
10
|
+
// ../../../@/types/OverlayTypes
|
|
11
|
+
// ../../../@/models/IWinningBet
|
|
12
|
+
// ../../../@/helpers/Observable
|
|
13
|
+
// ../../../@/services/AnalyticsService/AnalyticsService
|
|
14
|
+
// ../../../@/interfaces/IMaestroEvent
|
|
15
|
+
// ../../../@/interfaces/IMaestroEventDelegate
|
|
16
|
+
// ../../../@/services/StatsService
|
|
17
|
+
// ../../../@/external/spatial-navigation
|
|
18
|
+
// ../../../@/modules/stats/interfaces/IStats
|
|
19
|
+
|
|
20
|
+
declare module '@maestro_io/maestro-web-sdk' {
|
|
21
|
+
import IMaestroEventDelegate, { PanelEvent } from '@maestro_io/maestro-web-sdk/interfaces/IMaestroEventDelegate';
|
|
22
|
+
import IMaestroManager, { SDKConfigParams } from '@maestro_io/maestro-web-sdk/interfaces/IMaestroManager';
|
|
23
|
+
import IMaestroEvent from '@maestro_io/maestro-web-sdk/interfaces/IMaestroEvent';
|
|
24
|
+
import { MaestroEventViewModel } from '@maestro_io/maestro-web-sdk/view-models/MaestroEventViewModel';
|
|
25
|
+
import IMaestroKeyPlaysResponse from '@maestro_io/maestro-web-sdk/modules/key-plays/interfaces/IKeyPlaysResponse';
|
|
26
|
+
import { IUserSettings } from '@maestro_io/maestro-web-sdk/interfaces/IUserSettings';
|
|
27
|
+
import { GlobalConfig, PageConfig } from '@maestro_io/maestro-web-sdk/services/StaticService/types';
|
|
28
|
+
import { MaestroPanelType } from '@maestro_io/maestro-web-sdk/models/IPanel';
|
|
29
|
+
export { default as Overlay } from '@maestro_io/maestro-web-sdk/components/molecules/Overlay/Overlay';
|
|
30
|
+
export { OverlayType, IMaestroOverlayEvent, IOverlaySize, IOverlayPosition, IFantasyPayload, IOverlayAnalyticsEvent, } from '@maestro_io/maestro-web-sdk/types/OverlayTypes';
|
|
31
|
+
export { IWinningBet } from '@maestro_io/maestro-web-sdk/models/IWinningBet';
|
|
32
|
+
export { ActionTrackEvent, ImpressionTrackEvent, Metadata, PanelClickAction, PanelViewAction, } from '@maestro_io/maestro-web-sdk/services/AnalyticsService/types';
|
|
33
|
+
export { PanelEvent, IMaestroEventDelegate, IMaestroEvent, IMaestroKeyPlaysResponse, MaestroPanelType, };
|
|
34
|
+
export { IUserSettings, DEFAULT_USER_SETTINGS, } from '@maestro_io/maestro-web-sdk/interfaces/IUserSettings';
|
|
35
|
+
/**
|
|
36
|
+
* Main SDK class that serves as the entry point for the Maestro TV SDK
|
|
37
|
+
* Follows a singleton pattern similar to the Swift implementation
|
|
38
|
+
*/
|
|
39
|
+
class MaestroWebSDK implements IMaestroManager {
|
|
40
|
+
/**
|
|
41
|
+
* @description Returns the MaestroWebSDK instance
|
|
42
|
+
* @returns {MaestroWebSDK} - The MaestroWebSDK instance
|
|
43
|
+
*/
|
|
44
|
+
static getInstance(): MaestroWebSDK;
|
|
45
|
+
userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate, userSettings?: IUserSettings): Promise<IMaestroEvent>;
|
|
46
|
+
userDidStopWatchingEvent(_: string): Promise<void>;
|
|
47
|
+
configure(configParams: SDKConfigParams): void;
|
|
48
|
+
/**
|
|
49
|
+
* Sets the site ID for the SDK
|
|
50
|
+
* @param siteID The site ID to set
|
|
51
|
+
*/
|
|
52
|
+
setSiteID(siteID: string): void;
|
|
53
|
+
getSiteID(): string;
|
|
54
|
+
/**
|
|
55
|
+
* Gets the event view model
|
|
56
|
+
* @returns The current event view model
|
|
57
|
+
*/
|
|
58
|
+
getMaestroEventViewModel(): MaestroEventViewModel;
|
|
59
|
+
renderPanel(id: string): Promise<() => Promise<void>>;
|
|
60
|
+
getPageConfig(): PageConfig | null;
|
|
61
|
+
getGlobalConfig(): GlobalConfig | null;
|
|
62
|
+
}
|
|
63
|
+
const SDK: MaestroWebSDK;
|
|
64
|
+
export default SDK;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare module '@maestro_io/maestro-web-sdk/interfaces/IMaestroEventDelegate' {
|
|
68
|
+
import { ActionTrackEvent, ImpressionTrackEvent } from '@/services/AnalyticsService/types';
|
|
69
|
+
export type RequestLoginPanelEvent = {
|
|
70
|
+
type: 'fantasy:request:login';
|
|
71
|
+
payload: {
|
|
72
|
+
/**
|
|
73
|
+
* @description Callback to be called by the client app once the login process is completed, so the SDK can refresh its state accordingly.
|
|
74
|
+
*/
|
|
75
|
+
onLoginSuccess: () => void;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export type PanelEvent = RequestLoginPanelEvent;
|
|
79
|
+
/**
|
|
80
|
+
* @description Interface for the client app to implement in order to handle Maestro TV SDK events.
|
|
81
|
+
*/
|
|
82
|
+
export default interface IMaestroEventDelegate {
|
|
83
|
+
/**
|
|
84
|
+
* @description Allows the SDK to tell the client app that the user has encountered an error screen for lack of valid key
|
|
85
|
+
plays data, indicating the client app should call `updateKeyPlaysData` as soon as possible.
|
|
86
|
+
https://developers.maestro.io/sdk/web/event-delegate/userRequestedNewKeyPlaysData
|
|
87
|
+
*/
|
|
88
|
+
userRequestedNewKeyPlaysData(): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Allows the SDK to request the client app play a particular key plays clip, given its array index in the key plays list. Note that the `MaestroKeyPlaysResponse` subdivides the key plays by section, so the `index` referenced here assumes the client app has access to a flattened list of the key plays, disregarding the sectional subdivisions.
|
|
91
|
+
* https://developers.maestro.io/sdk/web/event-delegate/playClip
|
|
92
|
+
*/
|
|
93
|
+
playClip(atIndex: number): void;
|
|
94
|
+
/**
|
|
95
|
+
* @description SDK can notify the client app when its time to handle the focus management.
|
|
96
|
+
* https://developers.maestro.io/sdk/web/event-delegate/startFocusManagement
|
|
97
|
+
*/
|
|
98
|
+
startFocusManagement(): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* @description Check if the user is authenticated for betting.
|
|
101
|
+
* https://developers.maestro.io/sdk/web/event-delegate/userIsAuthenticated
|
|
102
|
+
*/
|
|
103
|
+
userIsAuthenticated(): Promise<boolean>;
|
|
104
|
+
/**
|
|
105
|
+
* @description Get the user's SWID for authenticated betting requests.
|
|
106
|
+
* https://developers.maestro.io/sdk/web/event-delegate/getUserSWID
|
|
107
|
+
*/
|
|
108
|
+
getUserSWID(): Promise<string | null>;
|
|
109
|
+
/**
|
|
110
|
+
* @description Get the user's Cookie token for authenticated betting requests.
|
|
111
|
+
* https://developers.maestro.io/sdk/web/event-delegate/getUserToken
|
|
112
|
+
*/
|
|
113
|
+
getUserToken(): Promise<string | null>;
|
|
114
|
+
/**
|
|
115
|
+
* @description Get the API base URL for betting-related requests.
|
|
116
|
+
* This baseURL is used to fetch betting data, such as odds and betting lines.
|
|
117
|
+
* https://developers.maestro.io/sdk/web/event-delegate/getBettingAPIBaseURL
|
|
118
|
+
*/
|
|
119
|
+
getBettingAPIBaseURL(): string;
|
|
120
|
+
/**
|
|
121
|
+
* @description Get the API base URL for stats-related requests.
|
|
122
|
+
* This baseURL is used to fetch stats data for the event.
|
|
123
|
+
*
|
|
124
|
+
*/
|
|
125
|
+
getStatsAPIBaseURL(): string;
|
|
126
|
+
/**
|
|
127
|
+
* @description Track an user's action event for analytics. (i.e. key play clicked)
|
|
128
|
+
* https://developers.maestro.io/sdk/web/event-delegate/trackAction
|
|
129
|
+
*/
|
|
130
|
+
trackAction(action: ActionTrackEvent): void;
|
|
131
|
+
/**
|
|
132
|
+
* @description Track an impression event for analytics. (i.e. panel view)
|
|
133
|
+
* https://developers.maestro.io/sdk/web/event-delegate/trackImpression
|
|
134
|
+
*/
|
|
135
|
+
trackImpression(impression: ImpressionTrackEvent): void;
|
|
136
|
+
/**
|
|
137
|
+
* @description Notify the client app of a panel event within the SDK that may require handling by the client app. (i.e. request login)
|
|
138
|
+
* https://developers.maestro.io/sdk/web/event-delegate/onPanelEvent
|
|
139
|
+
*/
|
|
140
|
+
onPanelEvent(event: PanelEvent): void;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
declare module '@maestro_io/maestro-web-sdk/interfaces/IMaestroManager' {
|
|
145
|
+
import IMaestroEventDelegate from '@maestro_io/maestro-web-sdk/interfaces/IMaestroEventDelegate';
|
|
146
|
+
import IMaestroEvent from '@maestro_io/maestro-web-sdk/interfaces/IMaestroEvent';
|
|
147
|
+
import { IUserSettings } from '@maestro_io/maestro-web-sdk/interfaces/IUserSettings';
|
|
148
|
+
export type SDKConfigParams = {
|
|
149
|
+
/**
|
|
150
|
+
* The site ID to use for the SDK.
|
|
151
|
+
*/
|
|
152
|
+
siteID: string;
|
|
153
|
+
/**
|
|
154
|
+
* User settings for customizing SDK behavior (panel visibility, feature toggles, etc.)
|
|
155
|
+
*/
|
|
156
|
+
userSettings?: IUserSettings;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
This is the MaestroKit top-level API for initializing and configuring the framework. It encompasses all functionality that is not specific to an event.
|
|
160
|
+
*/
|
|
161
|
+
export default interface IMaestroManager {
|
|
162
|
+
/**
|
|
163
|
+
* @description Configure the MaestroWebSDK.
|
|
164
|
+
* @param {SDKConfigParams} configParams - Configuration parameters
|
|
165
|
+
* @param {SDKConfigParams['siteID']} configParams.siteID - The site ID to use for the SDK.
|
|
166
|
+
* @param {SDKConfigParams['userSettings']} configParams.userSettings - User settings for customizing SDK behavior.
|
|
167
|
+
*/
|
|
168
|
+
configure(configParams: SDKConfigParams): void;
|
|
169
|
+
/**
|
|
170
|
+
Tells the SDK the user has opened an event in the app's player.
|
|
171
|
+
Arguments:
|
|
172
|
+
- eventID: The Event ID for the event opened in the player.
|
|
173
|
+
- delegate: an instance of the app's implementation of IMaestroEventDelegate
|
|
174
|
+
- userSettings: Optional user settings to override the configured settings for this event
|
|
175
|
+
The function returns an instance of MaestroEventViewModel, which includes an implementation of IMaestroEvent. IMaestroEvent represents the app-facing portion of the MaestroKit API related to the currently-loaded event. So after `userDidStartWatchingEvent` is called, the SDK has access to the API detailed in `MaestroEventDelegate` for making calls to the app, and the app has access to the API detailed in `IMaestroEvent` for making calls to the SDK.
|
|
176
|
+
*/
|
|
177
|
+
userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate, userSettings?: IUserSettings): Promise<IMaestroEvent>;
|
|
178
|
+
/**
|
|
179
|
+
* @description Tells the SDK the user has closed an event that was open in the app's player.
|
|
180
|
+
* @param eventID
|
|
181
|
+
*/
|
|
182
|
+
userDidStopWatchingEvent(eventID: string): void;
|
|
183
|
+
/**
|
|
184
|
+
* Render the PanelManager with the available panels for the current event in the specified HTML id element.
|
|
185
|
+
* @param id - The ID of the HTML element where the panel will be rendered.
|
|
186
|
+
* @return A Promise that resolves to an async function to remove the panel when no longer needed.
|
|
187
|
+
*/
|
|
188
|
+
renderPanel(id: string): Promise<() => Promise<void>>;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare module '@maestro_io/maestro-web-sdk/interfaces/IMaestroEvent' {
|
|
193
|
+
import { MaestroPanelType } from '@/models/IPanel';
|
|
194
|
+
import IMaestroKeyPlaysResponse from '@maestro_io/maestro-web-sdk/modules/key-plays/interfaces/IKeyPlaysResponse';
|
|
195
|
+
import { IUserSettings } from '@maestro_io/maestro-web-sdk/interfaces/IUserSettings';
|
|
196
|
+
/**
|
|
197
|
+
* This is the public API that the app can use to make calls to the SDK related to the currently-loaded event.
|
|
198
|
+
*/
|
|
199
|
+
export default interface IMaestroEvent {
|
|
200
|
+
/**
|
|
201
|
+
* @description Tells the SDK that the user just started playing a new key play clip at the given index.
|
|
202
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/playback-controls/didStartPlayingClip
|
|
203
|
+
*/
|
|
204
|
+
didStartPlayingClip(index: number): void;
|
|
205
|
+
/**
|
|
206
|
+
* @description Tells the SDK that the user just stopped playing a key play clip at the given index.
|
|
207
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/playback-controls/didStopPlayingClip
|
|
208
|
+
*/
|
|
209
|
+
didStopPlayingClip(index: number): void;
|
|
210
|
+
/**
|
|
211
|
+
* @description Tells the SDK that the user tried to play the clip but it failed to play back.
|
|
212
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/playback-controls/didFailToPlayClip
|
|
213
|
+
*/
|
|
214
|
+
didFailToPlayClip(index: number): void;
|
|
215
|
+
/**
|
|
216
|
+
* @description Updates the SDK with the latest progress in the playback of the currently-played key play clip, from 0 to 1.
|
|
217
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/playback-controls/didUpdatePlaybackProgressOfClip
|
|
218
|
+
*/
|
|
219
|
+
didUpdatePlaybackProgressOfClip(index: number, to: number): void;
|
|
220
|
+
/**
|
|
221
|
+
* @description Tells the SDK that the app displayed the MaestroPanel.
|
|
222
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/panel-management/didShowPanel
|
|
223
|
+
*/
|
|
224
|
+
didShowPanel(): Promise<void>;
|
|
225
|
+
/**
|
|
226
|
+
* @description Tells the SDK that the app hid the MaestroPanel.
|
|
227
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/panel-management/didHidePanel
|
|
228
|
+
*/
|
|
229
|
+
didHidePanel(): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* @description Alerts the SDK that the current event does not support key plays.
|
|
232
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/panel-management/currentEventDoesNotSupportKeyPlays
|
|
233
|
+
*/
|
|
234
|
+
currentEventDoesNotSupportKeyPlays(): void;
|
|
235
|
+
/**
|
|
236
|
+
* @description Retrieves the event ID for the currently loaded event.
|
|
237
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/getCurrentEventID
|
|
238
|
+
*/
|
|
239
|
+
getCurrentEventID(): string | null;
|
|
240
|
+
/**
|
|
241
|
+
* @description Retrieves the array index of the key play clip that is currently being played.
|
|
242
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/getCurrentlyPlayingClipIndex
|
|
243
|
+
*/
|
|
244
|
+
getCurrentlyPlayingClipIndex(): number | null;
|
|
245
|
+
/**
|
|
246
|
+
* @description Retrieves the array index of the key plays clip that was most recently played.
|
|
247
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/getLastPlayedClipIndex
|
|
248
|
+
*/
|
|
249
|
+
getLastPlayedClipIndex(): number | null;
|
|
250
|
+
/**
|
|
251
|
+
* @description Retrieves the progress (between 0 and 1) of the currently-played key play clip.
|
|
252
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/getCurrentClipPlaybackProgress
|
|
253
|
+
*/
|
|
254
|
+
getCurrentClipPlaybackProgress(): number | null;
|
|
255
|
+
/**
|
|
256
|
+
* @description Retrieves the number of key plays.
|
|
257
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/getKeyPlaysCount
|
|
258
|
+
*/
|
|
259
|
+
getKeyPlaysCount(): number | null;
|
|
260
|
+
/**
|
|
261
|
+
* @description Tells the SDK to start managing focus.
|
|
262
|
+
* https://developers.maestro.io/sdk/web/focus-management/parent-app-focus
|
|
263
|
+
*/
|
|
264
|
+
startFocusManagement(): Promise<void>;
|
|
265
|
+
/**
|
|
266
|
+
* @description Feeds the SDK new key plays data. A null value indicates a failure to retrieve the data.
|
|
267
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/updateKeyPlaysData
|
|
268
|
+
*/
|
|
269
|
+
updateKeyPlaysData(data: IMaestroKeyPlaysResponse | null): Promise<void>;
|
|
270
|
+
updateUserSettings(settings: IUserSettings): Promise<void>;
|
|
271
|
+
/**
|
|
272
|
+
* @description Updates the SDK with the current time code of the player.
|
|
273
|
+
* This is used to synchronize the SDK with the player's current time code.
|
|
274
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/updatePlayerTimeCode
|
|
275
|
+
*/
|
|
276
|
+
updatePlayerTimeCode(timestamp: number): void;
|
|
277
|
+
/**
|
|
278
|
+
* @description Retrieves the current player time code stored in the SDK.
|
|
279
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/getPlayerTimeCode
|
|
280
|
+
*/
|
|
281
|
+
getPlayerTimeCode(): number | null;
|
|
282
|
+
/**
|
|
283
|
+
* @description Sets data on panel view models. Interface to pass any data to any panel.
|
|
284
|
+
* @param {Record<string, any>} panelData - Object with panel names as keys and their data as values
|
|
285
|
+
* @example
|
|
286
|
+
* setDataToPanel({
|
|
287
|
+
* [panelType]: {
|
|
288
|
+
* overrideUrl: 'https://...',
|
|
289
|
+
* customProperty: 'value'
|
|
290
|
+
* },
|
|
291
|
+
* })
|
|
292
|
+
*/
|
|
293
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
294
|
+
simulateUseCase<T = any>(useCase: TestUseCase, panelType: MaestroPanelType, testData?: T): void;
|
|
295
|
+
/**
|
|
296
|
+
* @description Sets the active panel in the Maestro SDK, if the panel is available and not hidden.
|
|
297
|
+
* @param {MaestroPanelType} panelType - The type of the panel to set as active
|
|
298
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/setActivePanel
|
|
299
|
+
*/
|
|
300
|
+
setActivePanel(panelType: MaestroPanelType): void;
|
|
301
|
+
}
|
|
302
|
+
const TEST_USE_CASES: {
|
|
303
|
+
readonly betsTabLoadFailure: "betsTabLoadFailure";
|
|
304
|
+
readonly betsMockData: "betsMockData";
|
|
305
|
+
readonly betsLiveData: "betsLiveData";
|
|
306
|
+
readonly showBasketballPreGameStatsMockData: "showBasketballPreGameStatsMockData";
|
|
307
|
+
readonly showBasketballInGameStatsMockData: "showBasketballInGameStatsMockData";
|
|
308
|
+
readonly showFootballPreGameStatsMockData: "showFootballPreGameStatsMockData";
|
|
309
|
+
readonly showFootballInGameStatsMockData: "showFootballInGameStatsMockData";
|
|
310
|
+
readonly showHockeyPreGameStatsMockData: "showHockeyPreGameStatsMockData";
|
|
311
|
+
readonly showHockeyInGameStatsMockData: "showHockeyInGameStatsMockData";
|
|
312
|
+
readonly shopTabLoadFailure: "shopTabLoadFailure";
|
|
313
|
+
readonly shopEmptyState: "shopEmptyState";
|
|
314
|
+
readonly shopMockData: "shopMockData";
|
|
315
|
+
readonly shopLiveData: "shopLiveData";
|
|
316
|
+
};
|
|
317
|
+
export type TestUseCase = typeof TEST_USE_CASES[keyof typeof TEST_USE_CASES];
|
|
318
|
+
export {};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
declare module '@maestro_io/maestro-web-sdk/view-models/MaestroEventViewModel' {
|
|
322
|
+
import IMaestroEventDelegate from '@maestro_io/maestro-web-sdk/interfaces/IMaestroEventDelegate';
|
|
323
|
+
import IMaestroEvent, { TestUseCase } from '@maestro_io/maestro-web-sdk/interfaces/IMaestroEvent';
|
|
324
|
+
import { Observable } from '@maestro_io/maestro-web-sdk/helpers/Observable';
|
|
325
|
+
import { ViewModel } from '@maestro_io/maestro-web-sdk/view-models/ViewModel';
|
|
326
|
+
import KeyPlaysViewModel from '@maestro_io/maestro-web-sdk/modules/key-plays/view-model/KeyPlaysViewModel';
|
|
327
|
+
import BetsViewModel from '@maestro_io/maestro-web-sdk/modules/bets/view-model/BetsViewModel';
|
|
328
|
+
import SpatialNavigation from '@/external/spatial-navigation/spatialNavigation';
|
|
329
|
+
import StatsViewModel from '@maestro_io/maestro-web-sdk/modules/stats/view-model/StatsViewModel';
|
|
330
|
+
import IMaestroKeyPlaysResponse from '@maestro_io/maestro-web-sdk/modules/key-plays/interfaces/IKeyPlaysResponse';
|
|
331
|
+
import { MaestroPanelType } from '@/models/IPanel';
|
|
332
|
+
import { IUserSettings } from '@maestro_io/maestro-web-sdk/interfaces/IUserSettings';
|
|
333
|
+
import { PanelManagerViewModel } from '@maestro_io/maestro-web-sdk/view-models/PanelManagerViewModel';
|
|
334
|
+
import FantasyViewModel from '@/modules/fantasy/view-model/FantasyViewModel';
|
|
335
|
+
import ShopViewModel from '@/modules/shop/view-model/ShopViewModel';
|
|
336
|
+
export class MaestroEventViewModel extends ViewModel implements IMaestroEvent {
|
|
337
|
+
delegate: IMaestroEventDelegate;
|
|
338
|
+
keyPlaysViewModel: KeyPlaysViewModel | null;
|
|
339
|
+
fantasyViewModel: FantasyViewModel | null;
|
|
340
|
+
betsViewModel: BetsViewModel | null;
|
|
341
|
+
statsViewModel: StatsViewModel | null;
|
|
342
|
+
shopViewModel: ShopViewModel | null;
|
|
343
|
+
panelManagerViewModel: PanelManagerViewModel;
|
|
344
|
+
navigation: SpatialNavigation;
|
|
345
|
+
constructor(eventId: string | undefined, delegate: IMaestroEventDelegate);
|
|
346
|
+
setActivePanel(panelType: MaestroPanelType): void;
|
|
347
|
+
updatePlayerTimeCode(timestamp: number): void;
|
|
348
|
+
getPlayerTimeCode(): number | null;
|
|
349
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
350
|
+
deinit(): Promise<void>;
|
|
351
|
+
updateKeyPlaysData(data: IMaestroKeyPlaysResponse | null): Promise<void>;
|
|
352
|
+
updateUserSettings(settings: IUserSettings): Promise<void>;
|
|
353
|
+
startFocusManagement(): Promise<void>;
|
|
354
|
+
didStartPlayingClip(index: number): void;
|
|
355
|
+
didStopPlayingClip(index: number): void;
|
|
356
|
+
didFailToPlayClip(index: number): void;
|
|
357
|
+
didUpdatePlaybackProgressOfClip(index: number, to: number): void;
|
|
358
|
+
didShowPanel(): Promise<void>;
|
|
359
|
+
didHidePanel(): Promise<void>;
|
|
360
|
+
didShowOverlay(): Promise<void>;
|
|
361
|
+
didHideOverlay(): Promise<void>;
|
|
362
|
+
currentEventDoesNotSupportKeyPlays(): void;
|
|
363
|
+
getCurrentEventID(): string;
|
|
364
|
+
getCurrentlyPlayingClipIndex(): number | null;
|
|
365
|
+
getLastPlayedClipIndex(): number | null;
|
|
366
|
+
getCurrentClipPlaybackProgress(): number | null;
|
|
367
|
+
getKeyPlaysCount(): number;
|
|
368
|
+
get eventId(): Observable<string>;
|
|
369
|
+
get title(): Observable<string>;
|
|
370
|
+
get isLive(): Observable<boolean>;
|
|
371
|
+
get isShowingPanel(): boolean;
|
|
372
|
+
set isShowingPanel(value: boolean);
|
|
373
|
+
simulateUseCase<T = any>(useCase: TestUseCase, panelType: MaestroPanelType, testData?: T): void;
|
|
374
|
+
/**
|
|
375
|
+
* This method is called when the user navigates to the MaestroEventViewModel.
|
|
376
|
+
* It will pause navigation and start focus management.
|
|
377
|
+
*/
|
|
378
|
+
deliverFocus(): void;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
declare module '@maestro_io/maestro-web-sdk/modules/key-plays/interfaces/IKeyPlaysResponse' {
|
|
383
|
+
type TeamId = string;
|
|
384
|
+
type AthleteId = string;
|
|
385
|
+
export default interface IMaestroKeyPlaysResponse {
|
|
386
|
+
entities?: {
|
|
387
|
+
team?: Record<TeamId, IMaestroKeyPlaysTeam>;
|
|
388
|
+
athlete?: Record<AthleteId, MaestroKeyPlaysAthlete>;
|
|
389
|
+
};
|
|
390
|
+
sections: MaestroKeyPlaysSection[];
|
|
391
|
+
}
|
|
392
|
+
interface IMaestroKeyPlaysTeam {
|
|
393
|
+
id: string;
|
|
394
|
+
displayName: string;
|
|
395
|
+
shortName: string;
|
|
396
|
+
color: string;
|
|
397
|
+
alternateColor: string;
|
|
398
|
+
homeAway: string;
|
|
399
|
+
displayOrder: string;
|
|
400
|
+
logoRef: string;
|
|
401
|
+
logoDarkRef: string;
|
|
402
|
+
}
|
|
403
|
+
interface MaestroKeyPlaysAthlete {
|
|
404
|
+
id: string;
|
|
405
|
+
shortName: string;
|
|
406
|
+
headshot: string;
|
|
407
|
+
}
|
|
408
|
+
interface MaestroKeyPlaysSection {
|
|
409
|
+
title?: string;
|
|
410
|
+
items: MaestroKeyPlay[];
|
|
411
|
+
}
|
|
412
|
+
interface MaestroKeyPlay {
|
|
413
|
+
description: string;
|
|
414
|
+
team?: string;
|
|
415
|
+
wallClock?: string;
|
|
416
|
+
displayClock?: string;
|
|
417
|
+
shortPeriod?: string;
|
|
418
|
+
scoringPlay?: boolean;
|
|
419
|
+
athlete?: string;
|
|
420
|
+
thumbnail: string;
|
|
421
|
+
thumbnailType: string;
|
|
422
|
+
clipID: string;
|
|
423
|
+
awayScore?: string;
|
|
424
|
+
homeScore?: string;
|
|
425
|
+
}
|
|
426
|
+
export {};
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
declare module '@maestro_io/maestro-web-sdk/interfaces/IUserSettings' {
|
|
430
|
+
/**
|
|
431
|
+
* User settings interface for customizing Maestro Web SDK behavior
|
|
432
|
+
* Supports panel-level and feature-level customizations
|
|
433
|
+
*/
|
|
434
|
+
export interface IUserSettings {
|
|
435
|
+
panels?: {
|
|
436
|
+
bets?: {
|
|
437
|
+
/** Hide the entire bets panel from panel selection */
|
|
438
|
+
hidePanel?: boolean;
|
|
439
|
+
/** Hide wager values (dollar amounts) in betting cards */
|
|
440
|
+
hideWagers?: boolean;
|
|
441
|
+
};
|
|
442
|
+
stats?: {
|
|
443
|
+
/** Hide the entire stats panel from panel selection */
|
|
444
|
+
hidePanel?: boolean;
|
|
445
|
+
};
|
|
446
|
+
keyPlays?: {
|
|
447
|
+
/** Hide the entire key plays panel from panel selection */
|
|
448
|
+
hidePanel?: boolean;
|
|
449
|
+
};
|
|
450
|
+
fantasy?: {
|
|
451
|
+
/** Hide the entire fantasy panel from panel selection */
|
|
452
|
+
hidePanel?: boolean;
|
|
453
|
+
};
|
|
454
|
+
shop?: {
|
|
455
|
+
/** Hide the entire shop panel from panel selection */
|
|
456
|
+
hidePanel?: boolean;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Default user settings - all features enabled by default
|
|
462
|
+
*/
|
|
463
|
+
export const DEFAULT_USER_SETTINGS: IUserSettings;
|
|
464
|
+
/**
|
|
465
|
+
* Panel-specific settings type helpers
|
|
466
|
+
*/
|
|
467
|
+
export type BetsSettings = NonNullable<IUserSettings['panels']>['bets'];
|
|
468
|
+
export type StatsSettings = NonNullable<IUserSettings['panels']>['stats'];
|
|
469
|
+
export type KeyPlaysSettings = NonNullable<IUserSettings['panels']>['keyPlays'];
|
|
470
|
+
/**
|
|
471
|
+
* Utility type for getting panel settings by panel type
|
|
472
|
+
*/
|
|
473
|
+
export type PanelSettings<T extends keyof NonNullable<IUserSettings['panels']>> = NonNullable<IUserSettings['panels']>[T];
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
declare module '@maestro_io/maestro-web-sdk/services/StaticService/types' {
|
|
477
|
+
import ITheme from '@/models/ITheme';
|
|
478
|
+
type PlatformConfig = {
|
|
479
|
+
analytics: {
|
|
480
|
+
enabled: boolean;
|
|
481
|
+
beacon_interval: number;
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
export interface GlobalConfig {
|
|
485
|
+
shards: string[];
|
|
486
|
+
bbd: PlatformConfig;
|
|
487
|
+
}
|
|
488
|
+
interface PageConfigPanel<TRendererData = unknown, TBlockData = any> {
|
|
489
|
+
_id: string;
|
|
490
|
+
slug: string;
|
|
491
|
+
panel_name?: string;
|
|
492
|
+
panel_type?: string;
|
|
493
|
+
icon_name?: string;
|
|
494
|
+
renderer?: {
|
|
495
|
+
block_data?: TBlockData;
|
|
496
|
+
icon_name?: string;
|
|
497
|
+
id?: string;
|
|
498
|
+
panel_name?: string;
|
|
499
|
+
panel_type?: string;
|
|
500
|
+
supported_platforms?: {
|
|
501
|
+
android?: boolean;
|
|
502
|
+
bbd?: boolean;
|
|
503
|
+
roku?: boolean;
|
|
504
|
+
tvos?: boolean;
|
|
505
|
+
} & TRendererData;
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
export type PageMetadata = {
|
|
509
|
+
/**
|
|
510
|
+
* Event ID or Airing ID
|
|
511
|
+
*/
|
|
512
|
+
external_field_1?: string;
|
|
513
|
+
/**
|
|
514
|
+
* Sport guid
|
|
515
|
+
*/
|
|
516
|
+
external_field_2?: string;
|
|
517
|
+
/**
|
|
518
|
+
* League guid
|
|
519
|
+
*/
|
|
520
|
+
external_field_3?: string;
|
|
521
|
+
/**
|
|
522
|
+
* External field 1 identifier. Can be either 'airing' or 'event'.
|
|
523
|
+
*/
|
|
524
|
+
external_field_4?: 'airing' | 'event';
|
|
525
|
+
/**
|
|
526
|
+
* A stringified JSON object containing additional metadata.
|
|
527
|
+
*/
|
|
528
|
+
external_field_5?: string;
|
|
529
|
+
};
|
|
530
|
+
export interface PageConfig {
|
|
531
|
+
panels: PageConfigPanel[];
|
|
532
|
+
page: {
|
|
533
|
+
_id: string;
|
|
534
|
+
slug: string;
|
|
535
|
+
type: string;
|
|
536
|
+
name?: string;
|
|
537
|
+
metadata?: PageMetadata;
|
|
538
|
+
};
|
|
539
|
+
insights: {
|
|
540
|
+
_id: string | null;
|
|
541
|
+
};
|
|
542
|
+
site: {
|
|
543
|
+
_id: string;
|
|
544
|
+
domainUrl: string;
|
|
545
|
+
package: {
|
|
546
|
+
version: string;
|
|
547
|
+
id: string;
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
theme?: ITheme | null;
|
|
551
|
+
}
|
|
552
|
+
export {};
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
declare module '@maestro_io/maestro-web-sdk/models/IPanel' {
|
|
556
|
+
export const MaestroPanelType: {
|
|
557
|
+
readonly KEY_PLAYS: "keyPlays";
|
|
558
|
+
readonly STATS: "stats";
|
|
559
|
+
readonly BETS: "bets";
|
|
560
|
+
readonly FANTASY: "fantasy";
|
|
561
|
+
readonly SHOP: "shop";
|
|
562
|
+
};
|
|
563
|
+
export type MaestroPanelType = typeof MaestroPanelType[keyof typeof MaestroPanelType];
|
|
564
|
+
export interface PanelTypeInfo {
|
|
565
|
+
id: MaestroPanelType;
|
|
566
|
+
name: string;
|
|
567
|
+
imageNamePrefix: string;
|
|
568
|
+
iconName: string;
|
|
569
|
+
}
|
|
570
|
+
export const PANEL_TYPE_INFO: Record<MaestroPanelType, PanelTypeInfo>;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
declare module '@maestro_io/maestro-web-sdk/components/molecules/Overlay/Overlay' {
|
|
574
|
+
import React from 'react';
|
|
575
|
+
import { OverlayType, IFantasyPayload } from '@/types/OverlayTypes';
|
|
576
|
+
import { IWinningBet } from '@/models/IWinningBet';
|
|
577
|
+
interface OverlayProps {
|
|
578
|
+
id: string;
|
|
579
|
+
position?: {
|
|
580
|
+
top?: number;
|
|
581
|
+
left?: number;
|
|
582
|
+
right?: number;
|
|
583
|
+
bottom?: number;
|
|
584
|
+
};
|
|
585
|
+
overlayType: OverlayType;
|
|
586
|
+
winningBet?: IWinningBet;
|
|
587
|
+
fantasy?: IFantasyPayload;
|
|
588
|
+
onOverlayAction?: (overlayType: OverlayType) => void;
|
|
589
|
+
onOverlayViewed?: (overlayType: OverlayType) => void;
|
|
590
|
+
}
|
|
591
|
+
interface OverlayState {
|
|
592
|
+
autoDismiss: boolean;
|
|
593
|
+
hasTrackedView: boolean;
|
|
594
|
+
}
|
|
595
|
+
export const WINNING_BET_RIVE_FILE_URL = "https://static.gcp.maestro.io/media/664b9c57d59a7a431542d814/67db106027ddcdcd2ecb97d4.riv";
|
|
596
|
+
class Overlay extends React.Component<OverlayProps, OverlayState> {
|
|
597
|
+
constructor(props: OverlayProps);
|
|
598
|
+
componentWillUnmount(): void;
|
|
599
|
+
get overlayTitle(): string;
|
|
600
|
+
get overlayMetadata(): string;
|
|
601
|
+
onLoadRiveInstance: (riveInstance: any | null) => void;
|
|
602
|
+
render(): JSX.Element;
|
|
603
|
+
}
|
|
604
|
+
export default Overlay;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
declare module '@maestro_io/maestro-web-sdk/types/OverlayTypes' {
|
|
608
|
+
import { WinningBet } from '@maestro_io/maestro-web-sdk/models/IWinningBet';
|
|
609
|
+
export const OverlayType: {
|
|
610
|
+
readonly WinningBet: "winningBet";
|
|
611
|
+
readonly FantasyPlayerEvent: "fantasyPlayerEvent";
|
|
612
|
+
};
|
|
613
|
+
export type OverlayType = typeof OverlayType[keyof typeof OverlayType];
|
|
614
|
+
export interface IOverlayPosition {
|
|
615
|
+
top?: number;
|
|
616
|
+
left?: number;
|
|
617
|
+
right?: number;
|
|
618
|
+
bottom?: number;
|
|
619
|
+
}
|
|
620
|
+
export interface IOverlaySize {
|
|
621
|
+
width: number;
|
|
622
|
+
height: number;
|
|
623
|
+
}
|
|
624
|
+
export interface IFantasyPayload {
|
|
625
|
+
athleteId: string;
|
|
626
|
+
title: string;
|
|
627
|
+
metadata: string;
|
|
628
|
+
headline: string;
|
|
629
|
+
description: string;
|
|
630
|
+
image?: string;
|
|
631
|
+
sportsType: string;
|
|
632
|
+
}
|
|
633
|
+
export interface IMaestroOverlayEvent {
|
|
634
|
+
type: OverlayType;
|
|
635
|
+
size: IOverlaySize;
|
|
636
|
+
position: IOverlayPosition;
|
|
637
|
+
winningBet?: WinningBet;
|
|
638
|
+
fantasy?: IFantasyPayload;
|
|
639
|
+
}
|
|
640
|
+
export interface IOverlayAnalyticsEvent {
|
|
641
|
+
eventName: 'overlayViewed' | 'overlayClicked';
|
|
642
|
+
attributes: {
|
|
643
|
+
template: string;
|
|
644
|
+
templateId?: string;
|
|
645
|
+
instanceName: string;
|
|
646
|
+
instanceId: string;
|
|
647
|
+
fullscreen?: boolean;
|
|
648
|
+
overlayType: string;
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
declare module '@maestro_io/maestro-web-sdk/models/IWinningBet' {
|
|
654
|
+
export interface IWinningBet {
|
|
655
|
+
serverID: string;
|
|
656
|
+
notificationText: string;
|
|
657
|
+
amount: number;
|
|
658
|
+
outcome: 'WIN' | 'LOSS' | 'PUSH';
|
|
659
|
+
}
|
|
660
|
+
export type WinningBet = IWinningBet;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
declare module '@maestro_io/maestro-web-sdk/services/AnalyticsService/types' {
|
|
664
|
+
/**
|
|
665
|
+
* Generic metadata type that accepts any object extending BaseMetadata
|
|
666
|
+
*/
|
|
667
|
+
export type Metadata = BaseMetadata & {
|
|
668
|
+
[key: string]: any;
|
|
669
|
+
};
|
|
670
|
+
export type Kingdom = 'panel';
|
|
671
|
+
export type Phylum = 'view' | 'engage';
|
|
672
|
+
/**
|
|
673
|
+
* Base metadata analytics events should include
|
|
674
|
+
*/
|
|
675
|
+
export interface BaseMetadata {
|
|
676
|
+
league: string;
|
|
677
|
+
event: string;
|
|
678
|
+
airing: string;
|
|
679
|
+
sport: string;
|
|
680
|
+
}
|
|
681
|
+
export type PanelViewAction = {
|
|
682
|
+
name: 'panel_selected';
|
|
683
|
+
e0_kingdom: Kingdom;
|
|
684
|
+
e1_phylum: Phylum;
|
|
685
|
+
/**
|
|
686
|
+
* Panel Type
|
|
687
|
+
*/
|
|
688
|
+
e2_class: string;
|
|
689
|
+
/**
|
|
690
|
+
* Panel ID
|
|
691
|
+
*/
|
|
692
|
+
e3_order: string;
|
|
693
|
+
/**
|
|
694
|
+
* Panel Name
|
|
695
|
+
*/
|
|
696
|
+
e4_family: string;
|
|
697
|
+
e5_genus?: string;
|
|
698
|
+
e6_species?: string;
|
|
699
|
+
/**
|
|
700
|
+
* Additional metadata for the panel view action.
|
|
701
|
+
*/
|
|
702
|
+
metadata: Metadata;
|
|
703
|
+
};
|
|
704
|
+
export type ImpressionTrackEvent = PanelViewAction;
|
|
705
|
+
export type PanelClickAction = {
|
|
706
|
+
name: string;
|
|
707
|
+
e0_kingdom: 'panel';
|
|
708
|
+
e1_phylum: 'engage';
|
|
709
|
+
/**
|
|
710
|
+
* Panel Type
|
|
711
|
+
*/
|
|
712
|
+
e2_class: string;
|
|
713
|
+
/**
|
|
714
|
+
* Panel ID.
|
|
715
|
+
*/
|
|
716
|
+
e3_order: string;
|
|
717
|
+
/**
|
|
718
|
+
* Panel Name
|
|
719
|
+
*/
|
|
720
|
+
e4_family: string;
|
|
721
|
+
e5_genus?: string;
|
|
722
|
+
e6_species?: string;
|
|
723
|
+
/**
|
|
724
|
+
* Additional metadata for the panel click action.
|
|
725
|
+
*/
|
|
726
|
+
metadata: Metadata;
|
|
727
|
+
};
|
|
728
|
+
export type ActionTrackEvent = PanelClickAction;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
declare module '@maestro_io/maestro-web-sdk/helpers/Observable' {
|
|
732
|
+
/**
|
|
733
|
+
* Basic observable implementation for view models
|
|
734
|
+
*/
|
|
735
|
+
export class Observable<T> {
|
|
736
|
+
constructor(initialValue: T);
|
|
737
|
+
get value(): T;
|
|
738
|
+
set value(newValue: T);
|
|
739
|
+
subscribe(listener: (value: T) => void): () => void;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
declare module '@maestro_io/maestro-web-sdk/view-models/ViewModel' {
|
|
744
|
+
import { Observable } from '@maestro_io/maestro-web-sdk/helpers/Observable';
|
|
745
|
+
/**
|
|
746
|
+
* Base view model that implements reactive properties
|
|
747
|
+
*/
|
|
748
|
+
export abstract class ViewModel {
|
|
749
|
+
get isLoading(): Observable<boolean>;
|
|
750
|
+
get error(): Observable<string | null>;
|
|
751
|
+
protected setLoading(loading: boolean): void;
|
|
752
|
+
protected setError(error: string | null): void;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
declare module '@maestro_io/maestro-web-sdk/modules/key-plays/view-model/KeyPlaysViewModel' {
|
|
757
|
+
import IMaestroKeyPlaysResponse from '@maestro_io/maestro-web-sdk/modules/key-plays/interfaces/IKeyPlaysResponse';
|
|
758
|
+
import IKeyPlay, { KeyPlayLoadFailureStatus, KeyPlaysErrorState } from '@maestro_io/maestro-web-sdk/modules/key-plays/interfaces/IKeyPlays';
|
|
759
|
+
import { Observable } from '@/helpers/Observable';
|
|
760
|
+
import AnalyticsService from '@/services/AnalyticsService/AnalyticsService';
|
|
761
|
+
export type KeyPlayItem = {
|
|
762
|
+
title?: string;
|
|
763
|
+
items: IKeyPlay[];
|
|
764
|
+
};
|
|
765
|
+
class KeyPlaysViewModel {
|
|
766
|
+
currentlyPlayingClipIndex: Observable<number | null>;
|
|
767
|
+
lastPlayedClipIndex: Observable<number | null>;
|
|
768
|
+
currentClipPlaybackProgress: Observable<number | null>;
|
|
769
|
+
errorState: Observable<KeyPlaysErrorState | null>;
|
|
770
|
+
failedClips: Observable<{
|
|
771
|
+
[key: string]: KeyPlayLoadFailureStatus;
|
|
772
|
+
}>;
|
|
773
|
+
items: Observable<KeyPlayItem[]>;
|
|
774
|
+
filteredItems: Observable<KeyPlayItem[]>;
|
|
775
|
+
analyticsService: AnalyticsService;
|
|
776
|
+
constructor();
|
|
777
|
+
onUpdatePlayerTimeCode(playerTimeCode: number | null): void;
|
|
778
|
+
isCurrentlyPlaying(index: number): boolean;
|
|
779
|
+
setKeyPlays(items: IMaestroKeyPlaysResponse | null, playerTimeCode: number | null): Promise<void>;
|
|
780
|
+
playKeyPlay(atIndex: number): Promise<void>;
|
|
781
|
+
init(): Promise<void>;
|
|
782
|
+
parseNetworkResponse(response: IMaestroKeyPlaysResponse): KeyPlayItem[];
|
|
783
|
+
get allItems(): IKeyPlay[];
|
|
784
|
+
clipID(forKeyPlayAtIndex: number): string | undefined;
|
|
785
|
+
handleKeyPlayLoadFailure(forKeyPlayAtIndex: number): void;
|
|
786
|
+
loadFailureStatus(forKeyPlayAtIndex: number): KeyPlayLoadFailureStatus;
|
|
787
|
+
clearLoadFailureStatus(forKeyPlayAtIndex: number): void;
|
|
788
|
+
userRequestedNewKeyPlaysData(): Promise<void>;
|
|
789
|
+
}
|
|
790
|
+
export default KeyPlaysViewModel;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
declare module '@maestro_io/maestro-web-sdk/modules/bets/view-model/BetsViewModel' {
|
|
794
|
+
import { Observable } from '@maestro_io/maestro-web-sdk/helpers/Observable';
|
|
795
|
+
import { ITeam, IUserBet, IBetLeg } from '@maestro_io/maestro-web-sdk/modules/bets/interfaces/IBets';
|
|
796
|
+
import { ViewModel } from '@maestro_io/maestro-web-sdk/view-models/ViewModel';
|
|
797
|
+
import { TestUseCase } from '@/interfaces/IMaestroEvent';
|
|
798
|
+
import IMaestroEventDelegate from '@/interfaces/IMaestroEventDelegate';
|
|
799
|
+
import { BetCardType, BetType } from '@maestro_io/maestro-web-sdk/modules/bets/types/BetsAnalyticsTypes';
|
|
800
|
+
const BET_ITEM_TYPE: {
|
|
801
|
+
readonly ODDS: "odds";
|
|
802
|
+
readonly USER_BETS: "userBets";
|
|
803
|
+
readonly PROMO: "promo";
|
|
804
|
+
readonly HOT_PROPS: "hotProps";
|
|
805
|
+
readonly LOCATION_DISCLAIMER: "locationDisclaimer";
|
|
806
|
+
readonly GAMBLING_MESSAGE: "gamblingMessage";
|
|
807
|
+
};
|
|
808
|
+
export type BetItemType = typeof BET_ITEM_TYPE[keyof typeof BET_ITEM_TYPE];
|
|
809
|
+
type TeamOdd = {
|
|
810
|
+
teamAbbreviation: string;
|
|
811
|
+
startOfGameFirstLine: string;
|
|
812
|
+
startOfGameSecondLine: string;
|
|
813
|
+
gameSpreadFirstLine: string;
|
|
814
|
+
gameSpreadSecondLine: string;
|
|
815
|
+
totalPointsFirstLine: string;
|
|
816
|
+
totalPointsSecondLine: string;
|
|
817
|
+
moneylineFirstLine: string;
|
|
818
|
+
};
|
|
819
|
+
export type ISixPackOdds = {
|
|
820
|
+
topTeamOdds: TeamOdd;
|
|
821
|
+
bottomTeamOdds: TeamOdd;
|
|
822
|
+
drawOdds?: TeamOdd;
|
|
823
|
+
orderedColumns: {
|
|
824
|
+
abbreviation: string;
|
|
825
|
+
type: string;
|
|
826
|
+
}[];
|
|
827
|
+
gameState: string;
|
|
828
|
+
};
|
|
829
|
+
export type IUserBets = {
|
|
830
|
+
defaultTab: string;
|
|
831
|
+
bets: {
|
|
832
|
+
live: IUserBet[];
|
|
833
|
+
upcoming: IUserBet[];
|
|
834
|
+
settled: IUserBet[];
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
export type IHotProps = {
|
|
838
|
+
items: IBetLeg[];
|
|
839
|
+
};
|
|
840
|
+
export type ILocationDisclaimer = {
|
|
841
|
+
text: string;
|
|
842
|
+
};
|
|
843
|
+
export type IGamblingMessage = {
|
|
844
|
+
text: string;
|
|
845
|
+
};
|
|
846
|
+
export type IBetPromo = {
|
|
847
|
+
title: string;
|
|
848
|
+
description: string;
|
|
849
|
+
logo: string;
|
|
850
|
+
qrCode: string;
|
|
851
|
+
backgroundImage: string;
|
|
852
|
+
};
|
|
853
|
+
export type PromoBetItem = {
|
|
854
|
+
id: string;
|
|
855
|
+
type: 'promo';
|
|
856
|
+
data: IBetPromo;
|
|
857
|
+
};
|
|
858
|
+
export type LocationDisclaimerBetItem = {
|
|
859
|
+
type: 'locationDisclaimer';
|
|
860
|
+
id: string;
|
|
861
|
+
data: ILocationDisclaimer;
|
|
862
|
+
};
|
|
863
|
+
export type GamblingMessageBetItem = {
|
|
864
|
+
type: 'gamblingMessage';
|
|
865
|
+
id: string;
|
|
866
|
+
data: IGamblingMessage;
|
|
867
|
+
};
|
|
868
|
+
export type SixPackBetItem = {
|
|
869
|
+
type: 'sixPack';
|
|
870
|
+
data: ISixPackOdds;
|
|
871
|
+
teamInfo?: {
|
|
872
|
+
home: ITeam;
|
|
873
|
+
away: ITeam;
|
|
874
|
+
};
|
|
875
|
+
id: string;
|
|
876
|
+
hideWagers: boolean;
|
|
877
|
+
};
|
|
878
|
+
export type UserBetsBetItem = {
|
|
879
|
+
type: 'userBets';
|
|
880
|
+
data: IUserBets;
|
|
881
|
+
id: string;
|
|
882
|
+
hideWagers: boolean;
|
|
883
|
+
};
|
|
884
|
+
export type HotPropsBetItem = {
|
|
885
|
+
type: 'hotProps';
|
|
886
|
+
data: IHotProps;
|
|
887
|
+
id: string;
|
|
888
|
+
hideWagers: boolean;
|
|
889
|
+
};
|
|
890
|
+
export type BetItem = SixPackBetItem | UserBetsBetItem | PromoBetItem | HotPropsBetItem | LocationDisclaimerBetItem | GamblingMessageBetItem;
|
|
891
|
+
const BET_ERROR_STATE: {
|
|
892
|
+
readonly NONE: "none";
|
|
893
|
+
readonly TAB_LOAD_FAILURE: "tabLoadFailure";
|
|
894
|
+
};
|
|
895
|
+
export type BetsErrorState = typeof BET_ERROR_STATE[keyof typeof BET_ERROR_STATE];
|
|
896
|
+
export interface IBetsViewModelDelegate {
|
|
897
|
+
userIsAuthenticated(): Promise<boolean>;
|
|
898
|
+
getUserSWID(): Promise<string | null>;
|
|
899
|
+
getUserToken(): Promise<string | null>;
|
|
900
|
+
}
|
|
901
|
+
export class BetsViewModel extends ViewModel {
|
|
902
|
+
betsItems: Observable<BetItem[]>;
|
|
903
|
+
isDataLoading: Observable<boolean>;
|
|
904
|
+
errorState: Observable<BetsErrorState>;
|
|
905
|
+
hasEverSuccessfullyLoaded: Observable<boolean>;
|
|
906
|
+
hideWagers: Observable<boolean>;
|
|
907
|
+
initialized: boolean;
|
|
908
|
+
constructor(eventId: string, delegate: IMaestroEventDelegate, options?: {
|
|
909
|
+
useMockData?: boolean;
|
|
910
|
+
});
|
|
911
|
+
/**
|
|
912
|
+
* Initialize the ViewModel and start data fetching
|
|
913
|
+
*/
|
|
914
|
+
init(): Promise<void>;
|
|
915
|
+
/**
|
|
916
|
+
* Clean up resources when the ViewModel is no longer needed
|
|
917
|
+
*/
|
|
918
|
+
cleanup(): void;
|
|
919
|
+
/**
|
|
920
|
+
* Track card click event
|
|
921
|
+
*/
|
|
922
|
+
trackCardClick(cardType: BetCardType, betType?: BetType | null): Promise<void>;
|
|
923
|
+
/**
|
|
924
|
+
* Refresh polling for bet data
|
|
925
|
+
*/
|
|
926
|
+
refreshPolling(): void;
|
|
927
|
+
/**
|
|
928
|
+
* Stop polling for bet data
|
|
929
|
+
*/
|
|
930
|
+
stopPolling(): void;
|
|
931
|
+
/**
|
|
932
|
+
* Fetch new bet data immediately (one-time)
|
|
933
|
+
*/
|
|
934
|
+
fetchNewData(): Promise<void>;
|
|
935
|
+
simulateUseCase<T = any>(useCase: TestUseCase, _: T): void;
|
|
936
|
+
clearTabLoadFailure(): void;
|
|
937
|
+
/**
|
|
938
|
+
* Check if wagers should be hidden based on user settings
|
|
939
|
+
*/
|
|
940
|
+
shouldHideWagers(): boolean;
|
|
941
|
+
}
|
|
942
|
+
export default BetsViewModel;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
declare module '@maestro_io/maestro-web-sdk/modules/stats/view-model/StatsViewModel' {
|
|
946
|
+
import { Observable } from '@maestro_io/maestro-web-sdk/helpers/Observable';
|
|
947
|
+
import { ViewModel } from '@maestro_io/maestro-web-sdk/view-models/ViewModel';
|
|
948
|
+
import { DrivePlay, Team } from '@maestro_io/maestro-web-sdk/modules/stats/interfaces/IStats';
|
|
949
|
+
import { AthletesStatisticsItem } from '@maestro_io/maestro-web-sdk/modules/stats/view/components/AthletesStatistics/AthletesStatistics';
|
|
950
|
+
import StatsService from '@/services/StatsService';
|
|
951
|
+
import IMaestroEventDelegate from '@/interfaces/IMaestroEventDelegate';
|
|
952
|
+
import { TestUseCase } from '@/interfaces/IMaestroEvent';
|
|
953
|
+
import AnalyticsService from '@/services/AnalyticsService/AnalyticsService';
|
|
954
|
+
const STATS_ERROR_STATE: {
|
|
955
|
+
readonly NONE: "none";
|
|
956
|
+
readonly TAB_LOAD_FAILURE: "tabLoadFailure";
|
|
957
|
+
};
|
|
958
|
+
export type StatsErrorState = typeof STATS_ERROR_STATE[keyof typeof STATS_ERROR_STATE];
|
|
959
|
+
export type HeaderTeamStatItem = {
|
|
960
|
+
type: 'headerTeam';
|
|
961
|
+
isLive: boolean;
|
|
962
|
+
linescoresHeader: string[];
|
|
963
|
+
statistics?: {
|
|
964
|
+
displayName: string;
|
|
965
|
+
homeTeamValue: number;
|
|
966
|
+
awayTeamValue: number;
|
|
967
|
+
awayTeamDisplayValue: string;
|
|
968
|
+
homeTeamDisplayValue: string;
|
|
969
|
+
}[];
|
|
970
|
+
homeTeam: Pick<Team, 'color' | 'id' | 'logo' | 'name' | 'abbreviation' | 'record'> & {
|
|
971
|
+
linescores: string[];
|
|
972
|
+
};
|
|
973
|
+
awayTeam: Pick<Team, 'color' | 'id' | 'logo' | 'name' | 'abbreviation' | 'record'> & {
|
|
974
|
+
linescores: string[];
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
type RecentGamesPreviousGame = {
|
|
978
|
+
score: string;
|
|
979
|
+
gameResult: string;
|
|
980
|
+
teamLogo?: string;
|
|
981
|
+
homeAway: string;
|
|
982
|
+
};
|
|
983
|
+
type RecentGamesTeam = {
|
|
984
|
+
logo?: string;
|
|
985
|
+
name?: string;
|
|
986
|
+
events: RecentGamesPreviousGame[];
|
|
987
|
+
};
|
|
988
|
+
export type RecentGamesStatsItem = {
|
|
989
|
+
type: 'recentGames';
|
|
990
|
+
awayTeam: RecentGamesTeam;
|
|
991
|
+
homeTeam: RecentGamesTeam;
|
|
992
|
+
};
|
|
993
|
+
export type WinProbabilityStatsItem = {
|
|
994
|
+
type: 'winProbability';
|
|
995
|
+
chartImageUrl: string;
|
|
996
|
+
awayTeam: Pick<Team, 'id' | 'abbreviation' | 'logo'> & {
|
|
997
|
+
winPercentage: string;
|
|
998
|
+
};
|
|
999
|
+
homeTeam: Pick<Team, 'id' | 'abbreviation' | 'logo'> & {
|
|
1000
|
+
winPercentage: string;
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
1003
|
+
export type GameLeadersStatsItem = {
|
|
1004
|
+
type: 'gameLeaders';
|
|
1005
|
+
displayText: string;
|
|
1006
|
+
items: AthletesStatisticsItem[];
|
|
1007
|
+
};
|
|
1008
|
+
export type ActiveAthletesItem = {
|
|
1009
|
+
type: 'activeAthletes';
|
|
1010
|
+
displayText: string;
|
|
1011
|
+
awayTeam: Pick<Team, 'id' | 'logo' | 'name'>;
|
|
1012
|
+
homeTeam: Pick<Team, 'id' | 'logo' | 'name'>;
|
|
1013
|
+
athletes: AthletesStatisticsItem[];
|
|
1014
|
+
};
|
|
1015
|
+
export type StatsPromotionItem = {
|
|
1016
|
+
type: 'promotion';
|
|
1017
|
+
title: string;
|
|
1018
|
+
description: string;
|
|
1019
|
+
logo: string;
|
|
1020
|
+
qrCode: string;
|
|
1021
|
+
backgroundImage: string;
|
|
1022
|
+
};
|
|
1023
|
+
export type StatsMatchPredictorItem = {
|
|
1024
|
+
type: 'matchPredictor';
|
|
1025
|
+
header: string;
|
|
1026
|
+
imageUrl: string;
|
|
1027
|
+
awayTeam: Pick<Team, 'abbreviation' | 'logo' | 'displayName'> & {
|
|
1028
|
+
percentage: number;
|
|
1029
|
+
};
|
|
1030
|
+
homeTeam: Pick<Team, 'abbreviation' | 'logo' | 'displayName'> & {
|
|
1031
|
+
percentage: number;
|
|
1032
|
+
};
|
|
1033
|
+
};
|
|
1034
|
+
export type TeamStatsItem = {
|
|
1035
|
+
type: 'teamStats';
|
|
1036
|
+
awayTeam: Pick<Team, 'logo' | 'displayName' | 'color' | 'abbreviation'>;
|
|
1037
|
+
homeTeam: Pick<Team, 'logo' | 'displayName' | 'color' | 'abbreviation'>;
|
|
1038
|
+
statistics: {
|
|
1039
|
+
displayName: string;
|
|
1040
|
+
awayTeamDisplayValue: string;
|
|
1041
|
+
homeTeamDisplayValue: string;
|
|
1042
|
+
awayTeamValue: number;
|
|
1043
|
+
homeTeamValue: number;
|
|
1044
|
+
}[];
|
|
1045
|
+
};
|
|
1046
|
+
export type DriveSummaryItem = {
|
|
1047
|
+
type: 'driveSummary';
|
|
1048
|
+
id: string;
|
|
1049
|
+
team: Pick<Team, 'logo' | 'displayName'>;
|
|
1050
|
+
playsQuantity: string;
|
|
1051
|
+
yards: string;
|
|
1052
|
+
time: string;
|
|
1053
|
+
lastPlayMarquee: string;
|
|
1054
|
+
plays: DrivePlay[];
|
|
1055
|
+
};
|
|
1056
|
+
export type IScoreItem = {
|
|
1057
|
+
teamLogo?: string;
|
|
1058
|
+
teamName?: string;
|
|
1059
|
+
athletePosition?: string;
|
|
1060
|
+
athleteNumber?: string;
|
|
1061
|
+
athleteName?: string;
|
|
1062
|
+
athleteAssists?: string;
|
|
1063
|
+
athleteThumbnail?: string;
|
|
1064
|
+
description: string;
|
|
1065
|
+
clock: string;
|
|
1066
|
+
};
|
|
1067
|
+
export type IScoreSection = {
|
|
1068
|
+
title: string;
|
|
1069
|
+
scores: IScoreItem[];
|
|
1070
|
+
};
|
|
1071
|
+
export type ScoringSummaryItem = {
|
|
1072
|
+
type: 'scoringSummary';
|
|
1073
|
+
title: string;
|
|
1074
|
+
sections: IScoreSection[];
|
|
1075
|
+
};
|
|
1076
|
+
export type PenaltiesItem = {
|
|
1077
|
+
type: 'penalties';
|
|
1078
|
+
title: string;
|
|
1079
|
+
sections: IScoreSection[];
|
|
1080
|
+
};
|
|
1081
|
+
export type StatsItem = HeaderTeamStatItem | RecentGamesStatsItem | WinProbabilityStatsItem | GameLeadersStatsItem | ActiveAthletesItem | StatsPromotionItem | StatsMatchPredictorItem | TeamStatsItem | DriveSummaryItem | ScoringSummaryItem | PenaltiesItem;
|
|
1082
|
+
export class StatsViewModel extends ViewModel {
|
|
1083
|
+
isDataLoading: Observable<boolean>;
|
|
1084
|
+
hasEverSuccessfullyLoaded: Observable<boolean>;
|
|
1085
|
+
eventId: string;
|
|
1086
|
+
statsItems: Observable<StatsItem[]>;
|
|
1087
|
+
errorState: Observable<StatsErrorState>;
|
|
1088
|
+
currentGameState: Observable<string>;
|
|
1089
|
+
statsService: StatsService;
|
|
1090
|
+
analyticsService: AnalyticsService;
|
|
1091
|
+
constructor(eventId: string, delegate: IMaestroEventDelegate, options?: {
|
|
1092
|
+
useMockData?: boolean;
|
|
1093
|
+
});
|
|
1094
|
+
/**
|
|
1095
|
+
* Sets panel-specific data configuration
|
|
1096
|
+
* @param panelData - Object containing panel configuration
|
|
1097
|
+
*/
|
|
1098
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
1099
|
+
/**
|
|
1100
|
+
* Initialize the ViewModel and start data fetching
|
|
1101
|
+
*/
|
|
1102
|
+
init(): Promise<void>;
|
|
1103
|
+
onEngage: (type: StatsItem['type']) => void;
|
|
1104
|
+
/**
|
|
1105
|
+
* Clean up resources when the ViewModel is no longer needed
|
|
1106
|
+
*/
|
|
1107
|
+
cleanup(): void;
|
|
1108
|
+
/**
|
|
1109
|
+
* Handle player timecode updates with enhanced logging and validation
|
|
1110
|
+
*
|
|
1111
|
+
* @param playerTimeCode - The timecode in milliseconds, or null for live
|
|
1112
|
+
*/
|
|
1113
|
+
onUpdatePlayerTimeCode(playerTimeCode: number | null): void;
|
|
1114
|
+
clearTabLoadFailure(): void;
|
|
1115
|
+
/**
|
|
1116
|
+
* Simulate a use case using mock StatsApiResponse data
|
|
1117
|
+
*/
|
|
1118
|
+
simulateUseCase<T = any>(_useCase: TestUseCase, testData?: T): void;
|
|
1119
|
+
}
|
|
1120
|
+
export default StatsViewModel;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
declare module '@maestro_io/maestro-web-sdk/view-models/PanelManagerViewModel' {
|
|
1124
|
+
import { Observable } from '@maestro_io/maestro-web-sdk/helpers/Observable';
|
|
1125
|
+
import { MaestroPanelType } from '@maestro_io/maestro-web-sdk/models/IPanel';
|
|
1126
|
+
export type PanelInfo = {
|
|
1127
|
+
type: MaestroPanelType;
|
|
1128
|
+
title: string;
|
|
1129
|
+
};
|
|
1130
|
+
export class PanelManagerViewModel {
|
|
1131
|
+
constructor();
|
|
1132
|
+
/**
|
|
1133
|
+
* Cleanup subscriptions
|
|
1134
|
+
*/
|
|
1135
|
+
cleanup(): void;
|
|
1136
|
+
get panels(): PanelInfo[];
|
|
1137
|
+
get panelsObservable(): Observable<PanelInfo[]>;
|
|
1138
|
+
get currentPanel(): MaestroPanelType | null;
|
|
1139
|
+
set currentPanel(value: MaestroPanelType | null);
|
|
1140
|
+
get currentPanelObservable(): Observable<MaestroPanelType | null>;
|
|
1141
|
+
setActivePanel(panelType: MaestroPanelType): void;
|
|
1142
|
+
getIndex(forPanelType: MaestroPanelType): number | null;
|
|
1143
|
+
getPanelType(atIndex: number): MaestroPanelType | null;
|
|
1144
|
+
get panelTypeToLeft(): MaestroPanelType | null;
|
|
1145
|
+
get panelTypeToRight(): MaestroPanelType | null;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
declare module '@maestro_io/maestro-web-sdk/modules/key-plays/interfaces/IKeyPlays' {
|
|
1150
|
+
export default interface IKeyPlay {
|
|
1151
|
+
id: string;
|
|
1152
|
+
description: string;
|
|
1153
|
+
homeTeamName: string;
|
|
1154
|
+
awayTeamName: string;
|
|
1155
|
+
homeTeamScore?: number;
|
|
1156
|
+
awayTeamScore?: number;
|
|
1157
|
+
clipID: string;
|
|
1158
|
+
teamImageUrl?: string;
|
|
1159
|
+
playerImageUrl?: string;
|
|
1160
|
+
thumbnailImageUrl?: string;
|
|
1161
|
+
wallClock?: string;
|
|
1162
|
+
section?: string;
|
|
1163
|
+
}
|
|
1164
|
+
export const KEY_PLAYS_LOAD_FAILURE_STATUS: {
|
|
1165
|
+
readonly noFailure: "noFailure";
|
|
1166
|
+
readonly recentFailure: "recentFailure";
|
|
1167
|
+
readonly nonRecentFailure: "nonRecentFailure";
|
|
1168
|
+
};
|
|
1169
|
+
type KeyPlayLoadFailureStatus = typeof KEY_PLAYS_LOAD_FAILURE_STATUS[keyof typeof KEY_PLAYS_LOAD_FAILURE_STATUS];
|
|
1170
|
+
export const KEY_PLAYS_ERROR_STATE: {
|
|
1171
|
+
readonly unsupportedEvent: "unsupportedEvent";
|
|
1172
|
+
readonly unpopulatedEvent: "unpopulatedEvent";
|
|
1173
|
+
readonly tabLoadFailure: "tabLoadFailure";
|
|
1174
|
+
};
|
|
1175
|
+
type KeyPlaysErrorState = typeof KEY_PLAYS_ERROR_STATE[keyof typeof KEY_PLAYS_ERROR_STATE];
|
|
1176
|
+
export const KEY_PLAYS_PANEL_SCROLL_VIEW_ITEM_TYPE: {
|
|
1177
|
+
readonly keyPlay: "keyPlay";
|
|
1178
|
+
readonly sectionHeader: "sectionHeader";
|
|
1179
|
+
};
|
|
1180
|
+
type KeyPlaysPanelScrollViewItemType = typeof KEY_PLAYS_PANEL_SCROLL_VIEW_ITEM_TYPE[keyof typeof KEY_PLAYS_PANEL_SCROLL_VIEW_ITEM_TYPE];
|
|
1181
|
+
export { KeyPlaysPanelScrollViewItemType, KeyPlayLoadFailureStatus, KeyPlaysErrorState, };
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
declare module '@maestro_io/maestro-web-sdk/modules/bets/interfaces/IBets' {
|
|
1185
|
+
export interface ITeam {
|
|
1186
|
+
id: string;
|
|
1187
|
+
uid: string;
|
|
1188
|
+
guid: string;
|
|
1189
|
+
slug: string;
|
|
1190
|
+
abbreviation: string;
|
|
1191
|
+
displayName: string;
|
|
1192
|
+
shortDisplayName: string;
|
|
1193
|
+
name: string;
|
|
1194
|
+
nickname: string;
|
|
1195
|
+
location: string;
|
|
1196
|
+
color: string;
|
|
1197
|
+
alternateColor: string;
|
|
1198
|
+
favored: boolean;
|
|
1199
|
+
favoredAtOpen?: boolean;
|
|
1200
|
+
}
|
|
1201
|
+
export interface IOddsValue {
|
|
1202
|
+
/** "-110", "+138", "EVEN", etc. */
|
|
1203
|
+
odds: string;
|
|
1204
|
+
/** Team ID reference */
|
|
1205
|
+
team?: string;
|
|
1206
|
+
/** "home", "away", "over", "under" */
|
|
1207
|
+
type: string;
|
|
1208
|
+
/** "WIN", "LOSS" (for closed bets) */
|
|
1209
|
+
outcome?: string;
|
|
1210
|
+
/** "o41.5", "u41.5", "+2.5", "-2.5" (for totals and spreads) */
|
|
1211
|
+
line?: string;
|
|
1212
|
+
}
|
|
1213
|
+
interface IOdds {
|
|
1214
|
+
/** "Moneyline", "Total Points", "Spread" */
|
|
1215
|
+
displayName: string;
|
|
1216
|
+
/** "ML", "Total", "Spread" */
|
|
1217
|
+
abbreviation: string;
|
|
1218
|
+
/** "moneyline", "total", "pointSpread" */
|
|
1219
|
+
type: string;
|
|
1220
|
+
/** "open", "close" */
|
|
1221
|
+
state: string;
|
|
1222
|
+
/** Values for this bet type (usually 2 options) */
|
|
1223
|
+
values: IOddsValue[];
|
|
1224
|
+
}
|
|
1225
|
+
export interface IHotPropsSelection {
|
|
1226
|
+
id: string;
|
|
1227
|
+
/** "Over 5.5", "Under 5.5" */
|
|
1228
|
+
text: string;
|
|
1229
|
+
/** "over", "under" */
|
|
1230
|
+
type: string;
|
|
1231
|
+
/** "closed" */
|
|
1232
|
+
status: string;
|
|
1233
|
+
odds: {
|
|
1234
|
+
/** "+750", "-3000" */
|
|
1235
|
+
current?: string;
|
|
1236
|
+
};
|
|
1237
|
+
/** "WIN", "LOSS" */
|
|
1238
|
+
outcome?: string;
|
|
1239
|
+
/** URL to icon */
|
|
1240
|
+
icon?: string;
|
|
1241
|
+
/** URL to dark mode icon */
|
|
1242
|
+
iconDark?: string;
|
|
1243
|
+
}
|
|
1244
|
+
export interface IHotProps {
|
|
1245
|
+
id: string;
|
|
1246
|
+
/** "Carlos Santana Total Hits + Runs + RBIs" */
|
|
1247
|
+
text: string;
|
|
1248
|
+
/** ISO date string */
|
|
1249
|
+
date: string;
|
|
1250
|
+
selections: IHotPropsSelection[];
|
|
1251
|
+
}
|
|
1252
|
+
export type IBetsResponse = {
|
|
1253
|
+
entities: {
|
|
1254
|
+
teams: Record<string, ITeam>;
|
|
1255
|
+
};
|
|
1256
|
+
/** Featured bets (may not always be present) */
|
|
1257
|
+
featured?: IHotProps[];
|
|
1258
|
+
} & Partial<BetLiveEvent>;
|
|
1259
|
+
export interface IBetLeg {
|
|
1260
|
+
id: string;
|
|
1261
|
+
marketId?: string;
|
|
1262
|
+
marketSelectionId?: string;
|
|
1263
|
+
marketType?: string;
|
|
1264
|
+
/** "PENDING", "WIN", etc. */
|
|
1265
|
+
status: string;
|
|
1266
|
+
/** "+370", "+265", etc. */
|
|
1267
|
+
odds: string;
|
|
1268
|
+
/** "NONE", "ODDS_BOOST" */
|
|
1269
|
+
boostType?: string;
|
|
1270
|
+
/** Human-readable description */
|
|
1271
|
+
selectionText: string;
|
|
1272
|
+
/** "list", "over", etc. */
|
|
1273
|
+
type: string;
|
|
1274
|
+
/** Market description */
|
|
1275
|
+
marketText?: string;
|
|
1276
|
+
icon?: string;
|
|
1277
|
+
iconDark?: string;
|
|
1278
|
+
/** Deep link URL */
|
|
1279
|
+
url?: string;
|
|
1280
|
+
/** "LIVE", "UPCOMING", etc. */
|
|
1281
|
+
marketStatus?: string;
|
|
1282
|
+
/** Point value for totals */
|
|
1283
|
+
points?: string;
|
|
1284
|
+
accrued?: {
|
|
1285
|
+
/** Accrued goal value */
|
|
1286
|
+
goal: number;
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
export interface IBetEvent {
|
|
1290
|
+
/** Event name */
|
|
1291
|
+
displayName: string;
|
|
1292
|
+
/** Bet legs for this event */
|
|
1293
|
+
legs: IBetLeg[];
|
|
1294
|
+
}
|
|
1295
|
+
export interface IUserBet {
|
|
1296
|
+
id: string;
|
|
1297
|
+
/** "STRAIGHT", "PARLAY" */
|
|
1298
|
+
type: string;
|
|
1299
|
+
/** "OPEN", "SETTLED" */
|
|
1300
|
+
betStatus: string;
|
|
1301
|
+
/** "PENDING", "WIN" */
|
|
1302
|
+
outcome: string;
|
|
1303
|
+
/** "NOT_SET" */
|
|
1304
|
+
overrideOutcome: string;
|
|
1305
|
+
/** "10", "2", etc. */
|
|
1306
|
+
betAmount: string;
|
|
1307
|
+
/** "171.55", "12.00", etc. */
|
|
1308
|
+
payoutAmount: string;
|
|
1309
|
+
/** "+1616", "+500", etc. */
|
|
1310
|
+
odds: string;
|
|
1311
|
+
/** ISO date string */
|
|
1312
|
+
startTime: string;
|
|
1313
|
+
/** ISO date string (for settled bets) */
|
|
1314
|
+
closedAtTime?: string;
|
|
1315
|
+
/** Events in this bet */
|
|
1316
|
+
events: IBetEvent[];
|
|
1317
|
+
rewardInfo: {
|
|
1318
|
+
/** "NONE", "ODDS_BOOST" */
|
|
1319
|
+
type: string;
|
|
1320
|
+
icon?: {
|
|
1321
|
+
/** URL to light mode icon */
|
|
1322
|
+
light: string;
|
|
1323
|
+
/** URL to dark mode icon */
|
|
1324
|
+
dark: string;
|
|
1325
|
+
};
|
|
1326
|
+
};
|
|
1327
|
+
/** Number of legs in the bet */
|
|
1328
|
+
legCount: number;
|
|
1329
|
+
/** Whether the bet is no action */
|
|
1330
|
+
isNoAction: boolean;
|
|
1331
|
+
/** "to win", "you won", etc. */
|
|
1332
|
+
betDisplayStatement: string;
|
|
1333
|
+
}
|
|
1334
|
+
export type BetLiveEvent = {
|
|
1335
|
+
/** Event ID */
|
|
1336
|
+
id: string;
|
|
1337
|
+
/** "football", "basketball", etc. */
|
|
1338
|
+
sport: string;
|
|
1339
|
+
/** ISO date string */
|
|
1340
|
+
date: string;
|
|
1341
|
+
/** 'pre' | 'live' | 'post' | 'in' */
|
|
1342
|
+
gameState: string;
|
|
1343
|
+
bets?: {
|
|
1344
|
+
odds: IOdds[];
|
|
1345
|
+
};
|
|
1346
|
+
featured?: IHotProps[];
|
|
1347
|
+
};
|
|
1348
|
+
export interface IPersonalizedBetsResponse extends IBetsResponse {
|
|
1349
|
+
/** Current Live event data */
|
|
1350
|
+
event?: BetLiveEvent;
|
|
1351
|
+
betsModule?: {
|
|
1352
|
+
/** "live", etc. */
|
|
1353
|
+
defaultTab: string;
|
|
1354
|
+
upcoming: IUserBet[];
|
|
1355
|
+
live: IUserBet[];
|
|
1356
|
+
settled: IUserBet[];
|
|
1357
|
+
};
|
|
1358
|
+
promotion?: {
|
|
1359
|
+
/** "FIRST BET RESET" */
|
|
1360
|
+
title: string;
|
|
1361
|
+
/** Promo description */
|
|
1362
|
+
description: string;
|
|
1363
|
+
/** URL to logo */
|
|
1364
|
+
logo: string;
|
|
1365
|
+
/** URL to QR code */
|
|
1366
|
+
qrCode: string;
|
|
1367
|
+
backgroundImage: string;
|
|
1368
|
+
};
|
|
1369
|
+
disclaimers?: {
|
|
1370
|
+
/** Location-specific disclaimer */
|
|
1371
|
+
location?: string;
|
|
1372
|
+
/** Gambling disclaimer */
|
|
1373
|
+
gambling?: string;
|
|
1374
|
+
};
|
|
1375
|
+
}
|
|
1376
|
+
export {};
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
declare module '@maestro_io/maestro-web-sdk/modules/bets/types/BetsAnalyticsTypes' {
|
|
1380
|
+
/**
|
|
1381
|
+
* Valid bet types as specified in the analytics spec
|
|
1382
|
+
*/
|
|
1383
|
+
export type BetType = 'straight' | 'parlay' | 'parlay_plus' | 'teaser' | 'boost';
|
|
1384
|
+
/**
|
|
1385
|
+
* Valid card types for bets module
|
|
1386
|
+
*/
|
|
1387
|
+
export type BetCardType = '6-pack' | 'my bets > live' | 'my bets > settled' | 'my bets > upcoming' | 'hot-props' | 'promo' | 'disclaimer';
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
declare module '@maestro_io/maestro-web-sdk/modules/stats/interfaces/IStats' {
|
|
1391
|
+
export interface TeamStatistic {
|
|
1392
|
+
$key: string;
|
|
1393
|
+
value: number;
|
|
1394
|
+
displayValue: string;
|
|
1395
|
+
displayName: string;
|
|
1396
|
+
}
|
|
1397
|
+
export interface Team {
|
|
1398
|
+
id: string;
|
|
1399
|
+
uid: string;
|
|
1400
|
+
slug?: string;
|
|
1401
|
+
location?: string;
|
|
1402
|
+
name?: string;
|
|
1403
|
+
abbreviation: string;
|
|
1404
|
+
displayName: string;
|
|
1405
|
+
shortDisplayName?: string;
|
|
1406
|
+
color?: string;
|
|
1407
|
+
alternateColor?: string;
|
|
1408
|
+
logo?: string;
|
|
1409
|
+
statistics?: TeamStatistic[];
|
|
1410
|
+
homeAway?: string;
|
|
1411
|
+
record?: string;
|
|
1412
|
+
displayOrder?: number;
|
|
1413
|
+
}
|
|
1414
|
+
interface AthleteLink {
|
|
1415
|
+
rel: string[];
|
|
1416
|
+
href: string;
|
|
1417
|
+
text: string;
|
|
1418
|
+
}
|
|
1419
|
+
interface AthletePosition {
|
|
1420
|
+
name?: string;
|
|
1421
|
+
displayName?: string;
|
|
1422
|
+
abbreviation: string;
|
|
1423
|
+
}
|
|
1424
|
+
export interface Athlete {
|
|
1425
|
+
id: string;
|
|
1426
|
+
uid: string;
|
|
1427
|
+
guid: string;
|
|
1428
|
+
displayName: string;
|
|
1429
|
+
shortName: string;
|
|
1430
|
+
jersey: string;
|
|
1431
|
+
headshot?: string;
|
|
1432
|
+
links?: AthleteLink[];
|
|
1433
|
+
position?: AthletePosition;
|
|
1434
|
+
statistics?: {
|
|
1435
|
+
$key: string;
|
|
1436
|
+
value?: number;
|
|
1437
|
+
displayValue: string;
|
|
1438
|
+
}[];
|
|
1439
|
+
}
|
|
1440
|
+
export interface EntityMap<T> {
|
|
1441
|
+
[id: string]: T;
|
|
1442
|
+
}
|
|
1443
|
+
export interface LeaderStatistic {
|
|
1444
|
+
displayValue: string;
|
|
1445
|
+
abbreviation: string;
|
|
1446
|
+
}
|
|
1447
|
+
interface LeaderAthlete {
|
|
1448
|
+
$key: string;
|
|
1449
|
+
statistics?: LeaderStatistic[];
|
|
1450
|
+
}
|
|
1451
|
+
interface LeaderTeam {
|
|
1452
|
+
team: {
|
|
1453
|
+
$key: string;
|
|
1454
|
+
};
|
|
1455
|
+
athlete: LeaderAthlete;
|
|
1456
|
+
}
|
|
1457
|
+
export interface Leader {
|
|
1458
|
+
displayName: string;
|
|
1459
|
+
name: string;
|
|
1460
|
+
home?: LeaderTeam;
|
|
1461
|
+
away?: LeaderTeam;
|
|
1462
|
+
}
|
|
1463
|
+
interface LineScore {
|
|
1464
|
+
displayValue: string;
|
|
1465
|
+
}
|
|
1466
|
+
interface HeaderTeam {
|
|
1467
|
+
$key: string;
|
|
1468
|
+
score?: string;
|
|
1469
|
+
linescores?: LineScore[];
|
|
1470
|
+
}
|
|
1471
|
+
export interface Header {
|
|
1472
|
+
teams: HeaderTeam[];
|
|
1473
|
+
linescoresHeader?: string[];
|
|
1474
|
+
}
|
|
1475
|
+
export interface PredictorTeam {
|
|
1476
|
+
team: {
|
|
1477
|
+
$key: string;
|
|
1478
|
+
};
|
|
1479
|
+
gameProjection: string;
|
|
1480
|
+
teamChanceLoss?: string;
|
|
1481
|
+
}
|
|
1482
|
+
export interface Predictor {
|
|
1483
|
+
header: string;
|
|
1484
|
+
imageUrl: string;
|
|
1485
|
+
homeTeam: PredictorTeam;
|
|
1486
|
+
awayTeam: PredictorTeam;
|
|
1487
|
+
}
|
|
1488
|
+
export interface WinProbabilityTeam {
|
|
1489
|
+
team: {
|
|
1490
|
+
$key: string;
|
|
1491
|
+
};
|
|
1492
|
+
winPercentage: string;
|
|
1493
|
+
}
|
|
1494
|
+
export interface WinProbability {
|
|
1495
|
+
imageUrl: string;
|
|
1496
|
+
homeTeam: WinProbabilityTeam;
|
|
1497
|
+
awayTeam: WinProbabilityTeam;
|
|
1498
|
+
}
|
|
1499
|
+
interface ActiveAthletesTeam {
|
|
1500
|
+
team: {
|
|
1501
|
+
$key: string;
|
|
1502
|
+
};
|
|
1503
|
+
athletes: {
|
|
1504
|
+
$key: string;
|
|
1505
|
+
statLine: string;
|
|
1506
|
+
}[];
|
|
1507
|
+
}
|
|
1508
|
+
export interface ActiveAthletes {
|
|
1509
|
+
displayText: string;
|
|
1510
|
+
teams: ActiveAthletesTeam[];
|
|
1511
|
+
}
|
|
1512
|
+
export interface Meta {
|
|
1513
|
+
gp_topic: string;
|
|
1514
|
+
picker_topic: string;
|
|
1515
|
+
lastUpdatedAt?: string;
|
|
1516
|
+
firstPlayWallClock?: string;
|
|
1517
|
+
lastPlayWallClock?: string;
|
|
1518
|
+
gameState: string;
|
|
1519
|
+
syncUrl?: string;
|
|
1520
|
+
}
|
|
1521
|
+
export interface StatsPromotion {
|
|
1522
|
+
backgroundImage?: string;
|
|
1523
|
+
description?: string;
|
|
1524
|
+
logoPng?: string;
|
|
1525
|
+
logo?: string;
|
|
1526
|
+
qrCode?: string;
|
|
1527
|
+
title?: string;
|
|
1528
|
+
}
|
|
1529
|
+
export interface DrivePlay {
|
|
1530
|
+
id: string;
|
|
1531
|
+
clock: {
|
|
1532
|
+
displayValue: string;
|
|
1533
|
+
};
|
|
1534
|
+
period: {
|
|
1535
|
+
number: number;
|
|
1536
|
+
};
|
|
1537
|
+
type: {
|
|
1538
|
+
text: string;
|
|
1539
|
+
};
|
|
1540
|
+
text: string;
|
|
1541
|
+
start: {
|
|
1542
|
+
downDistanceText: string;
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1545
|
+
export interface Drive {
|
|
1546
|
+
id: string;
|
|
1547
|
+
team: {
|
|
1548
|
+
$key: string;
|
|
1549
|
+
};
|
|
1550
|
+
description: string;
|
|
1551
|
+
plays: DrivePlay[];
|
|
1552
|
+
}
|
|
1553
|
+
export interface StatsApiResponse {
|
|
1554
|
+
entities: {
|
|
1555
|
+
teams: EntityMap<Team>;
|
|
1556
|
+
athletes?: EntityMap<Athlete>;
|
|
1557
|
+
};
|
|
1558
|
+
leaders?: Leader[];
|
|
1559
|
+
header: Header;
|
|
1560
|
+
predictor: Predictor;
|
|
1561
|
+
winProbability?: WinProbability;
|
|
1562
|
+
gameState: string;
|
|
1563
|
+
activeAthletes?: ActiveAthletes;
|
|
1564
|
+
meta: Meta;
|
|
1565
|
+
promotion?: StatsPromotion;
|
|
1566
|
+
drives?: Drive[];
|
|
1567
|
+
previousGames?: {
|
|
1568
|
+
displayOrder: number;
|
|
1569
|
+
team: {
|
|
1570
|
+
$key: string;
|
|
1571
|
+
};
|
|
1572
|
+
events: {
|
|
1573
|
+
team: {
|
|
1574
|
+
$key: string;
|
|
1575
|
+
homeAway: string;
|
|
1576
|
+
};
|
|
1577
|
+
score: string;
|
|
1578
|
+
gameResult: string;
|
|
1579
|
+
}[];
|
|
1580
|
+
}[];
|
|
1581
|
+
scoringSummary?: {
|
|
1582
|
+
title: string;
|
|
1583
|
+
sections: {
|
|
1584
|
+
title: string;
|
|
1585
|
+
items: {
|
|
1586
|
+
team: {
|
|
1587
|
+
$key: string;
|
|
1588
|
+
};
|
|
1589
|
+
athlete: {
|
|
1590
|
+
$key: string;
|
|
1591
|
+
};
|
|
1592
|
+
clock: string;
|
|
1593
|
+
title: string;
|
|
1594
|
+
description: string;
|
|
1595
|
+
}[];
|
|
1596
|
+
}[];
|
|
1597
|
+
};
|
|
1598
|
+
penaltySummary?: {
|
|
1599
|
+
title: string;
|
|
1600
|
+
sections: {
|
|
1601
|
+
title: string;
|
|
1602
|
+
items: {
|
|
1603
|
+
team: {
|
|
1604
|
+
$key: string;
|
|
1605
|
+
};
|
|
1606
|
+
athlete: {
|
|
1607
|
+
$key: string;
|
|
1608
|
+
};
|
|
1609
|
+
clock: string;
|
|
1610
|
+
title: string;
|
|
1611
|
+
description: string;
|
|
1612
|
+
}[];
|
|
1613
|
+
}[];
|
|
1614
|
+
};
|
|
1615
|
+
}
|
|
1616
|
+
export {};
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
declare module '@maestro_io/maestro-web-sdk/modules/stats/view/components/AthletesStatistics/AthletesStatistics' {
|
|
1620
|
+
import React from 'react';
|
|
1621
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
1622
|
+
import './AthleteStatistics.styles.css';
|
|
1623
|
+
import { LeaderStatistic } from '@/modules/stats/interfaces/IStats';
|
|
1624
|
+
type Athlete = {
|
|
1625
|
+
id: string;
|
|
1626
|
+
displayName: string;
|
|
1627
|
+
headshot: string;
|
|
1628
|
+
position: string;
|
|
1629
|
+
shortName: string;
|
|
1630
|
+
jersey: string;
|
|
1631
|
+
statistics: LeaderStatistic[];
|
|
1632
|
+
minifiedStatistics?: string;
|
|
1633
|
+
};
|
|
1634
|
+
export type AthletesStatisticsItem = {
|
|
1635
|
+
displayName?: string;
|
|
1636
|
+
awayAthlete: Athlete;
|
|
1637
|
+
homeAthlete: Athlete;
|
|
1638
|
+
};
|
|
1639
|
+
export type AthletesStatisticsProps = {
|
|
1640
|
+
item: AthletesStatisticsItem;
|
|
1641
|
+
};
|
|
1642
|
+
const _default: {
|
|
1643
|
+
new (props: (AthletesStatisticsProps & WithFocusableProps) | Readonly<AthletesStatisticsProps & WithFocusableProps>): {
|
|
1644
|
+
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
1645
|
+
navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
|
|
1646
|
+
getChildContext(): {
|
|
1647
|
+
parentFocusKey: string;
|
|
1648
|
+
};
|
|
1649
|
+
setFocus: (focusKey: string) => void;
|
|
1650
|
+
navigateByDirection: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
1651
|
+
stealFocus: () => void;
|
|
1652
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
1653
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
1654
|
+
onEnterPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
1655
|
+
onEnterReleaseHandler: () => void;
|
|
1656
|
+
onBackPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
1657
|
+
onArrowPressHandler: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details: import("../../../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
1658
|
+
onBecameFocusedHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
1659
|
+
onBecameBlurredHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
1660
|
+
componentDidMount(): void;
|
|
1661
|
+
componentDidUpdate(): void;
|
|
1662
|
+
componentWillUnmount(): void;
|
|
1663
|
+
render(): React.ReactElement<AthletesStatisticsProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
1664
|
+
context: any;
|
|
1665
|
+
setState<K extends keyof import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: Readonly<AthletesStatisticsProps & WithFocusableProps>) => import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
1666
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
1667
|
+
readonly props: Readonly<AthletesStatisticsProps & WithFocusableProps> & Readonly<{
|
|
1668
|
+
children?: React.ReactNode;
|
|
1669
|
+
}>;
|
|
1670
|
+
refs: {
|
|
1671
|
+
[key: string]: React.ReactInstance;
|
|
1672
|
+
};
|
|
1673
|
+
shouldComponentUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
1674
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
1675
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
1676
|
+
componentWillMount?(): void;
|
|
1677
|
+
UNSAFE_componentWillMount?(): void;
|
|
1678
|
+
componentWillReceiveProps?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextContext: any): void;
|
|
1679
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextContext: any): void;
|
|
1680
|
+
componentWillUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
1681
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
1682
|
+
};
|
|
1683
|
+
new (props: AthletesStatisticsProps & WithFocusableProps, context: any): {
|
|
1684
|
+
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
1685
|
+
navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
|
|
1686
|
+
getChildContext(): {
|
|
1687
|
+
parentFocusKey: string;
|
|
1688
|
+
};
|
|
1689
|
+
setFocus: (focusKey: string) => void;
|
|
1690
|
+
navigateByDirection: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
1691
|
+
stealFocus: () => void;
|
|
1692
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
1693
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
1694
|
+
onEnterPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
1695
|
+
onEnterReleaseHandler: () => void;
|
|
1696
|
+
onBackPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
1697
|
+
onArrowPressHandler: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details: import("../../../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
1698
|
+
onBecameFocusedHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
1699
|
+
onBecameBlurredHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
1700
|
+
componentDidMount(): void;
|
|
1701
|
+
componentDidUpdate(): void;
|
|
1702
|
+
componentWillUnmount(): void;
|
|
1703
|
+
render(): React.ReactElement<AthletesStatisticsProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
1704
|
+
context: any;
|
|
1705
|
+
setState<K extends keyof import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: Readonly<AthletesStatisticsProps & WithFocusableProps>) => import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
1706
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
1707
|
+
readonly props: Readonly<AthletesStatisticsProps & WithFocusableProps> & Readonly<{
|
|
1708
|
+
children?: React.ReactNode;
|
|
1709
|
+
}>;
|
|
1710
|
+
refs: {
|
|
1711
|
+
[key: string]: React.ReactInstance;
|
|
1712
|
+
};
|
|
1713
|
+
shouldComponentUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
1714
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
1715
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
1716
|
+
componentWillMount?(): void;
|
|
1717
|
+
UNSAFE_componentWillMount?(): void;
|
|
1718
|
+
componentWillReceiveProps?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextContext: any): void;
|
|
1719
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextContext: any): void;
|
|
1720
|
+
componentWillUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
1721
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
1722
|
+
};
|
|
1723
|
+
contextTypes: {
|
|
1724
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
1725
|
+
};
|
|
1726
|
+
childContextTypes: {
|
|
1727
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
1728
|
+
};
|
|
1729
|
+
contextType?: React.Context<any> | undefined;
|
|
1730
|
+
};
|
|
1731
|
+
export default _default;
|
|
1732
|
+
}
|
|
1733
|
+
|