@wscsports/blaze-web-sdk 0.2.0 → 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 +160 -32
- 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;
|
|
@@ -477,6 +488,29 @@ export type Interaction = {
|
|
|
477
488
|
initData: string;
|
|
478
489
|
designOverridesStr: string;
|
|
479
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";
|
|
480
514
|
|
|
481
515
|
export interface ILayerContent {
|
|
482
516
|
renditions: IRendition[];
|
|
@@ -584,8 +618,20 @@ export declare enum InternalEvent {
|
|
|
584
618
|
AD_RESUMED = "ad_resumed"
|
|
585
619
|
}
|
|
586
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
|
+
};
|
|
631
|
+
|
|
587
632
|
export * from './error-codes.enum';
|
|
588
633
|
export * from './event.enum';
|
|
634
|
+
export * from './http-status.enum';
|
|
589
635
|
|
|
590
636
|
export interface WidgetsTagNameMap {
|
|
591
637
|
'blaze-sdk': BlazeWidgetSDK;
|
|
@@ -713,6 +759,11 @@ export interface CustomNativeAdHandler {
|
|
|
713
759
|
provideAdExtraParams?: (args: CustomNativeArgs) => CustomNativeTargeting;
|
|
714
760
|
}
|
|
715
761
|
|
|
762
|
+
export interface ISmoothOpenCloseModal {
|
|
763
|
+
storyId?: string;
|
|
764
|
+
pageIndex: number;
|
|
765
|
+
}
|
|
766
|
+
|
|
716
767
|
export interface IBlazeSDKOptions {
|
|
717
768
|
apiKey: string;
|
|
718
769
|
environment?: EnvironmentType;
|
|
@@ -720,17 +771,14 @@ export interface IBlazeSDKOptions {
|
|
|
720
771
|
previewUrl?: string;
|
|
721
772
|
previewMomentUrl?: string;
|
|
722
773
|
doNotTrack?: boolean;
|
|
723
|
-
externalUserId?: string;
|
|
724
774
|
geoLocation?: string;
|
|
725
775
|
staticContent?: boolean;
|
|
726
776
|
runInShadowDom?: boolean;
|
|
727
777
|
playerStyleCustomization?: Partial<StoryPlayerStyle>;
|
|
728
778
|
shouldModifyUrlWithStoryId?: boolean;
|
|
729
779
|
shouldDismissPlayer?: boolean;
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
storyId?: string;
|
|
733
|
-
pageIndex: number;
|
|
780
|
+
shouldCreateUser?: boolean;
|
|
781
|
+
externalUserId?: string | null;
|
|
734
782
|
}
|
|
735
783
|
|
|
736
784
|
export interface IButtonPlayerNavigationConfig {
|
|
@@ -790,6 +838,10 @@ export interface IDrawable {
|
|
|
790
838
|
render: () => void;
|
|
791
839
|
}
|
|
792
840
|
|
|
841
|
+
export interface IHttpResponse<T = any> extends IResponse<T> {
|
|
842
|
+
httpStatus?: number;
|
|
843
|
+
}
|
|
844
|
+
|
|
793
845
|
export interface IIcons {
|
|
794
846
|
play: string;
|
|
795
847
|
pause: string;
|
|
@@ -808,11 +860,13 @@ export interface IIcons {
|
|
|
808
860
|
}
|
|
809
861
|
|
|
810
862
|
export * from './ad-handler.interface';
|
|
863
|
+
export * from './behaviors.interface';
|
|
811
864
|
export * from './blaze-sdk.interface';
|
|
812
865
|
export * from './button.interface';
|
|
813
866
|
export * from './database.interface';
|
|
814
867
|
export * from './device.interface';
|
|
815
868
|
export * from './drawable.interface';
|
|
869
|
+
export * from './http-response.interface';
|
|
816
870
|
export * from './icons.interface';
|
|
817
871
|
export * from './player.interface';
|
|
818
872
|
export * from './response.interface';
|
|
@@ -829,7 +883,7 @@ export default interface IntersectionObservable {
|
|
|
829
883
|
export type ScreenMode = 'Full Screen' | 'Embedded';
|
|
830
884
|
|
|
831
885
|
export interface IResponse<T = any> {
|
|
832
|
-
data
|
|
886
|
+
data?: T;
|
|
833
887
|
error?: Error;
|
|
834
888
|
}
|
|
835
889
|
|
|
@@ -891,7 +945,7 @@ declare const AdServiceClass_base: {
|
|
|
891
945
|
declare abstract class AdServiceClass extends AdServiceClass_base implements IService {
|
|
892
946
|
canRunAds: boolean;
|
|
893
947
|
init(): Promise<void>;
|
|
894
|
-
pushCustomNativeAdsBetweenStories(defaultAdsInfo: IAdInfo | undefined, widgets: BlazeWidgetStory[], stories: IStory[], index: number, playerLayout: StoryPlayerStyle,
|
|
948
|
+
pushCustomNativeAdsBetweenStories(defaultAdsInfo: IAdInfo | undefined, widgets: BlazeWidgetStory[], stories: IStory[], index: number, playerLayout: StoryPlayerStyle, mode?: ScreenMode): void;
|
|
895
949
|
}
|
|
896
950
|
export declare const AdService: AdServiceClass;
|
|
897
951
|
|
|
@@ -909,6 +963,7 @@ declare abstract class AnalyticsServiceClass extends AnalyticsServiceClass_base
|
|
|
909
963
|
pushStoryEvent(action: StoryAction, body: Partial<StoryEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
910
964
|
pushAdEvent(action: AdAction, body: Partial<AdEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
911
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;
|
|
912
967
|
pushWidgetEvent(action: WidgetAction, body: Partial<WidgetEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
913
968
|
setupEvent(category: Category, action: string, body: object, label?: string | undefined, referrer?: ReferringEventInfo | undefined): AnalyticsEvent;
|
|
914
969
|
}
|
|
@@ -916,7 +971,8 @@ export declare const AnalyticsService: AnalyticsServiceClass;
|
|
|
916
971
|
export declare enum Category {
|
|
917
972
|
Story = "story",
|
|
918
973
|
Widget = "widget",
|
|
919
|
-
Ad = "ad"
|
|
974
|
+
Ad = "ad",
|
|
975
|
+
Interaction = "interaction"
|
|
920
976
|
}
|
|
921
977
|
declare class UserEventInfo {
|
|
922
978
|
'generated_user_id': string;
|
|
@@ -1001,6 +1057,7 @@ export declare class AnalyticsEvent {
|
|
|
1001
1057
|
story: Partial<StoryEvent> | undefined;
|
|
1002
1058
|
widget: Partial<WidgetEvent> | undefined;
|
|
1003
1059
|
ad: Partial<AdEvent> | undefined;
|
|
1060
|
+
interaction: Partial<InteractionEvent> | undefined;
|
|
1004
1061
|
}
|
|
1005
1062
|
export declare class StoryEvent {
|
|
1006
1063
|
'story_start_id': string;
|
|
@@ -1085,6 +1142,19 @@ export declare class ImaAdEvent {
|
|
|
1085
1142
|
'failure_reason': string;
|
|
1086
1143
|
'ad_type': string;
|
|
1087
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
|
+
}
|
|
1088
1158
|
|
|
1089
1159
|
declare const ApiServiceClass_base: {
|
|
1090
1160
|
new (): {};
|
|
@@ -1097,35 +1167,44 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1097
1167
|
private setAdsOnStories;
|
|
1098
1168
|
getStoriesByIds(storyIds: string[], orderType?: OrderType): Promise<{
|
|
1099
1169
|
result: IStory[];
|
|
1100
|
-
|
|
1170
|
+
httpStatus?: number | undefined;
|
|
1171
|
+
data?: {
|
|
1101
1172
|
assetsExpiryTime: string;
|
|
1102
1173
|
totalItems: number;
|
|
1103
1174
|
result: IStory[];
|
|
1104
1175
|
defaultAdsInfo?: IAdInfo | undefined;
|
|
1105
|
-
};
|
|
1176
|
+
} | undefined;
|
|
1106
1177
|
error?: Error | undefined;
|
|
1107
1178
|
}>;
|
|
1108
1179
|
getStories(labels: string, orderType: OrderType, maxItemsSize?: number, labelsPriority?: string): Promise<{
|
|
1109
1180
|
result: IStory[];
|
|
1110
|
-
|
|
1181
|
+
httpStatus?: number | undefined;
|
|
1182
|
+
data?: {
|
|
1111
1183
|
assetsExpiryTime: string;
|
|
1112
1184
|
totalItems: number;
|
|
1113
1185
|
result: IStory[];
|
|
1114
1186
|
defaultAdsInfo?: IAdInfo | undefined;
|
|
1115
|
-
};
|
|
1187
|
+
} | undefined;
|
|
1116
1188
|
error?: Error | undefined;
|
|
1117
1189
|
}>;
|
|
1118
|
-
getShorts(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<
|
|
1190
|
+
getShorts(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<import("../interfaces").IHttpResponse<{
|
|
1119
1191
|
assetsExpiryTime: string;
|
|
1120
1192
|
totalItems: number;
|
|
1121
1193
|
result: IMoment[];
|
|
1122
1194
|
}>>;
|
|
1123
1195
|
getStaticStories(): Promise<IStory | null>;
|
|
1124
|
-
preview(storyId: string, publishedOnly?: boolean): Promise<
|
|
1196
|
+
preview(storyId: string, publishedOnly?: boolean): Promise<import("../interfaces").IHttpResponse<IStory & {
|
|
1125
1197
|
status: number;
|
|
1126
1198
|
}>>;
|
|
1127
1199
|
preivewMoment(momentId: string, publishedOnly?: boolean): Promise<IResponse<any>>;
|
|
1128
|
-
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>>;
|
|
1129
1208
|
}
|
|
1130
1209
|
export declare const ApiService: ApiServiceClass;
|
|
1131
1210
|
|
|
@@ -1143,7 +1222,6 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1143
1222
|
private _previewMomentUrl;
|
|
1144
1223
|
private _sendAnaltyics;
|
|
1145
1224
|
private _doNotTrack;
|
|
1146
|
-
private _externalUserId;
|
|
1147
1225
|
private _geoLocation;
|
|
1148
1226
|
private _staticContent;
|
|
1149
1227
|
private _runInShadowDom;
|
|
@@ -1151,6 +1229,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1151
1229
|
private _shouldDismissPlayer;
|
|
1152
1230
|
private _googleCustomNativeAdHandler?;
|
|
1153
1231
|
private _playerStyleCustomization?;
|
|
1232
|
+
private _shouldCreateUser;
|
|
1233
|
+
private _externalUserId;
|
|
1154
1234
|
protected constructor();
|
|
1155
1235
|
init(options: IBlazeSDKOptions): Promise<void>;
|
|
1156
1236
|
private _urls;
|
|
@@ -1159,9 +1239,10 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1159
1239
|
get environment(): EnvironmentType;
|
|
1160
1240
|
private set environment(value);
|
|
1161
1241
|
get sendAnalytics(): boolean;
|
|
1242
|
+
get shouldCreateUser(): boolean;
|
|
1162
1243
|
get analyticsApiUrl(): string;
|
|
1163
|
-
get externalUserId(): string;
|
|
1164
|
-
set externalUserId(value: string);
|
|
1244
|
+
get externalUserId(): string | null;
|
|
1245
|
+
set externalUserId(value: string | null);
|
|
1165
1246
|
get doNotTrack(): boolean;
|
|
1166
1247
|
set doNotTrack(value: boolean);
|
|
1167
1248
|
get geoLocation(): string;
|
|
@@ -1195,17 +1276,19 @@ declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base im
|
|
|
1195
1276
|
onUpgradeNeeded(db: IDBDatabase): Promise<void>;
|
|
1196
1277
|
getPageViewed(id: string): Promise<any>;
|
|
1197
1278
|
updatePageViewed(id: string, storyId: string): Promise<any>;
|
|
1198
|
-
getUserId(): Promise<
|
|
1279
|
+
getUserId(): Promise<IResponse<{
|
|
1199
1280
|
id: string;
|
|
1200
1281
|
value: string;
|
|
1201
1282
|
}>>;
|
|
1202
|
-
updateUserId(id: string): Promise<
|
|
1283
|
+
updateUserId(id: string): Promise<IResponse<{
|
|
1203
1284
|
id: string;
|
|
1204
1285
|
value: string;
|
|
1205
1286
|
}>>;
|
|
1206
1287
|
update(tableName: string, value: any): Promise<any>;
|
|
1207
1288
|
enrichStories(stories: IStory[]): Promise<IStory[]>;
|
|
1208
1289
|
isPageViewed(id: string): Promise<boolean>;
|
|
1290
|
+
updateInteraction(data: InteractionDB): Promise<any>;
|
|
1291
|
+
getInteraction(id: string): Promise<IResponse<InteractionDB> | null>;
|
|
1209
1292
|
}
|
|
1210
1293
|
export declare const DatabaseService: DatabaseServiceClass;
|
|
1211
1294
|
|
|
@@ -1273,6 +1356,7 @@ export * from './database.service';
|
|
|
1273
1356
|
export * from './error.service';
|
|
1274
1357
|
export * from './event-bus.service';
|
|
1275
1358
|
export * from './event.service';
|
|
1359
|
+
export * from './interaction.service';
|
|
1276
1360
|
export * from './logger.service';
|
|
1277
1361
|
export * from './startup.service';
|
|
1278
1362
|
export * from './user.service';
|
|
@@ -1280,6 +1364,19 @@ export * from './video-cache.service';
|
|
|
1280
1364
|
export * from './video-player.service';
|
|
1281
1365
|
export * from './widgets.service';
|
|
1282
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
|
+
|
|
1283
1380
|
interface LoggerParams {
|
|
1284
1381
|
message: string;
|
|
1285
1382
|
level?: LogLevel;
|
|
@@ -1334,6 +1431,13 @@ declare abstract class UserServiceClass extends UserServiceClass_base implements
|
|
|
1334
1431
|
init(): Promise<void>;
|
|
1335
1432
|
onBlazeDatabaseServiceOpen(): Promise<void>;
|
|
1336
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;
|
|
1337
1441
|
}
|
|
1338
1442
|
export declare const UserService: UserServiceClass;
|
|
1339
1443
|
|
|
@@ -1947,6 +2051,7 @@ export * from './severity.type';
|
|
|
1947
2051
|
export * from './size.type';
|
|
1948
2052
|
export * from './story-direction.type';
|
|
1949
2053
|
export * from './thumbnail.type';
|
|
2054
|
+
export * from './user.type';
|
|
1950
2055
|
export * from './widget.type';
|
|
1951
2056
|
|
|
1952
2057
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId';
|
|
@@ -1988,6 +2093,18 @@ export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'CUSTOM';
|
|
|
1988
2093
|
export type ThumbnailShape = 'Circle' | 'Rectangle';
|
|
1989
2094
|
export declare function thumbnailMapping(thumbnailType: ThumbnailType): ThumbnailApiType;
|
|
1990
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
|
+
|
|
1991
2108
|
export type WidgetType = 'Row' | 'Grid';
|
|
1992
2109
|
|
|
1993
2110
|
interface ChipSizeOptions {
|
|
@@ -2216,10 +2333,21 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2216
2333
|
|
|
2217
2334
|
export declare class BlazeWidgetInteraction extends BaseWidget {
|
|
2218
2335
|
private iframe;
|
|
2336
|
+
private interaction?;
|
|
2337
|
+
private isActive;
|
|
2338
|
+
private shouldForceHide;
|
|
2339
|
+
private responseHandler;
|
|
2340
|
+
private focusMainWindowHandler;
|
|
2341
|
+
private orientationChangeHandler;
|
|
2219
2342
|
loadInteraction(interactionData: Interaction): void;
|
|
2220
|
-
showInteraction(): void;
|
|
2343
|
+
showInteraction(interactionData?: Interaction): void;
|
|
2221
2344
|
hideInteraction(): void;
|
|
2222
2345
|
unloadInteraction(): void;
|
|
2346
|
+
private onUserResponse;
|
|
2347
|
+
private pushAnalyticsEvent;
|
|
2348
|
+
private focusMainWindow;
|
|
2349
|
+
private initInteraction;
|
|
2350
|
+
private orientationChange;
|
|
2223
2351
|
}
|
|
2224
2352
|
|
|
2225
2353
|
export interface BlazeWidgetItemOptions {
|
|
@@ -2712,7 +2840,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
2712
2840
|
constructor(parentWidget: HTMLElement, playerLayout: StoryPlayerStyle);
|
|
2713
2841
|
handleOnStoryChange(mode: StoryDirectionType): void;
|
|
2714
2842
|
setTheme(theme: IWidgetTheme): void;
|
|
2715
|
-
setStories(stories: IStory[],
|
|
2843
|
+
setStories(stories: IStory[], defaultAdsInfo?: IAdInfo): void;
|
|
2716
2844
|
seek(id: string): void;
|
|
2717
2845
|
handleExit(): void;
|
|
2718
2846
|
onKeyDown(ev: KeyboardEvent): void;
|
|
@@ -2849,7 +2977,6 @@ export declare class BlazeWidgetStoryPreview extends BlazeWidgetStory {
|
|
|
2849
2977
|
}
|
|
2850
2978
|
|
|
2851
2979
|
export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
|
|
2852
|
-
private disableInteraction;
|
|
2853
2980
|
data: IPage | undefined;
|
|
2854
2981
|
video: HTMLVideoElement;
|
|
2855
2982
|
loader: HTMLElement;
|
|
@@ -2875,7 +3002,7 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
|
|
|
2875
3002
|
googleIMA: any;
|
|
2876
3003
|
isCurrentlyTryingToRunImaAd: boolean;
|
|
2877
3004
|
hasPoster: boolean;
|
|
2878
|
-
constructor(storyParent: BlazeWidgetStory
|
|
3005
|
+
constructor(storyParent: BlazeWidgetStory);
|
|
2879
3006
|
connectedCallback(): void;
|
|
2880
3007
|
disconnectedCallback(): void;
|
|
2881
3008
|
setData(data: IPage): void;
|
|
@@ -2914,6 +3041,7 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
|
|
|
2914
3041
|
onContentResumeRequested(): void;
|
|
2915
3042
|
removeAdLoader(): void;
|
|
2916
3043
|
loadInteraction(): void;
|
|
3044
|
+
handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
|
|
2917
3045
|
}
|
|
2918
3046
|
|
|
2919
3047
|
export declare class BlazeWidgetStory extends HTMLElement {
|
|
@@ -2996,7 +3124,7 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2996
3124
|
muteToggle(): boolean;
|
|
2997
3125
|
setWidgetParent(parent: BlazeWidgetItem): void;
|
|
2998
3126
|
resetStoryLocationIndexToLastUnseen(): void;
|
|
2999
|
-
setData(data: any
|
|
3127
|
+
setData(data: any): void;
|
|
3000
3128
|
get currentPage(): BlazeWidgetStoryBase;
|
|
3001
3129
|
get nextPage(): BlazeWidgetStoryBase;
|
|
3002
3130
|
get prevPage(): BlazeWidgetStoryBase;
|