@tivio/sdk-react 3.2.5 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/README.md.bak +5 -4
- 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.js +1 -1
- package/dist/services/login.d.ts +8 -1
- package/dist/types/bundle.types.d.ts +13 -2
- package/package.json +2 -3
- package/doc/changelog.md +0 -0
    
        package/README.md
    CHANGED
    
    | @@ -2,10 +2,11 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            ## Changelog
         | 
| 4 4 |  | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 5 | 
            +
            * v3.3.0
         | 
| 6 | 
            +
              * minor: Add getPlayerCapabilities to getters.
         | 
| 7 | 
            +
              * patch: Added option to log out via `setUser(null)`, requires @tivio/core-react-dom@2.17.9
         | 
| 7 8 | 
             
            * v3.2.5
         | 
| 8 | 
            -
              *  | 
| 9 | 
            +
              * patch: added recovery flag to QerkoPaymentInfo type
         | 
| 9 10 | 
             
              * patch: bundle.types changes - internal.components.WebVideoScreen
         | 
| 10 11 | 
             
              * patch: types changes - add new onBack prop to WebPlayerProps
         | 
| 11 12 | 
             
              * patch: Refactor useVideo hook, now uses hook from core-react
         | 
| @@ -152,7 +153,7 @@ import { setUser } from '@tivio/sdk-react' | |
| 152 153 | 
             
            await setUser('userId', { token: 'xxx'})
         | 
| 153 154 |  | 
| 154 155 | 
             
            // Log out
         | 
| 155 | 
            -
            await setUser( | 
| 156 | 
            +
            await setUser(null)
         | 
| 156 157 | 
             
            ```
         | 
| 157 158 |  | 
| 158 159 | 
             
            ## Tivio widget
         | 
    
        package/README.md.bak
    CHANGED
    
    | @@ -2,10 +2,11 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            ## Changelog
         | 
| 4 4 |  | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 5 | 
            +
            * v3.3.0
         | 
| 6 | 
            +
              * minor: Add getPlayerCapabilities to getters.
         | 
| 7 | 
            +
              * patch: Added option to log out via `setUser(null)`, requires @tivio/core-react-dom@2.17.9
         | 
| 7 8 | 
             
            * v3.2.5
         | 
| 8 | 
            -
              *  | 
| 9 | 
            +
              * patch: added recovery flag to QerkoPaymentInfo type
         | 
| 9 10 | 
             
              * patch: bundle.types changes - internal.components.WebVideoScreen
         | 
| 10 11 | 
             
              * patch: types changes - add new onBack prop to WebPlayerProps
         | 
| 11 12 | 
             
              * patch: Refactor useVideo hook, now uses hook from core-react
         | 
| @@ -156,7 +157,7 @@ import { setUser } from '@tivio/sdk-react' | |
| 156 157 | 
             
            await setUser('userId', { token: 'xxx'})
         | 
| 157 158 |  | 
| 158 159 | 
             
            // Log out
         | 
| 159 | 
            -
            await setUser( | 
| 160 | 
            +
            await setUser(null)
         | 
| 160 161 | 
             
            ```
         | 
| 161 162 |  | 
| 162 163 | 
             
            ## Tivio widget
         | 
| @@ -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, };
         |