@wscsports/blaze-web-sdk 0.1.992 → 0.2.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 +198 -42
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function setDoNotTrack(value: boolean): void;
|
|
2
2
|
export declare function setGeoLocation(value: string): void;
|
|
3
|
-
export declare function setExternalUserId(value: string): void
|
|
3
|
+
export declare function setExternalUserId(value: string): Promise<void>;
|
|
4
4
|
export declare function Initialize(apiKey: string, options?: Omit<IBlazeSDKOptions, "apiKey">): Promise<void>;
|
|
5
5
|
export declare function WidgetRowView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
6
6
|
export declare function WidgetGridView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
@@ -26,6 +26,7 @@ declare const _default: {
|
|
|
26
26
|
setGoogleCustomNativeAdsHandler: typeof setGoogleCustomNativeAdsHandler;
|
|
27
27
|
pauseCurrentPlayer: typeof pauseCurrentPlayer;
|
|
28
28
|
resumeCurrentPlayer: typeof resumeCurrentPlayer;
|
|
29
|
+
setExternalUserId: typeof setExternalUserId;
|
|
29
30
|
};
|
|
30
31
|
export default _default;
|
|
31
32
|
|
|
@@ -34,19 +35,19 @@ export interface IAPIOptions {
|
|
|
34
35
|
analyticsBaseUrl: string | undefined;
|
|
35
36
|
}
|
|
36
37
|
export interface IRequestOptions {
|
|
37
|
-
init?: RequestInit
|
|
38
|
+
init?: Pick<RequestInit, 'method' | 'body' | 'headers' | 'credentials'>;
|
|
38
39
|
baseUrl?: string;
|
|
39
40
|
urlSearchParams?: {};
|
|
41
|
+
auth?: boolean;
|
|
40
42
|
}
|
|
41
43
|
export declare class API {
|
|
42
44
|
private readonly options;
|
|
43
45
|
constructor(options: IAPIOptions);
|
|
44
46
|
private get baseUrl();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
request<T>(url: string, options?: IRequestOptions): Promise<IResponse<T>>;
|
|
47
|
+
get<T>(url: string, options?: IRequestOptions): Promise<IHttpResponse<T>>;
|
|
48
|
+
post<T>(url: string, options?: IRequestOptions): Promise<IHttpResponse<T>>;
|
|
49
|
+
put<T>(url: string, options?: IRequestOptions): Promise<IHttpResponse<T>>;
|
|
50
|
+
request<T>(url: string, options?: IRequestOptions): Promise<IHttpResponse<T>>;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
export * from './api';
|
|
@@ -377,6 +378,16 @@ export declare enum ImaAdAction {
|
|
|
377
378
|
MIDPOINT = "ima_ad_midpoint",
|
|
378
379
|
THIRD_QUARTILE = "ima_ad_third_quartile"
|
|
379
380
|
}
|
|
381
|
+
export declare enum InteractionAction {
|
|
382
|
+
VIEW = "interaction_view",
|
|
383
|
+
ANSWER = "interaction_answer",
|
|
384
|
+
AUDIO = "audio",
|
|
385
|
+
ShareClick = "share_click",
|
|
386
|
+
ShareSelect = "share_select",
|
|
387
|
+
ShareSuccess = "share_success",
|
|
388
|
+
PlaybackPause = "playback_pause",
|
|
389
|
+
PlaybackPlay = "playback_play"
|
|
390
|
+
}
|
|
380
391
|
export declare const StoryToAdActionMapper: {
|
|
381
392
|
story_page_start: AdAction;
|
|
382
393
|
story_page_exit: AdAction;
|
|
@@ -427,12 +438,13 @@ export * from './database';
|
|
|
427
438
|
interface IAdInfoConfiguration {
|
|
428
439
|
adLocationsIndexes: Array<number>;
|
|
429
440
|
isActive: boolean;
|
|
441
|
+
adsLocationType: 'FixedPages' | 'EveryXStories';
|
|
430
442
|
}
|
|
431
443
|
export interface IAdInfo {
|
|
432
444
|
path?: string;
|
|
433
445
|
tag?: string;
|
|
434
446
|
type: 'Web' | 'IMA';
|
|
435
|
-
configuration
|
|
447
|
+
configuration?: IAdInfoConfiguration;
|
|
436
448
|
}
|
|
437
449
|
|
|
438
450
|
export interface IContent {
|
|
@@ -452,6 +464,7 @@ export interface ICTA {
|
|
|
452
464
|
textColor: string;
|
|
453
465
|
}
|
|
454
466
|
|
|
467
|
+
export * from './ad-info.interface';
|
|
455
468
|
export * from './content.interface';
|
|
456
469
|
export * from './cta.interface';
|
|
457
470
|
export * from './interaction.interface';
|
|
@@ -475,6 +488,29 @@ export type Interaction = {
|
|
|
475
488
|
initData: string;
|
|
476
489
|
designOverridesStr: string;
|
|
477
490
|
};
|
|
491
|
+
export type InteractionDB = Pick<Interaction, 'id' | 'initData'> & {
|
|
492
|
+
userResponse?: string;
|
|
493
|
+
};
|
|
494
|
+
export declare const ANSWER_FEEDBACK_VIBRATE_PATTERNS: Record<string, number[]>;
|
|
495
|
+
export type InteractionAnalyticCustomEvent = {
|
|
496
|
+
action: InteractionAction;
|
|
497
|
+
body: Partial<InteractionEvent>;
|
|
498
|
+
};
|
|
499
|
+
export type InteractionIframeResponse = {
|
|
500
|
+
type: 'USER_RESPONSE';
|
|
501
|
+
data: {
|
|
502
|
+
newInitData: string;
|
|
503
|
+
userResponse: string;
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
export type InteractionIframeVibrate = {
|
|
507
|
+
type: 'USER_VIBRATE';
|
|
508
|
+
data: {
|
|
509
|
+
type: keyof typeof ANSWER_FEEDBACK_VIBRATE_PATTERNS;
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
export type InteractionIframeCustomEvent = InteractionIframeResponse | InteractionIframeVibrate;
|
|
513
|
+
export declare const INTERACTION_ANALYTICS = "INTERACTION_ANALYTICS";
|
|
478
514
|
|
|
479
515
|
export interface ILayerContent {
|
|
480
516
|
renditions: IRendition[];
|
|
@@ -578,11 +614,24 @@ export declare enum InternalEvent {
|
|
|
578
614
|
NEXT_STORY = "next_story",
|
|
579
615
|
PREV_STORY = "prev_story",
|
|
580
616
|
FULL_SCREEN_CLICK = "full_screen_click",
|
|
581
|
-
AD_ENDED = "ad_ended"
|
|
582
|
-
|
|
617
|
+
AD_ENDED = "ad_ended",
|
|
618
|
+
AD_RESUMED = "ad_resumed"
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export declare const HttpStatus: {
|
|
622
|
+
readonly Ok: 200;
|
|
623
|
+
readonly Created: 201;
|
|
624
|
+
readonly NoContent: 204;
|
|
625
|
+
readonly BadRequest: 400;
|
|
626
|
+
readonly Unauthorized: 401;
|
|
627
|
+
readonly Forbidden: 403;
|
|
628
|
+
readonly NotFound: 404;
|
|
629
|
+
readonly InternalServerError: 500;
|
|
630
|
+
};
|
|
583
631
|
|
|
584
632
|
export * from './error-codes.enum';
|
|
585
633
|
export * from './event.enum';
|
|
634
|
+
export * from './http-status.enum';
|
|
586
635
|
|
|
587
636
|
export interface WidgetsTagNameMap {
|
|
588
637
|
'blaze-sdk': BlazeWidgetSDK;
|
|
@@ -710,6 +759,11 @@ export interface CustomNativeAdHandler {
|
|
|
710
759
|
provideAdExtraParams?: (args: CustomNativeArgs) => CustomNativeTargeting;
|
|
711
760
|
}
|
|
712
761
|
|
|
762
|
+
export interface ISmoothOpenCloseModal {
|
|
763
|
+
storyId?: string;
|
|
764
|
+
pageIndex: number;
|
|
765
|
+
}
|
|
766
|
+
|
|
713
767
|
export interface IBlazeSDKOptions {
|
|
714
768
|
apiKey: string;
|
|
715
769
|
environment?: EnvironmentType;
|
|
@@ -717,17 +771,14 @@ export interface IBlazeSDKOptions {
|
|
|
717
771
|
previewUrl?: string;
|
|
718
772
|
previewMomentUrl?: string;
|
|
719
773
|
doNotTrack?: boolean;
|
|
720
|
-
externalUserId?: string;
|
|
721
774
|
geoLocation?: string;
|
|
722
775
|
staticContent?: boolean;
|
|
723
776
|
runInShadowDom?: boolean;
|
|
724
777
|
playerStyleCustomization?: Partial<StoryPlayerStyle>;
|
|
725
778
|
shouldModifyUrlWithStoryId?: boolean;
|
|
726
779
|
shouldDismissPlayer?: boolean;
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
storyId?: string;
|
|
730
|
-
pageIndex: number;
|
|
780
|
+
shouldCreateUser?: boolean;
|
|
781
|
+
externalUserId?: string | null;
|
|
731
782
|
}
|
|
732
783
|
|
|
733
784
|
export interface IButtonPlayerNavigationConfig {
|
|
@@ -787,6 +838,10 @@ export interface IDrawable {
|
|
|
787
838
|
render: () => void;
|
|
788
839
|
}
|
|
789
840
|
|
|
841
|
+
export interface IHttpResponse<T = any> extends IResponse<T> {
|
|
842
|
+
httpStatus?: number;
|
|
843
|
+
}
|
|
844
|
+
|
|
790
845
|
export interface IIcons {
|
|
791
846
|
play: string;
|
|
792
847
|
pause: string;
|
|
@@ -805,12 +860,15 @@ export interface IIcons {
|
|
|
805
860
|
}
|
|
806
861
|
|
|
807
862
|
export * from './ad-handler.interface';
|
|
863
|
+
export * from './behaviors.interface';
|
|
808
864
|
export * from './blaze-sdk.interface';
|
|
809
865
|
export * from './button.interface';
|
|
810
866
|
export * from './database.interface';
|
|
811
867
|
export * from './device.interface';
|
|
812
868
|
export * from './drawable.interface';
|
|
869
|
+
export * from './http-response.interface';
|
|
813
870
|
export * from './icons.interface';
|
|
871
|
+
export * from './player.interface';
|
|
814
872
|
export * from './response.interface';
|
|
815
873
|
export * from './service.interface';
|
|
816
874
|
export * from './widget-label-builder.interface';
|
|
@@ -822,8 +880,10 @@ export default interface IntersectionObservable {
|
|
|
822
880
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
823
881
|
}
|
|
824
882
|
|
|
883
|
+
export type ScreenMode = 'Full Screen' | 'Embedded';
|
|
884
|
+
|
|
825
885
|
export interface IResponse<T = any> {
|
|
826
|
-
data
|
|
886
|
+
data?: T;
|
|
827
887
|
error?: Error;
|
|
828
888
|
}
|
|
829
889
|
|
|
@@ -885,6 +945,7 @@ declare const AdServiceClass_base: {
|
|
|
885
945
|
declare abstract class AdServiceClass extends AdServiceClass_base implements IService {
|
|
886
946
|
canRunAds: boolean;
|
|
887
947
|
init(): Promise<void>;
|
|
948
|
+
pushCustomNativeAdsBetweenStories(defaultAdsInfo: IAdInfo | undefined, widgets: BlazeWidgetStory[], stories: IStory[], index: number, playerLayout: StoryPlayerStyle, mode?: ScreenMode): void;
|
|
888
949
|
}
|
|
889
950
|
export declare const AdService: AdServiceClass;
|
|
890
951
|
|
|
@@ -902,6 +963,7 @@ declare abstract class AnalyticsServiceClass extends AnalyticsServiceClass_base
|
|
|
902
963
|
pushStoryEvent(action: StoryAction, body: Partial<StoryEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
903
964
|
pushAdEvent(action: AdAction, body: Partial<AdEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
904
965
|
pushImaAdEvent(action: ImaAdAction, body: Partial<ImaAdEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
966
|
+
pushInteractionEvent(action: InteractionAction, body: Partial<InteractionEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
905
967
|
pushWidgetEvent(action: WidgetAction, body: Partial<WidgetEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
906
968
|
setupEvent(category: Category, action: string, body: object, label?: string | undefined, referrer?: ReferringEventInfo | undefined): AnalyticsEvent;
|
|
907
969
|
}
|
|
@@ -909,7 +971,8 @@ export declare const AnalyticsService: AnalyticsServiceClass;
|
|
|
909
971
|
export declare enum Category {
|
|
910
972
|
Story = "story",
|
|
911
973
|
Widget = "widget",
|
|
912
|
-
Ad = "ad"
|
|
974
|
+
Ad = "ad",
|
|
975
|
+
Interaction = "interaction"
|
|
913
976
|
}
|
|
914
977
|
declare class UserEventInfo {
|
|
915
978
|
'generated_user_id': string;
|
|
@@ -994,6 +1057,7 @@ export declare class AnalyticsEvent {
|
|
|
994
1057
|
story: Partial<StoryEvent> | undefined;
|
|
995
1058
|
widget: Partial<WidgetEvent> | undefined;
|
|
996
1059
|
ad: Partial<AdEvent> | undefined;
|
|
1060
|
+
interaction: Partial<InteractionEvent> | undefined;
|
|
997
1061
|
}
|
|
998
1062
|
export declare class StoryEvent {
|
|
999
1063
|
'story_start_id': string;
|
|
@@ -1078,6 +1142,19 @@ export declare class ImaAdEvent {
|
|
|
1078
1142
|
'failure_reason': string;
|
|
1079
1143
|
'ad_type': string;
|
|
1080
1144
|
}
|
|
1145
|
+
export declare class InteractionEvent {
|
|
1146
|
+
'interaction_id': string;
|
|
1147
|
+
'interaction_type': string;
|
|
1148
|
+
'interaction_text': string;
|
|
1149
|
+
'interaction_selected_answer': string;
|
|
1150
|
+
'content_session_id': string;
|
|
1151
|
+
'content_type': string;
|
|
1152
|
+
'content_id': string;
|
|
1153
|
+
'content_title': string;
|
|
1154
|
+
'content_page_id': string;
|
|
1155
|
+
'playback_action_method': string;
|
|
1156
|
+
'audio_state': string;
|
|
1157
|
+
}
|
|
1081
1158
|
|
|
1082
1159
|
declare const ApiServiceClass_base: {
|
|
1083
1160
|
new (): {};
|
|
@@ -1090,33 +1167,44 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1090
1167
|
private setAdsOnStories;
|
|
1091
1168
|
getStoriesByIds(storyIds: string[], orderType?: OrderType): Promise<{
|
|
1092
1169
|
result: IStory[];
|
|
1093
|
-
|
|
1170
|
+
httpStatus?: number | undefined;
|
|
1171
|
+
data?: {
|
|
1094
1172
|
assetsExpiryTime: string;
|
|
1095
1173
|
totalItems: number;
|
|
1096
1174
|
result: IStory[];
|
|
1097
|
-
|
|
1175
|
+
defaultAdsInfo?: IAdInfo | undefined;
|
|
1176
|
+
} | undefined;
|
|
1098
1177
|
error?: Error | undefined;
|
|
1099
1178
|
}>;
|
|
1100
1179
|
getStories(labels: string, orderType: OrderType, maxItemsSize?: number, labelsPriority?: string): Promise<{
|
|
1101
1180
|
result: IStory[];
|
|
1102
|
-
|
|
1181
|
+
httpStatus?: number | undefined;
|
|
1182
|
+
data?: {
|
|
1103
1183
|
assetsExpiryTime: string;
|
|
1104
1184
|
totalItems: number;
|
|
1105
1185
|
result: IStory[];
|
|
1106
|
-
|
|
1186
|
+
defaultAdsInfo?: IAdInfo | undefined;
|
|
1187
|
+
} | undefined;
|
|
1107
1188
|
error?: Error | undefined;
|
|
1108
1189
|
}>;
|
|
1109
|
-
getShorts(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<
|
|
1190
|
+
getShorts(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<import("../interfaces").IHttpResponse<{
|
|
1110
1191
|
assetsExpiryTime: string;
|
|
1111
1192
|
totalItems: number;
|
|
1112
1193
|
result: IMoment[];
|
|
1113
1194
|
}>>;
|
|
1114
1195
|
getStaticStories(): Promise<IStory | null>;
|
|
1115
|
-
preview(storyId: string, publishedOnly?: boolean): Promise<
|
|
1196
|
+
preview(storyId: string, publishedOnly?: boolean): Promise<import("../interfaces").IHttpResponse<IStory & {
|
|
1116
1197
|
status: number;
|
|
1117
1198
|
}>>;
|
|
1118
1199
|
preivewMoment(momentId: string, publishedOnly?: boolean): Promise<IResponse<any>>;
|
|
1119
|
-
analyticsEvents(body: Partial<AnalyticsEvent>[]): Promise<
|
|
1200
|
+
analyticsEvents(body: Partial<AnalyticsEvent>[]): Promise<import("../interfaces").IHttpResponse<unknown>>;
|
|
1201
|
+
sendInteractionResponse(options: {
|
|
1202
|
+
interactionId: Interaction['id'];
|
|
1203
|
+
responseId: string;
|
|
1204
|
+
interactionType: Interaction['type'];
|
|
1205
|
+
}): Promise<void>;
|
|
1206
|
+
getUserToken(body: GetUserTokenRequest): Promise<import("../interfaces").IHttpResponse<TokenData>>;
|
|
1207
|
+
refreshUserToken(body: RefreshUserTokenRequest): Promise<import("../interfaces").IHttpResponse<TokenData>>;
|
|
1120
1208
|
}
|
|
1121
1209
|
export declare const ApiService: ApiServiceClass;
|
|
1122
1210
|
|
|
@@ -1134,7 +1222,6 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1134
1222
|
private _previewMomentUrl;
|
|
1135
1223
|
private _sendAnaltyics;
|
|
1136
1224
|
private _doNotTrack;
|
|
1137
|
-
private _externalUserId;
|
|
1138
1225
|
private _geoLocation;
|
|
1139
1226
|
private _staticContent;
|
|
1140
1227
|
private _runInShadowDom;
|
|
@@ -1142,6 +1229,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1142
1229
|
private _shouldDismissPlayer;
|
|
1143
1230
|
private _googleCustomNativeAdHandler?;
|
|
1144
1231
|
private _playerStyleCustomization?;
|
|
1232
|
+
private _shouldCreateUser;
|
|
1233
|
+
private _externalUserId;
|
|
1145
1234
|
protected constructor();
|
|
1146
1235
|
init(options: IBlazeSDKOptions): Promise<void>;
|
|
1147
1236
|
private _urls;
|
|
@@ -1150,9 +1239,10 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1150
1239
|
get environment(): EnvironmentType;
|
|
1151
1240
|
private set environment(value);
|
|
1152
1241
|
get sendAnalytics(): boolean;
|
|
1242
|
+
get shouldCreateUser(): boolean;
|
|
1153
1243
|
get analyticsApiUrl(): string;
|
|
1154
|
-
get externalUserId(): string;
|
|
1155
|
-
set externalUserId(value: string);
|
|
1244
|
+
get externalUserId(): string | null;
|
|
1245
|
+
set externalUserId(value: string | null);
|
|
1156
1246
|
get doNotTrack(): boolean;
|
|
1157
1247
|
set doNotTrack(value: boolean);
|
|
1158
1248
|
get geoLocation(): string;
|
|
@@ -1186,17 +1276,19 @@ declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base im
|
|
|
1186
1276
|
onUpgradeNeeded(db: IDBDatabase): Promise<void>;
|
|
1187
1277
|
getPageViewed(id: string): Promise<any>;
|
|
1188
1278
|
updatePageViewed(id: string, storyId: string): Promise<any>;
|
|
1189
|
-
getUserId(): Promise<
|
|
1279
|
+
getUserId(): Promise<IResponse<{
|
|
1190
1280
|
id: string;
|
|
1191
1281
|
value: string;
|
|
1192
1282
|
}>>;
|
|
1193
|
-
updateUserId(id: string): Promise<
|
|
1283
|
+
updateUserId(id: string): Promise<IResponse<{
|
|
1194
1284
|
id: string;
|
|
1195
1285
|
value: string;
|
|
1196
1286
|
}>>;
|
|
1197
1287
|
update(tableName: string, value: any): Promise<any>;
|
|
1198
1288
|
enrichStories(stories: IStory[]): Promise<IStory[]>;
|
|
1199
1289
|
isPageViewed(id: string): Promise<boolean>;
|
|
1290
|
+
updateInteraction(data: InteractionDB): Promise<any>;
|
|
1291
|
+
getInteraction(id: string): Promise<IResponse<InteractionDB> | null>;
|
|
1200
1292
|
}
|
|
1201
1293
|
export declare const DatabaseService: DatabaseServiceClass;
|
|
1202
1294
|
|
|
@@ -1247,7 +1339,7 @@ declare abstract class EventServiceClass extends EventServiceClass_base implemen
|
|
|
1247
1339
|
private rootElement;
|
|
1248
1340
|
constructor();
|
|
1249
1341
|
init(): Promise<void>;
|
|
1250
|
-
dispatch(el: HTMLElement, event: Delegation, params?: object): {
|
|
1342
|
+
dispatch(el: HTMLElement | undefined, event: Delegation, params?: object): {
|
|
1251
1343
|
mainEvent: CustomEvent;
|
|
1252
1344
|
};
|
|
1253
1345
|
dispatchAnaltyicsEvent(name: string, event: any): {
|
|
@@ -1264,6 +1356,7 @@ export * from './database.service';
|
|
|
1264
1356
|
export * from './error.service';
|
|
1265
1357
|
export * from './event-bus.service';
|
|
1266
1358
|
export * from './event.service';
|
|
1359
|
+
export * from './interaction.service';
|
|
1267
1360
|
export * from './logger.service';
|
|
1268
1361
|
export * from './startup.service';
|
|
1269
1362
|
export * from './user.service';
|
|
@@ -1271,6 +1364,19 @@ export * from './video-cache.service';
|
|
|
1271
1364
|
export * from './video-player.service';
|
|
1272
1365
|
export * from './widgets.service';
|
|
1273
1366
|
|
|
1367
|
+
declare const InteractionServiceClass_base: {
|
|
1368
|
+
new (): {};
|
|
1369
|
+
_instance: InteractionServiceClass;
|
|
1370
|
+
getInstance(): InteractionServiceClass;
|
|
1371
|
+
};
|
|
1372
|
+
declare abstract class InteractionServiceClass extends InteractionServiceClass_base implements IService {
|
|
1373
|
+
constructor();
|
|
1374
|
+
init(): Promise<void>;
|
|
1375
|
+
updateInteraction(data: InteractionDB): Promise<void>;
|
|
1376
|
+
getInteraction(id: InteractionDB['id']): Promise<InteractionDB | null | undefined>;
|
|
1377
|
+
}
|
|
1378
|
+
export declare const InteractionService: InteractionServiceClass;
|
|
1379
|
+
|
|
1274
1380
|
interface LoggerParams {
|
|
1275
1381
|
message: string;
|
|
1276
1382
|
level?: LogLevel;
|
|
@@ -1325,6 +1431,13 @@ declare abstract class UserServiceClass extends UserServiceClass_base implements
|
|
|
1325
1431
|
init(): Promise<void>;
|
|
1326
1432
|
onBlazeDatabaseServiceOpen(): Promise<void>;
|
|
1327
1433
|
getUserId(): Promise<string | null>;
|
|
1434
|
+
private makeSureCurrentExternalUserTokenExists;
|
|
1435
|
+
getAndStoreNewUserToken(): Promise<void>;
|
|
1436
|
+
refreshUserToken(): Promise<void>;
|
|
1437
|
+
private storeUserTokenData;
|
|
1438
|
+
getUserTokenDataFromStorage(): TokenData | undefined;
|
|
1439
|
+
private setStorageItem;
|
|
1440
|
+
private getStorageItem;
|
|
1328
1441
|
}
|
|
1329
1442
|
export declare const UserService: UserServiceClass;
|
|
1330
1443
|
|
|
@@ -1364,6 +1477,7 @@ declare abstract class VideoPlayerServiceClass extends VideoPlayerServiceClass_b
|
|
|
1364
1477
|
private _isNavigating;
|
|
1365
1478
|
private _isModalOpen;
|
|
1366
1479
|
private _playReference;
|
|
1480
|
+
muteStateBeforeAd: 'mute' | 'unmute' | 'no-ad';
|
|
1367
1481
|
constructor();
|
|
1368
1482
|
init(): Promise<void>;
|
|
1369
1483
|
get isMuted(): boolean;
|
|
@@ -1937,6 +2051,7 @@ export * from './severity.type';
|
|
|
1937
2051
|
export * from './size.type';
|
|
1938
2052
|
export * from './story-direction.type';
|
|
1939
2053
|
export * from './thumbnail.type';
|
|
2054
|
+
export * from './user.type';
|
|
1940
2055
|
export * from './widget.type';
|
|
1941
2056
|
|
|
1942
2057
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId';
|
|
@@ -1978,6 +2093,18 @@ export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'CUSTOM';
|
|
|
1978
2093
|
export type ThumbnailShape = 'Circle' | 'Rectangle';
|
|
1979
2094
|
export declare function thumbnailMapping(thumbnailType: ThumbnailType): ThumbnailApiType;
|
|
1980
2095
|
|
|
2096
|
+
export type GetUserTokenRequest = {
|
|
2097
|
+
externalId: string | null;
|
|
2098
|
+
};
|
|
2099
|
+
export type RefreshUserTokenRequest = GetUserTokenRequest & {
|
|
2100
|
+
tokenData: TokenData;
|
|
2101
|
+
};
|
|
2102
|
+
export type TokenData = {
|
|
2103
|
+
accessToken: string;
|
|
2104
|
+
refreshToken: string;
|
|
2105
|
+
userId: string;
|
|
2106
|
+
};
|
|
2107
|
+
|
|
1981
2108
|
export type WidgetType = 'Row' | 'Grid';
|
|
1982
2109
|
|
|
1983
2110
|
interface ChipSizeOptions {
|
|
@@ -2089,11 +2216,14 @@ export * from './widget-story-video';
|
|
|
2089
2216
|
export declare class BlazeWidgetStoryAd extends BlazeWidgetStoryBase {
|
|
2090
2217
|
private storyParent;
|
|
2091
2218
|
data: IPage | undefined;
|
|
2092
|
-
private
|
|
2219
|
+
private isCurrentlyDisplay;
|
|
2093
2220
|
private adContainer;
|
|
2094
2221
|
private placeholderContainer;
|
|
2095
2222
|
private googletag;
|
|
2096
2223
|
private failToLoadTimeout?;
|
|
2224
|
+
private onFail?;
|
|
2225
|
+
private isAdFailed;
|
|
2226
|
+
private isPlaying;
|
|
2097
2227
|
constructor(storyParent: BlazeWidgetStory);
|
|
2098
2228
|
connectedCallback(): void;
|
|
2099
2229
|
disconnectedCallback(): void;
|
|
@@ -2106,15 +2236,19 @@ export declare class BlazeWidgetStoryAd extends BlazeWidgetStoryBase {
|
|
|
2106
2236
|
getAdIframeRef(): HTMLIFrameElement | null;
|
|
2107
2237
|
changeAdMutedState(isMuted: boolean): void;
|
|
2108
2238
|
setData(data: IPage): void;
|
|
2239
|
+
startEnter(): Promise<void>;
|
|
2240
|
+
endExit(): void;
|
|
2109
2241
|
play(): void;
|
|
2110
2242
|
get paused(): boolean;
|
|
2111
2243
|
pause(): void;
|
|
2112
2244
|
removeLoader(): void;
|
|
2113
2245
|
loadPoster(): void;
|
|
2114
2246
|
hide(): void;
|
|
2115
|
-
display(onFail?: () => void): void
|
|
2247
|
+
display(onFail?: () => void): Promise<void>;
|
|
2116
2248
|
mainElement(): CanvasImageSource;
|
|
2117
2249
|
private initStyles;
|
|
2250
|
+
isAdContainerConncetedToDOM(): Promise<boolean>;
|
|
2251
|
+
private destroyAd;
|
|
2118
2252
|
}
|
|
2119
2253
|
|
|
2120
2254
|
export declare class BlazeWidgetCtaModal extends BaseWidget {
|
|
@@ -2150,6 +2284,8 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2150
2284
|
modal?: BlazeWidgetStoryModal;
|
|
2151
2285
|
skeleton?: BlazeWidgetItemSkeleton;
|
|
2152
2286
|
shouldReloadData: boolean;
|
|
2287
|
+
defaultAdsInfo?: IAdInfo;
|
|
2288
|
+
isCurrentPlayerFirstPlay: boolean;
|
|
2153
2289
|
bindedOnStoryPlayerDidAppear: (e: Event) => void;
|
|
2154
2290
|
bindedOnStoryPlayerDismissed: (e: Event) => void;
|
|
2155
2291
|
private get theme();
|
|
@@ -2174,7 +2310,7 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2174
2310
|
setMaxItemsSize(size: number): void;
|
|
2175
2311
|
get currentStoryPlayer(): BlazeWidgetStory | undefined;
|
|
2176
2312
|
private loadStories;
|
|
2177
|
-
setCurrentStoryPlayer(
|
|
2313
|
+
setCurrentStoryPlayer(playerIndex: number, pageIndex?: number): void;
|
|
2178
2314
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
2179
2315
|
nextStory(): void;
|
|
2180
2316
|
prevStory(): void;
|
|
@@ -2187,6 +2323,7 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2187
2323
|
pauseCurrentStoryPage(): void;
|
|
2188
2324
|
playCurrentStoryPage(): void;
|
|
2189
2325
|
onCustomNativeAdEnded(): void;
|
|
2326
|
+
onVastAdResumedEnded(): void;
|
|
2190
2327
|
showSkeleton(): void;
|
|
2191
2328
|
hideSkeleton(): void;
|
|
2192
2329
|
private onStoryPlayerDidAppear;
|
|
@@ -2196,10 +2333,21 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2196
2333
|
|
|
2197
2334
|
export declare class BlazeWidgetInteraction extends BaseWidget {
|
|
2198
2335
|
private iframe;
|
|
2336
|
+
private interaction?;
|
|
2337
|
+
private isActive;
|
|
2338
|
+
private shouldForceHide;
|
|
2339
|
+
private responseHandler;
|
|
2340
|
+
private focusMainWindowHandler;
|
|
2341
|
+
private orientationChangeHandler;
|
|
2199
2342
|
loadInteraction(interactionData: Interaction): void;
|
|
2200
|
-
showInteraction(): void;
|
|
2343
|
+
showInteraction(interactionData?: Interaction): void;
|
|
2201
2344
|
hideInteraction(): void;
|
|
2202
2345
|
unloadInteraction(): void;
|
|
2346
|
+
private onUserResponse;
|
|
2347
|
+
private pushAnalyticsEvent;
|
|
2348
|
+
private focusMainWindow;
|
|
2349
|
+
private initInteraction;
|
|
2350
|
+
private orientationChange;
|
|
2203
2351
|
}
|
|
2204
2352
|
|
|
2205
2353
|
export interface BlazeWidgetItemOptions {
|
|
@@ -2276,6 +2424,7 @@ export declare class BlazeWidgetLabel {
|
|
|
2276
2424
|
export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements Observable, IWidgetView {
|
|
2277
2425
|
modal: BlazeWidgetStoryModal | undefined;
|
|
2278
2426
|
modalMoments: BlazeWidgetMomentModal | undefined;
|
|
2427
|
+
defaultAdsInfo: IAdInfo | undefined;
|
|
2279
2428
|
stories: IStory[];
|
|
2280
2429
|
moments: IMoment[];
|
|
2281
2430
|
skeletonContainer: BlazeDiv | undefined;
|
|
@@ -2618,6 +2767,7 @@ export declare class BlazeWidgetStoryBase extends HTMLElement {
|
|
|
2618
2767
|
shouldShowImaAd?: boolean;
|
|
2619
2768
|
isCurrentlyTryingToRunImaAd?: boolean;
|
|
2620
2769
|
_isAd?: boolean | undefined;
|
|
2770
|
+
adsManager?: any;
|
|
2621
2771
|
constructor();
|
|
2622
2772
|
setData(data: IPage): void;
|
|
2623
2773
|
loadPoster(): void;
|
|
@@ -2643,6 +2793,10 @@ export declare class BlazeWidgetStoryBase extends HTMLElement {
|
|
|
2643
2793
|
connectedCallback(): void;
|
|
2644
2794
|
disconnectedCallback(): void;
|
|
2645
2795
|
render(): void;
|
|
2796
|
+
startEnter(): void;
|
|
2797
|
+
startExit(): void;
|
|
2798
|
+
endEnter(): void;
|
|
2799
|
+
endExit(): void;
|
|
2646
2800
|
}
|
|
2647
2801
|
|
|
2648
2802
|
export declare class BlazeWidgetStoryImage extends BlazeWidgetStoryBase {
|
|
@@ -2686,7 +2840,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
2686
2840
|
constructor(parentWidget: HTMLElement, playerLayout: StoryPlayerStyle);
|
|
2687
2841
|
handleOnStoryChange(mode: StoryDirectionType): void;
|
|
2688
2842
|
setTheme(theme: IWidgetTheme): void;
|
|
2689
|
-
setStories(stories: IStory[],
|
|
2843
|
+
setStories(stories: IStory[], defaultAdsInfo?: IAdInfo): void;
|
|
2690
2844
|
seek(id: string): void;
|
|
2691
2845
|
handleExit(): void;
|
|
2692
2846
|
onKeyDown(ev: KeyboardEvent): void;
|
|
@@ -2735,6 +2889,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
|
|
|
2735
2889
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
2736
2890
|
private setupHammer;
|
|
2737
2891
|
private isTouchOnScreenEdges;
|
|
2892
|
+
private isCurrentlyDisplayingVastAd;
|
|
2738
2893
|
private handlePanStart;
|
|
2739
2894
|
private handlePanMove;
|
|
2740
2895
|
private handlePanEnd;
|
|
@@ -2822,7 +2977,6 @@ export declare class BlazeWidgetStoryPreview extends BlazeWidgetStory {
|
|
|
2822
2977
|
}
|
|
2823
2978
|
|
|
2824
2979
|
export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
|
|
2825
|
-
private disableInteraction;
|
|
2826
2980
|
data: IPage | undefined;
|
|
2827
2981
|
video: HTMLVideoElement;
|
|
2828
2982
|
loader: HTMLElement;
|
|
@@ -2848,7 +3002,7 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
|
|
|
2848
3002
|
googleIMA: any;
|
|
2849
3003
|
isCurrentlyTryingToRunImaAd: boolean;
|
|
2850
3004
|
hasPoster: boolean;
|
|
2851
|
-
constructor(storyParent: BlazeWidgetStory
|
|
3005
|
+
constructor(storyParent: BlazeWidgetStory);
|
|
2852
3006
|
connectedCallback(): void;
|
|
2853
3007
|
disconnectedCallback(): void;
|
|
2854
3008
|
setData(data: IPage): void;
|
|
@@ -2887,11 +3041,12 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
|
|
|
2887
3041
|
onContentResumeRequested(): void;
|
|
2888
3042
|
removeAdLoader(): void;
|
|
2889
3043
|
loadInteraction(): void;
|
|
3044
|
+
handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
|
|
2890
3045
|
}
|
|
2891
3046
|
|
|
2892
3047
|
export declare class BlazeWidgetStory extends HTMLElement {
|
|
2893
3048
|
playerStyle: StoryPlayerStyle;
|
|
2894
|
-
mode:
|
|
3049
|
+
mode: ScreenMode;
|
|
2895
3050
|
pages: BlazeWidgetStoryBase[];
|
|
2896
3051
|
data: IStory;
|
|
2897
3052
|
shareModal?: BlazeWidgetShareModal;
|
|
@@ -2946,11 +3101,10 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2946
3101
|
lastPageIndexToResume: number;
|
|
2947
3102
|
elementsToHideOnWebAds: (HTMLElement | undefined)[];
|
|
2948
3103
|
elementsToHideOnImaAds: (HTMLElement | undefined)[];
|
|
2949
|
-
muteStateBeforeAd: 'mute' | 'unmute' | 'no-ad';
|
|
2950
3104
|
longPressHandler?: LongPressHandler;
|
|
2951
3105
|
originalNextPageDesktopClickListener: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | undefined;
|
|
2952
3106
|
restartStoryOnClickEvent: ((event: MouseEvent) => void) | undefined;
|
|
2953
|
-
constructor(playerStyle: StoryPlayerStyle, mode:
|
|
3107
|
+
constructor(playerStyle: StoryPlayerStyle, mode: ScreenMode);
|
|
2954
3108
|
private isButtonVisible;
|
|
2955
3109
|
private createPlayerButtonsAndAppendToButtonsContainer;
|
|
2956
3110
|
private createNavigationButtonsAndAppendToWidgetStoryContainer;
|
|
@@ -2964,11 +3118,13 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2964
3118
|
setPlayerButtonPosition(state: 'AD' | 'NO_AD'): void;
|
|
2965
3119
|
updatePlayerButtonIcons(): void;
|
|
2966
3120
|
handleCtaAction(event: Event, gestureType: 'Swipe Up' | 'CTA Click'): boolean;
|
|
2967
|
-
playToggle(
|
|
3121
|
+
playToggle(options?: {
|
|
3122
|
+
customIsPlaying?: boolean;
|
|
3123
|
+
}): void;
|
|
2968
3124
|
muteToggle(): boolean;
|
|
2969
3125
|
setWidgetParent(parent: BlazeWidgetItem): void;
|
|
2970
3126
|
resetStoryLocationIndexToLastUnseen(): void;
|
|
2971
|
-
setData(data: any
|
|
3127
|
+
setData(data: any): void;
|
|
2972
3128
|
get currentPage(): BlazeWidgetStoryBase;
|
|
2973
3129
|
get nextPage(): BlazeWidgetStoryBase;
|
|
2974
3130
|
get prevPage(): BlazeWidgetStoryBase;
|