@tivio/sdk-react 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -3
- package/dist/components/hooks/playerHooks.d.ts +10 -5
- package/dist/components/hooks/usePurchaseSubscription.d.ts +2 -2
- package/dist/components/hooks/useTransactionPayment.d.ts +6 -6
- package/dist/components/hooks/useVoucher.d.ts +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/services/login.d.ts +2 -0
- package/dist/services/settings.d.ts +6 -6
- package/dist/types/bundle.types.d.ts +26 -3
- package/doc/changelog.md +0 -0
- package/package.json +2 -2
- package/package.json-e +0 -77
@@ -3,11 +3,11 @@
|
|
3
3
|
* nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
4
4
|
*/
|
5
5
|
/**
|
6
|
-
*
|
7
|
-
* So this package is responsible for settings from the beginning of the life cycle.
|
6
|
+
* @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
|
8
7
|
*/
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
export declare const createSettings: () => {
|
9
|
+
/**
|
10
|
+
* @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
|
11
|
+
*/
|
12
|
+
setUser: (userId: string, userPayload: unknown) => Promise<void>;
|
13
13
|
};
|
@@ -8,8 +8,10 @@ import type { AdSource, PlayerWrapper } from './customPlayer.types';
|
|
8
8
|
import type { Monetization, Purchase, QerkoPaymentInfo, Screen, SubscribeToItemsInRow, SubscribeToRowsInScreen, SubscribeToScreen, TvAppProps, User, UseSearch, Video } from '@tivio/common';
|
9
9
|
import type React from 'react';
|
10
10
|
declare type Settings = {
|
11
|
-
|
12
|
-
|
11
|
+
/**
|
12
|
+
* @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
|
13
|
+
*/
|
14
|
+
setUser: (userId: string, userPayload: unknown) => Promise<void>;
|
13
15
|
};
|
14
16
|
interface PlayerCapability {
|
15
17
|
codec: 'h264' | 'h265';
|
@@ -199,8 +201,28 @@ declare type TivioComponents = {
|
|
199
201
|
}>;
|
200
202
|
TvApp: React.ComponentType<TvAppProps>;
|
201
203
|
};
|
204
|
+
declare type AdSegment = {
|
205
|
+
id: string;
|
206
|
+
/**
|
207
|
+
* @deprecated alias to secondsToEnd * 1000
|
208
|
+
*/
|
209
|
+
remainingMs: number;
|
210
|
+
secondsToEnd: number;
|
211
|
+
secondsToSkippable: number | null;
|
212
|
+
canSeek: boolean;
|
213
|
+
/**
|
214
|
+
* true if is skippable and skip countdown has passed
|
215
|
+
*/
|
216
|
+
canSkip: boolean;
|
217
|
+
/**
|
218
|
+
* true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
|
219
|
+
*/
|
220
|
+
isSkippable: boolean;
|
221
|
+
skip: () => any;
|
222
|
+
};
|
202
223
|
declare type TivioHooks = {
|
203
224
|
useAd: () => [(AdSource | null)];
|
225
|
+
useAdSegment: () => AdSegment | null;
|
204
226
|
useCancelSubscription: UseCancelSubscription;
|
205
227
|
useSearch: UseSearch;
|
206
228
|
useVoucher: (voucherId: string) => any;
|
@@ -210,6 +232,7 @@ declare type TivioHooks = {
|
|
210
232
|
showPurchaseDialog: () => void;
|
211
233
|
};
|
212
234
|
};
|
235
|
+
export declare type UserPayload = Record<string, any>;
|
213
236
|
declare type TivioBundle = {
|
214
237
|
components: TivioComponents;
|
215
238
|
getters: TivioGetters;
|
@@ -224,7 +247,7 @@ declare type TivioBundle = {
|
|
224
247
|
}) => Promise<QerkoPaymentInfo>;
|
225
248
|
cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
|
226
249
|
setLanguage: (language: Language) => void;
|
227
|
-
setUser: (userId: string, userPayload
|
250
|
+
setUser: (userId: string, userPayload: UserPayload | null) => Promise<void>;
|
228
251
|
sources: TivioSources;
|
229
252
|
subscriptions: TivioSubscriptions;
|
230
253
|
};
|
package/doc/changelog.md
ADDED
File without changes
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.1.0",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"typings": "dist/index.d.ts",
|
6
6
|
"source": "src/index.ts",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"@material-ui/core": "^4.11.2",
|
28
28
|
"@material-ui/icons": "^4.11.2",
|
29
29
|
"@sentry/browser": "^6.1.0",
|
30
|
-
"@tivio/common": "1.1.
|
30
|
+
"@tivio/common": "1.1.71",
|
31
31
|
"firebase": "^8.2.3",
|
32
32
|
"formik": "^2.2.7",
|
33
33
|
"i18next": "^19.8.4",
|
package/package.json-e
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "@tivio/sdk-react",
|
3
|
-
"version": "3.0.0",
|
4
|
-
"main": "dist/index.js",
|
5
|
-
"typings": "dist/index.d.ts",
|
6
|
-
"source": "src/index.ts",
|
7
|
-
"license": "SEE LICENSE IN LICENSE.md",
|
8
|
-
"publishConfig": {
|
9
|
-
"access": "public"
|
10
|
-
},
|
11
|
-
"scripts": {
|
12
|
-
"build": "bash ./scripts/build_prod.sh",
|
13
|
-
"build:dev": "bash ./scripts/build_dev.sh",
|
14
|
-
"start": "yarn ts-node ./scripts/start.ts",
|
15
|
-
"test": "jest --config=./jest.config.js --coverage",
|
16
|
-
"clean": "rm -rf dist",
|
17
|
-
"prepublishOnly": "yarn && yarn run build && yarn ts-node ./scripts/prepublish.ts",
|
18
|
-
"postpublish": "yarn ts-node ./scripts/postpublish.ts",
|
19
|
-
"publish:alpha": "npm publish --tag alpha",
|
20
|
-
"check:cycles": "npx madge --circular src/**/*"
|
21
|
-
},
|
22
|
-
"peerDependencies": {
|
23
|
-
"react": "^17.0.0",
|
24
|
-
"react-dom": "^17.0.0"
|
25
|
-
},
|
26
|
-
"dependencies": {
|
27
|
-
"@material-ui/core": "^4.11.2",
|
28
|
-
"@material-ui/icons": "^4.11.2",
|
29
|
-
"@sentry/browser": "^6.1.0",
|
30
|
-
"@tivio/common": "*",
|
31
|
-
"firebase": "^8.2.3",
|
32
|
-
"formik": "^2.2.7",
|
33
|
-
"i18next": "^19.8.4",
|
34
|
-
"mobx": "^6.0.4",
|
35
|
-
"mobx-react": "^7.1.0",
|
36
|
-
"react-i18next": "^9.0.10",
|
37
|
-
"react-router-dom": "^5.2.0",
|
38
|
-
"react-spring": "^9.2.4",
|
39
|
-
"react-virtualized": "^9.22.3",
|
40
|
-
"styled-components": "^5.2.1",
|
41
|
-
"yup": "^0.32.9"
|
42
|
-
},
|
43
|
-
"devDependencies": {
|
44
|
-
"@testing-library/jest-dom": "^5.11.9",
|
45
|
-
"@testing-library/react": "^11.2.3",
|
46
|
-
"@testing-library/react-hooks": "^5.0.3",
|
47
|
-
"@testing-library/user-event": "^12.1.10",
|
48
|
-
"@types/jest": "^26.0.15",
|
49
|
-
"@types/node": "^12.0.0",
|
50
|
-
"@types/node-fetch": "^2.5.8",
|
51
|
-
"@types/react": "^17.0.0",
|
52
|
-
"@types/react-dom": "^17.0.0",
|
53
|
-
"@types/react-router-dom": "^5.1.6",
|
54
|
-
"@types/react-virtualized": "^9.21.13",
|
55
|
-
"@types/styled-components": "^5.1.7",
|
56
|
-
"@typescript-eslint/eslint-plugin": "^4.14.0",
|
57
|
-
"@typescript-eslint/parser": "^4.14.2",
|
58
|
-
"dotenv": "^8.2.0",
|
59
|
-
"eslint": "^7.19.0",
|
60
|
-
"jest": "^27.0.1",
|
61
|
-
"jest-cli": "^26.6.3",
|
62
|
-
"jest-fetch-mock": "^3.0.3",
|
63
|
-
"madge": "^5.0.1",
|
64
|
-
"node-fetch": "^2.6.1",
|
65
|
-
"react": "^17.0.2",
|
66
|
-
"react-dom": "^17.0.2",
|
67
|
-
"stream-browserify": "^3.0.0",
|
68
|
-
"timers-browserify": "^2.0.12",
|
69
|
-
"ts-jest": "^26.4.4",
|
70
|
-
"typescript": "^4.1.3",
|
71
|
-
"web-vitals": "^1.0.1",
|
72
|
-
"webpack": "^5.15.0",
|
73
|
-
"webpack-cli": "^4.4.0",
|
74
|
-
"webpack-merge": "^5.7.3",
|
75
|
-
"yargs": "17"
|
76
|
-
}
|
77
|
-
}
|