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

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.
@@ -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
@@ -330,11 +362,14 @@ export declare interface Channel {
330
362
  recentVideos: Video[];
331
363
  }
332
364
 
365
+ /**
366
+ * @public
367
+ */
333
368
  export declare type ChannelSource = {
334
- new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
369
+ new (url: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
335
370
  description: string;
336
371
  name: string;
337
- uri: string;
372
+ url: string;
338
373
  from: Date;
339
374
  channelName: string;
340
375
  to: Date;
@@ -349,7 +384,7 @@ export declare type ChannelSource = {
349
384
  */
350
385
  export declare interface ChannelSourcePojo {
351
386
  type: 'ChannelSource';
352
- uri: string;
387
+ url: string;
353
388
  originalOptions: any;
354
389
  channelName: string;
355
390
  programName: string;
@@ -424,6 +459,7 @@ export declare interface ConfirmationOverlayPayloadBase {
424
459
 
425
460
  /**
426
461
  * Entity aggregate conversion statistics per day
462
+ * TODO in future change structure, new used like array item
427
463
  */
428
464
  export declare interface ConversionAnalytic {
429
465
  /**
@@ -734,6 +770,41 @@ export declare type DocumentOptions = Partial<{
734
770
  subscribeOnChanges: boolean;
735
771
  }>;
736
772
 
773
+ export declare interface Drm {
774
+ encryption: VideoSourceEncryption;
775
+ /**
776
+ * Url to retrieve fairplay from.
777
+ */
778
+ certificateUrl?: string;
779
+ /**
780
+ * Url to send license to.
781
+ */
782
+ licenseUrl: string;
783
+ /**
784
+ * Headers with corresponding values to send to license server.
785
+ */
786
+ licenseRequestHeaders: {
787
+ [key: string]: string;
788
+ };
789
+ }
790
+
791
+ export declare enum DrmProvider {
792
+ /**
793
+ * Original oktagon stream provider.
794
+ *
795
+ * https://streamonline.pl
796
+ */
797
+ STREAMONLINE = "streamonline",
798
+ /**
799
+ * New stream provider for tivio. Also known as insys video technologies.
800
+ *
801
+ * https://insysvideotechnologies.com
802
+ * https://www.drm.cloud
803
+ * https://videokit.cloud
804
+ */
805
+ INSYS = "insys"
806
+ }
807
+
737
808
  /**
738
809
  * @public
739
810
  */
@@ -750,6 +821,76 @@ export declare enum DurationUnits {
750
821
  MONTH = "month"
751
822
  }
752
823
 
824
+ /**
825
+ * Represents a SendGrid transactional template.
826
+ */
827
+ export declare interface EmailTemplate {
828
+ /**
829
+ * The ID of the transactional template.
830
+ */
831
+ id: string;
832
+ /**
833
+ * The name of the transactional template.
834
+ * @maxLength 100
835
+ */
836
+ name: string;
837
+ /**
838
+ * Defines the generation of the template.
839
+ * @format 'dynamic' | 'legacy'
840
+ */
841
+ generation: 'dynamic' | 'legacy';
842
+ /**
843
+ * The date and time the template was last updated.
844
+ */
845
+ updated_at: string;
846
+ /**
847
+ * An array of versions associated with the template.
848
+ */
849
+ versions: EmailTemplateVersion[];
850
+ }
851
+
852
+ export declare interface EmailTemplateVersion {
853
+ /**
854
+ * ID of the transactional template version.
855
+ */
856
+ id: string;
857
+ /**
858
+ * ID of the transactional template.
859
+ */
860
+ template_id: string;
861
+ /**
862
+ * Set the version as the active version associated with the template.
863
+ * Only one version of a template can be active.
864
+ * The first version created for a template will automatically be set to Active.
865
+ */
866
+ active: boolean;
867
+ /**
868
+ * Name of the transactional template version.
869
+ */
870
+ name: string;
871
+ /**
872
+ * Subject of the new transactional template version.
873
+ * @maxLength 255
874
+ */
875
+ subject: string;
876
+ /**
877
+ * The date and time that this transactional template version was updated.
878
+ */
879
+ updated_at: string;
880
+ /**
881
+ * If true, plain_content is always generated from html_content. If false, plain_content is not altered.
882
+ */
883
+ generate_plain_content: boolean;
884
+ /**
885
+ * The editor used in the UI.
886
+ */
887
+ editor: string;
888
+ /**
889
+ * A Thumbnail preview of the template's html content.
890
+ */
891
+ thumbnail_url: string;
892
+ }
893
+
753
894
  /**
754
895
  * @public
755
896
  */
@@ -817,6 +958,31 @@ export declare interface GenericOnCallError extends Error {
817
958
  details?: Record<string, string>;
818
959
  }
819
960
 
961
+ export declare interface GetBaseAnalyticsRequest {
962
+ /**
963
+ * Id of organization to return analytics data.
964
+ */
965
+ organizationId: string;
966
+ /**
967
+ * Date in string with format e.g. '2023-04-19'.
968
+ */
969
+ startDate: string;
970
+ /**
971
+ * Date in string with format e.g. '2023-04-26'.
972
+ */
973
+ endDate: string;
974
+ }
975
+
976
+ export declare interface GetConversionAnalyticsRequest extends GetBaseAnalyticsRequest {
977
+ }
978
+
979
+ export declare interface GetMonetizationsAnalyticsRequest extends GetBaseAnalyticsRequest {
980
+ }
981
+
982
+ export declare interface GetMonetizationsAnalyticsResponse {
983
+ monetizationsAnalytics: MonetizationSummaryItem[];
984
+ }
985
+
820
986
  /**
821
987
  * Share singleton instance
822
988
  * @public
@@ -894,6 +1060,18 @@ export declare interface GetSourceUrlResponse {
894
1060
  * Which sources did client (or cloud function) has already tried out.
895
1061
  */
896
1062
  sourceHistory: string[];
1063
+ /**
1064
+ * DRM configuration to {@link url} if source is encrypted.
1065
+ */
1066
+ drm?: Drm;
1067
+ }
1068
+
1069
+ export declare interface GetViewAnalyticsResponse {
1070
+ viewCountAnalytics: ViewCountItem[];
1071
+ topWatched: TopWatchItem[];
1072
+ }
1073
+
1074
+ export declare interface GetViewsAnalyticsRequest extends GetBaseAnalyticsRequest {
897
1075
  }
898
1076
 
899
1077
  /**
@@ -1274,11 +1452,51 @@ export declare type MonetizationsSelectOverlayState = {
1274
1452
  closeMonetizationsSelectOverlay: () => void;
1275
1453
  };
1276
1454
 
1455
+ export declare interface MonetizationSummaryItem {
1456
+ /**
1457
+ * Unix timestamp at which the data is aggregated
1458
+ */
1459
+ date: number;
1460
+ /**
1461
+ * Monetization under the videos played, if not filled it is free
1462
+ */
1463
+ monetizationId: string;
1464
+ /**
1465
+ * Sum of successful (new and regular) payment price in current period
1466
+ */
1467
+ totalPrice: number;
1468
+ /**
1469
+ * Count of new payments in the current period
1470
+ */
1471
+ newPaymentCount: number;
1472
+ /**
1473
+ * Count of payments cancelled in in the current period
1474
+ */
1475
+ cancelledPaymentCount: number;
1476
+ /**
1477
+ * Count of payments made regularly like in the previous period
1478
+ */
1479
+ regularPaymentCount: number;
1480
+ /**
1481
+ * Price which was charged independent on price list (full and discounted)
1482
+ */
1483
+ paymentPrice: number;
1484
+ /**
1485
+ * Monetization type frequency
1486
+ */
1487
+ monetizationFrequency: MONETIZATION_FREQUENCY;
1488
+ /**
1489
+ * For PPV payments there will be videoId for which payment charged
1490
+ * If not filled it is not PPV
1491
+ */
1492
+ videoId?: string;
1493
+ }
1494
+
1277
1495
  /**
1278
1496
  * @public
1279
1497
  * @TODO change to enum
1280
1498
  */
1281
- export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
1499
+ export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription' | 'display';
1282
1500
 
1283
1501
  /**
1284
1502
  * TODO: Duplicate, because we can't import types from core-js.
@@ -1290,6 +1508,22 @@ export declare type NewVoucher = {
1290
1508
  expirationDate: Date | number;
1291
1509
  };
1292
1510
 
1511
+ declare interface Notification_2 {
1512
+ id: string;
1513
+ name: string;
1514
+ targeting: UserGroup;
1515
+ templateId: string;
1516
+ thumbnailUrl?: string;
1517
+ triggerType: TriggerType;
1518
+ status?: NotificationStatus;
1519
+ }
1520
+ export { Notification_2 as Notification }
1521
+
1522
+ export declare enum NotificationStatus {
1523
+ PLANNED = "planned",
1524
+ SENT = "sent"
1525
+ }
1526
+
1293
1527
  /**
1294
1528
  * @public
1295
1529
  */
@@ -1384,7 +1618,11 @@ export declare enum PLATFORM {
1384
1618
  */
1385
1619
  MOBILE = "MOBILE",
1386
1620
  WEB = "WEB",
1387
- TV = "TV"
1621
+ TV = "TV",
1622
+ /**
1623
+ * @deprecated Used only in big query. In the future we'll migrate to undefined value and delete this.
1624
+ */
1625
+ UNKNOWN = "unknown"
1388
1626
  }
1389
1627
 
1390
1628
  /**
@@ -1415,9 +1653,9 @@ export declare type Player = {
1415
1653
  * @public
1416
1654
  */
1417
1655
  export declare interface PlayerCapability {
1418
- codec: 'h264' | 'h265';
1419
- encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
1420
- protocol: 'dash' | 'hls' | 'mp4';
1656
+ codec: VideoSourceCodec;
1657
+ encryption: VideoSourceEncryption;
1658
+ protocol: VideoSourceProtocol;
1421
1659
  }
1422
1660
 
1423
1661
  /**
@@ -1479,6 +1717,135 @@ export declare type PlayerConfig = {
1479
1717
  };
1480
1718
  };
1481
1719
 
1720
+ /**
1721
+ * @public
1722
+ */
1723
+ export declare interface PlayerEngineConfig {
1724
+ getDrmConfiguration?: () => Promise<Drm | undefined>;
1725
+ encryption?: string;
1726
+ isAd?: boolean;
1727
+ positionMs?: number;
1728
+ url: string;
1729
+ }
1730
+
1731
+ /**
1732
+ * @public
1733
+ */
1734
+ 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';
1735
+
1736
+ /**
1737
+ * @public
1738
+ */
1739
+ export declare type PlayerEngineFactory = (videoElement: HTMLVideoElement) => PlayerEngineInterface;
1740
+
1741
+ /**
1742
+ * @public
1743
+ */
1744
+ export declare interface PlayerEngineInterface {
1745
+ /**
1746
+ * Loads video but keeps it paused
1747
+ */
1748
+ load(config: PlayerEngineConfig): Promise<void>;
1749
+ /**
1750
+ * Loads and starts playing video
1751
+ * @throws
1752
+ */
1753
+ play(config: PlayerEngineConfig): Promise<void>;
1754
+ pause(): Promise<void>;
1755
+ unpause(): Promise<void>;
1756
+ isPaused(): boolean;
1757
+ stop(): Promise<void>;
1758
+ addEventListener<T>(event: PlayerEngineEvent, callback: PlayerEngineListener<T>): void;
1759
+ addEventListener(event: 'statechange', callback: PlayerEngineListener<PlayerState>): void;
1760
+ addEventListener(event: 'bufferingchange', callback: PlayerEngineListener<boolean>): void;
1761
+ addEventListener(event: 'bufferedinfochange', callback: PlayerEngineListener<BufferPercentChunk[]>): void;
1762
+ addEventListener(event: 'togglefullscreen', callback: PlayerEngineListener<boolean>): void;
1763
+ removeEventListener<T>(event: PlayerEngineEvent, listener: PlayerEngineListener<T>): void;
1764
+ /**
1765
+ * @returns currently playing audio track in ISO 639-1 format ('cs', 'en' etc.) or null if not available
1766
+ */
1767
+ getActiveAudioTrack?: () => LangCode | null;
1768
+ /**
1769
+ * @returns currently selected subtitles in ISO 639-1 format ('cs', 'en' etc.)
1770
+ */
1771
+ getActiveSubtitles?: () => LangCode | null;
1772
+ /**
1773
+ * Returns currently available audio tracks of currently playing video.
1774
+ *
1775
+ * @returns array of available audio tracks in ISO 639-1 format ('cs', 'en' etc.)
1776
+ */
1777
+ getAudioTracks?: () => LangCode[];
1778
+ /**
1779
+ * @returns array of available subtitles in ISO 639-1 format ('cs', 'en' etc.)
1780
+ */
1781
+ getSubtitles?: () => LangCode[];
1782
+ getCurrentQuality?: (lang?: LangCode) => Track | null;
1783
+ getQualities?: () => Track[];
1784
+ /**
1785
+ * options.force to change quality immediately, otherwise it takes some time
1786
+ * (because previously loaded higher or lower quality chunks are not discarded)
1787
+ */
1788
+ selectQuality?: (track: Track, options?: {
1789
+ force: boolean;
1790
+ }) => void;
1791
+ /**
1792
+ * Is automatic selection of video quality based on network bandwidth (aka ABR) enabled?
1793
+ */
1794
+ isAdaptationEnabled?: () => boolean;
1795
+ /**
1796
+ * Turn on automatic selection of video quality based on network bandwidth (aka ABR).
1797
+ * It is enabled by default.
1798
+ * It automatically becomes disabled when selectQuality() is called.
1799
+ */
1800
+ enableAdaptation?: (enable: boolean) => void;
1801
+ goFullScreen(): Promise<void>;
1802
+ /**
1803
+ * @param {number} value 0-1
1804
+ */
1805
+ changeVolume(value: number): void;
1806
+ getState(): PlayerState;
1807
+ isIdle(): boolean;
1808
+ mute(): void;
1809
+ unmute(): void;
1810
+ /**
1811
+ * @returns {number} duration in seconds
1812
+ */
1813
+ getDuration(): number;
1814
+ seekTo(ms: number): void;
1815
+ /**
1816
+ * Changes audio track of currently playing video.
1817
+ *
1818
+ * @param {LangCode} audioTrack - audio track to select in ISO 639-1 format ('cs', 'en' etc.)
1819
+ */
1820
+ selectAudioTrack?: (audioTrack: LangCode) => void;
1821
+ /**
1822
+ * Changes audio track of currently playing video.
1823
+ * @param {LangCode} langCode - subtitles to select in ISO 639-1 format ('cs', 'en' etc.) or null to disable subtitles
1824
+ */
1825
+ selectSubtitles?: (langCode: LangCode | null) => void;
1826
+ /**
1827
+ * Changes audio track of currently playing video.
1828
+ *
1829
+ * @param {number} playbackSpeed - playback speed to select (1 = normal speed, 2 = twice as fast, etc.)
1830
+ */
1831
+ selectPlaybackSpeed?: (playbackSpeed: number) => void;
1832
+ destroy(): Promise<void>;
1833
+ getBufferedInfo?(): BufferChunk[];
1834
+ lastQuality: number | null;
1835
+ }
1836
+
1837
+ /**
1838
+ * @public
1839
+ */
1840
+ export declare type PlayerEngineListener<T> = (value: T) => any;
1841
+
1842
+ /**
1843
+ * @public
1844
+ */
1845
+ export declare interface PlayerEngineOptions {
1846
+ seekDebounceMs?: number;
1847
+ }
1848
+
1482
1849
  /**
1483
1850
  * @public
1484
1851
  */
@@ -1536,7 +1903,10 @@ export declare type PlayerProviderProps = {
1536
1903
  playerWrapperId?: string;
1537
1904
  };
1538
1905
 
1539
- declare type PlayerState = 'playing' | 'paused' | 'idle';
1906
+ /**
1907
+ * @public
1908
+ */
1909
+ export declare type PlayerState = 'idle' | 'playing' | 'paused';
1540
1910
 
1541
1911
  /**
1542
1912
  * @public
@@ -1683,6 +2053,10 @@ export declare interface PurchasableMonetization extends Monetization {
1683
2053
  * If not set or set to false, users cannot buy it as a voucher.
1684
2054
  */
1685
2055
  isPurchasableAsVoucher?: boolean;
2056
+ /**
2057
+ * Returns array of tag ids of monetization placements
2058
+ */
2059
+ tagIds: string[];
1686
2060
  }
1687
2061
 
1688
2062
  /**
@@ -1745,6 +2119,11 @@ export declare type PurchaseEndpointPayload = {
1745
2119
  * Two-letter upper-case country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
1746
2120
  */
1747
2121
  countryIsoCode?: LocationField['countryIsoCode'];
2122
+ /**
2123
+ * Purchase expiration timestamp. Only present for "subscription" monetization type. This timestamp does not mean it will
2124
+ * really expire at this timestamp - additional payment of this subscription can occur so expiration timestamp may be increased.
2125
+ */
2126
+ expiration?: number;
1748
2127
  /**
1749
2128
  * Gateway name or "voucher".
1750
2129
  */
@@ -1753,22 +2132,22 @@ export declare type PurchaseEndpointPayload = {
1753
2132
  * Tivio ID of the purchase.
1754
2133
  */
1755
2134
  id: string;
1756
- /**
1757
- * Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
1758
- */
1759
- updated: number;
1760
2135
  /**
1761
2136
  * True if delayed payment is confirmed but not charged yet, undefined in all other cases.
1762
2137
  */
1763
2138
  isDelayedPayment?: boolean;
2139
+ /**
2140
+ * Purchase status after change.
2141
+ */
2142
+ newStatus: PurchaseStatus;
1764
2143
  /**
1765
2144
  * Purchase status before change.
1766
2145
  */
1767
2146
  previousStatus: PurchaseStatus;
1768
2147
  /**
1769
- * Purchase status after change.
2148
+ * Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
1770
2149
  */
1771
- newStatus: PurchaseStatus;
2150
+ updated: number;
1772
2151
  };
1773
2152
  /**
1774
2153
  * Information about the monetization which has been bought by this purchase. Monetization definition may change in time so information provided here
@@ -2091,6 +2470,9 @@ declare interface RowBase {
2091
2470
  type: ScreenRowType;
2092
2471
  isLiveRow: boolean;
2093
2472
  numberOfLines?: number;
2473
+ monetizations?: {
2474
+ monetizationRef: any;
2475
+ }[];
2094
2476
  }
2095
2477
 
2096
2478
  /**
@@ -2129,8 +2511,7 @@ export declare interface RowItemAssets {
2129
2511
  export declare enum RowItemComponent {
2130
2512
  ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
2131
2513
  ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
2132
- ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED",
2133
- ROW_ITEM_BANNER = "ROW_ITEM_BANNER"
2514
+ ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
2134
2515
  }
2135
2516
 
2136
2517
  /**
@@ -2505,7 +2886,7 @@ export declare type TileSizes = {
2505
2886
  * @internal
2506
2887
  */
2507
2888
  export declare type TileSizesMap = {
2508
- [item in RowItemComponent]: TileSizes;
2889
+ [item in RowItemComponent | BannerItemComponent]: TileSizes;
2509
2890
  };
2510
2891
 
2511
2892
  /**
@@ -2594,6 +2975,7 @@ export declare type TivioComponents = {
2594
2975
  WebTile: React_2.ComponentType<{
2595
2976
  item?: ItemsInRow;
2596
2977
  } & TilePropsPartial>;
2978
+ ChannelContext: React_2.Context<TvChannel | undefined>;
2597
2979
  };
2598
2980
 
2599
2981
  /**
@@ -2720,6 +3102,7 @@ export declare type TivioHooks = {
2720
3102
  inviteCodeReset: () => void;
2721
3103
  };
2722
3104
  useChannelSource: UseChannelSource;
3105
+ useTvChannel: UseTvChannel;
2723
3106
  };
2724
3107
 
2725
3108
  /**
@@ -2761,7 +3144,7 @@ export declare type TivioInternalHooks = {
2761
3144
  usePurchasesWithVideos: () => {
2762
3145
  purchases: Purchase[];
2763
3146
  };
2764
- useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
3147
+ useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
2765
3148
  subscriptions: PurchasableMonetization[];
2766
3149
  };
2767
3150
  useIsMonetizationPurchased: () => {
@@ -2837,7 +3220,7 @@ export declare type TivioJsBundleExposedApi = {
2837
3220
  * @param id - player wrapper id
2838
3221
  * @returns {Player} player wrapper instance
2839
3222
  */
2840
- getPlayer: (id: string) => Player;
3223
+ getPlayerWrapper: (id: string) => Player;
2841
3224
  /**
2842
3225
  * Get tv channel by its id.
2843
3226
  * @param tvChannelId - tv channel id
@@ -3007,6 +3390,7 @@ export declare interface TivioWidgetProps {
3007
3390
  x: number;
3008
3391
  }) => any;
3009
3392
  navigateFunction?: any;
3393
+ isFocused?: boolean;
3010
3394
  }
3011
3395
 
3012
3396
  /**
@@ -3025,6 +3409,40 @@ export declare interface TivioWidgetRef {
3025
3409
  });
3026
3410
  }
3027
3411
 
3412
+ export declare interface TopWatchItem {
3413
+ videoId: string;
3414
+ /**
3415
+ * If video is part of series we get a tagId to series
3416
+ */
3417
+ seriesId?: string;
3418
+ /**
3419
+ * Video type {@link VideoType}
3420
+ */
3421
+ videoType: VideoType;
3422
+ /**
3423
+ * Uniq users count
3424
+ */
3425
+ userCount: number;
3426
+ /**
3427
+ * Count of video view events
3428
+ */
3429
+ viewCount: number;
3430
+ }
3431
+
3432
+ /**
3433
+ * @public
3434
+ * Video track
3435
+ */
3436
+ declare interface Track {
3437
+ id: number;
3438
+ /**
3439
+ * e.g. 480, 720, 1080
3440
+ */
3441
+ height: number;
3442
+ active: boolean;
3443
+ language: LangCode;
3444
+ }
3445
+
3028
3446
  declare type TransactionInfo = {
3029
3447
  type: 'transaction';
3030
3448
  name: string;
@@ -3041,11 +3459,14 @@ export declare type Translation = {
3041
3459
  [key in LangCode]?: string;
3042
3460
  };
3043
3461
 
3462
+ export declare type TriggerType = 'scheduled' | 'manual';
3463
+
3044
3464
  /**
3045
3465
  * @public
3046
3466
  */
3047
3467
  export declare type TvAppProps = {
3048
3468
  customer: CustomerId;
3469
+ navigateFunction: (url: string) => void;
3049
3470
  };
3050
3471
 
3051
3472
  /**
@@ -3054,11 +3475,13 @@ export declare type TvAppProps = {
3054
3475
  export declare interface TvChannel extends RowItem {
3055
3476
  id: string;
3056
3477
  itemType: ROW_ITEM_TYPES.TV_CHANNEL;
3478
+ type?: TvChannelType;
3057
3479
  name: string;
3058
3480
  path: string;
3059
3481
  country?: string;
3060
3482
  filters: string[];
3061
3483
  logo?: string;
3484
+ logoPendingOverlayWidth?: string;
3062
3485
  hls: string;
3063
3486
  dash: string;
3064
3487
  /**
@@ -3066,12 +3489,37 @@ export declare interface TvChannel extends RowItem {
3066
3489
  * Transactions before subscriptions, sorted by price ascending.
3067
3490
  */
3068
3491
  getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
3069
- getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
3492
+ getSourceUrl(options?: {
3493
+ language?: LangCode;
3494
+ }): Promise<GetSourceUrlResponse & {
3495
+ language?: LangCode;
3496
+ }>;
3070
3497
  purchasableMonetization: any | null;
3071
3498
  price: number;
3072
3499
  cover: string;
3073
3500
  isPlayable: boolean;
3074
- uri: string;
3501
+ url: string;
3502
+ }
3503
+
3504
+ export declare enum TvChannelType {
3505
+ /**
3506
+ * Classic live tv channel
3507
+ */
3508
+ CLASSIC = "CLASSIC",
3509
+ /**
3510
+ * "Virtual" tv channel constructed from separate videos
3511
+ */
3512
+ VIRTUAL = "VIRTUAL"
3513
+ }
3514
+
3515
+ export declare interface TvProgram {
3516
+ from: Date | null;
3517
+ to: Date | null;
3518
+ name: string;
3519
+ description: string;
3520
+ url: string;
3521
+ image: string;
3522
+ video: Video | null;
3075
3523
  }
3076
3524
 
3077
3525
  /**
@@ -3178,7 +3626,7 @@ export declare interface UseCancelSubscriptionsResult {
3178
3626
  * @public
3179
3627
  */
3180
3628
  export declare type UseChannelSource = (tvChannelId: string) => {
3181
- source: ChannelSourcePojo | null;
3629
+ source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
3182
3630
  error: Error | null;
3183
3631
  };
3184
3632
 
@@ -3188,7 +3636,7 @@ export declare type UseChannelSource = (tvChannelId: string) => {
3188
3636
  * @public
3189
3637
  */
3190
3638
  export declare const useChannelSource: (tvChannelId: string) => {
3191
- source: ChannelSourcePojo | null;
3639
+ source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
3192
3640
  error: Error | null;
3193
3641
  };
3194
3642
 
@@ -3239,16 +3687,6 @@ export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions
3239
3687
  subscriptions: PurchasableMonetization[];
3240
3688
  };
3241
3689
 
3242
- /**
3243
- * @public
3244
- */
3245
- export declare type UsePlayerEvent = <T = any>(eventName: string) => T | null;
3246
-
3247
- /**
3248
- * @public
3249
- */
3250
- export declare const usePlayerEvent: UsePlayerEvent;
3251
-
3252
3690
  /**
3253
3691
  * Is used to mark purchase in recovery state as PAID.
3254
3692
  *
@@ -3321,6 +3759,12 @@ export declare type User = {
3321
3759
  setActiveUserProfileId: (id: string) => void;
3322
3760
  };
3323
3761
 
3762
+ export declare enum UserGroup {
3763
+ ALL = "all",
3764
+ FREE = "free",
3765
+ PREMIUM = "premium"
3766
+ }
3767
+
3324
3768
  /**
3325
3769
  * @public
3326
3770
  */
@@ -3532,7 +3976,11 @@ export declare interface Video extends RowItem {
3532
3976
  * Transactions before subscriptions, sorted by price ascending.
3533
3977
  */
3534
3978
  getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
3535
- getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
3979
+ getSourceUrl(options?: {
3980
+ language?: LangCode;
3981
+ }): Promise<GetSourceUrlResponse & {
3982
+ language?: LangCode;
3983
+ }>;
3536
3984
  purchasableMonetization: any | null;
3537
3985
  transaction: PurchasableMonetization | undefined;
3538
3986
  subscriptions: PurchasableMonetization[];
@@ -3543,7 +3991,6 @@ export declare interface Video extends RowItem {
3543
3991
  urlName?: string;
3544
3992
  price: number | null;
3545
3993
  detailedPrice: DetailedPrice | null;
3546
- uri: string;
3547
3994
  url: string;
3548
3995
  adMonetizationId?: string;
3549
3996
  from?: Date;
@@ -3565,7 +4012,7 @@ export declare interface Video extends RowItem {
3565
4012
  removeFromFavorites: () => void;
3566
4013
  availability: VideoAvailability | null;
3567
4014
  sourceLanguages: LangCode[];
3568
- uriByLanguage: (lang: LangCode) => string | undefined;
4015
+ urlByLanguage: (lang: LangCode) => string | undefined;
3569
4016
  }
3570
4017
 
3571
4018
  /**
@@ -3596,6 +4043,29 @@ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExt
3596
4043
 
3597
4044
  declare type VideoPath = string;
3598
4045
 
4046
+ export declare enum VideoSourceCodec {
4047
+ H264 = "h264",
4048
+ H265 = "h265"
4049
+ }
4050
+
4051
+ export declare enum VideoSourceEncryption {
4052
+ NONE = "none",
4053
+ WIDEVINE = "widevine",
4054
+ FAIRPLAY = "fairplay",
4055
+ PLAYREADY = "playready"
4056
+ }
4057
+
4058
+ /**
4059
+ * Lower number = higher priority.
4060
+ */
4061
+ export declare type VideoSourcePriority = 1 | 2 | 3 | 4 | 5;
4062
+
4063
+ export declare enum VideoSourceProtocol {
4064
+ HLS = "hls",
4065
+ DASH = "dash",
4066
+ MP4 = "mp4"
4067
+ }
4068
+
3599
4069
  /**
3600
4070
  * Video type.
3601
4071
  * @public
@@ -3627,30 +4097,58 @@ export declare enum VideoType {
3627
4097
  /**
3628
4098
  * @public
3629
4099
  */
3630
- export declare type VideoUrlName = {
4100
+ export declare type VideoUrlNames = {
3631
4101
  [key in LangCode]?: string[];
3632
4102
  };
3633
4103
 
4104
+ export declare interface ViewCountItem {
4105
+ /**
4106
+ * Unix timestamp
4107
+ */
4108
+ date: number;
4109
+ /**
4110
+ * Monetization under the videos played, if not filled it is free
4111
+ */
4112
+ monetizationId?: string;
4113
+ /**
4114
+ * Device where the video played
4115
+ */
4116
+ deviceType: PLATFORM;
4117
+ /**
4118
+ * Count of video view events in group
4119
+ */
4120
+ totalCount: number;
4121
+ }
4122
+
4123
+ /**
4124
+ * @public
4125
+ */
4126
+ export declare interface VirtualChannelSourcePojo {
4127
+ type: 'VirtualChannelSource';
4128
+ tvChannel: TvChannel;
4129
+ epg: TvProgram[];
4130
+ }
4131
+
3634
4132
  /**
3635
4133
  * @public
3636
4134
  */
3637
4135
  export declare type VodExternalSource = {
3638
- new (uri: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
4136
+ new (url: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
3639
4137
  type: 'vod_external';
3640
4138
  description: string;
3641
4139
  name: string;
3642
- uri: string;
4140
+ url: string;
3643
4141
  };
3644
4142
 
3645
4143
  /**
3646
4144
  * @public
3647
4145
  */
3648
4146
  export declare type VodTivioSource = {
3649
- new (uri: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
4147
+ new (url: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
3650
4148
  type: 'vod_tivio';
3651
4149
  description: string;
3652
4150
  name: string;
3653
- uri: string;
4151
+ url: string;
3654
4152
  };
3655
4153
 
3656
4154
  declare interface VodTivioSourcePojo {
@@ -3658,7 +4156,7 @@ declare interface VodTivioSourcePojo {
3658
4156
  description: string;
3659
4157
  path: string;
3660
4158
  name: string;
3661
- uri: string;
4159
+ url: string;
3662
4160
  poster?: string;
3663
4161
  adMonetizationId?: string;
3664
4162
  availability: VideoAvailability | null;
@@ -3689,7 +4187,7 @@ export declare interface WarningConfirmationOverlayPayload extends ConfirmationO
3689
4187
  */
3690
4188
  export declare interface WebPlayerProps {
3691
4189
  id: string;
3692
- source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
4190
+ source?: VodTivioSourcePojo | ChannelSourcePojo | VirtualChannelSourcePojo | VideoPath | null;
3693
4191
  onEnded?: () => any;
3694
4192
  /**
3695
4193
  * If this function is specified, then "Back" button is shown in top right corner.