@maestro_io/maestro-web-sdk 3.3.1 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/maestro-web-sdk.esm.js +12 -12
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +12 -12
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/src/external/ports/renderer.d.ts +1 -2
- package/dist/src/index.d.ts +4 -5
- package/dist/src/interfaces/IMaestroEvent.d.ts +12 -0
- package/dist/src/interfaces/IMaestroManager.d.ts +2 -2
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.d.ts +1 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.d.ts +3 -0
- package/dist/src/modules/stats/view-model/StatsViewModel.d.ts +5 -0
- package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +12 -7
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +1 -2
- package/dist/src/services/StaticService/StaticService.d.ts +3 -1
- package/dist/src/services/StatsService.d.ts +1 -0
- package/dist/src/view-models/MaestroEventViewModel.d.ts +1 -2
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -23,6 +23,9 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
23
23
|
private maestroEventViewModel;
|
|
24
24
|
private pageConfig;
|
|
25
25
|
private globalConfig;
|
|
26
|
+
private globalConfigPoller;
|
|
27
|
+
private analyticsService;
|
|
28
|
+
private staticService;
|
|
26
29
|
private constructor();
|
|
27
30
|
/**
|
|
28
31
|
* @description Returns the MaestroWebSDK instance
|
|
@@ -32,10 +35,6 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
32
35
|
userDidStartWatchingEvent(eventID: string, delegate: IMaestroEventDelegate, userSettings?: IUserSettings): Promise<IMaestroEvent>;
|
|
33
36
|
userDidStopWatchingEvent(_: string): Promise<void>;
|
|
34
37
|
configure(configParams: SDKConfigParams): void;
|
|
35
|
-
/**
|
|
36
|
-
* Checks if this is an authorized client based on siteID
|
|
37
|
-
*/
|
|
38
|
-
get isAuthorizedClient(): boolean;
|
|
39
38
|
/**
|
|
40
39
|
* Sets the site ID for the SDK
|
|
41
40
|
* @param siteID The site ID to set
|
|
@@ -47,7 +46,7 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
47
46
|
* @returns The current event view model
|
|
48
47
|
*/
|
|
49
48
|
getMaestroEventViewModel(): MaestroEventViewModel;
|
|
50
|
-
renderPanel(id: string): Promise<() => void
|
|
49
|
+
renderPanel(id: string): Promise<() => Promise<void>>;
|
|
51
50
|
getPageConfig(): PageConfig | null;
|
|
52
51
|
getGlobalConfig(): GlobalConfig | null;
|
|
53
52
|
}
|
|
@@ -87,6 +87,18 @@ export default interface IMaestroEvent {
|
|
|
87
87
|
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/getPlayerTimeCode
|
|
88
88
|
*/
|
|
89
89
|
getPlayerTimeCode(): number | null;
|
|
90
|
+
/**
|
|
91
|
+
* @description Sets data on panel view models. Interface to pass any data to any panel.
|
|
92
|
+
* @param {Record<string, any>} panelData - Object with panel names as keys and their data as values
|
|
93
|
+
* @example
|
|
94
|
+
* setDataToPanel({
|
|
95
|
+
* [panelType]: {
|
|
96
|
+
* overrideUrl: 'https://...',
|
|
97
|
+
* customProperty: 'value'
|
|
98
|
+
* },
|
|
99
|
+
* })
|
|
100
|
+
*/
|
|
101
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
90
102
|
simulateUseCase<T = any>(useCase: TestUseCase, panelType: MaestroPanelType, testData?: T): void;
|
|
91
103
|
/**
|
|
92
104
|
* @description Sets the active panel in the Maestro SDK, if the panel is available and not hidden.
|
|
@@ -39,7 +39,7 @@ export default interface IMaestroManager {
|
|
|
39
39
|
/**
|
|
40
40
|
* Render the PanelManager with the available panels for the current event in the specified HTML id element.
|
|
41
41
|
* @param id - The ID of the HTML element where the panel will be rendered.
|
|
42
|
-
* @return A Promise that resolves to
|
|
42
|
+
* @return A Promise that resolves to an async function to remove the panel when no longer needed.
|
|
43
43
|
*/
|
|
44
|
-
renderPanel(id: string): Promise<() => void
|
|
44
|
+
renderPanel(id: string): Promise<() => Promise<void>>;
|
|
45
45
|
}
|
|
@@ -3,6 +3,7 @@ import './ShopSection.styles.css';
|
|
|
3
3
|
import { IShopBrowseCard, IShopProduct, IShopSection } from '../../../types';
|
|
4
4
|
import { Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
5
5
|
export type ShopSectionProps = {
|
|
6
|
+
sectionIndex: number;
|
|
6
7
|
section: IShopSection;
|
|
7
8
|
onArrowPress: (direction: Direction) => void;
|
|
8
9
|
onItemClick: (item: IShopProduct | IShopBrowseCard, section: IShopSection, focusKey: string) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
3
4
|
import { PenaltiesItem, ScoringSummaryItem } from '../../view-model/StatsViewModel';
|
|
@@ -11,7 +12,9 @@ export type ScoringSummaryProps = {
|
|
|
11
12
|
declare class ScoringSummary extends React.Component<ScoringSummaryProps, {
|
|
12
13
|
expanded: boolean;
|
|
13
14
|
}> {
|
|
15
|
+
expandedScoresArrowPressTimeout: NodeJS.Timeout | null;
|
|
14
16
|
constructor(props: ScoringSummaryProps);
|
|
17
|
+
componentWillUnmount(): void;
|
|
15
18
|
onEnterPress(): void;
|
|
16
19
|
onExpandedScoreArrowPress: (props: {
|
|
17
20
|
index: number;
|
|
@@ -152,6 +152,11 @@ export declare class StatsViewModel extends ViewModel {
|
|
|
152
152
|
constructor(eventId: string, delegate: IMaestroEventDelegate, options?: {
|
|
153
153
|
useMockData?: boolean;
|
|
154
154
|
});
|
|
155
|
+
/**
|
|
156
|
+
* Sets panel-specific data configuration
|
|
157
|
+
* @param panelData - Object containing panel configuration
|
|
158
|
+
*/
|
|
159
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
155
160
|
/**
|
|
156
161
|
* Initialize the ViewModel and start data fetching
|
|
157
162
|
*/
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import InsightsPayloadBuilder from '../InsightsService/InsightsPayloadBuilder';
|
|
3
2
|
import InsightsService from '../InsightsService/InsightsService';
|
|
4
3
|
import { PageConfig } from '../StaticService/types';
|
|
@@ -59,10 +58,12 @@ type PanelData = {
|
|
|
59
58
|
declare class AnalyticsService {
|
|
60
59
|
insightsService: InsightsService;
|
|
61
60
|
insightsPayloadBuilder: InsightsPayloadBuilder;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
private SDKSessionId;
|
|
62
|
+
private pageSessionId;
|
|
63
|
+
private pinchBackSessionId;
|
|
64
|
+
private pageSessionBeaconTimeoutId;
|
|
65
|
+
private isPageSessionBeaconRunning;
|
|
66
|
+
private isPageSessionActive;
|
|
66
67
|
constructor();
|
|
67
68
|
private trackAction;
|
|
68
69
|
private trackImpression;
|
|
@@ -70,8 +71,12 @@ declare class AnalyticsService {
|
|
|
70
71
|
panelClick({ type, metadata, name }: PanelClickPayload): Promise<void>;
|
|
71
72
|
getBaseMetadataFromPageConfig(pageConfig: PageConfig | null): BaseMetadata;
|
|
72
73
|
getPanelDataFromPageConfig(type: 'espnBet' | 'espnStats' | 'espnKeyPlays' | 'espnFantasy' | 'espnShop', pageConfig: PageConfig | null): PanelData;
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
SDKSessionStart(): Promise<void>;
|
|
75
|
+
pageSessionStart(): Promise<void>;
|
|
76
|
+
pageSessionEnd(): Promise<void>;
|
|
77
|
+
pinchBackSessionStart(): Promise<void>;
|
|
78
|
+
pinchBackSessionEnd(): Promise<void>;
|
|
79
|
+
SDKSessionEnd(): Promise<void>;
|
|
75
80
|
private scheduleNextBeacon;
|
|
76
81
|
private sendSessionBeacon;
|
|
77
82
|
private sessionBeacon;
|
|
@@ -2,7 +2,6 @@ import { ICacheManager } from '@/external/ports/cacheManager';
|
|
|
2
2
|
import InsightsService from './InsightsService';
|
|
3
3
|
import { PageConfig } from '../StaticService/types';
|
|
4
4
|
type EventData = {
|
|
5
|
-
url?: string;
|
|
6
5
|
metadata?: Record<string, unknown>;
|
|
7
6
|
ontology: {
|
|
8
7
|
kingdom: string;
|
|
@@ -39,7 +38,7 @@ export default class InsightsPayloadBuilder {
|
|
|
39
38
|
/**
|
|
40
39
|
* @description Event URL. defaults to undefined.
|
|
41
40
|
*/
|
|
42
|
-
e_u: string
|
|
41
|
+
e_u: string;
|
|
43
42
|
/**
|
|
44
43
|
* @description Event ontology kingdom. This is the highest level of the ontology and can be used to identify the event type.
|
|
45
44
|
* @example 'panel', 'engage', 'espn_key_plays'
|
|
@@ -6,5 +6,7 @@ export default class StaticService {
|
|
|
6
6
|
constructor();
|
|
7
7
|
fetchPageConfig(siteId: string, eventId: string): Promise<PageConfig | null>;
|
|
8
8
|
static isPanelAvailable(pageConfig: PageConfig | null, panelType: string): boolean | undefined;
|
|
9
|
-
|
|
9
|
+
pollGlobalConfig(onData: (data: GlobalConfig) => void): {
|
|
10
|
+
stop: () => void;
|
|
11
|
+
};
|
|
10
12
|
}
|
|
@@ -6,6 +6,7 @@ import IMaestroEventDelegate from '@/interfaces/IMaestroEventDelegate';
|
|
|
6
6
|
*/
|
|
7
7
|
declare class StatsService {
|
|
8
8
|
networkManager: IStatsNetworkManager;
|
|
9
|
+
overrideUrl: string | null;
|
|
9
10
|
constructor(delegate: IMaestroEventDelegate);
|
|
10
11
|
/**
|
|
11
12
|
* Get stats using a full sync URL (for timecode support)
|
|
@@ -10,7 +10,6 @@ import IMaestroKeyPlaysResponse from '../modules/key-plays/interfaces/IKeyPlaysR
|
|
|
10
10
|
import { MaestroPanelType } from '@/models/IPanel';
|
|
11
11
|
import { IUserSettings } from '../interfaces/IUserSettings';
|
|
12
12
|
import { PanelManagerViewModel } from './PanelManagerViewModel';
|
|
13
|
-
import AnalyticsService from '@/services/AnalyticsService/AnalyticsService';
|
|
14
13
|
import FantasyViewModel from '@/modules/fantasy/view-model/FantasyViewModel';
|
|
15
14
|
import ShopViewModel from '@/modules/shop/view-model/ShopViewModel';
|
|
16
15
|
export declare class MaestroEventViewModel extends ViewModel implements IMaestroEvent {
|
|
@@ -27,11 +26,11 @@ export declare class MaestroEventViewModel extends ViewModel implements IMaestro
|
|
|
27
26
|
shopViewModel: ShopViewModel | null;
|
|
28
27
|
panelManagerViewModel: PanelManagerViewModel;
|
|
29
28
|
navigation: SpatialNavigation;
|
|
30
|
-
analyticsService: AnalyticsService;
|
|
31
29
|
constructor(eventId: string | undefined, delegate: IMaestroEventDelegate);
|
|
32
30
|
setActivePanel(panelType: MaestroPanelType): void;
|
|
33
31
|
updatePlayerTimeCode(timestamp: number): void;
|
|
34
32
|
getPlayerTimeCode(): number | null;
|
|
33
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
35
34
|
deinit(): Promise<void>;
|
|
36
35
|
updateKeyPlaysData(data: IMaestroKeyPlaysResponse | null): Promise<void>;
|
|
37
36
|
updateUserSettings(settings: IUserSettings): Promise<void>;
|