@tivio/sdk-react 3.2.4 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +11 -1
- package/README.md.bak +11 -1
- package/dist/components/ContextProvider.d.ts +1 -2
- package/dist/components/TivioProvider.d.ts +1 -2
- package/dist/components/hooks/contentHooks.d.ts +1 -1
- package/dist/components/hooks/usePurchaseSubscription.d.ts +1 -1
- package/dist/components/hooks/useScreen.d.ts +3 -5
- package/dist/components/hooks/useTransactionPayment.d.ts +1 -6
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/services/bundleLoader.d.ts +1 -2
- package/dist/services/bundlePromise.d.ts +1 -1
- package/dist/services/login.d.ts +8 -1
- package/dist/types/bundle.types.d.ts +27 -5
- package/dist/types/types.d.ts +5 -15
- package/package.json +2 -2
package/README.md
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
|
3
3
|
## Changelog
|
4
4
|
|
5
|
+
* v3.3.1
|
6
|
+
* patch: Fixed types of `setUser`
|
7
|
+
* v3.3.0
|
8
|
+
* minor: Add getPlayerCapabilities to getters.
|
9
|
+
* patch: Added option to log out via `setUser(null)`, requires @tivio/core-react-dom@2.17.9
|
10
|
+
* v3.2.5
|
11
|
+
* patch: added recovery flag to QerkoPaymentInfo type
|
12
|
+
* patch: bundle.types changes - internal.components.WebVideoScreen
|
13
|
+
* patch: types changes - add new onBack prop to WebPlayerProps
|
14
|
+
* patch: Refactor useVideo hook, now uses hook from core-react
|
5
15
|
* v3.2.4
|
6
16
|
* minor: added useApplyInviteCode
|
7
17
|
* minor: better errors from useVoucher
|
@@ -145,7 +155,7 @@ import { setUser } from '@tivio/sdk-react'
|
|
145
155
|
await setUser('userId', { token: 'xxx'})
|
146
156
|
|
147
157
|
// Log out
|
148
|
-
await setUser(
|
158
|
+
await setUser(null)
|
149
159
|
```
|
150
160
|
|
151
161
|
## Tivio widget
|
package/README.md.bak
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
|
3
3
|
## Changelog
|
4
4
|
|
5
|
+
* v3.3.1
|
6
|
+
* patch: Fixed types of `setUser`
|
7
|
+
* v3.3.0
|
8
|
+
* minor: Add getPlayerCapabilities to getters.
|
9
|
+
* patch: Added option to log out via `setUser(null)`, requires @tivio/core-react-dom@2.17.9
|
10
|
+
* v3.2.5
|
11
|
+
* patch: added recovery flag to QerkoPaymentInfo type
|
12
|
+
* patch: bundle.types changes - internal.components.WebVideoScreen
|
13
|
+
* patch: types changes - add new onBack prop to WebPlayerProps
|
14
|
+
* patch: Refactor useVideo hook, now uses hook from core-react
|
5
15
|
* v3.2.4
|
6
16
|
* minor: added useApplyInviteCode
|
7
17
|
* minor: better errors from useVoucher
|
@@ -149,7 +159,7 @@ import { setUser } from '@tivio/sdk-react'
|
|
149
159
|
await setUser('userId', { token: 'xxx'})
|
150
160
|
|
151
161
|
// Log out
|
152
|
-
await setUser(
|
162
|
+
await setUser(null)
|
153
163
|
```
|
154
164
|
|
155
165
|
## Tivio widget
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { RemoteBundleState } from '../
|
2
|
+
import type { RemoteBundleState } from '../types/bundle.types';
|
3
3
|
interface Props {
|
4
4
|
bundleState: RemoteBundleState;
|
5
|
-
children: any;
|
6
5
|
}
|
7
6
|
declare const ContextProvider: React.FC<Props>;
|
8
7
|
export { ContextProvider, };
|
@@ -3,8 +3,7 @@
|
|
3
3
|
* nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
4
4
|
*/
|
5
5
|
import React from 'react';
|
6
|
-
import { RemoteBundleState } from '../
|
7
|
-
import { Config } from '../types/bundle.types';
|
6
|
+
import type { Config, RemoteBundleState } from '../types/bundle.types';
|
8
7
|
export declare type TivioProviderProps = {
|
9
8
|
/**
|
10
9
|
* This prop must be set only once and not change value afterwards
|
@@ -29,8 +29,8 @@ declare const useSection: (sectionId: string) => {
|
|
29
29
|
* @param videoId - video id
|
30
30
|
*/
|
31
31
|
declare const useVideo: (videoId?: string | undefined) => {
|
32
|
-
error: string | null;
|
33
32
|
data: Video | null;
|
33
|
+
error: string | null;
|
34
34
|
};
|
35
35
|
/**
|
36
36
|
* Use videos in section
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { QerkoTransaction } from '@tivio/common';
|
2
|
-
import { NewVoucher } from '
|
2
|
+
import { NewVoucher } from '../../types/bundle.types';
|
3
3
|
declare const usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
|
4
4
|
export { usePurchaseSubscription, };
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import { ScreenOptions } from '@tivio/common';
|
2
2
|
/**
|
3
|
+
* @deprecated
|
4
|
+
*
|
3
5
|
* Use app screen
|
4
6
|
* @param screenId - screen ID
|
5
7
|
* @param options - subscribe to screen options
|
6
8
|
*/
|
7
|
-
declare const useScreen: (screenId: string, options?: ScreenOptions | undefined) =>
|
8
|
-
error: Error | null;
|
9
|
-
data: import("@tivio/common").Screen | null;
|
10
|
-
isLoading: boolean;
|
11
|
-
};
|
9
|
+
declare const useScreen: (screenId: string, options?: ScreenOptions | undefined) => never;
|
12
10
|
export { useScreen, };
|
@@ -1,10 +1,5 @@
|
|
1
1
|
import { QerkoTransaction } from '@tivio/common';
|
2
|
-
|
3
|
-
* TODO: Duplicate, because we can't import types from core-js.
|
4
|
-
*/
|
5
|
-
declare type NewVoucher = {
|
6
|
-
expirationDate: Date | number;
|
7
|
-
};
|
2
|
+
import { NewVoucher } from '../../types/bundle.types';
|
8
3
|
declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
|
9
4
|
export { useTransactionPayment, };
|
10
5
|
export type { NewVoucher, };
|
package/dist/index.d.ts
CHANGED
@@ -16,6 +16,5 @@ export * from './types/types';
|
|
16
16
|
export { Disposer } from './types/common';
|
17
17
|
export { Empty } from './types/common';
|
18
18
|
export { Nullable } from './types/common';
|
19
|
-
export
|
20
|
-
export { TivioBundle, TivioHooks, TivioComponents, TivioAuth, TivioGetters, TivioSubscriptions, PlayerCapability, Currency, TivioInternalHooks, TivioInternalProviders, } from './types/bundle.types';
|
19
|
+
export * from './types/bundle.types';
|
21
20
|
export { setUser } from './services/login';
|