@tivio/sdk-react 3.2.2 → 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/README.md.bak +1 -0
- package/dist/components/hooks/index.d.ts +1 -0
- package/dist/components/hooks/useLastVideoByWidgetId.d.ts +3 -0
- package/dist/components/hooks/usePurchaseRecovery.d.ts +11 -0
- package/dist/config.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/info.d.ts +2 -0
- package/dist/services/bundleLoader.d.ts +1 -1
- package/dist/types/bundle.types.d.ts +28 -1
- package/package.json +6 -2
- package/dist/device/tizen.d.ts +0 -7
- package/doc/changelog.md +0 -0
package/dist/info.d.ts
ADDED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
|
3
3
|
* nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
4
4
|
*/
|
5
|
-
import { InternalConfig, RemoteBundleState, TivioBundle } from '
|
5
|
+
import { InternalConfig, RemoteBundleState, TivioBundle } from '../types/bundle.types';
|
6
6
|
/**
|
7
7
|
* @throws if fetch fails
|
8
8
|
*/
|
@@ -24,6 +24,10 @@ declare type InternalConfig = {
|
|
24
24
|
*/
|
25
25
|
bundleUrlOverride?: string;
|
26
26
|
currency: Currency;
|
27
|
+
/**
|
28
|
+
* Tells Tivio which technologies/protocols etc. is the device capable to play.
|
29
|
+
* If not provided, Tivio will try to guess it (based on the browser).
|
30
|
+
*/
|
27
31
|
deviceCapabilities: PlayerCapability[];
|
28
32
|
/**
|
29
33
|
* Additional options for deviceCapabilities
|
@@ -272,6 +276,12 @@ declare type TivioHooks = {
|
|
272
276
|
pagination: PaginationInterface<ItemsInRow> | null;
|
273
277
|
error: Error | null;
|
274
278
|
};
|
279
|
+
usePurchaseRecovery: () => {
|
280
|
+
purchaseRecoveryResult?: string;
|
281
|
+
loading: boolean;
|
282
|
+
error?: any;
|
283
|
+
purchaseRecovery: (monetizationId: string) => Promise<string>;
|
284
|
+
};
|
275
285
|
useRowsInScreen: (screenId: string, options: PaginationOptions) => {
|
276
286
|
pagination: PaginationInterface<Row> | null;
|
277
287
|
error: Error | null;
|
@@ -282,6 +292,9 @@ declare type TivioHooks = {
|
|
282
292
|
};
|
283
293
|
useSearch: UseSearch;
|
284
294
|
useVoucher: (voucherId: string) => any;
|
295
|
+
/**
|
296
|
+
* @deprecated will be removed in version
|
297
|
+
*/
|
285
298
|
useLastVideoByWidgetId: (widgetId: string) => Video | null;
|
286
299
|
useWatchWithoutAdsOffer: () => {
|
287
300
|
canPurchaseWatchWithoutAds: boolean;
|
@@ -307,11 +320,17 @@ declare type TivioBundle = {
|
|
307
320
|
sources: TivioSources;
|
308
321
|
subscriptions: TivioSubscriptions;
|
309
322
|
internal: {
|
323
|
+
components: TivioInternalComponents;
|
310
324
|
hooks: TivioInternalHooks;
|
311
325
|
providers: TivioInternalProviders;
|
312
326
|
};
|
313
327
|
};
|
328
|
+
declare type TivioInternalComponents = {
|
329
|
+
CustomButton: React.ComponentType;
|
330
|
+
WebLandingScreen: React.ComponentType;
|
331
|
+
};
|
314
332
|
declare type TivioInternalHooks = {
|
333
|
+
useAuthOverlay: () => AuthOverlayState;
|
315
334
|
useSubscriptionsOverlay: () => SubscriptionOverlayState;
|
316
335
|
useQerkoOverlay: () => QerkoOverlayState;
|
317
336
|
usePurchasesWithVideos: () => {
|
@@ -327,7 +346,9 @@ declare type TivioInternalHooks = {
|
|
327
346
|
};
|
328
347
|
declare type TivioInternalProviders = {
|
329
348
|
AppThemeProvider: React.ComponentType;
|
349
|
+
AuthOverlayContextProvider: React.ComponentType;
|
330
350
|
CustomerProvider: React.ComponentType;
|
351
|
+
ConfigProvider: React.ComponentType;
|
331
352
|
UserContextProvider: React.ComponentType;
|
332
353
|
SubscriptionOverlayContextProvider: React.ComponentType;
|
333
354
|
QerkoOverlayContextProvider: React.ComponentType;
|
@@ -338,6 +359,12 @@ declare type TivioInternalProviders = {
|
|
338
359
|
declare type TivioBundleFile = {
|
339
360
|
Tivio: TivioBundle;
|
340
361
|
};
|
362
|
+
declare type AuthOverlayType = 'login' | 'registration' | 'closed';
|
363
|
+
interface AuthOverlayState {
|
364
|
+
type: AuthOverlayType;
|
365
|
+
closeAuthOverlay: () => void;
|
366
|
+
openAuthOverlay: (type: AuthOverlayType) => void;
|
367
|
+
}
|
341
368
|
interface SubscriptionOverlayData {
|
342
369
|
subscriptions?: Monetization[];
|
343
370
|
onPurchase?: () => void;
|
@@ -365,4 +392,4 @@ declare type RemoteBundleState = {
|
|
365
392
|
settings: Settings;
|
366
393
|
state: 'loading' | 'error' | 'ready';
|
367
394
|
} & Nullable<TivioBundle>;
|
368
|
-
export type { RemoteBundleState, Config, Settings, InternalConfig, TivioBundle, TivioBundleFile, TivioHooks, TivioComponents, TivioAuth, TivioGetters, TivioSubscriptions, TivioInternalHooks, TivioInternalProviders, Events, PubSub, PlayerCapability, Currency, };
|
395
|
+
export type { RemoteBundleState, Config, Settings, InternalConfig, TivioBundle, TivioBundleFile, TivioHooks, TivioComponents, TivioAuth, TivioGetters, TivioSubscriptions, TivioInternalComponents, TivioInternalHooks, TivioInternalProviders, Events, PubSub, PlayerCapability, Currency, };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.3",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"typings": "dist/index.d.ts",
|
6
6
|
"source": "src/index.ts",
|
@@ -11,6 +11,7 @@
|
|
11
11
|
"scripts": {
|
12
12
|
"build": "bash ./scripts/build_prod.sh",
|
13
13
|
"build:dev": "bash ./scripts/build_dev.sh",
|
14
|
+
"build:local": "bash ./scripts/build_with_local_bundle.sh",
|
14
15
|
"start": "yarn ts-node ./scripts/start.ts",
|
15
16
|
"test": "jest --config=./jest.config.js --coverage",
|
16
17
|
"clean": "rm -rf dist",
|
@@ -27,7 +28,8 @@
|
|
27
28
|
"@material-ui/core": "^4.11.2",
|
28
29
|
"@material-ui/icons": "^4.11.2",
|
29
30
|
"@sentry/browser": "^6.1.0",
|
30
|
-
"@tivio/common": "1.1.
|
31
|
+
"@tivio/common": "1.1.79",
|
32
|
+
"es7-object-polyfill": "^1.0.1",
|
31
33
|
"firebase": "^8.2.3",
|
32
34
|
"formik": "^2.2.7",
|
33
35
|
"i18next": "^19.8.4",
|
@@ -38,6 +40,7 @@
|
|
38
40
|
"react-spring": "^9.2.4",
|
39
41
|
"react-virtualized": "^9.22.3",
|
40
42
|
"styled-components": "^5.2.1",
|
43
|
+
"whatwg-fetch": "^3.6.2",
|
41
44
|
"yup": "^0.32.9"
|
42
45
|
},
|
43
46
|
"devDependencies": {
|
@@ -57,6 +60,7 @@
|
|
57
60
|
"@typescript-eslint/parser": "^4.14.2",
|
58
61
|
"dotenv": "^8.2.0",
|
59
62
|
"eslint": "^7.19.0",
|
63
|
+
"fork-ts-checker-webpack-plugin": "^7.0.0",
|
60
64
|
"jest": "^27.0.1",
|
61
65
|
"jest-cli": "^26.6.3",
|
62
66
|
"jest-fetch-mock": "^3.0.3",
|
package/dist/device/tizen.d.ts
DELETED
package/doc/changelog.md
DELETED
File without changes
|