@wscsports/blaze-web-sdk 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/publish/index.d.ts +61 -9
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -209,6 +209,7 @@ export declare class StoryEvent {
|
|
|
209
209
|
'player_orientation': ContentAspectRatio;
|
|
210
210
|
'cc_state': string;
|
|
211
211
|
'content_extra_info': string;
|
|
212
|
+
'story_page_content_extra_info': string;
|
|
212
213
|
'custom_action_button_name': string;
|
|
213
214
|
'enrichment_layer_id': string;
|
|
214
215
|
'enrichment_layer_url': string;
|
|
@@ -304,6 +305,7 @@ export declare class AdEvent {
|
|
|
304
305
|
'session_id': string;
|
|
305
306
|
'gesture_type': MomentGestureType | StoryGestureType;
|
|
306
307
|
'content_extra_info': string;
|
|
308
|
+
'backoffice_campaign_data': string;
|
|
307
309
|
}
|
|
308
310
|
export declare class ImaAdEvent {
|
|
309
311
|
'story_id': string;
|
|
@@ -325,6 +327,7 @@ export declare class ImaAdEvent {
|
|
|
325
327
|
'ad_index': string;
|
|
326
328
|
'audio_state': string;
|
|
327
329
|
'content_type': string;
|
|
330
|
+
'backoffice_campaign_data': string;
|
|
328
331
|
}
|
|
329
332
|
export declare class InteractionEvent {
|
|
330
333
|
'interaction_id': string;
|
|
@@ -1024,6 +1027,7 @@ export type IAdContext = Record<string, string>;
|
|
|
1024
1027
|
interface IBaseAdInfo {
|
|
1025
1028
|
configuration?: IAdInfoConfiguration;
|
|
1026
1029
|
context?: IAdContext;
|
|
1030
|
+
externalAdServerId?: string;
|
|
1027
1031
|
}
|
|
1028
1032
|
export interface IImaAdInfo extends IBaseAdInfo {
|
|
1029
1033
|
type: 'IMA';
|
|
@@ -1035,9 +1039,9 @@ export interface IWebAdInfo extends IBaseAdInfo {
|
|
|
1035
1039
|
path: string;
|
|
1036
1040
|
}
|
|
1037
1041
|
export interface IBannerAdInfo {
|
|
1042
|
+
type: 'Banner';
|
|
1038
1043
|
adUnitId: string;
|
|
1039
1044
|
size: 'Banner';
|
|
1040
|
-
type: 'Banner';
|
|
1041
1045
|
}
|
|
1042
1046
|
export type IAdInfo = IWebAdInfo | IImaAdInfo;
|
|
1043
1047
|
|
|
@@ -1047,6 +1051,13 @@ export interface AppConfiguration {
|
|
|
1047
1051
|
};
|
|
1048
1052
|
}
|
|
1049
1053
|
|
|
1054
|
+
export type ContentExtraInfo = {
|
|
1055
|
+
previous?: ExtraInfo;
|
|
1056
|
+
current?: ExtraInfo;
|
|
1057
|
+
next?: ExtraInfo;
|
|
1058
|
+
};
|
|
1059
|
+
export type ExtraInfo = Record<string, string>;
|
|
1060
|
+
|
|
1050
1061
|
export type ContentEntities = {
|
|
1051
1062
|
gameId: string | null;
|
|
1052
1063
|
teamId: string | null;
|
|
@@ -1064,6 +1075,7 @@ export interface IContent {
|
|
|
1064
1075
|
entities?: ContentEntities;
|
|
1065
1076
|
bannerAdInfo?: IBannerAdInfo;
|
|
1066
1077
|
closedCaptions?: IClosedCaption[];
|
|
1078
|
+
extraInfo: ExtraInfo;
|
|
1067
1079
|
}
|
|
1068
1080
|
|
|
1069
1081
|
export interface ICta {
|
|
@@ -1096,6 +1108,7 @@ export * from './thumbnail.interface';
|
|
|
1096
1108
|
export * from './video.interface';
|
|
1097
1109
|
export * from './entity.interface';
|
|
1098
1110
|
export * from './app-configuration';
|
|
1111
|
+
export * from './content-extra-info';
|
|
1099
1112
|
|
|
1100
1113
|
export type InteractionType = 'Poll' | 'Quiz' | 'Enrichment';
|
|
1101
1114
|
type InteractionRelative = 'Player' | 'Screen';
|
|
@@ -1220,6 +1233,7 @@ interface IBasePage {
|
|
|
1220
1233
|
hasViewed: boolean;
|
|
1221
1234
|
ignoreReadStatusForStory: boolean;
|
|
1222
1235
|
createTime: string;
|
|
1236
|
+
extraInfo?: Record<string, string>;
|
|
1223
1237
|
}
|
|
1224
1238
|
export interface IContentPage extends IBasePage {
|
|
1225
1239
|
type: 'Content';
|
|
@@ -1237,7 +1251,7 @@ export interface IContentPage extends IBasePage {
|
|
|
1237
1251
|
}
|
|
1238
1252
|
export interface IAdPage extends IBasePage {
|
|
1239
1253
|
type: 'Ad';
|
|
1240
|
-
|
|
1254
|
+
adInfo?: IWebAdInfo;
|
|
1241
1255
|
}
|
|
1242
1256
|
export type IPage = IAdPage | IContentPage;
|
|
1243
1257
|
|
|
@@ -1506,11 +1520,11 @@ type CustomNativeArgs = {
|
|
|
1506
1520
|
path: string;
|
|
1507
1521
|
};
|
|
1508
1522
|
export interface CustomNativeAdHandler {
|
|
1509
|
-
provideAdExtraParams?: (args: CustomNativeArgs) => CustomNativeTargeting;
|
|
1523
|
+
provideAdExtraParams?: (args: CustomNativeArgs, contentExtraInfo?: ContentExtraInfo) => CustomNativeTargeting;
|
|
1510
1524
|
}
|
|
1511
1525
|
type ImaExtraParams = Record<string, string>;
|
|
1512
1526
|
export interface ImaAdHandler {
|
|
1513
|
-
provideAdExtraParams?: () => ImaExtraParams;
|
|
1527
|
+
provideAdExtraParams?: (contentExtraInfo?: ContentExtraInfo) => ImaExtraParams;
|
|
1514
1528
|
}
|
|
1515
1529
|
|
|
1516
1530
|
export interface ISmoothOpenCloseModal {
|
|
@@ -1901,7 +1915,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1901
1915
|
private _apiKey;
|
|
1902
1916
|
private _previewUrl;
|
|
1903
1917
|
private _previewMomentUrl;
|
|
1904
|
-
private
|
|
1918
|
+
private _sendAnalytics;
|
|
1905
1919
|
private _doNotTrack;
|
|
1906
1920
|
private _geoLocation;
|
|
1907
1921
|
private _staticContent;
|
|
@@ -1926,14 +1940,18 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1926
1940
|
private _disableAutoLoadingContent;
|
|
1927
1941
|
protected constructor();
|
|
1928
1942
|
init(options: IBlazeSDKOptions): Promise<void>;
|
|
1943
|
+
private readonly _russiaRegionCDN;
|
|
1929
1944
|
private _urls;
|
|
1930
1945
|
private _apiPath;
|
|
1931
1946
|
private _analyticsUrls;
|
|
1947
|
+
private getEnvUrl;
|
|
1948
|
+
private getServiceUrl;
|
|
1949
|
+
private getAnalyticsUrl;
|
|
1932
1950
|
get environment(): EnvironmentType;
|
|
1933
1951
|
private set environment(value);
|
|
1934
1952
|
get sendAnalytics(): boolean;
|
|
1935
1953
|
get shouldCreateUser(): boolean;
|
|
1936
|
-
get analyticsApiUrl(): string;
|
|
1954
|
+
get analyticsApiUrl(): string | undefined;
|
|
1937
1955
|
get externalUserId(): string | null;
|
|
1938
1956
|
set externalUserId(value: string | null);
|
|
1939
1957
|
get doNotTrack(): boolean;
|
|
@@ -2087,6 +2105,7 @@ export * from './video.service';
|
|
|
2087
2105
|
export * from './widgets.service';
|
|
2088
2106
|
export * from './moment.service';
|
|
2089
2107
|
export * from './story.service';
|
|
2108
|
+
export * from './user-country.service';
|
|
2090
2109
|
|
|
2091
2110
|
declare const InteractionServiceClass_base: {
|
|
2092
2111
|
new (): {};
|
|
@@ -2181,6 +2200,31 @@ declare abstract class StoryServiceClass extends StoryServiceClass_base implemen
|
|
|
2181
2200
|
}
|
|
2182
2201
|
export declare const StoryService: StoryServiceClass;
|
|
2183
2202
|
|
|
2203
|
+
declare const UserCountryServiceClass_base: {
|
|
2204
|
+
new (): {};
|
|
2205
|
+
_instance: UserCountryServiceClass;
|
|
2206
|
+
getInstance(): UserCountryServiceClass;
|
|
2207
|
+
};
|
|
2208
|
+
declare abstract class UserCountryServiceClass extends UserCountryServiceClass_base implements IService {
|
|
2209
|
+
private _userCountry;
|
|
2210
|
+
private static readonly USER_CACHE_KEY;
|
|
2211
|
+
private static readonly USER_CACHE_LAST_UPDATE_KEY;
|
|
2212
|
+
private static readonly USER_CACHE_UPDATE_INTERVAL_MS;
|
|
2213
|
+
private static readonly API_TIMEOUT_MS;
|
|
2214
|
+
private static readonly timezoneCountryMap;
|
|
2215
|
+
init(): Promise<void>;
|
|
2216
|
+
get userCountry(): string;
|
|
2217
|
+
updateCountry(): Promise<void>;
|
|
2218
|
+
private getCachedCountry;
|
|
2219
|
+
private cacheCountry;
|
|
2220
|
+
private getLastUpdate;
|
|
2221
|
+
detectCountry(): Promise<string>;
|
|
2222
|
+
private fetchAndUpdateCountry;
|
|
2223
|
+
private fetchCountryFromApi;
|
|
2224
|
+
getCountryFromTimezone(): string;
|
|
2225
|
+
}
|
|
2226
|
+
export declare const UserCountryService: UserCountryServiceClass;
|
|
2227
|
+
|
|
2184
2228
|
export type BlazeAbTestType = {
|
|
2185
2229
|
id: string;
|
|
2186
2230
|
variant: string;
|
|
@@ -4191,6 +4235,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
|
4191
4235
|
isNavigationPending: boolean;
|
|
4192
4236
|
isPausedManually: boolean;
|
|
4193
4237
|
resumeAfterfocus: boolean;
|
|
4238
|
+
contentExtraInfo?: ContentExtraInfo;
|
|
4194
4239
|
boundOnFocusEvent: () => void;
|
|
4195
4240
|
boundOnBlurEvent: () => void;
|
|
4196
4241
|
boundOnVisibilityChangeEvent: () => void;
|
|
@@ -4205,6 +4250,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
|
4205
4250
|
setWidgetItemParent(item: BlazeWidgetItem): void;
|
|
4206
4251
|
updateWidgetStatusReadUnread(): void;
|
|
4207
4252
|
getRefferingObject(): ReferringEventInfo;
|
|
4253
|
+
setContentExtraInfo(contentExtraInfo: ContentExtraInfo): void;
|
|
4208
4254
|
render(): void;
|
|
4209
4255
|
}
|
|
4210
4256
|
|
|
@@ -4619,6 +4665,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
4619
4665
|
isBlazeWidgetStory(content: BlazeWidgetContent[]): content is BlazeWidgetStory[];
|
|
4620
4666
|
isBlazeWidgetMoment(content: BlazeWidgetContent[]): content is BlazeWidgetMoment[];
|
|
4621
4667
|
isBlazeWidgetVideo(content: BlazeWidgetContent[]): content is BlazeVideoElement[];
|
|
4668
|
+
getContentExtraInfo(contents: BlazeWidgetContent[], index: number): ContentExtraInfo;
|
|
4622
4669
|
}
|
|
4623
4670
|
|
|
4624
4671
|
export declare class BlazeWidgetScrollable extends BaseWidget {
|
|
@@ -4795,7 +4842,7 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
4795
4842
|
render(): void;
|
|
4796
4843
|
restartVideo(): void;
|
|
4797
4844
|
initializeIMA(): Promise<void>;
|
|
4798
|
-
buildImaUrl(iamData: IImaAdInfo, pageIndex?: number): Promise<string>;
|
|
4845
|
+
buildImaUrl(iamData: IImaAdInfo, pageIndex?: number, contentExtraInfo?: ContentExtraInfo): Promise<string>;
|
|
4799
4846
|
buildAndSetCustParams(iamData: IImaAdInfo, newUrl: URL, pageIndex?: number): void;
|
|
4800
4847
|
setSearchParamIfNotNullOrZero(newUrl: URL, key: string, value?: string | number): void;
|
|
4801
4848
|
addAniviewMacrosToUrl(newUrl: URL): void;
|
|
@@ -4860,6 +4907,8 @@ export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
|
|
|
4860
4907
|
}
|
|
4861
4908
|
|
|
4862
4909
|
export declare class BlazeWidgetBannerAd extends HTMLElement {
|
|
4910
|
+
parentContnet: BlazeWidgetContent;
|
|
4911
|
+
constructor(parentContent: BlazeWidgetContent);
|
|
4863
4912
|
private adContainer;
|
|
4864
4913
|
private bannerAdInfo;
|
|
4865
4914
|
private isActive;
|
|
@@ -4883,6 +4932,7 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
|
4883
4932
|
private adLoaderContainer;
|
|
4884
4933
|
private videoElement?;
|
|
4885
4934
|
private currentAdTag;
|
|
4935
|
+
private currentAdInfo?;
|
|
4886
4936
|
private boundedOnBlur;
|
|
4887
4937
|
private boundedOnFocus;
|
|
4888
4938
|
private boundedOnVisibilityChange;
|
|
@@ -4892,7 +4942,7 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
|
4892
4942
|
constructor(contentType: ContentType, getReferringObject?: (() => ReferringEventInfo) | undefined);
|
|
4893
4943
|
private initializeGoogleIma;
|
|
4894
4944
|
private buildImaUrl;
|
|
4895
|
-
startAd(videoElement: HTMLVideoElement,
|
|
4945
|
+
startAd(videoElement: HTMLVideoElement, adInfo: IImaAdInfo, contentExtraInfo: ContentExtraInfo): Boolean;
|
|
4896
4946
|
private onAdsManagerLoaded;
|
|
4897
4947
|
private loadAds;
|
|
4898
4948
|
private onAdEvent;
|
|
@@ -5157,6 +5207,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
5157
5207
|
data: IMoment;
|
|
5158
5208
|
shouldShowImaAdOnStart: boolean;
|
|
5159
5209
|
adInfo?: IAdInfo;
|
|
5210
|
+
contentExtraInfo?: ContentExtraInfo;
|
|
5160
5211
|
}): Promise<void>;
|
|
5161
5212
|
updateContent(momentContentData: MomentContentParams): void;
|
|
5162
5213
|
updateLikeCount(likes?: number): Promise<void>;
|
|
@@ -5212,7 +5263,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
5212
5263
|
applyStyles(): void;
|
|
5213
5264
|
updateContentConfig(stories: IStory[]): void;
|
|
5214
5265
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
5215
|
-
setContent(
|
|
5266
|
+
setContent(contents: BlazeWidgetStory[]): void;
|
|
5216
5267
|
navigateContent(direction: ContentDirection): void;
|
|
5217
5268
|
onFocus(): void;
|
|
5218
5269
|
handleMoveSwipe(ev: HammerInput): void;
|
|
@@ -5406,6 +5457,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
5406
5457
|
private onPauseEvent;
|
|
5407
5458
|
private onNextPageEvent;
|
|
5408
5459
|
private onPrevPageEvent;
|
|
5460
|
+
private getPagesContentExtraInfo;
|
|
5409
5461
|
}
|
|
5410
5462
|
|
|
5411
5463
|
export declare const ElementId: {
|