@tivio/sdk-react 3.3.2 → 3.5.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.madgerc +7 -0
- package/README.md +15 -6
- package/README.md.bak +15 -10
- 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 -2
- package/dist/services/dependencyResolver.d.ts +2 -2
- 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 +6 -8
- package/dist/index.js.LICENSE.txt +0 -3
package/.madgerc
ADDED
package/README.md
CHANGED
@@ -2,6 +2,19 @@
|
|
2
2
|
|
3
3
|
## Changelog
|
4
4
|
|
5
|
+
* 3.5.1
|
6
|
+
* patch: remove incorrect dependency (@tivio/types)
|
7
|
+
|
8
|
+
* 3.5.0
|
9
|
+
* minor: Types change - Video.price and Video.detailedPrice can be null
|
10
|
+
* minor: Types change - Video.cover is marked as deprecated
|
11
|
+
|
12
|
+
* v3.4.0
|
13
|
+
* minor: more precise type for errors in usePurchaseRecovery and usePurchaseRecovery
|
14
|
+
* patch: jsdocs for usePurchaseRecovery and usePurchaseRecovery
|
15
|
+
* minor: inviteCodeReset in useApplyInviteCode
|
16
|
+
* minor: Reset forgotten password
|
17
|
+
* minor: Consolidating monetization logic
|
5
18
|
* v3.3.2
|
6
19
|
* patch: Adding new optional parameters (where, orderBy) to useTaggedVideos hook
|
7
20
|
* v3.3.1
|
@@ -29,7 +42,7 @@
|
|
29
42
|
* patch: fix of @tivio/common version
|
30
43
|
* v3.2.0
|
31
44
|
* 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 "
|
45
|
+
* minor: tag names are returned in correct language (the one from tivio config); language value should be one from enum "LangCode"
|
33
46
|
* v3.1.3
|
34
47
|
* patch: Hotfix made sure disabled Tivio does not break React Native
|
35
48
|
* v3.1.2
|
@@ -531,8 +544,4 @@ useTaggedItems: (tagIds: string[], {limit?: number, noLimit?: boolean, fecthTags
|
|
531
544
|
error: Error | null
|
532
545
|
data: PaginationData<Video> | null
|
533
546
|
}
|
534
|
-
|
535
|
-
|
536
|
-
# Deprecations
|
537
|
-
- Video.url will be removed in version 3.0.0, use Video.uri attribute instead
|
538
|
-
- Video.cover will be removed in version 3.0.0, use Video.assets attribute instead
|
547
|
+
```
|
package/README.md.bak
CHANGED
@@ -2,6 +2,19 @@
|
|
2
2
|
|
3
3
|
## Changelog
|
4
4
|
|
5
|
+
* 3.5.1
|
6
|
+
* patch: remove incorrect dependency (@tivio/types)
|
7
|
+
|
8
|
+
* 3.5.0
|
9
|
+
* minor: Types change - Video.price and Video.detailedPrice can be null
|
10
|
+
* minor: Types change - Video.cover is marked as deprecated
|
11
|
+
|
12
|
+
* v3.4.0
|
13
|
+
* minor: more precise type for errors in usePurchaseRecovery and usePurchaseRecovery
|
14
|
+
* patch: jsdocs for usePurchaseRecovery and usePurchaseRecovery
|
15
|
+
* minor: inviteCodeReset in useApplyInviteCode
|
16
|
+
* minor: Reset forgotten password
|
17
|
+
* minor: Consolidating monetization logic
|
5
18
|
* v3.3.2
|
6
19
|
* patch: Adding new optional parameters (where, orderBy) to useTaggedVideos hook
|
7
20
|
* v3.3.1
|
@@ -29,19 +42,15 @@
|
|
29
42
|
* patch: fix of @tivio/common version
|
30
43
|
* v3.2.0
|
31
44
|
* 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 "
|
45
|
+
* minor: tag names are returned in correct language (the one from tivio config); language value should be one from enum "LangCode"
|
33
46
|
* v3.1.3
|
34
47
|
* patch: Hotfix made sure disabled Tivio does not break React Native
|
35
|
-
* internal: Fixed conf.bundleUrlOverride error handling
|
36
48
|
* v3.1.2
|
37
49
|
* patch: Allow `conf` prop of `TivioProvider` to be `null` or `undefined` in order to turn off Tivio
|
38
|
-
* internal: Added `runFeatureSupportCheck` to `TivioProvider`
|
39
50
|
* v3.1.1
|
40
51
|
* patch: fixed `setUser()` crash when bundle fails to load
|
41
52
|
* v3.1.0
|
42
|
-
* internal: refactored `useAd`, `useAdSegment`
|
43
53
|
* patch: `useAdSegment()` now returns null if no monetization is configured, ad segments are not managed in that situation
|
44
|
-
* internal: fixed refactored `setUser()`
|
45
54
|
* minor: enriched `AdSegment` type from `useAdSegment()`
|
46
55
|
* minor: Added `setUser()` function for login and logout
|
47
56
|
* v3.0.0
|
@@ -535,8 +544,4 @@ useTaggedItems: (tagIds: string[], {limit?: number, noLimit?: boolean, fecthTags
|
|
535
544
|
error: Error | null
|
536
545
|
data: PaginationData<Video> | null
|
537
546
|
}
|
538
|
-
|
539
|
-
|
540
|
-
# Deprecations
|
541
|
-
- Video.url will be removed in version 3.0.0, use Video.uri attribute instead
|
542
|
-
- Video.cover will be removed in version 3.0.0, use Video.assets attribute instead
|
547
|
+
```
|
@@ -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