@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.
package/dist/index.d.ts CHANGED
@@ -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;
@@ -248,9 +272,6 @@ export declare interface Channel {
248
272
  recentVideos: Video[];
249
273
  }
250
274
 
251
- /**
252
- * @public
253
- */
254
275
  export declare type ChannelSource = {
255
276
  new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
256
277
  description: string;
@@ -347,7 +368,8 @@ export declare enum CUSTOMER_BUILD {
347
368
  MALL = "MALL",
348
369
  GARAZ = "GARAZ",
349
370
  U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
350
- INVESTOREES = "INVESTOREES"
371
+ INVESTOREES = "INVESTOREES",
372
+ DVTV = "DVTV"
351
373
  }
352
374
 
353
375
  /**
@@ -375,7 +397,7 @@ export declare type DetailedPrice = {
375
397
  /**
376
398
  * @public
377
399
  */
378
- export declare type DeviceInfo = ArrisDeviceInfo | WebosDeviceInfo | TizenDeviceInfo;
400
+ export declare type DeviceInfo = ArrisDeviceInfo | ReactNativeDeviceInfo;
379
401
 
380
402
  /**
381
403
  * @public
@@ -408,6 +430,11 @@ export declare type DocumentOptions = Partial<{
408
430
  */
409
431
  export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
410
432
 
433
+ /**
434
+ * @public
435
+ */
436
+ declare type Empty_2 = void | Promise<void> | undefined | Promise<undefined>;
437
+
411
438
  /**
412
439
  * @public
413
440
  */
@@ -502,8 +529,8 @@ export declare interface IndexedVideo extends IndexedObject {
502
529
  isDraft: boolean;
503
530
  type: VideoType;
504
531
  contentType?: VideoContentType;
505
- name: string;
506
- description: string;
532
+ name: string | Translation;
533
+ description: string | Translation;
507
534
  hide: boolean;
508
535
  isDuplicate: boolean;
509
536
  externals?: VideoExternals;
@@ -521,7 +548,7 @@ export declare type InternalConfig = SdkReactConfig & {
521
548
  fetchPackage: FetchPackage;
522
549
  pubSub: PubSub;
523
550
  /**
524
- * @private URL of resolver. Resolver is a script used to fetch remove code bundle
551
+ * @private URL of resolver. Resolver is a script used to fetch remote code bundle
525
552
  */
526
553
  resolverUrl: string;
527
554
  sdkVersion: string;
@@ -558,6 +585,24 @@ declare interface IntroMarker {
558
585
  */
559
586
  export declare type ItemsInRow = Tag | Video | TvChannel;
560
587
 
588
+ /**
589
+ * @public
590
+ */
591
+ export declare interface JojExternals {
592
+ tvProfiProgramId?: string;
593
+ tvProfiContentId?: string;
594
+ tvProfiSerialId?: string;
595
+ contentId?: string;
596
+ provysId?: string;
597
+ tvProfiProvysId?: string;
598
+ tvProfiHouseId?: string;
599
+ tvProfiTitleOriginal?: string;
600
+ tvProfiTitleSk?: string;
601
+ tvProfiType?: string;
602
+ tvProfiSeriesName?: string;
603
+ tvProfiDistributor?: string;
604
+ }
605
+
561
606
  /**
562
607
  * Enum of all supported languages codes as in ISO 639-1
563
608
  * @public
@@ -567,9 +612,10 @@ export declare enum LangCode {
567
612
  DE = "de",
568
613
  EN = "en",
569
614
  FR = "fr",
615
+ IT = "it",
570
616
  PL = "pl",
571
617
  SK = "sk",
572
- SP = "sp"
618
+ ES = "es"
573
619
  }
574
620
 
575
621
  /**
@@ -592,6 +638,34 @@ export declare type LinkedVideo = {
592
638
  type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
593
639
  };
594
640
 
641
+ /**
642
+ * @public
643
+ */
644
+ export declare type Listener = ListenerAdMetadata | ListenerMarkers;
645
+
646
+ /**
647
+ * @public
648
+ */
649
+ export declare type ListenerAdMetadata = (metadata: AdMetadata) => void;
650
+
651
+ /**
652
+ * @public
653
+ */
654
+ export declare type ListenerMarkers = (marker: Marker[] | null) => void;
655
+
656
+ /**
657
+ * Not supported yet, now it does pass-through only.
658
+ *
659
+ * @public
660
+ */
661
+ export declare type LiveTvChannelSource = SourceBase & {
662
+ type: 'live_tv_channel';
663
+ /**
664
+ * Tivio needs channel name in order to load markers.
665
+ */
666
+ channelName: string;
667
+ };
668
+
595
669
  declare interface Logger {
596
670
  /** important messages */
597
671
  warn(...data: LoggerArgs): void;
@@ -614,15 +688,33 @@ declare type LoggerArgs = any[];
614
688
  /**
615
689
  * @public
616
690
  */
617
- export declare type Marker = {
691
+ export declare interface MallTvExternals {
692
+ mallTvEntityId: string;
693
+ }
694
+
695
+ /**
696
+ * @public
697
+ */
698
+ export declare interface Marker {
618
699
  id: string;
619
- type: string;
620
700
  from: Date;
621
701
  to: Date;
622
702
  count?: number;
623
703
  fromMs?: number;
624
704
  toMs?: number;
625
- };
705
+ relativeFromMs: number;
706
+ relativeToMs: number;
707
+ type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
708
+ }
709
+
710
+ /**
711
+ * External information of video migrated via our Public API.
712
+ * @public
713
+ */
714
+ export declare interface MigratedVideoExternals {
715
+ externalVideoId: string;
716
+ additionalData: any;
717
+ }
626
718
 
627
719
  /**
628
720
  * @public
@@ -678,6 +770,16 @@ export declare type Nullable<T> = {
678
770
  */
679
771
  export declare type ObjectType = Record<string, any>;
680
772
 
773
+ /**
774
+ * @public
775
+ */
776
+ export declare interface OktagonExternals {
777
+ /**
778
+ * DRM content Key ID - shouldn't be more connected with buyDRM or streamOnline? It is not general thing
779
+ */
780
+ keyId?: string;
781
+ }
782
+
681
783
  /**
682
784
  * @public
683
785
  */
@@ -694,6 +796,16 @@ declare type OrderByDirection = 'desc' | 'asc';
694
796
  export declare interface Organization {
695
797
  }
696
798
 
799
+ /**
800
+ * If Tivio PlayerWrapper is an interception layer, it should allow the pass-through
801
+ * of not just Tivio source types but any other source types that the 3rd party app may be using.
802
+ *
803
+ * @public
804
+ */
805
+ export declare type OtherSource = SourceBase & StartAndContinuePosition & {
806
+ type: 'other';
807
+ };
808
+
697
809
  /**
698
810
  * @public
699
811
  */
@@ -721,6 +833,30 @@ export declare enum PLATFORM {
721
833
  TV = "TV"
722
834
  }
723
835
 
836
+ /**
837
+ * @public
838
+ */
839
+ export declare type Player = {
840
+ ad: any;
841
+ currentTime: any;
842
+ adSegment: any;
843
+ event: any;
844
+ events: any;
845
+ source: any;
846
+ state: any;
847
+ onPlaybackEnded: any;
848
+ onSourceChanged: any;
849
+ onStateChanged: any;
850
+ onTimeChanged: any;
851
+ pause: any;
852
+ play: any;
853
+ togglePlayPause: any;
854
+ register: any;
855
+ seekTo: any;
856
+ setVolume: any;
857
+ triggerEvent: any;
858
+ };
859
+
724
860
  /**
725
861
  * @public
726
862
  */
@@ -776,6 +912,17 @@ export declare type PlayerConfig = {
776
912
  fullFileDownloadSupport?: boolean;
777
913
  };
778
914
  };
915
+ /**
916
+ * Ad service settings
917
+ */
918
+ adService?: {
919
+ /**
920
+ * Tivio - can be used in websites and TV apps. Does not support VPAID
921
+ * IMA - can be used only in websites. Supports VAST 2, partially VAST 3, VAST 4, SIMID 1.0, OM SDK 1.3,
922
+ * VPAID 2 (HTML5) https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/compatibility
923
+ */
924
+ name: 'IMA SDK' | 'Tivio';
925
+ };
779
926
  };
780
927
 
781
928
  /**
@@ -810,6 +957,18 @@ export declare interface PlayerInterface {
810
957
  unmute?: () => void;
811
958
  }
812
959
 
960
+ /**
961
+ * @public
962
+ */
963
+ export declare interface PlayerInterfaceForPlayerWrapper {
964
+ /**
965
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
966
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
967
+ */
968
+ seekTo: (ms: number) => void;
969
+ setSource: (source: Source | null) => void;
970
+ }
971
+
813
972
  /**
814
973
  * @public
815
974
  */
@@ -867,8 +1026,8 @@ export declare type PlayerWrapper = {
867
1026
  source: InputSource | null;
868
1027
  events: {
869
1028
  isSupported: (even: string) => boolean;
870
- addListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
871
- removeListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
1029
+ addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
1030
+ removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
872
1031
  removeAllListeners: () => void;
873
1032
  };
874
1033
  /**
@@ -906,6 +1065,19 @@ export declare type PlayerWrapper = {
906
1065
  toggleMuted: () => void;
907
1066
  };
908
1067
 
1068
+ /**
1069
+ * @public
1070
+ */
1071
+ export declare enum PlayerWrapperEventType {
1072
+ adMetadata = "adMetadata",
1073
+ markers = "markers"
1074
+ }
1075
+
1076
+ /**
1077
+ * @public
1078
+ */
1079
+ export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
1080
+
909
1081
  /**
910
1082
  * @public
911
1083
  */
@@ -925,12 +1097,16 @@ export declare type Purchase = {
925
1097
  expirationDate: Date | null;
926
1098
  id: string;
927
1099
  isExpired: boolean;
1100
+ /**
1101
+ * @deprecated isPurchased is ambiguous name. Now it means that purchase.status is "PAID".
1102
+ * So use purchase.status === PurchaseStatus.PAID instead.
1103
+ */
928
1104
  isPurchased: boolean;
929
1105
  monetization: PurchaseMonetization | null;
930
1106
  monetizationId: string | null;
931
1107
  monetizationRef: any | null;
932
1108
  status: PurchaseStatus | null;
933
- type: MonetizationType | null;
1109
+ type: PurchaseType | null;
934
1110
  /**
935
1111
  * Timestamp of the last purchase status update in milliseconds.
936
1112
  */
@@ -948,7 +1124,10 @@ export declare type PurchaseMonetization = {
948
1124
  currency?: Currency;
949
1125
  period?: number;
950
1126
  price?: number;
951
- type: MonetizationType;
1127
+ /**
1128
+ * Here are only transaction and subscription, because purchasing of advertisement monetization doesn't make sense.
1129
+ */
1130
+ type: 'transaction' | 'subscription';
952
1131
  title?: string;
953
1132
  frequency?: MONETIZATION_FREQUENCY | null;
954
1133
  /**
@@ -969,9 +1148,16 @@ export declare enum PurchaseStatus {
969
1148
  /**
970
1149
  * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
971
1150
  */
972
- KILL = "KILL"
1151
+ BLOCKED = "BLOCKED"
973
1152
  }
974
1153
 
1154
+ /**
1155
+ * Purchase is a purchase of one video (transaction type), purchase of subscription or voucher.
1156
+ *
1157
+ * @public
1158
+ */
1159
+ export declare type PurchaseType = 'transaction' | 'subscription' | 'voucher';
1160
+
975
1161
  /**
976
1162
  * @public
977
1163
  */
@@ -985,7 +1171,7 @@ export declare interface QerkoCancellationInfo {
985
1171
  */
986
1172
  export declare interface QerkoData {
987
1173
  monetization: Monetization;
988
- video?: Video;
1174
+ item?: Video | TvChannel;
989
1175
  onPurchase?: () => void;
990
1176
  onClose?: () => void;
991
1177
  }
@@ -1038,6 +1224,19 @@ export declare interface QerkoTransaction {
1038
1224
  voucherId?: string;
1039
1225
  }
1040
1226
 
1227
+ /**
1228
+ * @public
1229
+ */
1230
+ export declare type ReactNativeDeviceInfo = {
1231
+ type: 'react-native';
1232
+ /**
1233
+ * Type values defined according to {@link OperatingSystem} from `detect-browser` package for convenience.
1234
+ */
1235
+ os?: 'iOS' | 'Android OS';
1236
+ osVersion: string;
1237
+ platform: PLATFORM;
1238
+ };
1239
+
1041
1240
  /**
1042
1241
  * @public
1043
1242
  */
@@ -1052,7 +1251,7 @@ export declare type RemoteBundleState = {
1052
1251
  */
1053
1252
  export declare type RemoteProviderProps = {
1054
1253
  disableUnmounting?: boolean;
1055
- language?: string;
1254
+ language?: LangCode;
1056
1255
  children: any;
1057
1256
  };
1058
1257
 
@@ -1067,6 +1266,7 @@ export declare interface RouterOverrides {
1067
1266
  goBack: () => void;
1068
1267
  goLivePlayer: (videoId: string) => void;
1069
1268
  goVodPlayer: (tvChannelId: string) => void;
1269
+ goToHome: () => void;
1070
1270
  }
1071
1271
 
1072
1272
  /**
@@ -1126,6 +1326,7 @@ export declare interface RowItemAssets {
1126
1326
  portrait?: string | null;
1127
1327
  circled?: string | null;
1128
1328
  banner?: string | null;
1329
+ bannerMobile?: string | null;
1129
1330
  }
1130
1331
 
1131
1332
  /**
@@ -1213,7 +1414,7 @@ export declare type ScreenSubscription = (screenId: string, cb: (error: Error |
1213
1414
  *
1214
1415
  * @public
1215
1416
  */
1216
- export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'language'> & {
1417
+ export declare type SdkReactConfig = Omit<TivioConfig, 'language'> & {
1217
1418
  disableUnmounting?: boolean;
1218
1419
  enable?: boolean;
1219
1420
  enableSentry?: boolean;
@@ -1222,7 +1423,9 @@ export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'l
1222
1423
  }>;
1223
1424
  LoaderComponent?: ComponentType;
1224
1425
  logger?: Logger | null;
1225
- deviceCapabilities: PlayerCapability[] | 'auto';
1426
+ /**
1427
+ * language is required for bundle init (TivioConfig), but it can be set to default EN on SDK side, so here it's optional.
1428
+ */
1226
1429
  language?: LangCode;
1227
1430
  };
1228
1431
 
@@ -1261,6 +1464,63 @@ export declare const setUser: (userId: string | null, payload?: UserPayload | un
1261
1464
  */
1262
1465
  export declare const showGdprConsentPreferences: () => Promise<void>;
1263
1466
 
1467
+ /**
1468
+ * @public
1469
+ */
1470
+ export declare type Source = TvProgramSource | TivioVodSource | AdSource_2 | OtherSource | LiveTvChannelSource;
1471
+
1472
+ /**
1473
+ * @public
1474
+ */
1475
+ export declare type SourceBase = {
1476
+ /**
1477
+ * Tivio SDK users may use pretty complicated source objects in their existing code and if Tivio player
1478
+ * is an interception layer, it should allow them to pass through any type of object.
1479
+ */
1480
+ additionalPayload?: Record<string, any>;
1481
+ /**
1482
+ * Source type.
1483
+ */
1484
+ type: 'ad' | 'live_tv_channel' | 'other' | 'tivio_vod' | 'tv_program';
1485
+ /**
1486
+ * URI to play.
1487
+ */
1488
+ uri: string;
1489
+ };
1490
+
1491
+ /**
1492
+ * @public
1493
+ */
1494
+ export declare type StartAndContinuePosition = {
1495
+ /**
1496
+ * Relative from stream start, in ms.
1497
+ *
1498
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1499
+ *
1500
+ * On output from Tivio it is always defined. Tivio can change this value.
1501
+ * (e.g. in order to fix start position of a TV program)
1502
+ */
1503
+ startFromPosition?: number;
1504
+ /**
1505
+ * Relative from stream start, in ms.
1506
+ *
1507
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1508
+ *
1509
+ * If provided, tivio will not correct it and will send this value back in startFromPosition.
1510
+ * If provided, startFromPosition is ignored.
1511
+ */
1512
+ continueFromPosition?: number;
1513
+ };
1514
+
1515
+ /**
1516
+ * @public
1517
+ */
1518
+ declare interface StorageManager_2 {
1519
+ getItem(key: string): string | null | Promise<string | null>;
1520
+ setItem(key: string, value: string): void | Promise<void>;
1521
+ }
1522
+ export { StorageManager_2 as StorageManager }
1523
+
1264
1524
  /**
1265
1525
  * @public
1266
1526
  */
@@ -1360,7 +1620,6 @@ export declare type TaggedVideosOrderByField = 'seasonNumber' | 'episodeNumber'
1360
1620
  */
1361
1621
  export declare type TileProps = {
1362
1622
  cover: string;
1363
- isLoading: boolean;
1364
1623
  bottomLabel: string;
1365
1624
  bottomLabelAreaHeight: number;
1366
1625
  innerLabel: string;
@@ -1369,7 +1628,6 @@ export declare type TileProps = {
1369
1628
  focused: boolean;
1370
1629
  onClick?: () => void;
1371
1630
  hoverable: boolean;
1372
- overlay: boolean;
1373
1631
  coverPadding: CoverPadding;
1374
1632
  variant: RowItemComponent;
1375
1633
  coverWidth: number;
@@ -1458,10 +1716,6 @@ export declare type TivioComponents = {
1458
1716
  WebTile: React_2.ComponentType<{
1459
1717
  item?: ItemsInRow;
1460
1718
  } & TilePropsPartial>;
1461
- AdIndicationButtonWeb: React_2.ReactNode;
1462
- Recommendation: React_2.ReactNode;
1463
- SkipButtonWeb: React_2.ReactNode;
1464
- TvPlayer: React_2.ComponentType<WebPlayerProps>;
1465
1719
  };
1466
1720
 
1467
1721
  /**
@@ -1520,7 +1774,7 @@ export declare type TivioGetters = {
1520
1774
  */
1521
1775
  getPlayerWrapper: (opt: {
1522
1776
  playerWrapperId?: string;
1523
- }) => any;
1777
+ }) => PlayerWrapper;
1524
1778
  getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
1525
1779
  /**
1526
1780
  * Get video by its id.
@@ -1539,7 +1793,7 @@ export declare type TivioGetters = {
1539
1793
  * @public
1540
1794
  */
1541
1795
  export declare type TivioHooks = {
1542
- useAd: () => [(AdSource | null)];
1796
+ useAd: () => [(AdExternal | null)];
1543
1797
  useAdSegment: () => AdSegment | null;
1544
1798
  useCancelSubscription: UseCancelSubscription;
1545
1799
  useItemsInRow: (rowId: string, options: PaginationOptions) => {
@@ -1650,6 +1904,51 @@ export declare type TivioInternalProviders = {
1650
1904
  RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
1651
1905
  };
1652
1906
 
1907
+ /**
1908
+ * @public
1909
+ */
1910
+ export declare type TivioJsBundleExposedApi = {
1911
+ AdSource: any;
1912
+ ChannelSource: any;
1913
+ VodTivioSource: any;
1914
+ /**
1915
+ * Get (or create) player wrapper instance
1916
+ * @param id - player wrapper id
1917
+ * @returns {Player} player wrapper instance
1918
+ */
1919
+ getPlayer: (id: string) => Player;
1920
+ /**
1921
+ * Get tv channel by its id.
1922
+ * @param tvChannelId - tv channel id
1923
+ * @returns {Promise<TvChannel | null>} channel or null if tv channel does not exists
1924
+ */
1925
+ getTvChannelById: (tvChannelId: string) => Promise<TvChannel | null>;
1926
+ /**
1927
+ * Get tag by its id.
1928
+ * @param tagId - tag id
1929
+ * @returns {Promise<Tag | null>} widget or null if tag does not exists
1930
+ */
1931
+ getTagById: (tagId: string) => Promise<Tag | null>;
1932
+ createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
1933
+ destroy: () => Promise<void>;
1934
+ } & Pick<TivioGetters, 'getVideoById'> & Pick<TivioSubscriptions, 'subscribeToVideo' | 'subscribeToItemsInRow'> & Pick<TivioAuth, 'createUserWithEmailAndPassword' | 'signInWithEmailAndPassword'> & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
1935
+
1936
+ /**
1937
+ * @public
1938
+ */
1939
+ export declare interface TivioPlayerWrapper {
1940
+ addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
1941
+ reportError: (error: Error) => void;
1942
+ reportPlaybackEnded: () => void;
1943
+ reportTimeProgress: (ms: number) => void;
1944
+ seekTo: (ms: number) => void;
1945
+ /**
1946
+ * @param {Source} source - source to set
1947
+ * @param {string} calibrationId - id of calibration profile
1948
+ */
1949
+ setSource: (source: Source | null, calibrationId?: string) => void;
1950
+ }
1951
+
1653
1952
  /**
1654
1953
  * @public
1655
1954
  */
@@ -1684,12 +1983,6 @@ export declare type TivioReactBundle = {
1684
1983
  expirationDate: Date;
1685
1984
  }) => Promise<QerkoPaymentInfo>;
1686
1985
  cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
1687
- /**
1688
- * Set tivio language.
1689
- * @param language
1690
- */
1691
- setLanguage: (language: LangCode) => void;
1692
- setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1693
1986
  showConsentPreferences: () => void;
1694
1987
  /**
1695
1988
  * Contains hooks and providers for internal usages.
@@ -1698,6 +1991,20 @@ export declare type TivioReactBundle = {
1698
1991
  */
1699
1992
  internal: TivioInternalBundle;
1700
1993
  destroy: () => Promise<void>;
1994
+ } & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
1995
+
1996
+ /**
1997
+ * @public
1998
+ */
1999
+ export declare type TivioSetters = {
2000
+ setBundleVersion: (bundleVersion: string | null) => void;
2001
+ /**
2002
+ * Set tivio language.
2003
+ * @param language
2004
+ */
2005
+ setLanguage: (language: LangCode) => void;
2006
+ setStorageManager: (storageManager: StorageManager_2) => void;
2007
+ setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1701
2008
  };
1702
2009
 
1703
2010
  /**
@@ -1730,6 +2037,17 @@ export declare type TivioSubscriptions = {
1730
2037
  }) => void;
1731
2038
  };
1732
2039
 
2040
+ /**
2041
+ * @public
2042
+ */
2043
+ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
2044
+ type: 'tivio_vod';
2045
+ /**
2046
+ * Allows Tivio to load monetization config an apply ads.
2047
+ */
2048
+ videoPath: string;
2049
+ };
2050
+
1733
2051
  /**
1734
2052
  * @public
1735
2053
  */
@@ -1779,15 +2097,6 @@ export declare interface TivioWidgetRef {
1779
2097
  });
1780
2098
  }
1781
2099
 
1782
- /**
1783
- * @public
1784
- */
1785
- export declare type TizenDeviceInfo = {
1786
- type: 'tizen';
1787
- model?: string;
1788
- osVersion?: string;
1789
- };
1790
-
1791
2100
  declare type TransactionInfo = {
1792
2101
  type: 'transaction';
1793
2102
  name: string;
@@ -1801,7 +2110,7 @@ declare type TransactionInfo = {
1801
2110
  * @public
1802
2111
  */
1803
2112
  export declare type Translation = {
1804
- [key in LangCode]: string;
2113
+ [key in LangCode]?: string;
1805
2114
  };
1806
2115
 
1807
2116
  /**
@@ -1828,6 +2137,35 @@ export declare interface TvChannel extends RowItem {
1828
2137
  price: number;
1829
2138
  }
1830
2139
 
2140
+ /**
2141
+ * @public
2142
+ */
2143
+ export declare type TvProgramSource = SourceBase & StartAndContinuePosition & {
2144
+ type: 'tv_program';
2145
+ /**
2146
+ * If epgTo is wrong, Tivio cannot correctly guess if the video it startover or timeshift . For such cases
2147
+ * Tivio needs explicit tv mode.
2148
+ * null if source begins in the future.
2149
+ */
2150
+ tvMode: 'startover' | 'timeshift' | null;
2151
+ /**
2152
+ * Tivio needs channel name in order to load markers.
2153
+ */
2154
+ channelName: string;
2155
+ /**
2156
+ * Tivio needs EPG from in order to load markers.
2157
+ */
2158
+ epgFrom: Date;
2159
+ /**
2160
+ * Tivio needs EPG to in order to load markers.
2161
+ */
2162
+ epgTo: Date;
2163
+ /**
2164
+ * When the stream (provided in uri) really starts - typically few minutes before epgFrom.
2165
+ */
2166
+ streamStart: Date;
2167
+ };
2168
+
1831
2169
  /**
1832
2170
  * @public
1833
2171
  */
@@ -1836,7 +2174,7 @@ export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
1836
2174
  /**
1837
2175
  * @public
1838
2176
  */
1839
- export declare const useAd: () => AdSource | null;
2177
+ export declare const useAd: () => AdExternal | null;
1840
2178
 
1841
2179
  /**
1842
2180
  * @public
@@ -1988,9 +2326,23 @@ export declare const usePurchasesWithVideos: () => {
1988
2326
  * @public
1989
2327
  */
1990
2328
  export declare type User = {
2329
+ /**
2330
+ * Returns "active" (non-expired) purchases, so they give access to some content.
2331
+ * Does not return voucher purchases, because they give access to videos/subscriptions only for user who activates voucher,
2332
+ * not for user who purchases it.
2333
+ */
1991
2334
  purchases: Purchase[];
2335
+ /**
2336
+ * Returns all PAID or CANCELLED user purchases (expired and non-expired)
2337
+ */
1992
2338
  allPurchases: Purchase[];
2339
+ /**
2340
+ * Returns "active" (not CANCELLED) VoD purchases ("transaction" type)
2341
+ */
1993
2342
  purchasedVods: Purchase[];
2343
+ /**
2344
+ * Returns "active" (non-expired) subscription purchases
2345
+ */
1994
2346
  purchasedSubscriptions: Purchase[];
1995
2347
  isPurchasesInitialized: boolean;
1996
2348
  isSignedIn: boolean;
@@ -2164,10 +2516,14 @@ export declare enum VastProvider {
2164
2516
  GARAZ_TV_DEV = "garaz.tv.dev",
2165
2517
  IMPRESSION_MEDIA_PREBID = "impressionMedia-prebid",
2166
2518
  JOJ = "joj",
2519
+ JOJ_AD_MANAGER_VOD_PREROLL = "joj-ad-manager-vod-preroll",
2520
+ JOJ_AD_MANAGER_VOD_MIDROLL = "joj-ad-manager-vod-midroll",
2521
+ JOJ_AD_MANAGER_LIVE_PREROLL = "joj-ad-manager-live-preroll",
2167
2522
  MALL_TV = "malltv",
2168
2523
  MALL_TV_PREBID = "malltv-prebid",
2169
2524
  PRIMA = "prima",
2170
- TEST = "test"
2525
+ TEST = "test",
2526
+ TEST_VPAID = "test-vpaid"
2171
2527
  }
2172
2528
 
2173
2529
  /**
@@ -2249,18 +2605,7 @@ export declare enum VideoContentType {
2249
2605
  /**
2250
2606
  * @public
2251
2607
  */
2252
- export declare interface VideoExternals {
2253
- tvProfiProgramId?: string;
2254
- tvProfiContentId?: string;
2255
- tvProfiSerialId?: string;
2256
- contentId?: string;
2257
- provysId?: string;
2258
- mallTvEntityId?: string;
2259
- /**
2260
- * DRM content Key ID - should't be more connected with buyDRM or streamOnline? It is not general thing
2261
- */
2262
- keyId?: string;
2263
- }
2608
+ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExternals | MigratedVideoExternals;
2264
2609
 
2265
2610
  declare type VideoPath = string;
2266
2611
 
@@ -2277,7 +2622,11 @@ export declare enum VideoType {
2277
2622
  * Video is a standard single video.
2278
2623
  */
2279
2624
  VIDEO = "VIDEO",
2280
- TV_PROGRAM = "TV_PROGRAM"
2625
+ TV_PROGRAM = "TV_PROGRAM",
2626
+ /**
2627
+ * Video object represents whole series, e.g. tv show.
2628
+ */
2629
+ SERIES = "SERIES"
2281
2630
  }
2282
2631
 
2283
2632
  /**
@@ -2324,15 +2673,6 @@ declare type Voucher = {
2324
2673
  voucherInfo: SubscriptionInfo | TransactionInfo;
2325
2674
  };
2326
2675
 
2327
- /**
2328
- * @public
2329
- */
2330
- export declare type WebosDeviceInfo = {
2331
- type: 'webos';
2332
- model?: string;
2333
- osVersion?: string;
2334
- };
2335
-
2336
2676
  /**
2337
2677
  * @public
2338
2678
  */