@wscsports/blaze-web-sdk 0.35.4 → 0.35.6

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.
Files changed (3) hide show
  1. package/index.d.ts +55 -13
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -596,10 +596,6 @@ export declare class VideoFilters {
596
596
  */
597
597
  static validate(options: IVideoFilterOptions): void;
598
598
  }
599
- export type BlazeAbTestType = {
600
- id: string;
601
- variant: string;
602
- };
603
599
  export interface IBlazeWidgetLabel {
604
600
  readonly _type: "BlazeWidgetLabel";
605
601
  value: string;
@@ -621,7 +617,40 @@ declare class BlazeWidgetLabel implements IBlazeWidgetLabel {
621
617
  private static validateAndProceed;
622
618
  private static isValidLabelFormat;
623
619
  }
624
- export type BlazeSourceType = "labels" | "ids" | "recommendations" | "text";
620
+ /**
621
+ * Per-entry configuration for a data source within a composite.
622
+ */
623
+ export interface BlazeCompositeDataSourceConfig {
624
+ /**
625
+ * When `true`, a fetch failure for this data source fails the entire composite.
626
+ * An empty success response (0 items) is not considered a failure.
627
+ * Default: `false`
628
+ */
629
+ isMandatory: boolean;
630
+ }
631
+ /**
632
+ * A single data source entry within a composite data source, paired with its configuration.
633
+ */
634
+ export interface BlazeCompositeDataSourceEntry {
635
+ /** The data source to fetch content from. */
636
+ dataSource: BlazeDataSourceType;
637
+ /** Per-entry configuration (e.g. mandatory/optional). */
638
+ config: BlazeCompositeDataSourceConfig;
639
+ }
640
+ /**
641
+ * Metadata stamped on every item produced by a composite data source fetch.
642
+ * `null` / `undefined` for items fetched outside of a composite.
643
+ */
644
+ export interface CompositeSourceMetadata {
645
+ /** The specific data source within the composite that produced this item. */
646
+ ownDataSource: BlazeDataSourceType;
647
+ /**
648
+ * All data sources declared in the composite, in declaration order.
649
+ * Includes sources that failed or returned 0 items — reflects the full configured intent.
650
+ */
651
+ compositeRepresentation: BlazeDataSourceType[];
652
+ }
653
+ export type BlazeSourceType = "labels" | "ids" | "recommendations" | "text" | "composite";
625
654
  export type AdvancedOrdering = "LiveFirst";
626
655
  export interface BlazeDataSourceType {
627
656
  sourceType: BlazeSourceType;
@@ -634,7 +663,13 @@ export interface BlazeDataSourceType {
634
663
  personalized?: BlazePersonalized;
635
664
  recommendations?: BlazeRecommendations;
636
665
  text?: string;
666
+ /** Only present when `sourceType === 'composite'`. */
667
+ dataSources?: BlazeCompositeDataSourceEntry[];
637
668
  }
669
+ export type BlazeAbTestType = {
670
+ id: string;
671
+ variant: string;
672
+ };
638
673
  export type LocaleDirectionType = "LTR" | "RTL";
639
674
  export type OrderType = "Manual" | "AtoZ" | "ZtoA" | "RecentlyUpdatedFirst" | "RecentlyUpdatedLast" | "RecentlyCreatedFirst" | "RecentlyCreatedLast" | "Random" | "Upcoming" | "RecentlyStartingFirst" | "RecentlyStartingLast" | "RecentlyStartedFirst" | "RecentlyStartedLast";
640
675
  export type ContentOrderType = "LIVE_CHIP" | "STORY_TITLE" | "PUBLISHED_DATE";
@@ -772,11 +807,9 @@ export type RecommendationsType = {
772
807
  anyLabelFilter?: string[];
773
808
  };
774
809
  export type BlazeRecommendationsForYou = RecommendationsType & {
775
- promotedLabels?: string[];
776
- };
777
- export type BlazeRecommendationsTrending = RecommendationsType & {
778
- promotedLabels?: string[];
810
+ coldStartLabels?: string[];
779
811
  };
812
+ export type BlazeRecommendationsTrending = RecommendationsType;
780
813
  export type BlazeRecommendations = {
781
814
  forYou?: BlazeRecommendationsForYou;
782
815
  trending?: BlazeRecommendationsTrending;
@@ -820,6 +853,8 @@ export interface IContent {
820
853
  followEntities?: BlazeFollowEntity[];
821
854
  retrievedLanguages?: RetrievedLanguages;
822
855
  titleImageUrl?: string;
856
+ attributionToken?: string | null;
857
+ compositeMetadata?: CompositeSourceMetadata;
823
858
  }
824
859
  export interface IBlazeContent {
825
860
  id: string;
@@ -906,11 +941,18 @@ export interface IDataSourceBuilder {
906
941
  ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
907
942
  recommendations: (params: RecommendationsDataSourceParams) => BlazeDataSourceType;
908
943
  text: (params: TextDataSourceParams) => BlazeDataSourceType;
944
+ composite: (params: CompositeDataSourceParams) => BlazeDataSourceType;
945
+ }
946
+ export type LabelsDataSourceParams = Omit<BlazeDataSourceType, "sourceType" | "ids" | "recommendations" | "dataSources">;
947
+ export type IdsDataSourceParams = Omit<BlazeDataSourceType, "sourceType" | "labels" | "recommendations" | "labelsPriority" | "maxItems" | "text" | "dataSources">;
948
+ export type RecommendationsDataSourceParams = Omit<BlazeDataSourceType, "sourceType" | "ids" | "labels" | "text" | "dataSources">;
949
+ export type TextDataSourceParams = Omit<BlazeDataSourceType, "sourceType" | "ids" | "recommendations" | "labels" | "labelsPriority" | "dataSources">;
950
+ export interface CompositeDataSourceParams {
951
+ dataSources: {
952
+ dataSource: BlazeDataSourceType;
953
+ config?: Partial<BlazeCompositeDataSourceConfig>;
954
+ }[];
909
955
  }
910
- export type LabelsDataSourceParams = Omit<BlazeDataSourceType, "sourceType" | "ids" | "recommendations">;
911
- export type IdsDataSourceParams = Omit<BlazeDataSourceType, "sourceType" | "labels" | "recommendations" | "labelsPriority" | "maxItems" | "text">;
912
- export type RecommendationsDataSourceParams = Omit<BlazeDataSourceType, "sourceType" | "ids" | "labels" | "text">;
913
- export type TextDataSourceParams = Omit<BlazeDataSourceType, "sourceType" | "ids" | "recommendations" | "labels" | "labelsPriority">;
914
956
  export type BaseBlazeIcons = {
915
957
  play: string;
916
958
  pause: string;