@tivio/sdk-react 9.1.3-alpha2 → 9.1.3-alpha4
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/dist/distTypes/components/ContextProvider.d.ts +8 -0
- package/dist/distTypes/components/PlayerProvider.d.ts +28 -0
- package/dist/distTypes/components/TivioProvider.d.ts +24 -0
- package/dist/distTypes/components/TivioWidget.d.ts +10 -0
- package/dist/distTypes/components/TivioWidgetError.d.ts +13 -0
- package/dist/distTypes/components/TivioWidgetLoader.d.ts +9 -0
- package/dist/distTypes/components/TvTivioProvider.d.ts +10 -0
- package/dist/distTypes/components/hooks/index.d.ts +19 -0
- package/dist/distTypes/components/hooks/playerHooks.d.ts +43 -0
- package/dist/distTypes/components/hooks/useApplyInviteCode.d.ts +18 -0
- package/dist/distTypes/components/hooks/useCancelSubscription.d.ts +5 -0
- package/dist/distTypes/components/hooks/useChannelSource.d.ts +13 -0
- package/dist/distTypes/components/hooks/useError.d.ts +10 -0
- package/dist/distTypes/components/hooks/useIsLoaded.d.ts +6 -0
- package/dist/distTypes/components/hooks/useIsMonetizationPurchased.d.ts +6 -0
- package/dist/distTypes/components/hooks/useItemsInRow.d.ts +11 -0
- package/dist/distTypes/components/hooks/useOrganizationSubscriptions.d.ts +11 -0
- package/dist/distTypes/components/hooks/usePurchaseRecovery.d.ts +15 -0
- package/dist/distTypes/components/hooks/usePurchaseSubscription.d.ts +5 -0
- package/dist/distTypes/components/hooks/useRowsInScreen.d.ts +8 -0
- package/dist/distTypes/components/hooks/useSearch.d.ts +8 -0
- package/dist/distTypes/components/hooks/useTaggedVideos.d.ts +11 -0
- package/dist/distTypes/components/hooks/useTivio.d.ts +8 -0
- package/dist/distTypes/components/hooks/useTransactionPayment.d.ts +5 -0
- package/dist/distTypes/components/hooks/useTvChannel.d.ts +10 -0
- package/dist/distTypes/components/hooks/useUser.d.ts +9 -0
- package/dist/distTypes/components/hooks/useVideo.d.ts +9 -0
- package/dist/distTypes/components/hooks/useVoucher.d.ts +48 -0
- package/dist/distTypes/config.d.ts +22 -0
- package/dist/distTypes/index.d.ts +21 -0
- package/dist/distTypes/info.d.ts +5 -0
- package/dist/distTypes/services/bundleLoader.d.ts +19 -0
- package/dist/distTypes/services/bundlePromise.d.ts +8 -0
- package/dist/distTypes/services/dependencyResolver.d.ts +17 -0
- package/dist/distTypes/services/gdpr.d.ts +4 -0
- package/dist/distTypes/services/localFetch/coreReactDomDist.d.ts +1 -0
- package/dist/distTypes/services/localFetch/none.d.ts +1 -0
- package/dist/distTypes/services/logger.d.ts +26 -0
- package/dist/distTypes/services/login.d.ts +9 -0
- package/dist/distTypes/services/packageLoader.d.ts +6 -0
- package/dist/distTypes/services/pubSub.d.ts +17 -0
- package/dist/distTypes/services/sentry.d.ts +4 -0
- package/dist/distTypes/types/bundle.types.d.ts +88 -0
- package/dist/distTypes/types/common.d.ts +14 -0
- package/dist/distTypes/types/config.types.d.ts +0 -0
- package/dist/distTypes/types/types.d.ts +19 -0
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/index.d.ts +0 -6829
- package/dist/sdk-react.d.ts +0 -7177
@@ -0,0 +1,88 @@
|
|
1
|
+
import { LangCode } from '@tivio/types';
|
2
|
+
import { ComponentType } from 'react';
|
3
|
+
import { Logger } from '../services/logger';
|
4
|
+
import { FetchPackage } from '../services/packageLoader';
|
5
|
+
import { Disposer, Empty, Nullable } from './common';
|
6
|
+
import type { TivioConfig, TivioReactBundle } from '@tivio/types';
|
7
|
+
/**
|
8
|
+
* Config of sdk-react. Contains all properties that can be passed via TivioProvider.
|
9
|
+
* Consists of TivioConfig's properties + "sdk only" properties, that are used only in sdk, not in bundle.
|
10
|
+
*
|
11
|
+
* @public
|
12
|
+
*/
|
13
|
+
export type SdkReactConfig = Omit<TivioConfig, 'language'> & {
|
14
|
+
disableUnmounting?: boolean;
|
15
|
+
enable?: boolean;
|
16
|
+
enableSentry?: boolean;
|
17
|
+
ErrorComponent?: ComponentType<{
|
18
|
+
error: string | null;
|
19
|
+
}>;
|
20
|
+
LoaderComponent?: ComponentType;
|
21
|
+
logger?: Logger | null;
|
22
|
+
/**
|
23
|
+
* language is required for bundle init (TivioConfig), but it can be set to default EN on SDK side, so here it's optional.
|
24
|
+
*/
|
25
|
+
language?: LangCode;
|
26
|
+
};
|
27
|
+
/**
|
28
|
+
* Just another alias. Reexported for backward compatibility.
|
29
|
+
* @public
|
30
|
+
*/
|
31
|
+
export type Config = SdkReactConfig;
|
32
|
+
/**
|
33
|
+
* @public
|
34
|
+
*/
|
35
|
+
export type InternalConfig = SdkReactConfig & {
|
36
|
+
fetchPackage: FetchPackage;
|
37
|
+
pubSub: PubSub;
|
38
|
+
/**
|
39
|
+
* @private URL of resolver. Resolver is a script used to fetch remote code bundle
|
40
|
+
*/
|
41
|
+
resolverUrl: string;
|
42
|
+
sdkVersion: string;
|
43
|
+
/**
|
44
|
+
* @private URL of remote code bundle to be fetched directly (without using resolver)
|
45
|
+
*/
|
46
|
+
bundleUrlOverride?: string;
|
47
|
+
/**
|
48
|
+
* @private
|
49
|
+
* Run HTML, CSS and JS feature support check
|
50
|
+
*/
|
51
|
+
runFeatureSupportCheck?: boolean;
|
52
|
+
/**
|
53
|
+
* @private
|
54
|
+
*/
|
55
|
+
forceCloudFnResolver?: boolean;
|
56
|
+
};
|
57
|
+
/**
|
58
|
+
* @public
|
59
|
+
*/
|
60
|
+
export type Events = {
|
61
|
+
'on-ready': RemoteBundleState;
|
62
|
+
'on-error': Error;
|
63
|
+
};
|
64
|
+
/**
|
65
|
+
* @public
|
66
|
+
*/
|
67
|
+
export interface PubSub {
|
68
|
+
publish: <K extends keyof Events>(triggerName: K, payload: Events[K]) => Empty;
|
69
|
+
subscribe: <K extends keyof Events>(triggerName: K, onMessage: (data: Events[K]) => Empty) => Disposer;
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* @public
|
73
|
+
*/
|
74
|
+
export type TivioBundle = TivioReactBundle;
|
75
|
+
/**
|
76
|
+
* @public
|
77
|
+
*/
|
78
|
+
export type TivioBundleFile = {
|
79
|
+
Tivio: TivioBundle;
|
80
|
+
};
|
81
|
+
/**
|
82
|
+
* @public
|
83
|
+
*/
|
84
|
+
export type RemoteBundleState = {
|
85
|
+
config: InternalConfig;
|
86
|
+
error: string | null;
|
87
|
+
state: 'loading' | 'error' | 'ready';
|
88
|
+
} & Nullable<TivioBundle>;
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* @public
|
3
|
+
*/
|
4
|
+
export type Chapter = any;
|
5
|
+
/**
|
6
|
+
* @public
|
7
|
+
*/
|
8
|
+
export type BetOffer = {
|
9
|
+
betService: string;
|
10
|
+
league: string;
|
11
|
+
odds: {
|
12
|
+
winner: string;
|
13
|
+
rate: number;
|
14
|
+
}[];
|
15
|
+
sport: string;
|
16
|
+
opponent1: string;
|
17
|
+
opponent2: string;
|
18
|
+
time: Date;
|
19
|
+
};
|