@wscsports/blaze-web-sdk 0.2.9 → 0.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wscsports/blaze-web-sdk",
3
- "version": "0.2.9",
3
+ "version": "0.3.01",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -180,6 +180,7 @@ export declare class StoryEvent {
180
180
  'audio_state': string;
181
181
  'playback_action_method': PlaybackActionType;
182
182
  'player_type': PlayerType;
183
+ 'player_orientation': ContentAspectRatio;
183
184
  }
184
185
  export declare class MomentEvent {
185
186
  'moments_session_id': string;
@@ -238,6 +239,8 @@ export declare class AdEvent {
238
239
  'skip_config': string;
239
240
  'content_type': string;
240
241
  'ad_path': string;
242
+ 'ad_unit_id': string;
243
+ 'session_id': string;
241
244
  }
242
245
  export declare class ImaAdEvent {
243
246
  'story_id': string;
@@ -577,6 +580,12 @@ export declare class BlazeShareButton extends BaseWidget {
577
580
  createButton(text: string, svgIcon: string): void;
578
581
  }
579
582
 
583
+ export declare const IMA_RATIOS: {
584
+ readonly general: "1x1";
585
+ readonly horizontal: "640x480";
586
+ readonly vertical: "1080x1920";
587
+ };
588
+
580
589
  export declare enum StoryAction {
581
590
  Start = "story_start",
582
591
  Exit = "story_exit",
@@ -614,7 +623,10 @@ export declare enum WidgetAction {
614
623
  export declare enum AdAction {
615
624
  View = "ad_view",
616
625
  Exit = "ad_exit",
617
- Click = "ad_click"
626
+ Click = "ad_click",
627
+ BannerView = "banner_ad_view",
628
+ BannerLoad = "banner_ad_load",
629
+ BannerClick = "banner_ad_click"
618
630
  }
619
631
  export declare enum ImaAdAction {
620
632
  ALL_ADS_COMPLETED = "ima_all_ads_completed",
@@ -665,6 +677,7 @@ export declare const ASPECT_RATIO_16_9_STRING = "16 / 9";
665
677
  export declare const ASPECT_RATIO_9_16_STRING = "9 / 16";
666
678
  export declare const ASPECT_RATIO_4_3_STRING = "4 / 3";
667
679
 
680
+ export * from './ads.constants';
668
681
  export * from './analytics.constants';
669
682
  export * from './device.constants';
670
683
  export * from './iso-country-codes.constants';
@@ -684,7 +697,7 @@ export declare const FAIL_TO_LOAD_TIMEOUT_MS = 3000;
684
697
  export declare class Database implements IDatabase {
685
698
  private readonly options;
686
699
  constructor(options: IDatabaseOptions);
687
- dbInstance: IDBDatabase;
700
+ dbInstance?: IDBDatabase;
688
701
  init(options: IDatabaseInitOptions): Promise<void>;
689
702
  createTransaction(tableName: string, mode: 'readonly' | 'readwrite'): IDBObjectStore | undefined;
690
703
  get<T>(tableName: string, key: string): Promise<IResponse<T>>;
@@ -708,7 +721,13 @@ export interface IAdInfo {
708
721
  configuration?: IAdInfoConfiguration;
709
722
  context?: IAdContext;
710
723
  }
724
+ export interface IBannerAdInfo {
725
+ adUnitId: string;
726
+ size: 'Banner';
727
+ type: 'Banner';
728
+ }
711
729
 
730
+ export type ContentAspectRatio = 'Vertical' | 'Horizontal';
712
731
  export interface IContent {
713
732
  id: string;
714
733
  title: string;
@@ -723,6 +742,7 @@ export interface IContent {
723
742
  teamId: string | null;
724
743
  playerId: string | null;
725
744
  };
745
+ bannerAdInfo?: IBannerAdInfo;
726
746
  }
727
747
 
728
748
  export interface ICTA {
@@ -844,6 +864,7 @@ export type IPage = IAdPage | IContentPage;
844
864
 
845
865
  export interface IRendition {
846
866
  url: string;
867
+ aspectRatio: ContentAspectRatio;
847
868
  }
848
869
 
849
870
  export interface IStory extends IContent {
@@ -856,6 +877,7 @@ export interface IStory extends IContent {
856
877
  export interface IThumbnail {
857
878
  type: 'SquareIcon' | 'VerticalTwoByThree' | 'MainThumbnail' | 'PosterPortrait';
858
879
  rendition: IRendition;
880
+ renditions?: IRendition[];
859
881
  }
860
882
 
861
883
  export declare enum ErrorCode {
@@ -893,7 +915,14 @@ export declare enum InternalEvent {
893
915
  PREV_STORY = "prev_story",
894
916
  FULL_SCREEN_CLICK = "full_screen_click",
895
917
  AD_ENDED = "ad_ended",
896
- AD_RESUMED = "ad_resumed"
918
+ AD_RESUMED = "ad_resumed",
919
+ BANNER_ANALYTICS = "banner_analytics"
920
+ }
921
+ export interface InternalEventDetails {
922
+ [InternalEvent.BANNER_ANALYTICS]: {
923
+ type: AdAction;
924
+ adUnitId: string;
925
+ };
897
926
  }
898
927
 
899
928
  export declare const HttpStatus: {
@@ -929,6 +958,7 @@ export interface WidgetsTagNameMap {
929
958
  'blaze-widget-cta-modal': BlazeWidgetCtaModal;
930
959
  'blaze-widget-video': BlazeWidgetVideo;
931
960
  'blaze-widget-interaction': BlazeWidgetInteraction;
961
+ 'blaze-widget-banner-ad': BlazeWidgetBannerAd;
932
962
  'blaze-loader': BlazeLoader;
933
963
  'blaze-chip': BlazeChip;
934
964
  'blaze-image': BlazeImage;
@@ -960,6 +990,7 @@ interface WidgetsTagNameOptionsMap {
960
990
  'blaze-widget-video': {};
961
991
  'blaze-widget-moment-video': {};
962
992
  'blaze-widget-interaction': {};
993
+ 'blaze-widget-banner-ad': {};
963
994
  'blaze-loader': {};
964
995
  'blaze-chip': {};
965
996
  'blaze-image': {};
@@ -1049,6 +1080,7 @@ export interface IBlazeSDKOptions {
1049
1080
  shouldCreateUser?: boolean;
1050
1081
  externalUserId?: string | null;
1051
1082
  prefetchingPolicy?: PrefetchingPolicyType;
1083
+ shouldAllowHorizontalStories?: boolean;
1052
1084
  }
1053
1085
 
1054
1086
  export interface IButtonPlayerNavigationConfig {
@@ -1364,6 +1396,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1364
1396
  private _shouldCreateUser;
1365
1397
  private _externalUserId;
1366
1398
  private _prefetchingPolicy;
1399
+ private _shouldAllowHorizontalStories;
1367
1400
  protected constructor();
1368
1401
  init(options: IBlazeSDKOptions): Promise<void>;
1369
1402
  private _urls;
@@ -1378,6 +1411,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1378
1411
  set externalUserId(value: string | null);
1379
1412
  get doNotTrack(): boolean;
1380
1413
  set doNotTrack(value: boolean);
1414
+ get shouldAllowHorizontalStories(): boolean;
1381
1415
  get geoLocation(): string;
1382
1416
  set geoLocation(value: string);
1383
1417
  get staticContent(): boolean;
@@ -2449,6 +2483,7 @@ export declare class Stopwatch {
2449
2483
  export * from './widget-video-base';
2450
2484
  export * from './widget-player';
2451
2485
  export * from './ad/widget-ad';
2486
+ export * from './ad/widget-banner-ad';
2452
2487
  export * from './widget-embedded-story';
2453
2488
  export * from './widget-interaction';
2454
2489
  export * from './widget-item';
@@ -2485,6 +2520,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
2485
2520
  widgetParentItem: BlazeWidgetItem;
2486
2521
  sessionId: string;
2487
2522
  refContentModal?: BlazeWidgetStoryModal | BlazeWidgetMomentModal;
2523
+ abstract aspectRatio?: ContentAspectRatio;
2488
2524
  constructor();
2489
2525
  connectedCallback(): void;
2490
2526
  disconnectedCallback(): void;
@@ -3080,6 +3116,16 @@ export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
3080
3116
  private destroyAd;
3081
3117
  }
3082
3118
 
3119
+ export declare class BlazeWidgetBannerAd extends HTMLElement {
3120
+ private adContainer;
3121
+ private get googletag();
3122
+ connectedCallback(): void;
3123
+ show(bannerAdInfo?: IBannerAdInfo): void;
3124
+ private setInitialStyles;
3125
+ private setAdContainer;
3126
+ private raiseAnalyticsEventToParent;
3127
+ }
3128
+
3083
3129
  export type BlazeWidgetContentType = BlazeWidgetMoment[] & BlazeWidgetStory[];
3084
3130
  export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
3085
3131
  parentWidget: HTMLElement;
@@ -3222,6 +3268,7 @@ interface MomentContentParams {
3222
3268
  export declare class BlazeWidgetMoment extends BlazeWidgetContent {
3223
3269
  playerStyle?: MomentPlayerStyle | undefined;
3224
3270
  video?: BlazeWidgetVideo | BlazeWidgetAd;
3271
+ aspectRatio?: ContentAspectRatio | undefined;
3225
3272
  modal: BlazeWidgetMomentModal;
3226
3273
  seekBar: BlazeWidgetMomentSeekBar;
3227
3274
  shareModal: BlazeWidgetShareModal | undefined;
@@ -3383,6 +3430,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
3383
3430
  export declare class BlazeWidgetStory extends BlazeWidgetContent {
3384
3431
  playerStyle: StoryPlayerStyle;
3385
3432
  mode: ScreenMode;
3433
+ aspectRatio?: ContentAspectRatio;
3386
3434
  pages: BlazeWidgetVideoBase[];
3387
3435
  data: IStory;
3388
3436
  shareModal: BlazeWidgetShareModal | undefined;
@@ -3434,6 +3482,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3434
3482
  shouldShowImaAdOnStart: boolean;
3435
3483
  imaUrl: string;
3436
3484
  adContext?: IAdContext;
3485
+ bannerAdElement?: BlazeWidgetBannerAd;
3437
3486
  constructor(playerStyle: StoryPlayerStyle, mode: ScreenMode);
3438
3487
  private isButtonVisible;
3439
3488
  private createPlayerButtonsAndAppendToButtonsContainer;
@@ -3469,6 +3518,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3469
3518
  displayCurrentStoryPageAndHideTheRest(): void;
3470
3519
  load(): void;
3471
3520
  play(): void;
3521
+ bannerAdEvent(detail: InternalEventDetails[InternalEvent.BANNER_ANALYTICS]): void;
3472
3522
  event(action: StoryAction, storyData: Partial<StoryEvent>, label?: string | undefined): void;
3473
3523
  updateContainerLayout(): void;
3474
3524
  connectedCallback(): void;