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

Sign up to get free protection for your applications and to get access to all the features.
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
  /**
@@ -2352,6 +2733,7 @@ export declare type TivioComponents = {
2352
2733
  WebTile: React_2.ComponentType<{
2353
2734
  item?: ItemsInRow;
2354
2735
  } & TilePropsPartial>;
2736
+ ChannelContext: React_2.Context<TvChannel | undefined>;
2355
2737
  };
2356
2738
 
2357
2739
  /**
@@ -2478,6 +2860,7 @@ export declare type TivioHooks = {
2478
2860
  inviteCodeReset: () => void;
2479
2861
  };
2480
2862
  useChannelSource: UseChannelSource;
2863
+ useTvChannel: UseTvChannel;
2481
2864
  };
2482
2865
 
2483
2866
  /**
@@ -2519,7 +2902,7 @@ export declare type TivioInternalHooks = {
2519
2902
  usePurchasesWithVideos: () => {
2520
2903
  purchases: Purchase[];
2521
2904
  };
2522
- useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
2905
+ useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
2523
2906
  subscriptions: PurchasableMonetization[];
2524
2907
  };
2525
2908
  useIsMonetizationPurchased: () => {
@@ -2587,7 +2970,7 @@ export declare type TivioJsBundleExposedApi = {
2587
2970
  * @param id - player wrapper id
2588
2971
  * @returns {Player} player wrapper instance
2589
2972
  */
2590
- getPlayer: (id: string) => Player;
2973
+ getPlayerWrapper: (id: string) => Player;
2591
2974
  /**
2592
2975
  * Get tv channel by its id.
2593
2976
  * @param tvChannelId - tv channel id
@@ -2757,6 +3140,7 @@ export declare interface TivioWidgetProps {
2757
3140
  x: number;
2758
3141
  }) => any;
2759
3142
  navigateFunction?: any;
3143
+ isFocused?: boolean;
2760
3144
  }
2761
3145
 
2762
3146
  /**
@@ -2775,6 +3159,40 @@ export declare interface TivioWidgetRef {
2775
3159
  });
2776
3160
  }
2777
3161
 
3162
+ export declare interface TopWatchItem {
3163
+ videoId: string;
3164
+ /**
3165
+ * If video is part of series we get a tagId to series
3166
+ */
3167
+ seriesId?: string;
3168
+ /**
3169
+ * Video type {@link VideoType}
3170
+ */
3171
+ videoType: VideoType;
3172
+ /**
3173
+ * Uniq users count
3174
+ */
3175
+ userCount: number;
3176
+ /**
3177
+ * Count of video view events
3178
+ */
3179
+ viewCount: number;
3180
+ }
3181
+
3182
+ /**
3183
+ * @public
3184
+ * Video track
3185
+ */
3186
+ declare interface Track {
3187
+ id: number;
3188
+ /**
3189
+ * e.g. 480, 720, 1080
3190
+ */
3191
+ height: number;
3192
+ active: boolean;
3193
+ language: LangCode;
3194
+ }
3195
+
2778
3196
  declare type TransactionInfo = {
2779
3197
  type: 'transaction';
2780
3198
  name: string;
@@ -2791,11 +3209,14 @@ export declare type Translation = {
2791
3209
  [key in LangCode]?: string;
2792
3210
  };
2793
3211
 
3212
+ export declare type TriggerType = 'scheduled' | 'manual';
3213
+
2794
3214
  /**
2795
3215
  * @public
2796
3216
  */
2797
3217
  export declare type TvAppProps = {
2798
3218
  customer: CustomerId;
3219
+ navigateFunction: (url: string) => void;
2799
3220
  };
2800
3221
 
2801
3222
  /**
@@ -2804,11 +3225,13 @@ export declare type TvAppProps = {
2804
3225
  export declare interface TvChannel extends RowItem {
2805
3226
  id: string;
2806
3227
  itemType: ROW_ITEM_TYPES.TV_CHANNEL;
3228
+ type?: TvChannelType;
2807
3229
  name: string;
2808
3230
  path: string;
2809
3231
  country?: string;
2810
3232
  filters: string[];
2811
3233
  logo?: string;
3234
+ logoPendingOverlayWidth?: string;
2812
3235
  hls: string;
2813
3236
  dash: string;
2814
3237
  /**
@@ -2816,12 +3239,37 @@ export declare interface TvChannel extends RowItem {
2816
3239
  * Transactions before subscriptions, sorted by price ascending.
2817
3240
  */
2818
3241
  getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
2819
- getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
3242
+ getSourceUrl(options?: {
3243
+ language?: LangCode;
3244
+ }): Promise<GetSourceUrlResponse & {
3245
+ language?: LangCode;
3246
+ }>;
2820
3247
  purchasableMonetization: any | null;
2821
3248
  price: number;
2822
3249
  cover: string;
2823
3250
  isPlayable: boolean;
2824
- uri: string;
3251
+ url: string;
3252
+ }
3253
+
3254
+ export declare enum TvChannelType {
3255
+ /**
3256
+ * Classic live tv channel
3257
+ */
3258
+ CLASSIC = "CLASSIC",
3259
+ /**
3260
+ * "Virtual" tv channel constructed from separate videos
3261
+ */
3262
+ VIRTUAL = "VIRTUAL"
3263
+ }
3264
+
3265
+ export declare interface TvProgram {
3266
+ from: Date | null;
3267
+ to: Date | null;
3268
+ name: string;
3269
+ description: string;
3270
+ url: string;
3271
+ image: string;
3272
+ video: Video | null;
2825
3273
  }
2826
3274
 
2827
3275
  /**
@@ -2928,7 +3376,7 @@ export declare interface UseCancelSubscriptionsResult {
2928
3376
  * @public
2929
3377
  */
2930
3378
  export declare type UseChannelSource = (tvChannelId: string) => {
2931
- source: ChannelSourcePojo | null;
3379
+ source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
2932
3380
  error: Error | null;
2933
3381
  };
2934
3382
 
@@ -2938,7 +3386,7 @@ export declare type UseChannelSource = (tvChannelId: string) => {
2938
3386
  * @public
2939
3387
  */
2940
3388
  export declare const useChannelSource: (tvChannelId: string) => {
2941
- source: ChannelSourcePojo | null;
3389
+ source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
2942
3390
  error: Error | null;
2943
3391
  };
2944
3392
 
@@ -2989,16 +3437,6 @@ export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions
2989
3437
  subscriptions: PurchasableMonetization[];
2990
3438
  };
2991
3439
 
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
3440
  /**
3003
3441
  * Is used to mark purchase in recovery state as PAID.
3004
3442
  *
@@ -3071,6 +3509,12 @@ export declare type User = {
3071
3509
  setActiveUserProfileId: (id: string) => void;
3072
3510
  };
3073
3511
 
3512
+ export declare enum UserGroup {
3513
+ ALL = "all",
3514
+ FREE = "free",
3515
+ PREMIUM = "premium"
3516
+ }
3517
+
3074
3518
  /**
3075
3519
  * @public
3076
3520
  */
@@ -3282,7 +3726,11 @@ export declare interface Video extends RowItem {
3282
3726
  * Transactions before subscriptions, sorted by price ascending.
3283
3727
  */
3284
3728
  getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
3285
- getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
3729
+ getSourceUrl(options?: {
3730
+ language?: LangCode;
3731
+ }): Promise<GetSourceUrlResponse & {
3732
+ language?: LangCode;
3733
+ }>;
3286
3734
  purchasableMonetization: any | null;
3287
3735
  transaction: PurchasableMonetization | undefined;
3288
3736
  subscriptions: PurchasableMonetization[];
@@ -3293,7 +3741,6 @@ export declare interface Video extends RowItem {
3293
3741
  urlName?: string;
3294
3742
  price: number | null;
3295
3743
  detailedPrice: DetailedPrice | null;
3296
- uri: string;
3297
3744
  url: string;
3298
3745
  adMonetizationId?: string;
3299
3746
  from?: Date;
@@ -3315,7 +3762,7 @@ export declare interface Video extends RowItem {
3315
3762
  removeFromFavorites: () => void;
3316
3763
  availability: VideoAvailability | null;
3317
3764
  sourceLanguages: LangCode[];
3318
- uriByLanguage: (lang: LangCode) => string | undefined;
3765
+ urlByLanguage: (lang: LangCode) => string | undefined;
3319
3766
  }
3320
3767
 
3321
3768
  /**
@@ -3346,6 +3793,29 @@ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExt
3346
3793
 
3347
3794
  declare type VideoPath = string;
3348
3795
 
3796
+ export declare enum VideoSourceCodec {
3797
+ H264 = "h264",
3798
+ H265 = "h265"
3799
+ }
3800
+
3801
+ export declare enum VideoSourceEncryption {
3802
+ NONE = "none",
3803
+ WIDEVINE = "widevine",
3804
+ FAIRPLAY = "fairplay",
3805
+ PLAYREADY = "playready"
3806
+ }
3807
+
3808
+ /**
3809
+ * Lower number = higher priority.
3810
+ */
3811
+ export declare type VideoSourcePriority = 1 | 2 | 3 | 4 | 5;
3812
+
3813
+ export declare enum VideoSourceProtocol {
3814
+ HLS = "hls",
3815
+ DASH = "dash",
3816
+ MP4 = "mp4"
3817
+ }
3818
+
3349
3819
  /**
3350
3820
  * Video type.
3351
3821
  * @public
@@ -3377,30 +3847,58 @@ export declare enum VideoType {
3377
3847
  /**
3378
3848
  * @public
3379
3849
  */
3380
- export declare type VideoUrlName = {
3850
+ export declare type VideoUrlNames = {
3381
3851
  [key in LangCode]?: string[];
3382
3852
  };
3383
3853
 
3854
+ export declare interface ViewCountItem {
3855
+ /**
3856
+ * Unix timestamp
3857
+ */
3858
+ date: number;
3859
+ /**
3860
+ * Monetization under the videos played, if not filled it is free
3861
+ */
3862
+ monetizationId?: string;
3863
+ /**
3864
+ * Device where the video played
3865
+ */
3866
+ deviceType: PLATFORM;
3867
+ /**
3868
+ * Count of video view events in group
3869
+ */
3870
+ totalCount: number;
3871
+ }
3872
+
3873
+ /**
3874
+ * @public
3875
+ */
3876
+ export declare interface VirtualChannelSourcePojo {
3877
+ type: 'VirtualChannelSource';
3878
+ tvChannel: TvChannel;
3879
+ epg: TvProgram[];
3880
+ }
3881
+
3384
3882
  /**
3385
3883
  * @public
3386
3884
  */
3387
3885
  export declare type VodExternalSource = {
3388
- new (uri: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
3886
+ new (url: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
3389
3887
  type: 'vod_external';
3390
3888
  description: string;
3391
3889
  name: string;
3392
- uri: string;
3890
+ url: string;
3393
3891
  };
3394
3892
 
3395
3893
  /**
3396
3894
  * @public
3397
3895
  */
3398
3896
  export declare type VodTivioSource = {
3399
- new (uri: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
3897
+ new (url: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
3400
3898
  type: 'vod_tivio';
3401
3899
  description: string;
3402
3900
  name: string;
3403
- uri: string;
3901
+ url: string;
3404
3902
  };
3405
3903
 
3406
3904
  declare interface VodTivioSourcePojo {
@@ -3408,7 +3906,7 @@ declare interface VodTivioSourcePojo {
3408
3906
  description: string;
3409
3907
  path: string;
3410
3908
  name: string;
3411
- uri: string;
3909
+ url: string;
3412
3910
  poster?: string;
3413
3911
  adMonetizationId?: string;
3414
3912
  availability: VideoAvailability | null;
@@ -3439,7 +3937,7 @@ export declare interface WarningConfirmationOverlayPayload extends ConfirmationO
3439
3937
  */
3440
3938
  export declare interface WebPlayerProps {
3441
3939
  id: string;
3442
- source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
3940
+ source?: VodTivioSourcePojo | ChannelSourcePojo | VirtualChannelSourcePojo | VideoPath | null;
3443
3941
  onEnded?: () => any;
3444
3942
  /**
3445
3943
  * If this function is specified, then "Back" button is shown in top right corner.