@tivio/sdk-react 3.5.2 → 3.6.2

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.
Files changed (63) hide show
  1. package/README.md +12 -3
  2. package/README.md.bak +12 -3
  3. package/dist/index.d.ts +1946 -21
  4. package/dist/index.js +1 -1
  5. package/dist/index.js.LICENSE.txt +12 -0
  6. package/package.json +10 -7
  7. package/dist/components/ContextProvider.d.ts +0 -7
  8. package/dist/components/PlayerProvider.d.ts +0 -19
  9. package/dist/components/TivioProvider.d.ts +0 -16
  10. package/dist/components/TivioWidget.d.ts +0 -7
  11. package/dist/components/TivioWidgetError.d.ts +0 -10
  12. package/dist/components/TivioWidgetLoader.d.ts +0 -6
  13. package/dist/components/TvTivioProvider.d.ts +0 -7
  14. package/dist/components/context/ChannelsContext.d.ts +0 -6
  15. package/dist/components/context/RowItemsContext.d.ts +0 -7
  16. package/dist/components/context/ScreensContext.d.ts +0 -6
  17. package/dist/components/context/SectionsContext.d.ts +0 -6
  18. package/dist/components/context/VideosContext.d.ts +0 -6
  19. package/dist/components/context/index.d.ts +0 -5
  20. package/dist/components/context/types.d.ts +0 -27
  21. package/dist/components/hooks/contentHooks.d.ts +0 -68
  22. package/dist/components/hooks/index.d.ts +0 -22
  23. package/dist/components/hooks/playerHooks.d.ts +0 -28
  24. package/dist/components/hooks/useApplyInviteCode.d.ts +0 -17
  25. package/dist/components/hooks/useCancelSubscription.d.ts +0 -2
  26. package/dist/components/hooks/useError.d.ts +0 -9
  27. package/dist/components/hooks/useFreePurchase.d.ts +0 -4
  28. package/dist/components/hooks/useIsMonetizationPurchased.d.ts +0 -3
  29. package/dist/components/hooks/useItemsInRow.d.ts +0 -11
  30. package/dist/components/hooks/useLastVideoByWidgetId.d.ts +0 -5
  31. package/dist/components/hooks/useOrganizationSubscriptions.d.ts +0 -3
  32. package/dist/components/hooks/usePurchaseRecovery.d.ts +0 -14
  33. package/dist/components/hooks/usePurchaseSubscription.d.ts +0 -4
  34. package/dist/components/hooks/usePurchasesWithVideos.d.ts +0 -7
  35. package/dist/components/hooks/useRowsInScreen.d.ts +0 -6
  36. package/dist/components/hooks/useScreen.d.ts +0 -10
  37. package/dist/components/hooks/useScreens.d.ts +0 -5
  38. package/dist/components/hooks/useSearch.d.ts +0 -8
  39. package/dist/components/hooks/useTaggedVideos.d.ts +0 -11
  40. package/dist/components/hooks/useTivio.d.ts +0 -3
  41. package/dist/components/hooks/useTransactionPayment.d.ts +0 -5
  42. package/dist/components/hooks/useUser.d.ts +0 -5
  43. package/dist/components/hooks/useVoucher.d.ts +0 -42
  44. package/dist/components/hooks/useWatchWithoutAdsOffer.d.ts +0 -4
  45. package/dist/config.d.ts +0 -20
  46. package/dist/info.d.ts +0 -2
  47. package/dist/services/bundleLoader.d.ts +0 -15
  48. package/dist/services/bundlePromise.d.ts +0 -7
  49. package/dist/services/dependencyResolver.d.ts +0 -24
  50. package/dist/services/gdpr.d.ts +0 -1
  51. package/dist/services/localFetch/coreReactDomDist.d.ts +0 -1
  52. package/dist/services/localFetch/none.d.ts +0 -1
  53. package/dist/services/logger.d.ts +0 -26
  54. package/dist/services/login.d.ts +0 -9
  55. package/dist/services/packageLoader.d.ts +0 -6
  56. package/dist/services/pubSub.d.ts +0 -13
  57. package/dist/services/sentry.d.ts +0 -4
  58. package/dist/services/settings.d.ts +0 -13
  59. package/dist/types/bundle.types.d.ts +0 -444
  60. package/dist/types/common.d.ts +0 -6
  61. package/dist/types/config.types.d.ts +0 -0
  62. package/dist/types/customPlayer.types.d.ts +0 -171
  63. package/dist/types/types.d.ts +0 -174
package/dist/index.d.ts CHANGED
@@ -1,21 +1,1946 @@
1
- import 'whatwg-fetch';
2
- import 'es7-object-polyfill';
3
- export { PlayerProvider, withPlayerContext } from './components/PlayerProvider';
4
- export type { PlayerProviderProps } from './components/PlayerProvider';
5
- export { bundlePromise } from './services/bundlePromise';
6
- export * from './components/hooks';
7
- export * from './components/TivioProvider';
8
- export * from './components/TivioWidget';
9
- export * from './components/TivioWidgetError';
10
- export * from './components/TvTivioProvider';
11
- export * from './components/TivioWidgetLoader';
12
- export * from './types/customPlayer.types';
13
- export * from './services/bundleLoader';
14
- export * from './services/pubSub';
15
- export * from './types/types';
16
- export { Disposer } from './types/common';
17
- export { Empty } from './types/common';
18
- export { Nullable } from './types/common';
19
- export * from './types/bundle.types';
20
- export { setUser } from './services/login';
21
- export { showGdprConsentPreferences } from './services/gdpr';
1
+ import { ComponentType } from 'react';
2
+ import { default as firebase_2 } from 'firebase';
3
+ import type { default as firebase_3 } from 'firebase/app';
4
+ import { FunctionComponentElement } from 'react';
5
+ import { OrderByDirection } from '@firebase/firestore-types';
6
+ import { default as React_2 } from 'react';
7
+ import { WhereFilterOp } from '@firebase/firestore-types';
8
+
9
+ export declare interface AdExternal {
10
+ /**
11
+ * Can user seek out of it?
12
+ */
13
+ canSeek: boolean;
14
+ /**
15
+ * Can it be skipped right now?
16
+ */
17
+ canSkip: boolean;
18
+ durationMs: number;
19
+ /**
20
+ * Is it skippable in general?
21
+ */
22
+ isSkippable: boolean;
23
+ order: number | null;
24
+ secondsToSkippable: number | null;
25
+ /**
26
+ * Countdown for un-skippable ads
27
+ */
28
+ secondsToEnd: number;
29
+ skipDelayMs: number | null;
30
+ /**
31
+ * How many ads are there in total
32
+ */
33
+ totalCount: number | null;
34
+ click: () => void;
35
+ /**
36
+ * @private
37
+ */
38
+ skip: () => void;
39
+ }
40
+
41
+ declare type AdSegment = {
42
+ id: string;
43
+ /**
44
+ * @deprecated alias to secondsToEnd * 1000
45
+ */
46
+ remainingMs: number;
47
+ secondsToEnd: number;
48
+ secondsToSkippable: number | null;
49
+ canSeek: boolean;
50
+ /**
51
+ * true if is skippable and skip countdown has passed
52
+ */
53
+ canSkip: boolean;
54
+ /**
55
+ * true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
56
+ */
57
+ isSkippable: boolean;
58
+ skip: () => any;
59
+ };
60
+
61
+ export declare type AdSource = {
62
+ new (uri: string, name: string, description: string, skipDelayMs: number | null, adDurationMs: number, trackingContext?: any, // internal Tivio types
63
+ adMarker?: any, // internal Tivio types
64
+ packInfo?: any, // internal Tivio types
65
+ provider?: any): AdSource;
66
+ description: string;
67
+ name: string;
68
+ uri: string;
69
+ durationMs: number;
70
+ skipDelayMs: number | null;
71
+ type: 'ad';
72
+ /**
73
+ * true if is skippable and skip countdown has passed
74
+ */
75
+ canSkip: boolean;
76
+ /**
77
+ * true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
78
+ */
79
+ isSkippable: boolean;
80
+ /**
81
+ * Skip ad. Only works when canSkip is true
82
+ */
83
+ skip: () => void;
84
+ /**
85
+ * Order in ad break (ad break is a group of ads played right after each other)
86
+ */
87
+ order: number;
88
+ /**
89
+ * Total number of ads in ad break (ad break is a group of ads played right after each other)
90
+ */
91
+ totalCount: number;
92
+ secondsToEnd: number;
93
+ secondsToSkippable: number | null;
94
+ };
95
+
96
+ /**
97
+ * Index names in Algolia search engine.
98
+ *
99
+ * @public
100
+ */
101
+ export declare enum ALGOLIA_INDEX_NAME {
102
+ VIDEOS = "videos",
103
+ VIDEOSDESC = "videos_created_desc",
104
+ TAGS = "tags",
105
+ TV_CHANNELS = "tvChannels",
106
+ USERS = "users"
107
+ }
108
+
109
+ export declare interface Asset {
110
+ background: string;
111
+ }
112
+
113
+ export declare type Assets = {
114
+ [assetName: string]: ScalableAsset;
115
+ };
116
+
117
+ export declare type AuthOverlayPayload = {
118
+ prefilledData?: {
119
+ email: string;
120
+ };
121
+ /**
122
+ * "Goto" function (see router.utils.ts) to run after the overlay is closed. Null if no redirect is required.
123
+ * Defaults to homepage.
124
+ */
125
+ redirectAfterSubmit?: ((...args: any[]) => void) | null;
126
+ };
127
+
128
+ export declare type AuthOverlayState = {
129
+ type: AuthOverlayType;
130
+ closeAuthOverlay: () => void;
131
+ openAuthOverlay: (type: AuthOverlayType, payload?: AuthOverlayPayload) => void;
132
+ payload?: AuthOverlayPayload | null;
133
+ };
134
+
135
+ export declare type AuthOverlayType = 'login' | 'registration' | 'closed' | 'reset-password';
136
+
137
+ export declare interface AvailableSeason {
138
+ seasonNumber: number;
139
+ }
140
+
141
+ export declare type AvatarProps = {
142
+ cover?: string;
143
+ isLoading?: boolean;
144
+ size?: number;
145
+ };
146
+
147
+ export declare type BadRequestError = Error & {
148
+ details?: {
149
+ reason?: 'DOES_NOT_EXIST' | 'EXPIRED' | 'ALREADY_USED';
150
+ };
151
+ };
152
+
153
+ export declare type BannerProps = {
154
+ isLoading: boolean;
155
+ text: string;
156
+ focused: boolean;
157
+ onClick?: () => void;
158
+ hoverable: boolean;
159
+ broadcastInfo: string;
160
+ coverPadding: CoverPadding;
161
+ cover: string;
162
+ fullWidth: boolean;
163
+ height: number;
164
+ width: number;
165
+ overlay: boolean;
166
+ price: string;
167
+ hasRoundCorners: boolean;
168
+ buttonText?: string;
169
+ onButtonClick?: () => void;
170
+ };
171
+
172
+ export declare type BannerPropsPartial = Partial<BannerProps>;
173
+
174
+ export declare type BetOffer = {
175
+ betService: string;
176
+ league: string;
177
+ odds: {
178
+ winner: string;
179
+ rate: number;
180
+ }[];
181
+ sport: string;
182
+ opponent1: string;
183
+ opponent2: string;
184
+ time: Date;
185
+ };
186
+
187
+ /**
188
+ * rejects when bundle is not available
189
+ */
190
+ export declare const bundlePromise: Promise<RemoteBundleState>;
191
+
192
+ export declare interface Channel {
193
+ id: string;
194
+ name: string;
195
+ header: string;
196
+ headerLogo: string;
197
+ recentVideos: Video[];
198
+ }
199
+
200
+ export declare const ChannelsContext: React_2.Context<DataState<Channel>>;
201
+
202
+ export declare type ChannelSource = {
203
+ new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
204
+ description: string;
205
+ name: string;
206
+ uri: string;
207
+ from: Date;
208
+ channelName: string;
209
+ to: Date;
210
+ type: 'channel';
211
+ watchWithoutAdsRecommendation: {
212
+ showPurchaseDialog: () => void;
213
+ } | null;
214
+ };
215
+
216
+ export declare interface ChannelSourcePojo {
217
+ type: 'ChannelSource';
218
+ uri: string;
219
+ originalOptions: any;
220
+ channelName: string;
221
+ programName: string;
222
+ programDescription: string;
223
+ from: Date;
224
+ to: Date;
225
+ poster?: string;
226
+ }
227
+
228
+ export declare type Chapter = any;
229
+
230
+ export declare type Config = Pick<InternalConfig, 'bundleUrlOverride' | 'currency' | 'disableUnmounting' | 'capabilitiesOptions' | 'enable' | 'enableSentry' | 'ErrorComponent' | 'language' | 'LoaderComponent' | 'logger' | 'secret' | 'verbose' | 'forceCloudFnResolver'> & {
231
+ deviceCapabilities: PlayerCapability[] | 'auto';
232
+ /**
233
+ * @private
234
+ * Run HTML, CSS and JS feature support check
235
+ */
236
+ runFeatureSupportCheck?: boolean;
237
+ };
238
+
239
+ export declare type CoverPadding = {
240
+ top?: number;
241
+ bottom?: number;
242
+ left?: number;
243
+ right?: number;
244
+ };
245
+
246
+ export declare const createPubSub: () => PubSub;
247
+
248
+ /**
249
+ * Fetch & load CommonJS remote module.
250
+ */
251
+ export declare const createRemotePackageLoader: () => (secret: string, conf: InternalConfig) => Promise<TivioBundle>;
252
+
253
+ export declare const createUseRemoteBundle: () => (conf: InternalConfig) => RemoteBundleState;
254
+
255
+ export declare type CreateUserWithEmailAndPassword = (email: string, password: string, username?: string, referralToken?: string) => Promise<string | null>;
256
+
257
+ export declare const CURRENCIES: string[];
258
+
259
+ export declare type Currency = 'CZK' | 'EUR' | 'USD';
260
+
261
+ export declare enum CUSTOMER_BUILD {
262
+ OKTAGON = "OKTAGON",
263
+ JOJ = "JOJ",
264
+ MALL = "MALL",
265
+ GARAZ = "GARAZ",
266
+ U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
267
+ INVESTOREES = "INVESTOREES"
268
+ }
269
+
270
+ declare interface DataState<T> {
271
+ data: {
272
+ [key: string]: HookData<T>;
273
+ };
274
+ setData: (key: string, data: HookData<T>) => void;
275
+ }
276
+
277
+ export declare const DEFAULT_ORDER_BY: {
278
+ field: DefaultOrderByField;
279
+ directionStr: OrderByDirection;
280
+ }[];
281
+
282
+ export declare type DefaultOrderByField = 'created';
283
+
284
+ export declare type DetailedPrice = {
285
+ amount: number;
286
+ currency: Currency;
287
+ frequency?: MONETIZATION_FREQUENCY;
288
+ };
289
+
290
+ export declare type Disposer = () => void;
291
+
292
+ declare type Disposer_2 = () => void;
293
+
294
+ export declare type DividerProps = {
295
+ verticalSpacing?: number;
296
+ horizontalSpacing?: number;
297
+ };
298
+
299
+ export declare type DocumentOptions = Partial<{
300
+ lazyLoading: boolean;
301
+ subscribeOnChanges: boolean;
302
+ }>;
303
+
304
+ export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
305
+
306
+ export declare type Events = {
307
+ 'on-ready': RemoteBundleState;
308
+ 'on-error': Error;
309
+ };
310
+
311
+ export declare type ExternalTvConfig = {
312
+ logo: string;
313
+ };
314
+
315
+ /**
316
+ * @throws if fetch fails
317
+ */
318
+ export declare const fetchBundle: (secret: string, conf: InternalConfig) => Promise<string>;
319
+
320
+ /**
321
+ * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
322
+ * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
323
+ */
324
+ declare type FetchPackage = (url: string) => Promise<string>;
325
+
326
+ export declare interface GenericOnCallError {
327
+ code: string;
328
+ message?: string;
329
+ details?: string[];
330
+ }
331
+
332
+ /**
333
+ * Share singleton instance
334
+ */
335
+ export declare const getPubSub: () => PubSub;
336
+
337
+ declare interface HookData<T> {
338
+ data: PaginationData<T> | null;
339
+ error: Error | null;
340
+ isLoading: boolean;
341
+ }
342
+
343
+ export declare interface IndexedObject {
344
+ objectID: string;
345
+ path: string;
346
+ }
347
+
348
+ export declare interface IndexedTag extends IndexedObject {
349
+ tagId: string;
350
+ tagTypePath?: string;
351
+ organizationPath: string;
352
+ created: Date;
353
+ name: Translation;
354
+ description?: string;
355
+ }
356
+
357
+ export declare interface IndexedTvChannel extends IndexedObject {
358
+ channelKey: string;
359
+ created: Date;
360
+ filters: string[];
361
+ name: string;
362
+ organizationPath: string;
363
+ }
364
+
365
+ export declare interface IndexedUser extends IndexedObject {
366
+ authUserId: string;
367
+ type: string;
368
+ externalUserId?: string;
369
+ email?: string;
370
+ organizationPath?: string;
371
+ }
372
+
373
+ export declare interface IndexedVideo extends IndexedObject {
374
+ organizationPath?: string;
375
+ tagPaths?: string[];
376
+ created: Date;
377
+ isDraft: boolean;
378
+ type: VideoType;
379
+ contentType?: VideoContentType;
380
+ name: string;
381
+ description: string;
382
+ hide: boolean;
383
+ isDuplicate: boolean;
384
+ externals?: VideoExternals;
385
+ }
386
+
387
+ export declare type InputSource = AdSource | ChannelSource | VodTivioSource | VodExternalSource;
388
+
389
+ export declare type InternalConfig = {
390
+ /**
391
+ * @private URL of remote code bundle to be fetched directly (without using resolver)
392
+ */
393
+ bundleUrlOverride?: string;
394
+ currency: Currency;
395
+ /**
396
+ * Tells Tivio which technologies/protocols etc. is the device capable to play.
397
+ * If not provided, Tivio will try to guess it (based on the browser).
398
+ */
399
+ deviceCapabilities: PlayerCapability[];
400
+ /**
401
+ * Additional options for deviceCapabilities
402
+ */
403
+ capabilitiesOptions?: {
404
+ /**
405
+ * Should the player prefer HTTP sources instead HTTPs if they are available.
406
+ * This can be used on platforms that support mixed content but do not support
407
+ * specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
408
+ */
409
+ preferHttp?: boolean;
410
+ };
411
+ disableUnmounting?: boolean;
412
+ enable?: boolean;
413
+ enableSentry?: boolean;
414
+ ErrorComponent?: ComponentType<{
415
+ error: string | null;
416
+ }>;
417
+ fetchPackage: FetchPackage;
418
+ language?: LangCode;
419
+ LoaderComponent?: ComponentType;
420
+ logger?: Logger | null;
421
+ pubSub: PubSub;
422
+ /**
423
+ * @private URL of resolver. Resolver is a script used to fetch remove code bundle
424
+ */
425
+ resolverUrl: string;
426
+ sdkVersion: string;
427
+ secret: string | null;
428
+ verbose?: boolean;
429
+ /**
430
+ * @private
431
+ */
432
+ forceCloudFnResolver?: boolean;
433
+ };
434
+
435
+ export declare type InternalTvConfig = {
436
+ logo: string;
437
+ screens: ScreenConfig[];
438
+ };
439
+
440
+ declare interface IntroMarker {
441
+ marker: Marker;
442
+ skip: () => void;
443
+ }
444
+
445
+ export declare type ItemsInRow = Tag | Video | TvChannel;
446
+
447
+ /**
448
+ * Enum of all supported languages codes as in ISO 639-1
449
+ */
450
+ export declare enum LangCode {
451
+ CS = "cs",
452
+ DE = "de",
453
+ EN = "en",
454
+ FR = "fr",
455
+ PL = "pl",
456
+ SK = "sk",
457
+ SP = "sp"
458
+ }
459
+
460
+ /**
461
+ * All supported languages codes as in ISO 639-1
462
+ */
463
+ export declare const languages: LangCode[];
464
+
465
+ /**
466
+ * Possible language key of all supported language mutations.
467
+ */
468
+ export declare type LanguageType = `${LangCode}`;
469
+
470
+ export declare type LinkedVideo = {
471
+ video: Video;
472
+ type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
473
+ };
474
+
475
+ declare interface Logger {
476
+ /** important messages */
477
+ warn(...data: LoggerArgs): void;
478
+ /** errors */
479
+ error(...data: LoggerArgs): void;
480
+ /** critical errors */
481
+ exception(...data: LoggerArgs): void;
482
+ /** metrics */
483
+ info(...data: LoggerArgs): void;
484
+ /** non-production messages */
485
+ debug(...data: LoggerArgs): void;
486
+ }
487
+
488
+ /**
489
+ * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
490
+ * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
491
+ */
492
+ declare type LoggerArgs = any[];
493
+
494
+ export declare type Marker = {
495
+ id: string;
496
+ type: string;
497
+ from: Date;
498
+ to: Date;
499
+ count?: number;
500
+ fromMs?: number;
501
+ toMs?: number;
502
+ };
503
+
504
+ export declare interface Monetization {
505
+ id: string;
506
+ price?: string | number;
507
+ type?: MonetizationType;
508
+ frequency?: MONETIZATION_FREQUENCY;
509
+ name?: string;
510
+ description?: string;
511
+ benefits?: Translation[];
512
+ localizedBenefits?: string[];
513
+ }
514
+
515
+ export declare enum MONETIZATION_FREQUENCY {
516
+ ONE_TIME_PAYMENT = "ONE_TIME_PAYMENT",
517
+ DAILY = "DAILY",
518
+ WEEKLY = "WEEKLY",
519
+ MONTHLY = "MONTHLY",
520
+ ANNUALLY = "ANNUALLY"
521
+ }
522
+
523
+ export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
524
+
525
+ /**
526
+ * TODO: Duplicate, because we can't import types from core-js.
527
+ */
528
+ export declare type NewVoucher = {
529
+ expirationDate: Date | number;
530
+ };
531
+
532
+ export declare type Nullable<T> = {
533
+ [P in keyof T]: T[P] | null;
534
+ };
535
+
536
+ export declare type ObjectType = Record<string, any>;
537
+
538
+ export declare interface OrderBy {
539
+ field: string;
540
+ directionStr?: OrderByDirection;
541
+ }
542
+
543
+ export declare interface Organization {
544
+ }
545
+
546
+ declare type PaginationData<T> = {
547
+ items: T[];
548
+ hasNextPage: boolean;
549
+ fetchMore: Function;
550
+ };
551
+
552
+ export declare type PaginationInterface<Entity> = {
553
+ items: Entity[];
554
+ fetchMore: () => void;
555
+ hasNextPage?: boolean;
556
+ loading?: boolean;
557
+ };
558
+
559
+ export declare type PaginationOptions = Partial<{
560
+ limit: number;
561
+ noLimit: boolean;
562
+ }>;
563
+
564
+ export declare enum PLATFORM {
565
+ MOBILE = "MOBILE",
566
+ WEB = "WEB",
567
+ TV = "TV"
568
+ }
569
+
570
+ export declare interface PlayerCapability {
571
+ codec: 'h264' | 'h265';
572
+ encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
573
+ protocol: 'dash' | 'hls';
574
+ }
575
+
576
+ export declare interface PlayerInterface {
577
+ pause: () => void;
578
+ /**
579
+ * unpause
580
+ */
581
+ play: () => void;
582
+ /**
583
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
584
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
585
+ */
586
+ seekTo: (ms: number) => void;
587
+ /**
588
+ * Source to be passed to player.
589
+ *
590
+ * Depending on autoplay settings it should either start playing
591
+ * immediately or just be loaded by player and stay paused.
592
+ */
593
+ setSource: (source: InputSource | null) => void;
594
+ /**
595
+ * volume in [0,1]
596
+ */
597
+ setVolume?: (volume: number) => void;
598
+ mute?: () => void;
599
+ /**
600
+ * restore volume to previous value
601
+ */
602
+ unmute?: () => void;
603
+ }
604
+
605
+ export declare const PlayerProvider: ({ children, playerWrapperId, }: PlayerProviderProps) => FunctionComponentElement<PlayerProviderProps>;
606
+
607
+ export declare type PlayerProviderProps = {
608
+ children: React_2.ReactNode;
609
+ playerWrapperId?: string;
610
+ };
611
+
612
+ declare type PlayerState = 'playing' | 'paused' | 'idle';
613
+
614
+ export declare type PlayerWrapper = {
615
+ /**
616
+ * Report that playback of video has finished
617
+ */
618
+ onPlaybackEnded: () => void;
619
+ /**
620
+ * Report video progress in milliseconds
621
+ */
622
+ onTimeChanged: (ms: number) => void;
623
+ /**
624
+ * Report that video state changed
625
+ */
626
+ onStateChanged: (state: PlayerState) => void;
627
+ /**
628
+ * Send source to Tivio
629
+ */
630
+ onSourceChanged: (source: InputSource | null) => void;
631
+ /**
632
+ * Report that video failed to load (never started playing)
633
+ */
634
+ onLoadError: (error: Error) => void;
635
+ /**
636
+ * Report that video failed during playback (successfully loaded and then failed, e.g. part of stream is invalid)
637
+ */
638
+ onError: (error: Error) => void;
639
+ /**
640
+ * Unpause video
641
+ */
642
+ play: () => void;
643
+ /**
644
+ * Pause video
645
+ */
646
+ pause: () => void;
647
+ /**
648
+ * Currently playing source
649
+ */
650
+ source: InputSource | null;
651
+ events: {
652
+ isSupported: (even: string) => boolean;
653
+ addListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
654
+ removeListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
655
+ removeAllListeners: () => void;
656
+ };
657
+ /**
658
+ * Register a low level player that implements player methods, like play video, change volume, etc.
659
+ */
660
+ register: (playerInterface: PlayerInterface) => void;
661
+ /**
662
+ * duration of current source in ms (both setter and getter)
663
+ */
664
+ durationMs: number | null;
665
+ isPlaybackStarted: boolean;
666
+ isPaused: boolean;
667
+ isPlaying: boolean;
668
+ isIdle: boolean;
669
+ error: Error | null;
670
+ /**
671
+ * Replay the video that finished playback
672
+ */
673
+ replay: () => void;
674
+ /**
675
+ * Retry to play a video that failed to start playing (e.g. due to a network error)
676
+ */
677
+ retry: () => void;
678
+ togglePlayPause: () => void;
679
+ seekTo: (ms: number) => void;
680
+ /**
681
+ * set volume to value between 0,1
682
+ */
683
+ setVolume: (volume: number) => void;
684
+ /**
685
+ * change volume by value between -1,1
686
+ */
687
+ changeVolumeBy: (volume: number) => void;
688
+ setMuted: (muted: boolean) => void;
689
+ toggleMuted: () => void;
690
+ };
691
+
692
+ export declare interface PubSub {
693
+ publish: <K extends keyof Events>(triggerName: K, payload: Events[K]) => Empty;
694
+ subscribe: <K extends keyof Events>(triggerName: K, onMessage: (data: Events[K]) => Empty) => Disposer;
695
+ }
696
+
697
+ export declare type Purchase = {
698
+ id: string;
699
+ isPurchased: boolean;
700
+ monetizationRef: firebase_3.firestore.DocumentReference | null;
701
+ monetization: PurchaseMonetization | null;
702
+ monetizationId: string | null;
703
+ type: MonetizationType | null;
704
+ videoId: string | null;
705
+ status: PurchaseStatus | null;
706
+ video: Video | null;
707
+ videoRef: firebase_3.firestore.DocumentReference | null;
708
+ expirationDate: Date | null;
709
+ isExpired: boolean;
710
+ voucherId?: string;
711
+ };
712
+
713
+ export declare type PurchaseMonetization = {
714
+ currency: Currency;
715
+ period: number;
716
+ price: number;
717
+ type: MonetizationType;
718
+ title: string;
719
+ frequency: MONETIZATION_FREQUENCY | null;
720
+ /**
721
+ * If set, purchase (subscription) activated by voucher will stay valid for this amount of seconds.
722
+ * Otherwise, purchase will be valid for one "monetization frequency" period.
723
+ */
724
+ voucherPurchaseDuration?: number;
725
+ };
726
+
727
+ export declare enum PurchaseStatus {
728
+ NEW = "NEW",
729
+ PAID = "PAID",
730
+ CANCELLED = "CANCELLED",
731
+ ERROR = "ERROR"
732
+ }
733
+
734
+ export declare interface QerkoCancellationInfo {
735
+ purchaseId: string;
736
+ status: PurchaseStatus;
737
+ }
738
+
739
+ export declare interface QerkoData {
740
+ monetization: Monetization;
741
+ video?: Video;
742
+ onPurchase?: () => void;
743
+ onClose?: () => void;
744
+ }
745
+
746
+ export declare interface QerkoOverlayState {
747
+ data: QerkoData | null;
748
+ openQerkoOverlay: ((data: QerkoData) => void);
749
+ closeQerkoOverlay: () => void;
750
+ }
751
+
752
+ export declare interface QerkoPaymentInfo {
753
+ webPaymentGatewayLink: string;
754
+ gatewayUri: string;
755
+ paymentQRCodeUri: string;
756
+ purchaseId: string;
757
+ currency: string;
758
+ amount: number;
759
+ monetizationType: MonetizationType;
760
+ recovery?: boolean;
761
+ monetizationFrequency: MONETIZATION_FREQUENCY;
762
+ }
763
+
764
+ export declare interface QerkoPaymentProps {
765
+ transaction: QerkoTransaction;
766
+ qrCodeCaption?: string;
767
+ renderErrorComponent: () => any;
768
+ enablePayByCard?: boolean;
769
+ payByCardCaption?: string;
770
+ visaLogoUrl?: string;
771
+ masterCardLogoUrl?: string;
772
+ }
773
+
774
+ export declare interface QerkoTransaction {
775
+ paymentInfo: QerkoPaymentInfo | null;
776
+ paymentError: string | null;
777
+ paymentStatus: string | null;
778
+ getPaymentInfo: () => Promise<void>;
779
+ voucherId?: string;
780
+ }
781
+
782
+ export declare type RemoteBundleState = {
783
+ config: InternalConfig;
784
+ error: string | null;
785
+ settings: Settings;
786
+ state: 'loading' | 'error' | 'ready';
787
+ } & Nullable<TivioBundle>;
788
+
789
+ export declare type RemoteProviderProps = {
790
+ disableUnmounting?: boolean;
791
+ language?: string;
792
+ };
793
+
794
+ export declare interface RouterOverrides {
795
+ goToVideoDetailPage: (videoId: string) => void;
796
+ goToSeriesDetailPage: (tagId: string) => void;
797
+ goToTagPage: (tagId: string) => void;
798
+ goToLoginScreen: () => void;
799
+ goBack: () => void;
800
+ goLivePlayer: (videoId: string) => void;
801
+ goVodPlayer: (tvChannelId: string) => void;
802
+ }
803
+
804
+ export declare interface RouterOverridesContextState {
805
+ routerOverrides: RouterOverrides;
806
+ }
807
+
808
+ export declare interface Row {
809
+ id: string;
810
+ rowId: string;
811
+ name: string;
812
+ description?: string;
813
+ itemComponent: RowItemComponent;
814
+ rowComponent: RowComponent;
815
+ assets: Assets;
816
+ type: ScreenRowType;
817
+ }
818
+
819
+ export declare enum ROW_ITEM_TYPES {
820
+ VIDEO = "VIDEO",
821
+ TAG = "TAG",
822
+ TV_CHANNEL = "TV_CHANNEL"
823
+ }
824
+
825
+ export declare enum RowComponent {
826
+ ROW = "ROW",
827
+ BANNER = "BANNER"
828
+ }
829
+
830
+ export declare interface RowItem extends RowItemAssets {
831
+ itemType: ROW_ITEM_TYPES;
832
+ name?: string;
833
+ description?: string;
834
+ assets: Assets | null;
835
+ }
836
+
837
+ export declare interface RowItemAssets {
838
+ landscape?: string | null;
839
+ portrait?: string | null;
840
+ circled?: string | null;
841
+ banner?: string | null;
842
+ }
843
+
844
+ export declare enum RowItemComponent {
845
+ ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
846
+ ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
847
+ ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
848
+ }
849
+
850
+ /**
851
+ * Listen to items in row of a screen
852
+ * @param rowId - row ID (user defined ID via studio.tiv.io)
853
+ * @param cb - callback on items changes or error, with information
854
+ * whether data is loading and a fetchMore function
855
+ * @param limit - max item count (default 10)
856
+ * @returns Disposer
857
+ */
858
+ export declare type RowItemsSubscription = (rowId: string, cb: (error: Error | null, data: {
859
+ items: Video[];
860
+ hasNextPage: boolean;
861
+ } | null, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => Disposer_2;
862
+
863
+ export declare type ScalableAsset = {
864
+ '@1': Asset;
865
+ '@2'?: Asset;
866
+ '@3'?: Asset;
867
+ };
868
+
869
+ export declare type Scale = '@1' | '@2' | '@3';
870
+
871
+ declare interface Screen_2 {
872
+ id: string;
873
+ name: string;
874
+ description?: string;
875
+ assets: Assets;
876
+ rows: Row[];
877
+ }
878
+ export { Screen_2 as Screen }
879
+
880
+ export declare type ScreenConfig = {
881
+ id: string;
882
+ name: string;
883
+ };
884
+
885
+ export declare type ScreenOptions = Partial<{
886
+ language: LangCode;
887
+ initRows: boolean;
888
+ }> & DocumentOptions;
889
+
890
+ export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites';
891
+
892
+ /**
893
+ * Listen to screen data
894
+ * @param screenId - screen ID (user defined ID via studio.tiv.io)
895
+ * @param cb - callback on screen data change or error
896
+ * @returns Disposer
897
+ */
898
+ export declare type ScreenSubscription = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void) => Disposer_2;
899
+
900
+ export declare interface Section {
901
+ id: string;
902
+ name: string;
903
+ channel: Channel;
904
+ videos: Video[];
905
+ }
906
+
907
+ export declare const SectionsContext: React_2.Context<DataState<Section>>;
908
+
909
+ export declare type Settings = {
910
+ /**
911
+ * @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
912
+ */
913
+ setUser: (userId: string, userPayload: unknown) => Promise<void>;
914
+ };
915
+
916
+ /**
917
+ * Used for entities, that can be global (e.g. asset presets, tag types).
918
+ * Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
919
+ * Global is stored in separate collection and shown only for super-admin.
920
+ */
921
+ export declare interface SettingsItem {
922
+ name: string;
923
+ isGlobal?: boolean;
924
+ }
925
+
926
+ /**
927
+ * Set user to sign in/out.
928
+ *
929
+ * Sign in - setUser('userID', { token: 'xxx' })
930
+ * Sign out - setUser(null)
931
+ */
932
+ export declare const setUser: (userId: string | null, payload?: UserPayload | undefined) => Promise<void>;
933
+
934
+ export declare const showGdprConsentPreferences: () => Promise<void>;
935
+
936
+ export declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error | null, data: PaginationInterface<ItemsInRow> | null) => void, options?: SubscribeToItemsInRowOptions) => Disposer_2;
937
+
938
+ export declare type SubscribeToItemsInRowOptions = Partial<{
939
+ fetchTags: boolean;
940
+ }> & PaginationOptions;
941
+
942
+ export declare type SubscribeToRowsInScreen = (screenId: string, cb: (error: Error | null, data: PaginationInterface<Row> | null) => void, options?: PaginationOptions) => Disposer_2;
943
+
944
+ export declare type SubscribeToScreen = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void, options?: ScreenOptions) => Disposer_2;
945
+
946
+ export declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Error | null, data: PaginationInterface<Video> | null) => void, options?: SubscribeToTaggedVideosOptions) => Disposer_2;
947
+
948
+ export declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOptions & {
949
+ orderBy?: (Omit<OrderBy, 'field'> & {
950
+ field: TaggedVideosOrderByField;
951
+ })[];
952
+ where?: WhereFilter[];
953
+ };
954
+
955
+ export declare interface SubscriptionCardProps {
956
+ subscription: Monetization;
957
+ onClick: (subscription: Monetization) => void;
958
+ buttonLabel: string;
959
+ purchased: boolean;
960
+ focused?: boolean;
961
+ }
962
+
963
+ declare type SubscriptionInfo = {
964
+ type: 'subscription';
965
+ name: string;
966
+ benefits: string[];
967
+ frequency: string;
968
+ };
969
+
970
+ export declare interface SubscriptionOverlayData {
971
+ subscriptions?: Monetization[];
972
+ onPurchase?: () => void;
973
+ onClose?: () => void;
974
+ }
975
+
976
+ export declare type SubscriptionOverlayState = {
977
+ data: SubscriptionOverlayData | null;
978
+ closeSubscriptionOverlay: () => void;
979
+ openSubscriptionOverlay: (data: SubscriptionOverlayData) => void;
980
+ };
981
+
982
+ export declare interface Tag extends RowItem {
983
+ id: string;
984
+ tagId: string;
985
+ type?: string | null;
986
+ metadata?: any[];
987
+ color?: string;
988
+ detailBanner?: string;
989
+ availableSeasons?: AvailableSeason[];
990
+ isFavorite: boolean;
991
+ addToFavorites: () => void;
992
+ removeFromFavorites: () => void;
993
+ }
994
+
995
+ export declare type TaggedVideosOrderByField = 'seasonNumber' | 'episodeNumber' | 'contentType' | DefaultOrderByField;
996
+
997
+ export declare type TileProps = {
998
+ cover: string;
999
+ isLoading: boolean;
1000
+ bottomLabel: string;
1001
+ bottomLabelAreaHeight: number;
1002
+ innerLabel: string;
1003
+ duration: string;
1004
+ price: string | null;
1005
+ focused: boolean;
1006
+ onClick?: () => void;
1007
+ hoverable: boolean;
1008
+ overlay: boolean;
1009
+ coverPadding: CoverPadding;
1010
+ variant: RowItemComponent;
1011
+ coverWidth: number;
1012
+ progress?: number;
1013
+ time?: string;
1014
+ logo?: string;
1015
+ coverHeight: number;
1016
+ /**
1017
+ * Margin of inner TileContainer.
1018
+ * Now used for backward compatibility for WebTileGrid. Consider to use it other way.
1019
+ */
1020
+ containerMargin?: number | string;
1021
+ };
1022
+
1023
+ export declare type TilePropsPartial = Partial<TileProps>;
1024
+
1025
+ export declare interface TivioAuth {
1026
+ changePassword: (newPassword: string) => Promise<void>;
1027
+ changeUserPhoto(file: File): Promise<void>;
1028
+ removeUserPhoto(): Promise<void>;
1029
+ getPurchasedVodsWithInitializedVideos: () => Promise<Purchase[]>;
1030
+ /**
1031
+ * @param email
1032
+ * @param password
1033
+ */
1034
+ createUserWithEmailAndPassword: CreateUserWithEmailAndPassword;
1035
+ /**
1036
+ * Sign in the user and starts listening on his purchases
1037
+ * @param email
1038
+ * @param password
1039
+ */
1040
+ signInWithEmailAndPassword: (email: string, password: string) => Promise<void>;
1041
+ initializeUser: () => Promise<void>;
1042
+ signOut: () => Promise<void>;
1043
+ /**
1044
+ * Used for reset forgotten password by user
1045
+ */
1046
+ resetPassword: (email: string) => Promise<void>;
1047
+ createFreePurchase: (monetizationId: string) => Promise<void>;
1048
+ }
1049
+
1050
+ export declare type TivioBundle = {
1051
+ components: TivioComponents;
1052
+ getters: TivioGetters;
1053
+ auth: TivioAuth;
1054
+ hooks: TivioHooks;
1055
+ init: (config: Config) => void | Promise<void>;
1056
+ purchaseVideoWithQerko: (videoId: string, monetizationId: string, voucher?: {
1057
+ expirationDate: Date;
1058
+ }) => Promise<QerkoPaymentInfo>;
1059
+ purchaseSubscriptionWithQerko: (monetizationId: string, voucher?: {
1060
+ expirationDate: Date;
1061
+ }) => Promise<QerkoPaymentInfo>;
1062
+ cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
1063
+ setLanguage: (language: LangCode) => void;
1064
+ setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1065
+ showConsentPreferences: () => void;
1066
+ sources: TivioSources;
1067
+ subscriptions: TivioSubscriptions;
1068
+ internal: {
1069
+ components: TivioInternalComponents;
1070
+ hooks: TivioInternalHooks;
1071
+ providers: TivioInternalProviders;
1072
+ };
1073
+ };
1074
+
1075
+ export declare type TivioBundleFile = {
1076
+ Tivio: TivioBundle;
1077
+ };
1078
+
1079
+ export declare type TivioComponents = {
1080
+ AdIndicationButtonWeb: React_2.ReactNode;
1081
+ Markers: React_2.ReactNode;
1082
+ PlayerDataContext: React_2.ReactNode;
1083
+ Provider: React_2.ComponentType<RemoteProviderProps>;
1084
+ Recommendation: React_2.ReactNode;
1085
+ SkipButtonWeb: React_2.ReactNode;
1086
+ /**
1087
+ * @deprecated will be removed in in @tivio/sdk-react@4
1088
+ */
1089
+ VideoAdBanner: React_2.ReactNode;
1090
+ WebPlayer: React_2.ComponentType<WebPlayerProps>;
1091
+ Widget: React_2.ComponentType<TivioWidgetProps>;
1092
+ TvPlayer: React_2.ComponentType<WebPlayerProps>;
1093
+ PlayerDataContextProvider: React_2.ComponentType<{
1094
+ id: string;
1095
+ }>;
1096
+ SkipButtonTv: React_2.ComponentType<{
1097
+ Button: React_2.ComponentType;
1098
+ Label: React_2.ComponentType;
1099
+ Container: React_2.ComponentType;
1100
+ onStarted?: () => any;
1101
+ onEnded?: () => any;
1102
+ }>;
1103
+ TvApp: React_2.ComponentType<TvAppProps>;
1104
+ CustomerScreen: React_2.ComponentType<{
1105
+ screenId: string;
1106
+ }>;
1107
+ WebTagScreen: React_2.ComponentType<{
1108
+ tagId: string;
1109
+ onError?: (error: Error) => void;
1110
+ }>;
1111
+ WebSearchScreen: React_2.ComponentType<{
1112
+ searchQuery?: string;
1113
+ }>;
1114
+ WebRow: React_2.ComponentType<WebRowProps>;
1115
+ WebTile: React_2.ComponentType<{
1116
+ item?: Video | Tag;
1117
+ } & TilePropsPartial>;
1118
+ FeatureSupportCheck: React_2.ComponentType<{}>;
1119
+ };
1120
+
1121
+ export declare const TivioContext: React_2.Context<RemoteBundleState | null>;
1122
+
1123
+ export declare type TivioGetters = {
1124
+ isTivioLoaded: (cb: (isLoaded: boolean) => void) => boolean;
1125
+ isSignedIn: () => boolean;
1126
+ /**
1127
+ * Get channel by its id.
1128
+ * @param channelId - channel id
1129
+ * @returns {Promise<Channel | null>} channel or null if channel does not exists
1130
+ */
1131
+ getChannelById: (channelId: string) => Promise<Channel | null>;
1132
+ /**
1133
+ * Get (or create) player wrapper instance
1134
+ * @param opt - player getter options
1135
+ * @returns {PlayerWrapper} player wrapper instance
1136
+ */
1137
+ getPlayerWrapper: (opt: {
1138
+ playerWrapperId?: string;
1139
+ }) => PlayerWrapper;
1140
+ getOrganizationScreens: () => Promise<Screen_2[]>;
1141
+ getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
1142
+ /**
1143
+ * Get section by its id.
1144
+ * @param sectionId - section id
1145
+ * @returns {Promise<{section: Section, channel: Channel} | null>} section and channel or null if channel or section does not exists
1146
+ */
1147
+ getSectionById: (sectionId: string) => Promise<Section | null>;
1148
+ /**
1149
+ * Get video by its id.
1150
+ * @param videoId - video id
1151
+ * @returns {Promise<Video | null>} video or null if video does not exists
1152
+ */
1153
+ getVideoById: (videoId: string) => Promise<Video | null>;
1154
+ /**
1155
+ * Get widget by its id.
1156
+ * @param widgetId - widget id
1157
+ * @returns {Promise<Widget | null>} widget or null if widget does not exists
1158
+ */
1159
+ getWidgetById: (widgetId: string) => Promise<Widget | null>;
1160
+ /**
1161
+ * Get player capabilities based on user's browser and OS as resolved by Tivio.
1162
+ * @returns PlayerCapability[]
1163
+ */
1164
+ getPlayerCapabilities: () => PlayerCapability[];
1165
+ };
1166
+
1167
+ export declare type TivioHooks = {
1168
+ useAd: () => [(AdSource | null)];
1169
+ useAdSegment: () => AdSegment | null;
1170
+ useCancelSubscription: UseCancelSubscription;
1171
+ useItemsInRow: (rowId: string, options: PaginationOptions) => {
1172
+ pagination: PaginationInterface<ItemsInRow> | null;
1173
+ error: Error | null;
1174
+ };
1175
+ usePurchaseRecovery: () => {
1176
+ purchaseRecoveryResult?: string;
1177
+ loading: boolean;
1178
+ error?: GenericOnCallError;
1179
+ purchaseRecovery: (monetizationId: string) => void;
1180
+ };
1181
+ useRowsInScreen: (screenId: string, options: PaginationOptions) => {
1182
+ pagination: PaginationInterface<Row> | null;
1183
+ error: Error | null;
1184
+ };
1185
+ useTaggedVideos: (tagIds: string[], options: SubscribeToItemsInRowOptions) => {
1186
+ pagination: PaginationInterface<Video> | null;
1187
+ error: Error | null;
1188
+ };
1189
+ useSearch: UseSearch;
1190
+ useVideo: (videoId: string) => {
1191
+ data: Video | null;
1192
+ error: string | null;
1193
+ };
1194
+ useVoucher: (voucherId: string) => any;
1195
+ /**
1196
+ * @deprecated will be removed in version
1197
+ */
1198
+ useLastVideoByWidgetId: (widgetId: string) => Video | null;
1199
+ useWatchWithoutAdsOffer: () => {
1200
+ canPurchaseWatchWithoutAds: boolean;
1201
+ showPurchaseDialog: () => void;
1202
+ };
1203
+ useApplyInviteCode: () => {
1204
+ applyInviteCodeResult?: boolean;
1205
+ loading: boolean;
1206
+ error?: GenericOnCallError;
1207
+ applyInviteCode: (code: string) => void;
1208
+ inviteCodeReset: () => void;
1209
+ };
1210
+ };
1211
+
1212
+ export declare type TivioInternalComponents = {
1213
+ PrimaryButton: React_2.ComponentType;
1214
+ WebLandingScreen: React_2.ComponentType<{
1215
+ logo?: string;
1216
+ }>;
1217
+ WebVideoScreen: React_2.ComponentType<{
1218
+ videoId: string;
1219
+ }>;
1220
+ WebSeriesDetailScreen: React_2.ComponentType<WebSeriesDetailScreenProps>;
1221
+ };
1222
+
1223
+ export declare type TivioInternalHooks = {
1224
+ useAuthOverlay: () => AuthOverlayState;
1225
+ useSubscriptionsOverlay: () => SubscriptionOverlayState;
1226
+ useQerkoOverlay: () => QerkoOverlayState;
1227
+ usePurchasesWithVideos: () => {
1228
+ purchases: Purchase[];
1229
+ };
1230
+ useOrganizationSubscriptions: () => {
1231
+ subscriptions: Monetization[];
1232
+ };
1233
+ useIsMonetizationPurchased: () => {
1234
+ isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
1235
+ };
1236
+ useReferralInfo: any;
1237
+ useTvChannel: UseTvChannel;
1238
+ useChannelSource: UseChannelSource;
1239
+ useUser: () => {
1240
+ user: User | null;
1241
+ error: string | null;
1242
+ isInitialized: boolean;
1243
+ };
1244
+ };
1245
+
1246
+ export declare type TivioInternalProviders = {
1247
+ AppThemeProvider: React_2.ComponentType;
1248
+ AuthOverlayContextProvider: React_2.ComponentType;
1249
+ CustomerProvider: React_2.ComponentType<{
1250
+ customer: CUSTOMER_BUILD;
1251
+ platform: PLATFORM;
1252
+ children: any;
1253
+ }>;
1254
+ ConfigProvider: React_2.ComponentType;
1255
+ UserContextProvider: React_2.ComponentType;
1256
+ SubscriptionOverlayContextProvider: React_2.ComponentType;
1257
+ QerkoOverlayContextProvider: React_2.ComponentType;
1258
+ PurchasesWithVideosContextProvider: React_2.ComponentType;
1259
+ OrganizationSubscriptionsContextProvider: React_2.ComponentType;
1260
+ RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
1261
+ };
1262
+
1263
+ export declare const TivioProvider: React_2.FC<TivioProviderProps>;
1264
+
1265
+ export declare type TivioProviderProps = {
1266
+ /**
1267
+ * This prop must be set only once and not change value afterwards
1268
+ */
1269
+ conf: Config | undefined | null;
1270
+ children: React_2.ReactNode;
1271
+ };
1272
+
1273
+ export declare type TivioSources = {
1274
+ AdSource: any;
1275
+ ChannelSource: any;
1276
+ VodExternalSource: any;
1277
+ VodTivioSource: any;
1278
+ };
1279
+
1280
+ export declare type TivioSubscriptions = {
1281
+ subscribeToUser: (cb: (error: string | null, user: User | null) => void) => void;
1282
+ /**
1283
+ * Listen to widget changes.
1284
+ * @param widgetId - widget id
1285
+ * @param cb - callback on widget updates or on error
1286
+ */
1287
+ subscribeToWidget: (widgetId: string, cb: (error: Error | null, data: Widget | null, disposer?: Disposer) => void) => void;
1288
+ /**
1289
+ * Listen to channel changes.
1290
+ * @param channelId - channel id
1291
+ * @param cb - callback on channel updates or on error
1292
+ */
1293
+ subscribeToChannel: (channelId: string, cb: (error: Error | null, data: Channel | null) => void) => void;
1294
+ /**
1295
+ * Listen to section changes.
1296
+ * @param sectionId - section id
1297
+ * @param cb - callback on section updates or on error
1298
+ */
1299
+ subscribeToSection: (sectionId: string, cb: (error: Error | null, data: Section | null) => void) => void;
1300
+ /**
1301
+ * Listen to video changes.
1302
+ * @param videoId - video id
1303
+ * @param cb - callback on video updates or on error
1304
+ */
1305
+ subscribeToVideo: (videoId: string, cb: (error: Error | null, data: Video | null, disposer?: Disposer) => void) => void;
1306
+ /**
1307
+ * Listen to videos in section changes.
1308
+ * @param sectionId - section id
1309
+ * @param cb - callback on videos change or error
1310
+ * @param limit - videos count
1311
+ */
1312
+ subscribeToVideosInSection: (sectionId: string, cb: (error: null | Error, data: null | {
1313
+ videos: Video[];
1314
+ hasNextPage: boolean;
1315
+ }, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
1316
+ /**
1317
+ * Listen to section in channel changes
1318
+ * @param channelId - channel id
1319
+ * @param cb - callback on sections change or error
1320
+ * @param limit - sections count
1321
+ */
1322
+ subscribeToSectionsInChannel: (channelId: string, cb: (error: null | Error, data: null | {
1323
+ sections: Section[];
1324
+ hasNextPage: boolean;
1325
+ }, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
1326
+ /**
1327
+ * Listen to channels in widget changes
1328
+ * @param widgetId - widget id
1329
+ * @param cb - callback on channels change or error
1330
+ * @param limit - channels count
1331
+ */
1332
+ subscribeToChannelsInWidget: (widgetId: string, cb: (error: null | Error, data: null | {
1333
+ channels: Channel[];
1334
+ hasNextPage: boolean;
1335
+ }, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
1336
+ subscribeToScreen: SubscribeToScreen;
1337
+ subscribeToItemsInRow: SubscribeToItemsInRow;
1338
+ subscribeToRowsInScreen: SubscribeToRowsInScreen;
1339
+ subscribeToTaggedVideos: SubscribeToTaggedVideos;
1340
+ registerOverlayCallbacks: (callbacks: {
1341
+ onShow: () => void;
1342
+ onHide: () => void;
1343
+ }) => void;
1344
+ };
1345
+
1346
+ export declare const TivioWidget: React_2.ForwardRefExoticComponent<Pick<TivioWidgetProps, "id" | "onEnabled" | "onBlur"> & React_2.RefAttributes<TivioWidgetRef>>;
1347
+
1348
+ export declare const TivioWidgetError: React_2.FC<TivioWidgetErrorProps>;
1349
+
1350
+ declare type TivioWidgetErrorProps = {
1351
+ error: string | null;
1352
+ };
1353
+
1354
+ export declare const TivioWidgetLoader: React_2.FC;
1355
+
1356
+ export declare interface TivioWidgetProps {
1357
+ id: string;
1358
+ ref: React_2.MutableRefObject<TivioWidgetRef>;
1359
+ onEnabled?: (enabled: boolean) => any;
1360
+ onBlur?: (event: {
1361
+ key: string;
1362
+ width: number;
1363
+ x: number;
1364
+ }) => any;
1365
+ }
1366
+
1367
+ export declare interface TivioWidgetRef {
1368
+ focus: (args: {
1369
+ x?: number;
1370
+ }) => void;
1371
+ handleKey: (key: string) => ({
1372
+ handled: boolean;
1373
+ x: number;
1374
+ });
1375
+ unfocus: () => ({
1376
+ x: number;
1377
+ });
1378
+ }
1379
+
1380
+ declare type TransactionInfo = {
1381
+ type: 'transaction';
1382
+ name: string;
1383
+ videoId: string;
1384
+ cover: string;
1385
+ description: string;
1386
+ };
1387
+
1388
+ /**
1389
+ * Represents one string in every supported language mutation.
1390
+ */
1391
+ export declare type Translation = {
1392
+ [key in LangCode]: string;
1393
+ };
1394
+
1395
+ export declare type TvAppProps = {
1396
+ customer: CUSTOMER_BUILD;
1397
+ };
1398
+
1399
+ export declare interface TvChannel extends RowItem {
1400
+ name: string;
1401
+ id: string;
1402
+ path: string;
1403
+ itemType: ROW_ITEM_TYPES;
1404
+ country?: string;
1405
+ filters: string[];
1406
+ logo?: string;
1407
+ hls: string;
1408
+ dash: string;
1409
+ purchasableMonetization: any | null;
1410
+ price: number;
1411
+ }
1412
+
1413
+ export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
1414
+
1415
+ export declare const useAd: () => AdSource | null;
1416
+
1417
+ export declare const useAdSegment: () => {
1418
+ id: string;
1419
+ remainingMs: number;
1420
+ secondsToEnd: number;
1421
+ secondsToSkippable: number | null;
1422
+ canSeek: boolean;
1423
+ canSkip: boolean;
1424
+ isSkippable: boolean;
1425
+ skip: () => any;
1426
+ } | null;
1427
+
1428
+ /**
1429
+ * Is used to login user through different device in which user is already logged in.
1430
+ * (e.g. login in tv app through web app)
1431
+ *
1432
+ * @return applyInviteCodeResult - true if code was applied successfully, false otherwise.
1433
+ * loading - loading state
1434
+ * error - error in case request failure
1435
+ * applyInviteCode - function to apply invite code
1436
+ * inviteCodeReset - function to reset to initial state
1437
+ */
1438
+ export declare function useApplyInviteCode(): {
1439
+ applyInviteCodeResult?: boolean | undefined;
1440
+ loading: boolean;
1441
+ error?: GenericOnCallError | undefined;
1442
+ applyInviteCode: (code: string) => void;
1443
+ inviteCodeReset: () => void;
1444
+ };
1445
+
1446
+ export declare const useBetOffer: () => BetOffer | null;
1447
+
1448
+ export declare type UseCancelSubscription = (subscriptionId: string) => {
1449
+ cancelSubscription: () => Promise<void>;
1450
+ cancellationInfo: QerkoCancellationInfo | null;
1451
+ error?: string | null;
1452
+ };
1453
+
1454
+ export declare const useCancelSubscription: UseCancelSubscription;
1455
+
1456
+ /**
1457
+ * Use channel
1458
+ * @param channelId - channel id
1459
+ */
1460
+ export declare const useChannel: (channelId: string) => {
1461
+ error: string | null;
1462
+ data: Channel | null;
1463
+ };
1464
+
1465
+ /**
1466
+ * Use channels in widget
1467
+ * @param widgetId - widget id
1468
+ * @param [limit] - channels count, defaults to 10
1469
+ */
1470
+ export declare const useChannelsInWidget: (widgetId: string, limit?: number) => {
1471
+ error: Error | null;
1472
+ data: PaginationData<Channel> | null;
1473
+ isLoading: boolean;
1474
+ };
1475
+
1476
+ export declare type UseChannelSource = (tvChannelId: string) => {
1477
+ source: ChannelSourcePojo | null;
1478
+ error: Error | null;
1479
+ };
1480
+
1481
+ export declare const useCurrentMarker: () => Marker | null;
1482
+
1483
+ export declare const useFreePurchase: () => {
1484
+ purchase: (monetizationId: string) => Promise<void>;
1485
+ };
1486
+
1487
+ export declare const useIntro: () => IntroMarker | null;
1488
+
1489
+ export declare const useIsLoaded: () => {
1490
+ isTivioLoaded: boolean;
1491
+ };
1492
+
1493
+ export declare const useIsMonetizationPurchased: () => {
1494
+ isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
1495
+ };
1496
+
1497
+ /**
1498
+ * Use row items
1499
+ * @param rowId - row ID
1500
+ * @param options - subscription options
1501
+ */
1502
+ export declare const useItemsInRow: (rowId: string, options?: SubscribeToItemsInRowOptions) => {
1503
+ pagination: PaginationInterface<ItemsInRow> | null;
1504
+ error: Error | null;
1505
+ };
1506
+
1507
+ /**
1508
+ * @deprecated will be removed in v4
1509
+ */
1510
+ export declare function useLastVideoByWidgetId(widgetId: string): Video | null;
1511
+
1512
+ export declare const useMarkers: () => Marker[] | null;
1513
+
1514
+ export declare const useOrganizationSubscriptions: () => {
1515
+ subscriptions: Monetization[];
1516
+ };
1517
+
1518
+ export declare type UsePlayerEvent = <T = any>(eventName: string) => T | null;
1519
+
1520
+ export declare const usePlayerEvent: UsePlayerEvent;
1521
+
1522
+ /**
1523
+ * Is used to mark purchase in recovery state as PAID.
1524
+ *
1525
+ * @return purchaseRecoveryResult - message describing result of the recovery
1526
+ * loading - loading state
1527
+ * error - error in case request failure
1528
+ * purchaseRecovery - functions to execute purchase recovery
1529
+ */
1530
+ export declare function usePurchaseRecovery(): {
1531
+ purchaseRecoveryResult?: string | undefined;
1532
+ loading: boolean;
1533
+ error?: GenericOnCallError | undefined;
1534
+ purchaseRecovery: (monetizationId: string) => void;
1535
+ };
1536
+
1537
+ export declare const usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
1538
+
1539
+ /**
1540
+ * Return purchases with initialized video (purchases[i].video not null)
1541
+ */
1542
+ export declare const usePurchasesWithVideos: () => {
1543
+ purchases: Purchase[];
1544
+ };
1545
+
1546
+ export declare type User = {
1547
+ purchases: Purchase[];
1548
+ allPurchases: Purchase[];
1549
+ purchasedVods: Purchase[];
1550
+ purchasedSubscriptions: Purchase[];
1551
+ isPurchasesInitialized: boolean;
1552
+ isSignedIn: boolean;
1553
+ email?: string;
1554
+ type?: UserType;
1555
+ photoURL: string | null;
1556
+ name?: string;
1557
+ authUserId?: string;
1558
+ favorites: any[];
1559
+ watchedPositions: any[];
1560
+ };
1561
+
1562
+ export declare const useRowsInScreen: (screenId: string, options?: PaginationOptions) => {
1563
+ pagination: PaginationInterface<Row> | null;
1564
+ error: Error | null;
1565
+ };
1566
+
1567
+ export declare type UserPayload = Record<string, any>;
1568
+
1569
+ export declare enum UserType {
1570
+ ORGANIZATION_USER = "ORGANIZATION_USER",
1571
+ TIVIO_USER = "TIVIO_USER"
1572
+ }
1573
+
1574
+ /**
1575
+ * @deprecated
1576
+ *
1577
+ * Use app screen
1578
+ * @param screenId - screen ID
1579
+ * @param options - subscribe to screen options
1580
+ */
1581
+ export declare const useScreen: (screenId: string, options?: ScreenOptions | undefined) => never;
1582
+
1583
+ export declare const useScreens: () => {
1584
+ screens: Screen_2[];
1585
+ };
1586
+
1587
+ export declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, options?: UseSearchOptions) => {
1588
+ search: (query: string) => void;
1589
+ pagination: PaginationInterface<UseSearchResult<T>> | null;
1590
+ error: Error | null;
1591
+ isLoading: boolean;
1592
+ lastQuery: string;
1593
+ };
1594
+
1595
+ /**
1596
+ * Full text search that returns entities based on search query.
1597
+ * @param indexName - index that search would be performed on ('videos', 'tags', etc.)
1598
+ * @param options - pagination options
1599
+ */
1600
+ export declare const useSearch: UseSearch;
1601
+
1602
+ export declare type UseSearchOptions = PaginationOptions & Partial<{
1603
+ minQueryLength: number;
1604
+ }>;
1605
+
1606
+ 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;
1607
+
1608
+ /**
1609
+ * Use section
1610
+ * @param sectionId - section id
1611
+ */
1612
+ export declare const useSection: (sectionId: string) => {
1613
+ error: string | null;
1614
+ data: Section | null;
1615
+ };
1616
+
1617
+ /**
1618
+ * Use section in channel
1619
+ * @param channelId - channel id
1620
+ * @param [limit] - sections count, defaults to 10
1621
+ */
1622
+ export declare const useSectionsInChannel: (channelId: string, limit?: number) => {
1623
+ error: Error | null;
1624
+ data: PaginationData<Section> | null;
1625
+ isLoading: boolean;
1626
+ };
1627
+
1628
+ export declare const useSeekState: () => boolean | null;
1629
+
1630
+ /**
1631
+ * Returns videos with given tag ids
1632
+ * @param tagIds - tag ids
1633
+ * @param options - subscription options
1634
+ */
1635
+ export declare const useTaggedVideos: (tagIds: string[], options?: SubscribeToItemsInRowOptions) => {
1636
+ pagination: PaginationInterface<Video> | null;
1637
+ error: Error | null;
1638
+ };
1639
+
1640
+ export declare const useTivioData: () => RemoteBundleState;
1641
+
1642
+ export declare const useTivioReadyData: () => RemoteBundleState | null;
1643
+
1644
+ export declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
1645
+
1646
+ export declare type UseTvChannel = (tvChannelId: string) => {
1647
+ tvChannel: TvChannel | null;
1648
+ error: Error | null;
1649
+ loading: boolean;
1650
+ };
1651
+
1652
+ export declare const useUser: () => {
1653
+ user: User | null;
1654
+ error: string | null;
1655
+ isInitialized: boolean;
1656
+ };
1657
+
1658
+ /**
1659
+ * Use video
1660
+ * @param videoId - video id
1661
+ */
1662
+ export declare const useVideo: (videoId?: string | undefined) => {
1663
+ data: Video | null;
1664
+ error: string | null;
1665
+ };
1666
+
1667
+ /**
1668
+ * Use videos in section
1669
+ * @param sectionId - section id
1670
+ * @param [limit] - videos count, defaults to 10
1671
+ */
1672
+ export declare const useVideosInSection: (sectionId?: string | undefined, limit?: number) => {
1673
+ error: Error | null;
1674
+ data: PaginationData<Video> | null;
1675
+ isLoading: boolean;
1676
+ };
1677
+
1678
+ export declare const useVoucher: (voucherId: string) => {
1679
+ activate: (() => Promise<void>) | null;
1680
+ voucher: Voucher | null;
1681
+ /**
1682
+ * You can check error.details if you need to know error type when you want your own error messages
1683
+ * (can be one of "DOES_NOT_EXIST", "EXPIRED" and "ALREADY_USED").
1684
+ */
1685
+ error: Error | BadRequestError | null;
1686
+ /**
1687
+ * True if voucher has been successfully activated in current session.
1688
+ */
1689
+ activationSuccess: boolean;
1690
+ };
1691
+
1692
+ export declare const useWatchWithoutAdsOffer: () => {
1693
+ canPurchaseWatchWithoutAds: boolean;
1694
+ showPurchaseDialog: () => void;
1695
+ };
1696
+
1697
+ /**
1698
+ * Use widget
1699
+ * @param widgetId - widget id
1700
+ */
1701
+ export declare const useWidget: (widgetId: string) => {
1702
+ error: string;
1703
+ widget: Widget | null;
1704
+ };
1705
+
1706
+ export declare const VAST_PROVIDERS: ({
1707
+ id: VastProvider;
1708
+ name: string;
1709
+ development?: undefined;
1710
+ } | {
1711
+ id: VastProvider;
1712
+ name: string;
1713
+ development: boolean;
1714
+ })[];
1715
+
1716
+ export declare enum VastProvider {
1717
+ ETARGET_PREBID = "etarget-prebid",
1718
+ MALL_TV_PREBID = "malltv-prebid",
1719
+ IMPRESSION_MEDIA_PREBID = "impressionMedia-prebid",
1720
+ MALL_TV = "malltv",
1721
+ FALLBACK_MP4 = "fallback",
1722
+ FALLBACK_HLS = "fallback-hls",
1723
+ JOJ = "joj",
1724
+ PRIMA = "prima",
1725
+ GARAZ_TV = "garaz.tv",
1726
+ GARAZ_TV_DEV = "garaz.tv.dev"
1727
+ }
1728
+
1729
+ export declare interface Video extends RowItem {
1730
+ id: string;
1731
+ /**
1732
+ * @deprecated use assets instead
1733
+ */
1734
+ cover: string | null;
1735
+ created: Date;
1736
+ sectionId: string | null;
1737
+ channelId: string | null;
1738
+ /**
1739
+ * seconds
1740
+ */
1741
+ duration: number;
1742
+ path: string;
1743
+ tags: Tag[];
1744
+ image: string | null;
1745
+ isPlayable: boolean;
1746
+ monetizations: Monetization[];
1747
+ monetization: Monetization | undefined;
1748
+ transactionId?: string;
1749
+ transaction: Monetization | undefined;
1750
+ subscriptions: Monetization[];
1751
+ subscriptionIds: string[];
1752
+ isPlaylist: boolean;
1753
+ name: string;
1754
+ description?: string;
1755
+ price: number | null;
1756
+ detailedPrice: DetailedPrice | null;
1757
+ uri: string;
1758
+ url: string;
1759
+ adMonetizationId?: string;
1760
+ from?: Date;
1761
+ to?: Date;
1762
+ detailBanner?: string;
1763
+ linkedVideosRaw: any[];
1764
+ linkedVideos: LinkedVideo[];
1765
+ purchasableMonetization: any | null;
1766
+ contentType: VideoContentType | null;
1767
+ year?: number;
1768
+ episodeNumber?: number;
1769
+ seasonNumber?: number;
1770
+ getTagsOfType: (type: string) => Tag[];
1771
+ loadLinkedVideos: () => any;
1772
+ getLinkedVideos: (type: any) => any;
1773
+ trailer: Video | null;
1774
+ watchPosition: number | null;
1775
+ isFavorite: boolean;
1776
+ addToFavorites: () => void;
1777
+ removeFromFavorites: () => void;
1778
+ availability: VideoAvailabilityField | null;
1779
+ }
1780
+
1781
+ declare type VideoAvailabilityField = {
1782
+ from: firebase_2.firestore.Timestamp;
1783
+ to: firebase_2.firestore.Timestamp | null;
1784
+ manual: boolean;
1785
+ };
1786
+
1787
+ export declare enum VideoContentType {
1788
+ /**
1789
+ * Default video content type
1790
+ */
1791
+ VIDEO = "VIDEO",
1792
+ FILM = "FILM",
1793
+ SERIES = "SERIES"
1794
+ }
1795
+
1796
+ export declare interface VideoExternals {
1797
+ tvProfiProgramId?: string;
1798
+ tvProfiContentId?: string;
1799
+ tvProfiSerialId?: string;
1800
+ contentId?: string;
1801
+ provysId?: string;
1802
+ mallTvEntityId?: string;
1803
+ /**
1804
+ * DRM content Key ID - should't be more connected with buyDRM or streamOnline? It is not general thing
1805
+ */
1806
+ keyId?: string;
1807
+ }
1808
+
1809
+ declare type VideoPath = string;
1810
+
1811
+ export declare const VideosContext: React_2.Context<DataState<Video>>;
1812
+
1813
+ /**
1814
+ * Video type.
1815
+ */
1816
+ export declare enum VideoType {
1817
+ /**
1818
+ * Video is composed of several other videos.
1819
+ */
1820
+ PLAYLIST = "PLAYLIST",
1821
+ /**
1822
+ * Video is a standard single video.
1823
+ */
1824
+ VIDEO = "VIDEO",
1825
+ TV_PROGRAM = "TV_PROGRAM"
1826
+ }
1827
+
1828
+ export declare type VodExternalSource = {
1829
+ new (uri: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
1830
+ type: 'vod_external';
1831
+ description: string;
1832
+ name: string;
1833
+ uri: string;
1834
+ };
1835
+
1836
+ export declare type VodTivioSource = {
1837
+ new (uri: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
1838
+ type: 'vod_tivio';
1839
+ description: string;
1840
+ name: string;
1841
+ uri: string;
1842
+ };
1843
+
1844
+ export declare interface VodTivioSourcePojo {
1845
+ type: 'VodTivioSource';
1846
+ description: string;
1847
+ path: string;
1848
+ name: string;
1849
+ uri: string;
1850
+ poster?: string;
1851
+ adMonetizationId?: string;
1852
+ }
1853
+
1854
+ /**
1855
+ * TODO: Should be in core-js, we can't import types from it, though.
1856
+ */
1857
+ declare type Voucher = {
1858
+ activate: () => void;
1859
+ isUsed: boolean;
1860
+ isExpired: boolean;
1861
+ status: 'NEW' | 'USED';
1862
+ voucherInfo: SubscriptionInfo | TransactionInfo;
1863
+ };
1864
+
1865
+ export declare interface WebPlayerProps {
1866
+ id: string;
1867
+ source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
1868
+ onEnded?: () => any;
1869
+ /**
1870
+ * If this function is specified, then "Back" button is shown in top right corner.
1871
+ */
1872
+ onBack?: () => void;
1873
+ className?: string;
1874
+ /**
1875
+ * default false
1876
+ *
1877
+ * If you choose `autoplay` make sure that autoplay is allowed in the specific situation.
1878
+ * In some cases it may not be allowed, e.g. before the user interacted with the site, and the video
1879
+ * will stay paused.
1880
+ *
1881
+ * Source: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide
1882
+ */
1883
+ autoplay?: boolean;
1884
+ /**
1885
+ * default false
1886
+ */
1887
+ canReplay?: boolean;
1888
+ /**
1889
+ * default false
1890
+ */
1891
+ showMarkers?: boolean;
1892
+ /**
1893
+ * number[] is array of keyboard event.which numeric codes
1894
+ * (see https://keycode.info/)
1895
+ */
1896
+ customShortcuts?: Partial<{
1897
+ toggleFullscreen: number[];
1898
+ togglePause: number[];
1899
+ toggleMute: number[];
1900
+ jumpForward: number[];
1901
+ jumpBack: number[];
1902
+ volumeUp: number[];
1903
+ volumeDown: number[];
1904
+ }>;
1905
+ /**
1906
+ * default true
1907
+ */
1908
+ enableKeyboardShortcuts?: boolean;
1909
+ onProgress?: (event: React_2.ChangeEvent<HTMLVideoElement>) => void;
1910
+ /**
1911
+ * @deprecated this callback is never called. Will be removed in @tivio/sdk-react version 4
1912
+ */
1913
+ onPlayerControllerCreated?: (playerController: any) => void;
1914
+ }
1915
+
1916
+ export declare type WebRowProps = {
1917
+ items?: ItemsInRow[];
1918
+ variant?: RowItemComponent;
1919
+ rowName?: string;
1920
+ fetchMore?: () => void;
1921
+ onTileClick?: (item: ItemsInRow) => void;
1922
+ };
1923
+
1924
+ export declare type WebSeriesDetailScreenProps = {
1925
+ tagId: string;
1926
+ };
1927
+
1928
+ export declare interface WhereFilter {
1929
+ field: string;
1930
+ operator: WhereFilterOp;
1931
+ value: any;
1932
+ }
1933
+
1934
+ export declare type Widget = {
1935
+ id: string;
1936
+ channels: Channel[];
1937
+ isEnabled: boolean | null;
1938
+ name: string | null;
1939
+ recentVideos: Video[] | null;
1940
+ widgetId: string | null;
1941
+ lastVideo: Video | null;
1942
+ };
1943
+
1944
+ export declare function withPlayerContext(id: string): <P>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
1945
+
1946
+ export { }