@tivio/sdk-react 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,6 +37,27 @@ export declare interface AdExternal {
37
37
  skip: () => void;
38
38
  }
39
39
 
40
+ /**
41
+ * @public
42
+ */
43
+ export declare type AdMetadata = {
44
+ type: 'ad';
45
+ subType: 'inserted' | 'original';
46
+ secondsToEnd: number;
47
+ /**
48
+ * null when ad is not skippable
49
+ */
50
+ secondsToSkippable: number | null;
51
+ canTriggerSkip: boolean;
52
+ isSkippable: boolean;
53
+ order: number | null;
54
+ totalCount: number | null;
55
+ skip: () => void;
56
+ } | null;
57
+
58
+ /**
59
+ * @public
60
+ */
40
61
  declare type AdSegment = {
41
62
  id: string;
42
63
  /**
@@ -95,6 +116,13 @@ export declare type AdSource = {
95
116
  secondsToSkippable: number | null;
96
117
  };
97
118
 
119
+ /**
120
+ * @public
121
+ */
122
+ declare type AdSource_2 = SourceBase & {
123
+ type: 'ad';
124
+ };
125
+
98
126
  /**
99
127
  * @public
100
128
  */
@@ -193,11 +221,7 @@ export declare type BannerProps = {
193
221
  hoverable: boolean;
194
222
  broadcastInfo: string;
195
223
  height: number;
196
- coverPadding: CoverPadding;
197
224
  cover: string;
198
- fullWidth: boolean;
199
- coverContainerPaddingTop: string;
200
- width: number;
201
225
  overlay: boolean;
202
226
  price: string;
203
227
  hasRoundCorners: boolean;
@@ -256,9 +280,6 @@ export declare interface Channel {
256
280
  recentVideos: Video[];
257
281
  }
258
282
 
259
- /**
260
- * @public
261
- */
262
283
  export declare type ChannelSource = {
263
284
  new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
264
285
  description: string;
@@ -372,7 +393,8 @@ export declare enum CUSTOMER_BUILD {
372
393
  MALL = "MALL",
373
394
  GARAZ = "GARAZ",
374
395
  U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
375
- INVESTOREES = "INVESTOREES"
396
+ INVESTOREES = "INVESTOREES",
397
+ DVTV = "DVTV"
376
398
  }
377
399
 
378
400
  /**
@@ -424,7 +446,7 @@ export declare type Customizations = {
424
446
  * @internal
425
447
  */
426
448
  export declare interface CustomTheme {
427
- customizations?: Customizations;
449
+ customizations?: Partial<Customizations>;
428
450
  components: Components;
429
451
  size: (size: number) => number;
430
452
  }
@@ -433,7 +455,7 @@ export declare interface CustomTheme {
433
455
  * @internal
434
456
  */
435
457
  export declare interface CustomThemeOptions {
436
- customizations?: Customizations;
458
+ customizations?: Partial<Customizations>;
437
459
  components: Components;
438
460
  size: (size: number) => number;
439
461
  }
@@ -463,7 +485,7 @@ export declare type DetailedPrice = {
463
485
  /**
464
486
  * @public
465
487
  */
466
- export declare type DeviceInfo = ArrisDeviceInfo | WebosDeviceInfo | TizenDeviceInfo;
488
+ export declare type DeviceInfo = ArrisDeviceInfo | ReactNativeDeviceInfo;
467
489
 
468
490
  /**
469
491
  * @public
@@ -496,6 +518,11 @@ export declare type DocumentOptions = Partial<{
496
518
  */
497
519
  export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
498
520
 
521
+ /**
522
+ * @public
523
+ */
524
+ declare type Empty_2 = void | Promise<void> | undefined | Promise<undefined>;
525
+
499
526
  /**
500
527
  * @public
501
528
  */
@@ -590,8 +617,8 @@ export declare interface IndexedVideo extends IndexedObject {
590
617
  isDraft: boolean;
591
618
  type: VideoType;
592
619
  contentType?: VideoContentType;
593
- name: string;
594
- description: string;
620
+ name: string | Translation;
621
+ description: string | Translation;
595
622
  hide: boolean;
596
623
  isDuplicate: boolean;
597
624
  externals?: VideoExternals;
@@ -616,7 +643,7 @@ export declare type InternalConfig = SdkReactConfig & {
616
643
  fetchPackage: FetchPackage;
617
644
  pubSub: PubSub;
618
645
  /**
619
- * @private URL of resolver. Resolver is a script used to fetch remove code bundle
646
+ * @private URL of resolver. Resolver is a script used to fetch remote code bundle
620
647
  */
621
648
  resolverUrl: string;
622
649
  sdkVersion: string;
@@ -653,6 +680,24 @@ declare interface IntroMarker {
653
680
  */
654
681
  export declare type ItemsInRow = Tag | Video | TvChannel;
655
682
 
683
+ /**
684
+ * @public
685
+ */
686
+ export declare interface JojExternals {
687
+ tvProfiProgramId?: string;
688
+ tvProfiContentId?: string;
689
+ tvProfiSerialId?: string;
690
+ contentId?: string;
691
+ provysId?: string;
692
+ tvProfiProvysId?: string;
693
+ tvProfiHouseId?: string;
694
+ tvProfiTitleOriginal?: string;
695
+ tvProfiTitleSk?: string;
696
+ tvProfiType?: string;
697
+ tvProfiSeriesName?: string;
698
+ tvProfiDistributor?: string;
699
+ }
700
+
656
701
  /**
657
702
  * Enum of all supported languages codes as in ISO 639-1
658
703
  * @public
@@ -662,9 +707,10 @@ export declare enum LangCode {
662
707
  DE = "de",
663
708
  EN = "en",
664
709
  FR = "fr",
710
+ IT = "it",
665
711
  PL = "pl",
666
712
  SK = "sk",
667
- SP = "sp"
713
+ ES = "es"
668
714
  }
669
715
 
670
716
  /**
@@ -687,6 +733,34 @@ export declare type LinkedVideo = {
687
733
  type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
688
734
  };
689
735
 
736
+ /**
737
+ * @public
738
+ */
739
+ export declare type Listener = ListenerAdMetadata | ListenerMarkers;
740
+
741
+ /**
742
+ * @public
743
+ */
744
+ export declare type ListenerAdMetadata = (metadata: AdMetadata) => void;
745
+
746
+ /**
747
+ * @public
748
+ */
749
+ export declare type ListenerMarkers = (marker: Marker[] | null) => void;
750
+
751
+ /**
752
+ * Not supported yet, now it does pass-through only.
753
+ *
754
+ * @public
755
+ */
756
+ export declare type LiveTvChannelSource = SourceBase & {
757
+ type: 'live_tv_channel';
758
+ /**
759
+ * Tivio needs channel name in order to load markers.
760
+ */
761
+ channelName: string;
762
+ };
763
+
690
764
  declare interface Logger {
691
765
  /** important messages */
692
766
  warn(...data: LoggerArgs): void;
@@ -709,15 +783,33 @@ declare type LoggerArgs = any[];
709
783
  /**
710
784
  * @public
711
785
  */
712
- export declare type Marker = {
786
+ export declare interface MallTvExternals {
787
+ mallTvEntityId: string;
788
+ }
789
+
790
+ /**
791
+ * @public
792
+ */
793
+ export declare interface Marker {
713
794
  id: string;
714
- type: string;
715
795
  from: Date;
716
796
  to: Date;
717
797
  count?: number;
718
798
  fromMs?: number;
719
799
  toMs?: number;
720
- };
800
+ relativeFromMs: number;
801
+ relativeToMs: number;
802
+ type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
803
+ }
804
+
805
+ /**
806
+ * External information of video migrated via our Public API.
807
+ * @public
808
+ */
809
+ export declare interface MigratedVideoExternals {
810
+ externalVideoId: string;
811
+ additionalData: any;
812
+ }
721
813
 
722
814
  /**
723
815
  * @public
@@ -773,6 +865,26 @@ export declare type Nullable<T> = {
773
865
  */
774
866
  export declare type ObjectType = Record<string, any>;
775
867
 
868
+ /**
869
+ * @public
870
+ */
871
+ export declare interface OktagonExternals {
872
+ /**
873
+ * DRM content Key ID - shouldn't be more connected with buyDRM or streamOnline? It is not general thing
874
+ */
875
+ keyId?: string;
876
+ }
877
+
878
+ /**
879
+ * Returns string union of optional keys for given type
880
+ * @internal
881
+ */
882
+ export declare type OptionalKeys<T> = {
883
+ [K in keyof T]-?: {} extends {
884
+ [P in K]: T[K];
885
+ } ? K : never;
886
+ }[keyof T];
887
+
776
888
  /**
777
889
  * @public
778
890
  */
@@ -789,6 +901,16 @@ declare type OrderByDirection = 'desc' | 'asc';
789
901
  export declare interface Organization {
790
902
  }
791
903
 
904
+ /**
905
+ * If Tivio PlayerWrapper is an interception layer, it should allow the pass-through
906
+ * of not just Tivio source types but any other source types that the 3rd party app may be using.
907
+ *
908
+ * @public
909
+ */
910
+ export declare type OtherSource = SourceBase & StartAndContinuePosition & {
911
+ type: 'other';
912
+ };
913
+
792
914
  /**
793
915
  * @public
794
916
  */
@@ -816,6 +938,30 @@ export declare enum PLATFORM {
816
938
  TV = "TV"
817
939
  }
818
940
 
941
+ /**
942
+ * @public
943
+ */
944
+ export declare type Player = {
945
+ ad: any;
946
+ currentTime: any;
947
+ adSegment: any;
948
+ event: any;
949
+ events: any;
950
+ source: any;
951
+ state: any;
952
+ onPlaybackEnded: any;
953
+ onSourceChanged: any;
954
+ onStateChanged: any;
955
+ onTimeChanged: any;
956
+ pause: any;
957
+ play: any;
958
+ togglePlayPause: any;
959
+ register: any;
960
+ seekTo: any;
961
+ setVolume: any;
962
+ triggerEvent: any;
963
+ };
964
+
819
965
  /**
820
966
  * @public
821
967
  */
@@ -871,6 +1017,17 @@ export declare type PlayerConfig = {
871
1017
  fullFileDownloadSupport?: boolean;
872
1018
  };
873
1019
  };
1020
+ /**
1021
+ * Ad service settings
1022
+ */
1023
+ adService?: {
1024
+ /**
1025
+ * Tivio - can be used in websites and TV apps. Does not support VPAID
1026
+ * IMA - can be used only in websites. Supports VAST 2, partially VAST 3, VAST 4, SIMID 1.0, OM SDK 1.3,
1027
+ * VPAID 2 (HTML5) https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/compatibility
1028
+ */
1029
+ name: 'IMA SDK' | 'Tivio';
1030
+ };
874
1031
  };
875
1032
 
876
1033
  /**
@@ -905,6 +1062,18 @@ export declare interface PlayerInterface {
905
1062
  unmute?: () => void;
906
1063
  }
907
1064
 
1065
+ /**
1066
+ * @public
1067
+ */
1068
+ export declare interface PlayerInterfaceForPlayerWrapper {
1069
+ /**
1070
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
1071
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
1072
+ */
1073
+ seekTo: (ms: number) => void;
1074
+ setSource: (source: Source | null) => void;
1075
+ }
1076
+
908
1077
  /**
909
1078
  * @public
910
1079
  */
@@ -962,8 +1131,8 @@ export declare type PlayerWrapper = {
962
1131
  source: InputSource | null;
963
1132
  events: {
964
1133
  isSupported: (even: string) => boolean;
965
- addListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
966
- removeListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
1134
+ addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
1135
+ removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
967
1136
  removeAllListeners: () => void;
968
1137
  };
969
1138
  /**
@@ -1001,6 +1170,19 @@ export declare type PlayerWrapper = {
1001
1170
  toggleMuted: () => void;
1002
1171
  };
1003
1172
 
1173
+ /**
1174
+ * @public
1175
+ */
1176
+ export declare enum PlayerWrapperEventType {
1177
+ adMetadata = "adMetadata",
1178
+ markers = "markers"
1179
+ }
1180
+
1181
+ /**
1182
+ * @public
1183
+ */
1184
+ export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
1185
+
1004
1186
  /**
1005
1187
  * @public
1006
1188
  */
@@ -1020,12 +1202,16 @@ export declare type Purchase = {
1020
1202
  expirationDate: Date | null;
1021
1203
  id: string;
1022
1204
  isExpired: boolean;
1205
+ /**
1206
+ * @deprecated isPurchased is ambiguous name. Now it means that purchase.status is "PAID".
1207
+ * So use purchase.status === PurchaseStatus.PAID instead.
1208
+ */
1023
1209
  isPurchased: boolean;
1024
1210
  monetization: PurchaseMonetization | null;
1025
1211
  monetizationId: string | null;
1026
1212
  monetizationRef: any | null;
1027
1213
  status: PurchaseStatus | null;
1028
- type: MonetizationType | null;
1214
+ type: PurchaseType | null;
1029
1215
  /**
1030
1216
  * Timestamp of the last purchase status update in milliseconds.
1031
1217
  */
@@ -1043,7 +1229,10 @@ export declare type PurchaseMonetization = {
1043
1229
  currency?: Currency;
1044
1230
  period?: number;
1045
1231
  price?: number;
1046
- type: MonetizationType;
1232
+ /**
1233
+ * Here are only transaction and subscription, because purchasing of advertisement monetization doesn't make sense.
1234
+ */
1235
+ type: 'transaction' | 'subscription';
1047
1236
  title?: string;
1048
1237
  frequency?: MONETIZATION_FREQUENCY | null;
1049
1238
  /**
@@ -1064,9 +1253,16 @@ export declare enum PurchaseStatus {
1064
1253
  /**
1065
1254
  * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
1066
1255
  */
1067
- KILL = "KILL"
1256
+ BLOCKED = "BLOCKED"
1068
1257
  }
1069
1258
 
1259
+ /**
1260
+ * Purchase is a purchase of one video (transaction type), purchase of subscription or voucher.
1261
+ *
1262
+ * @public
1263
+ */
1264
+ export declare type PurchaseType = 'transaction' | 'subscription' | 'voucher';
1265
+
1070
1266
  /**
1071
1267
  * @public
1072
1268
  */
@@ -1080,7 +1276,7 @@ export declare interface QerkoCancellationInfo {
1080
1276
  */
1081
1277
  export declare interface QerkoData {
1082
1278
  monetization: Monetization;
1083
- video?: Video;
1279
+ item?: Video | TvChannel;
1084
1280
  onPurchase?: () => void;
1085
1281
  onClose?: () => void;
1086
1282
  }
@@ -1133,6 +1329,19 @@ export declare interface QerkoTransaction {
1133
1329
  voucherId?: string;
1134
1330
  }
1135
1331
 
1332
+ /**
1333
+ * @public
1334
+ */
1335
+ export declare type ReactNativeDeviceInfo = {
1336
+ type: 'react-native';
1337
+ /**
1338
+ * Type values defined according to {@link OperatingSystem} from `detect-browser` package for convenience.
1339
+ */
1340
+ os?: 'iOS' | 'Android OS';
1341
+ osVersion: string;
1342
+ platform: PLATFORM;
1343
+ };
1344
+
1136
1345
  /**
1137
1346
  * @public
1138
1347
  */
@@ -1147,10 +1356,19 @@ export declare type RemoteBundleState = {
1147
1356
  */
1148
1357
  export declare type RemoteProviderProps = {
1149
1358
  disableUnmounting?: boolean;
1150
- language?: string;
1359
+ language?: LangCode;
1151
1360
  children: any;
1152
1361
  };
1153
1362
 
1363
+ /**
1364
+ * Makes optional attributes in given type to be required and nullable.
1365
+ * e.g. will make `attribute?: string` to be `attribute: string | null`
1366
+ * @internal
1367
+ */
1368
+ export declare type RequiredNullable<T> = {
1369
+ [P in keyof T]-?: P extends OptionalKeys<T> ? T[P] | null : T[P];
1370
+ };
1371
+
1154
1372
  /**
1155
1373
  * @public
1156
1374
  */
@@ -1162,6 +1380,7 @@ export declare interface RouterOverrides {
1162
1380
  goBack: () => void;
1163
1381
  goLivePlayer: (videoId: string) => void;
1164
1382
  goVodPlayer: (tvChannelId: string) => void;
1383
+ goToHome: () => void;
1165
1384
  }
1166
1385
 
1167
1386
  /**
@@ -1221,6 +1440,7 @@ export declare interface RowItemAssets {
1221
1440
  portrait?: string | null;
1222
1441
  circled?: string | null;
1223
1442
  banner?: string | null;
1443
+ bannerMobile?: string | null;
1224
1444
  }
1225
1445
 
1226
1446
  /**
@@ -1308,7 +1528,7 @@ export declare type ScreenSubscription = (screenId: string, cb: (error: Error |
1308
1528
  *
1309
1529
  * @public
1310
1530
  */
1311
- export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'language'> & {
1531
+ export declare type SdkReactConfig = Omit<TivioConfig, 'language'> & {
1312
1532
  disableUnmounting?: boolean;
1313
1533
  enable?: boolean;
1314
1534
  enableSentry?: boolean;
@@ -1317,7 +1537,9 @@ export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'l
1317
1537
  }>;
1318
1538
  LoaderComponent?: ComponentType;
1319
1539
  logger?: Logger | null;
1320
- deviceCapabilities: PlayerCapability[] | 'auto';
1540
+ /**
1541
+ * language is required for bundle init (TivioConfig), but it can be set to default EN on SDK side, so here it's optional.
1542
+ */
1321
1543
  language?: LangCode;
1322
1544
  };
1323
1545
 
@@ -1356,6 +1578,63 @@ export declare const setUser: (userId: string | null, payload?: UserPayload | un
1356
1578
  */
1357
1579
  export declare const showGdprConsentPreferences: () => Promise<void>;
1358
1580
 
1581
+ /**
1582
+ * @public
1583
+ */
1584
+ export declare type Source = TvProgramSource | TivioVodSource | AdSource_2 | OtherSource | LiveTvChannelSource;
1585
+
1586
+ /**
1587
+ * @public
1588
+ */
1589
+ export declare type SourceBase = {
1590
+ /**
1591
+ * Tivio SDK users may use pretty complicated source objects in their existing code and if Tivio player
1592
+ * is an interception layer, it should allow them to pass through any type of object.
1593
+ */
1594
+ additionalPayload?: Record<string, any>;
1595
+ /**
1596
+ * Source type.
1597
+ */
1598
+ type: 'ad' | 'live_tv_channel' | 'other' | 'tivio_vod' | 'tv_program';
1599
+ /**
1600
+ * URI to play.
1601
+ */
1602
+ uri: string;
1603
+ };
1604
+
1605
+ /**
1606
+ * @public
1607
+ */
1608
+ export declare type StartAndContinuePosition = {
1609
+ /**
1610
+ * Relative from stream start, in ms.
1611
+ *
1612
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1613
+ *
1614
+ * On output from Tivio it is always defined. Tivio can change this value.
1615
+ * (e.g. in order to fix start position of a TV program)
1616
+ */
1617
+ startFromPosition?: number;
1618
+ /**
1619
+ * Relative from stream start, in ms.
1620
+ *
1621
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1622
+ *
1623
+ * If provided, tivio will not correct it and will send this value back in startFromPosition.
1624
+ * If provided, startFromPosition is ignored.
1625
+ */
1626
+ continueFromPosition?: number;
1627
+ };
1628
+
1629
+ /**
1630
+ * @public
1631
+ */
1632
+ declare interface StorageManager_2 {
1633
+ getItem(key: string): string | null | Promise<string | null>;
1634
+ setItem(key: string, value: string): void | Promise<void>;
1635
+ }
1636
+ export { StorageManager_2 as StorageManager }
1637
+
1359
1638
  /**
1360
1639
  * @public
1361
1640
  */
@@ -1467,6 +1746,9 @@ export declare type TileOptions = {
1467
1746
  opacity: string | number;
1468
1747
  fontWeight: string;
1469
1748
  };
1749
+ sizes: {
1750
+ [variant in TileSizeVariant]: TileSizesMap;
1751
+ };
1470
1752
  };
1471
1753
 
1472
1754
  /**
@@ -1474,7 +1756,6 @@ export declare type TileOptions = {
1474
1756
  */
1475
1757
  export declare type TileProps = {
1476
1758
  cover: string;
1477
- isLoading: boolean;
1478
1759
  bottomLabel: string;
1479
1760
  bottomLabelAreaHeight: number;
1480
1761
  innerLabel: string;
@@ -1483,7 +1764,6 @@ export declare type TileProps = {
1483
1764
  focused: boolean;
1484
1765
  onClick?: () => void;
1485
1766
  hoverable: boolean;
1486
- overlay: boolean;
1487
1767
  coverPadding: CoverPadding;
1488
1768
  variant: RowItemComponent;
1489
1769
  coverWidth: number;
@@ -1503,6 +1783,34 @@ export declare type TileProps = {
1503
1783
  */
1504
1784
  export declare type TilePropsPartial = Partial<TileProps>;
1505
1785
 
1786
+ /**
1787
+ * @internal
1788
+ */
1789
+ export declare type TileSizes = {
1790
+ coverPaddingTop: number;
1791
+ coverPaddingBottom: number;
1792
+ coverWidth: number;
1793
+ coverHeight: number;
1794
+ cellPaddingRight: number;
1795
+ labelHeight: number;
1796
+ };
1797
+
1798
+ /**
1799
+ * Tile sizes by Tile variant (row item component)
1800
+ *
1801
+ * @internal
1802
+ */
1803
+ export declare type TileSizesMap = {
1804
+ [item in RowItemComponent]: TileSizes;
1805
+ };
1806
+
1807
+ /**
1808
+ * Default (desktop) or mobile variants are used for WEB.
1809
+ *
1810
+ * @internal
1811
+ */
1812
+ export declare type TileSizeVariant = 'default' | 'mobile';
1813
+
1506
1814
  /**
1507
1815
  * @public
1508
1816
  */
@@ -1572,10 +1880,6 @@ export declare type TivioComponents = {
1572
1880
  WebTile: React_2.ComponentType<{
1573
1881
  item?: ItemsInRow;
1574
1882
  } & TilePropsPartial>;
1575
- AdIndicationButtonWeb: React_2.ReactNode;
1576
- Recommendation: React_2.ReactNode;
1577
- SkipButtonWeb: React_2.ReactNode;
1578
- TvPlayer: React_2.ComponentType<WebPlayerProps>;
1579
1883
  };
1580
1884
 
1581
1885
  /**
@@ -1634,7 +1938,7 @@ export declare type TivioGetters = {
1634
1938
  */
1635
1939
  getPlayerWrapper: (opt: {
1636
1940
  playerWrapperId?: string;
1637
- }) => any;
1941
+ }) => PlayerWrapper;
1638
1942
  getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
1639
1943
  /**
1640
1944
  * Get video by its id.
@@ -1653,7 +1957,7 @@ export declare type TivioGetters = {
1653
1957
  * @public
1654
1958
  */
1655
1959
  export declare type TivioHooks = {
1656
- useAd: () => [(AdSource | null)];
1960
+ useAd: () => [(AdExternal | null)];
1657
1961
  useAdSegment: () => AdSegment | null;
1658
1962
  useCancelSubscription: UseCancelSubscription;
1659
1963
  useItemsInRow: (rowId: string, options: PaginationOptions) => {
@@ -1764,6 +2068,59 @@ export declare type TivioInternalProviders = {
1764
2068
  RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
1765
2069
  };
1766
2070
 
2071
+ /**
2072
+ * @internal
2073
+ */
2074
+ export declare type TivioJsBundle = TivioJsBundleExposedApi & {
2075
+ init: (config: TivioConfig) => void | Promise<void>;
2076
+ tivio: any;
2077
+ };
2078
+
2079
+ /**
2080
+ * @public
2081
+ */
2082
+ export declare type TivioJsBundleExposedApi = {
2083
+ AdSource: any;
2084
+ ChannelSource: any;
2085
+ VodTivioSource: any;
2086
+ /**
2087
+ * Get (or create) player wrapper instance
2088
+ * @param id - player wrapper id
2089
+ * @returns {Player} player wrapper instance
2090
+ */
2091
+ getPlayer: (id: string) => Player;
2092
+ /**
2093
+ * Get tv channel by its id.
2094
+ * @param tvChannelId - tv channel id
2095
+ * @returns {Promise<TvChannel | null>} channel or null if tv channel does not exists
2096
+ */
2097
+ getTvChannelById: (tvChannelId: string) => Promise<TvChannel | null>;
2098
+ /**
2099
+ * Get tag by its id.
2100
+ * @param tagId - tag id
2101
+ * @returns {Promise<Tag | null>} widget or null if tag does not exists
2102
+ */
2103
+ getTagById: (tagId: string) => Promise<Tag | null>;
2104
+ createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
2105
+ destroy: () => Promise<void>;
2106
+ } & Pick<TivioGetters, 'getVideoById'> & Pick<TivioSubscriptions, 'subscribeToVideo' | 'subscribeToItemsInRow'> & Pick<TivioAuth, 'createUserWithEmailAndPassword' | 'signInWithEmailAndPassword'> & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
2107
+
2108
+ /**
2109
+ * @public
2110
+ */
2111
+ export declare interface TivioPlayerWrapper {
2112
+ addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
2113
+ reportError: (error: Error) => void;
2114
+ reportPlaybackEnded: () => void;
2115
+ reportTimeProgress: (ms: number) => void;
2116
+ seekTo: (ms: number) => void;
2117
+ /**
2118
+ * @param {Source} source - source to set
2119
+ * @param {string} calibrationId - id of calibration profile
2120
+ */
2121
+ setSource: (source: Source | null, calibrationId?: string) => void;
2122
+ }
2123
+
1767
2124
  /**
1768
2125
  * @public
1769
2126
  */
@@ -1798,12 +2155,6 @@ export declare type TivioReactBundle = {
1798
2155
  expirationDate: Date;
1799
2156
  }) => Promise<QerkoPaymentInfo>;
1800
2157
  cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
1801
- /**
1802
- * Set tivio language.
1803
- * @param language
1804
- */
1805
- setLanguage: (language: LangCode) => void;
1806
- setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1807
2158
  showConsentPreferences: () => void;
1808
2159
  /**
1809
2160
  * Contains hooks and providers for internal usages.
@@ -1812,6 +2163,20 @@ export declare type TivioReactBundle = {
1812
2163
  */
1813
2164
  internal: TivioInternalBundle;
1814
2165
  destroy: () => Promise<void>;
2166
+ } & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
2167
+
2168
+ /**
2169
+ * @public
2170
+ */
2171
+ export declare type TivioSetters = {
2172
+ setBundleVersion: (bundleVersion: string | null) => void;
2173
+ /**
2174
+ * Set tivio language.
2175
+ * @param language
2176
+ */
2177
+ setLanguage: (language: LangCode) => void;
2178
+ setStorageManager: (storageManager: StorageManager_2) => void;
2179
+ setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1815
2180
  };
1816
2181
 
1817
2182
  /**
@@ -1844,6 +2209,17 @@ export declare type TivioSubscriptions = {
1844
2209
  }) => void;
1845
2210
  };
1846
2211
 
2212
+ /**
2213
+ * @public
2214
+ */
2215
+ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
2216
+ type: 'tivio_vod';
2217
+ /**
2218
+ * Allows Tivio to load monetization config an apply ads.
2219
+ */
2220
+ videoPath: string;
2221
+ };
2222
+
1847
2223
  /**
1848
2224
  * @public
1849
2225
  */
@@ -1893,15 +2269,6 @@ export declare interface TivioWidgetRef {
1893
2269
  });
1894
2270
  }
1895
2271
 
1896
- /**
1897
- * @public
1898
- */
1899
- export declare type TizenDeviceInfo = {
1900
- type: 'tizen';
1901
- model?: string;
1902
- osVersion?: string;
1903
- };
1904
-
1905
2272
  declare type TransactionInfo = {
1906
2273
  type: 'transaction';
1907
2274
  name: string;
@@ -1915,7 +2282,7 @@ declare type TransactionInfo = {
1915
2282
  * @public
1916
2283
  */
1917
2284
  export declare type Translation = {
1918
- [key in LangCode]: string;
2285
+ [key in LangCode]?: string;
1919
2286
  };
1920
2287
 
1921
2288
  /**
@@ -1942,6 +2309,35 @@ export declare interface TvChannel extends RowItem {
1942
2309
  price: number;
1943
2310
  }
1944
2311
 
2312
+ /**
2313
+ * @public
2314
+ */
2315
+ export declare type TvProgramSource = SourceBase & StartAndContinuePosition & {
2316
+ type: 'tv_program';
2317
+ /**
2318
+ * If epgTo is wrong, Tivio cannot correctly guess if the video it startover or timeshift . For such cases
2319
+ * Tivio needs explicit tv mode.
2320
+ * null if source begins in the future.
2321
+ */
2322
+ tvMode: 'startover' | 'timeshift' | null;
2323
+ /**
2324
+ * Tivio needs channel name in order to load markers.
2325
+ */
2326
+ channelName: string;
2327
+ /**
2328
+ * Tivio needs EPG from in order to load markers.
2329
+ */
2330
+ epgFrom: Date;
2331
+ /**
2332
+ * Tivio needs EPG to in order to load markers.
2333
+ */
2334
+ epgTo: Date;
2335
+ /**
2336
+ * When the stream (provided in uri) really starts - typically few minutes before epgFrom.
2337
+ */
2338
+ streamStart: Date;
2339
+ };
2340
+
1945
2341
  /**
1946
2342
  * @public
1947
2343
  */
@@ -1950,7 +2346,7 @@ export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
1950
2346
  /**
1951
2347
  * @public
1952
2348
  */
1953
- export declare const useAd: () => AdSource | null;
2349
+ export declare const useAd: () => AdExternal | null;
1954
2350
 
1955
2351
  /**
1956
2352
  * @public
@@ -2102,9 +2498,23 @@ export declare const usePurchasesWithVideos: () => {
2102
2498
  * @public
2103
2499
  */
2104
2500
  export declare type User = {
2501
+ /**
2502
+ * Returns "active" (non-expired) purchases, so they give access to some content.
2503
+ * Does not return voucher purchases, because they give access to videos/subscriptions only for user who activates voucher,
2504
+ * not for user who purchases it.
2505
+ */
2105
2506
  purchases: Purchase[];
2507
+ /**
2508
+ * Returns all PAID or CANCELLED user purchases (expired and non-expired)
2509
+ */
2106
2510
  allPurchases: Purchase[];
2511
+ /**
2512
+ * Returns "active" (not CANCELLED) VoD purchases ("transaction" type)
2513
+ */
2107
2514
  purchasedVods: Purchase[];
2515
+ /**
2516
+ * Returns "active" (non-expired) subscription purchases
2517
+ */
2108
2518
  purchasedSubscriptions: Purchase[];
2109
2519
  isPurchasesInitialized: boolean;
2110
2520
  isSignedIn: boolean;
@@ -2278,10 +2688,14 @@ export declare enum VastProvider {
2278
2688
  GARAZ_TV_DEV = "garaz.tv.dev",
2279
2689
  IMPRESSION_MEDIA_PREBID = "impressionMedia-prebid",
2280
2690
  JOJ = "joj",
2691
+ JOJ_AD_MANAGER_VOD_PREROLL = "joj-ad-manager-vod-preroll",
2692
+ JOJ_AD_MANAGER_VOD_MIDROLL = "joj-ad-manager-vod-midroll",
2693
+ JOJ_AD_MANAGER_LIVE_PREROLL = "joj-ad-manager-live-preroll",
2281
2694
  MALL_TV = "malltv",
2282
2695
  MALL_TV_PREBID = "malltv-prebid",
2283
2696
  PRIMA = "prima",
2284
- TEST = "test"
2697
+ TEST = "test",
2698
+ TEST_VPAID = "test-vpaid"
2285
2699
  }
2286
2700
 
2287
2701
  /**
@@ -2363,18 +2777,7 @@ export declare enum VideoContentType {
2363
2777
  /**
2364
2778
  * @public
2365
2779
  */
2366
- export declare interface VideoExternals {
2367
- tvProfiProgramId?: string;
2368
- tvProfiContentId?: string;
2369
- tvProfiSerialId?: string;
2370
- contentId?: string;
2371
- provysId?: string;
2372
- mallTvEntityId?: string;
2373
- /**
2374
- * DRM content Key ID - should't be more connected with buyDRM or streamOnline? It is not general thing
2375
- */
2376
- keyId?: string;
2377
- }
2780
+ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExternals | MigratedVideoExternals;
2378
2781
 
2379
2782
  declare type VideoPath = string;
2380
2783
 
@@ -2391,7 +2794,11 @@ export declare enum VideoType {
2391
2794
  * Video is a standard single video.
2392
2795
  */
2393
2796
  VIDEO = "VIDEO",
2394
- TV_PROGRAM = "TV_PROGRAM"
2797
+ TV_PROGRAM = "TV_PROGRAM",
2798
+ /**
2799
+ * Video object represents whole series, e.g. tv show.
2800
+ */
2801
+ SERIES = "SERIES"
2395
2802
  }
2396
2803
 
2397
2804
  /**
@@ -2438,15 +2845,6 @@ declare type Voucher = {
2438
2845
  voucherInfo: SubscriptionInfo | TransactionInfo;
2439
2846
  };
2440
2847
 
2441
- /**
2442
- * @public
2443
- */
2444
- export declare type WebosDeviceInfo = {
2445
- type: 'webos';
2446
- model?: string;
2447
- osVersion?: string;
2448
- };
2449
-
2450
2848
  /**
2451
2849
  * @public
2452
2850
  */