@wscsports/blaze-web-sdk 0.18.0 → 0.19.0
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 +40 -5
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -363,7 +363,7 @@ export declare abstract class BaseWidget extends HTMLElement {
|
|
|
363
363
|
removeElement(): void;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
type BlazeSourceType = 'labels' | 'ids';
|
|
366
|
+
type BlazeSourceType = 'labels' | 'ids' | 'recommendations';
|
|
367
367
|
export type AdvancedOrdering = 'LiveFirst';
|
|
368
368
|
export interface BlazeDataSourceType {
|
|
369
369
|
sourceType: BlazeSourceType;
|
|
@@ -374,6 +374,7 @@ export interface BlazeDataSourceType {
|
|
|
374
374
|
maxItems?: number;
|
|
375
375
|
advancedOrdering?: AdvancedOrdering;
|
|
376
376
|
personalized?: BlazePersonalized;
|
|
377
|
+
recommendations?: BlazeRecommendations;
|
|
377
378
|
}
|
|
378
379
|
export declare const BlazeInternalError: {
|
|
379
380
|
LabelExpressionMustNotBeEmpty: string;
|
|
@@ -381,10 +382,15 @@ export declare const BlazeInternalError: {
|
|
|
381
382
|
IdsMustNotBeEmpty: string;
|
|
382
383
|
MissingLabelsProperty: string;
|
|
383
384
|
IdsMustNotHaveSpaces: string;
|
|
385
|
+
ForYouNotSupported: string;
|
|
386
|
+
TrendingNotSupported: string;
|
|
387
|
+
ForYouContentPreparationNotSupported: string;
|
|
388
|
+
TrendingContentPreparationNotSupported: string;
|
|
384
389
|
};
|
|
385
390
|
export declare class BlazeDataSourceFactory {
|
|
386
391
|
static createLabelsDataSource(params: LabelsDataSourceParams): BlazeDataSourceType;
|
|
387
392
|
static createIdsDataSource(params: IdsDataSourceParams): BlazeDataSourceType;
|
|
393
|
+
static createRecommendationsDataSource(params: RecommendationsDataSourceParams): BlazeDataSourceType;
|
|
388
394
|
static setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[] | undefined): string;
|
|
389
395
|
}
|
|
390
396
|
export declare class BlazeDataSourceValidations {
|
|
@@ -393,7 +399,7 @@ export declare class BlazeDataSourceValidations {
|
|
|
393
399
|
labels?: string | string[] | BlazeWidgetLabel;
|
|
394
400
|
storyIds?: string[];
|
|
395
401
|
contentIds?: string[];
|
|
396
|
-
}, dataSource?: BlazeDataSourceType): void;
|
|
402
|
+
}, dataSource?: BlazeDataSourceType, contentType?: ContentType): void;
|
|
397
403
|
}
|
|
398
404
|
|
|
399
405
|
export declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): {
|
|
@@ -1336,6 +1342,7 @@ export interface AppConfiguration {
|
|
|
1336
1342
|
configRefetchIntervalInMinutes?: number;
|
|
1337
1343
|
enableClientPlaybackModification?: 'true' | 'false' | string;
|
|
1338
1344
|
};
|
|
1345
|
+
recommendationsConfigurations?: IRecommendationsConfigurations;
|
|
1339
1346
|
sdkLoggerConfigurations?: ILoggerConfiguration;
|
|
1340
1347
|
}
|
|
1341
1348
|
|
|
@@ -2001,9 +2008,11 @@ export interface IButtonPlayerConfig {
|
|
|
2001
2008
|
export interface IDataSourceBuilder {
|
|
2002
2009
|
labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
|
|
2003
2010
|
ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
|
|
2011
|
+
recommendations: (params: RecommendationsDataSourceParams) => BlazeDataSourceType;
|
|
2004
2012
|
}
|
|
2005
|
-
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids'>;
|
|
2006
|
-
export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'labelsPriority' | 'maxItems'>;
|
|
2013
|
+
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids' | 'recommendations'>;
|
|
2014
|
+
export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'recommendations' | 'labelsPriority' | 'maxItems'>;
|
|
2015
|
+
export type RecommendationsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids' | 'labels'>;
|
|
2007
2016
|
|
|
2008
2017
|
export interface IDatabase {
|
|
2009
2018
|
init: () => Promise<void>;
|
|
@@ -2120,6 +2129,7 @@ export * from './widget-label-builder.interface';
|
|
|
2120
2129
|
export * from './widget-options.interface';
|
|
2121
2130
|
export * from './widget-view.interface';
|
|
2122
2131
|
export * from './item-click-callback.interface';
|
|
2132
|
+
export * from './recommendations.interface';
|
|
2123
2133
|
export { default as Observable } from './observable';
|
|
2124
2134
|
|
|
2125
2135
|
export interface ItemClickContext {
|
|
@@ -2220,6 +2230,13 @@ export default interface IntersectionObservable {
|
|
|
2220
2230
|
|
|
2221
2231
|
export type ScreenMode = 'Full Screen' | 'Embedded';
|
|
2222
2232
|
|
|
2233
|
+
export interface IRecommendationsConfigurations {
|
|
2234
|
+
enableForYouContentPreparation: boolean;
|
|
2235
|
+
enableTrendingContentPreparation: boolean;
|
|
2236
|
+
supportForYou: boolean;
|
|
2237
|
+
supportTrending: boolean;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2223
2240
|
export interface IResponse<T = any> {
|
|
2224
2241
|
data?: T;
|
|
2225
2242
|
error?: Error;
|
|
@@ -2365,6 +2382,9 @@ type GetByLabelsOptions = GetOptions & {
|
|
|
2365
2382
|
type GetByIdsOptions = GetOptions & {
|
|
2366
2383
|
ids: string[];
|
|
2367
2384
|
};
|
|
2385
|
+
type GetByRecommendationsOptions = GetOptions & {
|
|
2386
|
+
recommendations: BlazeRecommendations;
|
|
2387
|
+
};
|
|
2368
2388
|
export interface ApiResponse<T> {
|
|
2369
2389
|
assetsExpiryTime: string;
|
|
2370
2390
|
totalItems: number;
|
|
@@ -2407,6 +2427,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
2407
2427
|
error?: Error | undefined;
|
|
2408
2428
|
}>;
|
|
2409
2429
|
getMomentsByLabels(options: GetByLabelsOptions): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
|
|
2430
|
+
getMomentsByRecommendations(options: GetByRecommendationsOptions): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
|
|
2410
2431
|
updateMomentLikeStatus(options: {
|
|
2411
2432
|
momentId: string;
|
|
2412
2433
|
setLiked: boolean;
|
|
@@ -2439,6 +2460,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
2439
2460
|
private getContentDefaultParams;
|
|
2440
2461
|
private getContentParamsByLabels;
|
|
2441
2462
|
private getContentParamsByIds;
|
|
2463
|
+
private getContentParamsByRecommendations;
|
|
2442
2464
|
}
|
|
2443
2465
|
export declare const ApiService: ApiServiceClass;
|
|
2444
2466
|
|
|
@@ -3860,6 +3882,7 @@ export * from './action-handler.type';
|
|
|
3860
3882
|
export * from './cc-language.type';
|
|
3861
3883
|
export * from './widget-view-options.type';
|
|
3862
3884
|
export * from './content-item.type';
|
|
3885
|
+
export * from './recommendations.type';
|
|
3863
3886
|
|
|
3864
3887
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
|
|
3865
3888
|
export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
@@ -3911,6 +3934,18 @@ export type PrefetchingPolicyType = 'low' | 'default';
|
|
|
3911
3934
|
|
|
3912
3935
|
export type ContentAspectRatio = 'Vertical' | 'Horizontal';
|
|
3913
3936
|
|
|
3937
|
+
type RecommendationsType = {
|
|
3938
|
+
anyLabelFilter?: string[];
|
|
3939
|
+
};
|
|
3940
|
+
export type BlazeRecommendationsForYou = RecommendationsType & {
|
|
3941
|
+
promotedLabels?: string[];
|
|
3942
|
+
};
|
|
3943
|
+
export type BlazeRecommendationsTrending = RecommendationsType;
|
|
3944
|
+
export type BlazeRecommendations = {
|
|
3945
|
+
forYou?: BlazeRecommendationsForYou;
|
|
3946
|
+
trending?: BlazeRecommendationsTrending;
|
|
3947
|
+
};
|
|
3948
|
+
|
|
3914
3949
|
export type ScreenState = 'default_view' | 'full_screen';
|
|
3915
3950
|
export type ScreenChangeState = {
|
|
3916
3951
|
current_state: ScreenState;
|
|
@@ -4902,6 +4937,7 @@ export declare abstract class WidgetBaseLayout extends BlazeWidgetScrollable imp
|
|
|
4902
4937
|
setContentIds(ids: string[], options?: ISetWidgetOptions): void;
|
|
4903
4938
|
setMaxItemsSize(maxItemsSize?: number, options?: ISetWidgetOptions): void;
|
|
4904
4939
|
setActionHandlers(actionHandlers: ActionHandler[]): void;
|
|
4940
|
+
setRecommendations(recommendations?: BlazeRecommendations, options?: ISetWidgetOptions): void;
|
|
4905
4941
|
protected appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal | BlazeWidgetVideoModal): void;
|
|
4906
4942
|
updateWidgetsData(): void;
|
|
4907
4943
|
protected abstract reorderWidgetItems(): void;
|
|
@@ -5346,7 +5382,6 @@ export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
|
5346
5382
|
connectWidgets(): void;
|
|
5347
5383
|
get thumbnailShape(): ThumbnailShape;
|
|
5348
5384
|
widgetType(): WidgetType;
|
|
5349
|
-
setPersonalized(personalized?: BlazePersonalized): void;
|
|
5350
5385
|
private setupAccessibility;
|
|
5351
5386
|
private updateAccessibilityLabel;
|
|
5352
5387
|
onKeyDown(e: KeyboardEvent): void;
|