@tivio/sdk-react 5.0.3-alpha-3 → 6.0.0

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.
package/dist/index.d.ts CHANGED
@@ -90,13 +90,13 @@ declare type AdSegment = {
90
90
  * @public
91
91
  */
92
92
  export declare type AdSource = {
93
- new (uri: string, name: string, description: string, skipDelayMs: number | null, adDurationMs: number, trackingContext?: any, // internal Tivio types
93
+ new (url: string, name: string, description: string, skipDelayMs: number | null, adDurationMs: number, trackingContext?: any, // internal Tivio types
94
94
  adMarker?: any, // internal Tivio types
95
95
  packInfo?: any, // internal Tivio types
96
96
  provider?: any): AdSource;
97
97
  description: string;
98
98
  name: string;
99
- uri: string;
99
+ url: string;
100
100
  durationMs: number;
101
101
  skipDelayMs: number | null;
102
102
  type: 'ad';
@@ -140,6 +140,14 @@ export declare interface Advertisement extends RowItem {
140
140
  type?: string | null;
141
141
  }
142
142
 
143
+ export declare type AdvertisementAnalyticParams = {
144
+ adFramework?: string;
145
+ adOrder: number;
146
+ adProvider?: string;
147
+ adTitle?: string;
148
+ videoId: string;
149
+ };
150
+
143
151
  /**
144
152
  * @public
145
153
  */
@@ -198,14 +206,22 @@ export declare enum AnalyticsConversionTargetBase {
198
206
  }
199
207
 
200
208
  export declare interface AnalyticsInterface {
201
- reportAdvertisementPlay: () => void;
209
+ reportAdvertisementPlay: (params: AdvertisementAnalyticParams) => void;
202
210
  reportAdvertisementProgress: () => void;
203
211
  reportElementClick: (elementId: string) => void;
204
212
  reportLocationChange: (path: string, pathParam?: string) => void;
205
213
  createMonetizationPurchase: () => void;
206
214
  completeMonetizationPurchase: (status: AnalyticsConversionStatus, monetizationId?: string) => void;
207
215
  reportVideoPlay: (status: AnalyticsConversionStatus, videoId: string) => void;
208
- reportVideoProgress: (videoId: string, videoDuration: number, checkpoint: number) => void;
216
+ reportVideoProgress: (data: {
217
+ checkpoint: number;
218
+ organizationId?: string;
219
+ seriesId?: string;
220
+ videoDuration: string;
221
+ videoId: string;
222
+ videoMonetizationId?: string;
223
+ videoType?: VideoType;
224
+ }) => void;
209
225
  }
210
226
 
211
227
  /**
@@ -300,6 +316,22 @@ export declare type BetOffer = {
300
316
  time: Date;
301
317
  };
302
318
 
319
+ /**
320
+ * @public
321
+ */
322
+ export declare interface BufferChunk {
323
+ startMs: number;
324
+ endMs: number;
325
+ }
326
+
327
+ /**
328
+ * @public
329
+ */
330
+ export declare interface BufferPercentChunk extends BufferChunk {
331
+ startPercent: number;
332
+ endPercent: number;
333
+ }
334
+
303
335
  /**
304
336
  * rejects when bundle is not available
305
337
  * @public
@@ -322,11 +354,14 @@ export declare interface Channel {
322
354
  recentVideos: Video[];
323
355
  }
324
356
 
357
+ /**
358
+ * @public
359
+ */
325
360
  export declare type ChannelSource = {
326
- new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
361
+ new (url: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
327
362
  description: string;
328
363
  name: string;
329
- uri: string;
364
+ url: string;
330
365
  from: Date;
331
366
  channelName: string;
332
367
  to: Date;
@@ -341,7 +376,7 @@ export declare type ChannelSource = {
341
376
  */
342
377
  export declare interface ChannelSourcePojo {
343
378
  type: 'ChannelSource';
344
- uri: string;
379
+ url: string;
345
380
  originalOptions: any;
346
381
  channelName: string;
347
382
  programName: string;
@@ -399,6 +434,7 @@ export declare interface ConfirmationOverlayPayloadBase {
399
434
 
400
435
  /**
401
436
  * Entity aggregate conversion statistics per day
437
+ * TODO in future change structure, new used like array item
402
438
  */
403
439
  export declare interface ConversionAnalytic {
404
440
  /**
@@ -588,6 +624,41 @@ export declare type DocumentOptions = Partial<{
588
624
  subscribeOnChanges: boolean;
589
625
  }>;
590
626
 
627
+ export declare interface Drm {
628
+ encryption: VideoSourceEncryption;
629
+ /**
630
+ * Url to retrieve fairplay from.
631
+ */
632
+ certificateUrl?: string;
633
+ /**
634
+ * Url to send license to.
635
+ */
636
+ licenseUrl: string;
637
+ /**
638
+ * Headers with corresponding values to send to license server.
639
+ */
640
+ licenseRequestHeaders: {
641
+ [key: string]: string;
642
+ };
643
+ }
644
+
645
+ export declare enum DrmProvider {
646
+ /**
647
+ * Original oktagon stream provider.
648
+ *
649
+ * https://streamonline.pl
650
+ */
651
+ STREAMONLINE = "streamonline",
652
+ /**
653
+ * New stream provider for tivio. Also known as insys video technologies.
654
+ *
655
+ * https://insysvideotechnologies.com
656
+ * https://www.drm.cloud
657
+ * https://videokit.cloud
658
+ */
659
+ INSYS = "insys"
660
+ }
661
+
591
662
  /**
592
663
  * @public
593
664
  */
@@ -604,6 +675,76 @@ export declare enum DurationUnits {
604
675
  MONTH = "month"
605
676
  }
606
677
 
678
+ /**
679
+ * Represents a SendGrid transactional template.
680
+ */
681
+ export declare interface EmailTemplate {
682
+ /**
683
+ * The ID of the transactional template.
684
+ */
685
+ id: string;
686
+ /**
687
+ * The name of the transactional template.
688
+ * @maxLength 100
689
+ */
690
+ name: string;
691
+ /**
692
+ * Defines the generation of the template.
693
+ * @format 'dynamic' | 'legacy'
694
+ */
695
+ generation: 'dynamic' | 'legacy';
696
+ /**
697
+ * The date and time the template was last updated.
698
+ */
699
+ updated_at: string;
700
+ /**
701
+ * An array of versions associated with the template.
702
+ */
703
+ versions: EmailTemplateVersion[];
704
+ }
705
+
706
+ export declare interface EmailTemplateVersion {
707
+ /**
708
+ * ID of the transactional template version.
709
+ */
710
+ id: string;
711
+ /**
712
+ * ID of the transactional template.
713
+ */
714
+ template_id: string;
715
+ /**
716
+ * Set the version as the active version associated with the template.
717
+ * Only one version of a template can be active.
718
+ * The first version created for a template will automatically be set to Active.
719
+ */
720
+ active: boolean;
721
+ /**
722
+ * Name of the transactional template version.
723
+ */
724
+ name: string;
725
+ /**
726
+ * Subject of the new transactional template version.
727
+ * @maxLength 255
728
+ */
729
+ subject: string;
730
+ /**
731
+ * The date and time that this transactional template version was updated.
732
+ */
733
+ updated_at: string;
734
+ /**
735
+ * If true, plain_content is always generated from html_content. If false, plain_content is not altered.
736
+ */
737
+ generate_plain_content: boolean;
738
+ /**
739
+ * The editor used in the UI.
740
+ */
741
+ editor: string;
742
+ /**
743
+ * A Thumbnail preview of the template's html content.
744
+ */
745
+ thumbnail_url: string;
746
+ }
747
+
607
748
  /**
608
749
  * @public
609
750
  */
@@ -671,6 +812,31 @@ export declare interface GenericOnCallError extends Error {
671
812
  details?: Record<string, string>;
672
813
  }
673
814
 
815
+ export declare interface GetBaseAnalyticsRequest {
816
+ /**
817
+ * Id of organization to return analytics data.
818
+ */
819
+ organizationId: string;
820
+ /**
821
+ * Date in string with format e.g. '2023-04-19'.
822
+ */
823
+ startDate: string;
824
+ /**
825
+ * Date in string with format e.g. '2023-04-26'.
826
+ */
827
+ endDate: string;
828
+ }
829
+
830
+ export declare interface GetConversionAnalyticsRequest extends GetBaseAnalyticsRequest {
831
+ }
832
+
833
+ export declare interface GetMonetizationsAnalyticsRequest extends GetBaseAnalyticsRequest {
834
+ }
835
+
836
+ export declare interface GetMonetizationsAnalyticsResponse {
837
+ monetizationsAnalytics: MonetizationSummaryItem[];
838
+ }
839
+
674
840
  /**
675
841
  * Share singleton instance
676
842
  * @public
@@ -748,6 +914,18 @@ export declare interface GetSourceUrlResponse {
748
914
  * Which sources did client (or cloud function) has already tried out.
749
915
  */
750
916
  sourceHistory: string[];
917
+ /**
918
+ * DRM configuration to {@link url} if source is encrypted.
919
+ */
920
+ drm?: Drm;
921
+ }
922
+
923
+ export declare interface GetViewAnalyticsResponse {
924
+ viewCountAnalytics: ViewCountItem[];
925
+ topWatched: TopWatchItem[];
926
+ }
927
+
928
+ export declare interface GetViewsAnalyticsRequest extends GetBaseAnalyticsRequest {
751
929
  }
752
930
 
753
931
  /**
@@ -1121,11 +1299,51 @@ export declare type MonetizationsSelectOverlayState = {
1121
1299
  closeMonetizationsSelectOverlay: () => void;
1122
1300
  };
1123
1301
 
1302
+ export declare interface MonetizationSummaryItem {
1303
+ /**
1304
+ * Unix timestamp at which the data is aggregated
1305
+ */
1306
+ date: number;
1307
+ /**
1308
+ * Monetization under the videos played, if not filled it is free
1309
+ */
1310
+ monetizationId: string;
1311
+ /**
1312
+ * Sum of successful (new and regular) payment price in current period
1313
+ */
1314
+ totalPrice: number;
1315
+ /**
1316
+ * Count of new payments in the current period
1317
+ */
1318
+ newPaymentCount: number;
1319
+ /**
1320
+ * Count of payments cancelled in in the current period
1321
+ */
1322
+ cancelledPaymentCount: number;
1323
+ /**
1324
+ * Count of payments made regularly like in the previous period
1325
+ */
1326
+ regularPaymentCount: number;
1327
+ /**
1328
+ * Price which was charged independent on price list (full and discounted)
1329
+ */
1330
+ paymentPrice: number;
1331
+ /**
1332
+ * Monetization type frequency
1333
+ */
1334
+ monetizationFrequency: MONETIZATION_FREQUENCY;
1335
+ /**
1336
+ * For PPV payments there will be videoId for which payment charged
1337
+ * If not filled it is not PPV
1338
+ */
1339
+ videoId?: string;
1340
+ }
1341
+
1124
1342
  /**
1125
1343
  * @public
1126
1344
  * @TODO change to enum
1127
1345
  */
1128
- export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
1346
+ export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription' | 'display';
1129
1347
 
1130
1348
  /**
1131
1349
  * TODO: Duplicate, because we can't import types from core-js.
@@ -1137,6 +1355,22 @@ export declare type NewVoucher = {
1137
1355
  expirationDate: Date | number;
1138
1356
  };
1139
1357
 
1358
+ declare interface Notification_2 {
1359
+ id: string;
1360
+ name: string;
1361
+ targeting: UserGroup;
1362
+ templateId: string;
1363
+ thumbnailUrl?: string;
1364
+ triggerType: TriggerType;
1365
+ status?: NotificationStatus;
1366
+ }
1367
+ export { Notification_2 as Notification }
1368
+
1369
+ export declare enum NotificationStatus {
1370
+ PLANNED = "planned",
1371
+ SENT = "sent"
1372
+ }
1373
+
1140
1374
  /**
1141
1375
  * @public
1142
1376
  */
@@ -1221,7 +1455,11 @@ export declare enum PLATFORM {
1221
1455
  */
1222
1456
  MOBILE = "MOBILE",
1223
1457
  WEB = "WEB",
1224
- TV = "TV"
1458
+ TV = "TV",
1459
+ /**
1460
+ * @deprecated Used only in big query. In the future we'll migrate to undefined value and delete this.
1461
+ */
1462
+ UNKNOWN = "unknown"
1225
1463
  }
1226
1464
 
1227
1465
  /**
@@ -1252,9 +1490,9 @@ export declare type Player = {
1252
1490
  * @public
1253
1491
  */
1254
1492
  export declare interface PlayerCapability {
1255
- codec: 'h264' | 'h265';
1256
- encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
1257
- protocol: 'dash' | 'hls' | 'mp4';
1493
+ codec: VideoSourceCodec;
1494
+ encryption: VideoSourceEncryption;
1495
+ protocol: VideoSourceProtocol;
1258
1496
  }
1259
1497
 
1260
1498
  /**
@@ -1316,6 +1554,135 @@ export declare type PlayerConfig = {
1316
1554
  };
1317
1555
  };
1318
1556
 
1557
+ /**
1558
+ * @public
1559
+ */
1560
+ export declare interface PlayerEngineConfig {
1561
+ getDrmConfiguration?: () => Promise<Drm | undefined>;
1562
+ encryption?: string;
1563
+ isAd?: boolean;
1564
+ positionMs?: number;
1565
+ url: string;
1566
+ }
1567
+
1568
+ /**
1569
+ * @public
1570
+ */
1571
+ export declare type PlayerEngineEvent = 'bufferingchange' | 'bufferedinfochange' | 'statechange' | 'loaded' | 'loadfailed' | 'togglefullscreen' | 'durationchange' | 'busychange' | 'trackschanged' | 'abort' | 'canplay' | 'canplaythrough' | 'emptied' | 'ended' | 'error' | 'loadeddata' | 'loadedmetadata' | 'loadstart' | 'pause' | 'play' | 'playing' | 'progress' | 'ratechange' | 'seeked' | 'seeking' | 'stalled' | 'suspend' | 'timeupdate' | 'volumechange' | 'waiting' | 'click' | 'fullscreenchange';
1572
+
1573
+ /**
1574
+ * @public
1575
+ */
1576
+ export declare type PlayerEngineFactory = (videoElement: HTMLVideoElement) => PlayerEngineInterface;
1577
+
1578
+ /**
1579
+ * @public
1580
+ */
1581
+ export declare interface PlayerEngineInterface {
1582
+ /**
1583
+ * Loads video but keeps it paused
1584
+ */
1585
+ load(config: PlayerEngineConfig): Promise<void>;
1586
+ /**
1587
+ * Loads and starts playing video
1588
+ * @throws
1589
+ */
1590
+ play(config: PlayerEngineConfig): Promise<void>;
1591
+ pause(): Promise<void>;
1592
+ unpause(): Promise<void>;
1593
+ isPaused(): boolean;
1594
+ stop(): Promise<void>;
1595
+ addEventListener<T>(event: PlayerEngineEvent, callback: PlayerEngineListener<T>): void;
1596
+ addEventListener(event: 'statechange', callback: PlayerEngineListener<PlayerState>): void;
1597
+ addEventListener(event: 'bufferingchange', callback: PlayerEngineListener<boolean>): void;
1598
+ addEventListener(event: 'bufferedinfochange', callback: PlayerEngineListener<BufferPercentChunk[]>): void;
1599
+ addEventListener(event: 'togglefullscreen', callback: PlayerEngineListener<boolean>): void;
1600
+ removeEventListener<T>(event: PlayerEngineEvent, listener: PlayerEngineListener<T>): void;
1601
+ /**
1602
+ * @returns currently playing audio track in ISO 639-1 format ('cs', 'en' etc.) or null if not available
1603
+ */
1604
+ getActiveAudioTrack?: () => LangCode | null;
1605
+ /**
1606
+ * @returns currently selected subtitles in ISO 639-1 format ('cs', 'en' etc.)
1607
+ */
1608
+ getActiveSubtitles?: () => LangCode | null;
1609
+ /**
1610
+ * Returns currently available audio tracks of currently playing video.
1611
+ *
1612
+ * @returns array of available audio tracks in ISO 639-1 format ('cs', 'en' etc.)
1613
+ */
1614
+ getAudioTracks?: () => LangCode[];
1615
+ /**
1616
+ * @returns array of available subtitles in ISO 639-1 format ('cs', 'en' etc.)
1617
+ */
1618
+ getSubtitles?: () => LangCode[];
1619
+ getCurrentQuality?: (lang?: LangCode) => Track | null;
1620
+ getQualities?: () => Track[];
1621
+ /**
1622
+ * options.force to change quality immediately, otherwise it takes some time
1623
+ * (because previously loaded higher or lower quality chunks are not discarded)
1624
+ */
1625
+ selectQuality?: (track: Track, options?: {
1626
+ force: boolean;
1627
+ }) => void;
1628
+ /**
1629
+ * Is automatic selection of video quality based on network bandwidth (aka ABR) enabled?
1630
+ */
1631
+ isAdaptationEnabled?: () => boolean;
1632
+ /**
1633
+ * Turn on automatic selection of video quality based on network bandwidth (aka ABR).
1634
+ * It is enabled by default.
1635
+ * It automatically becomes disabled when selectQuality() is called.
1636
+ */
1637
+ enableAdaptation?: (enable: boolean) => void;
1638
+ goFullScreen(): Promise<void>;
1639
+ /**
1640
+ * @param {number} value 0-1
1641
+ */
1642
+ changeVolume(value: number): void;
1643
+ getState(): PlayerState;
1644
+ isIdle(): boolean;
1645
+ mute(): void;
1646
+ unmute(): void;
1647
+ /**
1648
+ * @returns {number} duration in seconds
1649
+ */
1650
+ getDuration(): number;
1651
+ seekTo(ms: number): void;
1652
+ /**
1653
+ * Changes audio track of currently playing video.
1654
+ *
1655
+ * @param {LangCode} audioTrack - audio track to select in ISO 639-1 format ('cs', 'en' etc.)
1656
+ */
1657
+ selectAudioTrack?: (audioTrack: LangCode) => void;
1658
+ /**
1659
+ * Changes audio track of currently playing video.
1660
+ * @param {LangCode} langCode - subtitles to select in ISO 639-1 format ('cs', 'en' etc.) or null to disable subtitles
1661
+ */
1662
+ selectSubtitles?: (langCode: LangCode | null) => void;
1663
+ /**
1664
+ * Changes audio track of currently playing video.
1665
+ *
1666
+ * @param {number} playbackSpeed - playback speed to select (1 = normal speed, 2 = twice as fast, etc.)
1667
+ */
1668
+ selectPlaybackSpeed?: (playbackSpeed: number) => void;
1669
+ destroy(): Promise<void>;
1670
+ getBufferedInfo?(): BufferChunk[];
1671
+ lastQuality: number | null;
1672
+ }
1673
+
1674
+ /**
1675
+ * @public
1676
+ */
1677
+ export declare type PlayerEngineListener<T> = (value: T) => any;
1678
+
1679
+ /**
1680
+ * @public
1681
+ */
1682
+ export declare interface PlayerEngineOptions {
1683
+ seekDebounceMs?: number;
1684
+ }
1685
+
1319
1686
  /**
1320
1687
  * @public
1321
1688
  */
@@ -1373,7 +1740,10 @@ export declare type PlayerProviderProps = {
1373
1740
  playerWrapperId?: string;
1374
1741
  };
1375
1742
 
1376
- declare type PlayerState = 'playing' | 'paused' | 'idle';
1743
+ /**
1744
+ * @public
1745
+ */
1746
+ export declare type PlayerState = 'idle' | 'playing' | 'paused';
1377
1747
 
1378
1748
  /**
1379
1749
  * @public
@@ -1520,6 +1890,10 @@ export declare interface PurchasableMonetization extends Monetization {
1520
1890
  * If not set or set to false, users cannot buy it as a voucher.
1521
1891
  */
1522
1892
  isPurchasableAsVoucher?: boolean;
1893
+ /**
1894
+ * Returns array of tag ids of monetization placements
1895
+ */
1896
+ tagIds: string[];
1523
1897
  }
1524
1898
 
1525
1899
  /**
@@ -1582,6 +1956,11 @@ export declare type PurchaseEndpointPayload = {
1582
1956
  * Two-letter upper-case country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
1583
1957
  */
1584
1958
  countryIsoCode?: LocationField['countryIsoCode'];
1959
+ /**
1960
+ * Purchase expiration timestamp. Only present for "subscription" monetization type. This timestamp does not mean it will
1961
+ * really expire at this timestamp - additional payment of this subscription can occur so expiration timestamp may be increased.
1962
+ */
1963
+ expiration?: number;
1585
1964
  /**
1586
1965
  * Gateway name or "voucher".
1587
1966
  */
@@ -1590,22 +1969,22 @@ export declare type PurchaseEndpointPayload = {
1590
1969
  * Tivio ID of the purchase.
1591
1970
  */
1592
1971
  id: string;
1593
- /**
1594
- * Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
1595
- */
1596
- updated: number;
1597
1972
  /**
1598
1973
  * True if delayed payment is confirmed but not charged yet, undefined in all other cases.
1599
1974
  */
1600
1975
  isDelayedPayment?: boolean;
1976
+ /**
1977
+ * Purchase status after change.
1978
+ */
1979
+ newStatus: PurchaseStatus;
1601
1980
  /**
1602
1981
  * Purchase status before change.
1603
1982
  */
1604
1983
  previousStatus: PurchaseStatus;
1605
1984
  /**
1606
- * Purchase status after change.
1985
+ * Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
1607
1986
  */
1608
- newStatus: PurchaseStatus;
1987
+ updated: number;
1609
1988
  };
1610
1989
  /**
1611
1990
  * Information about the monetization which has been bought by this purchase. Monetization definition may change in time so information provided here
@@ -1919,6 +2298,9 @@ declare interface RowBase {
1919
2298
  type: ScreenRowType;
1920
2299
  isLiveRow: boolean;
1921
2300
  numberOfLines?: number;
2301
+ monetizations?: {
2302
+ monetizationRef: any;
2303
+ }[];
1922
2304
  }
1923
2305
 
1924
2306
  /**
@@ -1957,8 +2339,7 @@ export declare interface RowItemAssets {
1957
2339
  export declare enum RowItemComponent {
1958
2340
  ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
1959
2341
  ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
1960
- ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED",
1961
- ROW_ITEM_BANNER = "ROW_ITEM_BANNER"
2342
+ ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
1962
2343
  }
1963
2344
 
1964
2345
  /**
@@ -2337,7 +2718,7 @@ export declare type TivioComponents = {
2337
2718
  onEnded?: () => any;
2338
2719
  }>;
2339
2720
  TvApp: React_2.ComponentType<TvAppProps>;
2340
- FeatureSupportCheck: React_2.ComponentType;
2721
+ FeatureSupportCheck: React_2.ComponentType<{}>;
2341
2722
  CustomerScreen: React_2.ComponentType<{
2342
2723
  screenId: string;
2343
2724
  }>;
@@ -2519,7 +2900,7 @@ export declare type TivioInternalHooks = {
2519
2900
  usePurchasesWithVideos: () => {
2520
2901
  purchases: Purchase[];
2521
2902
  };
2522
- useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
2903
+ useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
2523
2904
  subscriptions: PurchasableMonetization[];
2524
2905
  };
2525
2906
  useIsMonetizationPurchased: () => {
@@ -2587,7 +2968,7 @@ export declare type TivioJsBundleExposedApi = {
2587
2968
  * @param id - player wrapper id
2588
2969
  * @returns {Player} player wrapper instance
2589
2970
  */
2590
- getPlayer: (id: string) => Player;
2971
+ getPlayerWrapper: (id: string) => Player;
2591
2972
  /**
2592
2973
  * Get tv channel by its id.
2593
2974
  * @param tvChannelId - tv channel id
@@ -2725,11 +3106,6 @@ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
2725
3106
  */
2726
3107
  export declare const TivioWidget: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<TivioWidgetRef>>;
2727
3108
 
2728
- /**
2729
- * @public
2730
- */
2731
- export declare const TivioWidgetApp: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<unknown>>;
2732
-
2733
3109
  /**
2734
3110
  * @public
2735
3111
  */
@@ -2756,7 +3132,6 @@ export declare interface TivioWidgetProps {
2756
3132
  width: number;
2757
3133
  x: number;
2758
3134
  }) => any;
2759
- navigateFunction?: any;
2760
3135
  }
2761
3136
 
2762
3137
  /**
@@ -2775,6 +3150,40 @@ export declare interface TivioWidgetRef {
2775
3150
  });
2776
3151
  }
2777
3152
 
3153
+ export declare interface TopWatchItem {
3154
+ videoId: string;
3155
+ /**
3156
+ * If video is part of series we get a tagId to series
3157
+ */
3158
+ seriesId?: string;
3159
+ /**
3160
+ * Video type {@link VideoType}
3161
+ */
3162
+ videoType: VideoType;
3163
+ /**
3164
+ * Uniq users count
3165
+ */
3166
+ userCount: number;
3167
+ /**
3168
+ * Count of video view events
3169
+ */
3170
+ viewCount: number;
3171
+ }
3172
+
3173
+ /**
3174
+ * @public
3175
+ * Video track
3176
+ */
3177
+ declare interface Track {
3178
+ id: number;
3179
+ /**
3180
+ * e.g. 480, 720, 1080
3181
+ */
3182
+ height: number;
3183
+ active: boolean;
3184
+ language: LangCode;
3185
+ }
3186
+
2778
3187
  declare type TransactionInfo = {
2779
3188
  type: 'transaction';
2780
3189
  name: string;
@@ -2791,6 +3200,8 @@ export declare type Translation = {
2791
3200
  [key in LangCode]?: string;
2792
3201
  };
2793
3202
 
3203
+ export declare type TriggerType = 'scheduled' | 'manual';
3204
+
2794
3205
  /**
2795
3206
  * @public
2796
3207
  */
@@ -2816,12 +3227,26 @@ export declare interface TvChannel extends RowItem {
2816
3227
  * Transactions before subscriptions, sorted by price ascending.
2817
3228
  */
2818
3229
  getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
2819
- getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
3230
+ getSourceUrl(options?: {
3231
+ language?: LangCode;
3232
+ }): Promise<GetSourceUrlResponse & {
3233
+ language?: LangCode;
3234
+ }>;
2820
3235
  purchasableMonetization: any | null;
2821
3236
  price: number;
2822
3237
  cover: string;
2823
3238
  isPlayable: boolean;
2824
- uri: string;
3239
+ url: string;
3240
+ }
3241
+
3242
+ export declare interface TvProgram {
3243
+ from: Date | null;
3244
+ to: Date | null;
3245
+ name: string;
3246
+ description: string;
3247
+ url: string;
3248
+ image: string;
3249
+ video: Video | null;
2825
3250
  }
2826
3251
 
2827
3252
  /**
@@ -2928,7 +3353,7 @@ export declare interface UseCancelSubscriptionsResult {
2928
3353
  * @public
2929
3354
  */
2930
3355
  export declare type UseChannelSource = (tvChannelId: string) => {
2931
- source: ChannelSourcePojo | null;
3356
+ source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
2932
3357
  error: Error | null;
2933
3358
  };
2934
3359
 
@@ -2938,7 +3363,7 @@ export declare type UseChannelSource = (tvChannelId: string) => {
2938
3363
  * @public
2939
3364
  */
2940
3365
  export declare const useChannelSource: (tvChannelId: string) => {
2941
- source: ChannelSourcePojo | null;
3366
+ source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
2942
3367
  error: Error | null;
2943
3368
  };
2944
3369
 
@@ -2984,21 +3409,16 @@ export declare const useMarkers: () => Marker[] | null;
2984
3409
 
2985
3410
  /**
2986
3411
  * @public
3412
+ *
3413
+ * @param onlyPurchasableSubscriptions When it is true, it returns only enabled subscriptions.
3414
+ * @param videoId If it is not defined returns all subscriptions except one time payment.
3415
+ * When it is set, returns only subscriptions which is described in tagIds for video.
3416
+ * @returns Array of subscriptions according to set parameters
2987
3417
  */
2988
- export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
3418
+ export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
2989
3419
  subscriptions: PurchasableMonetization[];
2990
3420
  };
2991
3421
 
2992
- /**
2993
- * @public
2994
- */
2995
- export declare type UsePlayerEvent = <T = any>(eventName: string) => T | null;
2996
-
2997
- /**
2998
- * @public
2999
- */
3000
- export declare const usePlayerEvent: UsePlayerEvent;
3001
-
3002
3422
  /**
3003
3423
  * Is used to mark purchase in recovery state as PAID.
3004
3424
  *
@@ -3071,6 +3491,12 @@ export declare type User = {
3071
3491
  setActiveUserProfileId: (id: string) => void;
3072
3492
  };
3073
3493
 
3494
+ export declare enum UserGroup {
3495
+ ALL = "all",
3496
+ FREE = "free",
3497
+ PREMIUM = "premium"
3498
+ }
3499
+
3074
3500
  /**
3075
3501
  * @public
3076
3502
  */
@@ -3282,7 +3708,11 @@ export declare interface Video extends RowItem {
3282
3708
  * Transactions before subscriptions, sorted by price ascending.
3283
3709
  */
3284
3710
  getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
3285
- getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
3711
+ getSourceUrl(options?: {
3712
+ language?: LangCode;
3713
+ }): Promise<GetSourceUrlResponse & {
3714
+ language?: LangCode;
3715
+ }>;
3286
3716
  purchasableMonetization: any | null;
3287
3717
  transaction: PurchasableMonetization | undefined;
3288
3718
  subscriptions: PurchasableMonetization[];
@@ -3293,7 +3723,6 @@ export declare interface Video extends RowItem {
3293
3723
  urlName?: string;
3294
3724
  price: number | null;
3295
3725
  detailedPrice: DetailedPrice | null;
3296
- uri: string;
3297
3726
  url: string;
3298
3727
  adMonetizationId?: string;
3299
3728
  from?: Date;
@@ -3315,7 +3744,7 @@ export declare interface Video extends RowItem {
3315
3744
  removeFromFavorites: () => void;
3316
3745
  availability: VideoAvailability | null;
3317
3746
  sourceLanguages: LangCode[];
3318
- uriByLanguage: (lang: LangCode) => string | undefined;
3747
+ urlByLanguage: (lang: LangCode) => string | undefined;
3319
3748
  }
3320
3749
 
3321
3750
  /**
@@ -3346,6 +3775,29 @@ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExt
3346
3775
 
3347
3776
  declare type VideoPath = string;
3348
3777
 
3778
+ export declare enum VideoSourceCodec {
3779
+ H264 = "h264",
3780
+ H265 = "h265"
3781
+ }
3782
+
3783
+ export declare enum VideoSourceEncryption {
3784
+ NONE = "none",
3785
+ WIDEVINE = "widevine",
3786
+ FAIRPLAY = "fairplay",
3787
+ PLAYREADY = "playready"
3788
+ }
3789
+
3790
+ /**
3791
+ * Lower number = higher priority.
3792
+ */
3793
+ export declare type VideoSourcePriority = 1 | 2 | 3 | 4 | 5;
3794
+
3795
+ export declare enum VideoSourceProtocol {
3796
+ HLS = "hls",
3797
+ DASH = "dash",
3798
+ MP4 = "mp4"
3799
+ }
3800
+
3349
3801
  /**
3350
3802
  * Video type.
3351
3803
  * @public
@@ -3377,30 +3829,57 @@ export declare enum VideoType {
3377
3829
  /**
3378
3830
  * @public
3379
3831
  */
3380
- export declare type VideoUrlName = {
3832
+ export declare type VideoUrlNames = {
3381
3833
  [key in LangCode]?: string[];
3382
3834
  };
3383
3835
 
3836
+ export declare interface ViewCountItem {
3837
+ /**
3838
+ * Unix timestamp
3839
+ */
3840
+ date: number;
3841
+ /**
3842
+ * Monetization under the videos played, if not filled it is free
3843
+ */
3844
+ monetizationId?: string;
3845
+ /**
3846
+ * Device where the video played
3847
+ */
3848
+ deviceType: PLATFORM;
3849
+ /**
3850
+ * Count of video view events in group
3851
+ */
3852
+ totalCount: number;
3853
+ }
3854
+
3855
+ /**
3856
+ * @public
3857
+ */
3858
+ export declare interface VirtualChannelSourcePojo extends Omit<ChannelSourcePojo, 'type'> {
3859
+ type: 'VirtualChannelSource';
3860
+ epg: TvProgram[];
3861
+ }
3862
+
3384
3863
  /**
3385
3864
  * @public
3386
3865
  */
3387
3866
  export declare type VodExternalSource = {
3388
- new (uri: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
3867
+ new (url: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
3389
3868
  type: 'vod_external';
3390
3869
  description: string;
3391
3870
  name: string;
3392
- uri: string;
3871
+ url: string;
3393
3872
  };
3394
3873
 
3395
3874
  /**
3396
3875
  * @public
3397
3876
  */
3398
3877
  export declare type VodTivioSource = {
3399
- new (uri: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
3878
+ new (url: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
3400
3879
  type: 'vod_tivio';
3401
3880
  description: string;
3402
3881
  name: string;
3403
- uri: string;
3882
+ url: string;
3404
3883
  };
3405
3884
 
3406
3885
  declare interface VodTivioSourcePojo {
@@ -3408,7 +3887,7 @@ declare interface VodTivioSourcePojo {
3408
3887
  description: string;
3409
3888
  path: string;
3410
3889
  name: string;
3411
- uri: string;
3890
+ url: string;
3412
3891
  poster?: string;
3413
3892
  adMonetizationId?: string;
3414
3893
  availability: VideoAvailability | null;
@@ -3439,7 +3918,7 @@ export declare interface WarningConfirmationOverlayPayload extends ConfirmationO
3439
3918
  */
3440
3919
  export declare interface WebPlayerProps {
3441
3920
  id: string;
3442
- source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
3921
+ source?: VodTivioSourcePojo | ChannelSourcePojo | VirtualChannelSourcePojo | VideoPath | null;
3443
3922
  onEnded?: () => any;
3444
3923
  /**
3445
3924
  * If this function is specified, then "Back" button is shown in top right corner.