@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/dist/services/login.d.ts
CHANGED
@@ -1,2 +1,9 @@
|
|
1
1
|
import type { UserPayload } from '../types/bundle.types';
|
2
|
-
|
2
|
+
/**
|
3
|
+
* Set user to sign in/out.
|
4
|
+
*
|
5
|
+
* Sign in - setUser('userID', { token: 'xxx' })
|
6
|
+
* Sign out - setUser(null)
|
7
|
+
*/
|
8
|
+
declare const setUser: (userId: string | null, payload: UserPayload) => Promise<void>;
|
9
|
+
export { setUser };
|
@@ -181,6 +181,11 @@ declare type TivioGetters = {
|
|
181
181
|
* @returns {Promise<Widget | null>} widget or null if widget does not exists
|
182
182
|
*/
|
183
183
|
getWidgetById: (widgetId: string) => Promise<Widget | null>;
|
184
|
+
/**
|
185
|
+
* Get player capabilities based on user's browser and OS as resolved by Tivio.
|
186
|
+
* @returns PlayerCapability[]
|
187
|
+
*/
|
188
|
+
getPlayerCapabilities: () => PlayerCapability[];
|
184
189
|
};
|
185
190
|
interface TivioAuth {
|
186
191
|
changePassword: (newPassword: string) => Promise<void>;
|
@@ -326,7 +331,7 @@ declare type TivioBundle = {
|
|
326
331
|
}) => Promise<QerkoPaymentInfo>;
|
327
332
|
cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
|
328
333
|
setLanguage: (language: Language) => void;
|
329
|
-
setUser: (userId: string, userPayload: UserPayload
|
334
|
+
setUser: (userId: string | null, userPayload: UserPayload) => Promise<void>;
|
330
335
|
sources: TivioSources;
|
331
336
|
subscriptions: TivioSubscriptions;
|
332
337
|
internal: {
|
@@ -409,4 +414,10 @@ declare type RemoteBundleState = {
|
|
409
414
|
settings: Settings;
|
410
415
|
state: 'loading' | 'error' | 'ready';
|
411
416
|
} & Nullable<TivioBundle>;
|
412
|
-
|
417
|
+
/**
|
418
|
+
* TODO: Duplicate, because we can't import types from core-js.
|
419
|
+
*/
|
420
|
+
declare type NewVoucher = {
|
421
|
+
expirationDate: Date | number;
|
422
|
+
};
|
423
|
+
export type { RemoteBundleState, Config, Settings, InternalConfig, TivioBundle, TivioBundleFile, TivioHooks, TivioComponents, TivioAuth, TivioGetters, TivioSubscriptions, TivioInternalComponents, TivioInternalHooks, TivioInternalProviders, Events, PubSub, PlayerCapability, Currency, AuthOverlayState, AuthOverlayType, SubscriptionOverlayData, SubscriptionOverlayState, QerkoData, QerkoOverlayState, NewVoucher, };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.3.0",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"typings": "dist/index.d.ts",
|
6
6
|
"source": "src/index.ts",
|
@@ -15,7 +15,6 @@
|
|
15
15
|
"start": "yarn ts-node ./scripts/start.ts",
|
16
16
|
"test": "jest --config=./jest.config.js --coverage",
|
17
17
|
"clean": "rm -rf dist",
|
18
|
-
"prepublishOnly": "yarn && yarn run build && yarn ts-node ./scripts/prepublish.ts",
|
19
18
|
"postpublish": "yarn ts-node ./scripts/postpublish.ts",
|
20
19
|
"publish:alpha": "npm publish --tag alpha",
|
21
20
|
"check:cycles": "npx madge --circular src/**/*"
|
@@ -28,7 +27,7 @@
|
|
28
27
|
"@material-ui/core": "^4.11.2",
|
29
28
|
"@material-ui/icons": "^4.11.2",
|
30
29
|
"@sentry/browser": "^6.1.0",
|
31
|
-
"@tivio/common": "1.1.
|
30
|
+
"@tivio/common": "1.1.82",
|
32
31
|
"es7-object-polyfill": "^1.0.1",
|
33
32
|
"firebase": "^8.2.3",
|
34
33
|
"formik": "^2.2.7",
|
package/doc/changelog.md
DELETED
File without changes
|