@wscsports/blaze-web-sdk 0.13.0 → 0.13.2

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.13.0",
3
+ "version": "0.13.2",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -305,6 +305,7 @@ export declare class AdEvent {
305
305
  'session_id': string;
306
306
  'gesture_type': MomentGestureType | StoryGestureType;
307
307
  'content_extra_info': string;
308
+ 'backoffice_campaign_data': string;
308
309
  }
309
310
  export declare class ImaAdEvent {
310
311
  'story_id': string;
@@ -326,6 +327,7 @@ export declare class ImaAdEvent {
326
327
  'ad_index': string;
327
328
  'audio_state': string;
328
329
  'content_type': string;
330
+ 'backoffice_campaign_data': string;
329
331
  }
330
332
  export declare class InteractionEvent {
331
333
  'interaction_id': string;
@@ -858,6 +860,7 @@ export declare enum StoryAction {
858
860
  ShareSuccess = "share_success",
859
861
  PlaybackPause = "playback_pause",
860
862
  PlaybackPlay = "playback_play",
863
+ PlaybackInitialStart = "playback_initial_start",
861
864
  Expand = "expand",
862
865
  Minimize = "minimize",
863
866
  ClosedCaptionsOff = "cc_off",
@@ -877,6 +880,7 @@ export declare enum MomentAction {
877
880
  ShareSuccess = "share_success",
878
881
  PlaybackPause = "playback_pause",
879
882
  PlaybackPlay = "playback_play",
883
+ PlaybackInitialStart = "playback_initial_start",
880
884
  ClosedCaptionsOff = "cc_off",
881
885
  ClosedCaptionsOn = "cc_on",
882
886
  CustomActionButtonClick = "custom_action_button_click"
@@ -886,6 +890,7 @@ export declare enum VideoAction {
886
890
  VideoEnd = "video_end",
887
891
  PlaybackPause = "playback_pause",
888
892
  PlaybackPlay = "playback_play",
893
+ PlaybackInitialStart = "playback_initial_start",
889
894
  Seek = "seek",
890
895
  Like = "like",
891
896
  Unlike = "unlike",
@@ -1025,6 +1030,7 @@ export type IAdContext = Record<string, string>;
1025
1030
  interface IBaseAdInfo {
1026
1031
  configuration?: IAdInfoConfiguration;
1027
1032
  context?: IAdContext;
1033
+ externalAdServerId?: string;
1028
1034
  }
1029
1035
  export interface IImaAdInfo extends IBaseAdInfo {
1030
1036
  type: 'IMA';
@@ -1036,9 +1042,9 @@ export interface IWebAdInfo extends IBaseAdInfo {
1036
1042
  path: string;
1037
1043
  }
1038
1044
  export interface IBannerAdInfo {
1045
+ type: 'Banner';
1039
1046
  adUnitId: string;
1040
1047
  size: 'Banner';
1041
- type: 'Banner';
1042
1048
  }
1043
1049
  export type IAdInfo = IWebAdInfo | IImaAdInfo;
1044
1050
 
@@ -1248,7 +1254,7 @@ export interface IContentPage extends IBasePage {
1248
1254
  }
1249
1255
  export interface IAdPage extends IBasePage {
1250
1256
  type: 'Ad';
1251
- adPath: string;
1257
+ adInfo?: IWebAdInfo;
1252
1258
  }
1253
1259
  export type IPage = IAdPage | IContentPage;
1254
1260
 
@@ -1909,10 +1915,11 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1909
1915
  private _environment;
1910
1916
  private _apiUrl;
1911
1917
  private _analyticsApiUrl;
1918
+ private _sdkStorageCDN;
1912
1919
  private _apiKey;
1913
1920
  private _previewUrl;
1914
1921
  private _previewMomentUrl;
1915
- private _sendAnaltyics;
1922
+ private _sendAnalytics;
1916
1923
  private _doNotTrack;
1917
1924
  private _geoLocation;
1918
1925
  private _staticContent;
@@ -1937,14 +1944,21 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1937
1944
  private _disableAutoLoadingContent;
1938
1945
  protected constructor();
1939
1946
  init(options: IBlazeSDKOptions): Promise<void>;
1940
- private _urls;
1941
- private _apiPath;
1942
- private _analyticsUrls;
1947
+ private readonly _russiaRegionCDN;
1948
+ private readonly _urls;
1949
+ private readonly _analyticsUrls;
1950
+ private readonly _globalStorageCDN;
1951
+ private readonly _russiaStorageCDN;
1952
+ private readonly _sdkStorageCDNs;
1953
+ private getEnvUrl;
1954
+ private getServiceUrl;
1955
+ private getAnalyticsUrl;
1956
+ private throwOrLog;
1943
1957
  get environment(): EnvironmentType;
1944
1958
  private set environment(value);
1945
1959
  get sendAnalytics(): boolean;
1946
1960
  get shouldCreateUser(): boolean;
1947
- get analyticsApiUrl(): string;
1961
+ get analyticsApiUrl(): string | undefined;
1948
1962
  get externalUserId(): string | null;
1949
1963
  set externalUserId(value: string | null);
1950
1964
  get doNotTrack(): boolean;
@@ -1958,6 +1972,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1958
1972
  get staticContentType(): ContentType | undefined;
1959
1973
  set staticContentType(value: ContentType);
1960
1974
  get apiUrl(): string;
1975
+ get sdkStorageCDN(): string;
1961
1976
  get apiKey(): string;
1962
1977
  get previewUrl(): string;
1963
1978
  get previewMomentsUrl(): string;
@@ -2098,6 +2113,7 @@ export * from './video.service';
2098
2113
  export * from './widgets.service';
2099
2114
  export * from './moment.service';
2100
2115
  export * from './story.service';
2116
+ export * from './user-country.service';
2101
2117
 
2102
2118
  declare const InteractionServiceClass_base: {
2103
2119
  new (): {};
@@ -2192,6 +2208,31 @@ declare abstract class StoryServiceClass extends StoryServiceClass_base implemen
2192
2208
  }
2193
2209
  export declare const StoryService: StoryServiceClass;
2194
2210
 
2211
+ declare const UserCountryServiceClass_base: {
2212
+ new (): {};
2213
+ _instance: UserCountryServiceClass;
2214
+ getInstance(): UserCountryServiceClass;
2215
+ };
2216
+ declare abstract class UserCountryServiceClass extends UserCountryServiceClass_base implements IService {
2217
+ private _userCountry;
2218
+ private static readonly USER_CACHE_KEY;
2219
+ private static readonly USER_CACHE_LAST_UPDATE_KEY;
2220
+ private static readonly USER_CACHE_UPDATE_INTERVAL_MS;
2221
+ private static readonly API_TIMEOUT_MS;
2222
+ private static readonly timezoneCountryMap;
2223
+ init(): Promise<void>;
2224
+ get userCountry(): string;
2225
+ updateCountry(): Promise<void>;
2226
+ private getCachedCountry;
2227
+ private cacheCountry;
2228
+ private getLastUpdate;
2229
+ detectCountry(): Promise<string>;
2230
+ private fetchAndUpdateCountry;
2231
+ private fetchCountryFromApi;
2232
+ getCountryFromTimezone(): string;
2233
+ }
2234
+ export declare const UserCountryService: UserCountryServiceClass;
2235
+
2195
2236
  export type BlazeAbTestType = {
2196
2237
  id: string;
2197
2238
  variant: string;
@@ -4899,6 +4940,7 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
4899
4940
  private adLoaderContainer;
4900
4941
  private videoElement?;
4901
4942
  private currentAdTag;
4943
+ private currentAdInfo?;
4902
4944
  private boundedOnBlur;
4903
4945
  private boundedOnFocus;
4904
4946
  private boundedOnVisibilityChange;
@@ -4908,7 +4950,7 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
4908
4950
  constructor(contentType: ContentType, getReferringObject?: (() => ReferringEventInfo) | undefined);
4909
4951
  private initializeGoogleIma;
4910
4952
  private buildImaUrl;
4911
- startAd(videoElement: HTMLVideoElement, tag: string, contentExtraInfo: ContentExtraInfo): Boolean;
4953
+ startAd(videoElement: HTMLVideoElement, adInfo: IImaAdInfo, contentExtraInfo: ContentExtraInfo): Boolean;
4912
4954
  private onAdsManagerLoaded;
4913
4955
  private loadAds;
4914
4956
  private onAdEvent;