@tivio/sdk-react 4.2.0 → 4.4.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.
@@ -55,6 +55,12 @@ export declare type AdMetadata = {
55
55
  skip: () => void;
56
56
  } | null;
57
57
 
58
+ /**
59
+ * @public
60
+ */
61
+ export declare interface AdMonetization extends Monetization {
62
+ }
63
+
58
64
  /**
59
65
  * @public
60
66
  */
@@ -156,35 +162,6 @@ export declare type Assets = {
156
162
  [assetName: string]: ScalableAsset;
157
163
  };
158
164
 
159
- /**
160
- * @public
161
- */
162
- export declare type AuthOverlayPayload = {
163
- prefilledData?: {
164
- email: string;
165
- };
166
- /**
167
- * "Goto" function (see router.utils.ts) to run after the overlay is closed. Null if no redirect is required.
168
- * Defaults to homepage.
169
- */
170
- redirectAfterSubmit?: ((...args: any[]) => void) | null;
171
- };
172
-
173
- /**
174
- * @public
175
- */
176
- export declare type AuthOverlayState = {
177
- type: AuthOverlayType;
178
- closeAuthOverlay: () => void;
179
- openAuthOverlay: (type: AuthOverlayType, payload?: AuthOverlayPayload) => void;
180
- payload?: AuthOverlayPayload | null;
181
- };
182
-
183
- /**
184
- * @public
185
- */
186
- export declare type AuthOverlayType = 'login' | 'registration' | 'closed' | 'reset-password';
187
-
188
165
  /**
189
166
  * @public
190
167
  */
@@ -210,6 +187,11 @@ export declare type BadRequestError = Error & {
210
187
  };
211
188
  };
212
189
 
190
+ export declare enum BannerItemComponent {
191
+ CLASSIC = "CLASSIC",
192
+ SPLIT = "SPLIT"
193
+ }
194
+
213
195
  /**
214
196
  * @public
215
197
  */
@@ -380,6 +362,7 @@ export declare type CreateUserWithEmailAndPassword = (email: string, password: s
380
362
  export declare const CURRENCIES: string[];
381
363
 
382
364
  /**
365
+ * Three upper-case letters according to ISO-4217.
383
366
  * @public
384
367
  */
385
368
  export declare type Currency = 'CZK' | 'EUR' | 'USD';
@@ -415,6 +398,22 @@ export declare type Customizations = {
415
398
  coverWidth: number;
416
399
  fontWeight: string | number;
417
400
  overlayWidth: string | number;
401
+ text: {
402
+ width: string;
403
+ location: 'center' | 'bottom';
404
+ /**
405
+ * Font size in px
406
+ */
407
+ fontSize: number;
408
+ };
409
+ };
410
+ SplitBanner: {
411
+ height: string;
412
+ Image: {
413
+ mobile: {
414
+ height: string;
415
+ };
416
+ };
418
417
  };
419
418
  Row: {
420
419
  /**
@@ -433,6 +432,35 @@ export declare type Customizations = {
433
432
  logoHeight: string;
434
433
  borderBottom: string;
435
434
  };
435
+ VideoDetail: {
436
+ Banner: {
437
+ title: {
438
+ fontSize: string;
439
+ marginTop: number | string;
440
+ width: string;
441
+ };
442
+ overlays: {
443
+ left: {
444
+ width: string;
445
+ backgroundImage: string;
446
+ };
447
+ bottom: {
448
+ backgroundImage: string;
449
+ };
450
+ };
451
+ };
452
+ TagsRow: {
453
+ /**
454
+ * Tags of this tag type is shown in tags row on video detail screen.
455
+ * The same config is used for SplitBanner.
456
+ */
457
+ tagTypeId: string;
458
+ /**
459
+ * Row title
460
+ */
461
+ title: string;
462
+ };
463
+ };
436
464
  Input: InputOptions;
437
465
  landing: {
438
466
  row: {
@@ -526,6 +554,22 @@ export declare type DocumentOptions = Partial<{
526
554
  subscribeOnChanges: boolean;
527
555
  }>;
528
556
 
557
+ /**
558
+ * @public
559
+ */
560
+ export declare interface Duration {
561
+ units: DurationUnits;
562
+ value: number;
563
+ }
564
+
565
+ /**
566
+ * @public
567
+ */
568
+ export declare enum DurationUnits {
569
+ DAY = "day",
570
+ MONTH = "month"
571
+ }
572
+
529
573
  /**
530
574
  * @public
531
575
  */
@@ -578,6 +622,28 @@ export declare interface GenericOnCallError {
578
622
  */
579
623
  export declare const getPubSub: () => PubSub;
580
624
 
625
+ /**
626
+ * @public
627
+ */
628
+ export declare type GetPurchasableMonetizationsOptions = {
629
+ includeMonetizationsWithPurchaseDisabled: boolean;
630
+ };
631
+
632
+ /**
633
+ * Response from Tivio getPurchaseInfo HTTP endpoint.
634
+ *
635
+ * @public
636
+ */
637
+ export declare type GetPurchaseInfoResponse = {
638
+ monetizationId: string;
639
+ monetization: PurchaseMonetization;
640
+ status: PurchaseStatus;
641
+ video?: {
642
+ id: string;
643
+ name: string | Translation;
644
+ };
645
+ };
646
+
581
647
  /**
582
648
  * @public
583
649
  */
@@ -688,6 +754,11 @@ declare interface IntroMarker {
688
754
  skip: () => void;
689
755
  }
690
756
 
757
+ /**
758
+ * @public
759
+ */
760
+ export declare type ItemComponent = RowItemComponent | BannerItemComponent;
761
+
691
762
  /**
692
763
  * @public
693
764
  */
@@ -724,7 +795,8 @@ export declare enum LangCode {
724
795
  PL = "pl",
725
796
  PT = "pt",
726
797
  SK = "sk",
727
- ES = "es"
798
+ ES = "es",
799
+ HU = "hu"
728
800
  }
729
801
 
730
802
  /**
@@ -775,6 +847,20 @@ export declare type LiveTvChannelSource = SourceBase & {
775
847
  channelName: string;
776
848
  };
777
849
 
850
+ /**
851
+ * @public
852
+ */
853
+ export declare type LocationField = {
854
+ /**
855
+ * Two-letter uppercase continent code (TODO not sure if this ISO-3166 format or something else, we get these from maxmind service)
856
+ */
857
+ continentCode?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA';
858
+ /**
859
+ * Two-letter uppercase country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
860
+ */
861
+ countryIsoCode?: string;
862
+ };
863
+
778
864
  declare interface Logger {
779
865
  /** important messages */
780
866
  warn(...data: LoggerArgs): void;
@@ -830,14 +916,9 @@ export declare interface MigratedVideoExternals {
830
916
  */
831
917
  export declare interface Monetization {
832
918
  id: string;
833
- price?: string | number;
834
919
  type?: MonetizationType;
835
- frequency?: MONETIZATION_FREQUENCY;
836
- isPurchased?: boolean;
837
920
  name?: string;
838
921
  description?: string;
839
- benefits?: Translation[];
840
- localizedBenefits?: string[];
841
922
  }
842
923
 
843
924
  /**
@@ -848,9 +929,49 @@ export declare enum MONETIZATION_FREQUENCY {
848
929
  DAILY = "DAILY",
849
930
  WEEKLY = "WEEKLY",
850
931
  MONTHLY = "MONTHLY",
932
+ HALF_ANNUALLY = "HALF_ANNUALLY",
851
933
  ANNUALLY = "ANNUALLY"
852
934
  }
853
935
 
936
+ /**
937
+ * @public
938
+ */
939
+ export declare interface MonetizationCardProps {
940
+ subscription: PurchasableMonetization;
941
+ onClick: (subscription: PurchasableMonetization) => void;
942
+ buttonLabel: string;
943
+ purchased: boolean;
944
+ focused?: boolean;
945
+ }
946
+
947
+ /**
948
+ * @public
949
+ */
950
+ export declare interface MonetizationsSelectOverlayData {
951
+ subscriptions?: PurchasableMonetization[];
952
+ /**
953
+ * Item from which monetization select was opened.
954
+ * Note: does not necessarily mean that result purchase will be transaction.
955
+ */
956
+ item?: Video | TvChannel;
957
+ /**
958
+ * If set to true, user is buying voucher.
959
+ * Otherwise, user is making a purchase for himself.
960
+ */
961
+ voucherPurchase?: boolean;
962
+ onPurchase?: () => void;
963
+ onClose?: () => void;
964
+ }
965
+
966
+ /**
967
+ * @public
968
+ */
969
+ export declare type MonetizationsSelectOverlayState = {
970
+ data: MonetizationsSelectOverlayData | null;
971
+ closeMonetizationsSelectOverlay: () => void;
972
+ openMonetizationsSelectOverlay: (data: MonetizationsSelectOverlayData) => void;
973
+ };
974
+
854
975
  /**
855
976
  * @public
856
977
  * @TODO change to enum
@@ -907,6 +1028,13 @@ export declare interface OrderBy {
907
1028
  directionStr?: OrderByDirection;
908
1029
  }
909
1030
 
1031
+ /**
1032
+ * The same as WhereFilter, but in array, for easier usage.
1033
+ * Format: [field, directionStr] or [field]
1034
+ * @public
1035
+ */
1036
+ export declare type OrderByArray = [string, OrderByDirection] | [string];
1037
+
910
1038
  declare type OrderByDirection = 'desc' | 'asc';
911
1039
 
912
1040
  /**
@@ -1197,6 +1325,14 @@ export declare enum PlayerWrapperEventType {
1197
1325
  */
1198
1326
  export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
1199
1327
 
1328
+ /**
1329
+ * @public
1330
+ */
1331
+ export declare interface Promotion {
1332
+ duration?: Duration;
1333
+ price?: number;
1334
+ }
1335
+
1200
1336
  /**
1201
1337
  * @public
1202
1338
  */
@@ -1205,6 +1341,43 @@ export declare interface PubSub {
1205
1341
  subscribe: <K extends keyof Events>(triggerName: K, onMessage: (data: Events[K]) => Empty) => Disposer;
1206
1342
  }
1207
1343
 
1344
+ /**
1345
+ * @public
1346
+ */
1347
+ export declare interface PurchasableMonetization extends Monetization {
1348
+ /**
1349
+ * Price before any discounts (e.g. promotions).
1350
+ */
1351
+ originalPrice: number;
1352
+ /**
1353
+ * Final price (after discounts).
1354
+ */
1355
+ price?: string | number;
1356
+ promotion: Promotion | null;
1357
+ frequency?: MONETIZATION_FREQUENCY;
1358
+ /**
1359
+ * Returns TRUE if subscription is purchased (and not expired) by user.
1360
+ * Returns TRUE if transaction is purchased (and not expired) for transactionItemId.
1361
+ * Returns FALSE otherwise.
1362
+ *
1363
+ * @param transactionItemId id of item for which transaction purchase is checked
1364
+ * @param transactionField type of item (video or tvChannel)
1365
+ */
1366
+ isPurchased(transactionItemId?: string, transactionField?: 'videoId' | 'tvChannelId'): boolean;
1367
+ benefits?: Translation[];
1368
+ localizedBenefits?: string[];
1369
+ /**
1370
+ * Set to true for subscriptions which is not possible to buy - typically for historical subscriptions which users
1371
+ * still have bought but can't be purchased anymore.
1372
+ */
1373
+ purchaseDisabled?: boolean;
1374
+ /**
1375
+ * When set to true, users can buy this monetization as a voucher (e.g. to send it as a gift to a friend).
1376
+ * If not set or set to false, users cannot buy it as a voucher.
1377
+ */
1378
+ isPurchasableAsVoucher?: boolean;
1379
+ }
1380
+
1208
1381
  /**
1209
1382
  * @public
1210
1383
  */
@@ -1236,6 +1409,135 @@ export declare type Purchase = {
1236
1409
  voucherId?: string;
1237
1410
  };
1238
1411
 
1412
+ /**
1413
+ * @public
1414
+ */
1415
+ export declare enum PurchaseDocumentGateway {
1416
+ 'qerko' = "qerko",
1417
+ 'oktagon' = "oktagon",
1418
+ 'voucher' = "voucher",
1419
+ 'comgate' = "comgate"
1420
+ }
1421
+
1422
+ /**
1423
+ * Payload which is sent to organization's webhook (if provided). It is send only when purchase status changes to PAID,
1424
+ * it means that it is send also when user applies the voucher.
1425
+ *
1426
+ * @public
1427
+ */
1428
+ export declare type PurchaseEndpointPayload = {
1429
+ /**
1430
+ * Information about the purchase which changes status to PAID.
1431
+ */
1432
+ purchase: {
1433
+ /**
1434
+ * Two-letter upper-case continent code.
1435
+ */
1436
+ continentCode?: LocationField['continentCode'];
1437
+ /**
1438
+ * Two-letter upper-case country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
1439
+ */
1440
+ countryIsoCode?: LocationField['countryIsoCode'];
1441
+ /**
1442
+ * Gateway name or "voucher".
1443
+ */
1444
+ gateway: PurchaseDocumentGateway;
1445
+ /**
1446
+ * Tivio ID of the purchase.
1447
+ */
1448
+ id: string;
1449
+ /**
1450
+ * Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
1451
+ */
1452
+ updated: number;
1453
+ /**
1454
+ * True if delayed payment is confirmed but not charged yet, undefined in all other cases.
1455
+ */
1456
+ isDelayedPayment?: boolean;
1457
+ };
1458
+ /**
1459
+ * Information about the monetization which has been bought by this purchase. Monetization definition may change in time so information provided here
1460
+ * reflects monetization definition in time of the purchase.
1461
+ */
1462
+ monetization: {
1463
+ /**
1464
+ * Currency in which the purchase has been made. Three upper-case letters according to ISO-4217.
1465
+ */
1466
+ currency?: Currency;
1467
+ /**
1468
+ * Frequency in which the user will be charged.
1469
+ */
1470
+ frequency?: MONETIZATION_FREQUENCY | null;
1471
+ /**
1472
+ * Tivio ID of the monetization.
1473
+ */
1474
+ id: string;
1475
+ /**
1476
+ * Price of the purchase.
1477
+ */
1478
+ price?: number;
1479
+ /**
1480
+ * Name of the monetization.
1481
+ */
1482
+ title?: string;
1483
+ /**
1484
+ * Type of the monetization ("transaction" or "subscription").
1485
+ */
1486
+ type: MonetizationType;
1487
+ };
1488
+ /**
1489
+ * Information about the video which has been bought by this purchase. Provided only for transaction purchases.
1490
+ */
1491
+ video?: {
1492
+ /**
1493
+ * Tivio ID of the video.
1494
+ */
1495
+ id: string;
1496
+ /**
1497
+ * Name of the video.
1498
+ */
1499
+ name: string | Translation;
1500
+ };
1501
+ /**
1502
+ * Information about the user who made this purchase.
1503
+ */
1504
+ user: {
1505
+ /**
1506
+ * User's e-mail.
1507
+ */
1508
+ email: string;
1509
+ /**
1510
+ * External ID of the user.
1511
+ */
1512
+ externalUserId: string;
1513
+ /**
1514
+ * Tivio ID of the user.
1515
+ */
1516
+ id: string;
1517
+ /**
1518
+ * User's name.
1519
+ */
1520
+ name: string;
1521
+ };
1522
+ /**
1523
+ * Information about the voucher. Provided only when purchase is purchase (not application) of the voucher.
1524
+ */
1525
+ voucher?: {
1526
+ /**
1527
+ * Voucher code.
1528
+ */
1529
+ code: string;
1530
+ /**
1531
+ * Voucher expiration timestamp.
1532
+ */
1533
+ expiration: number;
1534
+ /**
1535
+ * Duration (in seconds) after which purchase is considered expired. If undefined, monetization's duration is used.
1536
+ */
1537
+ purchaseDuration?: number;
1538
+ };
1539
+ };
1540
+
1239
1541
  /**
1240
1542
  * @public
1241
1543
  */
@@ -1289,8 +1591,13 @@ export declare interface QerkoCancellationInfo {
1289
1591
  * @public
1290
1592
  */
1291
1593
  export declare interface QerkoData {
1292
- monetization: Monetization;
1594
+ monetization: PurchasableMonetization;
1293
1595
  item?: Video | TvChannel;
1596
+ /**
1597
+ * If set to true, user is buying voucher.
1598
+ * Otherwise, user is making a purchase for himself.
1599
+ */
1600
+ voucherPurchase?: boolean;
1294
1601
  onPurchase?: () => void;
1295
1602
  onClose?: () => void;
1296
1603
  }
@@ -1299,8 +1606,14 @@ export declare interface QerkoData {
1299
1606
  * @public
1300
1607
  */
1301
1608
  export declare interface QerkoOverlayState {
1609
+ isOpen: boolean;
1302
1610
  data: QerkoData | null;
1303
- openQerkoOverlay: ((data: QerkoData) => void);
1611
+ /**
1612
+ * Prepares data for
1613
+ * Use this in case when you need to split actions
1614
+ */
1615
+ setData: (data: QerkoData) => void;
1616
+ openQerkoOverlay: (data?: QerkoData) => void;
1304
1617
  closeQerkoOverlay: () => void;
1305
1618
  }
1306
1619
 
@@ -1387,13 +1700,14 @@ export declare type RequiredNullable<T> = {
1387
1700
  * @public
1388
1701
  */
1389
1702
  export declare interface RouterOverrides {
1390
- goToVideoDetailPage: (videoId: string) => void;
1703
+ goToVideoDetailPage: (videoIdOrUrlName: string) => void;
1391
1704
  goToSeriesDetailPage: (tagId: string) => void;
1392
1705
  goToTagPage: (tagId: string) => void;
1393
- goToLoginScreen: () => void;
1706
+ goToLoginPage: () => void;
1707
+ goToRegistrationPage: () => void;
1394
1708
  goBack: () => void;
1395
- goLivePlayer: (videoId: string) => void;
1396
- goVodPlayer: (tvChannelId: string) => void;
1709
+ goLivePlayer: (tvChannelId: string) => void;
1710
+ goVodPlayer: (videoIdOrUrlName: string) => void;
1397
1711
  goToHome: () => void;
1398
1712
  }
1399
1713
 
@@ -1407,17 +1721,7 @@ export declare interface RouterOverridesContextState {
1407
1721
  /**
1408
1722
  * @public
1409
1723
  */
1410
- export declare interface Row {
1411
- id: string;
1412
- rowId: string;
1413
- name: string;
1414
- description?: string;
1415
- itemComponent: RowItemComponent;
1416
- rowComponent: RowComponent;
1417
- assets: Assets;
1418
- type: ScreenRowType;
1419
- isLiveRow: boolean;
1420
- }
1724
+ export declare type Row = RowStandard | RowBanner;
1421
1725
 
1422
1726
  /**
1423
1727
  * @public
@@ -1428,6 +1732,27 @@ export declare enum ROW_ITEM_TYPES {
1428
1732
  TV_CHANNEL = "TV_CHANNEL"
1429
1733
  }
1430
1734
 
1735
+ /**
1736
+ * @private
1737
+ */
1738
+ export declare interface RowBanner extends RowBase {
1739
+ rowComponent: RowComponent.BANNER;
1740
+ itemComponent: BannerItemComponent;
1741
+ }
1742
+
1743
+ /**
1744
+ * @private
1745
+ */
1746
+ declare interface RowBase {
1747
+ id: string;
1748
+ rowId: string;
1749
+ name: string;
1750
+ description?: string;
1751
+ assets: Assets;
1752
+ type: ScreenRowType;
1753
+ isLiveRow: boolean;
1754
+ }
1755
+
1431
1756
  /**
1432
1757
  * @public
1433
1758
  */
@@ -1440,6 +1765,7 @@ export declare enum RowComponent {
1440
1765
  * @public
1441
1766
  */
1442
1767
  export declare interface RowItem extends RowItemAssets {
1768
+ created?: Date;
1443
1769
  itemType: ROW_ITEM_TYPES;
1444
1770
  name?: string;
1445
1771
  description?: string;
@@ -1480,6 +1806,14 @@ export declare type RowItemsSubscription = (rowId: string, cb: (error: Error | n
1480
1806
  hasNextPage: boolean;
1481
1807
  } | null, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => Disposer_2;
1482
1808
 
1809
+ /**
1810
+ * @private
1811
+ */
1812
+ export declare interface RowStandard extends RowBase {
1813
+ rowComponent: RowComponent.ROW;
1814
+ itemComponent: RowItemComponent;
1815
+ }
1816
+
1483
1817
  /**
1484
1818
  * @public
1485
1819
  */
@@ -1567,6 +1901,12 @@ export declare interface Section {
1567
1901
  videos: Video[];
1568
1902
  }
1569
1903
 
1904
+ export declare enum SemanticDate {
1905
+ YESTERDAY = "Yesterday",
1906
+ TODAY = "Today",
1907
+ TOMORROW = "Tomorrow"
1908
+ }
1909
+
1570
1910
  /**
1571
1911
  * Used for entities, that can be global (e.g. asset presets, tag types).
1572
1912
  * Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
@@ -1686,17 +2026,6 @@ export declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOption
1686
2026
  where?: WhereFilter[];
1687
2027
  };
1688
2028
 
1689
- /**
1690
- * @public
1691
- */
1692
- export declare interface SubscriptionCardProps {
1693
- subscription: Monetization;
1694
- onClick: (subscription: Monetization) => void;
1695
- buttonLabel: string;
1696
- purchased: boolean;
1697
- focused?: boolean;
1698
- }
1699
-
1700
2029
  declare type SubscriptionInfo = {
1701
2030
  type: 'subscription';
1702
2031
  name: string;
@@ -1704,24 +2033,6 @@ declare type SubscriptionInfo = {
1704
2033
  frequency: string;
1705
2034
  };
1706
2035
 
1707
- /**
1708
- * @public
1709
- */
1710
- export declare interface SubscriptionOverlayData {
1711
- subscriptions?: Monetization[];
1712
- onPurchase?: () => void;
1713
- onClose?: () => void;
1714
- }
1715
-
1716
- /**
1717
- * @public
1718
- */
1719
- export declare type SubscriptionOverlayState = {
1720
- data: SubscriptionOverlayData | null;
1721
- closeSubscriptionOverlay: () => void;
1722
- openSubscriptionOverlay: (data: SubscriptionOverlayData) => void;
1723
- };
1724
-
1725
2036
  /**
1726
2037
  * @public
1727
2038
  */
@@ -1736,6 +2047,7 @@ export declare interface Tag extends RowItem {
1736
2047
  isFavorite: boolean;
1737
2048
  addToFavorites: () => void;
1738
2049
  removeFromFavorites: () => void;
2050
+ cover: string;
1739
2051
  }
1740
2052
 
1741
2053
  /**
@@ -1753,6 +2065,9 @@ export declare type TileOptions = {
1753
2065
  * This property is ignored for CIRCLED tiles, they always have border-radius: 50%;
1754
2066
  */
1755
2067
  borderRadius: string | number;
2068
+ innerContainer: {
2069
+ margin: string;
2070
+ };
1756
2071
  innerLabel: {
1757
2072
  /**
1758
2073
  * Font size in px
@@ -1770,6 +2085,12 @@ export declare type TileOptions = {
1770
2085
  sizes: {
1771
2086
  [variant in TileSizeVariant]: TileSizesMap;
1772
2087
  };
2088
+ badge: {
2089
+ /**
2090
+ * Font size in px
2091
+ */
2092
+ fontSize: number;
2093
+ };
1773
2094
  };
1774
2095
 
1775
2096
  /**
@@ -1779,6 +2100,7 @@ export declare type TileProps = {
1779
2100
  cover: string;
1780
2101
  bottomLabel: string;
1781
2102
  bottomLabelAreaHeight: number;
2103
+ bottomLabelTextLinesCount: number;
1782
2104
  innerLabel: string;
1783
2105
  duration: string;
1784
2106
  price: string | null;
@@ -1797,6 +2119,7 @@ export declare type TileProps = {
1797
2119
  * Now used for backward compatibility for WebTileGrid. Consider to use it other way.
1798
2120
  */
1799
2121
  containerMargin?: number | string;
2122
+ created?: Date;
1800
2123
  };
1801
2124
 
1802
2125
  /**
@@ -1813,7 +2136,11 @@ export declare type TileSizes = {
1813
2136
  coverWidth: number;
1814
2137
  coverHeight: number;
1815
2138
  cellPaddingRight: number;
1816
- labelHeight: number;
2139
+ /**
2140
+ * Count of lines of label text.
2141
+ * Now only bottom label supports multiline text.
2142
+ */
2143
+ labelLinesCount: number;
1817
2144
  };
1818
2145
 
1819
2146
  /**
@@ -1847,6 +2174,7 @@ export declare interface TivioAuth {
1847
2174
  * @param password
1848
2175
  */
1849
2176
  signInWithEmailAndPassword: (email: string, password: string) => Promise<string | null>;
2177
+ signInWithCustomToken: (token: string) => Promise<string | null>;
1850
2178
  signOut: () => Promise<void>;
1851
2179
  /**
1852
2180
  * Used for reset forgotten password by user
@@ -2033,12 +2361,12 @@ export declare type TivioInternalBundle = {
2033
2361
  * @public
2034
2362
  */
2035
2363
  export declare type TivioInternalComponents = {
2036
- PrimaryButton: React_2.ComponentType;
2364
+ PrimaryButton: React_2.ComponentType<any>;
2037
2365
  WebLandingScreen: React_2.ComponentType<{
2038
2366
  logo?: string;
2039
2367
  }>;
2040
2368
  WebVideoScreen: React_2.ComponentType<{
2041
- videoId: string;
2369
+ videoIdOrUrlName: string;
2042
2370
  }>;
2043
2371
  WebSeriesDetailScreen: React_2.ComponentType<WebSeriesDetailScreenProps>;
2044
2372
  };
@@ -2047,25 +2375,35 @@ export declare type TivioInternalComponents = {
2047
2375
  * @public
2048
2376
  */
2049
2377
  export declare type TivioInternalHooks = {
2050
- useAuthOverlay: () => AuthOverlayState;
2051
- useSubscriptionsOverlay: () => SubscriptionOverlayState;
2378
+ useMonetizationsSelectOverlay: () => MonetizationsSelectOverlayState;
2052
2379
  useQerkoOverlay: () => QerkoOverlayState;
2053
2380
  usePurchasesWithVideos: () => {
2054
2381
  purchases: Purchase[];
2055
2382
  };
2056
- useOrganizationSubscriptions: () => {
2057
- subscriptions: Monetization[];
2383
+ useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
2384
+ subscriptions: PurchasableMonetization[];
2058
2385
  };
2059
2386
  useIsMonetizationPurchased: () => {
2060
2387
  isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
2061
2388
  };
2062
- useReferralInfo: any;
2389
+ useReferralInfo: (referralToken: string) => ({
2390
+ data: {
2391
+ email: string;
2392
+ externalUserId: string;
2393
+ promotionId?: string;
2394
+ referralId: string;
2395
+ promotion?: any;
2396
+ };
2397
+ error: Error | null;
2398
+ loading: boolean;
2399
+ });
2063
2400
  useTvChannel: UseTvChannel;
2064
2401
  useChannelSource: UseChannelSource;
2065
2402
  useUser: () => {
2066
2403
  user: User | null;
2067
2404
  error: string | null;
2068
2405
  isInitialized: boolean;
2406
+ isSignedIn: boolean;
2069
2407
  };
2070
2408
  };
2071
2409
 
@@ -2074,7 +2412,6 @@ export declare type TivioInternalHooks = {
2074
2412
  */
2075
2413
  export declare type TivioInternalProviders = {
2076
2414
  AppThemeProvider: React_2.ComponentType;
2077
- AuthOverlayContextProvider: React_2.ComponentType;
2078
2415
  CustomerProvider: React_2.ComponentType<{
2079
2416
  customer: CUSTOMER_BUILD;
2080
2417
  platform: PLATFORM;
@@ -2082,9 +2419,12 @@ export declare type TivioInternalProviders = {
2082
2419
  }>;
2083
2420
  ConfigProvider: React_2.ComponentType;
2084
2421
  UserContextProvider: React_2.ComponentType;
2085
- SubscriptionOverlayContextProvider: React_2.ComponentType;
2422
+ MonetizationsSelectOverlayContextProvider: React_2.ComponentType;
2086
2423
  QerkoOverlayContextProvider: React_2.ComponentType;
2087
2424
  PurchasesWithVideosContextProvider: React_2.ComponentType;
2425
+ /**
2426
+ * @deprecated not used in our app, can be removed when no sdk in production uses it
2427
+ */
2088
2428
  OrganizationSubscriptionsContextProvider: React_2.ComponentType;
2089
2429
  RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
2090
2430
  };
@@ -2326,8 +2666,14 @@ export declare interface TvChannel extends RowItem {
2326
2666
  logo?: string;
2327
2667
  hls: string;
2328
2668
  dash: string;
2669
+ /**
2670
+ * Returns all transactions and subscriptions applied to this tv channel.
2671
+ * Transactions before subscriptions, sorted by price ascending.
2672
+ */
2673
+ getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
2329
2674
  purchasableMonetization: any | null;
2330
2675
  price: number;
2676
+ cover: string;
2331
2677
  }
2332
2678
 
2333
2679
  /**
@@ -2472,8 +2818,8 @@ export declare const useMarkers: () => Marker[] | null;
2472
2818
  /**
2473
2819
  * @public
2474
2820
  */
2475
- export declare const useOrganizationSubscriptions: () => {
2476
- subscriptions: Monetization[];
2821
+ export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean | undefined) => {
2822
+ subscriptions: PurchasableMonetization[];
2477
2823
  };
2478
2824
 
2479
2825
  /**
@@ -2647,14 +2993,15 @@ export declare const useUser: () => {
2647
2993
  user: User | null;
2648
2994
  error: string | null;
2649
2995
  isInitialized: boolean;
2996
+ isSignedIn: boolean;
2650
2997
  };
2651
2998
 
2652
2999
  /**
2653
3000
  * Use video
2654
- * @param videoId - video id
3001
+ * @param videoIdOrUrlName - video id or video nice url (e.g. some-interesting-video)
2655
3002
  * @public
2656
3003
  */
2657
- export declare const useVideo: (videoId?: string | undefined) => {
3004
+ export declare const useVideo: (videoIdOrUrlName?: string | undefined) => {
2658
3005
  data: Video | null;
2659
3006
  error: string | null;
2660
3007
  };
@@ -2716,7 +3063,10 @@ export declare enum VastProvider {
2716
3063
  MALL_TV_PREBID = "malltv-prebid",
2717
3064
  PRIMA = "prima",
2718
3065
  TEST = "test",
2719
- TEST_VPAID = "test-vpaid"
3066
+ TEST_VPAID = "test-vpaid",
3067
+ JOJ_TEST_AD_FORM_PROGRAMMATIC = "joj-test-ad-form-programmatic",
3068
+ JOJ_TEST_TESTER_VASTERIX = "joj-test-tester-vasterix",
3069
+ JOJ_TEST_TESTER_ADFORM_30 = "joj-test-tester-adform-30"
2720
3070
  }
2721
3071
 
2722
3072
  /**
@@ -2728,7 +3078,6 @@ export declare interface Video extends RowItem {
2728
3078
  * @deprecated use assets instead
2729
3079
  */
2730
3080
  cover: string | null;
2731
- created: Date;
2732
3081
  sectionId: string | null;
2733
3082
  channelId: string | null;
2734
3083
  /**
@@ -2740,14 +3089,19 @@ export declare interface Video extends RowItem {
2740
3089
  image: string | null;
2741
3090
  isPlayable: boolean;
2742
3091
  monetizations: Monetization[];
2743
- monetization: Monetization | undefined;
2744
- transactionId?: string;
2745
- transaction: Monetization | undefined;
2746
- subscriptions: Monetization[];
2747
- subscriptionIds: string[];
3092
+ /**
3093
+ * Returns all transactions and subscriptions applied to this video.
3094
+ * Transactions before subscriptions, sorted by price ascending.
3095
+ */
3096
+ getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
3097
+ purchasableMonetization: any | null;
3098
+ transaction: PurchasableMonetization | undefined;
3099
+ subscriptions: PurchasableMonetization[];
3100
+ sources?: any[];
2748
3101
  isPlaylist: boolean;
2749
3102
  name: string;
2750
- description?: string;
3103
+ urlNames?: string[];
3104
+ urlName?: string;
2751
3105
  price: number | null;
2752
3106
  detailedPrice: DetailedPrice | null;
2753
3107
  uri: string;
@@ -2758,7 +3112,6 @@ export declare interface Video extends RowItem {
2758
3112
  detailBanner?: string;
2759
3113
  linkedVideosRaw: any[];
2760
3114
  linkedVideos: LinkedVideo[];
2761
- purchasableMonetization: any | null;
2762
3115
  contentType: VideoContentType | null;
2763
3116
  year?: number;
2764
3117
  episodeNumber?: number;
@@ -2815,6 +3168,14 @@ export declare enum VideoType {
2815
3168
  * Video is a standard single video.
2816
3169
  */
2817
3170
  VIDEO = "VIDEO",
3171
+ /**
3172
+ * Part of video original video like CUT.
3173
+ */
3174
+ CUT = "CUT",
3175
+ /**
3176
+ * Part of video original video like TRAILER.
3177
+ */
3178
+ TRAILER = "TRAILER",
2818
3179
  TV_PROGRAM = "TV_PROGRAM",
2819
3180
  /**
2820
3181
  * Video object represents whole series, e.g. tv show.
@@ -2822,6 +3183,13 @@ export declare enum VideoType {
2822
3183
  SERIES = "SERIES"
2823
3184
  }
2824
3185
 
3186
+ /**
3187
+ * @public
3188
+ */
3189
+ export declare type VideoUrlName = {
3190
+ [key in LangCode]?: string[];
3191
+ };
3192
+
2825
3193
  /**
2826
3194
  * @public
2827
3195
  */
@@ -2947,6 +3315,13 @@ export declare interface WhereFilter {
2947
3315
  value: any;
2948
3316
  }
2949
3317
 
3318
+ /**
3319
+ * The same as WhereFilter, but in array, for easier usage.
3320
+ * Format: [field, operator, value]
3321
+ * @public
3322
+ */
3323
+ export declare type WhereFilterArray = [string, WhereFilterOp, any];
3324
+
2950
3325
  declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
2951
3326
 
2952
3327
  /**