@maestro_io/maestro-web-sdk 4.0.0-beta.5 → 4.0.1
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/maestro-web-sdk.esm.js +2 -2
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +2 -2
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/package.json +92 -0
- package/dist/src/components/atoms/BaseButton/BaseButton.d.ts +7 -0
- package/dist/src/components/atoms/BaseButton/BaseButton.js +11 -0
- package/dist/src/components/atoms/BaseButton/index.d.ts +2 -0
- package/dist/src/components/atoms/BaseButton/index.js +2 -0
- package/dist/src/components/atoms/Image/index.d.ts +13 -0
- package/dist/src/components/atoms/Image/index.js +34 -0
- package/dist/src/components/atoms/Rive/index.d.ts +219 -0
- package/dist/src/components/atoms/Rive/index.js +53 -0
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.js +9 -0
- package/dist/src/components/atoms/SvgIcon/BetsIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/BetsIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.d.ts +7 -0
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/ChatIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/ChatIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.d.ts +7 -0
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.js +15 -0
- package/dist/src/components/atoms/SvgIcon/FlameIcon.d.ts +7 -0
- package/dist/src/components/atoms/SvgIcon/FlameIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/HelloWorldIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/HelloWorldIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/Icon.d.ts +39 -0
- package/dist/src/components/atoms/SvgIcon/Icon.js +44 -0
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.d.ts +6 -0
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.js +10 -0
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.d.ts +7 -0
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/PlayIcon.d.ts +6 -0
- package/dist/src/components/atoms/SvgIcon/PlayIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/ShopIcon.d.ts +5 -0
- package/dist/src/components/atoms/SvgIcon/ShopIcon.js +7 -0
- package/dist/src/components/atoms/SvgIcon/ShopifyIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/ShopifyIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/StatsIcon.d.ts +6 -0
- package/dist/src/components/atoms/SvgIcon/StatsIcon.js +12 -0
- package/dist/src/components/atoms/SvgIcon/TimesIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/TimesIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/WarningIcon.d.ts +6 -0
- package/dist/src/components/atoms/SvgIcon/WarningIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/index.d.ts +2 -0
- package/dist/src/components/atoms/SvgIcon/index.js +2 -0
- package/dist/src/components/core/App/App.d.ts +11 -0
- package/dist/src/components/core/App/App.js +35 -0
- package/dist/src/components/core/App/index.d.ts +2 -0
- package/dist/src/components/core/App/index.js +2 -0
- package/dist/src/components/core/PanelManager/PanelManager.d.ts +21 -0
- package/dist/src/components/core/PanelManager/PanelManager.js +86 -0
- package/dist/src/components/core/PanelManager/index.d.ts +2 -0
- package/dist/src/components/core/PanelManager/index.js +2 -0
- package/dist/src/components/core/ScrollableContainer/FocusableItem.d.ts +6 -0
- package/dist/src/components/core/ScrollableContainer/FocusableItem.js +38 -0
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.d.ts +78 -0
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +169 -0
- package/dist/src/components/core/ScrollableContainer/index.d.ts +2 -0
- package/dist/src/components/core/ScrollableContainer/index.js +2 -0
- package/dist/src/components/molecules/ActionButton/ActionButton.d.ts +94 -0
- package/dist/src/components/molecules/ActionButton/ActionButton.js +10 -0
- package/dist/src/components/molecules/ActionButton/index.d.ts +2 -0
- package/dist/src/components/molecules/ActionButton/index.js +2 -0
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.d.ts +16 -0
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.js +50 -0
- package/dist/src/components/molecules/HeadshotImage/index.d.ts +2 -0
- package/dist/src/components/molecules/HeadshotImage/index.js +2 -0
- package/dist/src/components/molecules/Overlay/Overlay.d.ts +34 -0
- package/dist/src/components/molecules/Overlay/Overlay.js +139 -0
- package/dist/src/components/molecules/Overlay/index.d.ts +2 -0
- package/dist/src/components/molecules/Overlay/index.js +2 -0
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.d.ts +104 -0
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.js +27 -0
- package/dist/src/components/molecules/PanelNavButton/index.d.ts +2 -0
- package/dist/src/components/molecules/PanelNavButton/index.js +2 -0
- package/dist/src/components/molecules/SegmentButton/SegmentButton.d.ts +9 -0
- package/dist/src/components/molecules/SegmentButton/SegmentButton.js +10 -0
- package/dist/src/components/molecules/SegmentButton/index.d.ts +2 -0
- package/dist/src/components/molecules/SegmentButton/index.js +2 -0
- package/dist/src/components/molecules/TabLoadError/TabLoadError.d.ts +94 -0
- package/dist/src/components/molecules/TabLoadError/TabLoadError.js +14 -0
- package/dist/src/components/molecules/TabLoadError/index.d.ts +2 -0
- package/dist/src/components/molecules/TabLoadError/index.js +2 -0
- package/dist/src/components/molecules/WatchButton/WatchButton.d.ts +10 -0
- package/dist/src/components/molecules/WatchButton/WatchButton.js +15 -0
- package/dist/src/components/molecules/WatchButton/index.d.ts +2 -0
- package/dist/src/components/molecules/WatchButton/index.js +2 -0
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.d.ts +16 -0
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.js +60 -0
- package/dist/src/components/organisms/PanelNavigation/index.d.ts +2 -0
- package/dist/src/components/organisms/PanelNavigation/index.js +2 -0
- package/dist/src/components/organisms/SegmentController/SegmentController.d.ts +30 -0
- package/dist/src/components/organisms/SegmentController/SegmentController.js +76 -0
- package/dist/src/components/organisms/SegmentController/index.d.ts +3 -0
- package/dist/src/components/organisms/SegmentController/index.js +2 -0
- package/dist/src/development/MaestroEventDelegate.d.ts +27 -0
- package/dist/src/development/MaestroEventDelegate.js +109 -0
- package/dist/src/development/TimeSeek.d.ts +22 -0
- package/dist/src/development/TimeSeek.js +218 -0
- package/dist/src/development/development.d.ts +1 -0
- package/dist/src/development/development.js +36 -0
- package/dist/src/external/AxiosNetworkClient.d.ts +28 -0
- package/dist/src/external/AxiosNetworkClient.js +110 -0
- package/dist/src/external/LocalStorageCacheManager.d.ts +65 -0
- package/dist/src/external/LocalStorageCacheManager.js +213 -0
- package/dist/src/external/ReactRenderer.d.ts +17 -0
- package/dist/src/external/ReactRenderer.js +65 -0
- package/dist/src/external/mocks/MockExternalNetworkClient.d.ts +104 -0
- package/dist/src/external/mocks/MockExternalNetworkClient.js +187 -0
- package/dist/src/external/ports/cacheManager.d.ts +17 -0
- package/dist/src/external/ports/cacheManager.js +1 -0
- package/dist/src/external/ports/networkClient.d.ts +19 -0
- package/dist/src/external/ports/networkClient.js +1 -0
- package/dist/src/external/ports/renderer.d.ts +4 -0
- package/dist/src/external/ports/renderer.js +1 -0
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.d.ts +8 -0
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.js +7 -0
- package/dist/src/external/spatial-navigation/index.d.ts +4 -0
- package/dist/src/external/spatial-navigation/index.js +3 -0
- package/dist/src/external/spatial-navigation/measureLayout.d.ts +2 -0
- package/dist/src/external/spatial-navigation/measureLayout.js +30 -0
- package/dist/src/external/spatial-navigation/spatialNavigation.d.ts +155 -0
- package/dist/src/external/spatial-navigation/spatialNavigation.js +876 -0
- package/dist/src/external/spatial-navigation/utils.d.ts +20 -0
- package/dist/src/external/spatial-navigation/utils.js +6 -0
- package/dist/src/external/spatial-navigation/visualDebugger.d.ts +17 -0
- package/dist/src/external/spatial-navigation/visualDebugger.js +76 -0
- package/dist/src/external/spatial-navigation/withFocusable.d.ts +123 -0
- package/dist/src/external/spatial-navigation/withFocusable.js +245 -0
- package/dist/src/helpers/Observable.d.ts +12 -0
- package/dist/src/helpers/Observable.js +37 -0
- package/dist/src/helpers/strings.d.ts +2 -0
- package/dist/src/helpers/strings.js +14 -0
- package/dist/src/helpers/url.d.ts +1 -0
- package/dist/src/helpers/url.js +12 -0
- package/dist/src/index.d.ts +54 -0
- package/dist/src/index.js +165 -0
- package/dist/src/interfaces/IMaestroEvent.d.ts +126 -0
- package/dist/src/interfaces/IMaestroEvent.js +18 -0
- package/dist/src/interfaces/IMaestroEventDelegate.d.ts +74 -0
- package/dist/src/interfaces/IMaestroEventDelegate.js +1 -0
- package/dist/src/interfaces/IMaestroManager.d.ts +45 -0
- package/dist/src/interfaces/IMaestroManager.js +1 -0
- package/dist/src/interfaces/IUserSettings.d.ts +44 -0
- package/dist/src/interfaces/IUserSettings.js +20 -0
- package/dist/src/models/IModel.d.ts +7 -0
- package/dist/src/models/IModel.js +1 -0
- package/dist/src/models/IPanel.d.ts +15 -0
- package/dist/src/models/IPanel.js +40 -0
- package/dist/src/models/ITheme.d.ts +77 -0
- package/dist/src/models/ITheme.js +20 -0
- package/dist/src/models/IWinningBet.d.ts +7 -0
- package/dist/src/models/IWinningBet.js +1 -0
- package/dist/src/modules/bets/interfaces/IBets.d.ts +192 -0
- package/dist/src/modules/bets/interfaces/IBets.js +1 -0
- package/dist/src/modules/bets/mocks.d.ts +2 -0
- package/dist/src/modules/bets/mocks.js +573 -0
- package/dist/src/modules/bets/types/BetsAnalyticsTypes.d.ts +8 -0
- package/dist/src/modules/bets/types/BetsAnalyticsTypes.js +1 -0
- package/dist/src/modules/bets/view/BetsView.d.ts +28 -0
- package/dist/src/modules/bets/view/BetsView.js +143 -0
- package/dist/src/modules/bets/view/HotProps/HotPropsView.d.ts +100 -0
- package/dist/src/modules/bets/view/HotProps/HotPropsView.js +150 -0
- package/dist/src/modules/bets/view/SixPack/SixPackView.d.ts +23 -0
- package/dist/src/modules/bets/view/SixPack/SixPackView.js +110 -0
- package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.d.ts +6 -0
- package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.js +6 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.d.ts +101 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.js +149 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +26 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +34 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +7 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +18 -0
- package/dist/src/modules/bets/view/UserBets/Boost/Boost.d.ts +7 -0
- package/dist/src/modules/bets/view/UserBets/Boost/Boost.js +6 -0
- package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +6 -0
- package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +9 -0
- package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.d.ts +8 -0
- package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.js +13 -0
- package/dist/src/modules/bets/view/UserBets/Straight/Straight.d.ts +7 -0
- package/dist/src/modules/bets/view/UserBets/Straight/Straight.js +6 -0
- package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.d.ts +7 -0
- package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.js +13 -0
- package/dist/src/modules/bets/view/UserBets/UserBetsView.d.ts +25 -0
- package/dist/src/modules/bets/view/UserBets/UserBetsView.js +107 -0
- package/dist/src/modules/bets/view/components/Bet/Bet.d.ts +158 -0
- package/dist/src/modules/bets/view/components/Bet/Bet.js +32 -0
- package/dist/src/modules/bets/view/components/BetPill/BetPill.d.ts +6 -0
- package/dist/src/modules/bets/view/components/BetPill/BetPill.js +6 -0
- package/dist/src/modules/bets/view/components/BetsCard/BetsCard.d.ts +10 -0
- package/dist/src/modules/bets/view/components/BetsCard/BetsCard.js +15 -0
- package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.d.ts +16 -0
- package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.js +20 -0
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +8 -0
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +14 -0
- package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.d.ts +10 -0
- package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.js +16 -0
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +18 -0
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +78 -0
- package/dist/src/modules/bets/view/components/PromoCodeBanner/index.d.ts +1 -0
- package/dist/src/modules/bets/view/components/PromoCodeBanner/index.js +1 -0
- package/dist/src/modules/bets/view-model/BetsViewModel.d.ts +219 -0
- package/dist/src/modules/bets/view-model/BetsViewModel.js +974 -0
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.d.ts +28 -0
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.js +107 -0
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/index.d.ts +1 -0
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/index.js +1 -0
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.d.ts +102 -0
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.js +20 -0
- package/dist/src/modules/fantasy/components/LeagueCard/index.d.ts +2 -0
- package/dist/src/modules/fantasy/components/LeagueCard/index.js +2 -0
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.d.ts +99 -0
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.js +29 -0
- package/dist/src/modules/fantasy/components/TopPlayerCard/index.d.ts +2 -0
- package/dist/src/modules/fantasy/components/TopPlayerCard/index.js +2 -0
- package/dist/src/modules/fantasy/mocks.d.ts +7620 -0
- package/dist/src/modules/fantasy/mocks.js +3682 -0
- package/dist/src/modules/fantasy/types.d.ts +176 -0
- package/dist/src/modules/fantasy/types.js +6 -0
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.d.ts +21 -0
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.js +74 -0
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/index.js +2 -0
- package/dist/src/modules/fantasy/view/FantasyItemView.d.ts +22 -0
- package/dist/src/modules/fantasy/view/FantasyItemView.js +74 -0
- package/dist/src/modules/fantasy/view/FantasyView.d.ts +27 -0
- package/dist/src/modules/fantasy/view/FantasyView.js +133 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.d.ts +23 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.js +95 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.d.ts +98 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.js +13 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/index.js +2 -0
- package/dist/src/modules/fantasy/view/LoginView/LoginView.d.ts +94 -0
- package/dist/src/modules/fantasy/view/LoginView/LoginView.js +27 -0
- package/dist/src/modules/fantasy/view/LoginView/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/LoginView/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.d.ts +95 -0
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.js +25 -0
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.d.ts +14 -0
- package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.js +9 -0
- package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.d.ts +100 -0
- package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.js +118 -0
- package/dist/src/modules/fantasy/view/MatchupPair/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/MatchupPair/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.d.ts +14 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.js +9 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.d.ts +100 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.js +108 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.d.ts +95 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.js +18 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/index.js +2 -0
- package/dist/src/modules/fantasy/view/PromoView/PromoView.d.ts +98 -0
- package/dist/src/modules/fantasy/view/PromoView/PromoView.js +12 -0
- package/dist/src/modules/fantasy/view/PromoView/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/PromoView/index.js +2 -0
- package/dist/src/modules/fantasy/view/index.d.ts +2 -0
- package/dist/src/modules/fantasy/view/index.js +2 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.FantasyPolling.d.ts +32 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.FantasyPolling.js +132 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.d.ts +32 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.js +141 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.d.ts +148 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.js +534 -0
- package/dist/src/modules/hello-world/HelloWorldImage.d.ts +2 -0
- package/dist/src/modules/hello-world/HelloWorldImage.js +32 -0
- package/dist/src/modules/hello-world/HelloWorldView.d.ts +11 -0
- package/dist/src/modules/hello-world/HelloWorldView.js +34 -0
- package/dist/src/modules/hello-world/index.d.ts +2 -0
- package/dist/src/modules/hello-world/index.js +2 -0
- package/dist/src/modules/key-plays/constants.d.ts +3 -0
- package/dist/src/modules/key-plays/constants.js +292 -0
- package/dist/src/modules/key-plays/interfaces/IKeyPlays.d.ts +32 -0
- package/dist/src/modules/key-plays/interfaces/IKeyPlays.js +14 -0
- package/dist/src/modules/key-plays/interfaces/IKeyPlaysResponse.d.ts +44 -0
- package/dist/src/modules/key-plays/interfaces/IKeyPlaysResponse.js +1 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.d.ts +9 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.js +16 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardView.d.ts +39 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardView.js +139 -0
- package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.d.ts +13 -0
- package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.js +65 -0
- package/dist/src/modules/key-plays/view/KeyPlaysView.d.ts +37 -0
- package/dist/src/modules/key-plays/view/KeyPlaysView.js +151 -0
- package/dist/src/modules/key-plays/view-model/KeyPlaysViewModel.d.ts +37 -0
- package/dist/src/modules/key-plays/view-model/KeyPlaysViewModel.js +246 -0
- package/dist/src/modules/shop/mocks.d.ts +22 -0
- package/dist/src/modules/shop/mocks.js +391 -0
- package/dist/src/modules/shop/types.d.ts +161 -0
- package/dist/src/modules/shop/types.js +7 -0
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.d.ts +9 -0
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.js +60 -0
- package/dist/src/modules/shop/view/ProductDetailView/index.d.ts +2 -0
- package/dist/src/modules/shop/view/ProductDetailView/index.js +2 -0
- package/dist/src/modules/shop/view/ShopView.d.ts +35 -0
- package/dist/src/modules/shop/view/ShopView.js +182 -0
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.d.ts +101 -0
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.js +23 -0
- package/dist/src/modules/shop/view/components/BrowseCard/index.d.ts +2 -0
- package/dist/src/modules/shop/view/components/BrowseCard/index.js +2 -0
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.d.ts +102 -0
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.js +26 -0
- package/dist/src/modules/shop/view/components/ProductSummaryCard/index.d.ts +2 -0
- package/dist/src/modules/shop/view/components/ProductSummaryCard/index.js +1 -0
- package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.d.ts +8 -0
- package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.js +19 -0
- package/dist/src/modules/shop/view/components/ShopPromoView/index.d.ts +1 -0
- package/dist/src/modules/shop/view/components/ShopPromoView/index.js +1 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.d.ts +23 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.js +61 -0
- package/dist/src/modules/shop/view/components/ShopSection/index.d.ts +1 -0
- package/dist/src/modules/shop/view/components/ShopSection/index.js +1 -0
- package/dist/src/modules/shop/view/index.d.ts +2 -0
- package/dist/src/modules/shop/view/index.js +2 -0
- package/dist/src/modules/shop/view-model/ShopViewModel.ShopPolling.d.ts +31 -0
- package/dist/src/modules/shop/view-model/ShopViewModel.ShopPolling.js +111 -0
- package/dist/src/modules/shop/view-model/ShopViewModel.d.ts +77 -0
- package/dist/src/modules/shop/view-model/ShopViewModel.js +357 -0
- package/dist/src/modules/stats/interfaces/IStats.d.ts +226 -0
- package/dist/src/modules/stats/interfaces/IStats.js +1 -0
- package/dist/src/modules/stats/mocks.d.ts +2 -0
- package/dist/src/modules/stats/mocks.js +746 -0
- package/dist/src/modules/stats/utils/driveSummaryUtils.d.ts +18 -0
- package/dist/src/modules/stats/utils/driveSummaryUtils.js +48 -0
- package/dist/src/modules/stats/utils/renderTeamStatistic.d.ts +20 -0
- package/dist/src/modules/stats/utils/renderTeamStatistic.js +16 -0
- package/dist/src/modules/stats/utils.d.ts +39 -0
- package/dist/src/modules/stats/utils.js +62 -0
- package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.d.ts +22 -0
- package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.js +98 -0
- package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +4 -0
- package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +27 -0
- package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +22 -0
- package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +89 -0
- package/dist/src/modules/stats/view/ActiveAthletes/index.d.ts +2 -0
- package/dist/src/modules/stats/view/ActiveAthletes/index.js +2 -0
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +106 -0
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.js +70 -0
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.d.ts +17 -0
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.js +87 -0
- package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.d.ts +27 -0
- package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.js +129 -0
- package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.d.ts +12 -0
- package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.js +26 -0
- package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.d.ts +10 -0
- package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.js +24 -0
- package/dist/src/modules/stats/view/DriveSummary/index.d.ts +2 -0
- package/dist/src/modules/stats/view/DriveSummary/index.js +2 -0
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.d.ts +21 -0
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.js +48 -0
- package/dist/src/modules/stats/view/GameLeaders/index.d.ts +2 -0
- package/dist/src/modules/stats/view/GameLeaders/index.js +2 -0
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.d.ts +17 -0
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +55 -0
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/index.d.ts +2 -0
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/index.js +1 -0
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +98 -0
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.js +60 -0
- package/dist/src/modules/stats/view/MatchPredictor/index.d.ts +3 -0
- package/dist/src/modules/stats/view/MatchPredictor/index.js +2 -0
- package/dist/src/modules/stats/view/Penalties/Penalties.d.ts +9 -0
- package/dist/src/modules/stats/view/Penalties/Penalties.js +6 -0
- package/dist/src/modules/stats/view/Penalties/index.d.ts +2 -0
- package/dist/src/modules/stats/view/Penalties/index.js +2 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/ExpandedPlayerStats.d.ts +16 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/ExpandedPlayerStats.js +66 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/PlayerSeasonStatsCard.d.ts +97 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/PlayerSeasonStatsCard.js +23 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/PlayerSeasonStatsMinified.d.ts +6 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/PlayerSeasonStatsMinified.js +13 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/PlayerSeasonStatsView.d.ts +8 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/PlayerSeasonStatsView.js +148 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/index.d.ts +1 -0
- package/dist/src/modules/stats/view/PlayerSeasonStats/index.js +1 -0
- package/dist/src/modules/stats/view/RecentGames/RecentGames.d.ts +98 -0
- package/dist/src/modules/stats/view/RecentGames/RecentGames.js +23 -0
- package/dist/src/modules/stats/view/RecentGames/index.d.ts +2 -0
- package/dist/src/modules/stats/view/RecentGames/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.d.ts +30 -0
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.js +123 -0
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.d.ts +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.d.ts +98 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.js +62 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/index.d.ts +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.d.ts +6 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.js +23 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/index.d.ts +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.d.ts +29 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.js +125 -0
- package/dist/src/modules/stats/view/ScoringSummary/index.d.ts +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/index.js +2 -0
- package/dist/src/modules/stats/view/StatsItemView.d.ts +22 -0
- package/dist/src/modules/stats/view/StatsItemView.js +92 -0
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.d.ts +98 -0
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.js +36 -0
- package/dist/src/modules/stats/view/StatsQRCode/index.d.ts +2 -0
- package/dist/src/modules/stats/view/StatsQRCode/index.js +1 -0
- package/dist/src/modules/stats/view/StatsView.d.ts +27 -0
- package/dist/src/modules/stats/view/StatsView.js +137 -0
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.d.ts +98 -0
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.js +43 -0
- package/dist/src/modules/stats/view/TeamStats/index.d.ts +2 -0
- package/dist/src/modules/stats/view/TeamStats/index.js +1 -0
- package/dist/src/modules/stats/view/Teams/StatsCarousel.d.ts +25 -0
- package/dist/src/modules/stats/view/Teams/StatsCarousel.js +83 -0
- package/dist/src/modules/stats/view/Teams/StatsProgressBar.d.ts +6 -0
- package/dist/src/modules/stats/view/Teams/StatsProgressBar.js +19 -0
- package/dist/src/modules/stats/view/Teams/Teams.d.ts +98 -0
- package/dist/src/modules/stats/view/Teams/Teams.js +43 -0
- package/dist/src/modules/stats/view/Teams/index.d.ts +2 -0
- package/dist/src/modules/stats/view/Teams/index.js +2 -0
- package/dist/src/modules/stats/view/WinProbability/WinProbability.d.ts +98 -0
- package/dist/src/modules/stats/view/WinProbability/WinProbability.js +28 -0
- package/dist/src/modules/stats/view/WinProbability/index.d.ts +2 -0
- package/dist/src/modules/stats/view/WinProbability/index.js +2 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +113 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +89 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.d.ts +3 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.js +12 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/index.d.ts +2 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/index.js +2 -0
- package/dist/src/modules/stats/view/index.d.ts +2 -0
- package/dist/src/modules/stats/view/index.js +2 -0
- package/dist/src/modules/stats/view-model/StatsViewModel.d.ts +241 -0
- package/dist/src/modules/stats/view-model/StatsViewModel.js +989 -0
- package/dist/src/sentry.d.ts +3 -0
- package/dist/src/sentry.js +31 -0
- package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +84 -0
- package/dist/src/services/AnalyticsService/AnalyticsService.js +404 -0
- package/dist/src/services/AnalyticsService/types.d.ts +65 -0
- package/dist/src/services/AnalyticsService/types.js +1 -0
- package/dist/src/services/BetsService.d.ts +81 -0
- package/dist/src/services/BetsService.js +122 -0
- package/dist/src/services/FantasyService.d.ts +53 -0
- package/dist/src/services/FantasyService.js +92 -0
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +279 -0
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.js +386 -0
- package/dist/src/services/InsightsService/InsightsService.d.ts +11 -0
- package/dist/src/services/InsightsService/InsightsService.js +74 -0
- package/dist/src/services/NetworkManager/NetworkManager.d.ts +147 -0
- package/dist/src/services/NetworkManager/NetworkManager.js +457 -0
- package/dist/src/services/NetworkManager/NetworkManagerFactory.d.ts +42 -0
- package/dist/src/services/NetworkManager/NetworkManagerFactory.js +101 -0
- package/dist/src/services/NetworkManager/errors.d.ts +17 -0
- package/dist/src/services/NetworkManager/errors.js +45 -0
- package/dist/src/services/NetworkManager/types.d.ts +103 -0
- package/dist/src/services/NetworkManager/types.js +10 -0
- package/dist/src/services/ShopService.d.ts +23 -0
- package/dist/src/services/ShopService.js +46 -0
- package/dist/src/services/StaticService/StaticService.d.ts +12 -0
- package/dist/src/services/StaticService/StaticService.js +59 -0
- package/dist/src/services/StaticService/index.d.ts +2 -0
- package/dist/src/services/StaticService/index.js +2 -0
- package/dist/src/services/StaticService/mocks.d.ts +2 -0
- package/dist/src/services/StaticService/mocks.js +104 -0
- package/dist/src/services/StaticService/types.d.ts +76 -0
- package/dist/src/services/StaticService/types.js +1 -0
- package/dist/src/services/StatsService.d.ts +46 -0
- package/dist/src/services/StatsService.js +147 -0
- package/dist/src/services/ThemeManager/constants.d.ts +2 -0
- package/dist/src/services/ThemeManager/constants.js +47 -0
- package/dist/src/services/UserSettingsManager.d.ts +63 -0
- package/dist/src/services/UserSettingsManager.js +155 -0
- package/dist/src/test-polyfills.d.ts +1 -0
- package/dist/src/test-polyfills.js +15 -0
- package/dist/src/types/OverlayTypes.d.ts +43 -0
- package/dist/src/types/OverlayTypes.js +4 -0
- package/dist/src/view-models/MaestroEventViewModel.d.ts +63 -0
- package/dist/src/view-models/MaestroEventViewModel.js +304 -0
- package/dist/src/view-models/OverlayViewModel.d.ts +33 -0
- package/dist/src/view-models/OverlayViewModel.js +222 -0
- package/dist/src/view-models/PanelManagerViewModel.d.ts +46 -0
- package/dist/src/view-models/PanelManagerViewModel.js +212 -0
- package/dist/src/view-models/ViewModel.d.ts +12 -0
- package/dist/src/view-models/ViewModel.js +32 -0
- package/package.json +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { HttpMethod } from './NetworkManager/NetworkManager';
|
|
2
|
+
import NetworkManagerFactory from './NetworkManager/NetworkManagerFactory';
|
|
3
|
+
/**
|
|
4
|
+
* Service for handling bets-related API calls
|
|
5
|
+
*/
|
|
6
|
+
class BetsService {
|
|
7
|
+
constructor(delegate) {
|
|
8
|
+
Object.defineProperty(this, "networkManager", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
configurable: true,
|
|
11
|
+
writable: true,
|
|
12
|
+
value: void 0
|
|
13
|
+
});
|
|
14
|
+
this.networkManager = NetworkManagerFactory.createBetsNetworkManager(delegate.getBettingAPIBaseURL());
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get non-personalized bets for an event
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Use getPersonalizedBets instead. This method is kept for backward compatibility.
|
|
20
|
+
* @param eventID - The ID of the event
|
|
21
|
+
* @returns Promise with the bets data
|
|
22
|
+
*/
|
|
23
|
+
async getNonPersonalizedBets(eventID) {
|
|
24
|
+
return this.networkManager.externalApiRequest({
|
|
25
|
+
endpoint: this.nonPersonalizedBetsEndpoint(eventID),
|
|
26
|
+
method: HttpMethod.GET,
|
|
27
|
+
params: {},
|
|
28
|
+
headers: {},
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get personalized bets for an event
|
|
33
|
+
*
|
|
34
|
+
* @param eventID - The ID of the event
|
|
35
|
+
* @param swid - The ESPN SWID parameter (format provided by client app delegate)
|
|
36
|
+
* @param jwt - The authorization JWT (empty string for anonymous users)
|
|
37
|
+
* @returns Promise with the personalized bets data
|
|
38
|
+
*/
|
|
39
|
+
async getPersonalizedBets(eventID, swid, jwt) {
|
|
40
|
+
return this.networkManager.externalApiRequest({
|
|
41
|
+
endpoint: this.personalizedBetsEndpoint(eventID),
|
|
42
|
+
method: HttpMethod.GET,
|
|
43
|
+
params: { swid },
|
|
44
|
+
headers: { 'x-p13n-auth': jwt },
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get personalized bets for an event with headers
|
|
49
|
+
*
|
|
50
|
+
* @param eventID - The ID of the event
|
|
51
|
+
* @param swid - The ESPN SWID parameter (format provided by client app delegate)
|
|
52
|
+
* @param jwt - The authorization JWT (empty string for anonymous users)
|
|
53
|
+
* @returns Promise with the personalized bets data and headers
|
|
54
|
+
*/
|
|
55
|
+
async getPersonalizedBetsWithHeaders(eventID, swid, jwt) {
|
|
56
|
+
return this.networkManager.externalApiRequestWithHeaders({
|
|
57
|
+
endpoint: this.personalizedBetsEndpoint(eventID),
|
|
58
|
+
method: HttpMethod.GET,
|
|
59
|
+
params: { swid },
|
|
60
|
+
headers: { 'x-p13n-auth': jwt },
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Start polling for personalized bets
|
|
65
|
+
*
|
|
66
|
+
* @param eventID - The ID of the event
|
|
67
|
+
* @param swid - The ESPN SWID parameter
|
|
68
|
+
* @param jwt - The authorization JWT
|
|
69
|
+
* @param interval - The polling interval in milliseconds
|
|
70
|
+
* @param onData - Callback for successful data fetch
|
|
71
|
+
* @param onError - Callback for errors
|
|
72
|
+
* @returns Object with a stop function to stop polling
|
|
73
|
+
*/
|
|
74
|
+
pollPersonalizedBets(eventID, swid, jwt, interval, onData, onError) {
|
|
75
|
+
return this.networkManager.pollExternalApiRequest({
|
|
76
|
+
endpoint: this.personalizedBetsEndpoint(eventID),
|
|
77
|
+
interval,
|
|
78
|
+
method: HttpMethod.GET,
|
|
79
|
+
params: { swid },
|
|
80
|
+
headers: { 'x-p13n-auth': jwt },
|
|
81
|
+
onData,
|
|
82
|
+
onError,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Start polling for personalized bets and return both data and headers
|
|
87
|
+
*
|
|
88
|
+
* @param eventID - The ID of the event
|
|
89
|
+
* @param swid - The ESPN SWID parameter
|
|
90
|
+
* @param jwt - The authorization JWT
|
|
91
|
+
* @param interval - The polling interval in milliseconds
|
|
92
|
+
* @param onData - Callback for successful data fetch with headers
|
|
93
|
+
* @param onError - Callback for errors
|
|
94
|
+
* @returns Object with a stop function to stop polling
|
|
95
|
+
*/
|
|
96
|
+
pollPersonalizedBetsWithHeaders(eventID, swid, jwt, interval, onData, onError) {
|
|
97
|
+
return this.networkManager.pollExternalApiRequestWithHeaders({
|
|
98
|
+
endpoint: this.personalizedBetsEndpoint(eventID),
|
|
99
|
+
interval,
|
|
100
|
+
method: HttpMethod.GET,
|
|
101
|
+
params: { swid },
|
|
102
|
+
headers: { 'x-p13n-auth': jwt },
|
|
103
|
+
onData,
|
|
104
|
+
onError,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get the endpoint for non-personalized bets
|
|
109
|
+
*
|
|
110
|
+
* @deprecated This endpoint is no longer used.
|
|
111
|
+
*/
|
|
112
|
+
nonPersonalizedBetsEndpoint(eventID) {
|
|
113
|
+
return `/site/v2/events/${eventID}/odds`;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Get the endpoint for personalized bets
|
|
117
|
+
*/
|
|
118
|
+
personalizedBetsEndpoint(eventID) {
|
|
119
|
+
return `/personalized/site/v2/events/${eventID}/odds`;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
export default BetsService;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IFantasyResponse, ILeagueManagerResponse, IPromoResponse } from '@/modules/fantasy/types';
|
|
2
|
+
export type LeagueManagerPollingParams = {
|
|
3
|
+
/**
|
|
4
|
+
* NBA, NFL, etc.
|
|
5
|
+
*/
|
|
6
|
+
game: string;
|
|
7
|
+
/**
|
|
8
|
+
* 2025
|
|
9
|
+
*/
|
|
10
|
+
seasonId: number;
|
|
11
|
+
/**
|
|
12
|
+
* The league ID
|
|
13
|
+
*/
|
|
14
|
+
leagueId: number;
|
|
15
|
+
token: string;
|
|
16
|
+
proGameId: string;
|
|
17
|
+
teamId: number;
|
|
18
|
+
};
|
|
19
|
+
export type FantasyPollingParams = {
|
|
20
|
+
swid: string;
|
|
21
|
+
jwt: string;
|
|
22
|
+
eventId: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Service for handling fantasy API calls
|
|
26
|
+
*/
|
|
27
|
+
declare class FantasyService {
|
|
28
|
+
private fantasyClient;
|
|
29
|
+
private leagueManagerClient;
|
|
30
|
+
private promoClient;
|
|
31
|
+
constructor();
|
|
32
|
+
/**
|
|
33
|
+
* Polls the fantasy API at regular intervals
|
|
34
|
+
* @param swid - The SWID of the user
|
|
35
|
+
* @param interval - Polling interval in milliseconds
|
|
36
|
+
* @param onData - Callback invoked with the data on each successful poll
|
|
37
|
+
* @param onError - Optional callback invoked on error
|
|
38
|
+
*/
|
|
39
|
+
pollFantasy({ eventId, jwt, swid }: FantasyPollingParams, interval: number, onData: (data: {
|
|
40
|
+
data: IFantasyResponse;
|
|
41
|
+
headers: Record<string, string>;
|
|
42
|
+
}) => void, onError?: (error: Error) => void): {
|
|
43
|
+
stop: () => void;
|
|
44
|
+
};
|
|
45
|
+
pollLeagueManager({ game, leagueId, seasonId, token, proGameId, teamId, }: LeagueManagerPollingParams, interval: number, onData: (data: {
|
|
46
|
+
data: ILeagueManagerResponse;
|
|
47
|
+
headers: Record<string, string>;
|
|
48
|
+
}) => void, onError?: (error: Error) => void): {
|
|
49
|
+
stop: () => void;
|
|
50
|
+
};
|
|
51
|
+
getPromo(): Promise<IPromoResponse>;
|
|
52
|
+
}
|
|
53
|
+
export default FantasyService;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import NetworkManagerFactory from './NetworkManager/NetworkManagerFactory';
|
|
2
|
+
/**
|
|
3
|
+
* Service for handling fantasy API calls
|
|
4
|
+
*/
|
|
5
|
+
class FantasyService {
|
|
6
|
+
constructor() {
|
|
7
|
+
Object.defineProperty(this, "fantasyClient", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
configurable: true,
|
|
10
|
+
writable: true,
|
|
11
|
+
value: void 0
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(this, "leagueManagerClient", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: void 0
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "promoClient", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: void 0
|
|
24
|
+
});
|
|
25
|
+
this.fantasyClient = NetworkManagerFactory.createForService({
|
|
26
|
+
externalBaseURL: 'https://fan.api.espn.com/apis/v2/fans',
|
|
27
|
+
serviceType: 'fantasy',
|
|
28
|
+
});
|
|
29
|
+
this.leagueManagerClient = NetworkManagerFactory.createForService({
|
|
30
|
+
externalBaseURL: 'https://lm-api-reads.fantasy.espn.com/apis/v3/games',
|
|
31
|
+
serviceType: 'fantasy',
|
|
32
|
+
});
|
|
33
|
+
this.promoClient = NetworkManagerFactory.createForService({
|
|
34
|
+
externalBaseURL: 'https://client.espncdn.com/ictv/promo.json',
|
|
35
|
+
serviceType: 'fantasy',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Polls the fantasy API at regular intervals
|
|
40
|
+
* @param swid - The SWID of the user
|
|
41
|
+
* @param interval - Polling interval in milliseconds
|
|
42
|
+
* @param onData - Callback invoked with the data on each successful poll
|
|
43
|
+
* @param onError - Optional callback invoked on error
|
|
44
|
+
*/
|
|
45
|
+
pollFantasy({ eventId, jwt, swid }, interval, onData, onError) {
|
|
46
|
+
return this.fantasyClient.pollExternalApiRequestWithHeaders({
|
|
47
|
+
endpoint: swid,
|
|
48
|
+
interval,
|
|
49
|
+
headers: {
|
|
50
|
+
'x-p13n-auth': jwt,
|
|
51
|
+
},
|
|
52
|
+
onData,
|
|
53
|
+
onError,
|
|
54
|
+
params: {
|
|
55
|
+
displayHiddenPrefs: true,
|
|
56
|
+
prefType: 'fantasy',
|
|
57
|
+
context: 'fantasy',
|
|
58
|
+
useCookieAuth: true,
|
|
59
|
+
source: 'fantasyictv-bbd',
|
|
60
|
+
featureFlags: 'challengeEntries',
|
|
61
|
+
filterType: 'FANTASY_CTV',
|
|
62
|
+
platform: 'fantasyictv_bbd',
|
|
63
|
+
swid,
|
|
64
|
+
eventId,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
pollLeagueManager({ game, leagueId, seasonId, token, proGameId, teamId, }, interval, onData, onError) {
|
|
69
|
+
return this.leagueManagerClient.pollExternalApiRequestWithHeaders({
|
|
70
|
+
endpoint: `/${game}/seasons/${seasonId}/segments/0/leagues/${leagueId}/scoreboard`,
|
|
71
|
+
interval,
|
|
72
|
+
onData,
|
|
73
|
+
onError,
|
|
74
|
+
headers: {
|
|
75
|
+
'x-p13n-auth': token,
|
|
76
|
+
},
|
|
77
|
+
params: {
|
|
78
|
+
view: 'ictv_scoreboard',
|
|
79
|
+
platform: 'fantasyictv_bbd',
|
|
80
|
+
proGameId,
|
|
81
|
+
teamId,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
getPromo() {
|
|
86
|
+
return this.promoClient.externalApiRequest({
|
|
87
|
+
endpoint: '',
|
|
88
|
+
useCache: true,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export default FantasyService;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { ICacheManager } from '@/external/ports/cacheManager';
|
|
2
|
+
import InsightsService from './InsightsService';
|
|
3
|
+
import { PageConfig } from '../StaticService/types';
|
|
4
|
+
type EventData = {
|
|
5
|
+
metadata?: Record<string, unknown>;
|
|
6
|
+
ontology: {
|
|
7
|
+
kingdom: string;
|
|
8
|
+
phylum: string;
|
|
9
|
+
class?: string;
|
|
10
|
+
order?: string;
|
|
11
|
+
family?: string;
|
|
12
|
+
genus?: string;
|
|
13
|
+
species?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default class InsightsPayloadBuilder {
|
|
17
|
+
currentTime: number;
|
|
18
|
+
serverOffsetTime: number;
|
|
19
|
+
insightsService: InsightsService;
|
|
20
|
+
cacheManager: ICacheManager;
|
|
21
|
+
pageConfig: PageConfig | null;
|
|
22
|
+
constructor();
|
|
23
|
+
getPayload(event: EventData): Promise<{
|
|
24
|
+
/**
|
|
25
|
+
* @description Event Domain. NAMESPACE env var.
|
|
26
|
+
* @example maestro
|
|
27
|
+
*/
|
|
28
|
+
e_d: string;
|
|
29
|
+
/**
|
|
30
|
+
* @description Event stringified metadata. defaults to null.
|
|
31
|
+
* @example "{\"key\":\"value\"}"
|
|
32
|
+
*/
|
|
33
|
+
e_m: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* @description Event time accounting for offset.
|
|
36
|
+
*/
|
|
37
|
+
e_t: number;
|
|
38
|
+
/**
|
|
39
|
+
* @description Event URL. defaults to undefined.
|
|
40
|
+
*/
|
|
41
|
+
e_u: string;
|
|
42
|
+
/**
|
|
43
|
+
* @description Event ontology kingdom. This is the highest level of the ontology and can be used to identify the event type.
|
|
44
|
+
* @example 'panel', 'engage', 'espn_key_plays'
|
|
45
|
+
*/
|
|
46
|
+
e0: string;
|
|
47
|
+
/**
|
|
48
|
+
* @description Event phylum.
|
|
49
|
+
* @example 'view', 'click', 'play clip'
|
|
50
|
+
*/
|
|
51
|
+
e1: string;
|
|
52
|
+
/**
|
|
53
|
+
* @description Event class.
|
|
54
|
+
* @example 'panel_type'
|
|
55
|
+
*/
|
|
56
|
+
e2: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* @description Event order.
|
|
59
|
+
* @example 'panel_id'
|
|
60
|
+
*/
|
|
61
|
+
e3: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* @description Event family.
|
|
64
|
+
* @example 'panel_name'
|
|
65
|
+
*/
|
|
66
|
+
e4: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* @description Event genus. This is a more specific level of the ontology and can be used to identify the event type.
|
|
69
|
+
*/
|
|
70
|
+
e5: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* @description Event species. This is the most specific level of the ontology and can be used to identify the event type.
|
|
73
|
+
*/
|
|
74
|
+
e6: string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* @description Current timestamp.
|
|
77
|
+
*/
|
|
78
|
+
t: number;
|
|
79
|
+
/**
|
|
80
|
+
* @description User avatar URL. Stored in user profile. defaults to null
|
|
81
|
+
* @example GET 'https://api.maestro.io/userprofile/v1'
|
|
82
|
+
*/
|
|
83
|
+
u_a: null;
|
|
84
|
+
/**
|
|
85
|
+
* @description User account created date in milliseconds since epoch. defaults to null
|
|
86
|
+
* @example account.created
|
|
87
|
+
*/
|
|
88
|
+
u_c: null;
|
|
89
|
+
/**
|
|
90
|
+
* @description Logged User email. defaults to null
|
|
91
|
+
* @example account.email
|
|
92
|
+
*/
|
|
93
|
+
u_e: null;
|
|
94
|
+
/**
|
|
95
|
+
* @description Logged User ID. defaults to null
|
|
96
|
+
* @example account._id
|
|
97
|
+
*/
|
|
98
|
+
u_id: null;
|
|
99
|
+
/**
|
|
100
|
+
* @description Logged User is logged in or not. defaults to false
|
|
101
|
+
*/
|
|
102
|
+
u_li: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* @description Logged User name. defaults to null
|
|
105
|
+
* @example account.name
|
|
106
|
+
*/
|
|
107
|
+
u_n: null;
|
|
108
|
+
/**
|
|
109
|
+
* @description Logged User new user or not. Usually we compare server time and account.created. If it was created less than 1 day ago it's a new user. defaults to false
|
|
110
|
+
* @example Math.abs((serverTime || Date.now()) - account.created) < msIn.day
|
|
111
|
+
*/
|
|
112
|
+
u_nu: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* @description Logged User service. defaults to null
|
|
115
|
+
* @example account.service
|
|
116
|
+
*/
|
|
117
|
+
u_s: null;
|
|
118
|
+
/**
|
|
119
|
+
* @description Logged User UID. defaults to null
|
|
120
|
+
* @example account.uid
|
|
121
|
+
*/
|
|
122
|
+
u_u: null;
|
|
123
|
+
/**
|
|
124
|
+
* @description Logged User name. defaults to null
|
|
125
|
+
* @example account.name
|
|
126
|
+
*/
|
|
127
|
+
u_un: null;
|
|
128
|
+
/**
|
|
129
|
+
* @description Site domain.
|
|
130
|
+
* @example site.settings.domain.url. 'maestro.tv/site_slug'
|
|
131
|
+
*/
|
|
132
|
+
si_d: string | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* @description Site ID.
|
|
135
|
+
* @example site._id
|
|
136
|
+
*/
|
|
137
|
+
si_id: string | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* @description Site package ID.
|
|
140
|
+
* @example `${site.package.id}-sapphire`
|
|
141
|
+
*/
|
|
142
|
+
si_pid: string;
|
|
143
|
+
/**
|
|
144
|
+
* @description Site package version.
|
|
145
|
+
* @example `${site.package.version}-sapphire`
|
|
146
|
+
*/
|
|
147
|
+
si_pv: string;
|
|
148
|
+
/**
|
|
149
|
+
* @description Site slug.
|
|
150
|
+
* @example site.slug
|
|
151
|
+
*/
|
|
152
|
+
si_s: string;
|
|
153
|
+
/**
|
|
154
|
+
* @description Session ID, which can be used to track the session across requests. You might wanna keep this fixed for the session you're in using a local storage or something related.
|
|
155
|
+
*/
|
|
156
|
+
se_id: string;
|
|
157
|
+
/**
|
|
158
|
+
* @description Session created timestamp. Usually set when the first event is fired
|
|
159
|
+
* @example new Date().getTime()
|
|
160
|
+
*/
|
|
161
|
+
se_s: number;
|
|
162
|
+
/**
|
|
163
|
+
* @description Referrer domain, which can be used to track the domain from which the user came. Defaults to "$direct"
|
|
164
|
+
* @example 'example.com'.
|
|
165
|
+
*/
|
|
166
|
+
r_d: string;
|
|
167
|
+
/**
|
|
168
|
+
* @description Referrer source, which can be used to track the source from which the user came (queryParam.r). Defaults to null
|
|
169
|
+
* @example const urlParams = new URLSearchParams(window.location.search);
|
|
170
|
+
* urlParams.get('r') || null
|
|
171
|
+
*/
|
|
172
|
+
r_s: null;
|
|
173
|
+
/**
|
|
174
|
+
* @description Referrer URL, which can be used to track the full URL from which the user came. Defaults to "$direct"
|
|
175
|
+
* @example document.referrer
|
|
176
|
+
*/
|
|
177
|
+
r_u: string;
|
|
178
|
+
/**
|
|
179
|
+
* @description Metadata version, used to track changes in the metadata structure.
|
|
180
|
+
* @example '1.00.0'
|
|
181
|
+
*/
|
|
182
|
+
m_iv: string;
|
|
183
|
+
/**
|
|
184
|
+
* @description Unique identifier for the insights ID. Stored in site's document.
|
|
185
|
+
* @example site.settings.services.insights_id
|
|
186
|
+
*/
|
|
187
|
+
i_id: string | null | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* @description Device created timestamp. You might wanna keep this fixed for the device you're in using a local storage or something related
|
|
190
|
+
* @example new Date().getTime()
|
|
191
|
+
*/
|
|
192
|
+
d_ct: number;
|
|
193
|
+
/**
|
|
194
|
+
* @description New device or not. If you want to keep track of new devices, you can use a local storage or something related
|
|
195
|
+
* @example localStorage.getItem('isNewDevice') === 'true'
|
|
196
|
+
*/
|
|
197
|
+
d_nd: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* @description Navigator Platform (more Web API specific).
|
|
200
|
+
* @example 'MacIntel', 'Win32', 'Linux x86_64'
|
|
201
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
|
|
202
|
+
*/
|
|
203
|
+
d_np: string;
|
|
204
|
+
/**
|
|
205
|
+
* @description A unique identifier for the device, which can be used to track the device across sessions. You might wanna save this into a local storage or something related.
|
|
206
|
+
* @example localStorage.getItem('devicePermanentId') || generateUniqueId()
|
|
207
|
+
*/
|
|
208
|
+
d_pid: string;
|
|
209
|
+
/**
|
|
210
|
+
* @description Device screen height in pixels.
|
|
211
|
+
* @example window.screen.height
|
|
212
|
+
*/
|
|
213
|
+
d_sh: number;
|
|
214
|
+
/**
|
|
215
|
+
* @description Device screen width in pixels.
|
|
216
|
+
* @example window.screen.width
|
|
217
|
+
*/
|
|
218
|
+
d_sw: number;
|
|
219
|
+
/**
|
|
220
|
+
* @description Device tab ID, which can be used to track the device across tabs.
|
|
221
|
+
*/
|
|
222
|
+
d_tid: string;
|
|
223
|
+
/**
|
|
224
|
+
* @description Device time in milliseconds since epoch.
|
|
225
|
+
*/
|
|
226
|
+
d_tim: number;
|
|
227
|
+
/**
|
|
228
|
+
* @description Device time offset in milliseconds. You might wanna keep this fixed for the device you're in using a local storage or something related.
|
|
229
|
+
*/
|
|
230
|
+
d_tof: number;
|
|
231
|
+
/**
|
|
232
|
+
* @description Device user agent string.
|
|
233
|
+
* @example navigator.userAgent ('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3')
|
|
234
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
|
|
235
|
+
*/
|
|
236
|
+
d_ua: string;
|
|
237
|
+
/**
|
|
238
|
+
* @description MongoDB page collection name (e.g. 'pages')
|
|
239
|
+
* @example object.collection
|
|
240
|
+
*/
|
|
241
|
+
p_c: string;
|
|
242
|
+
/**
|
|
243
|
+
* @description MongoDB page document ID (e.g. 'pageId')
|
|
244
|
+
* @example object._id
|
|
245
|
+
*/
|
|
246
|
+
p_id: string | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* @description MongoDB page name (e.g. 'Home', 'Product Page')
|
|
249
|
+
* @example object.data.name || object.seo.title
|
|
250
|
+
*/
|
|
251
|
+
p_n: string | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* @description MongoDB page slug (e.g. 'home', 'product-page')
|
|
254
|
+
* @example object.slug
|
|
255
|
+
*/
|
|
256
|
+
p_s: string | undefined;
|
|
257
|
+
/**
|
|
258
|
+
* @description MongoDB page type (e.g. 'landing', 'channel')
|
|
259
|
+
* @example object.type
|
|
260
|
+
*/
|
|
261
|
+
p_t: string | undefined;
|
|
262
|
+
}>;
|
|
263
|
+
private getEventInsights;
|
|
264
|
+
private getPageInsights;
|
|
265
|
+
getDevicePermanentID(): string;
|
|
266
|
+
private getDeviceCreated;
|
|
267
|
+
private getTabID;
|
|
268
|
+
private getDeviceInsights;
|
|
269
|
+
private randomId;
|
|
270
|
+
private getDeviceOffset;
|
|
271
|
+
private getInsightsInsights;
|
|
272
|
+
private getMetadataInsights;
|
|
273
|
+
private getReferrerInsights;
|
|
274
|
+
private getSessionID;
|
|
275
|
+
private getSessionInsights;
|
|
276
|
+
private getSiteInsights;
|
|
277
|
+
private getUserInsights;
|
|
278
|
+
}
|
|
279
|
+
export {};
|