@tivio/sdk-react 4.4.0 → 4.4.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -0
- package/README.md.bak +3 -0
- package/dist/index.d.ts +19 -4
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +19 -4
- package/package.json +2 -2
package/dist/sdk-react.d.ts
CHANGED
@@ -2883,6 +2883,10 @@ export declare type User = {
|
|
2883
2883
|
* Returns "active" (non-expired) subscription purchases
|
2884
2884
|
*/
|
2885
2885
|
purchasedSubscriptions: Purchase[];
|
2886
|
+
/**
|
2887
|
+
* Returns last expired subscription which user can renew or undefined
|
2888
|
+
*/
|
2889
|
+
extendableSubscription?: Purchase;
|
2886
2890
|
isPurchasesInitialized: boolean;
|
2887
2891
|
isSignedIn: boolean;
|
2888
2892
|
email?: string;
|
@@ -2918,7 +2922,7 @@ export declare enum UserType {
|
|
2918
2922
|
/**
|
2919
2923
|
* @public
|
2920
2924
|
*/
|
2921
|
-
export declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, options?: UseSearchOptions) => {
|
2925
|
+
export declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, options?: UseSearchOptions<T>) => {
|
2922
2926
|
search: (query: string) => void;
|
2923
2927
|
pagination: Omit<PaginationInterface<UseSearchResult<T>>, 'loading'> | null;
|
2924
2928
|
error: Error | null;
|
@@ -2937,15 +2941,26 @@ export declare const useSearch: UseSearch;
|
|
2937
2941
|
/**
|
2938
2942
|
* @public
|
2939
2943
|
*/
|
2940
|
-
export declare type UseSearchOptions = PaginationOptions &
|
2941
|
-
minQueryLength
|
2942
|
-
}
|
2944
|
+
export declare type UseSearchOptions<T extends ALGOLIA_INDEX_NAME = any> = PaginationOptions & {
|
2945
|
+
minQueryLength?: number;
|
2946
|
+
} & (T extends ALGOLIA_INDEX_NAME.VIDEOS ? UseSearchVideoOptions : {});
|
2943
2947
|
|
2944
2948
|
/**
|
2945
2949
|
* @public
|
2946
2950
|
*/
|
2947
2951
|
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;
|
2948
2952
|
|
2953
|
+
/**
|
2954
|
+
* @public
|
2955
|
+
*/
|
2956
|
+
export declare type UseSearchVideoOptions = {
|
2957
|
+
/**
|
2958
|
+
* If true video tags are awaited before loading is over.
|
2959
|
+
* Otherwise, only videos are awaited.
|
2960
|
+
*/
|
2961
|
+
waitForTags?: boolean;
|
2962
|
+
};
|
2963
|
+
|
2949
2964
|
/**
|
2950
2965
|
* @public
|
2951
2966
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "4.4.
|
3
|
+
"version": "4.4.1",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"typings": "dist/index.d.ts",
|
6
6
|
"source": "src/index.ts",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"@material-ui/core": "^4.11.2",
|
31
31
|
"@material-ui/icons": "^4.11.2",
|
32
32
|
"@sentry/browser": "^6.1.0",
|
33
|
-
"@tivio/common": "1.1.
|
33
|
+
"@tivio/common": "1.1.101",
|
34
34
|
"dayjs": "^1.11.0",
|
35
35
|
"es7-object-polyfill": "^1.0.1",
|
36
36
|
"firebase": "8.10.1",
|