@maestro_io/maestro-web-sdk 2.1.3 → 2.2.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.
Files changed (200) hide show
  1. package/dist/MaestroEventDelegate.d.ts +1 -0
  2. package/dist/components/atoms/SvgIcon/Icon.d.ts +0 -2
  3. package/dist/components/core/PanelManager/PanelManager.d.ts +3 -0
  4. package/dist/components/core/ScrollableContainer/ScrollableContainer.d.ts +3 -1
  5. package/dist/external/spatial-navigation/spatialNavigation.d.ts +1 -1
  6. package/dist/helpers/url.d.ts +1 -0
  7. package/dist/index.d.ts +3 -1
  8. package/dist/interfaces/IMaestroEvent.d.ts +27 -0
  9. package/dist/interfaces/IMaestroEventDelegate.d.ts +19 -6
  10. package/dist/interfaces/IMaestroManager.d.ts +8 -1
  11. package/dist/interfaces/IUserSettings.d.ts +36 -0
  12. package/dist/maestro-web-sdk.umd.js +3 -3
  13. package/dist/maestro-web-sdk.umd.js.map +1 -1
  14. package/dist/models/IPanel.d.ts +1 -2
  15. package/dist/modules/bets/view/BetsView.d.ts +4 -0
  16. package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.d.ts +1 -0
  17. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +1 -0
  18. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +2 -1
  19. package/dist/modules/bets/view/UserBets/Boost/Boost.d.ts +2 -1
  20. package/dist/modules/bets/view/UserBets/Parlay/Parlay.d.ts +2 -1
  21. package/dist/modules/bets/view/UserBets/Straight/Straight.d.ts +2 -1
  22. package/dist/modules/bets/view/UserBets/Teaser/Teaser.d.ts +2 -1
  23. package/dist/modules/bets/view/components/Bet/Bet.d.ts +7 -0
  24. package/dist/modules/bets/view-model/BetsViewModel.d.ts +15 -0
  25. package/dist/modules/key-plays/interfaces/IKeyPlays.d.ts +1 -0
  26. package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.d.ts +6 -6
  27. package/dist/modules/key-plays/view/KeyPlayCardView.d.ts +4 -1
  28. package/dist/modules/key-plays/view/KeyPlayErrorStateView.d.ts +2 -0
  29. package/dist/modules/key-plays/view-model/KeyPlaysViewModel.d.ts +5 -1
  30. package/dist/modules/stats/interfaces/IStats.d.ts +38 -12
  31. package/dist/modules/stats/mocks.d.ts +0 -80
  32. package/dist/modules/stats/utils/driveSummaryUtils.d.ts +18 -0
  33. package/dist/modules/stats/view/ActiveAthletes/ActiveAthletes.d.ts +6 -19
  34. package/dist/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +26 -0
  35. package/dist/modules/stats/view/DriveSummary/DriveSummary.d.ts +24 -0
  36. package/dist/modules/stats/view/DriveSummary/index.d.ts +2 -0
  37. package/dist/modules/stats/view/GameLeaders/GameLeaders.d.ts +15 -4
  38. package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +13 -48
  39. package/dist/modules/stats/view/RecentGames/RecentGames.d.ts +10 -21
  40. package/dist/modules/stats/view/StatsItemView.d.ts +19 -0
  41. package/dist/modules/stats/view/StatsView.d.ts +3 -3
  42. package/dist/modules/stats/view/TeamStats/TeamStatsView.d.ts +2 -4
  43. package/dist/modules/stats/view/Teams/Teams.d.ts +10 -26
  44. package/dist/modules/stats/view/WinProbability/WinProbability.d.ts +10 -21
  45. package/dist/modules/stats/view-model/StatsViewModel.d.ts +149 -5
  46. package/dist/services/BetsService.d.ts +2 -2
  47. package/dist/services/NetworkManager/NetworkManager.d.ts +1 -3
  48. package/dist/services/NetworkManager/NetworkManagerFactory.d.ts +42 -0
  49. package/dist/services/NetworkManager/types.d.ts +77 -0
  50. package/dist/services/StatsService.d.ts +2 -2
  51. package/dist/services/UserSettingsManager.d.ts +63 -0
  52. package/dist/view-models/MaestroEventViewModel.d.ts +5 -0
  53. package/dist/view-models/PanelManagerViewModel.d.ts +24 -0
  54. package/dist/view-models/index.d.ts +4 -0
  55. package/package.json +1 -1
  56. package/dist/MaestroEventDelegate.js +0 -60
  57. package/dist/components/atoms/BaseButton/BaseButton.js +0 -11
  58. package/dist/components/atoms/BaseButton/index.js +0 -2
  59. package/dist/components/atoms/Image/index.js +0 -30
  60. package/dist/components/atoms/Rive/index.js +0 -53
  61. package/dist/components/atoms/SvgIcon/BetGeneralIcon.js +0 -9
  62. package/dist/components/atoms/SvgIcon/BetsIcon.js +0 -11
  63. package/dist/components/atoms/SvgIcon/BetsWarningIcon.js +0 -11
  64. package/dist/components/atoms/SvgIcon/CheckmarkIcon.js +0 -6
  65. package/dist/components/atoms/SvgIcon/CollapseIcon.js +0 -6
  66. package/dist/components/atoms/SvgIcon/ExpandIcon.js +0 -6
  67. package/dist/components/atoms/SvgIcon/FantasyIcon.d.ts +0 -6
  68. package/dist/components/atoms/SvgIcon/FantasyIcon.js +0 -8
  69. package/dist/components/atoms/SvgIcon/FlameIcon.js +0 -11
  70. package/dist/components/atoms/SvgIcon/Icon.js +0 -42
  71. package/dist/components/atoms/SvgIcon/KeyPlaysIcon.js +0 -10
  72. package/dist/components/atoms/SvgIcon/MobilePhoneIcon.js +0 -11
  73. package/dist/components/atoms/SvgIcon/PlayIcon.js +0 -8
  74. package/dist/components/atoms/SvgIcon/StatsIcon.js +0 -12
  75. package/dist/components/atoms/SvgIcon/TimesIcon.js +0 -6
  76. package/dist/components/atoms/SvgIcon/WarningIcon.js +0 -8
  77. package/dist/components/atoms/SvgIcon/index.js +0 -2
  78. package/dist/components/core/App/App.js +0 -41
  79. package/dist/components/core/App/index.js +0 -2
  80. package/dist/components/core/OverlayContainer.js +0 -58
  81. package/dist/components/core/PanelManager/PanelManager.js +0 -80
  82. package/dist/components/core/PanelManager/index.js +0 -2
  83. package/dist/components/core/ScrollableContainer/FocusableItem.js +0 -38
  84. package/dist/components/core/ScrollableContainer/ScrollableContainer.js +0 -166
  85. package/dist/components/core/ScrollableContainer/index.js +0 -2
  86. package/dist/components/molecules/ActionButton/ActionButton.js +0 -10
  87. package/dist/components/molecules/ActionButton/index.js +0 -2
  88. package/dist/components/molecules/Overlay/Overlay.js +0 -139
  89. package/dist/components/molecules/Overlay/index.js +0 -2
  90. package/dist/components/molecules/PanelNavButton/PanelNavButton.js +0 -40
  91. package/dist/components/molecules/PanelNavButton/index.js +0 -2
  92. package/dist/components/molecules/SegmentButton/SegmentButton.js +0 -10
  93. package/dist/components/molecules/SegmentButton/index.js +0 -2
  94. package/dist/components/molecules/WatchButton/WatchButton.js +0 -15
  95. package/dist/components/molecules/WatchButton/index.js +0 -2
  96. package/dist/components/organisms/PanelNavigation/PanelNavigation.js +0 -71
  97. package/dist/components/organisms/PanelNavigation/index.js +0 -2
  98. package/dist/components/organisms/SegmentController/SegmentController.js +0 -68
  99. package/dist/components/organisms/SegmentController/index.js +0 -2
  100. package/dist/external/AxiosNetworkClient.js +0 -83
  101. package/dist/external/LocalStorageCacheManager.js +0 -213
  102. package/dist/external/ReactRenderer.js +0 -86
  103. package/dist/external/mocks/MockExternalNetworkClient.js +0 -161
  104. package/dist/external/ports/cacheManager.js +0 -1
  105. package/dist/external/ports/networkClient.js +0 -1
  106. package/dist/external/ports/renderer.js +0 -1
  107. package/dist/external/spatial-navigation/index.js +0 -3
  108. package/dist/external/spatial-navigation/measureLayout.js +0 -30
  109. package/dist/external/spatial-navigation/spatialNavigation.js +0 -864
  110. package/dist/external/spatial-navigation/utils.js +0 -6
  111. package/dist/external/spatial-navigation/visualDebugger.js +0 -76
  112. package/dist/external/spatial-navigation/withFocusable.js +0 -245
  113. package/dist/helpers/Observable.js +0 -37
  114. package/dist/helpers/deliver-focus.d.ts +0 -5
  115. package/dist/helpers/deliver-focus.js +0 -12
  116. package/dist/index.js +0 -192
  117. package/dist/interfaces/IMaestroEvent.js +0 -6
  118. package/dist/interfaces/IMaestroEventDelegate.js +0 -1
  119. package/dist/interfaces/IMaestroManager.js +0 -1
  120. package/dist/models/IModel.js +0 -1
  121. package/dist/models/IPanel.js +0 -53
  122. package/dist/models/ITheme.js +0 -20
  123. package/dist/models/IWinningBet.js +0 -1
  124. package/dist/modules/bets/interfaces/IBets.js +0 -1
  125. package/dist/modules/bets/mocks.js +0 -572
  126. package/dist/modules/bets/view/BetsView.js +0 -116
  127. package/dist/modules/bets/view/HotProps/HotPropsView.js +0 -139
  128. package/dist/modules/bets/view/SixPack/SixPackView.js +0 -103
  129. package/dist/modules/bets/view/TabLoadFailureView.js +0 -12
  130. package/dist/modules/bets/view/UserBets/BetResult/BetResult.js +0 -6
  131. package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.js +0 -122
  132. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +0 -34
  133. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +0 -22
  134. package/dist/modules/bets/view/UserBets/Boost/Boost.js +0 -6
  135. package/dist/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +0 -9
  136. package/dist/modules/bets/view/UserBets/Parlay/Parlay.js +0 -13
  137. package/dist/modules/bets/view/UserBets/Straight/Straight.js +0 -6
  138. package/dist/modules/bets/view/UserBets/Teaser/Teaser.js +0 -13
  139. package/dist/modules/bets/view/UserBets/UserBetsView.js +0 -114
  140. package/dist/modules/bets/view/components/Bet/Bet.js +0 -32
  141. package/dist/modules/bets/view/components/BetPill/BetPill.js +0 -6
  142. package/dist/modules/bets/view/components/BetsCard/BetsCard.js +0 -15
  143. package/dist/modules/bets/view/components/BetsCard/BetsCardHeader.js +0 -20
  144. package/dist/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +0 -14
  145. package/dist/modules/bets/view/components/LocationWarning/LocationWarning.js +0 -16
  146. package/dist/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +0 -63
  147. package/dist/modules/bets/view/components/PromoCodeBanner/index.js +0 -1
  148. package/dist/modules/bets/view-model/BetsViewModel.js +0 -767
  149. package/dist/modules/key-plays/constants.js +0 -292
  150. package/dist/modules/key-plays/interfaces/IKeyPlays.js +0 -14
  151. package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.js +0 -1
  152. package/dist/modules/key-plays/view/KeyPlayCardScoreTagView.js +0 -13
  153. package/dist/modules/key-plays/view/KeyPlayCardView.js +0 -120
  154. package/dist/modules/key-plays/view/KeyPlayErrorStateView.js +0 -58
  155. package/dist/modules/key-plays/view/KeyPlaysView.js +0 -166
  156. package/dist/modules/key-plays/view-model/KeyPlaysViewModel.js +0 -182
  157. package/dist/modules/stats/interfaces/IStats.js +0 -1
  158. package/dist/modules/stats/mocks.js +0 -686
  159. package/dist/modules/stats/utils/renderTeamStatistic.js +0 -16
  160. package/dist/modules/stats/utils.js +0 -62
  161. package/dist/modules/stats/view/ActiveAthletes/ActiveAthletes.js +0 -78
  162. package/dist/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +0 -27
  163. package/dist/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +0 -15
  164. package/dist/modules/stats/view/ActiveAthletes/index.js +0 -2
  165. package/dist/modules/stats/view/GameLeaders/GameLeaders.js +0 -9
  166. package/dist/modules/stats/view/GameLeaders/index.js +0 -2
  167. package/dist/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +0 -55
  168. package/dist/modules/stats/view/MatchPredictor/DonutChart/index.js +0 -1
  169. package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.js +0 -66
  170. package/dist/modules/stats/view/MatchPredictor/index.js +0 -2
  171. package/dist/modules/stats/view/RecentGames/RecentGames.js +0 -22
  172. package/dist/modules/stats/view/RecentGames/index.js +0 -2
  173. package/dist/modules/stats/view/StatsQRCode/StatsQRCodeView.js +0 -38
  174. package/dist/modules/stats/view/StatsQRCode/index.js +0 -1
  175. package/dist/modules/stats/view/StatsView.js +0 -107
  176. package/dist/modules/stats/view/TeamStats/TeamStatsView.js +0 -69
  177. package/dist/modules/stats/view/TeamStats/index.js +0 -1
  178. package/dist/modules/stats/view/Teams/StatsCarousel.js +0 -14
  179. package/dist/modules/stats/view/Teams/StatsProgressBar.js +0 -18
  180. package/dist/modules/stats/view/Teams/Teams.js +0 -42
  181. package/dist/modules/stats/view/Teams/index.js +0 -2
  182. package/dist/modules/stats/view/WinProbability/WinProbability.js +0 -27
  183. package/dist/modules/stats/view/WinProbability/index.js +0 -2
  184. package/dist/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +0 -29
  185. package/dist/modules/stats/view/components/AthletesStatistics/StatisticTable.js +0 -12
  186. package/dist/modules/stats/view/components/AthletesStatistics/index.js +0 -2
  187. package/dist/modules/stats/view/index.js +0 -2
  188. package/dist/modules/stats/view-model/StatsViewModel.js +0 -90
  189. package/dist/services/BetsService.js +0 -102
  190. package/dist/services/NetworkManager/NetworkManager.js +0 -410
  191. package/dist/services/NetworkManager/errors.js +0 -45
  192. package/dist/services/StatsService.js +0 -68
  193. package/dist/services/ThemeManager/constants.js +0 -47
  194. package/dist/test-polyfills.js +0 -15
  195. package/dist/types/OverlayTypes.js +0 -4
  196. package/dist/view-models/MaestroEventViewModel.js +0 -168
  197. package/dist/view-models/OverlayViewModel.js +0 -222
  198. package/dist/view-models/PanelManagerViewModel.js +0 -80
  199. package/dist/view-models/ViewModel.js +0 -32
  200. package/dist/view-models/index.js +0 -59
@@ -1,53 +1,18 @@
1
- /// <reference types="prop-types" />
2
- import React from 'react';
1
+ import React, { Component } from 'react';
3
2
  import './MatchPredictorView.styles.css';
4
3
  import { WithFocusableProps } from '@/external/spatial-navigation';
5
- import { Predictor, EntityMap, Team } from '../../interfaces/IStats';
4
+ import { Layout } from '@/external/spatial-navigation/utils';
5
+ import { StatsMatchPredictorItem } from '../../view-model/StatsViewModel';
6
6
  export interface MatchPredictorProps {
7
- predictor: Predictor;
8
- teams: EntityMap<Team>;
7
+ item: StatsMatchPredictorItem;
9
8
  }
10
- declare const _default: {
11
- new (props?: (MatchPredictorProps & WithFocusableProps) | undefined, context?: any): {
12
- state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
13
- navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
14
- getChildContext(): {
15
- parentFocusKey: string;
16
- };
17
- setFocus: (focusKey: string) => void;
18
- navigateByDirection: (direction: import("../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
19
- stealFocus: () => void;
20
- onUpdateFocus: (focused: boolean) => void;
21
- onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
22
- onEnterPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
23
- onEnterReleaseHandler: () => void;
24
- onBackPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
25
- onArrowPressHandler: (direction: import("../../../../external/spatial-navigation/utils").Direction, details: import("../../../../external/spatial-navigation/utils").Details) => boolean | void;
26
- onBecameFocusedHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
27
- onBecameBlurredHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
28
- componentDidMount(): void;
29
- componentDidUpdate(): void;
30
- componentWillUnmount(): void;
31
- render(): React.ReactElement<MatchPredictorProps & WithFocusableProps>;
32
- 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: MatchPredictorProps & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
33
- forceUpdate(callBack?: (() => any) | undefined): void;
34
- props: Readonly<{
35
- children?: React.ReactNode;
36
- }> & Readonly<MatchPredictorProps & WithFocusableProps>;
37
- context: any;
38
- refs: {
39
- [key: string]: React.ReactInstance;
40
- };
41
- componentWillMount?(): void;
42
- componentWillReceiveProps?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextContext: any): void;
43
- shouldComponentUpdate?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
44
- componentWillUpdate?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
9
+ export default class MatchPredictorView extends Component<MatchPredictorProps & WithFocusableProps> {
10
+ static contextTypes: {
11
+ refsMap: React.Requireable<any>;
12
+ setRef: React.Requireable<any>;
13
+ scrollToFocusedElement: React.Requireable<any>;
45
14
  };
46
- contextTypes: {
47
- parentFocusKey: import("prop-types").Requireable<string>;
48
- };
49
- childContextTypes: {
50
- parentFocusKey: import("prop-types").Requireable<string>;
51
- };
52
- };
53
- export default _default;
15
+ context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
16
+ onBecameFocused: (layout: Layout) => void;
17
+ render(): React.JSX.Element;
18
+ }
@@ -2,23 +2,12 @@
2
2
  import { WithFocusableProps } from '@/external/spatial-navigation';
3
3
  import React from 'react';
4
4
  import './RecentGames.styles.css';
5
- type PreviousGame = {
6
- score: string;
7
- gameResult: string;
8
- teamLogo: string;
9
- homeAway: string;
10
- };
11
- type Team = {
12
- logo: string;
13
- name?: string;
14
- events: PreviousGame[];
15
- };
16
- export type RecentGamesStatsItem = {
17
- awayTeam: Team;
18
- homeTeam: Team;
5
+ import { RecentGamesStatsItem } from '../../view-model/StatsViewModel';
6
+ type RecentGamesProps = {
7
+ item: RecentGamesStatsItem;
19
8
  };
20
9
  declare const _default: {
21
- new (props?: (RecentGamesStatsItem & WithFocusableProps) | undefined, context?: any): {
10
+ new (props?: (RecentGamesProps & WithFocusableProps) | undefined, context?: any): {
22
11
  state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
23
12
  navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
24
13
  getChildContext(): {
@@ -38,20 +27,20 @@ declare const _default: {
38
27
  componentDidMount(): void;
39
28
  componentDidUpdate(): void;
40
29
  componentWillUnmount(): void;
41
- render(): React.ReactElement<RecentGamesStatsItem & WithFocusableProps>;
42
- 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: RecentGamesStatsItem & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
30
+ render(): React.ReactElement<RecentGamesProps & WithFocusableProps>;
31
+ 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: RecentGamesProps & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
43
32
  forceUpdate(callBack?: (() => any) | undefined): void;
44
33
  props: Readonly<{
45
34
  children?: React.ReactNode;
46
- }> & Readonly<RecentGamesStatsItem & WithFocusableProps>;
35
+ }> & Readonly<RecentGamesProps & WithFocusableProps>;
47
36
  context: any;
48
37
  refs: {
49
38
  [key: string]: React.ReactInstance;
50
39
  };
51
40
  componentWillMount?(): void;
52
- componentWillReceiveProps?(nextProps: Readonly<RecentGamesStatsItem & WithFocusableProps>, nextContext: any): void;
53
- shouldComponentUpdate?(nextProps: Readonly<RecentGamesStatsItem & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
54
- componentWillUpdate?(nextProps: Readonly<RecentGamesStatsItem & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
41
+ componentWillReceiveProps?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextContext: any): void;
42
+ shouldComponentUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
43
+ componentWillUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
55
44
  };
56
45
  contextTypes: {
57
46
  parentFocusKey: import("prop-types").Requireable<string>;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { StatsItem } from '../view-model/StatsViewModel';
3
+ import { Direction, Layout } from '@/external/spatial-navigation/utils';
4
+ type Props = {
5
+ item: StatsItem;
6
+ };
7
+ declare class StatsItemView extends React.Component<Props> {
8
+ static contextTypes: {
9
+ refsMap: React.Requireable<any>;
10
+ setRef: React.Requireable<any>;
11
+ scrollToFocusedElement: React.Requireable<any>;
12
+ };
13
+ context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
14
+ onBecameFocused: (layout: Layout) => void;
15
+ onArrowPress: (d: Direction) => void;
16
+ renderItem(): React.JSX.Element | null;
17
+ render(): React.JSX.Element;
18
+ }
19
+ export default StatsItemView;
@@ -1,9 +1,9 @@
1
1
  import React, { Component } from 'react';
2
2
  import './StatsView.styles.css';
3
- import { StatsApiResponse } from '../interfaces/IStats';
3
+ import { StatsItem } from '../view-model/StatsViewModel';
4
4
  interface StatsViewState {
5
5
  container: HTMLDivElement | null;
6
- statsData: StatsApiResponse | null;
6
+ statsItems: StatsItem[];
7
7
  isDataLoading: boolean;
8
8
  }
9
9
  declare class StatsView extends Component<{}, StatsViewState> {
@@ -14,7 +14,7 @@ declare class StatsView extends Component<{}, StatsViewState> {
14
14
  constructor(props: {});
15
15
  componentDidMount(): void;
16
16
  componentWillUnmount(): void;
17
- renderStatsComponents: () => React.ReactElement[];
17
+ renderItems: () => React.JSX.Element[] | null;
18
18
  render(): React.JSX.Element;
19
19
  }
20
20
  export default StatsView;
@@ -2,11 +2,9 @@
2
2
  import React from 'react';
3
3
  import './TeamStatsView.styles.css';
4
4
  import { WithFocusableProps } from '@/external/spatial-navigation';
5
- import { Team, TeamStatistic } from '../../interfaces/IStats';
5
+ import { TeamStatsItem } from '../../view-model/StatsViewModel';
6
6
  export interface TeamStatsViewProps {
7
- homeTeam: Team;
8
- awayTeam: Team;
9
- statistics?: TeamStatistic[];
7
+ item: TeamStatsItem;
10
8
  }
11
9
  declare const _default: {
12
10
  new (props?: (TeamStatsViewProps & WithFocusableProps) | undefined, context?: any): {
@@ -2,28 +2,12 @@
2
2
  import React from 'react';
3
3
  import './TeamsView.styles.css';
4
4
  import { WithFocusableProps } from '@/external/spatial-navigation';
5
- type Team = {
6
- color?: string;
7
- id: string;
8
- logo: string;
9
- name?: string;
10
- abbreviation: string;
11
- record?: string;
12
- linescores: string[];
13
- };
14
- export type HeaderTeamStatItem = {
15
- isLive: boolean;
16
- linescoresHeader: string[];
17
- statistics?: {
18
- displayName: string;
19
- homeTeamValue: number;
20
- awayTeamValue: number;
21
- }[];
22
- homeTeam: Team;
23
- awayTeam: Team;
5
+ import { HeaderTeamStatItem } from '../../view-model/StatsViewModel';
6
+ type TeamsProps = {
7
+ item: HeaderTeamStatItem;
24
8
  };
25
9
  declare const _default: {
26
- new (props?: (HeaderTeamStatItem & WithFocusableProps) | undefined, context?: any): {
10
+ new (props?: (TeamsProps & WithFocusableProps) | undefined, context?: any): {
27
11
  state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
28
12
  navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
29
13
  getChildContext(): {
@@ -43,20 +27,20 @@ declare const _default: {
43
27
  componentDidMount(): void;
44
28
  componentDidUpdate(): void;
45
29
  componentWillUnmount(): void;
46
- render(): React.ReactElement<HeaderTeamStatItem & WithFocusableProps>;
47
- 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: HeaderTeamStatItem & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
30
+ render(): React.ReactElement<TeamsProps & WithFocusableProps>;
31
+ 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: TeamsProps & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
48
32
  forceUpdate(callBack?: (() => any) | undefined): void;
49
33
  props: Readonly<{
50
34
  children?: React.ReactNode;
51
- }> & Readonly<HeaderTeamStatItem & WithFocusableProps>;
35
+ }> & Readonly<TeamsProps & WithFocusableProps>;
52
36
  context: any;
53
37
  refs: {
54
38
  [key: string]: React.ReactInstance;
55
39
  };
56
40
  componentWillMount?(): void;
57
- componentWillReceiveProps?(nextProps: Readonly<HeaderTeamStatItem & WithFocusableProps>, nextContext: any): void;
58
- shouldComponentUpdate?(nextProps: Readonly<HeaderTeamStatItem & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
59
- componentWillUpdate?(nextProps: Readonly<HeaderTeamStatItem & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
41
+ componentWillReceiveProps?(nextProps: Readonly<TeamsProps & WithFocusableProps>, nextContext: any): void;
42
+ shouldComponentUpdate?(nextProps: Readonly<TeamsProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
43
+ componentWillUpdate?(nextProps: Readonly<TeamsProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
60
44
  };
61
45
  contextTypes: {
62
46
  parentFocusKey: import("prop-types").Requireable<string>;
@@ -2,23 +2,12 @@
2
2
  import React from 'react';
3
3
  import './WinProbability.styles.css';
4
4
  import { WithFocusableProps } from '@/external/spatial-navigation';
5
- export type WinProbabilityStatsItem = {
6
- chartImageUrl: string;
7
- awayTeam: {
8
- id: string;
9
- abbreviation: string;
10
- logo: string;
11
- winPercentage: string;
12
- };
13
- homeTeam: {
14
- id: string;
15
- abbreviation: string;
16
- logo: string;
17
- winPercentage: string;
18
- };
5
+ import { WinProbabilityStatsItem } from '../../view-model/StatsViewModel';
6
+ type WinProbabilityProps = {
7
+ item: WinProbabilityStatsItem;
19
8
  };
20
9
  declare const _default: {
21
- new (props?: (WinProbabilityStatsItem & WithFocusableProps) | undefined, context?: any): {
10
+ new (props?: (WinProbabilityProps & WithFocusableProps) | undefined, context?: any): {
22
11
  state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
23
12
  navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
24
13
  getChildContext(): {
@@ -38,20 +27,20 @@ declare const _default: {
38
27
  componentDidMount(): void;
39
28
  componentDidUpdate(): void;
40
29
  componentWillUnmount(): void;
41
- render(): React.ReactElement<WinProbabilityStatsItem & WithFocusableProps>;
42
- 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: WinProbabilityStatsItem & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
30
+ render(): React.ReactElement<WinProbabilityProps & WithFocusableProps>;
31
+ 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: WinProbabilityProps & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
43
32
  forceUpdate(callBack?: (() => any) | undefined): void;
44
33
  props: Readonly<{
45
34
  children?: React.ReactNode;
46
- }> & Readonly<WinProbabilityStatsItem & WithFocusableProps>;
35
+ }> & Readonly<WinProbabilityProps & WithFocusableProps>;
47
36
  context: any;
48
37
  refs: {
49
38
  [key: string]: React.ReactInstance;
50
39
  };
51
40
  componentWillMount?(): void;
52
- componentWillReceiveProps?(nextProps: Readonly<WinProbabilityStatsItem & WithFocusableProps>, nextContext: any): void;
53
- shouldComponentUpdate?(nextProps: Readonly<WinProbabilityStatsItem & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
54
- componentWillUpdate?(nextProps: Readonly<WinProbabilityStatsItem & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
41
+ componentWillReceiveProps?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextContext: any): void;
42
+ shouldComponentUpdate?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
43
+ componentWillUpdate?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
55
44
  };
56
45
  contextTypes: {
57
46
  parentFocusKey: import("prop-types").Requireable<string>;
@@ -1,14 +1,122 @@
1
1
  import { Observable } from '../../../helpers/Observable';
2
2
  import { ViewModel } from '../../../view-models/ViewModel';
3
- import { StatsApiResponse } from '../interfaces/IStats';
3
+ import { DrivePlay, Team } from '../interfaces/IStats';
4
+ import { AthletesStatisticsItem } from '../view/components/AthletesStatistics/AthletesStatistics';
5
+ import StatsService from '@/services/StatsService';
6
+ import IMaestroEventDelegate from '@/interfaces/IMaestroEventDelegate';
7
+ declare const STATS_ERROR_STATE: {
8
+ readonly NONE: "none";
9
+ readonly TAB_LOAD_FAILURE: "tabLoadFailure";
10
+ };
11
+ export type BetsErrorState = typeof STATS_ERROR_STATE[keyof typeof STATS_ERROR_STATE];
12
+ export type HeaderTeamStatItem = {
13
+ type: 'headerTeam';
14
+ isLive: boolean;
15
+ linescoresHeader: string[];
16
+ statistics?: {
17
+ displayName: string;
18
+ homeTeamValue: number;
19
+ awayTeamValue: number;
20
+ }[];
21
+ homeTeam: Pick<Team, 'color' | 'id' | 'logo' | 'name' | 'abbreviation' | 'record'> & {
22
+ linescores: string[];
23
+ };
24
+ awayTeam: Pick<Team, 'color' | 'id' | 'logo' | 'name' | 'abbreviation' | 'record'> & {
25
+ linescores: string[];
26
+ };
27
+ };
28
+ type RecentGamesPreviousGame = {
29
+ score: string;
30
+ gameResult: string;
31
+ teamLogo: string;
32
+ homeAway: string;
33
+ };
34
+ type RecentGamesTeam = {
35
+ logo: string;
36
+ name?: string;
37
+ events: RecentGamesPreviousGame[];
38
+ };
39
+ export type RecentGamesStatsItem = {
40
+ type: 'recentGames';
41
+ awayTeam: RecentGamesTeam;
42
+ homeTeam: RecentGamesTeam;
43
+ };
44
+ export type WinProbabilityStatsItem = {
45
+ type: 'winProbability';
46
+ chartImageUrl: string;
47
+ awayTeam: Pick<Team, 'id' | 'abbreviation' | 'logo'> & {
48
+ winPercentage: string;
49
+ };
50
+ homeTeam: Pick<Team, 'id' | 'abbreviation' | 'logo'> & {
51
+ winPercentage: string;
52
+ };
53
+ };
54
+ export type GameLeadersStatsItem = {
55
+ type: 'gameLeaders';
56
+ items: AthletesStatisticsItem[];
57
+ };
58
+ export type ActiveAthletesItem = {
59
+ type: 'activeAthletes';
60
+ displayText: string;
61
+ awayTeam: Pick<Team, 'id' | 'logo' | 'name'>;
62
+ homeTeam: Pick<Team, 'id' | 'logo' | 'name'>;
63
+ athletes: AthletesStatisticsItem[];
64
+ };
65
+ export type StatsPromotionItem = {
66
+ type: 'promotion';
67
+ title: string;
68
+ description: string;
69
+ logo: string;
70
+ qrCode: string;
71
+ backgroundImage: string;
72
+ };
73
+ export type StatsMatchPredictorItem = {
74
+ type: 'matchPredictor';
75
+ header: string;
76
+ imageUrl: string;
77
+ awayTeam: Pick<Team, 'abbreviation' | 'logo' | 'displayName'> & {
78
+ percentage: number;
79
+ };
80
+ homeTeam: Pick<Team, 'abbreviation' | 'logo' | 'displayName'> & {
81
+ percentage: number;
82
+ };
83
+ };
84
+ export type TeamStatsItem = {
85
+ type: 'teamStats';
86
+ awayTeam: Pick<Team, 'logo' | 'displayName' | 'color' | 'abbreviation'>;
87
+ homeTeam: Pick<Team, 'logo' | 'displayName' | 'color' | 'abbreviation'>;
88
+ statistics: {
89
+ displayName: string;
90
+ awayTeamDisplayValue: string;
91
+ homeTeamDisplayValue: string;
92
+ awayTeamValue: number;
93
+ homeTeamValue: number;
94
+ }[];
95
+ };
96
+ export type DriveSummaryItem = {
97
+ type: 'driveSummary';
98
+ id: string;
99
+ team: Pick<Team, 'logo' | 'displayName'>;
100
+ playsQuantity: string;
101
+ yards: string;
102
+ time: string;
103
+ lastPlayMarquee: string;
104
+ plays: DrivePlay[];
105
+ };
106
+ export type StatsItem = HeaderTeamStatItem | RecentGamesStatsItem | WinProbabilityStatsItem | GameLeadersStatsItem | ActiveAthletesItem | StatsPromotionItem | StatsMatchPredictorItem | TeamStatsItem | DriveSummaryItem;
4
107
  export declare class StatsViewModel extends ViewModel {
5
- statsData: Observable<StatsApiResponse | null>;
6
108
  isDataLoading: Observable<boolean>;
7
109
  hasEverSuccessfullyLoaded: Observable<boolean>;
110
+ eventId: string;
111
+ statsItems: Observable<StatsItem[]>;
112
+ errorState: Observable<BetsErrorState>;
113
+ statsService: StatsService;
114
+ private pollingInterval;
8
115
  private useMockData;
9
- initialized: boolean;
10
- constructor(_eventId: string, // TODO: Will be used when implementing real API calls
11
- options?: {
116
+ private pollingTask;
117
+ private lastResponseHash;
118
+ constructor(eventId: string, delegate: IMaestroEventDelegate, options?: {
119
+ pollingInterval?: number;
12
120
  useMockData?: boolean;
13
121
  });
14
122
  /**
@@ -27,5 +135,41 @@ export declare class StatsViewModel extends ViewModel {
27
135
  * Fetch mock data for testing
28
136
  */
29
137
  private fetchMockData;
138
+ /**
139
+ * Refresh polling for bet data
140
+ */
141
+ refreshPolling(): void;
142
+ /**
143
+ * Poll with the correct method based on authentication status
144
+ */
145
+ private pollWithInterval;
146
+ /**
147
+ * Handle errors that occur during polling
148
+ */
149
+ private handlePollingError;
150
+ /**
151
+ * Process data received from polling
152
+ */
153
+ private processPolledData;
154
+ private processData;
155
+ private parseDriveSummary;
156
+ private parseTeamsStatistics;
157
+ private parseMatchPredictor;
158
+ private parsePromotion;
159
+ private parseHeaderTeams;
160
+ private parseRecentGames;
161
+ private parseWinProbability;
162
+ private parseGameLeaders;
163
+ private parseActiveAthletes;
164
+ private getActiveAthletesTeamInfo;
165
+ /**
166
+ * Stop polling for bet data
167
+ */
168
+ stopPolling(): void;
169
+ }
170
+ declare global {
171
+ interface String {
172
+ hashCode(): number;
173
+ }
30
174
  }
31
175
  export default StatsViewModel;
@@ -1,11 +1,11 @@
1
- import NetworkManager from './NetworkManager/NetworkManager';
1
+ import { IBetsNetworkManager } from './NetworkManager/types';
2
2
  import { IBetsResponse, IPersonalizedBetsResponse } from '../modules/bets/interfaces/IBets';
3
3
  import IMaestroEventDelegate from '@/interfaces/IMaestroEventDelegate';
4
4
  /**
5
5
  * Service for handling bets-related API calls
6
6
  */
7
7
  declare class BetsService {
8
- networkManager: NetworkManager;
8
+ networkManager: IBetsNetworkManager;
9
9
  constructor(delegate: IMaestroEventDelegate);
10
10
  /**
11
11
  * Get non-personalized bets for an event
@@ -30,15 +30,13 @@ export interface NetworkManagerOptions {
30
30
  defaultCacheDuration?: number;
31
31
  }
32
32
  declare class NetworkManager {
33
- private static instance;
34
33
  private cacheManager;
35
34
  private maestroClient;
36
35
  private externalClient;
37
36
  private environment;
38
37
  private pollingTasks;
39
38
  private localStorage;
40
- private constructor();
41
- static getInstance(options?: NetworkManagerOptions, localStorageOverride?: Storage): NetworkManager;
39
+ constructor(options?: NetworkManagerOptions, localStorageOverride?: Storage);
42
40
  /**
43
41
  * Sets the working environment (development, staging, production)
44
42
  */
@@ -0,0 +1,42 @@
1
+ import NetworkManager, { NetworkManagerOptions } from './NetworkManager';
2
+ import { ServiceType, ServiceNetworkManagerConfig, IStatsNetworkManager, IBetsNetworkManager, IMaestroNetworkManager, NetworkManagerFactoryConfig } from './types';
3
+ /**
4
+ * Service-specific NetworkManager that includes metadata about its service type
5
+ */
6
+ declare class ServiceNetworkManager extends NetworkManager {
7
+ readonly serviceType: ServiceType;
8
+ readonly externalBaseURL: string;
9
+ constructor(serviceType: ServiceType, externalBaseURL: string, options?: NetworkManagerOptions, localStorageOverride?: Storage);
10
+ }
11
+ /**
12
+ * Factory for creating service-specific NetworkManager instances
13
+ * This replaces the singleton pattern with a factory pattern
14
+ */
15
+ export declare class NetworkManagerFactory {
16
+ private static defaultConfig;
17
+ /**
18
+ * Configure factory defaults
19
+ */
20
+ static configure(config: NetworkManagerFactoryConfig): void;
21
+ /**
22
+ * Create a Stats service NetworkManager
23
+ */
24
+ static createStatsNetworkManager(externalBaseURL: string, options?: Partial<NetworkManagerOptions>): IStatsNetworkManager;
25
+ /**
26
+ * Create a Bets service NetworkManager
27
+ */
28
+ static createBetsNetworkManager(externalBaseURL: string, options?: Partial<NetworkManagerOptions>): IBetsNetworkManager;
29
+ /**
30
+ * Create a Maestro service NetworkManager
31
+ */
32
+ static createMaestroNetworkManager(options?: Partial<NetworkManagerOptions>): IMaestroNetworkManager;
33
+ /**
34
+ * Create a NetworkManager for any service type
35
+ */
36
+ static createForService(config: ServiceNetworkManagerConfig, options?: Partial<NetworkManagerOptions>): ServiceNetworkManager;
37
+ /**
38
+ * Reset factory to defaults (useful for testing)
39
+ */
40
+ static reset(): void;
41
+ }
42
+ export default NetworkManagerFactory;
@@ -0,0 +1,77 @@
1
+ import { WorkingEnvironment } from './NetworkManager';
2
+ /**
3
+ * Service types for different NetworkManager contexts
4
+ */
5
+ export declare const ServiceType: {
6
+ readonly STATS: "stats";
7
+ readonly BETS: "bets";
8
+ readonly MAESTRO: "maestro";
9
+ };
10
+ export type ServiceType = typeof ServiceType[keyof typeof ServiceType];
11
+ /**
12
+ * Configuration for creating service-specific NetworkManager instances
13
+ */
14
+ export interface ServiceNetworkManagerConfig {
15
+ serviceType: ServiceType;
16
+ externalBaseURL: string;
17
+ environment?: WorkingEnvironment;
18
+ defaultCacheDuration?: number;
19
+ }
20
+ /**
21
+ * Base interface for all NetworkManager instances
22
+ */
23
+ export interface IServiceNetworkManager {
24
+ readonly serviceType: ServiceType;
25
+ readonly externalBaseURL: string;
26
+ getEnvironment(): WorkingEnvironment;
27
+ externalApiRequest<T = any>(options: {
28
+ endpoint: string;
29
+ method?: string;
30
+ params?: Record<string, any>;
31
+ headers?: Record<string, string>;
32
+ data?: any;
33
+ useCache?: boolean;
34
+ skipResponseBodyDeserialization?: boolean;
35
+ }): Promise<T>;
36
+ pollExternalApiRequest<T = any>(options: {
37
+ endpoint: string;
38
+ interval: number;
39
+ method?: string;
40
+ params?: Record<string, any>;
41
+ headers?: Record<string, string>;
42
+ data?: any;
43
+ onData: (data: T) => void;
44
+ onError?: (error: Error) => void;
45
+ }): {
46
+ stop: () => void;
47
+ };
48
+ }
49
+ /**
50
+ * Stats service NetworkManager interface
51
+ */
52
+ export interface IStatsNetworkManager extends IServiceNetworkManager {
53
+ serviceType: 'stats';
54
+ }
55
+ /**
56
+ * Bets service NetworkManager interface
57
+ */
58
+ export interface IBetsNetworkManager extends IServiceNetworkManager {
59
+ serviceType: 'bets';
60
+ }
61
+ /**
62
+ * Maestro service NetworkManager interface
63
+ */
64
+ export interface IMaestroNetworkManager extends IServiceNetworkManager {
65
+ serviceType: 'maestro';
66
+ }
67
+ /**
68
+ * Union type for all service NetworkManager types
69
+ */
70
+ export type ServiceNetworkManager = IStatsNetworkManager | IBetsNetworkManager | IMaestroNetworkManager;
71
+ /**
72
+ * Factory configuration for different service types
73
+ */
74
+ export interface NetworkManagerFactoryConfig {
75
+ environment?: WorkingEnvironment;
76
+ defaultCacheDuration?: number;
77
+ }
@@ -1,11 +1,11 @@
1
- import NetworkManager from './NetworkManager/NetworkManager';
1
+ import { IStatsNetworkManager } from './NetworkManager/types';
2
2
  import { StatsApiResponse } from '../modules/stats/interfaces/IStats';
3
3
  import IMaestroEventDelegate from '@/interfaces/IMaestroEventDelegate';
4
4
  /**
5
5
  * Service for handling stats-related API calls
6
6
  */
7
7
  declare class StatsService {
8
- networkManager: NetworkManager;
8
+ networkManager: IStatsNetworkManager;
9
9
  constructor(delegate: IMaestroEventDelegate);
10
10
  /**
11
11
  * Get stats for an event