@wscsports/blaze-web-sdk 0.12.0 → 0.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wscsports/blaze-web-sdk",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -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;
@@ -1047,6 +1048,13 @@ export interface AppConfiguration {
1047
1048
  };
1048
1049
  }
1049
1050
 
1051
+ export type ContentExtraInfo = {
1052
+ previous?: ExtraInfo;
1053
+ current?: ExtraInfo;
1054
+ next?: ExtraInfo;
1055
+ };
1056
+ export type ExtraInfo = Record<string, string>;
1057
+
1050
1058
  export type ContentEntities = {
1051
1059
  gameId: string | null;
1052
1060
  teamId: string | null;
@@ -1064,6 +1072,7 @@ export interface IContent {
1064
1072
  entities?: ContentEntities;
1065
1073
  bannerAdInfo?: IBannerAdInfo;
1066
1074
  closedCaptions?: IClosedCaption[];
1075
+ extraInfo: ExtraInfo;
1067
1076
  }
1068
1077
 
1069
1078
  export interface ICta {
@@ -1096,6 +1105,7 @@ export * from './thumbnail.interface';
1096
1105
  export * from './video.interface';
1097
1106
  export * from './entity.interface';
1098
1107
  export * from './app-configuration';
1108
+ export * from './content-extra-info';
1099
1109
 
1100
1110
  export type InteractionType = 'Poll' | 'Quiz' | 'Enrichment';
1101
1111
  type InteractionRelative = 'Player' | 'Screen';
@@ -1220,6 +1230,7 @@ interface IBasePage {
1220
1230
  hasViewed: boolean;
1221
1231
  ignoreReadStatusForStory: boolean;
1222
1232
  createTime: string;
1233
+ extraInfo?: Record<string, string>;
1223
1234
  }
1224
1235
  export interface IContentPage extends IBasePage {
1225
1236
  type: 'Content';
@@ -1506,11 +1517,11 @@ type CustomNativeArgs = {
1506
1517
  path: string;
1507
1518
  };
1508
1519
  export interface CustomNativeAdHandler {
1509
- provideAdExtraParams?: (args: CustomNativeArgs) => CustomNativeTargeting;
1520
+ provideAdExtraParams?: (args: CustomNativeArgs, contentExtraInfo?: ContentExtraInfo) => CustomNativeTargeting;
1510
1521
  }
1511
1522
  type ImaExtraParams = Record<string, string>;
1512
1523
  export interface ImaAdHandler {
1513
- provideAdExtraParams?: () => ImaExtraParams;
1524
+ provideAdExtraParams?: (contentExtraInfo?: ContentExtraInfo) => ImaExtraParams;
1514
1525
  }
1515
1526
 
1516
1527
  export interface ISmoothOpenCloseModal {
@@ -4191,6 +4202,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
4191
4202
  isNavigationPending: boolean;
4192
4203
  isPausedManually: boolean;
4193
4204
  resumeAfterfocus: boolean;
4205
+ contentExtraInfo?: ContentExtraInfo;
4194
4206
  boundOnFocusEvent: () => void;
4195
4207
  boundOnBlurEvent: () => void;
4196
4208
  boundOnVisibilityChangeEvent: () => void;
@@ -4205,6 +4217,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
4205
4217
  setWidgetItemParent(item: BlazeWidgetItem): void;
4206
4218
  updateWidgetStatusReadUnread(): void;
4207
4219
  getRefferingObject(): ReferringEventInfo;
4220
+ setContentExtraInfo(contentExtraInfo: ContentExtraInfo): void;
4208
4221
  render(): void;
4209
4222
  }
4210
4223
 
@@ -4619,6 +4632,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
4619
4632
  isBlazeWidgetStory(content: BlazeWidgetContent[]): content is BlazeWidgetStory[];
4620
4633
  isBlazeWidgetMoment(content: BlazeWidgetContent[]): content is BlazeWidgetMoment[];
4621
4634
  isBlazeWidgetVideo(content: BlazeWidgetContent[]): content is BlazeVideoElement[];
4635
+ getContentExtraInfo(contents: BlazeWidgetContent[], index: number): ContentExtraInfo;
4622
4636
  }
4623
4637
 
4624
4638
  export declare class BlazeWidgetScrollable extends BaseWidget {
@@ -4795,7 +4809,7 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
4795
4809
  render(): void;
4796
4810
  restartVideo(): void;
4797
4811
  initializeIMA(): Promise<void>;
4798
- buildImaUrl(iamData: IImaAdInfo, pageIndex?: number): Promise<string>;
4812
+ buildImaUrl(iamData: IImaAdInfo, pageIndex?: number, contentExtraInfo?: ContentExtraInfo): Promise<string>;
4799
4813
  buildAndSetCustParams(iamData: IImaAdInfo, newUrl: URL, pageIndex?: number): void;
4800
4814
  setSearchParamIfNotNullOrZero(newUrl: URL, key: string, value?: string | number): void;
4801
4815
  addAniviewMacrosToUrl(newUrl: URL): void;
@@ -4860,6 +4874,8 @@ export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
4860
4874
  }
4861
4875
 
4862
4876
  export declare class BlazeWidgetBannerAd extends HTMLElement {
4877
+ parentContnet: BlazeWidgetContent;
4878
+ constructor(parentContent: BlazeWidgetContent);
4863
4879
  private adContainer;
4864
4880
  private bannerAdInfo;
4865
4881
  private isActive;
@@ -4892,7 +4908,7 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
4892
4908
  constructor(contentType: ContentType, getReferringObject?: (() => ReferringEventInfo) | undefined);
4893
4909
  private initializeGoogleIma;
4894
4910
  private buildImaUrl;
4895
- startAd(videoElement: HTMLVideoElement, tag: string): Boolean;
4911
+ startAd(videoElement: HTMLVideoElement, tag: string, contentExtraInfo: ContentExtraInfo): Boolean;
4896
4912
  private onAdsManagerLoaded;
4897
4913
  private loadAds;
4898
4914
  private onAdEvent;
@@ -5157,6 +5173,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
5157
5173
  data: IMoment;
5158
5174
  shouldShowImaAdOnStart: boolean;
5159
5175
  adInfo?: IAdInfo;
5176
+ contentExtraInfo?: ContentExtraInfo;
5160
5177
  }): Promise<void>;
5161
5178
  updateContent(momentContentData: MomentContentParams): void;
5162
5179
  updateLikeCount(likes?: number): Promise<void>;
@@ -5212,7 +5229,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
5212
5229
  applyStyles(): void;
5213
5230
  updateContentConfig(stories: IStory[]): void;
5214
5231
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
5215
- setContent(content: BlazeWidgetStory[]): void;
5232
+ setContent(contents: BlazeWidgetStory[]): void;
5216
5233
  navigateContent(direction: ContentDirection): void;
5217
5234
  onFocus(): void;
5218
5235
  handleMoveSwipe(ev: HammerInput): void;
@@ -5406,6 +5423,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
5406
5423
  private onPauseEvent;
5407
5424
  private onNextPageEvent;
5408
5425
  private onPrevPageEvent;
5426
+ private getPagesContentExtraInfo;
5409
5427
  }
5410
5428
 
5411
5429
  export declare const ElementId: {