@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
@@ -3,6 +3,7 @@ import IMaestroEventDelegate from './interfaces/IMaestroEventDelegate';
3
3
  * Our own implementation of the IMaestroEventDelegate interface. Useful for Development and Testing
4
4
  */
5
5
  export default class MaestroEventDelegate implements IMaestroEventDelegate {
6
+ getStatsAPIBaseURL(): string;
6
7
  getBettingAPIBaseURL(): string;
7
8
  userRequestedNewKeyPlaysData(): Promise<void>;
8
9
  startFocusManagement(): Promise<void>;
@@ -3,7 +3,6 @@ import KeyPlaysIcon from './KeyPlaysIcon';
3
3
  import PlayIcon from './PlayIcon';
4
4
  import BetsIcon from './BetsIcon';
5
5
  import StatsIcon from './StatsIcon';
6
- import FantasyIcon from './FantasyIcon';
7
6
  import WarningIcon from './WarningIcon';
8
7
  import FlameIcon from './FlameIcon';
9
8
  import BetsWarningIcon from './BetsWarningIcon';
@@ -13,7 +12,6 @@ declare const iconImports: {
13
12
  play: typeof PlayIcon;
14
13
  bets: typeof BetsIcon;
15
14
  stats: typeof StatsIcon;
16
- fantasy: typeof FantasyIcon;
17
15
  warning: typeof WarningIcon;
18
16
  expand: (props: IconProps) => React.JSX.Element;
19
17
  collapse: (props: IconProps) => React.JSX.Element;
@@ -3,9 +3,12 @@ import './PanelManager.styles.css';
3
3
  import { MaestroPanelType } from '@/models/IPanel';
4
4
  interface PanelManagerState {
5
5
  activePanel: MaestroPanelType;
6
+ visiblePanels: MaestroPanelType[];
6
7
  }
7
8
  declare class PanelManager extends React.Component<{}, PanelManagerState> {
8
9
  private unsubscribe;
10
+ private panelsUnsubscribe;
11
+ private viewModel;
9
12
  constructor(props: {});
10
13
  componentDidMount(): void;
11
14
  componentWillUnmount(): void;
@@ -11,7 +11,9 @@ export interface ScrollableContainerContextType {
11
11
  * Called when an item is focused.
12
12
  * This function scrolls the container to the focused item if necessary.
13
13
  */
14
- scrollToFocusedElement: (layout: Layout) => void;
14
+ scrollToFocusedElement: (layout: Layout, options?: {
15
+ offsetTop?: number;
16
+ }) => void;
15
17
  /**
16
18
  * An array of all registered focusable items.
17
19
  * This is used to determine the order of focusable items.
@@ -70,7 +70,7 @@ interface UpdateFocusableOptions {
70
70
  export declare const getChildClosestToOrigin: (children: FocusableComponent[]) => FocusableComponent;
71
71
  declare class SpatialNavigation {
72
72
  private focusableComponents;
73
- private focusKey;
73
+ focusKey: string | null;
74
74
  private parentsHavingFocusedChild;
75
75
  private nativeMode;
76
76
  private throttle;
@@ -0,0 +1 @@
1
+ export declare const setImageDimensions: (url: string, width: number, height: number) => string;
package/dist/index.d.ts CHANGED
@@ -3,10 +3,12 @@ import IMaestroManager, { SDKConfigParams } from './interfaces/IMaestroManager';
3
3
  import IMaestroEvent from './interfaces/IMaestroEvent';
4
4
  import { MaestroEventViewModel } from './view-models/MaestroEventViewModel';
5
5
  import IMaestroKeyPlaysResponse from './modules/key-plays/interfaces/IKeyPlaysResponse';
6
+ import { IUserSettings } from './interfaces/IUserSettings';
6
7
  export { default as Overlay } from './components/molecules/Overlay/Overlay';
7
8
  export { OverlayType, IMaestroOverlayEvent, IOverlaySize, IOverlayPosition, IFantasyPayload, IOverlayAnalyticsEvent, } from './types/OverlayTypes';
8
9
  export { IWinningBet } from './models/IWinningBet';
9
10
  export { IMaestroEventDelegate, IMaestroEvent, IMaestroKeyPlaysResponse };
11
+ export { IUserSettings, DEFAULT_USER_SETTINGS, } from './interfaces/IUserSettings';
10
12
  export type Environment = 'development' | 'staging' | 'production';
11
13
  /**
12
14
  * Main SDK class that serves as the entry point for the Maestro TV SDK
@@ -27,7 +29,7 @@ declare class MaestroWebSDK implements IMaestroManager {
27
29
  * @returns {MaestroWebSDK} - The MaestroWebSDK instance
28
30
  */
29
31
  static getInstance(): MaestroWebSDK;
30
- userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate): Promise<IMaestroEvent>;
32
+ userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate, userSettings?: IUserSettings): Promise<IMaestroEvent>;
31
33
  userDidStopWatchingEvent(_: string): void;
32
34
  configure(configParams: SDKConfigParams): void;
33
35
  /**
@@ -1,65 +1,92 @@
1
1
  import { MaestroPanelType } from '@/models/IPanel';
2
2
  import IMaestroKeyPlaysResponse from '../modules/key-plays/interfaces/IKeyPlaysResponse';
3
+ import { IUserSettings } from './IUserSettings';
3
4
  /**
4
5
  * This is the public API that the app can use to make calls to the SDK related to the currently-loaded event.
5
6
  */
6
7
  export default interface IMaestroEvent {
7
8
  /**
8
9
  * @description Tells the SDK that the user just started playing a new key play clip at the given index.
10
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/playback-controls/didStartPlayingClip
9
11
  */
10
12
  didStartPlayingClip(index: number): void;
11
13
  /**
12
14
  * @description Tells the SDK that the user just stopped playing a key play clip at the given index.
15
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/playback-controls/didStopPlayingClip
13
16
  */
14
17
  didStopPlayingClip(index: number): void;
15
18
  /**
16
19
  * @description Tells the SDK that the user tried to play the clip but it failed to play back.
20
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/playback-controls/didFailToPlayClip
17
21
  */
18
22
  didFailToPlayClip(index: number): void;
19
23
  /**
20
24
  * @description Updates the SDK with the latest progress in the playback of the currently-played key play clip, from 0 to 1.
25
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/playback-controls/didUpdatePlaybackProgressOfClip
21
26
  */
22
27
  didUpdatePlaybackProgressOfClip(index: number, to: number): void;
23
28
  /**
24
29
  * @description Tells the SDK that the app displayed the MaestroPanel.
30
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/panel-management/didShowPanel
25
31
  */
26
32
  didShowPanel(): Promise<void>;
27
33
  /**
28
34
  * @description Tells the SDK that the app hid the MaestroPanel.
35
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/panel-management/didHidePanel
29
36
  */
30
37
  didHidePanel(): Promise<void>;
31
38
  /**
32
39
  * @description Alerts the SDK that the current event does not support key plays.
40
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/panel-management/currentEventDoesNotSupportKeyPlays
33
41
  */
34
42
  currentEventDoesNotSupportKeyPlays(): void;
35
43
  /**
36
44
  * @description Retrieves the event ID for the currently loaded event.
45
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/state/getCurrentEventID
37
46
  */
38
47
  getCurrentEventID(): string | null;
39
48
  /**
40
49
  * @description Retrieves the array index of the key play clip that is currently being played.
50
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/state/getCurrentlyPlayingClipIndex
41
51
  */
42
52
  getCurrentlyPlayingClipIndex(): number | null;
43
53
  /**
44
54
  * @description Retrieves the array index of the key plays clip that was most recently played.
55
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/state/getLastPlayedClipIndex
45
56
  */
46
57
  getLastPlayedClipIndex(): number | null;
47
58
  /**
48
59
  * @description Retrieves the progress (between 0 and 1) of the currently-played key play clip.
60
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/state/getCurrentClipPlaybackProgress
49
61
  */
50
62
  getCurrentClipPlaybackProgress(): number | null;
51
63
  /**
52
64
  * @description Retrieves the number of key plays.
65
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/state/getKeyPlaysCount
53
66
  */
54
67
  getKeyPlaysCount(): number | null;
55
68
  /**
56
69
  * @description Tells the SDK to start managing focus.
70
+ * https://developers.maestro.io/sdk/web/focus-management/parent-app-focus
57
71
  */
58
72
  startFocusManagement(): Promise<void>;
59
73
  /**
60
74
  * @description Feeds the SDK new key plays data. A null value indicates a failure to retrieve the data.
75
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/state/updateKeyPlaysData
61
76
  */
62
77
  updateKeyPlaysData(data: IMaestroKeyPlaysResponse | null): Promise<void>;
78
+ updateUserSettings(settings: IUserSettings): Promise<void>;
79
+ /**
80
+ * @description Updates the SDK with the current time code of the player.
81
+ * This is used to synchronize the SDK with the player's current time code.
82
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/state/updatePlayerTimeCode
83
+ */
84
+ updatePlayerTimeCode(timestamp: number): void;
85
+ /**
86
+ * @description Retrieves the current player time code stored in the SDK.
87
+ * https://developers.maestro.io/sdk/web/maestro-event-interface/state/getPlayerTimeCode
88
+ */
89
+ getPlayerTimeCode(): number | null;
63
90
  simulateUseCase<T = any>(useCase: TestUseCase, panelType: MaestroPanelType, testData?: T): void;
64
91
  }
65
92
  declare const TEST_USE_CASES: {
@@ -5,31 +5,44 @@ export default interface IMaestroEventDelegate {
5
5
  /**
6
6
  * @description Allows the SDK to tell the client app that the user has encountered an error screen for lack of valid key
7
7
  plays data, indicating the client app should call `updateKeyPlaysData` as soon as possible.
8
+ https://developers.maestro.io/sdk/web/event-delegate/userRequestedNewKeyPlaysData
8
9
  */
9
10
  userRequestedNewKeyPlaysData(): Promise<void>;
10
11
  /**
11
12
  * Allows the SDK to request the client app play a particular key plays clip, given its array index in the key plays list. Note that the `MaestroKeyPlaysResponse` subdivides the key plays by section, so the `index` referenced here assumes the client app has access to a flattened list of the key plays, disregarding the sectional subdivisions.
13
+ * https://developers.maestro.io/sdk/web/event-delegate/playClip
12
14
  */
13
15
  playClip(atIndex: number): void;
14
16
  /**
15
- * @description SDK can notify the client app when its time to handle the focus management
17
+ * @description SDK can notify the client app when its time to handle the focus management.
18
+ * https://developers.maestro.io/sdk/web/event-delegate/startFocusManagement
16
19
  */
17
20
  startFocusManagement(): Promise<void>;
18
21
  /**
19
- * @description Check if the user is authenticated for betting
22
+ * @description Check if the user is authenticated for betting.
23
+ * https://developers.maestro.io/sdk/web/event-delegate/userIsAuthenticated
20
24
  */
21
25
  userIsAuthenticated(): Promise<boolean>;
22
26
  /**
23
- * @description Get the user's SWID for authenticated betting requests
27
+ * @description Get the user's SWID for authenticated betting requests.
28
+ * https://developers.maestro.io/sdk/web/event-delegate/getUserSWID
24
29
  */
25
30
  getUserSWID(): Promise<string | null>;
26
31
  /**
27
- * @description Get the user's Cookie token for authenticated betting requests
32
+ * @description Get the user's Cookie token for authenticated betting requests.
33
+ * https://developers.maestro.io/sdk/web/event-delegate/getUserToken
28
34
  */
29
35
  getUserToken(): Promise<string | null>;
30
36
  /**
31
- * @description Get the API endpoint for betting-related requests.
32
- * This endpoint is used to fetch betting data, such as odds and betting lines.
37
+ * @description Get the API base URL for betting-related requests.
38
+ * This baseURL is used to fetch betting data, such as odds and betting lines.
39
+ * https://developers.maestro.io/sdk/web/event-delegate/getBettingAPIBaseURL
33
40
  */
34
41
  getBettingAPIBaseURL(): string;
42
+ /**
43
+ * @description Get the API base URL for stats-related requests.
44
+ * This baseURL is used to fetch stats data for the event.
45
+ *
46
+ */
47
+ getStatsAPIBaseURL(): string;
35
48
  }
@@ -1,5 +1,6 @@
1
1
  import IMaestroEventDelegate from './IMaestroEventDelegate';
2
2
  import IMaestroEvent from './IMaestroEvent';
3
+ import { IUserSettings } from './IUserSettings';
3
4
  export type SDKConfigParams = {
4
5
  /**
5
6
  * The type of environment to use. Defaults to `development`. The available options are `development`, `staging`, and `production`.
@@ -33,6 +34,10 @@ export type SDKConfigParams = {
33
34
  * The client app SWID for authentication.
34
35
  */
35
36
  clientAppSwid?: string;
37
+ /**
38
+ * User settings for customizing SDK behavior (panel visibility, feature toggles, etc.)
39
+ */
40
+ userSettings?: IUserSettings;
36
41
  };
37
42
  /**
38
43
  This is the MaestroKit top-level API for initializing and configuring the framework. It encompasses all functionality that is not specific to an event.
@@ -47,6 +52,7 @@ export default interface IMaestroManager {
47
52
  * @param {SDKConfigParams['siteID']} configParams.siteID - The site ID to use for the SDK.
48
53
  * @param {SDKConfigParams['jwt']} configParams.jwt - The JWT token to use for authentication.
49
54
  * @param {SDKConfigParams['userID']} configParams.userID - The user ID of the logged account.
55
+ * @param {SDKConfigParams['userSettings']} configParams.userSettings - User settings for customizing SDK behavior.
50
56
  */
51
57
  configure(configParams: SDKConfigParams): void;
52
58
  /**
@@ -54,9 +60,10 @@ export default interface IMaestroManager {
54
60
  Arguments:
55
61
  - eventID: The Event ID for the event opened in the player.
56
62
  - delegate: an instance of the app's implementation of IMaestroEventDelegate
63
+ - userSettings: Optional user settings to override the configured settings for this event
57
64
  The function returns an instance of MaestroEventViewModel, which includes an implementation of IMaestroEvent. IMaestroEvent represents the app-facing portion of the MaestroKit API related to the currently-loaded event. So after `userDidStartWatchingEvent` is called, the SDK has access to the API detailed in `MaestroEventDelegate` for making calls to the app, and the app has access to the API detailed in `IMaestroEvent` for making calls to the SDK.
58
65
  */
59
- userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate): Promise<IMaestroEvent>;
66
+ userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate, userSettings?: IUserSettings): Promise<IMaestroEvent>;
60
67
  /**
61
68
  * @description Tells the SDK the user has closed an event that was open in the app's player.
62
69
  * @param eventID
@@ -0,0 +1,36 @@
1
+ /**
2
+ * User settings interface for customizing Maestro Web SDK behavior
3
+ * Supports panel-level and feature-level customizations
4
+ */
5
+ export interface IUserSettings {
6
+ panels?: {
7
+ bets?: {
8
+ /** Hide the entire bets panel from panel selection */
9
+ hidePanel?: boolean;
10
+ /** Hide wager values (dollar amounts) in betting cards */
11
+ hideWagers?: boolean;
12
+ };
13
+ stats?: {
14
+ /** Hide the entire stats panel from panel selection */
15
+ hidePanel?: boolean;
16
+ };
17
+ keyPlays?: {
18
+ /** Hide the entire key plays panel from panel selection */
19
+ hidePanel?: boolean;
20
+ };
21
+ };
22
+ }
23
+ /**
24
+ * Default user settings - all features enabled by default
25
+ */
26
+ export declare const DEFAULT_USER_SETTINGS: IUserSettings;
27
+ /**
28
+ * Panel-specific settings type helpers
29
+ */
30
+ export type BetsSettings = NonNullable<IUserSettings['panels']>['bets'];
31
+ export type StatsSettings = NonNullable<IUserSettings['panels']>['stats'];
32
+ export type KeyPlaysSettings = NonNullable<IUserSettings['panels']>['keyPlays'];
33
+ /**
34
+ * Utility type for getting panel settings by panel type
35
+ */
36
+ export type PanelSettings<T extends keyof NonNullable<IUserSettings['panels']>> = NonNullable<IUserSettings['panels']>[T];