@tivio/sdk-react 3.3.2 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.madgerc +7 -0
- package/README.md +9 -1
- package/README.md.bak +9 -5
- package/dist/components/hooks/index.d.ts +1 -0
- package/dist/components/hooks/useApplyInviteCode.d.ts +12 -1
- package/dist/components/hooks/useIsMonetizationPurchased.d.ts +3 -0
- package/dist/components/hooks/usePurchaseRecovery.d.ts +9 -1
- package/dist/components/hooks/useUser.d.ts +1 -0
- package/dist/components/hooks/useVoucher.d.ts +18 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/services/gdpr.d.ts +1 -0
- package/dist/types/bundle.types.d.ts +37 -19
- package/dist/types/types.d.ts +6 -7
- package/doc/changelog.md +0 -0
- package/package.json +5 -8
package/.madgerc
ADDED
package/README.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## Changelog
|
4
4
|
|
5
|
+
* UNRELEASED
|
6
|
+
|
7
|
+
* v3.4.0
|
8
|
+
* minor: more precise type for errors in usePurchaseRecovery and usePurchaseRecovery
|
9
|
+
* patch: jsdocs for usePurchaseRecovery and usePurchaseRecovery
|
10
|
+
* minor: inviteCodeReset in useApplyInviteCode
|
11
|
+
* minor: Reset forgotten password
|
12
|
+
* minor: Consolidating monetization logic
|
5
13
|
* v3.3.2
|
6
14
|
* patch: Adding new optional parameters (where, orderBy) to useTaggedVideos hook
|
7
15
|
* v3.3.1
|
@@ -29,7 +37,7 @@
|
|
29
37
|
* patch: fix of @tivio/common version
|
30
38
|
* v3.2.0
|
31
39
|
* minor: Added `capabilitiesOptions` for finer configuration of device capabilities
|
32
|
-
* minor: tag names are returned in correct language (the one from tivio config); language value should be one from enum "
|
40
|
+
* minor: tag names are returned in correct language (the one from tivio config); language value should be one from enum "LangCode"
|
33
41
|
* v3.1.3
|
34
42
|
* patch: Hotfix made sure disabled Tivio does not break React Native
|
35
43
|
* v3.1.2
|
package/README.md.bak
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## Changelog
|
4
4
|
|
5
|
+
* UNRELEASED
|
6
|
+
|
7
|
+
* v3.4.0
|
8
|
+
* minor: more precise type for errors in usePurchaseRecovery and usePurchaseRecovery
|
9
|
+
* patch: jsdocs for usePurchaseRecovery and usePurchaseRecovery
|
10
|
+
* minor: inviteCodeReset in useApplyInviteCode
|
11
|
+
* minor: Reset forgotten password
|
12
|
+
* minor: Consolidating monetization logic
|
5
13
|
* v3.3.2
|
6
14
|
* patch: Adding new optional parameters (where, orderBy) to useTaggedVideos hook
|
7
15
|
* v3.3.1
|
@@ -29,19 +37,15 @@
|
|
29
37
|
* patch: fix of @tivio/common version
|
30
38
|
* v3.2.0
|
31
39
|
* minor: Added `capabilitiesOptions` for finer configuration of device capabilities
|
32
|
-
* minor: tag names are returned in correct language (the one from tivio config); language value should be one from enum "
|
40
|
+
* minor: tag names are returned in correct language (the one from tivio config); language value should be one from enum "LangCode"
|
33
41
|
* v3.1.3
|
34
42
|
* patch: Hotfix made sure disabled Tivio does not break React Native
|
35
|
-
* internal: Fixed conf.bundleUrlOverride error handling
|
36
43
|
* v3.1.2
|
37
44
|
* patch: Allow `conf` prop of `TivioProvider` to be `null` or `undefined` in order to turn off Tivio
|
38
|
-
* internal: Added `runFeatureSupportCheck` to `TivioProvider`
|
39
45
|
* v3.1.1
|
40
46
|
* patch: fixed `setUser()` crash when bundle fails to load
|
41
47
|
* v3.1.0
|
42
|
-
* internal: refactored `useAd`, `useAdSegment`
|
43
48
|
* patch: `useAdSegment()` now returns null if no monetization is configured, ad segments are not managed in that situation
|
44
|
-
* internal: fixed refactored `setUser()`
|
45
49
|
* minor: enriched `AdSegment` type from `useAdSegment()`
|
46
50
|
* minor: Added `setUser()` function for login and logout
|
47
51
|
* v3.0.0
|
@@ -11,6 +11,7 @@ export * from './usePurchaseSubscription';
|
|
11
11
|
export * from './contentHooks';
|
12
12
|
export * from './playerHooks';
|
13
13
|
export * from './useOrganizationSubscriptions';
|
14
|
+
export * from './useIsMonetizationPurchased';
|
14
15
|
export * from './usePurchasesWithVideos';
|
15
16
|
export * from './useFreePurchase';
|
16
17
|
export * from './useRowsInScreen';
|
@@ -1,6 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* Is used to login user through different device in which user is already logged in.
|
3
|
+
* (e.g. login in tv app through web app)
|
4
|
+
*
|
5
|
+
* @return applyInviteCodeResult - true if code was applied successfully, false otherwise.
|
6
|
+
* loading - loading state
|
7
|
+
* error - error in case request failure
|
8
|
+
* applyInviteCode - function to apply invite code
|
9
|
+
* inviteCodeReset - function to reset to initial state
|
10
|
+
*/
|
1
11
|
export declare function useApplyInviteCode(): {
|
2
12
|
applyInviteCodeResult?: boolean | undefined;
|
3
13
|
loading: boolean;
|
4
|
-
error?:
|
14
|
+
error?: import("../..").GenericOnCallError | undefined;
|
5
15
|
applyInviteCode: (code: string) => void;
|
16
|
+
inviteCodeReset: () => void;
|
6
17
|
};
|
@@ -1,6 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Is used to mark purchase in recovery state as PAID.
|
3
|
+
*
|
4
|
+
* @return purchaseRecoveryResult - message describing result of the recovery
|
5
|
+
* loading - loading state
|
6
|
+
* error - error in case request failure
|
7
|
+
* purchaseRecovery - functions to execute purchase recovery
|
8
|
+
*/
|
1
9
|
export declare function usePurchaseRecovery(): {
|
2
10
|
purchaseRecoveryResult?: string | undefined;
|
3
11
|
loading: boolean;
|
4
|
-
error?:
|
12
|
+
error?: import("../..").GenericOnCallError | undefined;
|
5
13
|
purchaseRecovery: (monetizationId: string) => void;
|
6
14
|
};
|
@@ -11,7 +11,20 @@ declare type Voucher = {
|
|
11
11
|
isUsed: boolean;
|
12
12
|
isExpired: boolean;
|
13
13
|
status: 'NEW' | 'USED';
|
14
|
-
voucherInfo:
|
14
|
+
voucherInfo: SubscriptionInfo | TransactionInfo;
|
15
|
+
};
|
16
|
+
declare type SubscriptionInfo = {
|
17
|
+
type: 'subscription';
|
18
|
+
name: string;
|
19
|
+
benefits: string[];
|
20
|
+
frequency: string;
|
21
|
+
};
|
22
|
+
declare type TransactionInfo = {
|
23
|
+
type: 'transaction';
|
24
|
+
name: string;
|
25
|
+
videoId: string;
|
26
|
+
cover: string;
|
27
|
+
description: string;
|
15
28
|
};
|
16
29
|
declare const useVoucher: (voucherId: string) => {
|
17
30
|
activate: (() => Promise<void>) | null;
|
@@ -21,5 +34,9 @@ declare const useVoucher: (voucherId: string) => {
|
|
21
34
|
* (can be one of "DOES_NOT_EXIST", "EXPIRED" and "ALREADY_USED").
|
22
35
|
*/
|
23
36
|
error: Error | BadRequestError | null;
|
37
|
+
/**
|
38
|
+
* True if voucher has been successfully activated in current session.
|
39
|
+
*/
|
40
|
+
activationSuccess: boolean;
|
24
41
|
};
|
25
42
|
export { useVoucher, };
|
package/dist/index.d.ts
CHANGED