@wscsports/blaze-web-sdk 0.2.6 → 0.2.7

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.6",
3
+ "version": "0.2.7",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -357,7 +357,6 @@ export * from './url';
357
357
  export * from './data-source.class';
358
358
 
359
359
  export declare class BlazeWidgetLabel {
360
- every(arg0: (item: any) => item is BlazeWidgetLabel): void;
361
360
  value: string;
362
361
  constructor(value: string);
363
362
  static singleLabel(label: string): BlazeWidgetLabel;
@@ -715,11 +714,13 @@ interface IAdInfoConfiguration {
715
714
  adsLocationType: 'FixedPages' | 'EveryXStories';
716
715
  type: 'Story' | 'Moment';
717
716
  }
717
+ export type IAdContext = Record<string, string>;
718
718
  export interface IAdInfo {
719
719
  path?: string;
720
720
  tag?: string;
721
721
  type: 'Web' | 'IMA';
722
722
  configuration?: IAdInfoConfiguration;
723
+ context?: IAdContext;
723
724
  }
724
725
 
725
726
  export interface IContent {
@@ -821,6 +822,7 @@ export interface IMoment extends IContent {
821
822
  export type MomentDB = {
822
823
  id: string;
823
824
  liked: boolean;
825
+ viewed: boolean;
824
826
  };
825
827
 
826
828
  export interface IContentPage {
@@ -837,6 +839,7 @@ export interface IContentPage {
837
839
  createTime: string;
838
840
  shouldShowImaAd?: boolean;
839
841
  imaUrl?: string;
842
+ adContext?: IAdContext;
840
843
  interaction?: Interaction;
841
844
  poster?: IThumbnail;
842
845
  }
@@ -1205,6 +1208,7 @@ export interface IWidgetViewOptionsBase {
1205
1208
  delegates?: Record<Delegation, EventListenerOrEventListenerObject>;
1206
1209
  perItemStyleOverrides?: PerItemStyleOverrides;
1207
1210
  shouldOrderWidgetByReadStatus?: boolean;
1211
+ contentIds?: string[];
1208
1212
  }
1209
1213
  export interface IWidgetViewOptionsWithLabels extends IWidgetViewOptionsBase {
1210
1214
  labels: string | string[] | BlazeWidgetLabel;
@@ -1224,7 +1228,7 @@ export interface IWidgetViewOptionsWithDataSource extends IWidgetViewOptionsBase
1224
1228
  export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds | IWidgetViewOptionsWithDataSource;
1225
1229
 
1226
1230
  export interface IWidgetView extends HTMLElement {
1227
- setTheme: (theme: IWidgetTheme) => void;
1231
+ setTheme: (theme: IWidgetTheme | ThemeType) => void;
1228
1232
  getTheme: () => IWidgetTheme;
1229
1233
  setLabels: (labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions) => void;
1230
1234
  setLabelsPriority: (labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions) => void;
@@ -1279,6 +1283,14 @@ declare abstract class AnalyticsServiceClass extends AnalyticsServiceClass_base
1279
1283
  }
1280
1284
  export declare const AnalyticsService: AnalyticsServiceClass;
1281
1285
 
1286
+ export interface ApiResponse<T> {
1287
+ assetsExpiryTime: string;
1288
+ totalItems: number;
1289
+ result: T[];
1290
+ defaultAdsInfo?: IAdInfo;
1291
+ }
1292
+ export type MomentsResponse = ApiResponse<IMoment>;
1293
+ export type StoriesResponse = ApiResponse<IStory>;
1282
1294
  declare const ApiServiceClass_base: {
1283
1295
  new (): {};
1284
1296
  _instance: ApiServiceClass;
@@ -1291,40 +1303,21 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
1291
1303
  getStoriesByIds(storyIds: string[], orderType?: OrderType): Promise<{
1292
1304
  result: IStory[];
1293
1305
  httpStatus?: number | undefined;
1294
- data?: {
1295
- assetsExpiryTime: string;
1296
- totalItems: number;
1297
- result: IStory[];
1298
- defaultAdsInfo?: IAdInfo | undefined;
1299
- } | undefined;
1306
+ data?: StoriesResponse | undefined;
1300
1307
  error?: Error | undefined;
1301
1308
  }>;
1302
1309
  getStories(labels: string, orderType?: OrderType, maxItemsSize?: number, labelsPriority?: string): Promise<{
1303
1310
  result: IStory[];
1304
1311
  httpStatus?: number | undefined;
1305
- data?: {
1306
- assetsExpiryTime: string;
1307
- totalItems: number;
1308
- result: IStory[];
1309
- defaultAdsInfo?: IAdInfo | undefined;
1310
- } | undefined;
1312
+ data?: StoriesResponse | undefined;
1311
1313
  error?: Error | undefined;
1312
1314
  }>;
1313
- getMomentByIds(momentIds: string[], orderType?: OrderType): Promise<{
1315
+ getMomentByIds(ids: string[], orderType?: OrderType): Promise<{
1314
1316
  httpStatus?: number | undefined;
1315
- data?: {
1316
- assetsExpiryTime: string;
1317
- totalItems: number;
1318
- result: IMoment[];
1319
- } | undefined;
1317
+ data?: MomentsResponse | undefined;
1320
1318
  error?: Error | undefined;
1321
1319
  }>;
1322
- getMoments(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<import("../interfaces").IHttpResponse<{
1323
- assetsExpiryTime: string;
1324
- totalItems: number;
1325
- result: IMoment[];
1326
- defaultAdsInfo?: IAdInfo | undefined;
1327
- }>>;
1320
+ getMomentsByLabels(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
1328
1321
  updateMomentLikeStatus(options: {
1329
1322
  momentId: string;
1330
1323
  setLiked: boolean;
@@ -1417,8 +1410,6 @@ declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base im
1417
1410
  onOpen(): Promise<void>;
1418
1411
  onError(e: Event): Promise<void>;
1419
1412
  onUpgradeNeeded(db: IDBDatabase): Promise<void>;
1420
- getPageViewed(id: string): Promise<any>;
1421
- updatePageViewed(id: string, storyId: string): Promise<any>;
1422
1413
  getUserId(): Promise<IResponse<{
1423
1414
  id: string;
1424
1415
  value: string;
@@ -1427,13 +1418,17 @@ declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base im
1427
1418
  id: string;
1428
1419
  value: string;
1429
1420
  }>>;
1430
- update(tableName: string, value: any): Promise<any>;
1431
- enrichStories(stories: IStory[]): Promise<IStory[]>;
1421
+ getPageViewed(id: string): Promise<any>;
1422
+ updatePageViewed(id: string, storyId: string): Promise<any>;
1432
1423
  isPageViewed(id: string): Promise<boolean>;
1424
+ enrichStories(stories: IStory[]): Promise<IStory[]>;
1433
1425
  updateInteraction(data: InteractionDB): Promise<any>;
1434
1426
  getInteraction(id: string): Promise<IResponse<InteractionDB> | null>;
1435
1427
  updateLike(momentId: string, isLike: boolean): Promise<IResponse | null>;
1436
1428
  getLike(momentId: string): Promise<IResponse<MomentDB> | null>;
1429
+ updateViewedMoment(momentId: string): Promise<any>;
1430
+ getViewedMoment(momentId: string): Promise<boolean>;
1431
+ enrichMoments(moments: IMoment[]): Promise<IMoment[]>;
1437
1432
  }
1438
1433
  export declare const DatabaseService: DatabaseServiceClass;
1439
1434
 
@@ -1509,6 +1504,7 @@ export * from './user.service';
1509
1504
  export * from './video-cache.service';
1510
1505
  export * from './video-player.service';
1511
1506
  export * from './widgets.service';
1507
+ export * from './moment.service';
1512
1508
  export * from './story.service';
1513
1509
 
1514
1510
  declare const InteractionServiceClass_base: {
@@ -1567,6 +1563,19 @@ declare class LoggerServiceClass extends LoggerServiceClass_base implements ISer
1567
1563
  }
1568
1564
  export declare const LoggerService: LoggerServiceClass;
1569
1565
 
1566
+ declare const MomentServiceClass_base: {
1567
+ new (): {};
1568
+ _instance: MomentServiceClass;
1569
+ getInstance(): MomentServiceClass;
1570
+ };
1571
+ declare abstract class MomentServiceClass extends MomentServiceClass_base implements IService {
1572
+ init(): void;
1573
+ updateMomentReadStatusById(momentId: string): Promise<any>;
1574
+ encrichMoment(moment: IMoment[]): Promise<IMoment[]>;
1575
+ getMoments(dataSource: any): Promise<MomentsResponse>;
1576
+ }
1577
+ export declare const MomentService: MomentServiceClass;
1578
+
1570
1579
  declare const StartupServiceClass_base: {
1571
1580
  new (): {};
1572
1581
  _instance: StartupServiceClass;
@@ -2205,6 +2214,8 @@ export type FontWeightType = 'normal' | 'bold' | 'bolder' | 'lighter' | 'inherit
2205
2214
  export type TextTransformType = 'capitalize' | 'uppercase' | 'lowercase' | 'none';
2206
2215
 
2207
2216
  export type Direction = 'UP' | 'DOWN' | 'RIGHT' | 'LEFT';
2217
+ export type NavigationType = 'Automatic' | 'Manual' | '';
2218
+ export type NavigationDirectionType = 'Forwards' | 'Backwards' | '';
2208
2219
 
2209
2220
  export type ComponentsElementType = 'blaze-alert' | 'blaze-toast' | 'blaze-chip' | 'blaze-image';
2210
2221
  export type WidgetElementType = 'blaze-sdk';
@@ -2233,12 +2244,13 @@ export * from './user.type';
2233
2244
  export * from './widget.type';
2234
2245
  export * from './chip-status.type';
2235
2246
  export * from './prefetch.type';
2247
+ export * from './trigger.type';
2236
2248
 
2237
- export type EntitiesType = 'playerId' | 'teamId' | 'gameId';
2238
- export type PerItemStyleOverrides = Record<EntitiesType, Array<{
2249
+ export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
2250
+ export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
2239
2251
  name: string;
2240
2252
  theme: IWidgetTheme;
2241
- }>>;
2253
+ }>>>;
2242
2254
 
2243
2255
  export type LabelsType = string | string[] | BlazeWidgetLabel;
2244
2256
 
@@ -2276,6 +2288,9 @@ export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'CUSTOM';
2276
2288
  export type ThumbnailShape = 'Circle' | 'Rectangle';
2277
2289
  export declare function thumbnailMapping(thumbnailType: ThumbnailType): ThumbnailApiType;
2278
2290
 
2291
+ export type ExitTriggerType = 'Swipe' | 'Swipe Left' | 'Swipe Right' | 'Swipe Down' | 'Swipe Up' | 'Skip' | 'Close Button' | 'CTA Click' | 'Escape Button' | 'Stories Completed' | 'Story Completed' | '';
2292
+ export type StartTriggerType = 'Embedded Player in Viewport' | 'UI Button' | 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'SingleStory' | 'Share' | '';
2293
+
2279
2294
  export type GetUserTokenRequest = {
2280
2295
  externalId: string | null;
2281
2296
  };
@@ -2334,6 +2349,11 @@ export declare function flattenObject<T extends Record<string, any>>(obj: T): Re
2334
2349
  export declare function mergeStyles(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): object;
2335
2350
  export declare function getMaxValue(currentMax: string, newValue: string): string;
2336
2351
  export declare function isReadByLastUnIgnoredPageStatus(story: IStory): boolean;
2352
+ export declare function sortByHasViewed(a: {
2353
+ hasViewed: boolean;
2354
+ }, b: {
2355
+ hasViewed: boolean;
2356
+ }): number;
2337
2357
  export declare function applyPlayerStyleChanges(defaultPlayerStyle: StoryPlayerStyle, mergedPlayerStyle: StoryPlayerStyle, themePlayerStyle: StoryPlayerStyle, playerStyleChanges: any): void;
2338
2358
  export declare function getChangedProperties(source: any, target: any, level: string, playerStyleChanges: any, parentKeys?: string): void;
2339
2359
  export declare function removeDuplicates(source: string[], checkAgainst: string[]): string[];
@@ -2395,10 +2415,6 @@ export * from './widget-video';
2395
2415
  export * from './moment/widget-moment-seek-bar';
2396
2416
  export * from './widget-cta-modal';
2397
2417
 
2398
- export type ExitTriggerType = 'Swipe' | 'Swipe Down' | 'Swipe Up' | 'Skip' | 'Close Button' | 'CTA Click' | 'Escape Button' | '';
2399
- export type StartTriggerType = 'Embedded Player in Viewport' | 'UI Button' | 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'SingleStory' | 'Share' | '';
2400
- export type NavigationType = 'Automatic' | 'Manual' | '';
2401
- export type NavigationDirectionType = 'Forwards' | 'Backwards' | '';
2402
2418
  export declare abstract class BlazeWidgetContent extends HTMLElement {
2403
2419
  container: HTMLElement;
2404
2420
  pageIndex: number;
@@ -2421,6 +2437,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
2421
2437
  connectedCallback(): void;
2422
2438
  disconnectedCallback(): void;
2423
2439
  setWidgetItemParent(item: BlazeWidgetItem): void;
2440
+ updateWidgetStatusReadUnread(): void;
2424
2441
  getRefferingObject(): ReferringEventInfo;
2425
2442
  render(): void;
2426
2443
  }
@@ -2612,27 +2629,29 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
2612
2629
  shouldReloadData: boolean;
2613
2630
  get refElement(): ShadowRoot | BlazeWidgetLayout;
2614
2631
  constructor();
2632
+ connectedCallback(): void;
2633
+ disconnectedCallback(): void;
2615
2634
  onResizeEventDelay(): void;
2616
2635
  onResize(): void;
2617
2636
  handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
2618
2637
  handleIntersection(entries: IntersectionObserverEntry[]): void;
2619
- connectedCallback(): void;
2620
- disconnectedCallback(): void;
2621
2638
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
2622
2639
  onKeyDown(e: KeyboardEvent): void;
2623
- onStoryChange(mode: ContentDirection): void;
2640
+ onContentChange(mode: ContentDirection): void;
2624
2641
  onPlayerClose(): void;
2625
2642
  onPlayerOpen(): void;
2626
2643
  getParentHeightWithoutPadding(): number | null;
2627
2644
  setId(id: string): void;
2645
+ handlePopState(): void;
2628
2646
  private setReloadData;
2629
2647
  addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
2630
2648
  set storyIds(value: string);
2649
+ set contentIds(value: string);
2631
2650
  setContentIds(storyIds: string[], options?: ISetWidgetOptions): void;
2632
2651
  setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
2633
2652
  setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
2634
2653
  getTheme(): IWidgetTheme;
2635
- setTheme(theme: IWidgetTheme | string): void;
2654
+ setTheme(theme: IWidgetTheme | ThemeType): void;
2636
2655
  private get theme();
2637
2656
  updateOverrideStyles(perItemStyleOverrides: PerItemStyleOverrides): void;
2638
2657
  reload(): void;
@@ -2645,11 +2664,14 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
2645
2664
  setMaxItemsDisplaySize(maxSize: number): void;
2646
2665
  setMaxItemsSize(maxItemsSize?: number): void;
2647
2666
  private updatePlayerStyle;
2648
- createModal(type: string): void;
2649
- appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal): void;
2667
+ private createModal;
2668
+ private appendModalToBlazeSDK;
2650
2669
  static get observedAttributes(): string[];
2651
- onItemClick(item: BlazeWidgetItem, i: number): void;
2652
- loadContent(): Promise<void>;
2670
+ private onItemClick;
2671
+ private loadContent;
2672
+ handleAssetsExpiry(data: {
2673
+ assetsExpiryTime: string;
2674
+ }): void;
2653
2675
  processStoriesInWidget(): void;
2654
2676
  calculateChipSizes(theme: IWidgetTheme): {
2655
2677
  badge: {
@@ -2686,10 +2708,11 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
2686
2708
  labelAdditionalWidth: number;
2687
2709
  labelAdditionalHeight: number;
2688
2710
  };
2689
- maxSize(): number;
2690
2711
  event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
2712
+ private reorderWidgets;
2691
2713
  updateWidgetsData(): void;
2692
- reorderWidgets(): void;
2714
+ private updateWidgetDisplay;
2715
+ private maxSize;
2693
2716
  connectWidgets(): void;
2694
2717
  get thumbnailShape(): ThumbnailShape;
2695
2718
  widgetType(): WidgetType;
@@ -2704,12 +2727,12 @@ export declare class BlazeWidgetModal extends BaseWidget {
2704
2727
  hammer: HammerManager | null;
2705
2728
  isMultiTouch: boolean;
2706
2729
  boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
2707
- boundOnPopStateEvent: (this: Window, ev: PopStateEvent) => void;
2730
+ onContentChange?: (mode: ContentDirection) => void;
2708
2731
  constructor(type: 'story' | 'moment');
2709
2732
  connectedCallback(): void;
2710
2733
  disconnectedCallback(): void;
2711
2734
  onResize(): void;
2712
- handlePopState(ev: PopStateEvent): void;
2735
+ handleOnContentChange(mode: ContentDirection): void;
2713
2736
  seek(id: string): void;
2714
2737
  setupHammer(): void;
2715
2738
  handlePanStart(ev: HammerInput): void;
@@ -2741,6 +2764,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
2741
2764
  currentNextAnimation?: anime.AnimeInstance;
2742
2765
  currentPrevAnimation?: anime.AnimeInstance;
2743
2766
  onClose?: () => void;
2767
+ onContentChange?: (mode: ContentDirection) => void;
2744
2768
  listeners: EventsListener;
2745
2769
  boundHandlePanStart: (ev: HammerInput) => void;
2746
2770
  boundHandlePanMove: (ev: HammerInput) => void;
@@ -2787,18 +2811,17 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
2787
2811
 
2788
2812
  export declare class BlazeWidgetScrollable extends BaseWidget {
2789
2813
  buttonsState: never[];
2790
- mouseMoveEvent: ((e: MouseEvent) => void | undefined) | undefined;
2791
- touchMoveEvent: ((e: TouchEvent) => boolean | undefined) | undefined;
2792
- clickEvent: ((e: MouseEvent) => void | undefined) | undefined;
2814
+ boundOnMouseMoveEvent: (e: MouseEvent) => void;
2815
+ boundOnClickEvent: (this: HTMLElement, ev: MouseEvent) => void;
2816
+ boundOnMouseWheelEvent: (event: WheelEvent) => void;
2793
2817
  totalMovement: number;
2794
2818
  constructor();
2795
- render(): void;
2796
2819
  connectedCallback(): void;
2820
+ disconnectedCallback(): void;
2797
2821
  onClick(event: MouseEvent): void;
2798
2822
  onMouseMove(event: MouseEvent): void;
2799
2823
  onMouseWheel(event: WheelEvent): void;
2800
- onTouchMove(event: TouchEvent): boolean;
2801
- disconnectedCallback(): void;
2824
+ render(): void;
2802
2825
  }
2803
2826
 
2804
2827
  export type playRefType = 'Share' | 'SingleStory';
@@ -2852,6 +2875,7 @@ export declare class BlazeWidgetShareModal extends BaseWidget {
2852
2875
  onDrawerClose(): void;
2853
2876
  open(shareUrl: string): void;
2854
2877
  close(): void;
2878
+ get isOpen(): boolean;
2855
2879
  renderButtons(): void;
2856
2880
  renderTitle(): void;
2857
2881
  render(): void;
@@ -3055,8 +3079,9 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
3055
3079
  handleNextDirection(): void;
3056
3080
  updateItemData(itemToReplaceWith: BlazeWidgetMoment & BlazeWidgetStory, nextItemToInsert: BlazeWidgetMoment | BlazeWidgetStory): void;
3057
3081
  createAnimation(content: BlazeWidgetMoment, direction: ContentDirection, targetIndex: number): AnimeTimelineInstance;
3058
- loadAndPlayContent(): Promise<void>;
3082
+ handleAnimationStart(content: BlazeWidgetMoment, direction: ContentDirection): void;
3059
3083
  handleAnimationCompletion(content: BlazeWidgetMoment, mode: ContentDirection): Promise<void>;
3084
+ loadAndPlayContent(): Promise<void>;
3060
3085
  setContent(content: BlazeWidgetMoment[]): void;
3061
3086
  preloadAdjacentContent(direction: ContentDirection): Promise<void>;
3062
3087
  prefetchPosters(): Promise<void>;
@@ -3161,6 +3186,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
3161
3186
  isActive: boolean;
3162
3187
  shouldShowImaAdOnStart: boolean;
3163
3188
  imaUrl: string;
3189
+ adContext?: IAdContext;
3164
3190
  elementsToHideOnImaAds: (HTMLElement | undefined)[];
3165
3191
  elementsToHideOnCustomAds: (HTMLElement | undefined)[];
3166
3192
  constructor();
@@ -3233,13 +3259,11 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
3233
3259
  playerLayout: StoryPlayerStyle;
3234
3260
  onOpen?: () => void;
3235
3261
  onClose?: (options?: ISmoothOpenCloseModal) => void;
3236
- onStoryChange?: (mode: ContentDirection) => void;
3237
3262
  boundOnResizeEventDelay: (this: Window, ev: UIEvent) => void;
3238
3263
  boundOnKeyDown: (ev: KeyboardEvent) => void;
3239
3264
  constructor(parentWidget: HTMLElement, playerLayout: StoryPlayerStyle);
3240
3265
  connectedCallback(): void;
3241
3266
  disconnectedCallback(): void;
3242
- handleOnStoryChange(mode: ContentDirection): void;
3243
3267
  setTheme(theme: IWidgetTheme): void;
3244
3268
  setModalContent(stories: IStory[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
3245
3269
  onKeyDown(ev: KeyboardEvent): void;
@@ -3255,7 +3279,6 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
3255
3279
  }
3256
3280
 
3257
3281
  export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
3258
- onStoryChange?: (mode: ContentDirection) => void;
3259
3282
  boundOnKeyDown: (event: KeyboardEvent) => Promise<void>;
3260
3283
  backgroundAnimation?: Animation;
3261
3284
  constructor();
@@ -3274,7 +3297,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
3274
3297
  resetStyles(): void;
3275
3298
  play(options?: ISmoothOpenCloseModal): void;
3276
3299
  loadAndPlayContent(): Promise<void>;
3277
- handleAnimationCompletion(content: BlazeWidgetStory, mode: ContentDirection): void;
3300
+ handleAnimationCompletion(content: BlazeWidgetStory, direction: ContentDirection): void;
3278
3301
  createAnimation(content: BlazeWidgetStory, direction: ContentDirection, targetIndex: number): anime.AnimeTimelineInstance;
3279
3302
  handleAnimationStart(content: BlazeWidgetStory, targetContent: BlazeWidgetStory, direction: ContentDirection): void;
3280
3303
  closeWithAnimation(direction: Direction): void;
@@ -3301,8 +3324,8 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3301
3324
  type: string;
3302
3325
  progressElement: HTMLElement;
3303
3326
  onPageStart?: () => void;
3304
- onPrevStory?: () => void;
3305
- onNextStory?: () => void;
3327
+ onPrevStory?: (navigation: NavigationType) => void;
3328
+ onNextStory?: (navigation: NavigationType) => void;
3306
3329
  onClose?: () => void;
3307
3330
  buttonsContainer: BlazeDiv;
3308
3331
  playbackParts: HTMLElement[];
@@ -3337,6 +3360,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3337
3360
  requestAnimationId: number | null;
3338
3361
  shouldShowImaAdOnStart: boolean;
3339
3362
  imaUrl: string;
3363
+ adContext?: IAdContext;
3340
3364
  constructor(playerStyle: StoryPlayerStyle, mode: ScreenMode);
3341
3365
  private isButtonVisible;
3342
3366
  private createPlayerButtonsAndAppendToButtonsContainer;
@@ -3381,13 +3405,13 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3381
3405
  onVisibilityChange(): void;
3382
3406
  onBlur(): void;
3383
3407
  onFocus(): void;
3384
- close(isDirectCloseCall?: boolean): void;
3408
+ close(isDirectCloseCall?: boolean): Promise<void>;
3385
3409
  pause(): void;
3386
3410
  resume(): void;
3387
3411
  resetPosition(): void;
3388
3412
  updateWidgetStatusReadUnread(): void;
3389
3413
  markAsRead(): Promise<any>;
3390
- goNextPage(navigationType?: 'Automatic' | 'Manual'): void;
3414
+ goNextPage(navigationType?: NavigationType): void;
3391
3415
  goPrevPage(): void;
3392
3416
  disconnectedCallback(): void;
3393
3417
  updateCTAButtonPosition(): void;