@tivio/sdk-react 4.4.0 → 4.4.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/README.md CHANGED
@@ -6,6 +6,9 @@ settings in the administration of Tivio Studio while having the freedom to build
6
6
 
7
7
  ## Changelog
8
8
 
9
+ * v4.4.1
10
+ * patch: added waitForTags param in useSearch hook for videos
11
+
9
12
  * v4.4.0
10
13
  * minor: PrimaryButton component props type set to any for now
11
14
  * patch: isPurchasableAsVoucher added to PurchasableMonetization
package/README.md.bak CHANGED
@@ -6,6 +6,9 @@ settings in the administration of Tivio Studio while having the freedom to build
6
6
 
7
7
  ## Changelog
8
8
 
9
+ * v4.4.1
10
+ * patch: added waitForTags param in useSearch hook for videos
11
+
9
12
  * v4.4.0
10
13
  * minor: PrimaryButton component props type set to any for now
11
14
  * patch: isPurchasableAsVoucher added to PurchasableMonetization
package/dist/index.d.ts CHANGED
@@ -2633,6 +2633,10 @@ export declare type User = {
2633
2633
  * Returns "active" (non-expired) subscription purchases
2634
2634
  */
2635
2635
  purchasedSubscriptions: Purchase[];
2636
+ /**
2637
+ * Returns last expired subscription which user can renew or undefined
2638
+ */
2639
+ extendableSubscription?: Purchase;
2636
2640
  isPurchasesInitialized: boolean;
2637
2641
  isSignedIn: boolean;
2638
2642
  email?: string;
@@ -2668,7 +2672,7 @@ export declare enum UserType {
2668
2672
  /**
2669
2673
  * @public
2670
2674
  */
2671
- export declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, options?: UseSearchOptions) => {
2675
+ export declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, options?: UseSearchOptions<T>) => {
2672
2676
  search: (query: string) => void;
2673
2677
  pagination: Omit<PaginationInterface<UseSearchResult<T>>, 'loading'> | null;
2674
2678
  error: Error | null;
@@ -2687,15 +2691,26 @@ export declare const useSearch: UseSearch;
2687
2691
  /**
2688
2692
  * @public
2689
2693
  */
2690
- export declare type UseSearchOptions = PaginationOptions & Partial<{
2691
- minQueryLength: number;
2692
- }>;
2694
+ export declare type UseSearchOptions<T extends ALGOLIA_INDEX_NAME = any> = PaginationOptions & {
2695
+ minQueryLength?: number;
2696
+ } & (T extends ALGOLIA_INDEX_NAME.VIDEOS ? UseSearchVideoOptions : {});
2693
2697
 
2694
2698
  /**
2695
2699
  * @public
2696
2700
  */
2697
2701
  export declare type UseSearchResult<T extends ALGOLIA_INDEX_NAME> = T extends ALGOLIA_INDEX_NAME.VIDEOS ? Video : T extends ALGOLIA_INDEX_NAME.TAGS ? Tag : T extends ALGOLIA_INDEX_NAME.TV_CHANNELS ? TvChannel : unknown;
2698
2702
 
2703
+ /**
2704
+ * @public
2705
+ */
2706
+ export declare type UseSearchVideoOptions = {
2707
+ /**
2708
+ * If true video tags are awaited before loading is over.
2709
+ * Otherwise, only videos are awaited.
2710
+ */
2711
+ waitForTags?: boolean;
2712
+ };
2713
+
2699
2714
  /**
2700
2715
  * @public
2701
2716
  */