@tivio/sdk-react 3.6.2 → 3.6.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import { ComponentType } from 'react';
2
- import { default as firebase_2 } from 'firebase';
3
- import type { default as firebase_3 } from 'firebase/app';
4
2
  import { FunctionComponentElement } from 'react';
5
- import { OrderByDirection } from '@firebase/firestore-types';
6
3
  import { default as React_2 } from 'react';
7
- import { WhereFilterOp } from '@firebase/firestore-types';
8
4
 
5
+ /**
6
+ * @public
7
+ */
9
8
  export declare interface AdExternal {
10
9
  /**
11
10
  * Can user seek out of it?
@@ -58,6 +57,9 @@ declare type AdSegment = {
58
57
  skip: () => any;
59
58
  };
60
59
 
60
+ /**
61
+ * @public
62
+ */
61
63
  export declare type AdSource = {
62
64
  new (uri: string, name: string, description: string, skipDelayMs: number | null, adDurationMs: number, trackingContext?: any, // internal Tivio types
63
65
  adMarker?: any, // internal Tivio types
@@ -94,8 +96,6 @@ export declare type AdSource = {
94
96
  };
95
97
 
96
98
  /**
97
- * Index names in Algolia search engine.
98
- *
99
99
  * @public
100
100
  */
101
101
  export declare enum ALGOLIA_INDEX_NAME {
@@ -106,14 +106,23 @@ export declare enum ALGOLIA_INDEX_NAME {
106
106
  USERS = "users"
107
107
  }
108
108
 
109
+ /**
110
+ * @public
111
+ */
109
112
  export declare interface Asset {
110
113
  background: string;
111
114
  }
112
115
 
116
+ /**
117
+ * @public
118
+ */
113
119
  export declare type Assets = {
114
120
  [assetName: string]: ScalableAsset;
115
121
  };
116
122
 
123
+ /**
124
+ * @public
125
+ */
117
126
  export declare type AuthOverlayPayload = {
118
127
  prefilledData?: {
119
128
  email: string;
@@ -125,6 +134,9 @@ export declare type AuthOverlayPayload = {
125
134
  redirectAfterSubmit?: ((...args: any[]) => void) | null;
126
135
  };
127
136
 
137
+ /**
138
+ * @public
139
+ */
128
140
  export declare type AuthOverlayState = {
129
141
  type: AuthOverlayType;
130
142
  closeAuthOverlay: () => void;
@@ -132,24 +144,39 @@ export declare type AuthOverlayState = {
132
144
  payload?: AuthOverlayPayload | null;
133
145
  };
134
146
 
147
+ /**
148
+ * @public
149
+ */
135
150
  export declare type AuthOverlayType = 'login' | 'registration' | 'closed' | 'reset-password';
136
151
 
152
+ /**
153
+ * @public
154
+ */
137
155
  export declare interface AvailableSeason {
138
156
  seasonNumber: number;
139
157
  }
140
158
 
159
+ /**
160
+ * @public
161
+ */
141
162
  export declare type AvatarProps = {
142
163
  cover?: string;
143
164
  isLoading?: boolean;
144
165
  size?: number;
145
166
  };
146
167
 
168
+ /**
169
+ * @public
170
+ */
147
171
  export declare type BadRequestError = Error & {
148
172
  details?: {
149
173
  reason?: 'DOES_NOT_EXIST' | 'EXPIRED' | 'ALREADY_USED';
150
174
  };
151
175
  };
152
176
 
177
+ /**
178
+ * @public
179
+ */
153
180
  export declare type BannerProps = {
154
181
  isLoading: boolean;
155
182
  text: string;
@@ -157,10 +184,11 @@ export declare type BannerProps = {
157
184
  onClick?: () => void;
158
185
  hoverable: boolean;
159
186
  broadcastInfo: string;
187
+ height: number;
160
188
  coverPadding: CoverPadding;
161
189
  cover: string;
162
190
  fullWidth: boolean;
163
- height: number;
191
+ coverContainerPaddingTop: string;
164
192
  width: number;
165
193
  overlay: boolean;
166
194
  price: string;
@@ -169,8 +197,47 @@ export declare type BannerProps = {
169
197
  onButtonClick?: () => void;
170
198
  };
171
199
 
200
+ /**
201
+ * @public
202
+ */
172
203
  export declare type BannerPropsPartial = Partial<BannerProps>;
173
204
 
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
+ /**
239
+ * @public
240
+ */
174
241
  export declare type BetOffer = {
175
242
  betService: string;
176
243
  league: string;
@@ -186,9 +253,18 @@ export declare type BetOffer = {
186
253
 
187
254
  /**
188
255
  * rejects when bundle is not available
256
+ * @public
189
257
  */
190
258
  export declare const bundlePromise: Promise<RemoteBundleState>;
191
259
 
260
+ /**
261
+ * @public
262
+ */
263
+ export declare type Callback = () => void;
264
+
265
+ /**
266
+ * @public
267
+ */
192
268
  export declare interface Channel {
193
269
  id: string;
194
270
  name: string;
@@ -197,8 +273,14 @@ export declare interface Channel {
197
273
  recentVideos: Video[];
198
274
  }
199
275
 
276
+ /**
277
+ * @public
278
+ */
200
279
  export declare const ChannelsContext: React_2.Context<DataState<Channel>>;
201
280
 
281
+ /**
282
+ * @public
283
+ */
202
284
  export declare type ChannelSource = {
203
285
  new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
204
286
  description: string;
@@ -213,6 +295,9 @@ export declare type ChannelSource = {
213
295
  } | null;
214
296
  };
215
297
 
298
+ /**
299
+ * @public
300
+ */
216
301
  export declare interface ChannelSourcePojo {
217
302
  type: 'ChannelSource';
218
303
  uri: string;
@@ -225,8 +310,14 @@ export declare interface ChannelSourcePojo {
225
310
  poster?: string;
226
311
  }
227
312
 
313
+ /**
314
+ * @public
315
+ */
228
316
  export declare type Chapter = any;
229
317
 
318
+ /**
319
+ * @public
320
+ */
230
321
  export declare type Config = Pick<InternalConfig, 'bundleUrlOverride' | 'currency' | 'disableUnmounting' | 'capabilitiesOptions' | 'enable' | 'enableSentry' | 'ErrorComponent' | 'language' | 'LoaderComponent' | 'logger' | 'secret' | 'verbose' | 'forceCloudFnResolver'> & {
231
322
  deviceCapabilities: PlayerCapability[] | 'auto';
232
323
  /**
@@ -236,6 +327,10 @@ export declare type Config = Pick<InternalConfig, 'bundleUrlOverride' | 'currenc
236
327
  runFeatureSupportCheck?: boolean;
237
328
  };
238
329
 
330
+ /**
331
+ * @public
332
+ * @TODO move somewhere else
333
+ */
239
334
  export declare type CoverPadding = {
240
335
  top?: number;
241
336
  bottom?: number;
@@ -243,21 +338,40 @@ export declare type CoverPadding = {
243
338
  right?: number;
244
339
  };
245
340
 
341
+ /**
342
+ * @public
343
+ */
246
344
  export declare const createPubSub: () => PubSub;
247
345
 
248
346
  /**
249
347
  * Fetch & load CommonJS remote module.
348
+ * @public
250
349
  */
251
350
  export declare const createRemotePackageLoader: () => (secret: string, conf: InternalConfig) => Promise<TivioBundle>;
252
351
 
352
+ /**
353
+ * @public
354
+ */
253
355
  export declare const createUseRemoteBundle: () => (conf: InternalConfig) => RemoteBundleState;
254
356
 
255
- export declare type CreateUserWithEmailAndPassword = (email: string, password: string, username?: string, referralToken?: string) => Promise<string | null>;
357
+ /**
358
+ * @public
359
+ */
360
+ export declare type CreateUserWithEmailAndPassword = (email: string, password: string, username?: string, phoneNumber?: string, referralToken?: string) => Promise<string | null>;
256
361
 
362
+ /**
363
+ * @public
364
+ */
257
365
  export declare const CURRENCIES: string[];
258
366
 
367
+ /**
368
+ * @public
369
+ */
259
370
  export declare type Currency = 'CZK' | 'EUR' | 'USD';
260
371
 
372
+ /**
373
+ * @public
374
+ */
261
375
  export declare enum CUSTOMER_BUILD {
262
376
  OKTAGON = "OKTAGON",
263
377
  JOJ = "JOJ",
@@ -274,46 +388,77 @@ declare interface DataState<T> {
274
388
  setData: (key: string, data: HookData<T>) => void;
275
389
  }
276
390
 
391
+ /**
392
+ * @public
393
+ */
277
394
  export declare const DEFAULT_ORDER_BY: {
278
395
  field: DefaultOrderByField;
279
396
  directionStr: OrderByDirection;
280
397
  }[];
281
398
 
399
+ /**
400
+ * @public
401
+ */
282
402
  export declare type DefaultOrderByField = 'created';
283
403
 
404
+ /**
405
+ * @public
406
+ */
284
407
  export declare type DetailedPrice = {
285
408
  amount: number;
286
409
  currency: Currency;
287
410
  frequency?: MONETIZATION_FREQUENCY;
288
411
  };
289
412
 
413
+ /**
414
+ * @public
415
+ */
290
416
  export declare type Disposer = () => void;
291
417
 
418
+ /**
419
+ * @public
420
+ */
292
421
  declare type Disposer_2 = () => void;
293
422
 
423
+ /**
424
+ * @public
425
+ */
294
426
  export declare type DividerProps = {
295
427
  verticalSpacing?: number;
296
428
  horizontalSpacing?: number;
297
429
  };
298
430
 
431
+ /**
432
+ * @public
433
+ */
299
434
  export declare type DocumentOptions = Partial<{
300
435
  lazyLoading: boolean;
301
436
  subscribeOnChanges: boolean;
302
437
  }>;
303
438
 
439
+ /**
440
+ * @public
441
+ */
304
442
  export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
305
443
 
444
+ /**
445
+ * @public
446
+ */
306
447
  export declare type Events = {
307
448
  'on-ready': RemoteBundleState;
308
449
  'on-error': Error;
309
450
  };
310
451
 
452
+ /**
453
+ * @public
454
+ */
311
455
  export declare type ExternalTvConfig = {
312
456
  logo: string;
313
457
  };
314
458
 
315
459
  /**
316
460
  * @throws if fetch fails
461
+ * @public
317
462
  */
318
463
  export declare const fetchBundle: (secret: string, conf: InternalConfig) => Promise<string>;
319
464
 
@@ -323,6 +468,9 @@ export declare const fetchBundle: (secret: string, conf: InternalConfig) => Prom
323
468
  */
324
469
  declare type FetchPackage = (url: string) => Promise<string>;
325
470
 
471
+ /**
472
+ * @public
473
+ */
326
474
  export declare interface GenericOnCallError {
327
475
  code: string;
328
476
  message?: string;
@@ -331,6 +479,7 @@ export declare interface GenericOnCallError {
331
479
 
332
480
  /**
333
481
  * Share singleton instance
482
+ * @public
334
483
  */
335
484
  export declare const getPubSub: () => PubSub;
336
485
 
@@ -340,11 +489,17 @@ declare interface HookData<T> {
340
489
  isLoading: boolean;
341
490
  }
342
491
 
492
+ /**
493
+ * @public
494
+ */
343
495
  export declare interface IndexedObject {
344
496
  objectID: string;
345
497
  path: string;
346
498
  }
347
499
 
500
+ /**
501
+ * @public
502
+ */
348
503
  export declare interface IndexedTag extends IndexedObject {
349
504
  tagId: string;
350
505
  tagTypePath?: string;
@@ -354,6 +509,9 @@ export declare interface IndexedTag extends IndexedObject {
354
509
  description?: string;
355
510
  }
356
511
 
512
+ /**
513
+ * @public
514
+ */
357
515
  export declare interface IndexedTvChannel extends IndexedObject {
358
516
  channelKey: string;
359
517
  created: Date;
@@ -362,6 +520,9 @@ export declare interface IndexedTvChannel extends IndexedObject {
362
520
  organizationPath: string;
363
521
  }
364
522
 
523
+ /**
524
+ * @public
525
+ */
365
526
  export declare interface IndexedUser extends IndexedObject {
366
527
  authUserId: string;
367
528
  type: string;
@@ -370,6 +531,9 @@ export declare interface IndexedUser extends IndexedObject {
370
531
  organizationPath?: string;
371
532
  }
372
533
 
534
+ /**
535
+ * @public
536
+ */
373
537
  export declare interface IndexedVideo extends IndexedObject {
374
538
  organizationPath?: string;
375
539
  tagPaths?: string[];
@@ -384,14 +548,19 @@ export declare interface IndexedVideo extends IndexedObject {
384
548
  externals?: VideoExternals;
385
549
  }
386
550
 
551
+ /**
552
+ * @public
553
+ */
387
554
  export declare type InputSource = AdSource | ChannelSource | VodTivioSource | VodExternalSource;
388
555
 
556
+ /**
557
+ * @public
558
+ */
389
559
  export declare type InternalConfig = {
390
560
  /**
391
561
  * @private URL of remote code bundle to be fetched directly (without using resolver)
392
562
  */
393
563
  bundleUrlOverride?: string;
394
- currency: Currency;
395
564
  /**
396
565
  * Tells Tivio which technologies/protocols etc. is the device capable to play.
397
566
  * If not provided, Tivio will try to guess it (based on the browser).
@@ -408,6 +577,10 @@ export declare type InternalConfig = {
408
577
  */
409
578
  preferHttp?: boolean;
410
579
  };
580
+ secret: string | null;
581
+ language?: LangCode;
582
+ verbose?: boolean;
583
+ currency: Currency;
411
584
  disableUnmounting?: boolean;
412
585
  enable?: boolean;
413
586
  enableSentry?: boolean;
@@ -415,7 +588,6 @@ export declare type InternalConfig = {
415
588
  error: string | null;
416
589
  }>;
417
590
  fetchPackage: FetchPackage;
418
- language?: LangCode;
419
591
  LoaderComponent?: ComponentType;
420
592
  logger?: Logger | null;
421
593
  pubSub: PubSub;
@@ -424,14 +596,15 @@ export declare type InternalConfig = {
424
596
  */
425
597
  resolverUrl: string;
426
598
  sdkVersion: string;
427
- secret: string | null;
428
- verbose?: boolean;
429
599
  /**
430
600
  * @private
431
601
  */
432
602
  forceCloudFnResolver?: boolean;
433
603
  };
434
604
 
605
+ /**
606
+ * @public
607
+ */
435
608
  export declare type InternalTvConfig = {
436
609
  logo: string;
437
610
  screens: ScreenConfig[];
@@ -442,10 +615,14 @@ declare interface IntroMarker {
442
615
  skip: () => void;
443
616
  }
444
617
 
618
+ /**
619
+ * @public
620
+ */
445
621
  export declare type ItemsInRow = Tag | Video | TvChannel;
446
622
 
447
623
  /**
448
624
  * Enum of all supported languages codes as in ISO 639-1
625
+ * @public
449
626
  */
450
627
  export declare enum LangCode {
451
628
  CS = "cs",
@@ -459,14 +636,19 @@ export declare enum LangCode {
459
636
 
460
637
  /**
461
638
  * All supported languages codes as in ISO 639-1
639
+ * @public
462
640
  */
463
641
  export declare const languages: LangCode[];
464
642
 
465
643
  /**
466
644
  * Possible language key of all supported language mutations.
645
+ * @public
467
646
  */
468
647
  export declare type LanguageType = `${LangCode}`;
469
648
 
649
+ /**
650
+ * @public
651
+ */
470
652
  export declare type LinkedVideo = {
471
653
  video: Video;
472
654
  type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
@@ -491,6 +673,9 @@ declare interface Logger {
491
673
  */
492
674
  declare type LoggerArgs = any[];
493
675
 
676
+ /**
677
+ * @public
678
+ */
494
679
  export declare type Marker = {
495
680
  id: string;
496
681
  type: string;
@@ -501,17 +686,24 @@ export declare type Marker = {
501
686
  toMs?: number;
502
687
  };
503
688
 
689
+ /**
690
+ * @public
691
+ */
504
692
  export declare interface Monetization {
505
693
  id: string;
506
694
  price?: string | number;
507
695
  type?: MonetizationType;
508
696
  frequency?: MONETIZATION_FREQUENCY;
697
+ isPurchased?: boolean;
509
698
  name?: string;
510
699
  description?: string;
511
700
  benefits?: Translation[];
512
701
  localizedBenefits?: string[];
513
702
  }
514
703
 
704
+ /**
705
+ * @public
706
+ */
515
707
  export declare enum MONETIZATION_FREQUENCY {
516
708
  ONE_TIME_PAYMENT = "ONE_TIME_PAYMENT",
517
709
  DAILY = "DAILY",
@@ -520,26 +712,47 @@ export declare enum MONETIZATION_FREQUENCY {
520
712
  ANNUALLY = "ANNUALLY"
521
713
  }
522
714
 
715
+ /**
716
+ * @public
717
+ * @TODO change to enum
718
+ */
523
719
  export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
524
720
 
525
721
  /**
526
722
  * TODO: Duplicate, because we can't import types from core-js.
527
723
  */
724
+ /**
725
+ * @public
726
+ */
528
727
  export declare type NewVoucher = {
529
728
  expirationDate: Date | number;
530
729
  };
531
730
 
731
+ /**
732
+ * @public
733
+ */
532
734
  export declare type Nullable<T> = {
533
735
  [P in keyof T]: T[P] | null;
534
736
  };
535
737
 
738
+ /**
739
+ * @public
740
+ */
536
741
  export declare type ObjectType = Record<string, any>;
537
742
 
743
+ /**
744
+ * @public
745
+ */
538
746
  export declare interface OrderBy {
539
747
  field: string;
540
748
  directionStr?: OrderByDirection;
541
749
  }
542
750
 
751
+ declare type OrderByDirection = 'desc' | 'asc';
752
+
753
+ /**
754
+ * @public
755
+ */
543
756
  export declare interface Organization {
544
757
  }
545
758
 
@@ -549,6 +762,9 @@ declare type PaginationData<T> = {
549
762
  fetchMore: Function;
550
763
  };
551
764
 
765
+ /**
766
+ * @public
767
+ */
552
768
  export declare type PaginationInterface<Entity> = {
553
769
  items: Entity[];
554
770
  fetchMore: () => void;
@@ -556,23 +772,35 @@ export declare type PaginationInterface<Entity> = {
556
772
  loading?: boolean;
557
773
  };
558
774
 
775
+ /**
776
+ * @public
777
+ */
559
778
  export declare type PaginationOptions = Partial<{
560
779
  limit: number;
561
780
  noLimit: boolean;
562
781
  }>;
563
782
 
783
+ /**
784
+ * @public
785
+ */
564
786
  export declare enum PLATFORM {
565
787
  MOBILE = "MOBILE",
566
788
  WEB = "WEB",
567
789
  TV = "TV"
568
790
  }
569
791
 
792
+ /**
793
+ * @public
794
+ */
570
795
  export declare interface PlayerCapability {
571
796
  codec: 'h264' | 'h265';
572
797
  encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
573
- protocol: 'dash' | 'hls';
798
+ protocol: 'dash' | 'hls' | 'mp4';
574
799
  }
575
800
 
801
+ /**
802
+ * @public
803
+ */
576
804
  export declare interface PlayerInterface {
577
805
  pause: () => void;
578
806
  /**
@@ -602,8 +830,14 @@ export declare interface PlayerInterface {
602
830
  unmute?: () => void;
603
831
  }
604
832
 
833
+ /**
834
+ * @public
835
+ */
605
836
  export declare const PlayerProvider: ({ children, playerWrapperId, }: PlayerProviderProps) => FunctionComponentElement<PlayerProviderProps>;
606
837
 
838
+ /**
839
+ * @public
840
+ */
607
841
  export declare type PlayerProviderProps = {
608
842
  children: React_2.ReactNode;
609
843
  playerWrapperId?: string;
@@ -611,6 +845,9 @@ export declare type PlayerProviderProps = {
611
845
 
612
846
  declare type PlayerState = 'playing' | 'paused' | 'idle';
613
847
 
848
+ /**
849
+ * @public
850
+ */
614
851
  export declare type PlayerWrapper = {
615
852
  /**
616
853
  * Report that playback of video has finished
@@ -689,34 +926,43 @@ export declare type PlayerWrapper = {
689
926
  toggleMuted: () => void;
690
927
  };
691
928
 
929
+ /**
930
+ * @public
931
+ */
692
932
  export declare interface PubSub {
693
933
  publish: <K extends keyof Events>(triggerName: K, payload: Events[K]) => Empty;
694
934
  subscribe: <K extends keyof Events>(triggerName: K, onMessage: (data: Events[K]) => Empty) => Disposer;
695
935
  }
696
936
 
937
+ /**
938
+ * @public
939
+ */
697
940
  export declare type Purchase = {
698
941
  id: string;
699
942
  isPurchased: boolean;
700
- monetizationRef: firebase_3.firestore.DocumentReference | null;
943
+ monetizationRef: any | null;
701
944
  monetization: PurchaseMonetization | null;
702
945
  monetizationId: string | null;
703
946
  type: MonetizationType | null;
704
947
  videoId: string | null;
705
948
  status: PurchaseStatus | null;
706
949
  video: Video | null;
707
- videoRef: firebase_3.firestore.DocumentReference | null;
950
+ videoRef: any | null;
708
951
  expirationDate: Date | null;
709
952
  isExpired: boolean;
710
953
  voucherId?: string;
711
954
  };
712
955
 
956
+ /**
957
+ * @public
958
+ */
713
959
  export declare type PurchaseMonetization = {
714
- currency: Currency;
715
- period: number;
716
- price: number;
960
+ currency?: Currency;
961
+ period?: number;
962
+ price?: number;
717
963
  type: MonetizationType;
718
- title: string;
719
- frequency: MONETIZATION_FREQUENCY | null;
964
+ title?: string;
965
+ frequency?: MONETIZATION_FREQUENCY | null;
720
966
  /**
721
967
  * If set, purchase (subscription) activated by voucher will stay valid for this amount of seconds.
722
968
  * Otherwise, purchase will be valid for one "monetization frequency" period.
@@ -724,18 +970,31 @@ export declare type PurchaseMonetization = {
724
970
  voucherPurchaseDuration?: number;
725
971
  };
726
972
 
973
+ /**
974
+ * @public
975
+ */
727
976
  export declare enum PurchaseStatus {
728
977
  NEW = "NEW",
729
978
  PAID = "PAID",
730
979
  CANCELLED = "CANCELLED",
731
- ERROR = "ERROR"
980
+ ERROR = "ERROR",
981
+ /**
982
+ * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
983
+ */
984
+ KILL = "KILL"
732
985
  }
733
986
 
987
+ /**
988
+ * @public
989
+ */
734
990
  export declare interface QerkoCancellationInfo {
735
991
  purchaseId: string;
736
992
  status: PurchaseStatus;
737
993
  }
738
994
 
995
+ /**
996
+ * @public
997
+ */
739
998
  export declare interface QerkoData {
740
999
  monetization: Monetization;
741
1000
  video?: Video;
@@ -743,12 +1002,18 @@ export declare interface QerkoData {
743
1002
  onClose?: () => void;
744
1003
  }
745
1004
 
1005
+ /**
1006
+ * @public
1007
+ */
746
1008
  export declare interface QerkoOverlayState {
747
1009
  data: QerkoData | null;
748
1010
  openQerkoOverlay: ((data: QerkoData) => void);
749
1011
  closeQerkoOverlay: () => void;
750
1012
  }
751
1013
 
1014
+ /**
1015
+ * @public
1016
+ */
752
1017
  export declare interface QerkoPaymentInfo {
753
1018
  webPaymentGatewayLink: string;
754
1019
  gatewayUri: string;
@@ -761,6 +1026,9 @@ export declare interface QerkoPaymentInfo {
761
1026
  monetizationFrequency: MONETIZATION_FREQUENCY;
762
1027
  }
763
1028
 
1029
+ /**
1030
+ * @public
1031
+ */
764
1032
  export declare interface QerkoPaymentProps {
765
1033
  transaction: QerkoTransaction;
766
1034
  qrCodeCaption?: string;
@@ -771,6 +1039,9 @@ export declare interface QerkoPaymentProps {
771
1039
  masterCardLogoUrl?: string;
772
1040
  }
773
1041
 
1042
+ /**
1043
+ * @public
1044
+ */
774
1045
  export declare interface QerkoTransaction {
775
1046
  paymentInfo: QerkoPaymentInfo | null;
776
1047
  paymentError: string | null;
@@ -779,6 +1050,9 @@ export declare interface QerkoTransaction {
779
1050
  voucherId?: string;
780
1051
  }
781
1052
 
1053
+ /**
1054
+ * @public
1055
+ */
782
1056
  export declare type RemoteBundleState = {
783
1057
  config: InternalConfig;
784
1058
  error: string | null;
@@ -786,11 +1060,18 @@ export declare type RemoteBundleState = {
786
1060
  state: 'loading' | 'error' | 'ready';
787
1061
  } & Nullable<TivioBundle>;
788
1062
 
1063
+ /**
1064
+ * @public
1065
+ */
789
1066
  export declare type RemoteProviderProps = {
790
1067
  disableUnmounting?: boolean;
791
1068
  language?: string;
1069
+ children: any;
792
1070
  };
793
1071
 
1072
+ /**
1073
+ * @public
1074
+ */
794
1075
  export declare interface RouterOverrides {
795
1076
  goToVideoDetailPage: (videoId: string) => void;
796
1077
  goToSeriesDetailPage: (tagId: string) => void;
@@ -801,10 +1082,16 @@ export declare interface RouterOverrides {
801
1082
  goVodPlayer: (tvChannelId: string) => void;
802
1083
  }
803
1084
 
1085
+ /**
1086
+ * @public
1087
+ */
804
1088
  export declare interface RouterOverridesContextState {
805
1089
  routerOverrides: RouterOverrides;
806
1090
  }
807
1091
 
1092
+ /**
1093
+ * @public
1094
+ */
808
1095
  export declare interface Row {
809
1096
  id: string;
810
1097
  rowId: string;
@@ -814,19 +1101,29 @@ export declare interface Row {
814
1101
  rowComponent: RowComponent;
815
1102
  assets: Assets;
816
1103
  type: ScreenRowType;
1104
+ isLiveRow: boolean;
817
1105
  }
818
1106
 
1107
+ /**
1108
+ * @public
1109
+ */
819
1110
  export declare enum ROW_ITEM_TYPES {
820
1111
  VIDEO = "VIDEO",
821
1112
  TAG = "TAG",
822
1113
  TV_CHANNEL = "TV_CHANNEL"
823
1114
  }
824
1115
 
1116
+ /**
1117
+ * @public
1118
+ */
825
1119
  export declare enum RowComponent {
826
1120
  ROW = "ROW",
827
1121
  BANNER = "BANNER"
828
1122
  }
829
1123
 
1124
+ /**
1125
+ * @public
1126
+ */
830
1127
  export declare interface RowItem extends RowItemAssets {
831
1128
  itemType: ROW_ITEM_TYPES;
832
1129
  name?: string;
@@ -834,6 +1131,9 @@ export declare interface RowItem extends RowItemAssets {
834
1131
  assets: Assets | null;
835
1132
  }
836
1133
 
1134
+ /**
1135
+ * @public
1136
+ */
837
1137
  export declare interface RowItemAssets {
838
1138
  landscape?: string | null;
839
1139
  portrait?: string | null;
@@ -841,6 +1141,9 @@ export declare interface RowItemAssets {
841
1141
  banner?: string | null;
842
1142
  }
843
1143
 
1144
+ /**
1145
+ * @public
1146
+ */
844
1147
  export declare enum RowItemComponent {
845
1148
  ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
846
1149
  ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
@@ -854,20 +1157,30 @@ export declare enum RowItemComponent {
854
1157
  * whether data is loading and a fetchMore function
855
1158
  * @param limit - max item count (default 10)
856
1159
  * @returns Disposer
1160
+ * @public
857
1161
  */
858
1162
  export declare type RowItemsSubscription = (rowId: string, cb: (error: Error | null, data: {
859
1163
  items: Video[];
860
1164
  hasNextPage: boolean;
861
1165
  } | null, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => Disposer_2;
862
1166
 
1167
+ /**
1168
+ * @public
1169
+ */
863
1170
  export declare type ScalableAsset = {
864
1171
  '@1': Asset;
865
1172
  '@2'?: Asset;
866
1173
  '@3'?: Asset;
867
1174
  };
868
1175
 
1176
+ /**
1177
+ * @public
1178
+ */
869
1179
  export declare type Scale = '@1' | '@2' | '@3';
870
1180
 
1181
+ /**
1182
+ * @public
1183
+ */
871
1184
  declare interface Screen_2 {
872
1185
  id: string;
873
1186
  name: string;
@@ -877,16 +1190,25 @@ declare interface Screen_2 {
877
1190
  }
878
1191
  export { Screen_2 as Screen }
879
1192
 
1193
+ /**
1194
+ * @public
1195
+ */
880
1196
  export declare type ScreenConfig = {
881
1197
  id: string;
882
1198
  name: string;
883
1199
  };
884
1200
 
1201
+ /**
1202
+ * @public
1203
+ */
885
1204
  export declare type ScreenOptions = Partial<{
886
1205
  language: LangCode;
887
1206
  initRows: boolean;
888
1207
  }> & DocumentOptions;
889
1208
 
1209
+ /**
1210
+ * @public
1211
+ */
890
1212
  export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites';
891
1213
 
892
1214
  /**
@@ -894,9 +1216,13 @@ export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'f
894
1216
  * @param screenId - screen ID (user defined ID via studio.tiv.io)
895
1217
  * @param cb - callback on screen data change or error
896
1218
  * @returns Disposer
1219
+ * @public
897
1220
  */
898
1221
  export declare type ScreenSubscription = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void) => Disposer_2;
899
1222
 
1223
+ /**
1224
+ * @public
1225
+ */
900
1226
  export declare interface Section {
901
1227
  id: string;
902
1228
  name: string;
@@ -904,8 +1230,14 @@ export declare interface Section {
904
1230
  videos: Video[];
905
1231
  }
906
1232
 
1233
+ /**
1234
+ * @public
1235
+ */
907
1236
  export declare const SectionsContext: React_2.Context<DataState<Section>>;
908
1237
 
1238
+ /**
1239
+ * @public
1240
+ */
909
1241
  export declare type Settings = {
910
1242
  /**
911
1243
  * @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
@@ -917,6 +1249,7 @@ export declare type Settings = {
917
1249
  * Used for entities, that can be global (e.g. asset presets, tag types).
918
1250
  * Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
919
1251
  * Global is stored in separate collection and shown only for super-admin.
1252
+ * @public
920
1253
  */
921
1254
  export declare interface SettingsItem {
922
1255
  name: string;
@@ -928,23 +1261,45 @@ export declare interface SettingsItem {
928
1261
  *
929
1262
  * Sign in - setUser('userID', { token: 'xxx' })
930
1263
  * Sign out - setUser(null)
1264
+ * @public
931
1265
  */
932
1266
  export declare const setUser: (userId: string | null, payload?: UserPayload | undefined) => Promise<void>;
933
1267
 
1268
+ /**
1269
+ * @public
1270
+ */
934
1271
  export declare const showGdprConsentPreferences: () => Promise<void>;
935
1272
 
1273
+ /**
1274
+ * @public
1275
+ */
936
1276
  export declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error | null, data: PaginationInterface<ItemsInRow> | null) => void, options?: SubscribeToItemsInRowOptions) => Disposer_2;
937
1277
 
1278
+ /**
1279
+ * @public
1280
+ */
938
1281
  export declare type SubscribeToItemsInRowOptions = Partial<{
939
1282
  fetchTags: boolean;
940
1283
  }> & PaginationOptions;
941
1284
 
1285
+ /**
1286
+ * @public
1287
+ */
942
1288
  export declare type SubscribeToRowsInScreen = (screenId: string, cb: (error: Error | null, data: PaginationInterface<Row> | null) => void, options?: PaginationOptions) => Disposer_2;
943
1289
 
1290
+ /**
1291
+ * @public
1292
+ */
944
1293
  export declare type SubscribeToScreen = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void, options?: ScreenOptions) => Disposer_2;
945
1294
 
1295
+ /**
1296
+ * @public
1297
+ */
946
1298
  export declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Error | null, data: PaginationInterface<Video> | null) => void, options?: SubscribeToTaggedVideosOptions) => Disposer_2;
947
1299
 
1300
+ /**
1301
+ * @public
1302
+ */
948
1303
  export declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOptions & {
949
1304
  orderBy?: (Omit<OrderBy, 'field'> & {
950
1305
  field: TaggedVideosOrderByField;
@@ -952,6 +1307,9 @@ export declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOption
952
1307
  where?: WhereFilter[];
953
1308
  };
954
1309
 
1310
+ /**
1311
+ * @public
1312
+ */
955
1313
  export declare interface SubscriptionCardProps {
956
1314
  subscription: Monetization;
957
1315
  onClick: (subscription: Monetization) => void;
@@ -967,18 +1325,27 @@ declare type SubscriptionInfo = {
967
1325
  frequency: string;
968
1326
  };
969
1327
 
1328
+ /**
1329
+ * @public
1330
+ */
970
1331
  export declare interface SubscriptionOverlayData {
971
1332
  subscriptions?: Monetization[];
972
1333
  onPurchase?: () => void;
973
1334
  onClose?: () => void;
974
1335
  }
975
1336
 
1337
+ /**
1338
+ * @public
1339
+ */
976
1340
  export declare type SubscriptionOverlayState = {
977
1341
  data: SubscriptionOverlayData | null;
978
1342
  closeSubscriptionOverlay: () => void;
979
1343
  openSubscriptionOverlay: (data: SubscriptionOverlayData) => void;
980
1344
  };
981
1345
 
1346
+ /**
1347
+ * @public
1348
+ */
982
1349
  export declare interface Tag extends RowItem {
983
1350
  id: string;
984
1351
  tagId: string;
@@ -992,8 +1359,14 @@ export declare interface Tag extends RowItem {
992
1359
  removeFromFavorites: () => void;
993
1360
  }
994
1361
 
1362
+ /**
1363
+ * @public
1364
+ */
995
1365
  export declare type TaggedVideosOrderByField = 'seasonNumber' | 'episodeNumber' | 'contentType' | DefaultOrderByField;
996
1366
 
1367
+ /**
1368
+ * @public
1369
+ */
997
1370
  export declare type TileProps = {
998
1371
  cover: string;
999
1372
  isLoading: boolean;
@@ -1020,11 +1393,17 @@ export declare type TileProps = {
1020
1393
  containerMargin?: number | string;
1021
1394
  };
1022
1395
 
1396
+ /**
1397
+ * @public
1398
+ */
1023
1399
  export declare type TilePropsPartial = Partial<TileProps>;
1024
1400
 
1401
+ /**
1402
+ * @public
1403
+ */
1025
1404
  export declare interface TivioAuth {
1026
1405
  changePassword: (newPassword: string) => Promise<void>;
1027
- changeUserPhoto(file: File): Promise<void>;
1406
+ changeUserPhoto(file: any): Promise<void>;
1028
1407
  removeUserPhoto(): Promise<void>;
1029
1408
  getPurchasedVodsWithInitializedVideos: () => Promise<Purchase[]>;
1030
1409
  /**
@@ -1037,59 +1416,43 @@ export declare interface TivioAuth {
1037
1416
  * @param email
1038
1417
  * @param password
1039
1418
  */
1040
- signInWithEmailAndPassword: (email: string, password: string) => Promise<void>;
1419
+ signInWithEmailAndPassword: (email: string, password: string) => Promise<string | null>;
1041
1420
  initializeUser: () => Promise<void>;
1042
1421
  signOut: () => Promise<void>;
1043
1422
  /**
1044
1423
  * Used for reset forgotten password by user
1045
1424
  */
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
- };
1425
+ resetPassword: (email: string) => Promise<void>;
1426
+ createFreePurchase: (monetizationId: string) => Promise<void>;
1427
+ }
1428
+
1429
+ /**
1430
+ * @public
1431
+ */
1432
+ export declare type TivioBundle = BasicTivioBundle & {
1433
+ init: (config: Config) => void | Promise<void>;
1073
1434
  };
1074
1435
 
1436
+ /**
1437
+ * @public
1438
+ */
1075
1439
  export declare type TivioBundleFile = {
1076
1440
  Tivio: TivioBundle;
1077
1441
  };
1078
1442
 
1443
+ /**
1444
+ * @public
1445
+ */
1079
1446
  export declare type TivioComponents = {
1080
- AdIndicationButtonWeb: React_2.ReactNode;
1081
1447
  Markers: React_2.ReactNode;
1082
1448
  PlayerDataContext: React_2.ReactNode;
1083
1449
  Provider: React_2.ComponentType<RemoteProviderProps>;
1084
- Recommendation: React_2.ReactNode;
1085
- SkipButtonWeb: React_2.ReactNode;
1086
1450
  /**
1087
1451
  * @deprecated will be removed in in @tivio/sdk-react@4
1088
1452
  */
1089
1453
  VideoAdBanner: React_2.ReactNode;
1090
1454
  WebPlayer: React_2.ComponentType<WebPlayerProps>;
1091
1455
  Widget: React_2.ComponentType<TivioWidgetProps>;
1092
- TvPlayer: React_2.ComponentType<WebPlayerProps>;
1093
1456
  PlayerDataContextProvider: React_2.ComponentType<{
1094
1457
  id: string;
1095
1458
  }>;
@@ -1101,6 +1464,7 @@ export declare type TivioComponents = {
1101
1464
  onEnded?: () => any;
1102
1465
  }>;
1103
1466
  TvApp: React_2.ComponentType<TvAppProps>;
1467
+ FeatureSupportCheck: React_2.ComponentType<{}>;
1104
1468
  CustomerScreen: React_2.ComponentType<{
1105
1469
  screenId: string;
1106
1470
  }>;
@@ -1113,16 +1477,31 @@ export declare type TivioComponents = {
1113
1477
  }>;
1114
1478
  WebRow: React_2.ComponentType<WebRowProps>;
1115
1479
  WebTile: React_2.ComponentType<{
1116
- item?: Video | Tag;
1480
+ item?: ItemsInRow;
1117
1481
  } & TilePropsPartial>;
1118
- FeatureSupportCheck: React_2.ComponentType<{}>;
1482
+ AdIndicationButtonWeb: React_2.ReactNode;
1483
+ Recommendation: React_2.ReactNode;
1484
+ SkipButtonWeb: React_2.ReactNode;
1485
+ TvPlayer: React_2.ComponentType<WebPlayerProps>;
1119
1486
  };
1120
1487
 
1488
+ /**
1489
+ * @public
1490
+ */
1121
1491
  export declare const TivioContext: React_2.Context<RemoteBundleState | null>;
1122
1492
 
1493
+ /**
1494
+ * @public
1495
+ */
1123
1496
  export declare type TivioGetters = {
1124
- isTivioLoaded: (cb: (isLoaded: boolean) => void) => boolean;
1497
+ isTivioLoaded: (cb: (isLoaded: boolean) => void) => void;
1125
1498
  isSignedIn: () => boolean;
1499
+ /**
1500
+ * @deprecated is here only for backward compatibility
1501
+ */
1502
+ getExportedConfig: () => Promise<{
1503
+ showMarkers: true;
1504
+ }>;
1126
1505
  /**
1127
1506
  * Get channel by its id.
1128
1507
  * @param channelId - channel id
@@ -1136,8 +1515,7 @@ export declare type TivioGetters = {
1136
1515
  */
1137
1516
  getPlayerWrapper: (opt: {
1138
1517
  playerWrapperId?: string;
1139
- }) => PlayerWrapper;
1140
- getOrganizationScreens: () => Promise<Screen_2[]>;
1518
+ }) => any;
1141
1519
  getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
1142
1520
  /**
1143
1521
  * Get section by its id.
@@ -1164,6 +1542,9 @@ export declare type TivioGetters = {
1164
1542
  getPlayerCapabilities: () => PlayerCapability[];
1165
1543
  };
1166
1544
 
1545
+ /**
1546
+ * @public
1547
+ */
1167
1548
  export declare type TivioHooks = {
1168
1549
  useAd: () => [(AdSource | null)];
1169
1550
  useAdSegment: () => AdSegment | null;
@@ -1178,6 +1559,8 @@ export declare type TivioHooks = {
1178
1559
  error?: GenericOnCallError;
1179
1560
  purchaseRecovery: (monetizationId: string) => void;
1180
1561
  };
1562
+ useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher) => QerkoTransaction;
1563
+ usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher) => QerkoTransaction;
1181
1564
  useRowsInScreen: (screenId: string, options: PaginationOptions) => {
1182
1565
  pagination: PaginationInterface<Row> | null;
1183
1566
  error: Error | null;
@@ -1209,6 +1592,18 @@ export declare type TivioHooks = {
1209
1592
  };
1210
1593
  };
1211
1594
 
1595
+ /**
1596
+ * @public
1597
+ */
1598
+ export declare type TivioInternalBundle = {
1599
+ components: TivioInternalComponents;
1600
+ hooks: TivioInternalHooks;
1601
+ providers: TivioInternalProviders;
1602
+ };
1603
+
1604
+ /**
1605
+ * @public
1606
+ */
1212
1607
  export declare type TivioInternalComponents = {
1213
1608
  PrimaryButton: React_2.ComponentType;
1214
1609
  WebLandingScreen: React_2.ComponentType<{
@@ -1220,6 +1615,9 @@ export declare type TivioInternalComponents = {
1220
1615
  WebSeriesDetailScreen: React_2.ComponentType<WebSeriesDetailScreenProps>;
1221
1616
  };
1222
1617
 
1618
+ /**
1619
+ * @public
1620
+ */
1223
1621
  export declare type TivioInternalHooks = {
1224
1622
  useAuthOverlay: () => AuthOverlayState;
1225
1623
  useSubscriptionsOverlay: () => SubscriptionOverlayState;
@@ -1243,6 +1641,9 @@ export declare type TivioInternalHooks = {
1243
1641
  };
1244
1642
  };
1245
1643
 
1644
+ /**
1645
+ * @public
1646
+ */
1246
1647
  export declare type TivioInternalProviders = {
1247
1648
  AppThemeProvider: React_2.ComponentType;
1248
1649
  AuthOverlayContextProvider: React_2.ComponentType;
@@ -1260,8 +1661,14 @@ export declare type TivioInternalProviders = {
1260
1661
  RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
1261
1662
  };
1262
1663
 
1664
+ /**
1665
+ * @public
1666
+ */
1263
1667
  export declare const TivioProvider: React_2.FC<TivioProviderProps>;
1264
1668
 
1669
+ /**
1670
+ * @public
1671
+ */
1265
1672
  export declare type TivioProviderProps = {
1266
1673
  /**
1267
1674
  * This prop must be set only once and not change value afterwards
@@ -1270,6 +1677,9 @@ export declare type TivioProviderProps = {
1270
1677
  children: React_2.ReactNode;
1271
1678
  };
1272
1679
 
1680
+ /**
1681
+ * @public
1682
+ */
1273
1683
  export declare type TivioSources = {
1274
1684
  AdSource: any;
1275
1685
  ChannelSource: any;
@@ -1277,6 +1687,9 @@ export declare type TivioSources = {
1277
1687
  VodTivioSource: any;
1278
1688
  };
1279
1689
 
1690
+ /**
1691
+ * @public
1692
+ */
1280
1693
  export declare type TivioSubscriptions = {
1281
1694
  subscribeToUser: (cb: (error: string | null, user: User | null) => void) => void;
1282
1695
  /**
@@ -1284,7 +1697,7 @@ export declare type TivioSubscriptions = {
1284
1697
  * @param widgetId - widget id
1285
1698
  * @param cb - callback on widget updates or on error
1286
1699
  */
1287
- subscribeToWidget: (widgetId: string, cb: (error: Error | null, data: Widget | null, disposer?: Disposer) => void) => void;
1700
+ subscribeToWidget: (widgetId: string, cb: (error: Error | null, data: Widget | null, disposer?: Disposer_2) => void) => void;
1288
1701
  /**
1289
1702
  * Listen to channel changes.
1290
1703
  * @param channelId - channel id
@@ -1302,7 +1715,7 @@ export declare type TivioSubscriptions = {
1302
1715
  * @param videoId - video id
1303
1716
  * @param cb - callback on video updates or on error
1304
1717
  */
1305
- subscribeToVideo: (videoId: string, cb: (error: Error | null, data: Video | null, disposer?: Disposer) => void) => void;
1718
+ subscribeToVideo: (videoId: string, cb: (error: Error | null, data: Video | null, disposer?: Disposer_2) => void) => void;
1306
1719
  /**
1307
1720
  * Listen to videos in section changes.
1308
1721
  * @param sectionId - section id
@@ -1343,16 +1756,28 @@ export declare type TivioSubscriptions = {
1343
1756
  }) => void;
1344
1757
  };
1345
1758
 
1759
+ /**
1760
+ * @public
1761
+ */
1346
1762
  export declare const TivioWidget: React_2.ForwardRefExoticComponent<Pick<TivioWidgetProps, "id" | "onEnabled" | "onBlur"> & React_2.RefAttributes<TivioWidgetRef>>;
1347
1763
 
1764
+ /**
1765
+ * @public
1766
+ */
1348
1767
  export declare const TivioWidgetError: React_2.FC<TivioWidgetErrorProps>;
1349
1768
 
1350
1769
  declare type TivioWidgetErrorProps = {
1351
1770
  error: string | null;
1352
1771
  };
1353
1772
 
1773
+ /**
1774
+ * @public
1775
+ */
1354
1776
  export declare const TivioWidgetLoader: React_2.FC;
1355
1777
 
1778
+ /**
1779
+ * @public
1780
+ */
1356
1781
  export declare interface TivioWidgetProps {
1357
1782
  id: string;
1358
1783
  ref: React_2.MutableRefObject<TivioWidgetRef>;
@@ -1364,6 +1789,9 @@ export declare interface TivioWidgetProps {
1364
1789
  }) => any;
1365
1790
  }
1366
1791
 
1792
+ /**
1793
+ * @public
1794
+ */
1367
1795
  export declare interface TivioWidgetRef {
1368
1796
  focus: (args: {
1369
1797
  x?: number;
@@ -1387,15 +1815,22 @@ declare type TransactionInfo = {
1387
1815
 
1388
1816
  /**
1389
1817
  * Represents one string in every supported language mutation.
1818
+ * @public
1390
1819
  */
1391
1820
  export declare type Translation = {
1392
1821
  [key in LangCode]: string;
1393
1822
  };
1394
1823
 
1824
+ /**
1825
+ * @public
1826
+ */
1395
1827
  export declare type TvAppProps = {
1396
1828
  customer: CUSTOMER_BUILD;
1397
1829
  };
1398
1830
 
1831
+ /**
1832
+ * @public
1833
+ */
1399
1834
  export declare interface TvChannel extends RowItem {
1400
1835
  name: string;
1401
1836
  id: string;
@@ -1410,10 +1845,19 @@ export declare interface TvChannel extends RowItem {
1410
1845
  price: number;
1411
1846
  }
1412
1847
 
1848
+ /**
1849
+ * @public
1850
+ */
1413
1851
  export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
1414
1852
 
1853
+ /**
1854
+ * @public
1855
+ */
1415
1856
  export declare const useAd: () => AdSource | null;
1416
1857
 
1858
+ /**
1859
+ * @public
1860
+ */
1417
1861
  export declare const useAdSegment: () => {
1418
1862
  id: string;
1419
1863
  remainingMs: number;
@@ -1434,6 +1878,7 @@ export declare const useAdSegment: () => {
1434
1878
  * error - error in case request failure
1435
1879
  * applyInviteCode - function to apply invite code
1436
1880
  * inviteCodeReset - function to reset to initial state
1881
+ * @public
1437
1882
  */
1438
1883
  export declare function useApplyInviteCode(): {
1439
1884
  applyInviteCodeResult?: boolean | undefined;
@@ -1443,19 +1888,29 @@ export declare function useApplyInviteCode(): {
1443
1888
  inviteCodeReset: () => void;
1444
1889
  };
1445
1890
 
1891
+ /**
1892
+ * @public
1893
+ */
1446
1894
  export declare const useBetOffer: () => BetOffer | null;
1447
1895
 
1896
+ /**
1897
+ * @public
1898
+ */
1448
1899
  export declare type UseCancelSubscription = (subscriptionId: string) => {
1449
1900
  cancelSubscription: () => Promise<void>;
1450
1901
  cancellationInfo: QerkoCancellationInfo | null;
1451
1902
  error?: string | null;
1452
1903
  };
1453
1904
 
1905
+ /**
1906
+ * @public
1907
+ */
1454
1908
  export declare const useCancelSubscription: UseCancelSubscription;
1455
1909
 
1456
1910
  /**
1457
1911
  * Use channel
1458
1912
  * @param channelId - channel id
1913
+ * @public
1459
1914
  */
1460
1915
  export declare const useChannel: (channelId: string) => {
1461
1916
  error: string | null;
@@ -1466,6 +1921,7 @@ export declare const useChannel: (channelId: string) => {
1466
1921
  * Use channels in widget
1467
1922
  * @param widgetId - widget id
1468
1923
  * @param [limit] - channels count, defaults to 10
1924
+ * @public
1469
1925
  */
1470
1926
  export declare const useChannelsInWidget: (widgetId: string, limit?: number) => {
1471
1927
  error: Error | null;
@@ -1473,23 +1929,41 @@ export declare const useChannelsInWidget: (widgetId: string, limit?: number) =>
1473
1929
  isLoading: boolean;
1474
1930
  };
1475
1931
 
1932
+ /**
1933
+ * @public
1934
+ */
1476
1935
  export declare type UseChannelSource = (tvChannelId: string) => {
1477
1936
  source: ChannelSourcePojo | null;
1478
1937
  error: Error | null;
1479
1938
  };
1480
1939
 
1940
+ /**
1941
+ * @public
1942
+ */
1481
1943
  export declare const useCurrentMarker: () => Marker | null;
1482
1944
 
1945
+ /**
1946
+ * @public
1947
+ */
1483
1948
  export declare const useFreePurchase: () => {
1484
1949
  purchase: (monetizationId: string) => Promise<void>;
1485
1950
  };
1486
1951
 
1952
+ /**
1953
+ * @public
1954
+ */
1487
1955
  export declare const useIntro: () => IntroMarker | null;
1488
1956
 
1957
+ /**
1958
+ * @public
1959
+ */
1489
1960
  export declare const useIsLoaded: () => {
1490
1961
  isTivioLoaded: boolean;
1491
1962
  };
1492
1963
 
1964
+ /**
1965
+ * @public
1966
+ */
1493
1967
  export declare const useIsMonetizationPurchased: () => {
1494
1968
  isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
1495
1969
  };
@@ -1498,6 +1972,7 @@ export declare const useIsMonetizationPurchased: () => {
1498
1972
  * Use row items
1499
1973
  * @param rowId - row ID
1500
1974
  * @param options - subscription options
1975
+ * @public
1501
1976
  */
1502
1977
  export declare const useItemsInRow: (rowId: string, options?: SubscribeToItemsInRowOptions) => {
1503
1978
  pagination: PaginationInterface<ItemsInRow> | null;
@@ -1506,17 +1981,30 @@ export declare const useItemsInRow: (rowId: string, options?: SubscribeToItemsIn
1506
1981
 
1507
1982
  /**
1508
1983
  * @deprecated will be removed in v4
1984
+ * @public
1509
1985
  */
1510
1986
  export declare function useLastVideoByWidgetId(widgetId: string): Video | null;
1511
1987
 
1988
+ /**
1989
+ * @public
1990
+ */
1512
1991
  export declare const useMarkers: () => Marker[] | null;
1513
1992
 
1993
+ /**
1994
+ * @public
1995
+ */
1514
1996
  export declare const useOrganizationSubscriptions: () => {
1515
1997
  subscriptions: Monetization[];
1516
1998
  };
1517
1999
 
2000
+ /**
2001
+ * @public
2002
+ */
1518
2003
  export declare type UsePlayerEvent = <T = any>(eventName: string) => T | null;
1519
2004
 
2005
+ /**
2006
+ * @public
2007
+ */
1520
2008
  export declare const usePlayerEvent: UsePlayerEvent;
1521
2009
 
1522
2010
  /**
@@ -1526,6 +2014,7 @@ export declare const usePlayerEvent: UsePlayerEvent;
1526
2014
  * loading - loading state
1527
2015
  * error - error in case request failure
1528
2016
  * purchaseRecovery - functions to execute purchase recovery
2017
+ * @public
1529
2018
  */
1530
2019
  export declare function usePurchaseRecovery(): {
1531
2020
  purchaseRecoveryResult?: string | undefined;
@@ -1534,15 +2023,22 @@ export declare function usePurchaseRecovery(): {
1534
2023
  purchaseRecovery: (monetizationId: string) => void;
1535
2024
  };
1536
2025
 
2026
+ /**
2027
+ * @public
2028
+ */
1537
2029
  export declare const usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
1538
2030
 
1539
2031
  /**
1540
2032
  * Return purchases with initialized video (purchases[i].video not null)
2033
+ * @public
1541
2034
  */
1542
2035
  export declare const usePurchasesWithVideos: () => {
1543
2036
  purchases: Purchase[];
1544
2037
  };
1545
2038
 
2039
+ /**
2040
+ * @public
2041
+ */
1546
2042
  export declare type User = {
1547
2043
  purchases: Purchase[];
1548
2044
  allPurchases: Purchase[];
@@ -1559,13 +2055,22 @@ export declare type User = {
1559
2055
  watchedPositions: any[];
1560
2056
  };
1561
2057
 
2058
+ /**
2059
+ * @public
2060
+ */
1562
2061
  export declare const useRowsInScreen: (screenId: string, options?: PaginationOptions) => {
1563
2062
  pagination: PaginationInterface<Row> | null;
1564
2063
  error: Error | null;
1565
2064
  };
1566
2065
 
2066
+ /**
2067
+ * @public
2068
+ */
1567
2069
  export declare type UserPayload = Record<string, any>;
1568
2070
 
2071
+ /**
2072
+ * @public
2073
+ */
1569
2074
  export declare enum UserType {
1570
2075
  ORGANIZATION_USER = "ORGANIZATION_USER",
1571
2076
  TIVIO_USER = "TIVIO_USER"
@@ -1577,13 +2082,13 @@ export declare enum UserType {
1577
2082
  * Use app screen
1578
2083
  * @param screenId - screen ID
1579
2084
  * @param options - subscribe to screen options
2085
+ * @public
1580
2086
  */
1581
2087
  export declare const useScreen: (screenId: string, options?: ScreenOptions | undefined) => never;
1582
2088
 
1583
- export declare const useScreens: () => {
1584
- screens: Screen_2[];
1585
- };
1586
-
2089
+ /**
2090
+ * @public
2091
+ */
1587
2092
  export declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, options?: UseSearchOptions) => {
1588
2093
  search: (query: string) => void;
1589
2094
  pagination: PaginationInterface<UseSearchResult<T>> | null;
@@ -1596,18 +2101,26 @@ export declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, opt
1596
2101
  * Full text search that returns entities based on search query.
1597
2102
  * @param indexName - index that search would be performed on ('videos', 'tags', etc.)
1598
2103
  * @param options - pagination options
2104
+ * @public
1599
2105
  */
1600
2106
  export declare const useSearch: UseSearch;
1601
2107
 
2108
+ /**
2109
+ * @public
2110
+ */
1602
2111
  export declare type UseSearchOptions = PaginationOptions & Partial<{
1603
2112
  minQueryLength: number;
1604
2113
  }>;
1605
2114
 
2115
+ /**
2116
+ * @public
2117
+ */
1606
2118
  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
2119
 
1608
2120
  /**
1609
2121
  * Use section
1610
2122
  * @param sectionId - section id
2123
+ * @public
1611
2124
  */
1612
2125
  export declare const useSection: (sectionId: string) => {
1613
2126
  error: string | null;
@@ -1618,6 +2131,7 @@ export declare const useSection: (sectionId: string) => {
1618
2131
  * Use section in channel
1619
2132
  * @param channelId - channel id
1620
2133
  * @param [limit] - sections count, defaults to 10
2134
+ * @public
1621
2135
  */
1622
2136
  export declare const useSectionsInChannel: (channelId: string, limit?: number) => {
1623
2137
  error: Error | null;
@@ -1625,30 +2139,49 @@ export declare const useSectionsInChannel: (channelId: string, limit?: number) =
1625
2139
  isLoading: boolean;
1626
2140
  };
1627
2141
 
2142
+ /**
2143
+ * @public
2144
+ */
1628
2145
  export declare const useSeekState: () => boolean | null;
1629
2146
 
1630
2147
  /**
1631
2148
  * Returns videos with given tag ids
1632
2149
  * @param tagIds - tag ids
1633
2150
  * @param options - subscription options
2151
+ * @public
1634
2152
  */
1635
2153
  export declare const useTaggedVideos: (tagIds: string[], options?: SubscribeToItemsInRowOptions) => {
1636
2154
  pagination: PaginationInterface<Video> | null;
1637
2155
  error: Error | null;
1638
2156
  };
1639
2157
 
2158
+ /**
2159
+ * @public
2160
+ */
1640
2161
  export declare const useTivioData: () => RemoteBundleState;
1641
2162
 
2163
+ /**
2164
+ * @public
2165
+ */
1642
2166
  export declare const useTivioReadyData: () => RemoteBundleState | null;
1643
2167
 
2168
+ /**
2169
+ * @public
2170
+ */
1644
2171
  export declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
1645
2172
 
2173
+ /**
2174
+ * @public
2175
+ */
1646
2176
  export declare type UseTvChannel = (tvChannelId: string) => {
1647
2177
  tvChannel: TvChannel | null;
1648
2178
  error: Error | null;
1649
2179
  loading: boolean;
1650
2180
  };
1651
2181
 
2182
+ /**
2183
+ * @public
2184
+ */
1652
2185
  export declare const useUser: () => {
1653
2186
  user: User | null;
1654
2187
  error: string | null;
@@ -1658,6 +2191,7 @@ export declare const useUser: () => {
1658
2191
  /**
1659
2192
  * Use video
1660
2193
  * @param videoId - video id
2194
+ * @public
1661
2195
  */
1662
2196
  export declare const useVideo: (videoId?: string | undefined) => {
1663
2197
  data: Video | null;
@@ -1668,6 +2202,7 @@ export declare const useVideo: (videoId?: string | undefined) => {
1668
2202
  * Use videos in section
1669
2203
  * @param sectionId - section id
1670
2204
  * @param [limit] - videos count, defaults to 10
2205
+ * @public
1671
2206
  */
1672
2207
  export declare const useVideosInSection: (sectionId?: string | undefined, limit?: number) => {
1673
2208
  error: Error | null;
@@ -1675,6 +2210,9 @@ export declare const useVideosInSection: (sectionId?: string | undefined, limit?
1675
2210
  isLoading: boolean;
1676
2211
  };
1677
2212
 
2213
+ /**
2214
+ * @public
2215
+ */
1678
2216
  export declare const useVoucher: (voucherId: string) => {
1679
2217
  activate: (() => Promise<void>) | null;
1680
2218
  voucher: Voucher | null;
@@ -1689,6 +2227,9 @@ export declare const useVoucher: (voucherId: string) => {
1689
2227
  activationSuccess: boolean;
1690
2228
  };
1691
2229
 
2230
+ /**
2231
+ * @public
2232
+ */
1692
2233
  export declare const useWatchWithoutAdsOffer: () => {
1693
2234
  canPurchaseWatchWithoutAds: boolean;
1694
2235
  showPurchaseDialog: () => void;
@@ -1697,12 +2238,16 @@ export declare const useWatchWithoutAdsOffer: () => {
1697
2238
  /**
1698
2239
  * Use widget
1699
2240
  * @param widgetId - widget id
2241
+ * @public
1700
2242
  */
1701
2243
  export declare const useWidget: (widgetId: string) => {
1702
2244
  error: string;
1703
2245
  widget: Widget | null;
1704
2246
  };
1705
2247
 
2248
+ /**
2249
+ * @public
2250
+ */
1706
2251
  export declare const VAST_PROVIDERS: ({
1707
2252
  id: VastProvider;
1708
2253
  name: string;
@@ -1713,19 +2258,27 @@ export declare const VAST_PROVIDERS: ({
1713
2258
  development: boolean;
1714
2259
  })[];
1715
2260
 
2261
+ /**
2262
+ * @public
2263
+ */
1716
2264
  export declare enum VastProvider {
2265
+ CNC_PREBID = "cnc-prebid",
1717
2266
  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
2267
  FALLBACK_HLS = "fallback-hls",
2268
+ FALLBACK_MP4 = "fallback",
2269
+ GARAZ_TV = "garaz.tv",
2270
+ GARAZ_TV_DEV = "garaz.tv.dev",
2271
+ IMPRESSION_MEDIA_PREBID = "impressionMedia-prebid",
1723
2272
  JOJ = "joj",
2273
+ MALL_TV = "malltv",
2274
+ MALL_TV_PREBID = "malltv-prebid",
1724
2275
  PRIMA = "prima",
1725
- GARAZ_TV = "garaz.tv",
1726
- GARAZ_TV_DEV = "garaz.tv.dev"
2276
+ TEST = "test"
1727
2277
  }
1728
2278
 
2279
+ /**
2280
+ * @public
2281
+ */
1729
2282
  export declare interface Video extends RowItem {
1730
2283
  id: string;
1731
2284
  /**
@@ -1775,15 +2328,21 @@ export declare interface Video extends RowItem {
1775
2328
  isFavorite: boolean;
1776
2329
  addToFavorites: () => void;
1777
2330
  removeFromFavorites: () => void;
1778
- availability: VideoAvailabilityField | null;
2331
+ availability: VideoAvailability | null;
1779
2332
  }
1780
2333
 
1781
- declare type VideoAvailabilityField = {
1782
- from: firebase_2.firestore.Timestamp;
1783
- to: firebase_2.firestore.Timestamp | null;
2334
+ /**
2335
+ * @public
2336
+ */
2337
+ export declare type VideoAvailability = {
2338
+ from: Date;
2339
+ to: Date | null;
1784
2340
  manual: boolean;
1785
2341
  };
1786
2342
 
2343
+ /**
2344
+ * @public
2345
+ */
1787
2346
  export declare enum VideoContentType {
1788
2347
  /**
1789
2348
  * Default video content type
@@ -1793,6 +2352,9 @@ export declare enum VideoContentType {
1793
2352
  SERIES = "SERIES"
1794
2353
  }
1795
2354
 
2355
+ /**
2356
+ * @public
2357
+ */
1796
2358
  export declare interface VideoExternals {
1797
2359
  tvProfiProgramId?: string;
1798
2360
  tvProfiContentId?: string;
@@ -1808,10 +2370,14 @@ export declare interface VideoExternals {
1808
2370
 
1809
2371
  declare type VideoPath = string;
1810
2372
 
2373
+ /**
2374
+ * @public
2375
+ */
1811
2376
  export declare const VideosContext: React_2.Context<DataState<Video>>;
1812
2377
 
1813
2378
  /**
1814
2379
  * Video type.
2380
+ * @public
1815
2381
  */
1816
2382
  export declare enum VideoType {
1817
2383
  /**
@@ -1825,6 +2391,9 @@ export declare enum VideoType {
1825
2391
  TV_PROGRAM = "TV_PROGRAM"
1826
2392
  }
1827
2393
 
2394
+ /**
2395
+ * @public
2396
+ */
1828
2397
  export declare type VodExternalSource = {
1829
2398
  new (uri: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
1830
2399
  type: 'vod_external';
@@ -1833,6 +2402,9 @@ export declare type VodExternalSource = {
1833
2402
  uri: string;
1834
2403
  };
1835
2404
 
2405
+ /**
2406
+ * @public
2407
+ */
1836
2408
  export declare type VodTivioSource = {
1837
2409
  new (uri: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
1838
2410
  type: 'vod_tivio';
@@ -1841,7 +2413,7 @@ export declare type VodTivioSource = {
1841
2413
  uri: string;
1842
2414
  };
1843
2415
 
1844
- export declare interface VodTivioSourcePojo {
2416
+ declare interface VodTivioSourcePojo {
1845
2417
  type: 'VodTivioSource';
1846
2418
  description: string;
1847
2419
  path: string;
@@ -1849,6 +2421,7 @@ export declare interface VodTivioSourcePojo {
1849
2421
  uri: string;
1850
2422
  poster?: string;
1851
2423
  adMonetizationId?: string;
2424
+ availability: VideoAvailability | null;
1852
2425
  }
1853
2426
 
1854
2427
  /**
@@ -1862,6 +2435,9 @@ declare type Voucher = {
1862
2435
  voucherInfo: SubscriptionInfo | TransactionInfo;
1863
2436
  };
1864
2437
 
2438
+ /**
2439
+ * @public
2440
+ */
1865
2441
  export declare interface WebPlayerProps {
1866
2442
  id: string;
1867
2443
  source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
@@ -1913,24 +2489,38 @@ export declare interface WebPlayerProps {
1913
2489
  onPlayerControllerCreated?: (playerController: any) => void;
1914
2490
  }
1915
2491
 
2492
+ /**
2493
+ * @public
2494
+ */
1916
2495
  export declare type WebRowProps = {
1917
2496
  items?: ItemsInRow[];
1918
2497
  variant?: RowItemComponent;
1919
- rowName?: string;
2498
+ rowName?: string | any;
1920
2499
  fetchMore?: () => void;
1921
2500
  onTileClick?: (item: ItemsInRow) => void;
1922
2501
  };
1923
2502
 
2503
+ /**
2504
+ * @public
2505
+ */
1924
2506
  export declare type WebSeriesDetailScreenProps = {
1925
2507
  tagId: string;
1926
2508
  };
1927
2509
 
2510
+ /**
2511
+ * @public
2512
+ */
1928
2513
  export declare interface WhereFilter {
1929
2514
  field: string;
1930
2515
  operator: WhereFilterOp;
1931
2516
  value: any;
1932
2517
  }
1933
2518
 
2519
+ declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
2520
+
2521
+ /**
2522
+ * @public
2523
+ */
1934
2524
  export declare type Widget = {
1935
2525
  id: string;
1936
2526
  channels: Channel[];
@@ -1941,6 +2531,9 @@ export declare type Widget = {
1941
2531
  lastVideo: Video | null;
1942
2532
  };
1943
2533
 
2534
+ /**
2535
+ * @public
2536
+ */
1944
2537
  export declare function withPlayerContext(id: string): <P>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
1945
2538
 
1946
2539
  export { }