@maestro_io/maestro-web-sdk 2.3.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/maestro-web-sdk.umd.js +17 -3
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/{MaestroEventDelegate.d.ts → src/development/MaestroEventDelegate.d.ts} +10 -4
- package/dist/src/development/TimeSeek.d.ts +22 -0
- package/dist/{index.d.ts → src/index.d.ts} +3 -30
- package/dist/src/interfaces/IMaestroManager.d.ts +45 -0
- package/dist/{modules → src/modules}/bets/view/BetsView.d.ts +2 -1
- package/dist/{modules → src/modules}/bets/view/SixPack/SixPackView.d.ts +1 -0
- package/dist/{modules → src/modules}/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +1 -0
- package/dist/{modules → src/modules}/bets/view-model/BetsViewModel.d.ts +4 -0
- package/dist/{modules → src/modules}/key-plays/view/KeyPlayCardView.d.ts +2 -0
- package/dist/{modules → src/modules}/key-plays/view/KeyPlaysView.d.ts +3 -1
- package/dist/{modules → src/modules}/stats/view/StatsView.d.ts +2 -1
- package/dist/{modules → src/modules}/stats/view-model/StatsViewModel.d.ts +2 -0
- package/dist/src/sentry.d.ts +3 -0
- package/dist/{services → src/services}/NetworkManager/NetworkManager.d.ts +1 -2
- package/dist/{services → src/services}/PageService/PageService.d.ts +1 -0
- package/dist/src/test-polyfills.d.ts +1 -0
- package/dist/{view-models → src/view-models}/MaestroEventViewModel.d.ts +3 -3
- package/package.json +3 -1
- package/dist/interfaces/IMaestroManager.d.ts +0 -103
- /package/dist/{components → src/components}/atoms/BaseButton/BaseButton.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/BaseButton/index.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/Image/index.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/Rive/index.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/BetGeneralIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/BetsIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/BetsWarningIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/CheckmarkIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/CollapseIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/ExpandIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/FlameIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/Icon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/KeyPlaysIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/MobilePhoneIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/PlayIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/StatsIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/TimesIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/WarningIcon.d.ts +0 -0
- /package/dist/{components → src/components}/atoms/SvgIcon/index.d.ts +0 -0
- /package/dist/{components → src/components}/core/App/App.d.ts +0 -0
- /package/dist/{components → src/components}/core/App/index.d.ts +0 -0
- /package/dist/{components → src/components}/core/OverlayContainer.d.ts +0 -0
- /package/dist/{components → src/components}/core/PanelManager/PanelManager.d.ts +0 -0
- /package/dist/{components → src/components}/core/PanelManager/index.d.ts +0 -0
- /package/dist/{components → src/components}/core/ScrollableContainer/FocusableItem.d.ts +0 -0
- /package/dist/{components → src/components}/core/ScrollableContainer/ScrollableContainer.d.ts +0 -0
- /package/dist/{components → src/components}/core/ScrollableContainer/index.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/ActionButton/ActionButton.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/ActionButton/index.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/Overlay/Overlay.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/Overlay/index.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/PanelNavButton/PanelNavButton.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/PanelNavButton/index.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/SegmentButton/SegmentButton.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/SegmentButton/index.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/TabLoadError/TabLoadError.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/TabLoadError/index.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/WatchButton/WatchButton.d.ts +0 -0
- /package/dist/{components → src/components}/molecules/WatchButton/index.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/PanelNavigation/PanelNavigation.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/PanelNavigation/index.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/SegmentController/SegmentController.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/SegmentController/index.d.ts +0 -0
- /package/dist/{test-polyfills.d.ts → src/development/development.d.ts} +0 -0
- /package/dist/{external → src/external}/AxiosNetworkClient.d.ts +0 -0
- /package/dist/{external → src/external}/LocalStorageCacheManager.d.ts +0 -0
- /package/dist/{external → src/external}/ReactRenderer.d.ts +0 -0
- /package/dist/{external → src/external}/mocks/MockExternalNetworkClient.d.ts +0 -0
- /package/dist/{external → src/external}/ports/cacheManager.d.ts +0 -0
- /package/dist/{external → src/external}/ports/networkClient.d.ts +0 -0
- /package/dist/{external → src/external}/ports/renderer.d.ts +0 -0
- /package/dist/{external → src/external}/spatial-navigation/index.d.ts +0 -0
- /package/dist/{external → src/external}/spatial-navigation/measureLayout.d.ts +0 -0
- /package/dist/{external → src/external}/spatial-navigation/spatialNavigation.d.ts +0 -0
- /package/dist/{external → src/external}/spatial-navigation/utils.d.ts +0 -0
- /package/dist/{external → src/external}/spatial-navigation/visualDebugger.d.ts +0 -0
- /package/dist/{external → src/external}/spatial-navigation/withFocusable.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/Observable.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/url.d.ts +0 -0
- /package/dist/{interfaces → src/interfaces}/IMaestroEvent.d.ts +0 -0
- /package/dist/{interfaces → src/interfaces}/IMaestroEventDelegate.d.ts +0 -0
- /package/dist/{interfaces → src/interfaces}/IUserSettings.d.ts +0 -0
- /package/dist/{models → src/models}/IModel.d.ts +0 -0
- /package/dist/{models → src/models}/IPanel.d.ts +0 -0
- /package/dist/{models → src/models}/ITheme.d.ts +0 -0
- /package/dist/{models → src/models}/IWinningBet.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/interfaces/IBets.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/mocks.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/types/BetsAnalyticsTypes.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/HotProps/HotPropsView.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/BetResult/BetResult.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/BetsCard/BetsCard.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/Boost/Boost.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/Parlay/Parlay.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/Straight/Straight.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/Teaser/Teaser.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/UserBets/UserBetsView.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/components/Bet/Bet.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/components/BetPill/BetPill.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/components/BetsCard/BetsCard.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/components/BetsCard/BetsCardHeader.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/components/LocationWarning/LocationWarning.d.ts +0 -0
- /package/dist/{modules → src/modules}/bets/view/components/PromoCodeBanner/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/key-plays/constants.d.ts +0 -0
- /package/dist/{modules → src/modules}/key-plays/interfaces/IKeyPlays.d.ts +0 -0
- /package/dist/{modules → src/modules}/key-plays/interfaces/IKeyPlaysResponse.d.ts +0 -0
- /package/dist/{modules → src/modules}/key-plays/view/KeyPlayCardScoreTagView.d.ts +0 -0
- /package/dist/{modules → src/modules}/key-plays/view/KeyPlayErrorStateView.d.ts +0 -0
- /package/dist/{modules → src/modules}/key-plays/view-model/KeyPlaysViewModel.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/interfaces/IStats.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/mocks.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/utils/driveSummaryUtils.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/utils/renderTeamStatistic.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/utils.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/ActiveAthletes/ActiveAthletes.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/ActiveAthletes/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/DriveSummary/DrivePlayCard.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/DriveSummary/DriveSummary.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/DriveSummary/Header/DriveSummaryHeader.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/DriveSummary/MainStat/MainStat.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/DriveSummary/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/GameLeaders/GameLeaders.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/GameLeaders/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/MatchPredictor/DonutChart/DonutChart.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/MatchPredictor/DonutChart/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/MatchPredictor/MatchPredictorView.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/MatchPredictor/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/RecentGames/RecentGames.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/RecentGames/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/StatsItemView.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/StatsQRCode/StatsQRCodeView.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/StatsQRCode/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/TeamStats/TeamStatsView.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/TeamStats/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/Teams/StatsCarousel.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/Teams/StatsProgressBar.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/Teams/Teams.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/Teams/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/WinProbability/WinProbability.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/WinProbability/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/components/AthletesStatistics/StatisticTable.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/components/AthletesStatistics/index.d.ts +0 -0
- /package/dist/{modules → src/modules}/stats/view/index.d.ts +0 -0
- /package/dist/{services → src/services}/AnalyticsService/AnalyticsService.d.ts +0 -0
- /package/dist/{services → src/services}/AnalyticsService/types.d.ts +0 -0
- /package/dist/{services → src/services}/BetsService.d.ts +0 -0
- /package/dist/{services → src/services}/InsightsService/InsightsPayloadBuilder.d.ts +0 -0
- /package/dist/{services → src/services}/InsightsService/InsightsService.d.ts +0 -0
- /package/dist/{services → src/services}/NetworkManager/NetworkManagerFactory.d.ts +0 -0
- /package/dist/{services → src/services}/NetworkManager/errors.d.ts +0 -0
- /package/dist/{services → src/services}/NetworkManager/types.d.ts +0 -0
- /package/dist/{services → src/services}/PageService/index.d.ts +0 -0
- /package/dist/{services → src/services}/PageService/mocks.d.ts +0 -0
- /package/dist/{services → src/services}/PageService/types.d.ts +0 -0
- /package/dist/{services → src/services}/StatsService.d.ts +0 -0
- /package/dist/{services → src/services}/ThemeManager/constants.d.ts +0 -0
- /package/dist/{services → src/services}/UserSettingsManager.d.ts +0 -0
- /package/dist/{types → src/types}/OverlayTypes.d.ts +0 -0
- /package/dist/{view-models → src/view-models}/OverlayViewModel.d.ts +0 -0
- /package/dist/{view-models → src/view-models}/PanelManagerViewModel.d.ts +0 -0
- /package/dist/{view-models → src/view-models}/ViewModel.d.ts +0 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import IMaestroEventDelegate from '
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import IMaestroEventDelegate from '../interfaces/IMaestroEventDelegate';
|
|
2
|
+
import { ActionTrackEvent, ImpressionTrackEvent } from '../services/AnalyticsService/types';
|
|
3
|
+
type Environment = 'development' | 'production';
|
|
4
4
|
/**
|
|
5
5
|
* Our own implementation of the IMaestroEventDelegate interface. Useful for Development and Testing
|
|
6
6
|
*/
|
|
7
7
|
export default class MaestroEventDelegate implements IMaestroEventDelegate {
|
|
8
|
+
loggedIn: boolean;
|
|
8
9
|
env: Environment;
|
|
9
|
-
constructor(env?:
|
|
10
|
+
constructor({ env, loggedIn, }?: {
|
|
11
|
+
env: Environment;
|
|
12
|
+
loggedIn: boolean;
|
|
13
|
+
});
|
|
14
|
+
toggleLogin(): void;
|
|
10
15
|
trackImpression(impression: ImpressionTrackEvent): void;
|
|
11
16
|
trackAction(action: ActionTrackEvent): void;
|
|
12
17
|
getStatsAPIBaseURL(): string;
|
|
@@ -18,3 +23,4 @@ export default class MaestroEventDelegate implements IMaestroEventDelegate {
|
|
|
18
23
|
getUserToken(): Promise<string | null>;
|
|
19
24
|
playClip(atIndex: number): void;
|
|
20
25
|
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TimeCodeSeekProps {
|
|
3
|
+
eventId: string;
|
|
4
|
+
}
|
|
5
|
+
interface TimeCodeSeekState {
|
|
6
|
+
currentTimeCode: number | null;
|
|
7
|
+
gameStartTimeCode: number | null;
|
|
8
|
+
}
|
|
9
|
+
export default class TimeCodeSeek extends React.Component<TimeCodeSeekProps, TimeCodeSeekState> {
|
|
10
|
+
constructor(props: TimeCodeSeekProps);
|
|
11
|
+
componentDidMount(): void;
|
|
12
|
+
addMinutesFromTimestamp: (timestamp: number, minutes: number) => number;
|
|
13
|
+
formatTimestampToWallClock: (timestamp: number) => string;
|
|
14
|
+
formatWallClockToTimestamp: (timestamp: string) => number;
|
|
15
|
+
retreat: (minutes: number) => Promise<void>;
|
|
16
|
+
advance: (minutes: number) => Promise<void>;
|
|
17
|
+
setToNow: () => void;
|
|
18
|
+
resetToGameStart: () => void;
|
|
19
|
+
get timeCode(): number;
|
|
20
|
+
render(): React.JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -12,7 +12,6 @@ export { IWinningBet } from './models/IWinningBet';
|
|
|
12
12
|
export { ActionTrackEvent, ImpressionTrackEvent, Metadata, PanelClickAction, PanelViewAction, } from './services/AnalyticsService/types';
|
|
13
13
|
export { IMaestroEventDelegate, IMaestroEvent, IMaestroKeyPlaysResponse, MaestroPanelType, };
|
|
14
14
|
export { IUserSettings, DEFAULT_USER_SETTINGS, } from './interfaces/IUserSettings';
|
|
15
|
-
export type Environment = 'development' | 'production';
|
|
16
15
|
/**
|
|
17
16
|
* Main SDK class that serves as the entry point for the Maestro TV SDK
|
|
18
17
|
* Follows a singleton pattern similar to the Swift implementation
|
|
@@ -20,13 +19,8 @@ export type Environment = 'development' | 'production';
|
|
|
20
19
|
declare class MaestroWebSDK implements IMaestroManager {
|
|
21
20
|
private static instance;
|
|
22
21
|
private renderer;
|
|
23
|
-
private siteID
|
|
24
|
-
private userID?;
|
|
25
|
-
private maestroJwt?;
|
|
26
|
-
private clientAppToken?;
|
|
27
|
-
private clientAppSwid?;
|
|
22
|
+
private siteID;
|
|
28
23
|
private maestroEventViewModel;
|
|
29
|
-
private environment;
|
|
30
24
|
private pageConfig;
|
|
31
25
|
private constructor();
|
|
32
26
|
/**
|
|
@@ -37,12 +31,6 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
37
31
|
userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate, userSettings?: IUserSettings): Promise<IMaestroEvent>;
|
|
38
32
|
userDidStopWatchingEvent(_: string): void;
|
|
39
33
|
configure(configParams: SDKConfigParams): void;
|
|
40
|
-
/**
|
|
41
|
-
* Sets the environment for the SDK
|
|
42
|
-
* @param environment The environment to set
|
|
43
|
-
*/
|
|
44
|
-
setEnvironment(environment: Environment): void;
|
|
45
|
-
getEnvironment(): Environment;
|
|
46
34
|
/**
|
|
47
35
|
* Checks if this is an authorized client based on siteID
|
|
48
36
|
*/
|
|
@@ -51,29 +39,14 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
51
39
|
* Sets the site ID for the SDK
|
|
52
40
|
* @param siteID The site ID to set
|
|
53
41
|
*/
|
|
54
|
-
setSiteID(siteID
|
|
55
|
-
getSiteID(): string
|
|
56
|
-
/**
|
|
57
|
-
* Sets the user ID for the SDK
|
|
58
|
-
* @param userID The user ID to set
|
|
59
|
-
*/
|
|
60
|
-
setUserID(userID: string): void;
|
|
61
|
-
getUserID(): string | undefined;
|
|
42
|
+
setSiteID(siteID: string): void;
|
|
43
|
+
getSiteID(): string;
|
|
62
44
|
/**
|
|
63
45
|
* Gets the event view model
|
|
64
46
|
* @returns The current event view model
|
|
65
47
|
*/
|
|
66
48
|
getMaestroEventViewModel(): MaestroEventViewModel;
|
|
67
49
|
renderPanel(id: string): Promise<() => void>;
|
|
68
|
-
setMaestroJwt(jwt: string | undefined): void;
|
|
69
|
-
setClientAppSwid(swid: string | undefined): void;
|
|
70
|
-
setClientAppToken(jwt: string | undefined): void;
|
|
71
|
-
authenticateUser(swid: string, token: string): Promise<void>;
|
|
72
|
-
deauthenticateUser(): Promise<void>;
|
|
73
|
-
getCurrentMaestroJwt(): string | undefined;
|
|
74
|
-
getClientAppToken(): string | undefined;
|
|
75
|
-
getCurrentUserID(): string | undefined;
|
|
76
|
-
getClientAppSwid(): string | undefined;
|
|
77
50
|
getPageConfig(): PageConfig | null;
|
|
78
51
|
}
|
|
79
52
|
declare const SDK: MaestroWebSDK;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import IMaestroEventDelegate from './IMaestroEventDelegate';
|
|
2
|
+
import IMaestroEvent from './IMaestroEvent';
|
|
3
|
+
import { IUserSettings } from './IUserSettings';
|
|
4
|
+
export type SDKConfigParams = {
|
|
5
|
+
/**
|
|
6
|
+
* The site ID to use for the SDK.
|
|
7
|
+
*/
|
|
8
|
+
siteID: string;
|
|
9
|
+
/**
|
|
10
|
+
* User settings for customizing SDK behavior (panel visibility, feature toggles, etc.)
|
|
11
|
+
*/
|
|
12
|
+
userSettings?: IUserSettings;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
This is the MaestroKit top-level API for initializing and configuring the framework. It encompasses all functionality that is not specific to an event.
|
|
16
|
+
*/
|
|
17
|
+
export default interface IMaestroManager {
|
|
18
|
+
/**
|
|
19
|
+
* @description Configure the MaestroWebSDK.
|
|
20
|
+
* @param {SDKConfigParams} configParams - Configuration parameters
|
|
21
|
+
* @param {SDKConfigParams['siteID']} configParams.siteID - The site ID to use for the SDK.
|
|
22
|
+
* @param {SDKConfigParams['userSettings']} configParams.userSettings - User settings for customizing SDK behavior.
|
|
23
|
+
*/
|
|
24
|
+
configure(configParams: SDKConfigParams): void;
|
|
25
|
+
/**
|
|
26
|
+
Tells the SDK the user has opened an event in the app's player.
|
|
27
|
+
Arguments:
|
|
28
|
+
- eventID: The Event ID for the event opened in the player.
|
|
29
|
+
- delegate: an instance of the app's implementation of IMaestroEventDelegate
|
|
30
|
+
- userSettings: Optional user settings to override the configured settings for this event
|
|
31
|
+
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.
|
|
32
|
+
*/
|
|
33
|
+
userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate, userSettings?: IUserSettings): Promise<IMaestroEvent>;
|
|
34
|
+
/**
|
|
35
|
+
* @description Tells the SDK the user has closed an event that was open in the app's player.
|
|
36
|
+
* @param eventID
|
|
37
|
+
*/
|
|
38
|
+
userDidStopWatchingEvent(eventID: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Render the PanelManager with the available panels for the current event in the specified HTML id element.
|
|
41
|
+
* @param id - The ID of the HTML element where the panel will be rendered.
|
|
42
|
+
* @return A Promise that resolves to a function to remove the panel when no longer needed.
|
|
43
|
+
*/
|
|
44
|
+
renderPanel(id: string): Promise<() => void>;
|
|
45
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import './BetsView.styles.css';
|
|
3
|
-
import { BetItem, BetsErrorState } from '../view-model/BetsViewModel';
|
|
3
|
+
import BetsViewModel, { BetItem, BetsErrorState } from '../view-model/BetsViewModel';
|
|
4
4
|
import { Direction } from '@/external/spatial-navigation/utils';
|
|
5
5
|
interface BetsViewState {
|
|
6
6
|
container: HTMLDivElement | null;
|
|
@@ -17,6 +17,7 @@ declare class BetsView extends Component<{}, BetsViewState> {
|
|
|
17
17
|
private hideWagersUnsub;
|
|
18
18
|
private vm;
|
|
19
19
|
constructor(props: {});
|
|
20
|
+
get viewModel(): BetsViewModel;
|
|
20
21
|
componentDidMount(): void;
|
|
21
22
|
componentWillUnmount(): void;
|
|
22
23
|
renderBetItem: (item: BetItem) => React.JSX.Element | null;
|
|
@@ -15,6 +15,7 @@ export default class FocusableSixPackViewWrapper extends React.Component<Props>
|
|
|
15
15
|
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
16
16
|
onBecameFocused: (layout: Layout) => void;
|
|
17
17
|
onArrowPress: (d: Direction, _props: any) => void;
|
|
18
|
+
get viewModel(): import("../../view-model/BetsViewModel").BetsViewModel;
|
|
18
19
|
onEnterPress: () => void;
|
|
19
20
|
render(): React.JSX.Element;
|
|
20
21
|
}
|
package/dist/{modules → src/modules}/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts
RENAMED
|
@@ -11,6 +11,7 @@ export default class FocusablePromoCodeBannerWrapper extends React.Component<IBe
|
|
|
11
11
|
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
12
12
|
onBecameFocused: (layout: Layout) => void;
|
|
13
13
|
onArrowPress: (d: Direction, _props: any) => void;
|
|
14
|
+
get viewModel(): import("@/modules/bets/view-model/BetsViewModel").BetsViewModel;
|
|
14
15
|
onEnterPress: () => void;
|
|
15
16
|
render(): React.JSX.Element;
|
|
16
17
|
}
|
|
@@ -2,6 +2,7 @@ import IKeyPlay, { KeyPlayLoadFailureStatus } from '../interfaces/IKeyPlays';
|
|
|
2
2
|
import './KeyPlayCardView.styles.css';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
5
|
+
import KeyPlaysViewModel from '../view-model/KeyPlaysViewModel';
|
|
5
6
|
import { Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
6
7
|
type KeyPlayCardViewProps = IKeyPlay & {
|
|
7
8
|
isPlaying: boolean;
|
|
@@ -16,6 +17,7 @@ export declare class KeyPlayCardView extends React.Component<KeyPlayCardViewProp
|
|
|
16
17
|
private failedClipListener;
|
|
17
18
|
private vm;
|
|
18
19
|
constructor(props: KeyPlayCardViewProps);
|
|
20
|
+
get viewModel(): KeyPlaysViewModel;
|
|
19
21
|
componentDidMount(): void;
|
|
20
22
|
componentWillUnmount(): void;
|
|
21
23
|
onLoad: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import './KeyPlaysView.styles.css';
|
|
3
3
|
import { KeyPlaysErrorState } from '../interfaces/IKeyPlays';
|
|
4
|
-
import { KeyPlayItem } from '../view-model/KeyPlaysViewModel';
|
|
4
|
+
import KeyPlaysViewModel, { KeyPlayItem } from '../view-model/KeyPlaysViewModel';
|
|
5
5
|
interface IKeyPlaysState {
|
|
6
6
|
playbackProgress: number | null;
|
|
7
7
|
playbackIndex: number | null;
|
|
@@ -15,6 +15,7 @@ export declare class KeyPlays extends Component<{}, IKeyPlaysState> {
|
|
|
15
15
|
private itemsUnsub;
|
|
16
16
|
private vm;
|
|
17
17
|
constructor(props: {});
|
|
18
|
+
get viewModel(): KeyPlaysViewModel;
|
|
18
19
|
componentDidMount(): void;
|
|
19
20
|
componentWillUnmount(): void;
|
|
20
21
|
private handlePlayClip;
|
|
@@ -27,6 +28,7 @@ export default class KeyPlaysWithErrorState extends Component<{}, KeyPlaysWithEr
|
|
|
27
28
|
private errorStateUnsub;
|
|
28
29
|
private vm;
|
|
29
30
|
constructor(props: {});
|
|
31
|
+
get viewModel(): KeyPlaysViewModel;
|
|
30
32
|
componentDidMount(): void;
|
|
31
33
|
componentWillUnmount(): void;
|
|
32
34
|
private handleRetry;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import './StatsView.styles.css';
|
|
3
|
-
import { StatsErrorState, StatsItem } from '../view-model/StatsViewModel';
|
|
3
|
+
import StatsViewModel, { StatsErrorState, StatsItem } from '../view-model/StatsViewModel';
|
|
4
4
|
import { Direction } from '@/external/spatial-navigation/utils';
|
|
5
5
|
interface StatsViewState {
|
|
6
6
|
container: HTMLDivElement | null;
|
|
@@ -15,6 +15,7 @@ declare class StatsView extends Component<{}, StatsViewState> {
|
|
|
15
15
|
private errorStateListener;
|
|
16
16
|
private vm;
|
|
17
17
|
constructor(props: {});
|
|
18
|
+
get viewModel(): StatsViewModel;
|
|
18
19
|
componentDidMount(): void;
|
|
19
20
|
componentWillUnmount(): void;
|
|
20
21
|
clearTabLoadFailure: () => void;
|
|
@@ -19,6 +19,8 @@ export type HeaderTeamStatItem = {
|
|
|
19
19
|
displayName: string;
|
|
20
20
|
homeTeamValue: number;
|
|
21
21
|
awayTeamValue: number;
|
|
22
|
+
awayTeamDisplayValue: string;
|
|
23
|
+
homeTeamDisplayValue: string;
|
|
22
24
|
}[];
|
|
23
25
|
homeTeam: Pick<Team, 'color' | 'id' | 'logo' | 'name' | 'abbreviation' | 'record'> & {
|
|
24
26
|
linescores: string[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Environment } from '@/index';
|
|
2
1
|
import { ICacheManager } from '../../external/ports/cacheManager';
|
|
3
2
|
import { INetworkClient } from '../../external/ports/networkClient';
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const MAESTRO_BASE_URL = "https://api.maestro.io";
|
|
5
4
|
export declare const SDK_FLAVOR = "MaestroKit_Web";
|
|
6
5
|
export declare const ENDPOINTS: {
|
|
7
6
|
CAN_I_PLAY: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -17,9 +17,9 @@ export declare class MaestroEventViewModel extends ViewModel implements IMaestro
|
|
|
17
17
|
private _isShowingPanel;
|
|
18
18
|
private playerTimeCode;
|
|
19
19
|
delegate: IMaestroEventDelegate;
|
|
20
|
-
keyPlaysViewModel: KeyPlaysViewModel;
|
|
21
|
-
betsViewModel: BetsViewModel;
|
|
22
|
-
statsViewModel: StatsViewModel;
|
|
20
|
+
keyPlaysViewModel: KeyPlaysViewModel | null;
|
|
21
|
+
betsViewModel: BetsViewModel | null;
|
|
22
|
+
statsViewModel: StatsViewModel | null;
|
|
23
23
|
panelManagerViewModel: PanelManagerViewModel;
|
|
24
24
|
navigation: SpatialNavigation;
|
|
25
25
|
constructor(eventId: string | undefined, delegate: IMaestroEventDelegate);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maestro_io/maestro-web-sdk",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/maestro-web-sdk.umd.js",
|
|
@@ -74,6 +74,8 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@rive-app/canvas": "^2.27.3",
|
|
77
|
+
"@sentry/browser": "^6.19.7",
|
|
78
|
+
"@sentry/tracing": "^6.19.7",
|
|
77
79
|
"axios": "^0.27.2",
|
|
78
80
|
"flexibility": "^2.0.1",
|
|
79
81
|
"prop-types": "15",
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import IMaestroEventDelegate from './IMaestroEventDelegate';
|
|
2
|
-
import IMaestroEvent from './IMaestroEvent';
|
|
3
|
-
import { Environment } from '..';
|
|
4
|
-
import { IUserSettings } from './IUserSettings';
|
|
5
|
-
export type SDKConfigParams = {
|
|
6
|
-
/**
|
|
7
|
-
* The type of environment to use. Defaults to `development`. The available options are `development`, `staging`, and `production`.
|
|
8
|
-
*/
|
|
9
|
-
environment?: Environment;
|
|
10
|
-
/**
|
|
11
|
-
* The frequency in seconds to poll for updates. Defaults to 5.0.
|
|
12
|
-
*/
|
|
13
|
-
pollFrequency?: number;
|
|
14
|
-
/**
|
|
15
|
-
* The frequency in seconds to update progress. Defaults to 0.1.
|
|
16
|
-
*/
|
|
17
|
-
progressUpdateFrequency?: number;
|
|
18
|
-
/**
|
|
19
|
-
* The site ID to use for the SDK.
|
|
20
|
-
*/
|
|
21
|
-
siteID?: string;
|
|
22
|
-
/**
|
|
23
|
-
* The user ID of the logged account.
|
|
24
|
-
*/
|
|
25
|
-
userID?: string;
|
|
26
|
-
/**
|
|
27
|
-
* The Maestro JWT token for authentication.
|
|
28
|
-
*/
|
|
29
|
-
maestroJwt?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The client app Cookie Token for authentication.
|
|
32
|
-
*/
|
|
33
|
-
clientAppToken?: string;
|
|
34
|
-
/**
|
|
35
|
-
* The client app SWID for authentication.
|
|
36
|
-
*/
|
|
37
|
-
clientAppSwid?: string;
|
|
38
|
-
/**
|
|
39
|
-
* User settings for customizing SDK behavior (panel visibility, feature toggles, etc.)
|
|
40
|
-
*/
|
|
41
|
-
userSettings?: IUserSettings;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
This is the MaestroKit top-level API for initializing and configuring the framework. It encompasses all functionality that is not specific to an event.
|
|
45
|
-
*/
|
|
46
|
-
export default interface IMaestroManager {
|
|
47
|
-
/**
|
|
48
|
-
* @description Configure the MaestroWebSDK.
|
|
49
|
-
* @param {SDKConfigParams} configParams - Configuration parameters
|
|
50
|
-
* @param {SDKConfigParams['environment']} configParams.environment - The type of environment to use. Defaults to 'development'.
|
|
51
|
-
* @param {SDKConfigParams['pollFrequency']} configParams.pollFrequency - The frequency in seconds to poll for updates. Defaults to 5.0.
|
|
52
|
-
* @param {SDKConfigParams['progressUpdateFrequency']} configParams.progressUpdateFrequency - The frequency in seconds to update progress. Defaults to 0.1.
|
|
53
|
-
* @param {SDKConfigParams['siteID']} configParams.siteID - The site ID to use for the SDK.
|
|
54
|
-
* @param {SDKConfigParams['jwt']} configParams.jwt - The JWT token to use for authentication.
|
|
55
|
-
* @param {SDKConfigParams['userID']} configParams.userID - The user ID of the logged account.
|
|
56
|
-
* @param {SDKConfigParams['userSettings']} configParams.userSettings - User settings for customizing SDK behavior.
|
|
57
|
-
*/
|
|
58
|
-
configure(configParams: SDKConfigParams): void;
|
|
59
|
-
/**
|
|
60
|
-
Tells the SDK the user has opened an event in the app's player.
|
|
61
|
-
Arguments:
|
|
62
|
-
- eventID: The Event ID for the event opened in the player.
|
|
63
|
-
- delegate: an instance of the app's implementation of IMaestroEventDelegate
|
|
64
|
-
- userSettings: Optional user settings to override the configured settings for this event
|
|
65
|
-
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.
|
|
66
|
-
*/
|
|
67
|
-
userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate, userSettings?: IUserSettings): Promise<IMaestroEvent>;
|
|
68
|
-
/**
|
|
69
|
-
* @description Tells the SDK the user has closed an event that was open in the app's player.
|
|
70
|
-
* @param eventID
|
|
71
|
-
*/
|
|
72
|
-
userDidStopWatchingEvent(eventID: string): void;
|
|
73
|
-
/**
|
|
74
|
-
* @description Authenticates user with SWID and Token.
|
|
75
|
-
* @param swid - The user's SWID.
|
|
76
|
-
* @param token - The user's Cookie Token.
|
|
77
|
-
*/
|
|
78
|
-
authenticateUser(swid: string, token: string): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Logs out currently-authenticated user.
|
|
81
|
-
*/
|
|
82
|
-
deauthenticateUser(): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Gets the site ID for the SDK
|
|
85
|
-
* @returns The site ID
|
|
86
|
-
*/
|
|
87
|
-
getSiteID(): string | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* Gets the current JWT token used in conjunction with the user's SWID.
|
|
90
|
-
* @returns The current JWT token
|
|
91
|
-
*/
|
|
92
|
-
getClientAppToken(): string | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* Gets the current user ID.
|
|
95
|
-
* @returns The current user ID
|
|
96
|
-
*/
|
|
97
|
-
getCurrentUserID(): string | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* Gets the current SWID.
|
|
100
|
-
* @returns The current SWID
|
|
101
|
-
*/
|
|
102
|
-
getClientAppSwid(): string | undefined;
|
|
103
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/core/ScrollableContainer/ScrollableContainer.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/organisms/SegmentController/SegmentController.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|