@tivio/sdk-react 3.7.0 → 4.0.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 +36 -0
- package/README.md.bak +36 -0
- package/dist/index.d.ts +190 -300
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +190 -300
- package/package.json +2 -2
- package/doc/changelog.md +0 -0
package/dist/sdk-react.d.ts
CHANGED
@@ -106,6 +106,14 @@ export declare enum ALGOLIA_INDEX_NAME {
|
|
106
106
|
USERS = "users"
|
107
107
|
}
|
108
108
|
|
109
|
+
/**
|
110
|
+
* @public
|
111
|
+
*/
|
112
|
+
export declare type ArrisDeviceInfo = {
|
113
|
+
type: 'arris';
|
114
|
+
model?: 'VIP1003' | 'VIP1113' | 'VIP5305';
|
115
|
+
};
|
116
|
+
|
109
117
|
/**
|
110
118
|
* @public
|
111
119
|
*/
|
@@ -202,39 +210,6 @@ export declare type BannerProps = {
|
|
202
210
|
*/
|
203
211
|
export declare type BannerPropsPartial = Partial<BannerProps>;
|
204
212
|
|
205
|
-
/**
|
206
|
-
* @public
|
207
|
-
*/
|
208
|
-
export declare type BasicTivioBundle = {
|
209
|
-
components: TivioComponents;
|
210
|
-
getters: TivioGetters;
|
211
|
-
auth: TivioAuth;
|
212
|
-
hooks: TivioHooks;
|
213
|
-
sources: TivioSources;
|
214
|
-
subscriptions: TivioSubscriptions;
|
215
|
-
purchaseVideoWithQerko: (videoId: string, monetizationId: string, voucher?: {
|
216
|
-
expirationDate: Date;
|
217
|
-
}) => Promise<QerkoPaymentInfo>;
|
218
|
-
purchaseSubscriptionWithQerko: (monetizationId: string, voucher?: {
|
219
|
-
expirationDate: Date;
|
220
|
-
}) => Promise<QerkoPaymentInfo>;
|
221
|
-
cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
|
222
|
-
/**
|
223
|
-
* Set tivio language.
|
224
|
-
* @param language
|
225
|
-
*/
|
226
|
-
setLanguage: (language: LangCode) => void;
|
227
|
-
setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
|
228
|
-
showConsentPreferences: () => void;
|
229
|
-
/**
|
230
|
-
* Contains hooks and providers for internal usages.
|
231
|
-
* They used in our apps, e.g. web, or in sdk-react (e.g. some sdk hooks are just wrappers for core-react-dom hooks)
|
232
|
-
* TODO should not be the part of public API
|
233
|
-
*/
|
234
|
-
internal: TivioInternalBundle;
|
235
|
-
destroy: () => Promise<void>;
|
236
|
-
};
|
237
|
-
|
238
213
|
/**
|
239
214
|
* @public
|
240
215
|
*/
|
@@ -268,7 +243,7 @@ export declare type ButtonOptions = {
|
|
268
243
|
/**
|
269
244
|
* @public
|
270
245
|
*/
|
271
|
-
export declare type Callback = () => void;
|
246
|
+
export declare type Callback<T = any> = (arg?: T) => void;
|
272
247
|
|
273
248
|
/**
|
274
249
|
* @public
|
@@ -281,11 +256,6 @@ export declare interface Channel {
|
|
281
256
|
recentVideos: Video[];
|
282
257
|
}
|
283
258
|
|
284
|
-
/**
|
285
|
-
* @public
|
286
|
-
*/
|
287
|
-
export declare const ChannelsContext: React_2.Context<DataState<Channel>>;
|
288
|
-
|
289
259
|
/**
|
290
260
|
* @public
|
291
261
|
*/
|
@@ -323,6 +293,11 @@ export declare interface ChannelSourcePojo {
|
|
323
293
|
*/
|
324
294
|
export declare type Chapter = any;
|
325
295
|
|
296
|
+
/**
|
297
|
+
* @public
|
298
|
+
*/
|
299
|
+
export declare type CmpConfig = 'default' | 'debug' | 'none';
|
300
|
+
|
326
301
|
/**
|
327
302
|
* TODO it's the same as Customizations, not?
|
328
303
|
* @internal
|
@@ -341,16 +316,10 @@ export declare type Components = {
|
|
341
316
|
};
|
342
317
|
|
343
318
|
/**
|
319
|
+
* Just another alias. Reexported for backward compatibility.
|
344
320
|
* @public
|
345
321
|
*/
|
346
|
-
export declare type Config =
|
347
|
-
deviceCapabilities: PlayerCapability[] | 'auto';
|
348
|
-
/**
|
349
|
-
* @private
|
350
|
-
* Run HTML, CSS and JS feature support check
|
351
|
-
*/
|
352
|
-
runFeatureSupportCheck?: boolean;
|
353
|
-
};
|
322
|
+
export declare type Config = SdkReactConfig;
|
354
323
|
|
355
324
|
/**
|
356
325
|
* @public
|
@@ -469,13 +438,6 @@ export declare interface CustomThemeOptions {
|
|
469
438
|
size: (size: number) => number;
|
470
439
|
}
|
471
440
|
|
472
|
-
declare interface DataState<T> {
|
473
|
-
data: {
|
474
|
-
[key: string]: HookData<T>;
|
475
|
-
};
|
476
|
-
setData: (key: string, data: HookData<T>) => void;
|
477
|
-
}
|
478
|
-
|
479
441
|
/**
|
480
442
|
* @public
|
481
443
|
*/
|
@@ -498,6 +460,11 @@ export declare type DetailedPrice = {
|
|
498
460
|
frequency?: MONETIZATION_FREQUENCY;
|
499
461
|
};
|
500
462
|
|
463
|
+
/**
|
464
|
+
* @public
|
465
|
+
*/
|
466
|
+
export declare type DeviceInfo = ArrisDeviceInfo | WebosDeviceInfo | TizenDeviceInfo;
|
467
|
+
|
501
468
|
/**
|
502
469
|
* @public
|
503
470
|
*/
|
@@ -571,12 +538,6 @@ export declare interface GenericOnCallError {
|
|
571
538
|
*/
|
572
539
|
export declare const getPubSub: () => PubSub;
|
573
540
|
|
574
|
-
declare interface HookData<T> {
|
575
|
-
data: PaginationData<T> | null;
|
576
|
-
error: Error | null;
|
577
|
-
isLoading: boolean;
|
578
|
-
}
|
579
|
-
|
580
541
|
/**
|
581
542
|
* @public
|
582
543
|
*/
|
@@ -651,46 +612,23 @@ export declare type InputSource = AdSource | ChannelSource | VodTivioSource | Vo
|
|
651
612
|
/**
|
652
613
|
* @public
|
653
614
|
*/
|
654
|
-
export declare type InternalConfig = {
|
655
|
-
/**
|
656
|
-
* @private URL of remote code bundle to be fetched directly (without using resolver)
|
657
|
-
*/
|
658
|
-
bundleUrlOverride?: string;
|
659
|
-
/**
|
660
|
-
* Tells Tivio which technologies/protocols etc. is the device capable to play.
|
661
|
-
* If not provided, Tivio will try to guess it (based on the browser).
|
662
|
-
*/
|
663
|
-
deviceCapabilities: PlayerCapability[];
|
664
|
-
/**
|
665
|
-
* Additional options for deviceCapabilities
|
666
|
-
*/
|
667
|
-
capabilitiesOptions?: {
|
668
|
-
/**
|
669
|
-
* Should the player prefer HTTP sources instead HTTPs if they are available.
|
670
|
-
* This can be used on platforms that support mixed content but do not support
|
671
|
-
* specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
|
672
|
-
*/
|
673
|
-
preferHttp?: boolean;
|
674
|
-
};
|
675
|
-
secret: string | null;
|
676
|
-
language?: LangCode;
|
677
|
-
verbose?: boolean;
|
678
|
-
currency: Currency;
|
679
|
-
disableUnmounting?: boolean;
|
680
|
-
enable?: boolean;
|
681
|
-
enableSentry?: boolean;
|
682
|
-
ErrorComponent?: ComponentType<{
|
683
|
-
error: string | null;
|
684
|
-
}>;
|
615
|
+
export declare type InternalConfig = SdkReactConfig & {
|
685
616
|
fetchPackage: FetchPackage;
|
686
|
-
LoaderComponent?: ComponentType;
|
687
|
-
logger?: Logger | null;
|
688
617
|
pubSub: PubSub;
|
689
618
|
/**
|
690
619
|
* @private URL of resolver. Resolver is a script used to fetch remove code bundle
|
691
620
|
*/
|
692
621
|
resolverUrl: string;
|
693
622
|
sdkVersion: string;
|
623
|
+
/**
|
624
|
+
* @private URL of remote code bundle to be fetched directly (without using resolver)
|
625
|
+
*/
|
626
|
+
bundleUrlOverride?: string;
|
627
|
+
/**
|
628
|
+
* @private
|
629
|
+
* Run HTML, CSS and JS feature support check
|
630
|
+
*/
|
631
|
+
runFeatureSupportCheck?: boolean;
|
694
632
|
/**
|
695
633
|
* @private
|
696
634
|
*/
|
@@ -851,12 +789,6 @@ declare type OrderByDirection = 'desc' | 'asc';
|
|
851
789
|
export declare interface Organization {
|
852
790
|
}
|
853
791
|
|
854
|
-
declare type PaginationData<T> = {
|
855
|
-
items: T[];
|
856
|
-
hasNextPage: boolean;
|
857
|
-
fetchMore: Function;
|
858
|
-
};
|
859
|
-
|
860
792
|
/**
|
861
793
|
* @public
|
862
794
|
*/
|
@@ -893,6 +825,54 @@ export declare interface PlayerCapability {
|
|
893
825
|
protocol: 'dash' | 'hls' | 'mp4';
|
894
826
|
}
|
895
827
|
|
828
|
+
/**
|
829
|
+
* @public
|
830
|
+
*/
|
831
|
+
export declare type PlayerConfig = {
|
832
|
+
/**
|
833
|
+
* Some devices do not seek exactly
|
834
|
+
*
|
835
|
+
* e.g. on Arris if we request seek to position P, in reality it will seek to P -+5s
|
836
|
+
* e.g. on Arris if we request play from position P, in reality it will play from P -+5s
|
837
|
+
* (on Arris the error margin varies according to video format)
|
838
|
+
*/
|
839
|
+
acceptablePositionAnomalyMs?: number;
|
840
|
+
/**
|
841
|
+
* Stream delay config
|
842
|
+
*
|
843
|
+
* IP TV apps have TV program / TV channel streams delayed relative to the original
|
844
|
+
* video source. Therefore stream markers taken from the original video source
|
845
|
+
* are delayed relative to the TV stream seen by end users of the IP TV app.
|
846
|
+
*
|
847
|
+
* This delay must be corrected.
|
848
|
+
*/
|
849
|
+
streamDelayConfig?: {
|
850
|
+
/**
|
851
|
+
* ID of the delay config
|
852
|
+
*/
|
853
|
+
id: string;
|
854
|
+
};
|
855
|
+
ui?: {
|
856
|
+
/**
|
857
|
+
* ID of a DOM element inside which Tivio should display its player-related UI
|
858
|
+
* such as ad buttons. This DOM element is an anchor point for Tivio UI. Preferably
|
859
|
+
* it should be a <div/> element styled to cover the whole area of the video player
|
860
|
+
* and it should be positioned to be on top the existing player UI (e.g. via z-index).
|
861
|
+
*/
|
862
|
+
domAnchorId: string | null;
|
863
|
+
};
|
864
|
+
protocols?: {
|
865
|
+
mp4?: {
|
866
|
+
/**
|
867
|
+
* Set to false if player does not support MP4 files that require full file download
|
868
|
+
* (i.e. they do not support progressive MP4 download and therefore the whole file
|
869
|
+
* must be downloaded before playback can start)
|
870
|
+
*/
|
871
|
+
fullFileDownloadSupport?: boolean;
|
872
|
+
};
|
873
|
+
};
|
874
|
+
};
|
875
|
+
|
896
876
|
/**
|
897
877
|
* @public
|
898
878
|
*/
|
@@ -1159,7 +1139,6 @@ export declare interface QerkoTransaction {
|
|
1159
1139
|
export declare type RemoteBundleState = {
|
1160
1140
|
config: InternalConfig;
|
1161
1141
|
error: string | null;
|
1162
|
-
settings: Settings;
|
1163
1142
|
state: 'loading' | 'error' | 'ready';
|
1164
1143
|
} & Nullable<TivioBundle>;
|
1165
1144
|
|
@@ -1323,6 +1302,25 @@ export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'f
|
|
1323
1302
|
*/
|
1324
1303
|
export declare type ScreenSubscription = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void) => Disposer_2;
|
1325
1304
|
|
1305
|
+
/**
|
1306
|
+
* Config of sdk-react. Contains all properties that can be passed via TivioProvider.
|
1307
|
+
* Consists of TivioConfig's properties + "sdk only" properties, that are used only in sdk, not in bundle.
|
1308
|
+
*
|
1309
|
+
* @public
|
1310
|
+
*/
|
1311
|
+
export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'language'> & {
|
1312
|
+
disableUnmounting?: boolean;
|
1313
|
+
enable?: boolean;
|
1314
|
+
enableSentry?: boolean;
|
1315
|
+
ErrorComponent?: ComponentType<{
|
1316
|
+
error: string | null;
|
1317
|
+
}>;
|
1318
|
+
LoaderComponent?: ComponentType;
|
1319
|
+
logger?: Logger | null;
|
1320
|
+
deviceCapabilities: PlayerCapability[] | 'auto';
|
1321
|
+
language?: LangCode;
|
1322
|
+
};
|
1323
|
+
|
1326
1324
|
/**
|
1327
1325
|
* @public
|
1328
1326
|
*/
|
@@ -1333,21 +1331,6 @@ export declare interface Section {
|
|
1333
1331
|
videos: Video[];
|
1334
1332
|
}
|
1335
1333
|
|
1336
|
-
/**
|
1337
|
-
* @public
|
1338
|
-
*/
|
1339
|
-
export declare const SectionsContext: React_2.Context<DataState<Section>>;
|
1340
|
-
|
1341
|
-
/**
|
1342
|
-
* @public
|
1343
|
-
*/
|
1344
|
-
export declare type Settings = {
|
1345
|
-
/**
|
1346
|
-
* @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
|
1347
|
-
*/
|
1348
|
-
setUser: (userId: string, userPayload: unknown) => Promise<void>;
|
1349
|
-
};
|
1350
|
-
|
1351
1334
|
/**
|
1352
1335
|
* Used for entities, that can be global (e.g. asset presets, tag types).
|
1353
1336
|
* Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
|
@@ -1524,10 +1507,6 @@ export declare type TilePropsPartial = Partial<TileProps>;
|
|
1524
1507
|
* @public
|
1525
1508
|
*/
|
1526
1509
|
export declare interface TivioAuth {
|
1527
|
-
changePassword: (newPassword: string) => Promise<void>;
|
1528
|
-
changeUserPhoto(file: any): Promise<void>;
|
1529
|
-
removeUserPhoto(): Promise<void>;
|
1530
|
-
getPurchasedVodsWithInitializedVideos: () => Promise<Purchase[]>;
|
1531
1510
|
/**
|
1532
1511
|
* @param email
|
1533
1512
|
* @param password
|
@@ -1539,21 +1518,17 @@ export declare interface TivioAuth {
|
|
1539
1518
|
* @param password
|
1540
1519
|
*/
|
1541
1520
|
signInWithEmailAndPassword: (email: string, password: string) => Promise<string | null>;
|
1542
|
-
initializeUser: () => Promise<void>;
|
1543
1521
|
signOut: () => Promise<void>;
|
1544
1522
|
/**
|
1545
1523
|
* Used for reset forgotten password by user
|
1546
1524
|
*/
|
1547
1525
|
resetPassword: (email: string) => Promise<void>;
|
1548
|
-
createFreePurchase: (monetizationId: string) => Promise<void>;
|
1549
1526
|
}
|
1550
1527
|
|
1551
1528
|
/**
|
1552
1529
|
* @public
|
1553
1530
|
*/
|
1554
|
-
export declare type TivioBundle =
|
1555
|
-
init: (config: Config) => void | Promise<void>;
|
1556
|
-
};
|
1531
|
+
export declare type TivioBundle = TivioReactBundle;
|
1557
1532
|
|
1558
1533
|
/**
|
1559
1534
|
* @public
|
@@ -1569,10 +1544,6 @@ export declare type TivioComponents = {
|
|
1569
1544
|
Markers: React_2.ReactNode;
|
1570
1545
|
PlayerDataContext: React_2.ReactNode;
|
1571
1546
|
Provider: React_2.ComponentType<RemoteProviderProps>;
|
1572
|
-
/**
|
1573
|
-
* @deprecated will be removed in in @tivio/sdk-react@4
|
1574
|
-
*/
|
1575
|
-
VideoAdBanner: React_2.ReactNode;
|
1576
1547
|
WebPlayer: React_2.ComponentType<WebPlayerProps>;
|
1577
1548
|
Widget: React_2.ComponentType<TivioWidgetProps>;
|
1578
1549
|
PlayerDataContextProvider: React_2.ComponentType<{
|
@@ -1607,6 +1578,44 @@ export declare type TivioComponents = {
|
|
1607
1578
|
TvPlayer: React_2.ComponentType<WebPlayerProps>;
|
1608
1579
|
};
|
1609
1580
|
|
1581
|
+
/**
|
1582
|
+
* @public
|
1583
|
+
*/
|
1584
|
+
export declare interface TivioConfig {
|
1585
|
+
/**
|
1586
|
+
* Tells Tivio which technologies/protocols etc. is the device capable to play.
|
1587
|
+
* If not provided, Tivio will try to guess it (based on the browser).
|
1588
|
+
*/
|
1589
|
+
deviceCapabilities?: PlayerCapability[];
|
1590
|
+
/**
|
1591
|
+
* Additional options for deviceCapabilities
|
1592
|
+
*/
|
1593
|
+
capabilitiesOptions?: {
|
1594
|
+
/**
|
1595
|
+
* Should the player prefer HTTP sources instead HTTPs if they are available.
|
1596
|
+
* This can be used on platforms that support mixed content but do not support
|
1597
|
+
* specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
|
1598
|
+
*/
|
1599
|
+
preferHttp?: boolean;
|
1600
|
+
};
|
1601
|
+
secret: string;
|
1602
|
+
language: LangCode;
|
1603
|
+
debug?: boolean;
|
1604
|
+
verbose?: boolean;
|
1605
|
+
firebaseApp?: any;
|
1606
|
+
currency: Currency;
|
1607
|
+
/**
|
1608
|
+
* Configuration for GDPR consent collection (CMP)
|
1609
|
+
*/
|
1610
|
+
cmp?: CmpConfig;
|
1611
|
+
/**
|
1612
|
+
* Device information - model, os, version, etc. This is useful for devices
|
1613
|
+
* where this information cannot be reliably auto-detected.
|
1614
|
+
*/
|
1615
|
+
deviceInfo?: DeviceInfo;
|
1616
|
+
player?: PlayerConfig;
|
1617
|
+
}
|
1618
|
+
|
1610
1619
|
/**
|
1611
1620
|
* @public
|
1612
1621
|
*/
|
@@ -1618,18 +1627,6 @@ export declare const TivioContext: React_2.Context<RemoteBundleState | null>;
|
|
1618
1627
|
export declare type TivioGetters = {
|
1619
1628
|
isTivioLoaded: (cb: (isLoaded: boolean) => void) => void;
|
1620
1629
|
isSignedIn: () => boolean;
|
1621
|
-
/**
|
1622
|
-
* @deprecated is here only for backward compatibility
|
1623
|
-
*/
|
1624
|
-
getExportedConfig: () => Promise<{
|
1625
|
-
showMarkers: true;
|
1626
|
-
}>;
|
1627
|
-
/**
|
1628
|
-
* Get channel by its id.
|
1629
|
-
* @param channelId - channel id
|
1630
|
-
* @returns {Promise<Channel | null>} channel or null if channel does not exists
|
1631
|
-
*/
|
1632
|
-
getChannelById: (channelId: string) => Promise<Channel | null>;
|
1633
1630
|
/**
|
1634
1631
|
* Get (or create) player wrapper instance
|
1635
1632
|
* @param opt - player getter options
|
@@ -1639,24 +1636,12 @@ export declare type TivioGetters = {
|
|
1639
1636
|
playerWrapperId?: string;
|
1640
1637
|
}) => any;
|
1641
1638
|
getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
|
1642
|
-
/**
|
1643
|
-
* Get section by its id.
|
1644
|
-
* @param sectionId - section id
|
1645
|
-
* @returns {Promise<{section: Section, channel: Channel} | null>} section and channel or null if channel or section does not exists
|
1646
|
-
*/
|
1647
|
-
getSectionById: (sectionId: string) => Promise<Section | null>;
|
1648
1639
|
/**
|
1649
1640
|
* Get video by its id.
|
1650
1641
|
* @param videoId - video id
|
1651
1642
|
* @returns {Promise<Video | null>} video or null if video does not exists
|
1652
1643
|
*/
|
1653
1644
|
getVideoById: (videoId: string) => Promise<Video | null>;
|
1654
|
-
/**
|
1655
|
-
* Get widget by its id.
|
1656
|
-
* @param widgetId - widget id
|
1657
|
-
* @returns {Promise<Widget | null>} widget or null if widget does not exists
|
1658
|
-
*/
|
1659
|
-
getWidgetById: (widgetId: string) => Promise<Widget | null>;
|
1660
1645
|
/**
|
1661
1646
|
* Get player capabilities based on user's browser and OS as resolved by Tivio.
|
1662
1647
|
* @returns PlayerCapability[]
|
@@ -1697,10 +1682,6 @@ export declare type TivioHooks = {
|
|
1697
1682
|
error: string | null;
|
1698
1683
|
};
|
1699
1684
|
useVoucher: (voucherId: string) => any;
|
1700
|
-
/**
|
1701
|
-
* @deprecated will be removed in version
|
1702
|
-
*/
|
1703
|
-
useLastVideoByWidgetId: (widgetId: string) => Video | null;
|
1704
1685
|
useWatchWithoutAdsOffer: () => {
|
1705
1686
|
canPurchaseWatchWithoutAds: boolean;
|
1706
1687
|
showPurchaseDialog: () => void;
|
@@ -1795,10 +1776,44 @@ export declare type TivioProviderProps = {
|
|
1795
1776
|
/**
|
1796
1777
|
* This prop must be set only once and not change value afterwards
|
1797
1778
|
*/
|
1798
|
-
conf:
|
1779
|
+
conf: SdkReactConfig | undefined | null;
|
1799
1780
|
children: React_2.ReactNode;
|
1800
1781
|
};
|
1801
1782
|
|
1783
|
+
/**
|
1784
|
+
* @public
|
1785
|
+
*/
|
1786
|
+
export declare type TivioReactBundle = {
|
1787
|
+
init: (config: TivioConfig) => void | Promise<void>;
|
1788
|
+
components: TivioComponents;
|
1789
|
+
getters: TivioGetters;
|
1790
|
+
auth: TivioAuth;
|
1791
|
+
hooks: TivioHooks;
|
1792
|
+
sources: TivioSources;
|
1793
|
+
subscriptions: TivioSubscriptions;
|
1794
|
+
purchaseVideoWithQerko: (videoId: string, monetizationId: string, voucher?: {
|
1795
|
+
expirationDate: Date;
|
1796
|
+
}) => Promise<QerkoPaymentInfo>;
|
1797
|
+
purchaseSubscriptionWithQerko: (monetizationId: string, voucher?: {
|
1798
|
+
expirationDate: Date;
|
1799
|
+
}) => Promise<QerkoPaymentInfo>;
|
1800
|
+
cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
|
1801
|
+
/**
|
1802
|
+
* Set tivio language.
|
1803
|
+
* @param language
|
1804
|
+
*/
|
1805
|
+
setLanguage: (language: LangCode) => void;
|
1806
|
+
setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
|
1807
|
+
showConsentPreferences: () => void;
|
1808
|
+
/**
|
1809
|
+
* Contains hooks and providers for internal usages.
|
1810
|
+
* They used in our apps, e.g. web, or in sdk-react (e.g. some sdk hooks are just wrappers for core-react-dom hooks)
|
1811
|
+
* TODO should not be the part of public API
|
1812
|
+
*/
|
1813
|
+
internal: TivioInternalBundle;
|
1814
|
+
destroy: () => Promise<void>;
|
1815
|
+
};
|
1816
|
+
|
1802
1817
|
/**
|
1803
1818
|
* @public
|
1804
1819
|
*/
|
@@ -1814,61 +1829,12 @@ export declare type TivioSources = {
|
|
1814
1829
|
*/
|
1815
1830
|
export declare type TivioSubscriptions = {
|
1816
1831
|
subscribeToUser: (cb: (error: string | null, user: User | null) => void) => void;
|
1817
|
-
/**
|
1818
|
-
* Listen to widget changes.
|
1819
|
-
* @param widgetId - widget id
|
1820
|
-
* @param cb - callback on widget updates or on error
|
1821
|
-
*/
|
1822
|
-
subscribeToWidget: (widgetId: string, cb: (error: Error | null, data: Widget | null, disposer?: Disposer_2) => void) => void;
|
1823
|
-
/**
|
1824
|
-
* Listen to channel changes.
|
1825
|
-
* @param channelId - channel id
|
1826
|
-
* @param cb - callback on channel updates or on error
|
1827
|
-
*/
|
1828
|
-
subscribeToChannel: (channelId: string, cb: (error: Error | null, data: Channel | null) => void) => void;
|
1829
|
-
/**
|
1830
|
-
* Listen to section changes.
|
1831
|
-
* @param sectionId - section id
|
1832
|
-
* @param cb - callback on section updates or on error
|
1833
|
-
*/
|
1834
|
-
subscribeToSection: (sectionId: string, cb: (error: Error | null, data: Section | null) => void) => void;
|
1835
1832
|
/**
|
1836
1833
|
* Listen to video changes.
|
1837
1834
|
* @param videoId - video id
|
1838
1835
|
* @param cb - callback on video updates or on error
|
1839
1836
|
*/
|
1840
1837
|
subscribeToVideo: (videoId: string, cb: (error: Error | null, data: Video | null, disposer?: Disposer_2) => void) => void;
|
1841
|
-
/**
|
1842
|
-
* Listen to videos in section changes.
|
1843
|
-
* @param sectionId - section id
|
1844
|
-
* @param cb - callback on videos change or error
|
1845
|
-
* @param limit - videos count
|
1846
|
-
*/
|
1847
|
-
subscribeToVideosInSection: (sectionId: string, cb: (error: null | Error, data: null | {
|
1848
|
-
videos: Video[];
|
1849
|
-
hasNextPage: boolean;
|
1850
|
-
}, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
|
1851
|
-
/**
|
1852
|
-
* Listen to section in channel changes
|
1853
|
-
* @param channelId - channel id
|
1854
|
-
* @param cb - callback on sections change or error
|
1855
|
-
* @param limit - sections count
|
1856
|
-
*/
|
1857
|
-
subscribeToSectionsInChannel: (channelId: string, cb: (error: null | Error, data: null | {
|
1858
|
-
sections: Section[];
|
1859
|
-
hasNextPage: boolean;
|
1860
|
-
}, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
|
1861
|
-
/**
|
1862
|
-
* Listen to channels in widget changes
|
1863
|
-
* @param widgetId - widget id
|
1864
|
-
* @param cb - callback on channels change or error
|
1865
|
-
* @param limit - channels count
|
1866
|
-
*/
|
1867
|
-
subscribeToChannelsInWidget: (widgetId: string, cb: (error: null | Error, data: null | {
|
1868
|
-
channels: Channel[];
|
1869
|
-
hasNextPage: boolean;
|
1870
|
-
}, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
|
1871
|
-
subscribeToScreen: SubscribeToScreen;
|
1872
1838
|
subscribeToItemsInRow: SubscribeToItemsInRow;
|
1873
1839
|
subscribeToRowsInScreen: SubscribeToRowsInScreen;
|
1874
1840
|
subscribeToTaggedVideos: SubscribeToTaggedVideos;
|
@@ -1927,6 +1893,15 @@ export declare interface TivioWidgetRef {
|
|
1927
1893
|
});
|
1928
1894
|
}
|
1929
1895
|
|
1896
|
+
/**
|
1897
|
+
* @public
|
1898
|
+
*/
|
1899
|
+
export declare type TizenDeviceInfo = {
|
1900
|
+
type: 'tizen';
|
1901
|
+
model?: string;
|
1902
|
+
osVersion?: string;
|
1903
|
+
};
|
1904
|
+
|
1930
1905
|
declare type TransactionInfo = {
|
1931
1906
|
type: 'transaction';
|
1932
1907
|
name: string;
|
@@ -2029,28 +2004,6 @@ export declare type UseCancelSubscription = (subscriptionId: string) => {
|
|
2029
2004
|
*/
|
2030
2005
|
export declare const useCancelSubscription: UseCancelSubscription;
|
2031
2006
|
|
2032
|
-
/**
|
2033
|
-
* Use channel
|
2034
|
-
* @param channelId - channel id
|
2035
|
-
* @public
|
2036
|
-
*/
|
2037
|
-
export declare const useChannel: (channelId: string) => {
|
2038
|
-
error: string | null;
|
2039
|
-
data: Channel | null;
|
2040
|
-
};
|
2041
|
-
|
2042
|
-
/**
|
2043
|
-
* Use channels in widget
|
2044
|
-
* @param widgetId - widget id
|
2045
|
-
* @param [limit] - channels count, defaults to 10
|
2046
|
-
* @public
|
2047
|
-
*/
|
2048
|
-
export declare const useChannelsInWidget: (widgetId: string, limit?: number) => {
|
2049
|
-
error: Error | null;
|
2050
|
-
data: PaginationData<Channel> | null;
|
2051
|
-
isLoading: boolean;
|
2052
|
-
};
|
2053
|
-
|
2054
2007
|
/**
|
2055
2008
|
* @public
|
2056
2009
|
*/
|
@@ -2064,13 +2017,6 @@ export declare type UseChannelSource = (tvChannelId: string) => {
|
|
2064
2017
|
*/
|
2065
2018
|
export declare const useCurrentMarker: () => Marker | null;
|
2066
2019
|
|
2067
|
-
/**
|
2068
|
-
* @public
|
2069
|
-
*/
|
2070
|
-
export declare const useFreePurchase: () => {
|
2071
|
-
purchase: (monetizationId: string) => Promise<void>;
|
2072
|
-
};
|
2073
|
-
|
2074
2020
|
/**
|
2075
2021
|
* @public
|
2076
2022
|
*/
|
@@ -2101,12 +2047,6 @@ export declare const useItemsInRow: (rowId: string, options?: SubscribeToItemsIn
|
|
2101
2047
|
error: Error | null;
|
2102
2048
|
};
|
2103
2049
|
|
2104
|
-
/**
|
2105
|
-
* @deprecated will be removed in v4
|
2106
|
-
* @public
|
2107
|
-
*/
|
2108
|
-
export declare function useLastVideoByWidgetId(widgetId: string): Video | null;
|
2109
|
-
|
2110
2050
|
/**
|
2111
2051
|
* @public
|
2112
2052
|
*/
|
@@ -2198,16 +2138,6 @@ export declare enum UserType {
|
|
2198
2138
|
TIVIO_USER = "TIVIO_USER"
|
2199
2139
|
}
|
2200
2140
|
|
2201
|
-
/**
|
2202
|
-
* @deprecated
|
2203
|
-
*
|
2204
|
-
* Use app screen
|
2205
|
-
* @param screenId - screen ID
|
2206
|
-
* @param options - subscribe to screen options
|
2207
|
-
* @public
|
2208
|
-
*/
|
2209
|
-
export declare const useScreen: (screenId: string, options?: ScreenOptions | undefined) => never;
|
2210
|
-
|
2211
2141
|
/**
|
2212
2142
|
* @public
|
2213
2143
|
*/
|
@@ -2239,28 +2169,6 @@ export declare type UseSearchOptions = PaginationOptions & Partial<{
|
|
2239
2169
|
*/
|
2240
2170
|
export declare type UseSearchResult<T extends ALGOLIA_INDEX_NAME> = T extends ALGOLIA_INDEX_NAME.VIDEOS ? Video : T extends ALGOLIA_INDEX_NAME.TAGS ? Tag : T extends ALGOLIA_INDEX_NAME.TV_CHANNELS ? TvChannel : unknown;
|
2241
2171
|
|
2242
|
-
/**
|
2243
|
-
* Use section
|
2244
|
-
* @param sectionId - section id
|
2245
|
-
* @public
|
2246
|
-
*/
|
2247
|
-
export declare const useSection: (sectionId: string) => {
|
2248
|
-
error: string | null;
|
2249
|
-
data: Section | null;
|
2250
|
-
};
|
2251
|
-
|
2252
|
-
/**
|
2253
|
-
* Use section in channel
|
2254
|
-
* @param channelId - channel id
|
2255
|
-
* @param [limit] - sections count, defaults to 10
|
2256
|
-
* @public
|
2257
|
-
*/
|
2258
|
-
export declare const useSectionsInChannel: (channelId: string, limit?: number) => {
|
2259
|
-
error: Error | null;
|
2260
|
-
data: PaginationData<Section> | null;
|
2261
|
-
isLoading: boolean;
|
2262
|
-
};
|
2263
|
-
|
2264
2172
|
/**
|
2265
2173
|
* @public
|
2266
2174
|
*/
|
@@ -2320,18 +2228,6 @@ export declare const useVideo: (videoId?: string | undefined) => {
|
|
2320
2228
|
error: string | null;
|
2321
2229
|
};
|
2322
2230
|
|
2323
|
-
/**
|
2324
|
-
* Use videos in section
|
2325
|
-
* @param sectionId - section id
|
2326
|
-
* @param [limit] - videos count, defaults to 10
|
2327
|
-
* @public
|
2328
|
-
*/
|
2329
|
-
export declare const useVideosInSection: (sectionId?: string | undefined, limit?: number) => {
|
2330
|
-
error: Error | null;
|
2331
|
-
data: PaginationData<Video> | null;
|
2332
|
-
isLoading: boolean;
|
2333
|
-
};
|
2334
|
-
|
2335
2231
|
/**
|
2336
2232
|
* @public
|
2337
2233
|
*/
|
@@ -2357,16 +2253,6 @@ export declare const useWatchWithoutAdsOffer: () => {
|
|
2357
2253
|
showPurchaseDialog: () => void;
|
2358
2254
|
};
|
2359
2255
|
|
2360
|
-
/**
|
2361
|
-
* Use widget
|
2362
|
-
* @param widgetId - widget id
|
2363
|
-
* @public
|
2364
|
-
*/
|
2365
|
-
export declare const useWidget: (widgetId: string) => {
|
2366
|
-
error: string;
|
2367
|
-
widget: Widget | null;
|
2368
|
-
};
|
2369
|
-
|
2370
2256
|
/**
|
2371
2257
|
* @public
|
2372
2258
|
*/
|
@@ -2492,11 +2378,6 @@ export declare interface VideoExternals {
|
|
2492
2378
|
|
2493
2379
|
declare type VideoPath = string;
|
2494
2380
|
|
2495
|
-
/**
|
2496
|
-
* @public
|
2497
|
-
*/
|
2498
|
-
export declare const VideosContext: React_2.Context<DataState<Video>>;
|
2499
|
-
|
2500
2381
|
/**
|
2501
2382
|
* Video type.
|
2502
2383
|
* @public
|
@@ -2557,6 +2438,15 @@ declare type Voucher = {
|
|
2557
2438
|
voucherInfo: SubscriptionInfo | TransactionInfo;
|
2558
2439
|
};
|
2559
2440
|
|
2441
|
+
/**
|
2442
|
+
* @public
|
2443
|
+
*/
|
2444
|
+
export declare type WebosDeviceInfo = {
|
2445
|
+
type: 'webos';
|
2446
|
+
model?: string;
|
2447
|
+
osVersion?: string;
|
2448
|
+
};
|
2449
|
+
|
2560
2450
|
/**
|
2561
2451
|
* @public
|
2562
2452
|
*/
|