@tivio/sdk-react 3.2.3 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -0
- package/README.md.bak +5 -0
- package/dist/components/hooks/index.d.ts +1 -0
- package/dist/components/hooks/useApplyInviteCode.d.ts +6 -0
- package/dist/components/hooks/usePurchaseRecovery.d.ts +1 -6
- package/dist/components/hooks/useVoucher.d.ts +10 -1
- package/dist/index.js +1 -1
- package/dist/types/bundle.types.d.ts +7 -1
- package/doc/changelog.md +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## Changelog
|
4
4
|
|
5
|
+
* v3.2.4
|
6
|
+
* minor: added useApplyInviteCode
|
7
|
+
* minor: better errors from useVoucher
|
8
|
+
* v3.2.3
|
9
|
+
* minor: added usePurchaseRecovery hook
|
5
10
|
* patch: deprecated `useLastVideoByWidgetId`
|
6
11
|
* v3.2.2
|
7
12
|
* minor: useRowsInScreen, useItemsInRow, useTaggedVideos - hasNextPage and loading added to pagination
|
package/README.md.bak
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## Changelog
|
4
4
|
|
5
|
+
* v3.2.4
|
6
|
+
* minor: added useApplyInviteCode
|
7
|
+
* minor: better errors from useVoucher
|
8
|
+
* v3.2.3
|
9
|
+
* minor: added usePurchaseRecovery hook
|
5
10
|
* patch: deprecated `useLastVideoByWidgetId`
|
6
11
|
* v3.2.2
|
7
12
|
* minor: useRowsInScreen, useItemsInRow, useTaggedVideos - hasNextPage and loading added to pagination
|
@@ -2,10 +2,5 @@ export declare function usePurchaseRecovery(): {
|
|
2
2
|
purchaseRecoveryResult?: string | undefined;
|
3
3
|
loading: boolean;
|
4
4
|
error?: any;
|
5
|
-
purchaseRecovery: (monetizationId: string) =>
|
6
|
-
} | {
|
7
|
-
purchaseRecoveryResult: undefined;
|
8
|
-
loading: true;
|
9
|
-
error: undefined;
|
10
|
-
purchaseRecovery: () => void;
|
5
|
+
purchaseRecovery: (monetizationId: string) => void;
|
11
6
|
};
|
@@ -1,3 +1,8 @@
|
|
1
|
+
export declare type BadRequestError = Error & {
|
2
|
+
details?: {
|
3
|
+
reason?: 'DOES_NOT_EXIST' | 'EXPIRED' | 'ALREADY_USED';
|
4
|
+
};
|
5
|
+
};
|
1
6
|
/**
|
2
7
|
* TODO: Should be in core-js, we can't import types from it, though.
|
3
8
|
*/
|
@@ -11,6 +16,10 @@ declare type Voucher = {
|
|
11
16
|
declare const useVoucher: (voucherId: string) => {
|
12
17
|
activate: (() => Promise<void>) | null;
|
13
18
|
voucher: Voucher | null;
|
14
|
-
|
19
|
+
/**
|
20
|
+
* You can check error.details if you need to know error type when you want your own error messages
|
21
|
+
* (can be one of "DOES_NOT_EXIST", "EXPIRED" and "ALREADY_USED").
|
22
|
+
*/
|
23
|
+
error: Error | BadRequestError | null;
|
15
24
|
};
|
16
25
|
export { useVoucher, };
|