@tivio/sdk-react 4.2.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -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
  */
@@ -355,6 +337,7 @@ export declare type CreateUserWithEmailAndPassword = (email: string, password: s
355
337
  export declare const CURRENCIES: string[];
356
338
 
357
339
  /**
340
+ * Three upper-case letters according to ISO-4217.
358
341
  * @public
359
342
  */
360
343
  export declare type Currency = 'CZK' | 'EUR' | 'USD';
@@ -425,6 +408,22 @@ export declare type DocumentOptions = Partial<{
425
408
  subscribeOnChanges: boolean;
426
409
  }>;
427
410
 
411
+ /**
412
+ * @public
413
+ */
414
+ export declare interface Duration {
415
+ units: DurationUnits;
416
+ value: number;
417
+ }
418
+
419
+ /**
420
+ * @public
421
+ */
422
+ export declare enum DurationUnits {
423
+ DAY = "day",
424
+ MONTH = "month"
425
+ }
426
+
428
427
  /**
429
428
  * @public
430
429
  */
@@ -477,6 +476,28 @@ export declare interface GenericOnCallError {
477
476
  */
478
477
  export declare const getPubSub: () => PubSub;
479
478
 
479
+ /**
480
+ * @public
481
+ */
482
+ export declare type GetPurchasableMonetizationsOptions = {
483
+ includeMonetizationsWithPurchaseDisabled: boolean;
484
+ };
485
+
486
+ /**
487
+ * Response from Tivio getPurchaseInfo HTTP endpoint.
488
+ *
489
+ * @public
490
+ */
491
+ export declare type GetPurchaseInfoResponse = {
492
+ monetizationId: string;
493
+ monetization: PurchaseMonetization;
494
+ status: PurchaseStatus;
495
+ video?: {
496
+ id: string;
497
+ name: string | Translation;
498
+ };
499
+ };
500
+
480
501
  /**
481
502
  * @public
482
503
  */
@@ -580,6 +601,11 @@ declare interface IntroMarker {
580
601
  skip: () => void;
581
602
  }
582
603
 
604
+ /**
605
+ * @public
606
+ */
607
+ export declare type ItemComponent = RowItemComponent | BannerItemComponent;
608
+
583
609
  /**
584
610
  * @public
585
611
  */
@@ -616,7 +642,8 @@ export declare enum LangCode {
616
642
  PL = "pl",
617
643
  PT = "pt",
618
644
  SK = "sk",
619
- ES = "es"
645
+ ES = "es",
646
+ HU = "hu"
620
647
  }
621
648
 
622
649
  /**
@@ -667,6 +694,20 @@ export declare type LiveTvChannelSource = SourceBase & {
667
694
  channelName: string;
668
695
  };
669
696
 
697
+ /**
698
+ * @public
699
+ */
700
+ export declare type LocationField = {
701
+ /**
702
+ * Two-letter uppercase continent code (TODO not sure if this ISO-3166 format or something else, we get these from maxmind service)
703
+ */
704
+ continentCode?: 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA';
705
+ /**
706
+ * Two-letter uppercase country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
707
+ */
708
+ countryIsoCode?: string;
709
+ };
710
+
670
711
  declare interface Logger {
671
712
  /** important messages */
672
713
  warn(...data: LoggerArgs): void;
@@ -722,14 +763,9 @@ export declare interface MigratedVideoExternals {
722
763
  */
723
764
  export declare interface Monetization {
724
765
  id: string;
725
- price?: string | number;
726
766
  type?: MonetizationType;
727
- frequency?: MONETIZATION_FREQUENCY;
728
- isPurchased?: boolean;
729
767
  name?: string;
730
768
  description?: string;
731
- benefits?: Translation[];
732
- localizedBenefits?: string[];
733
769
  }
734
770
 
735
771
  /**
@@ -740,9 +776,49 @@ export declare enum MONETIZATION_FREQUENCY {
740
776
  DAILY = "DAILY",
741
777
  WEEKLY = "WEEKLY",
742
778
  MONTHLY = "MONTHLY",
779
+ HALF_ANNUALLY = "HALF_ANNUALLY",
743
780
  ANNUALLY = "ANNUALLY"
744
781
  }
745
782
 
783
+ /**
784
+ * @public
785
+ */
786
+ export declare interface MonetizationCardProps {
787
+ subscription: PurchasableMonetization;
788
+ onClick: (subscription: PurchasableMonetization) => void;
789
+ buttonLabel: string;
790
+ purchased: boolean;
791
+ focused?: boolean;
792
+ }
793
+
794
+ /**
795
+ * @public
796
+ */
797
+ export declare interface MonetizationsSelectOverlayData {
798
+ subscriptions?: PurchasableMonetization[];
799
+ /**
800
+ * Item from which monetization select was opened.
801
+ * Note: does not necessarily mean that result purchase will be transaction.
802
+ */
803
+ item?: Video | TvChannel;
804
+ /**
805
+ * If set to true, user is buying voucher.
806
+ * Otherwise, user is making a purchase for himself.
807
+ */
808
+ voucherPurchase?: boolean;
809
+ onPurchase?: () => void;
810
+ onClose?: () => void;
811
+ }
812
+
813
+ /**
814
+ * @public
815
+ */
816
+ export declare type MonetizationsSelectOverlayState = {
817
+ data: MonetizationsSelectOverlayData | null;
818
+ closeMonetizationsSelectOverlay: () => void;
819
+ openMonetizationsSelectOverlay: (data: MonetizationsSelectOverlayData) => void;
820
+ };
821
+
746
822
  /**
747
823
  * @public
748
824
  * @TODO change to enum
@@ -789,6 +865,13 @@ export declare interface OrderBy {
789
865
  directionStr?: OrderByDirection;
790
866
  }
791
867
 
868
+ /**
869
+ * The same as WhereFilter, but in array, for easier usage.
870
+ * Format: [field, directionStr] or [field]
871
+ * @public
872
+ */
873
+ export declare type OrderByArray = [string, OrderByDirection] | [string];
874
+
792
875
  declare type OrderByDirection = 'desc' | 'asc';
793
876
 
794
877
  /**
@@ -1079,6 +1162,14 @@ export declare enum PlayerWrapperEventType {
1079
1162
  */
1080
1163
  export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
1081
1164
 
1165
+ /**
1166
+ * @public
1167
+ */
1168
+ export declare interface Promotion {
1169
+ duration?: Duration;
1170
+ price?: number;
1171
+ }
1172
+
1082
1173
  /**
1083
1174
  * @public
1084
1175
  */
@@ -1087,6 +1178,43 @@ export declare interface PubSub {
1087
1178
  subscribe: <K extends keyof Events>(triggerName: K, onMessage: (data: Events[K]) => Empty) => Disposer;
1088
1179
  }
1089
1180
 
1181
+ /**
1182
+ * @public
1183
+ */
1184
+ export declare interface PurchasableMonetization extends Monetization {
1185
+ /**
1186
+ * Price before any discounts (e.g. promotions).
1187
+ */
1188
+ originalPrice: number;
1189
+ /**
1190
+ * Final price (after discounts).
1191
+ */
1192
+ price?: string | number;
1193
+ promotion: Promotion | null;
1194
+ frequency?: MONETIZATION_FREQUENCY;
1195
+ /**
1196
+ * Returns TRUE if subscription is purchased (and not expired) by user.
1197
+ * Returns TRUE if transaction is purchased (and not expired) for transactionItemId.
1198
+ * Returns FALSE otherwise.
1199
+ *
1200
+ * @param transactionItemId id of item for which transaction purchase is checked
1201
+ * @param transactionField type of item (video or tvChannel)
1202
+ */
1203
+ isPurchased(transactionItemId?: string, transactionField?: 'videoId' | 'tvChannelId'): boolean;
1204
+ benefits?: Translation[];
1205
+ localizedBenefits?: string[];
1206
+ /**
1207
+ * Set to true for subscriptions which is not possible to buy - typically for historical subscriptions which users
1208
+ * still have bought but can't be purchased anymore.
1209
+ */
1210
+ purchaseDisabled?: boolean;
1211
+ /**
1212
+ * When set to true, users can buy this monetization as a voucher (e.g. to send it as a gift to a friend).
1213
+ * If not set or set to false, users cannot buy it as a voucher.
1214
+ */
1215
+ isPurchasableAsVoucher?: boolean;
1216
+ }
1217
+
1090
1218
  /**
1091
1219
  * @public
1092
1220
  */
@@ -1118,6 +1246,135 @@ export declare type Purchase = {
1118
1246
  voucherId?: string;
1119
1247
  };
1120
1248
 
1249
+ /**
1250
+ * @public
1251
+ */
1252
+ export declare enum PurchaseDocumentGateway {
1253
+ 'qerko' = "qerko",
1254
+ 'oktagon' = "oktagon",
1255
+ 'voucher' = "voucher",
1256
+ 'comgate' = "comgate"
1257
+ }
1258
+
1259
+ /**
1260
+ * Payload which is sent to organization's webhook (if provided). It is send only when purchase status changes to PAID,
1261
+ * it means that it is send also when user applies the voucher.
1262
+ *
1263
+ * @public
1264
+ */
1265
+ export declare type PurchaseEndpointPayload = {
1266
+ /**
1267
+ * Information about the purchase which changes status to PAID.
1268
+ */
1269
+ purchase: {
1270
+ /**
1271
+ * Two-letter upper-case continent code.
1272
+ */
1273
+ continentCode?: LocationField['continentCode'];
1274
+ /**
1275
+ * Two-letter upper-case country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
1276
+ */
1277
+ countryIsoCode?: LocationField['countryIsoCode'];
1278
+ /**
1279
+ * Gateway name or "voucher".
1280
+ */
1281
+ gateway: PurchaseDocumentGateway;
1282
+ /**
1283
+ * Tivio ID of the purchase.
1284
+ */
1285
+ id: string;
1286
+ /**
1287
+ * Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
1288
+ */
1289
+ updated: number;
1290
+ /**
1291
+ * True if delayed payment is confirmed but not charged yet, undefined in all other cases.
1292
+ */
1293
+ isDelayedPayment?: boolean;
1294
+ };
1295
+ /**
1296
+ * Information about the monetization which has been bought by this purchase. Monetization definition may change in time so information provided here
1297
+ * reflects monetization definition in time of the purchase.
1298
+ */
1299
+ monetization: {
1300
+ /**
1301
+ * Currency in which the purchase has been made. Three upper-case letters according to ISO-4217.
1302
+ */
1303
+ currency?: Currency;
1304
+ /**
1305
+ * Frequency in which the user will be charged.
1306
+ */
1307
+ frequency?: MONETIZATION_FREQUENCY | null;
1308
+ /**
1309
+ * Tivio ID of the monetization.
1310
+ */
1311
+ id: string;
1312
+ /**
1313
+ * Price of the purchase.
1314
+ */
1315
+ price?: number;
1316
+ /**
1317
+ * Name of the monetization.
1318
+ */
1319
+ title?: string;
1320
+ /**
1321
+ * Type of the monetization ("transaction" or "subscription").
1322
+ */
1323
+ type: MonetizationType;
1324
+ };
1325
+ /**
1326
+ * Information about the video which has been bought by this purchase. Provided only for transaction purchases.
1327
+ */
1328
+ video?: {
1329
+ /**
1330
+ * Tivio ID of the video.
1331
+ */
1332
+ id: string;
1333
+ /**
1334
+ * Name of the video.
1335
+ */
1336
+ name: string | Translation;
1337
+ };
1338
+ /**
1339
+ * Information about the user who made this purchase.
1340
+ */
1341
+ user: {
1342
+ /**
1343
+ * User's e-mail.
1344
+ */
1345
+ email: string;
1346
+ /**
1347
+ * External ID of the user.
1348
+ */
1349
+ externalUserId: string;
1350
+ /**
1351
+ * Tivio ID of the user.
1352
+ */
1353
+ id: string;
1354
+ /**
1355
+ * User's name.
1356
+ */
1357
+ name: string;
1358
+ };
1359
+ /**
1360
+ * Information about the voucher. Provided only when purchase is purchase (not application) of the voucher.
1361
+ */
1362
+ voucher?: {
1363
+ /**
1364
+ * Voucher code.
1365
+ */
1366
+ code: string;
1367
+ /**
1368
+ * Voucher expiration timestamp.
1369
+ */
1370
+ expiration: number;
1371
+ /**
1372
+ * Duration (in seconds) after which purchase is considered expired. If undefined, monetization's duration is used.
1373
+ */
1374
+ purchaseDuration?: number;
1375
+ };
1376
+ };
1377
+
1121
1378
  /**
1122
1379
  * @public
1123
1380
  */
@@ -1171,8 +1428,13 @@ export declare interface QerkoCancellationInfo {
1171
1428
  * @public
1172
1429
  */
1173
1430
  export declare interface QerkoData {
1174
- monetization: Monetization;
1431
+ monetization: PurchasableMonetization;
1175
1432
  item?: Video | TvChannel;
1433
+ /**
1434
+ * If set to true, user is buying voucher.
1435
+ * Otherwise, user is making a purchase for himself.
1436
+ */
1437
+ voucherPurchase?: boolean;
1176
1438
  onPurchase?: () => void;
1177
1439
  onClose?: () => void;
1178
1440
  }
@@ -1181,8 +1443,14 @@ export declare interface QerkoData {
1181
1443
  * @public
1182
1444
  */
1183
1445
  export declare interface QerkoOverlayState {
1446
+ isOpen: boolean;
1184
1447
  data: QerkoData | null;
1185
- openQerkoOverlay: ((data: QerkoData) => void);
1448
+ /**
1449
+ * Prepares data for
1450
+ * Use this in case when you need to split actions
1451
+ */
1452
+ setData: (data: QerkoData) => void;
1453
+ openQerkoOverlay: (data?: QerkoData) => void;
1186
1454
  closeQerkoOverlay: () => void;
1187
1455
  }
1188
1456
 
@@ -1260,13 +1528,14 @@ export declare type RemoteProviderProps = {
1260
1528
  * @public
1261
1529
  */
1262
1530
  export declare interface RouterOverrides {
1263
- goToVideoDetailPage: (videoId: string) => void;
1531
+ goToVideoDetailPage: (videoIdOrUrlName: string) => void;
1264
1532
  goToSeriesDetailPage: (tagId: string) => void;
1265
1533
  goToTagPage: (tagId: string) => void;
1266
- goToLoginScreen: () => void;
1534
+ goToLoginPage: () => void;
1535
+ goToRegistrationPage: () => void;
1267
1536
  goBack: () => void;
1268
- goLivePlayer: (videoId: string) => void;
1269
- goVodPlayer: (tvChannelId: string) => void;
1537
+ goLivePlayer: (tvChannelId: string) => void;
1538
+ goVodPlayer: (videoIdOrUrlName: string) => void;
1270
1539
  goToHome: () => void;
1271
1540
  }
1272
1541
 
@@ -1280,17 +1549,7 @@ export declare interface RouterOverridesContextState {
1280
1549
  /**
1281
1550
  * @public
1282
1551
  */
1283
- export declare interface Row {
1284
- id: string;
1285
- rowId: string;
1286
- name: string;
1287
- description?: string;
1288
- itemComponent: RowItemComponent;
1289
- rowComponent: RowComponent;
1290
- assets: Assets;
1291
- type: ScreenRowType;
1292
- isLiveRow: boolean;
1293
- }
1552
+ export declare type Row = RowStandard | RowBanner;
1294
1553
 
1295
1554
  /**
1296
1555
  * @public
@@ -1301,6 +1560,27 @@ export declare enum ROW_ITEM_TYPES {
1301
1560
  TV_CHANNEL = "TV_CHANNEL"
1302
1561
  }
1303
1562
 
1563
+ /**
1564
+ * @private
1565
+ */
1566
+ export declare interface RowBanner extends RowBase {
1567
+ rowComponent: RowComponent.BANNER;
1568
+ itemComponent: BannerItemComponent;
1569
+ }
1570
+
1571
+ /**
1572
+ * @private
1573
+ */
1574
+ declare interface RowBase {
1575
+ id: string;
1576
+ rowId: string;
1577
+ name: string;
1578
+ description?: string;
1579
+ assets: Assets;
1580
+ type: ScreenRowType;
1581
+ isLiveRow: boolean;
1582
+ }
1583
+
1304
1584
  /**
1305
1585
  * @public
1306
1586
  */
@@ -1313,6 +1593,7 @@ export declare enum RowComponent {
1313
1593
  * @public
1314
1594
  */
1315
1595
  export declare interface RowItem extends RowItemAssets {
1596
+ created?: Date;
1316
1597
  itemType: ROW_ITEM_TYPES;
1317
1598
  name?: string;
1318
1599
  description?: string;
@@ -1353,6 +1634,14 @@ export declare type RowItemsSubscription = (rowId: string, cb: (error: Error | n
1353
1634
  hasNextPage: boolean;
1354
1635
  } | null, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => Disposer_2;
1355
1636
 
1637
+ /**
1638
+ * @private
1639
+ */
1640
+ export declare interface RowStandard extends RowBase {
1641
+ rowComponent: RowComponent.ROW;
1642
+ itemComponent: RowItemComponent;
1643
+ }
1644
+
1356
1645
  /**
1357
1646
  * @public
1358
1647
  */
@@ -1440,6 +1729,12 @@ export declare interface Section {
1440
1729
  videos: Video[];
1441
1730
  }
1442
1731
 
1732
+ export declare enum SemanticDate {
1733
+ YESTERDAY = "Yesterday",
1734
+ TODAY = "Today",
1735
+ TOMORROW = "Tomorrow"
1736
+ }
1737
+
1443
1738
  /**
1444
1739
  * Used for entities, that can be global (e.g. asset presets, tag types).
1445
1740
  * Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
@@ -1559,17 +1854,6 @@ export declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOption
1559
1854
  where?: WhereFilter[];
1560
1855
  };
1561
1856
 
1562
- /**
1563
- * @public
1564
- */
1565
- export declare interface SubscriptionCardProps {
1566
- subscription: Monetization;
1567
- onClick: (subscription: Monetization) => void;
1568
- buttonLabel: string;
1569
- purchased: boolean;
1570
- focused?: boolean;
1571
- }
1572
-
1573
1857
  declare type SubscriptionInfo = {
1574
1858
  type: 'subscription';
1575
1859
  name: string;
@@ -1577,24 +1861,6 @@ declare type SubscriptionInfo = {
1577
1861
  frequency: string;
1578
1862
  };
1579
1863
 
1580
- /**
1581
- * @public
1582
- */
1583
- export declare interface SubscriptionOverlayData {
1584
- subscriptions?: Monetization[];
1585
- onPurchase?: () => void;
1586
- onClose?: () => void;
1587
- }
1588
-
1589
- /**
1590
- * @public
1591
- */
1592
- export declare type SubscriptionOverlayState = {
1593
- data: SubscriptionOverlayData | null;
1594
- closeSubscriptionOverlay: () => void;
1595
- openSubscriptionOverlay: (data: SubscriptionOverlayData) => void;
1596
- };
1597
-
1598
1864
  /**
1599
1865
  * @public
1600
1866
  */
@@ -1609,6 +1875,7 @@ export declare interface Tag extends RowItem {
1609
1875
  isFavorite: boolean;
1610
1876
  addToFavorites: () => void;
1611
1877
  removeFromFavorites: () => void;
1878
+ cover: string;
1612
1879
  }
1613
1880
 
1614
1881
  /**
@@ -1623,6 +1890,7 @@ export declare type TileProps = {
1623
1890
  cover: string;
1624
1891
  bottomLabel: string;
1625
1892
  bottomLabelAreaHeight: number;
1893
+ bottomLabelTextLinesCount: number;
1626
1894
  innerLabel: string;
1627
1895
  duration: string;
1628
1896
  price: string | null;
@@ -1641,6 +1909,7 @@ export declare type TileProps = {
1641
1909
  * Now used for backward compatibility for WebTileGrid. Consider to use it other way.
1642
1910
  */
1643
1911
  containerMargin?: number | string;
1912
+ created?: Date;
1644
1913
  };
1645
1914
 
1646
1915
  /**
@@ -1663,6 +1932,7 @@ export declare interface TivioAuth {
1663
1932
  * @param password
1664
1933
  */
1665
1934
  signInWithEmailAndPassword: (email: string, password: string) => Promise<string | null>;
1935
+ signInWithCustomToken: (token: string) => Promise<string | null>;
1666
1936
  signOut: () => Promise<void>;
1667
1937
  /**
1668
1938
  * Used for reset forgotten password by user
@@ -1849,12 +2119,12 @@ export declare type TivioInternalBundle = {
1849
2119
  * @public
1850
2120
  */
1851
2121
  export declare type TivioInternalComponents = {
1852
- PrimaryButton: React_2.ComponentType;
2122
+ PrimaryButton: React_2.ComponentType<any>;
1853
2123
  WebLandingScreen: React_2.ComponentType<{
1854
2124
  logo?: string;
1855
2125
  }>;
1856
2126
  WebVideoScreen: React_2.ComponentType<{
1857
- videoId: string;
2127
+ videoIdOrUrlName: string;
1858
2128
  }>;
1859
2129
  WebSeriesDetailScreen: React_2.ComponentType<WebSeriesDetailScreenProps>;
1860
2130
  };
@@ -1863,25 +2133,35 @@ export declare type TivioInternalComponents = {
1863
2133
  * @public
1864
2134
  */
1865
2135
  export declare type TivioInternalHooks = {
1866
- useAuthOverlay: () => AuthOverlayState;
1867
- useSubscriptionsOverlay: () => SubscriptionOverlayState;
2136
+ useMonetizationsSelectOverlay: () => MonetizationsSelectOverlayState;
1868
2137
  useQerkoOverlay: () => QerkoOverlayState;
1869
2138
  usePurchasesWithVideos: () => {
1870
2139
  purchases: Purchase[];
1871
2140
  };
1872
- useOrganizationSubscriptions: () => {
1873
- subscriptions: Monetization[];
2141
+ useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
2142
+ subscriptions: PurchasableMonetization[];
1874
2143
  };
1875
2144
  useIsMonetizationPurchased: () => {
1876
2145
  isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
1877
2146
  };
1878
- useReferralInfo: any;
2147
+ useReferralInfo: (referralToken: string) => ({
2148
+ data: {
2149
+ email: string;
2150
+ externalUserId: string;
2151
+ promotionId?: string;
2152
+ referralId: string;
2153
+ promotion?: any;
2154
+ };
2155
+ error: Error | null;
2156
+ loading: boolean;
2157
+ });
1879
2158
  useTvChannel: UseTvChannel;
1880
2159
  useChannelSource: UseChannelSource;
1881
2160
  useUser: () => {
1882
2161
  user: User | null;
1883
2162
  error: string | null;
1884
2163
  isInitialized: boolean;
2164
+ isSignedIn: boolean;
1885
2165
  };
1886
2166
  };
1887
2167
 
@@ -1890,7 +2170,6 @@ export declare type TivioInternalHooks = {
1890
2170
  */
1891
2171
  export declare type TivioInternalProviders = {
1892
2172
  AppThemeProvider: React_2.ComponentType;
1893
- AuthOverlayContextProvider: React_2.ComponentType;
1894
2173
  CustomerProvider: React_2.ComponentType<{
1895
2174
  customer: CUSTOMER_BUILD;
1896
2175
  platform: PLATFORM;
@@ -1898,9 +2177,12 @@ export declare type TivioInternalProviders = {
1898
2177
  }>;
1899
2178
  ConfigProvider: React_2.ComponentType;
1900
2179
  UserContextProvider: React_2.ComponentType;
1901
- SubscriptionOverlayContextProvider: React_2.ComponentType;
2180
+ MonetizationsSelectOverlayContextProvider: React_2.ComponentType;
1902
2181
  QerkoOverlayContextProvider: React_2.ComponentType;
1903
2182
  PurchasesWithVideosContextProvider: React_2.ComponentType;
2183
+ /**
2184
+ * @deprecated not used in our app, can be removed when no sdk in production uses it
2185
+ */
1904
2186
  OrganizationSubscriptionsContextProvider: React_2.ComponentType;
1905
2187
  RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
1906
2188
  };
@@ -2134,8 +2416,14 @@ export declare interface TvChannel extends RowItem {
2134
2416
  logo?: string;
2135
2417
  hls: string;
2136
2418
  dash: string;
2419
+ /**
2420
+ * Returns all transactions and subscriptions applied to this tv channel.
2421
+ * Transactions before subscriptions, sorted by price ascending.
2422
+ */
2423
+ getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
2137
2424
  purchasableMonetization: any | null;
2138
2425
  price: number;
2426
+ cover: string;
2139
2427
  }
2140
2428
 
2141
2429
  /**
@@ -2280,8 +2568,8 @@ export declare const useMarkers: () => Marker[] | null;
2280
2568
  /**
2281
2569
  * @public
2282
2570
  */
2283
- export declare const useOrganizationSubscriptions: () => {
2284
- subscriptions: Monetization[];
2571
+ export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean | undefined) => {
2572
+ subscriptions: PurchasableMonetization[];
2285
2573
  };
2286
2574
 
2287
2575
  /**
@@ -2455,14 +2743,15 @@ export declare const useUser: () => {
2455
2743
  user: User | null;
2456
2744
  error: string | null;
2457
2745
  isInitialized: boolean;
2746
+ isSignedIn: boolean;
2458
2747
  };
2459
2748
 
2460
2749
  /**
2461
2750
  * Use video
2462
- * @param videoId - video id
2751
+ * @param videoIdOrUrlName - video id or video nice url (e.g. some-interesting-video)
2463
2752
  * @public
2464
2753
  */
2465
- export declare const useVideo: (videoId?: string | undefined) => {
2754
+ export declare const useVideo: (videoIdOrUrlName?: string | undefined) => {
2466
2755
  data: Video | null;
2467
2756
  error: string | null;
2468
2757
  };
@@ -2524,7 +2813,10 @@ export declare enum VastProvider {
2524
2813
  MALL_TV_PREBID = "malltv-prebid",
2525
2814
  PRIMA = "prima",
2526
2815
  TEST = "test",
2527
- TEST_VPAID = "test-vpaid"
2816
+ TEST_VPAID = "test-vpaid",
2817
+ JOJ_TEST_AD_FORM_PROGRAMMATIC = "joj-test-ad-form-programmatic",
2818
+ JOJ_TEST_TESTER_VASTERIX = "joj-test-tester-vasterix",
2819
+ JOJ_TEST_TESTER_ADFORM_30 = "joj-test-tester-adform-30"
2528
2820
  }
2529
2821
 
2530
2822
  /**
@@ -2536,7 +2828,6 @@ export declare interface Video extends RowItem {
2536
2828
  * @deprecated use assets instead
2537
2829
  */
2538
2830
  cover: string | null;
2539
- created: Date;
2540
2831
  sectionId: string | null;
2541
2832
  channelId: string | null;
2542
2833
  /**
@@ -2548,14 +2839,19 @@ export declare interface Video extends RowItem {
2548
2839
  image: string | null;
2549
2840
  isPlayable: boolean;
2550
2841
  monetizations: Monetization[];
2551
- monetization: Monetization | undefined;
2552
- transactionId?: string;
2553
- transaction: Monetization | undefined;
2554
- subscriptions: Monetization[];
2555
- subscriptionIds: string[];
2842
+ /**
2843
+ * Returns all transactions and subscriptions applied to this video.
2844
+ * Transactions before subscriptions, sorted by price ascending.
2845
+ */
2846
+ getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
2847
+ purchasableMonetization: any | null;
2848
+ transaction: PurchasableMonetization | undefined;
2849
+ subscriptions: PurchasableMonetization[];
2850
+ sources?: any[];
2556
2851
  isPlaylist: boolean;
2557
2852
  name: string;
2558
- description?: string;
2853
+ urlNames?: string[];
2854
+ urlName?: string;
2559
2855
  price: number | null;
2560
2856
  detailedPrice: DetailedPrice | null;
2561
2857
  uri: string;
@@ -2566,7 +2862,6 @@ export declare interface Video extends RowItem {
2566
2862
  detailBanner?: string;
2567
2863
  linkedVideosRaw: any[];
2568
2864
  linkedVideos: LinkedVideo[];
2569
- purchasableMonetization: any | null;
2570
2865
  contentType: VideoContentType | null;
2571
2866
  year?: number;
2572
2867
  episodeNumber?: number;
@@ -2623,6 +2918,14 @@ export declare enum VideoType {
2623
2918
  * Video is a standard single video.
2624
2919
  */
2625
2920
  VIDEO = "VIDEO",
2921
+ /**
2922
+ * Part of video original video like CUT.
2923
+ */
2924
+ CUT = "CUT",
2925
+ /**
2926
+ * Part of video original video like TRAILER.
2927
+ */
2928
+ TRAILER = "TRAILER",
2626
2929
  TV_PROGRAM = "TV_PROGRAM",
2627
2930
  /**
2628
2931
  * Video object represents whole series, e.g. tv show.
@@ -2630,6 +2933,13 @@ export declare enum VideoType {
2630
2933
  SERIES = "SERIES"
2631
2934
  }
2632
2935
 
2936
+ /**
2937
+ * @public
2938
+ */
2939
+ export declare type VideoUrlName = {
2940
+ [key in LangCode]?: string[];
2941
+ };
2942
+
2633
2943
  /**
2634
2944
  * @public
2635
2945
  */
@@ -2755,6 +3065,13 @@ export declare interface WhereFilter {
2755
3065
  value: any;
2756
3066
  }
2757
3067
 
3068
+ /**
3069
+ * The same as WhereFilter, but in array, for easier usage.
3070
+ * Format: [field, operator, value]
3071
+ * @public
3072
+ */
3073
+ export declare type WhereFilterArray = [string, WhereFilterOp, any];
3074
+
2758
3075
  declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
2759
3076
 
2760
3077
  /**