@tivio/sdk-react 3.6.3 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
  */
@@ -106,6 +134,14 @@ export declare enum ALGOLIA_INDEX_NAME {
106
134
  USERS = "users"
107
135
  }
108
136
 
137
+ /**
138
+ * @public
139
+ */
140
+ export declare type ArrisDeviceInfo = {
141
+ type: 'arris';
142
+ model?: 'VIP1003' | 'VIP1113' | 'VIP5305';
143
+ };
144
+
109
145
  /**
110
146
  * @public
111
147
  */
@@ -185,11 +221,7 @@ export declare type BannerProps = {
185
221
  hoverable: boolean;
186
222
  broadcastInfo: string;
187
223
  height: number;
188
- coverPadding: CoverPadding;
189
224
  cover: string;
190
- fullWidth: boolean;
191
- coverContainerPaddingTop: string;
192
- width: number;
193
225
  overlay: boolean;
194
226
  price: string;
195
227
  hasRoundCorners: boolean;
@@ -202,39 +234,6 @@ export declare type BannerProps = {
202
234
  */
203
235
  export declare type BannerPropsPartial = Partial<BannerProps>;
204
236
 
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
237
  /**
239
238
  * @public
240
239
  */
@@ -268,7 +267,7 @@ export declare type ButtonOptions = {
268
267
  /**
269
268
  * @public
270
269
  */
271
- export declare type Callback = () => void;
270
+ export declare type Callback<T = any> = (arg?: T) => void;
272
271
 
273
272
  /**
274
273
  * @public
@@ -281,14 +280,6 @@ export declare interface Channel {
281
280
  recentVideos: Video[];
282
281
  }
283
282
 
284
- /**
285
- * @public
286
- */
287
- export declare const ChannelsContext: React_2.Context<DataState<Channel>>;
288
-
289
- /**
290
- * @public
291
- */
292
283
  export declare type ChannelSource = {
293
284
  new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
294
285
  description: string;
@@ -323,6 +314,11 @@ export declare interface ChannelSourcePojo {
323
314
  */
324
315
  export declare type Chapter = any;
325
316
 
317
+ /**
318
+ * @public
319
+ */
320
+ export declare type CmpConfig = 'default' | 'debug' | 'none';
321
+
326
322
  /**
327
323
  * TODO it's the same as Customizations, not?
328
324
  * @internal
@@ -341,16 +337,10 @@ export declare type Components = {
341
337
  };
342
338
 
343
339
  /**
340
+ * Just another alias. Reexported for backward compatibility.
344
341
  * @public
345
342
  */
346
- export declare type Config = Pick<InternalConfig, 'bundleUrlOverride' | 'currency' | 'disableUnmounting' | 'capabilitiesOptions' | 'enable' | 'enableSentry' | 'ErrorComponent' | 'language' | 'LoaderComponent' | 'logger' | 'secret' | 'verbose' | 'forceCloudFnResolver'> & {
347
- deviceCapabilities: PlayerCapability[] | 'auto';
348
- /**
349
- * @private
350
- * Run HTML, CSS and JS feature support check
351
- */
352
- runFeatureSupportCheck?: boolean;
353
- };
343
+ export declare type Config = SdkReactConfig;
354
344
 
355
345
  /**
356
346
  * @public
@@ -455,7 +445,7 @@ export declare type Customizations = {
455
445
  * @internal
456
446
  */
457
447
  export declare interface CustomTheme {
458
- customizations?: Customizations;
448
+ customizations?: Partial<Customizations>;
459
449
  components: Components;
460
450
  size: (size: number) => number;
461
451
  }
@@ -464,18 +454,11 @@ export declare interface CustomTheme {
464
454
  * @internal
465
455
  */
466
456
  export declare interface CustomThemeOptions {
467
- customizations?: Customizations;
457
+ customizations?: Partial<Customizations>;
468
458
  components: Components;
469
459
  size: (size: number) => number;
470
460
  }
471
461
 
472
- declare interface DataState<T> {
473
- data: {
474
- [key: string]: HookData<T>;
475
- };
476
- setData: (key: string, data: HookData<T>) => void;
477
- }
478
-
479
462
  /**
480
463
  * @public
481
464
  */
@@ -498,6 +481,11 @@ export declare type DetailedPrice = {
498
481
  frequency?: MONETIZATION_FREQUENCY;
499
482
  };
500
483
 
484
+ /**
485
+ * @public
486
+ */
487
+ export declare type DeviceInfo = ArrisDeviceInfo | ReactNativeDeviceInfo;
488
+
501
489
  /**
502
490
  * @public
503
491
  */
@@ -529,6 +517,11 @@ export declare type DocumentOptions = Partial<{
529
517
  */
530
518
  export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
531
519
 
520
+ /**
521
+ * @public
522
+ */
523
+ declare type Empty_2 = void | Promise<void> | undefined | Promise<undefined>;
524
+
532
525
  /**
533
526
  * @public
534
527
  */
@@ -571,12 +564,6 @@ export declare interface GenericOnCallError {
571
564
  */
572
565
  export declare const getPubSub: () => PubSub;
573
566
 
574
- declare interface HookData<T> {
575
- data: PaginationData<T> | null;
576
- error: Error | null;
577
- isLoading: boolean;
578
- }
579
-
580
567
  /**
581
568
  * @public
582
569
  */
@@ -651,46 +638,23 @@ export declare type InputSource = AdSource | ChannelSource | VodTivioSource | Vo
651
638
  /**
652
639
  * @public
653
640
  */
654
- export declare type InternalConfig = {
655
- /**
656
- * @private URL of remote code bundle to be fetched directly (without using resolver)
657
- */
658
- bundleUrlOverride?: string;
659
- /**
660
- * Tells Tivio which technologies/protocols etc. is the device capable to play.
661
- * If not provided, Tivio will try to guess it (based on the browser).
662
- */
663
- deviceCapabilities: PlayerCapability[];
664
- /**
665
- * Additional options for deviceCapabilities
666
- */
667
- capabilitiesOptions?: {
668
- /**
669
- * Should the player prefer HTTP sources instead HTTPs if they are available.
670
- * This can be used on platforms that support mixed content but do not support
671
- * specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
672
- */
673
- preferHttp?: boolean;
674
- };
675
- secret: string | null;
676
- language?: LangCode;
677
- verbose?: boolean;
678
- currency: Currency;
679
- disableUnmounting?: boolean;
680
- enable?: boolean;
681
- enableSentry?: boolean;
682
- ErrorComponent?: ComponentType<{
683
- error: string | null;
684
- }>;
641
+ export declare type InternalConfig = SdkReactConfig & {
685
642
  fetchPackage: FetchPackage;
686
- LoaderComponent?: ComponentType;
687
- logger?: Logger | null;
688
643
  pubSub: PubSub;
689
644
  /**
690
- * @private URL of resolver. Resolver is a script used to fetch remove code bundle
645
+ * @private URL of resolver. Resolver is a script used to fetch remote code bundle
691
646
  */
692
647
  resolverUrl: string;
693
648
  sdkVersion: string;
649
+ /**
650
+ * @private URL of remote code bundle to be fetched directly (without using resolver)
651
+ */
652
+ bundleUrlOverride?: string;
653
+ /**
654
+ * @private
655
+ * Run HTML, CSS and JS feature support check
656
+ */
657
+ runFeatureSupportCheck?: boolean;
694
658
  /**
695
659
  * @private
696
660
  */
@@ -715,6 +679,24 @@ declare interface IntroMarker {
715
679
  */
716
680
  export declare type ItemsInRow = Tag | Video | TvChannel;
717
681
 
682
+ /**
683
+ * @public
684
+ */
685
+ export declare interface JojExternals {
686
+ tvProfiProgramId?: string;
687
+ tvProfiContentId?: string;
688
+ tvProfiSerialId?: string;
689
+ contentId?: string;
690
+ provysId?: string;
691
+ tvProfiProvysId?: string;
692
+ tvProfiHouseId?: string;
693
+ tvProfiTitleOriginal?: string;
694
+ tvProfiTitleSk?: string;
695
+ tvProfiType?: string;
696
+ tvProfiSeriesName?: string;
697
+ tvProfiDistributor?: string;
698
+ }
699
+
718
700
  /**
719
701
  * Enum of all supported languages codes as in ISO 639-1
720
702
  * @public
@@ -749,6 +731,34 @@ export declare type LinkedVideo = {
749
731
  type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
750
732
  };
751
733
 
734
+ /**
735
+ * @public
736
+ */
737
+ export declare type Listener = ListenerAdMetadata | ListenerMarkers;
738
+
739
+ /**
740
+ * @public
741
+ */
742
+ export declare type ListenerAdMetadata = (metadata: AdMetadata) => void;
743
+
744
+ /**
745
+ * @public
746
+ */
747
+ export declare type ListenerMarkers = (marker: Marker[] | null) => void;
748
+
749
+ /**
750
+ * Not supported yet, now it does pass-through only.
751
+ *
752
+ * @public
753
+ */
754
+ export declare type LiveTvChannelSource = SourceBase & {
755
+ type: 'live_tv_channel';
756
+ /**
757
+ * Tivio needs channel name in order to load markers.
758
+ */
759
+ channelName: string;
760
+ };
761
+
752
762
  declare interface Logger {
753
763
  /** important messages */
754
764
  warn(...data: LoggerArgs): void;
@@ -771,15 +781,24 @@ declare type LoggerArgs = any[];
771
781
  /**
772
782
  * @public
773
783
  */
774
- export declare type Marker = {
784
+ export declare interface MallTvExternals {
785
+ mallTvEntityId: string;
786
+ }
787
+
788
+ /**
789
+ * @public
790
+ */
791
+ export declare interface Marker {
775
792
  id: string;
776
- type: string;
777
793
  from: Date;
778
794
  to: Date;
779
795
  count?: number;
780
796
  fromMs?: number;
781
797
  toMs?: number;
782
- };
798
+ relativeFromMs: number;
799
+ relativeToMs: number;
800
+ type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
801
+ }
783
802
 
784
803
  /**
785
804
  * @public
@@ -835,6 +854,16 @@ export declare type Nullable<T> = {
835
854
  */
836
855
  export declare type ObjectType = Record<string, any>;
837
856
 
857
+ /**
858
+ * @public
859
+ */
860
+ export declare interface OktagonExternals {
861
+ /**
862
+ * DRM content Key ID - shouldn't be more connected with buyDRM or streamOnline? It is not general thing
863
+ */
864
+ keyId?: string;
865
+ }
866
+
838
867
  /**
839
868
  * @public
840
869
  */
@@ -851,10 +880,14 @@ declare type OrderByDirection = 'desc' | 'asc';
851
880
  export declare interface Organization {
852
881
  }
853
882
 
854
- declare type PaginationData<T> = {
855
- items: T[];
856
- hasNextPage: boolean;
857
- fetchMore: Function;
883
+ /**
884
+ * If Tivio PlayerWrapper is an interception layer, it should allow the pass-through
885
+ * of not just Tivio source types but any other source types that the 3rd party app may be using.
886
+ *
887
+ * @public
888
+ */
889
+ export declare type OtherSource = SourceBase & StartAndContinuePosition & {
890
+ type: 'other';
858
891
  };
859
892
 
860
893
  /**
@@ -884,6 +917,30 @@ export declare enum PLATFORM {
884
917
  TV = "TV"
885
918
  }
886
919
 
920
+ /**
921
+ * @public
922
+ */
923
+ export declare type Player = {
924
+ ad: any;
925
+ currentTime: any;
926
+ adSegment: any;
927
+ event: any;
928
+ events: any;
929
+ source: any;
930
+ state: any;
931
+ onPlaybackEnded: any;
932
+ onSourceChanged: any;
933
+ onStateChanged: any;
934
+ onTimeChanged: any;
935
+ pause: any;
936
+ play: any;
937
+ togglePlayPause: any;
938
+ register: any;
939
+ seekTo: any;
940
+ setVolume: any;
941
+ triggerEvent: any;
942
+ };
943
+
887
944
  /**
888
945
  * @public
889
946
  */
@@ -893,6 +950,65 @@ export declare interface PlayerCapability {
893
950
  protocol: 'dash' | 'hls' | 'mp4';
894
951
  }
895
952
 
953
+ /**
954
+ * @public
955
+ */
956
+ export declare type PlayerConfig = {
957
+ /**
958
+ * Some devices do not seek exactly
959
+ *
960
+ * e.g. on Arris if we request seek to position P, in reality it will seek to P -+5s
961
+ * e.g. on Arris if we request play from position P, in reality it will play from P -+5s
962
+ * (on Arris the error margin varies according to video format)
963
+ */
964
+ acceptablePositionAnomalyMs?: number;
965
+ /**
966
+ * Stream delay config
967
+ *
968
+ * IP TV apps have TV program / TV channel streams delayed relative to the original
969
+ * video source. Therefore stream markers taken from the original video source
970
+ * are delayed relative to the TV stream seen by end users of the IP TV app.
971
+ *
972
+ * This delay must be corrected.
973
+ */
974
+ streamDelayConfig?: {
975
+ /**
976
+ * ID of the delay config
977
+ */
978
+ id: string;
979
+ };
980
+ ui?: {
981
+ /**
982
+ * ID of a DOM element inside which Tivio should display its player-related UI
983
+ * such as ad buttons. This DOM element is an anchor point for Tivio UI. Preferably
984
+ * it should be a <div/> element styled to cover the whole area of the video player
985
+ * and it should be positioned to be on top the existing player UI (e.g. via z-index).
986
+ */
987
+ domAnchorId: string | null;
988
+ };
989
+ protocols?: {
990
+ mp4?: {
991
+ /**
992
+ * Set to false if player does not support MP4 files that require full file download
993
+ * (i.e. they do not support progressive MP4 download and therefore the whole file
994
+ * must be downloaded before playback can start)
995
+ */
996
+ fullFileDownloadSupport?: boolean;
997
+ };
998
+ };
999
+ /**
1000
+ * Ad service settings
1001
+ */
1002
+ adService?: {
1003
+ /**
1004
+ * Tivio - can be used in websites and TV apps. Does not support VPAID
1005
+ * IMA - can be used only in websites. Supports VAST 2, partially VAST 3, VAST 4, SIMID 1.0, OM SDK 1.3,
1006
+ * VPAID 2 (HTML5) https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/compatibility
1007
+ */
1008
+ name: 'IMA SDK' | 'Tivio';
1009
+ };
1010
+ };
1011
+
896
1012
  /**
897
1013
  * @public
898
1014
  */
@@ -925,6 +1041,18 @@ export declare interface PlayerInterface {
925
1041
  unmute?: () => void;
926
1042
  }
927
1043
 
1044
+ /**
1045
+ * @public
1046
+ */
1047
+ export declare interface PlayerInterfaceForPlayerWrapper {
1048
+ /**
1049
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
1050
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
1051
+ */
1052
+ seekTo: (ms: number) => void;
1053
+ setSource: (source: Source | null) => void;
1054
+ }
1055
+
928
1056
  /**
929
1057
  * @public
930
1058
  */
@@ -982,8 +1110,8 @@ export declare type PlayerWrapper = {
982
1110
  source: InputSource | null;
983
1111
  events: {
984
1112
  isSupported: (even: string) => boolean;
985
- addListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
986
- removeListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
1113
+ addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
1114
+ removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
987
1115
  removeAllListeners: () => void;
988
1116
  };
989
1117
  /**
@@ -1021,6 +1149,19 @@ export declare type PlayerWrapper = {
1021
1149
  toggleMuted: () => void;
1022
1150
  };
1023
1151
 
1152
+ /**
1153
+ * @public
1154
+ */
1155
+ export declare enum PlayerWrapperEventType {
1156
+ adMetadata = "adMetadata",
1157
+ markers = "markers"
1158
+ }
1159
+
1160
+ /**
1161
+ * @public
1162
+ */
1163
+ export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
1164
+
1024
1165
  /**
1025
1166
  * @public
1026
1167
  */
@@ -1033,18 +1174,30 @@ export declare interface PubSub {
1033
1174
  * @public
1034
1175
  */
1035
1176
  export declare type Purchase = {
1177
+ /**
1178
+ * Timestamp of the purchase creation in milliseconds.
1179
+ */
1180
+ created: number | null;
1181
+ expirationDate: Date | null;
1036
1182
  id: string;
1183
+ isExpired: boolean;
1184
+ /**
1185
+ * @deprecated isPurchased is ambiguous name. Now it means that purchase.status is "PAID".
1186
+ * So use purchase.status === PurchaseStatus.PAID instead.
1187
+ */
1037
1188
  isPurchased: boolean;
1038
- monetizationRef: any | null;
1039
1189
  monetization: PurchaseMonetization | null;
1040
1190
  monetizationId: string | null;
1041
- type: MonetizationType | null;
1042
- videoId: string | null;
1191
+ monetizationRef: any | null;
1043
1192
  status: PurchaseStatus | null;
1193
+ type: PurchaseType | null;
1194
+ /**
1195
+ * Timestamp of the last purchase status update in milliseconds.
1196
+ */
1197
+ updated: number | null;
1044
1198
  video: Video | null;
1199
+ videoId: string | null;
1045
1200
  videoRef: any | null;
1046
- expirationDate: Date | null;
1047
- isExpired: boolean;
1048
1201
  voucherId?: string;
1049
1202
  };
1050
1203
 
@@ -1055,7 +1208,10 @@ export declare type PurchaseMonetization = {
1055
1208
  currency?: Currency;
1056
1209
  period?: number;
1057
1210
  price?: number;
1058
- type: MonetizationType;
1211
+ /**
1212
+ * Here are only transaction and subscription, because purchasing of advertisement monetization doesn't make sense.
1213
+ */
1214
+ type: 'transaction' | 'subscription';
1059
1215
  title?: string;
1060
1216
  frequency?: MONETIZATION_FREQUENCY | null;
1061
1217
  /**
@@ -1076,9 +1232,16 @@ export declare enum PurchaseStatus {
1076
1232
  /**
1077
1233
  * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
1078
1234
  */
1079
- KILL = "KILL"
1235
+ BLOCKED = "BLOCKED"
1080
1236
  }
1081
1237
 
1238
+ /**
1239
+ * Purchase is a purchase of one video (transaction type), purchase of subscription or voucher.
1240
+ *
1241
+ * @public
1242
+ */
1243
+ export declare type PurchaseType = 'transaction' | 'subscription' | 'voucher';
1244
+
1082
1245
  /**
1083
1246
  * @public
1084
1247
  */
@@ -1092,7 +1255,7 @@ export declare interface QerkoCancellationInfo {
1092
1255
  */
1093
1256
  export declare interface QerkoData {
1094
1257
  monetization: Monetization;
1095
- video?: Video;
1258
+ item?: Video | TvChannel;
1096
1259
  onPurchase?: () => void;
1097
1260
  onClose?: () => void;
1098
1261
  }
@@ -1148,10 +1311,22 @@ export declare interface QerkoTransaction {
1148
1311
  /**
1149
1312
  * @public
1150
1313
  */
1151
- export declare type RemoteBundleState = {
1314
+ export declare type ReactNativeDeviceInfo = {
1315
+ type: 'react-native';
1316
+ /**
1317
+ * Type values defined according to {@link OperatingSystem} from `detect-browser` package for convenience.
1318
+ */
1319
+ os?: 'iOS' | 'Android OS';
1320
+ osVersion: string;
1321
+ platform: PLATFORM;
1322
+ };
1323
+
1324
+ /**
1325
+ * @public
1326
+ */
1327
+ export declare type RemoteBundleState = {
1152
1328
  config: InternalConfig;
1153
1329
  error: string | null;
1154
- settings: Settings;
1155
1330
  state: 'loading' | 'error' | 'ready';
1156
1331
  } & Nullable<TivioBundle>;
1157
1332
 
@@ -1160,7 +1335,7 @@ export declare type RemoteBundleState = {
1160
1335
  */
1161
1336
  export declare type RemoteProviderProps = {
1162
1337
  disableUnmounting?: boolean;
1163
- language?: string;
1338
+ language?: LangCode;
1164
1339
  children: any;
1165
1340
  };
1166
1341
 
@@ -1234,6 +1409,7 @@ export declare interface RowItemAssets {
1234
1409
  portrait?: string | null;
1235
1410
  circled?: string | null;
1236
1411
  banner?: string | null;
1412
+ bannerMobile?: string | null;
1237
1413
  }
1238
1414
 
1239
1415
  /**
@@ -1315,6 +1491,27 @@ export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'f
1315
1491
  */
1316
1492
  export declare type ScreenSubscription = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void) => Disposer_2;
1317
1493
 
1494
+ /**
1495
+ * Config of sdk-react. Contains all properties that can be passed via TivioProvider.
1496
+ * Consists of TivioConfig's properties + "sdk only" properties, that are used only in sdk, not in bundle.
1497
+ *
1498
+ * @public
1499
+ */
1500
+ export declare type SdkReactConfig = Omit<TivioConfig, 'language'> & {
1501
+ disableUnmounting?: boolean;
1502
+ enable?: boolean;
1503
+ enableSentry?: boolean;
1504
+ ErrorComponent?: ComponentType<{
1505
+ error: string | null;
1506
+ }>;
1507
+ LoaderComponent?: ComponentType;
1508
+ logger?: Logger | null;
1509
+ /**
1510
+ * language is required for bundle init (TivioConfig), but it can be set to default EN on SDK side, so here it's optional.
1511
+ */
1512
+ language?: LangCode;
1513
+ };
1514
+
1318
1515
  /**
1319
1516
  * @public
1320
1517
  */
@@ -1325,21 +1522,6 @@ export declare interface Section {
1325
1522
  videos: Video[];
1326
1523
  }
1327
1524
 
1328
- /**
1329
- * @public
1330
- */
1331
- export declare const SectionsContext: React_2.Context<DataState<Section>>;
1332
-
1333
- /**
1334
- * @public
1335
- */
1336
- export declare type Settings = {
1337
- /**
1338
- * @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
1339
- */
1340
- setUser: (userId: string, userPayload: unknown) => Promise<void>;
1341
- };
1342
-
1343
1525
  /**
1344
1526
  * Used for entities, that can be global (e.g. asset presets, tag types).
1345
1527
  * Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
@@ -1365,6 +1547,63 @@ export declare const setUser: (userId: string | null, payload?: UserPayload | un
1365
1547
  */
1366
1548
  export declare const showGdprConsentPreferences: () => Promise<void>;
1367
1549
 
1550
+ /**
1551
+ * @public
1552
+ */
1553
+ export declare type Source = TvProgramSource | TivioVodSource | AdSource_2 | OtherSource | LiveTvChannelSource;
1554
+
1555
+ /**
1556
+ * @public
1557
+ */
1558
+ export declare type SourceBase = {
1559
+ /**
1560
+ * Tivio SDK users may use pretty complicated source objects in their existing code and if Tivio player
1561
+ * is an interception layer, it should allow them to pass through any type of object.
1562
+ */
1563
+ additionalPayload?: Record<string, any>;
1564
+ /**
1565
+ * Source type.
1566
+ */
1567
+ type: 'ad' | 'live_tv_channel' | 'other' | 'tivio_vod' | 'tv_program';
1568
+ /**
1569
+ * URI to play.
1570
+ */
1571
+ uri: string;
1572
+ };
1573
+
1574
+ /**
1575
+ * @public
1576
+ */
1577
+ export declare type StartAndContinuePosition = {
1578
+ /**
1579
+ * Relative from stream start, in ms.
1580
+ *
1581
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1582
+ *
1583
+ * On output from Tivio it is always defined. Tivio can change this value.
1584
+ * (e.g. in order to fix start position of a TV program)
1585
+ */
1586
+ startFromPosition?: number;
1587
+ /**
1588
+ * Relative from stream start, in ms.
1589
+ *
1590
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1591
+ *
1592
+ * If provided, tivio will not correct it and will send this value back in startFromPosition.
1593
+ * If provided, startFromPosition is ignored.
1594
+ */
1595
+ continueFromPosition?: number;
1596
+ };
1597
+
1598
+ /**
1599
+ * @public
1600
+ */
1601
+ declare interface StorageManager_2 {
1602
+ getItem(key: string): string | null | Promise<string | null>;
1603
+ setItem(key: string, value: string): void | Promise<void>;
1604
+ }
1605
+ export { StorageManager_2 as StorageManager }
1606
+
1368
1607
  /**
1369
1608
  * @public
1370
1609
  */
@@ -1476,6 +1715,9 @@ export declare type TileOptions = {
1476
1715
  opacity: string | number;
1477
1716
  fontWeight: string;
1478
1717
  };
1718
+ sizes: {
1719
+ [variant in TileSizeVariant]: TileSizesMap;
1720
+ };
1479
1721
  };
1480
1722
 
1481
1723
  /**
@@ -1483,7 +1725,6 @@ export declare type TileOptions = {
1483
1725
  */
1484
1726
  export declare type TileProps = {
1485
1727
  cover: string;
1486
- isLoading: boolean;
1487
1728
  bottomLabel: string;
1488
1729
  bottomLabelAreaHeight: number;
1489
1730
  innerLabel: string;
@@ -1492,7 +1733,6 @@ export declare type TileProps = {
1492
1733
  focused: boolean;
1493
1734
  onClick?: () => void;
1494
1735
  hoverable: boolean;
1495
- overlay: boolean;
1496
1736
  coverPadding: CoverPadding;
1497
1737
  variant: RowItemComponent;
1498
1738
  coverWidth: number;
@@ -1512,14 +1752,38 @@ export declare type TileProps = {
1512
1752
  */
1513
1753
  export declare type TilePropsPartial = Partial<TileProps>;
1514
1754
 
1755
+ /**
1756
+ * @internal
1757
+ */
1758
+ export declare type TileSizes = {
1759
+ coverPaddingTop: number;
1760
+ coverPaddingBottom: number;
1761
+ coverWidth: number;
1762
+ coverHeight: number;
1763
+ cellPaddingRight: number;
1764
+ labelHeight: number;
1765
+ };
1766
+
1767
+ /**
1768
+ * Tile sizes by Tile variant (row item component)
1769
+ *
1770
+ * @internal
1771
+ */
1772
+ export declare type TileSizesMap = {
1773
+ [item in RowItemComponent]: TileSizes;
1774
+ };
1775
+
1776
+ /**
1777
+ * Default (desktop) or mobile variants are used for WEB.
1778
+ *
1779
+ * @internal
1780
+ */
1781
+ export declare type TileSizeVariant = 'default' | 'mobile';
1782
+
1515
1783
  /**
1516
1784
  * @public
1517
1785
  */
1518
1786
  export declare interface TivioAuth {
1519
- changePassword: (newPassword: string) => Promise<void>;
1520
- changeUserPhoto(file: any): Promise<void>;
1521
- removeUserPhoto(): Promise<void>;
1522
- getPurchasedVodsWithInitializedVideos: () => Promise<Purchase[]>;
1523
1787
  /**
1524
1788
  * @param email
1525
1789
  * @param password
@@ -1531,21 +1795,17 @@ export declare interface TivioAuth {
1531
1795
  * @param password
1532
1796
  */
1533
1797
  signInWithEmailAndPassword: (email: string, password: string) => Promise<string | null>;
1534
- initializeUser: () => Promise<void>;
1535
1798
  signOut: () => Promise<void>;
1536
1799
  /**
1537
1800
  * Used for reset forgotten password by user
1538
1801
  */
1539
1802
  resetPassword: (email: string) => Promise<void>;
1540
- createFreePurchase: (monetizationId: string) => Promise<void>;
1541
1803
  }
1542
1804
 
1543
1805
  /**
1544
1806
  * @public
1545
1807
  */
1546
- export declare type TivioBundle = BasicTivioBundle & {
1547
- init: (config: Config) => void | Promise<void>;
1548
- };
1808
+ export declare type TivioBundle = TivioReactBundle;
1549
1809
 
1550
1810
  /**
1551
1811
  * @public
@@ -1561,10 +1821,6 @@ export declare type TivioComponents = {
1561
1821
  Markers: React_2.ReactNode;
1562
1822
  PlayerDataContext: React_2.ReactNode;
1563
1823
  Provider: React_2.ComponentType<RemoteProviderProps>;
1564
- /**
1565
- * @deprecated will be removed in in @tivio/sdk-react@4
1566
- */
1567
- VideoAdBanner: React_2.ReactNode;
1568
1824
  WebPlayer: React_2.ComponentType<WebPlayerProps>;
1569
1825
  Widget: React_2.ComponentType<TivioWidgetProps>;
1570
1826
  PlayerDataContextProvider: React_2.ComponentType<{
@@ -1593,12 +1849,46 @@ export declare type TivioComponents = {
1593
1849
  WebTile: React_2.ComponentType<{
1594
1850
  item?: ItemsInRow;
1595
1851
  } & TilePropsPartial>;
1596
- AdIndicationButtonWeb: React_2.ReactNode;
1597
- Recommendation: React_2.ReactNode;
1598
- SkipButtonWeb: React_2.ReactNode;
1599
- TvPlayer: React_2.ComponentType<WebPlayerProps>;
1600
1852
  };
1601
1853
 
1854
+ /**
1855
+ * @public
1856
+ */
1857
+ export declare interface TivioConfig {
1858
+ /**
1859
+ * Tells Tivio which technologies/protocols etc. is the device capable to play.
1860
+ * If not provided, Tivio will try to guess it (based on the browser).
1861
+ */
1862
+ deviceCapabilities?: PlayerCapability[];
1863
+ /**
1864
+ * Additional options for deviceCapabilities
1865
+ */
1866
+ capabilitiesOptions?: {
1867
+ /**
1868
+ * Should the player prefer HTTP sources instead HTTPs if they are available.
1869
+ * This can be used on platforms that support mixed content but do not support
1870
+ * specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
1871
+ */
1872
+ preferHttp?: boolean;
1873
+ };
1874
+ secret: string;
1875
+ language: LangCode;
1876
+ debug?: boolean;
1877
+ verbose?: boolean;
1878
+ firebaseApp?: any;
1879
+ currency: Currency;
1880
+ /**
1881
+ * Configuration for GDPR consent collection (CMP)
1882
+ */
1883
+ cmp?: CmpConfig;
1884
+ /**
1885
+ * Device information - model, os, version, etc. This is useful for devices
1886
+ * where this information cannot be reliably auto-detected.
1887
+ */
1888
+ deviceInfo?: DeviceInfo;
1889
+ player?: PlayerConfig;
1890
+ }
1891
+
1602
1892
  /**
1603
1893
  * @public
1604
1894
  */
@@ -1610,18 +1900,6 @@ export declare const TivioContext: React_2.Context<RemoteBundleState | null>;
1610
1900
  export declare type TivioGetters = {
1611
1901
  isTivioLoaded: (cb: (isLoaded: boolean) => void) => void;
1612
1902
  isSignedIn: () => boolean;
1613
- /**
1614
- * @deprecated is here only for backward compatibility
1615
- */
1616
- getExportedConfig: () => Promise<{
1617
- showMarkers: true;
1618
- }>;
1619
- /**
1620
- * Get channel by its id.
1621
- * @param channelId - channel id
1622
- * @returns {Promise<Channel | null>} channel or null if channel does not exists
1623
- */
1624
- getChannelById: (channelId: string) => Promise<Channel | null>;
1625
1903
  /**
1626
1904
  * Get (or create) player wrapper instance
1627
1905
  * @param opt - player getter options
@@ -1629,26 +1907,14 @@ export declare type TivioGetters = {
1629
1907
  */
1630
1908
  getPlayerWrapper: (opt: {
1631
1909
  playerWrapperId?: string;
1632
- }) => any;
1910
+ }) => PlayerWrapper;
1633
1911
  getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
1634
- /**
1635
- * Get section by its id.
1636
- * @param sectionId - section id
1637
- * @returns {Promise<{section: Section, channel: Channel} | null>} section and channel or null if channel or section does not exists
1638
- */
1639
- getSectionById: (sectionId: string) => Promise<Section | null>;
1640
1912
  /**
1641
1913
  * Get video by its id.
1642
1914
  * @param videoId - video id
1643
1915
  * @returns {Promise<Video | null>} video or null if video does not exists
1644
1916
  */
1645
1917
  getVideoById: (videoId: string) => Promise<Video | null>;
1646
- /**
1647
- * Get widget by its id.
1648
- * @param widgetId - widget id
1649
- * @returns {Promise<Widget | null>} widget or null if widget does not exists
1650
- */
1651
- getWidgetById: (widgetId: string) => Promise<Widget | null>;
1652
1918
  /**
1653
1919
  * Get player capabilities based on user's browser and OS as resolved by Tivio.
1654
1920
  * @returns PlayerCapability[]
@@ -1660,7 +1926,7 @@ export declare type TivioGetters = {
1660
1926
  * @public
1661
1927
  */
1662
1928
  export declare type TivioHooks = {
1663
- useAd: () => [(AdSource | null)];
1929
+ useAd: () => [(AdExternal | null)];
1664
1930
  useAdSegment: () => AdSegment | null;
1665
1931
  useCancelSubscription: UseCancelSubscription;
1666
1932
  useItemsInRow: (rowId: string, options: PaginationOptions) => {
@@ -1689,10 +1955,6 @@ export declare type TivioHooks = {
1689
1955
  error: string | null;
1690
1956
  };
1691
1957
  useVoucher: (voucherId: string) => any;
1692
- /**
1693
- * @deprecated will be removed in version
1694
- */
1695
- useLastVideoByWidgetId: (widgetId: string) => Video | null;
1696
1958
  useWatchWithoutAdsOffer: () => {
1697
1959
  canPurchaseWatchWithoutAds: boolean;
1698
1960
  showPurchaseDialog: () => void;
@@ -1775,6 +2037,59 @@ export declare type TivioInternalProviders = {
1775
2037
  RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
1776
2038
  };
1777
2039
 
2040
+ /**
2041
+ * @internal
2042
+ */
2043
+ export declare type TivioJsBundle = TivioJsBundleExposedApi & {
2044
+ init: (config: TivioConfig) => void | Promise<void>;
2045
+ tivio: any;
2046
+ };
2047
+
2048
+ /**
2049
+ * @public
2050
+ */
2051
+ export declare type TivioJsBundleExposedApi = {
2052
+ AdSource: any;
2053
+ ChannelSource: any;
2054
+ VodTivioSource: any;
2055
+ /**
2056
+ * Get (or create) player wrapper instance
2057
+ * @param id - player wrapper id
2058
+ * @returns {Player} player wrapper instance
2059
+ */
2060
+ getPlayer: (id: string) => Player;
2061
+ /**
2062
+ * Get tv channel by its id.
2063
+ * @param tvChannelId - tv channel id
2064
+ * @returns {Promise<TvChannel | null>} channel or null if tv channel does not exists
2065
+ */
2066
+ getTvChannelById: (tvChannelId: string) => Promise<TvChannel | null>;
2067
+ /**
2068
+ * Get tag by its id.
2069
+ * @param tagId - tag id
2070
+ * @returns {Promise<Tag | null>} widget or null if tag does not exists
2071
+ */
2072
+ getTagById: (tagId: string) => Promise<Tag | null>;
2073
+ createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
2074
+ destroy: () => Promise<void>;
2075
+ } & Pick<TivioGetters, 'getVideoById'> & Pick<TivioSubscriptions, 'subscribeToVideo' | 'subscribeToItemsInRow'> & Pick<TivioAuth, 'createUserWithEmailAndPassword' | 'signInWithEmailAndPassword'> & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
2076
+
2077
+ /**
2078
+ * @public
2079
+ */
2080
+ export declare interface TivioPlayerWrapper {
2081
+ addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
2082
+ reportError: (error: Error) => void;
2083
+ reportPlaybackEnded: () => void;
2084
+ reportTimeProgress: (ms: number) => void;
2085
+ seekTo: (ms: number) => void;
2086
+ /**
2087
+ * @param {Source} source - source to set
2088
+ * @param {string} calibrationId - id of calibration profile
2089
+ */
2090
+ setSource: (source: Source | null, calibrationId?: string) => void;
2091
+ }
2092
+
1778
2093
  /**
1779
2094
  * @public
1780
2095
  */
@@ -1787,10 +2102,52 @@ export declare type TivioProviderProps = {
1787
2102
  /**
1788
2103
  * This prop must be set only once and not change value afterwards
1789
2104
  */
1790
- conf: Config | undefined | null;
2105
+ conf: SdkReactConfig | undefined | null;
1791
2106
  children: React_2.ReactNode;
1792
2107
  };
1793
2108
 
2109
+ /**
2110
+ * @public
2111
+ */
2112
+ export declare type TivioReactBundle = {
2113
+ init: (config: TivioConfig) => void | Promise<void>;
2114
+ components: TivioComponents;
2115
+ getters: TivioGetters;
2116
+ auth: TivioAuth;
2117
+ hooks: TivioHooks;
2118
+ sources: TivioSources;
2119
+ subscriptions: TivioSubscriptions;
2120
+ purchaseVideoWithQerko: (videoId: string, monetizationId: string, voucher?: {
2121
+ expirationDate: Date;
2122
+ }) => Promise<QerkoPaymentInfo>;
2123
+ purchaseSubscriptionWithQerko: (monetizationId: string, voucher?: {
2124
+ expirationDate: Date;
2125
+ }) => Promise<QerkoPaymentInfo>;
2126
+ cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
2127
+ showConsentPreferences: () => void;
2128
+ /**
2129
+ * Contains hooks and providers for internal usages.
2130
+ * 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)
2131
+ * TODO should not be the part of public API
2132
+ */
2133
+ internal: TivioInternalBundle;
2134
+ destroy: () => Promise<void>;
2135
+ } & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
2136
+
2137
+ /**
2138
+ * @public
2139
+ */
2140
+ export declare type TivioSetters = {
2141
+ setBundleVersion: (bundleVersion: string | null) => void;
2142
+ /**
2143
+ * Set tivio language.
2144
+ * @param language
2145
+ */
2146
+ setLanguage: (language: LangCode) => void;
2147
+ setStorageManager: (storageManager: StorageManager_2) => void;
2148
+ setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
2149
+ };
2150
+
1794
2151
  /**
1795
2152
  * @public
1796
2153
  */
@@ -1806,61 +2163,12 @@ export declare type TivioSources = {
1806
2163
  */
1807
2164
  export declare type TivioSubscriptions = {
1808
2165
  subscribeToUser: (cb: (error: string | null, user: User | null) => void) => void;
1809
- /**
1810
- * Listen to widget changes.
1811
- * @param widgetId - widget id
1812
- * @param cb - callback on widget updates or on error
1813
- */
1814
- subscribeToWidget: (widgetId: string, cb: (error: Error | null, data: Widget | null, disposer?: Disposer_2) => void) => void;
1815
- /**
1816
- * Listen to channel changes.
1817
- * @param channelId - channel id
1818
- * @param cb - callback on channel updates or on error
1819
- */
1820
- subscribeToChannel: (channelId: string, cb: (error: Error | null, data: Channel | null) => void) => void;
1821
- /**
1822
- * Listen to section changes.
1823
- * @param sectionId - section id
1824
- * @param cb - callback on section updates or on error
1825
- */
1826
- subscribeToSection: (sectionId: string, cb: (error: Error | null, data: Section | null) => void) => void;
1827
2166
  /**
1828
2167
  * Listen to video changes.
1829
2168
  * @param videoId - video id
1830
2169
  * @param cb - callback on video updates or on error
1831
2170
  */
1832
2171
  subscribeToVideo: (videoId: string, cb: (error: Error | null, data: Video | null, disposer?: Disposer_2) => void) => void;
1833
- /**
1834
- * Listen to videos in section changes.
1835
- * @param sectionId - section id
1836
- * @param cb - callback on videos change or error
1837
- * @param limit - videos count
1838
- */
1839
- subscribeToVideosInSection: (sectionId: string, cb: (error: null | Error, data: null | {
1840
- videos: Video[];
1841
- hasNextPage: boolean;
1842
- }, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
1843
- /**
1844
- * Listen to section in channel changes
1845
- * @param channelId - channel id
1846
- * @param cb - callback on sections change or error
1847
- * @param limit - sections count
1848
- */
1849
- subscribeToSectionsInChannel: (channelId: string, cb: (error: null | Error, data: null | {
1850
- sections: Section[];
1851
- hasNextPage: boolean;
1852
- }, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
1853
- /**
1854
- * Listen to channels in widget changes
1855
- * @param widgetId - widget id
1856
- * @param cb - callback on channels change or error
1857
- * @param limit - channels count
1858
- */
1859
- subscribeToChannelsInWidget: (widgetId: string, cb: (error: null | Error, data: null | {
1860
- channels: Channel[];
1861
- hasNextPage: boolean;
1862
- }, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
1863
- subscribeToScreen: SubscribeToScreen;
1864
2172
  subscribeToItemsInRow: SubscribeToItemsInRow;
1865
2173
  subscribeToRowsInScreen: SubscribeToRowsInScreen;
1866
2174
  subscribeToTaggedVideos: SubscribeToTaggedVideos;
@@ -1870,6 +2178,17 @@ export declare type TivioSubscriptions = {
1870
2178
  }) => void;
1871
2179
  };
1872
2180
 
2181
+ /**
2182
+ * @public
2183
+ */
2184
+ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
2185
+ type: 'tivio_vod';
2186
+ /**
2187
+ * Allows Tivio to load monetization config an apply ads.
2188
+ */
2189
+ videoPath: string;
2190
+ };
2191
+
1873
2192
  /**
1874
2193
  * @public
1875
2194
  */
@@ -1959,6 +2278,35 @@ export declare interface TvChannel extends RowItem {
1959
2278
  price: number;
1960
2279
  }
1961
2280
 
2281
+ /**
2282
+ * @public
2283
+ */
2284
+ export declare type TvProgramSource = SourceBase & StartAndContinuePosition & {
2285
+ type: 'tv_program';
2286
+ /**
2287
+ * If epgTo is wrong, Tivio cannot correctly guess if the video it startover or timeshift . For such cases
2288
+ * Tivio needs explicit tv mode.
2289
+ * null if source begins in the future.
2290
+ */
2291
+ tvMode: 'startover' | 'timeshift' | null;
2292
+ /**
2293
+ * Tivio needs channel name in order to load markers.
2294
+ */
2295
+ channelName: string;
2296
+ /**
2297
+ * Tivio needs EPG from in order to load markers.
2298
+ */
2299
+ epgFrom: Date;
2300
+ /**
2301
+ * Tivio needs EPG to in order to load markers.
2302
+ */
2303
+ epgTo: Date;
2304
+ /**
2305
+ * When the stream (provided in uri) really starts - typically few minutes before epgFrom.
2306
+ */
2307
+ streamStart: Date;
2308
+ };
2309
+
1962
2310
  /**
1963
2311
  * @public
1964
2312
  */
@@ -1967,7 +2315,7 @@ export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
1967
2315
  /**
1968
2316
  * @public
1969
2317
  */
1970
- export declare const useAd: () => AdSource | null;
2318
+ export declare const useAd: () => AdExternal | null;
1971
2319
 
1972
2320
  /**
1973
2321
  * @public
@@ -2021,28 +2369,6 @@ export declare type UseCancelSubscription = (subscriptionId: string) => {
2021
2369
  */
2022
2370
  export declare const useCancelSubscription: UseCancelSubscription;
2023
2371
 
2024
- /**
2025
- * Use channel
2026
- * @param channelId - channel id
2027
- * @public
2028
- */
2029
- export declare const useChannel: (channelId: string) => {
2030
- error: string | null;
2031
- data: Channel | null;
2032
- };
2033
-
2034
- /**
2035
- * Use channels in widget
2036
- * @param widgetId - widget id
2037
- * @param [limit] - channels count, defaults to 10
2038
- * @public
2039
- */
2040
- export declare const useChannelsInWidget: (widgetId: string, limit?: number) => {
2041
- error: Error | null;
2042
- data: PaginationData<Channel> | null;
2043
- isLoading: boolean;
2044
- };
2045
-
2046
2372
  /**
2047
2373
  * @public
2048
2374
  */
@@ -2056,13 +2382,6 @@ export declare type UseChannelSource = (tvChannelId: string) => {
2056
2382
  */
2057
2383
  export declare const useCurrentMarker: () => Marker | null;
2058
2384
 
2059
- /**
2060
- * @public
2061
- */
2062
- export declare const useFreePurchase: () => {
2063
- purchase: (monetizationId: string) => Promise<void>;
2064
- };
2065
-
2066
2385
  /**
2067
2386
  * @public
2068
2387
  */
@@ -2093,12 +2412,6 @@ export declare const useItemsInRow: (rowId: string, options?: SubscribeToItemsIn
2093
2412
  error: Error | null;
2094
2413
  };
2095
2414
 
2096
- /**
2097
- * @deprecated will be removed in v4
2098
- * @public
2099
- */
2100
- export declare function useLastVideoByWidgetId(widgetId: string): Video | null;
2101
-
2102
2415
  /**
2103
2416
  * @public
2104
2417
  */
@@ -2154,9 +2467,23 @@ export declare const usePurchasesWithVideos: () => {
2154
2467
  * @public
2155
2468
  */
2156
2469
  export declare type User = {
2470
+ /**
2471
+ * Returns "active" (non-expired) purchases, so they give access to some content.
2472
+ * Does not return voucher purchases, because they give access to videos/subscriptions only for user who activates voucher,
2473
+ * not for user who purchases it.
2474
+ */
2157
2475
  purchases: Purchase[];
2476
+ /**
2477
+ * Returns all PAID or CANCELLED user purchases (expired and non-expired)
2478
+ */
2158
2479
  allPurchases: Purchase[];
2480
+ /**
2481
+ * Returns "active" (not CANCELLED) VoD purchases ("transaction" type)
2482
+ */
2159
2483
  purchasedVods: Purchase[];
2484
+ /**
2485
+ * Returns "active" (non-expired) subscription purchases
2486
+ */
2160
2487
  purchasedSubscriptions: Purchase[];
2161
2488
  isPurchasesInitialized: boolean;
2162
2489
  isSignedIn: boolean;
@@ -2190,16 +2517,6 @@ export declare enum UserType {
2190
2517
  TIVIO_USER = "TIVIO_USER"
2191
2518
  }
2192
2519
 
2193
- /**
2194
- * @deprecated
2195
- *
2196
- * Use app screen
2197
- * @param screenId - screen ID
2198
- * @param options - subscribe to screen options
2199
- * @public
2200
- */
2201
- export declare const useScreen: (screenId: string, options?: ScreenOptions | undefined) => never;
2202
-
2203
2520
  /**
2204
2521
  * @public
2205
2522
  */
@@ -2231,28 +2548,6 @@ export declare type UseSearchOptions = PaginationOptions & Partial<{
2231
2548
  */
2232
2549
  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;
2233
2550
 
2234
- /**
2235
- * Use section
2236
- * @param sectionId - section id
2237
- * @public
2238
- */
2239
- export declare const useSection: (sectionId: string) => {
2240
- error: string | null;
2241
- data: Section | null;
2242
- };
2243
-
2244
- /**
2245
- * Use section in channel
2246
- * @param channelId - channel id
2247
- * @param [limit] - sections count, defaults to 10
2248
- * @public
2249
- */
2250
- export declare const useSectionsInChannel: (channelId: string, limit?: number) => {
2251
- error: Error | null;
2252
- data: PaginationData<Section> | null;
2253
- isLoading: boolean;
2254
- };
2255
-
2256
2551
  /**
2257
2552
  * @public
2258
2553
  */
@@ -2312,18 +2607,6 @@ export declare const useVideo: (videoId?: string | undefined) => {
2312
2607
  error: string | null;
2313
2608
  };
2314
2609
 
2315
- /**
2316
- * Use videos in section
2317
- * @param sectionId - section id
2318
- * @param [limit] - videos count, defaults to 10
2319
- * @public
2320
- */
2321
- export declare const useVideosInSection: (sectionId?: string | undefined, limit?: number) => {
2322
- error: Error | null;
2323
- data: PaginationData<Video> | null;
2324
- isLoading: boolean;
2325
- };
2326
-
2327
2610
  /**
2328
2611
  * @public
2329
2612
  */
@@ -2349,16 +2632,6 @@ export declare const useWatchWithoutAdsOffer: () => {
2349
2632
  showPurchaseDialog: () => void;
2350
2633
  };
2351
2634
 
2352
- /**
2353
- * Use widget
2354
- * @param widgetId - widget id
2355
- * @public
2356
- */
2357
- export declare const useWidget: (widgetId: string) => {
2358
- error: string;
2359
- widget: Widget | null;
2360
- };
2361
-
2362
2635
  /**
2363
2636
  * @public
2364
2637
  */
@@ -2387,7 +2660,8 @@ export declare enum VastProvider {
2387
2660
  MALL_TV = "malltv",
2388
2661
  MALL_TV_PREBID = "malltv-prebid",
2389
2662
  PRIMA = "prima",
2390
- TEST = "test"
2663
+ TEST = "test",
2664
+ TEST_VPAID = "test-vpaid"
2391
2665
  }
2392
2666
 
2393
2667
  /**
@@ -2469,26 +2743,10 @@ export declare enum VideoContentType {
2469
2743
  /**
2470
2744
  * @public
2471
2745
  */
2472
- export declare interface VideoExternals {
2473
- tvProfiProgramId?: string;
2474
- tvProfiContentId?: string;
2475
- tvProfiSerialId?: string;
2476
- contentId?: string;
2477
- provysId?: string;
2478
- mallTvEntityId?: string;
2479
- /**
2480
- * DRM content Key ID - should't be more connected with buyDRM or streamOnline? It is not general thing
2481
- */
2482
- keyId?: string;
2483
- }
2746
+ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExternals;
2484
2747
 
2485
2748
  declare type VideoPath = string;
2486
2749
 
2487
- /**
2488
- * @public
2489
- */
2490
- export declare const VideosContext: React_2.Context<DataState<Video>>;
2491
-
2492
2750
  /**
2493
2751
  * Video type.
2494
2752
  * @public
@@ -2502,7 +2760,11 @@ export declare enum VideoType {
2502
2760
  * Video is a standard single video.
2503
2761
  */
2504
2762
  VIDEO = "VIDEO",
2505
- TV_PROGRAM = "TV_PROGRAM"
2763
+ TV_PROGRAM = "TV_PROGRAM",
2764
+ /**
2765
+ * Video object represents whole series, e.g. tv show.
2766
+ */
2767
+ SERIES = "SERIES"
2506
2768
  }
2507
2769
 
2508
2770
  /**