@tivio/sdk-js 2.3.3-beta.0 → 2.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.
package/dist/index.d.ts CHANGED
@@ -142,6 +142,16 @@ declare enum ApplicationType {
142
142
  ORGANIZATION = "ORGANIZATION"
143
143
  }
144
144
 
145
+ /**
146
+ * @public
147
+ */
148
+ declare interface ApplyScreenConditionPayload {
149
+ embedUrl?: string;
150
+ userPurchases?: Purchase[];
151
+ isSignedIn?: boolean;
152
+ condition: RenderCondition;
153
+ }
154
+
145
155
  /**
146
156
  * @public
147
157
  */
@@ -159,6 +169,9 @@ declare interface Article extends RowItem, MonetizableItem, ReactableContent {
159
169
  blocks: ArticleBlock[];
160
170
  cover: string;
161
171
  organizationId?: string;
172
+ detailBanner?: string;
173
+ episodeNumber?: number;
174
+ seasonNumber?: number;
162
175
  }
163
176
 
164
177
  /**
@@ -171,12 +184,14 @@ declare interface ArticleBlock {
171
184
  imageUrl?: string;
172
185
  textContent?: string;
173
186
  videoId?: string;
187
+ isOverflowImage?: boolean;
188
+ imageDescription?: string;
174
189
  }
175
190
 
176
191
  /**
177
192
  * @public
178
193
  */
179
- declare type ArticleBlockType = 'PARAGRAPH' | 'IMAGE' | 'VIDEO' | 'HEADING' | 'PAYWALL';
194
+ declare type ArticleBlockType = 'PARAGRAPH' | 'IMAGE' | 'VIDEO' | 'HEADING' | 'PAYWALL' | 'BLOCK_QUOTE';
180
195
 
181
196
  /**
182
197
  * @public
@@ -214,6 +229,11 @@ declare enum BannerItemComponent {
214
229
  CAROUSEL = "CAROUSEL"
215
230
  }
216
231
 
232
+ /**
233
+ * @public
234
+ */
235
+ declare type BottomComponent = 'dateOfPublication' | 'description' | undefined;
236
+
217
237
  /**
218
238
  * @public
219
239
  */
@@ -313,11 +333,76 @@ declare interface ContentAvailability {
313
333
  manual: boolean;
314
334
  }
315
335
 
336
+ declare type ContentType = 'ARTICLE' | 'VIDEO' | 'SERIES' | 'EPISODE';
337
+
316
338
  /**
317
339
  * @public
318
340
  */
319
341
  declare type ContinuePosition = number | null | Promise<number | null>;
320
342
 
343
+ /**
344
+ * @public
345
+ */
346
+ declare interface Conversation {
347
+ id: string;
348
+ createdAt: Date | null;
349
+ updatedAt: Date | null;
350
+ createdBy: MessageParticipant | null;
351
+ isSending: boolean;
352
+ lastMessage: ConversationMessage | null;
353
+ lastSeen: {
354
+ [key: string]: ConversationLastSeen | undefined;
355
+ };
356
+ participants: MessageParticipant[];
357
+ title: string;
358
+ messages: ConversationMessage[];
359
+ notSeenCount: number;
360
+ isLoading: boolean;
361
+ subscribeToMessages(): void;
362
+ sendMessage(text: string): Promise<SendMessageResponse>;
363
+ markAsRead(messageId: string): Promise<void>;
364
+ destroy(): void;
365
+ }
366
+
367
+ /**
368
+ * @public
369
+ */
370
+ declare interface ConversationLastSeen {
371
+ message: Message;
372
+ date?: Date;
373
+ }
374
+
375
+ /**
376
+ * @public
377
+ */
378
+ declare interface ConversationMessage {
379
+ id: string;
380
+ participant: MessageParticipant;
381
+ text: string;
382
+ createdAt: Date;
383
+ editedAt: Date | null;
384
+ }
385
+
386
+ /**
387
+ * @public
388
+ */
389
+ declare interface ConversationStore {
390
+ conversations: Map<string, Conversation>;
391
+ isLoading: boolean;
392
+ setParticipantPath(participantPath: string | null): void;
393
+ setConversations(callback: (conversations: Conversation[]) => Conversation[]): void;
394
+ subscribeConversations(participantPath: string): Promise<void>;
395
+ createConversation(participantPaths: string[]): Promise<{
396
+ id: string;
397
+ } | undefined>;
398
+ clearConversations(): void;
399
+ getConversationById(id: string): Conversation | undefined;
400
+ readonly allConversations: Conversation[];
401
+ readonly notSeenCount: number;
402
+ setDisposer(key: 'conversations', disposer: Disposer_2): void;
403
+ unsubscribeConversations(): void;
404
+ }
405
+
321
406
  /**
322
407
  * @param {PlayerInterfaceForPlayerWrapper} playerImplementation - player implementation
323
408
  * @returns player wrapper instance
@@ -352,6 +437,7 @@ declare enum CustomerId {
352
437
  CNC = "CNC",
353
438
  DVTV = "DVTV",
354
439
  DVTV_DEV = "DVTV_DEV",
440
+ DVTV_SK = "DVTV_SK",
355
441
  GARAZ = "GARAZ",
356
442
  GRAPE = "GRAPE",
357
443
  HODINA_DEJEPICHU = "HODINA_DEJEPICHU",
@@ -378,7 +464,27 @@ declare enum CustomerId {
378
464
  LIGA_NARUBY = "LIGA_NARUBY",
379
465
  VIC_NEZ_SI_MYSLITE = "VIC_NEZ_SI_MYSLITE",
380
466
  ZIMAK = "ZIMAK",
381
- TYDENIK_HOROSKOPU = "TYDENIK_HOROSKOPU"
467
+ TYDENIK_HOROSKOPU = "TYDENIK_HOROSKOPU",
468
+ THE_MAG = "THE_MAG",
469
+ FNO = "FNO",
470
+ HARTMANNRICO = "HARTMANNRICO",
471
+ DRASLOVKA = "DRASLOVKA",
472
+ CSOB = "CSOB",
473
+ MAGNA = "MAGNA",
474
+ REPORTERKY = "REPORTERKY",
475
+ TV_LUX = "TV_LUX",
476
+ KVIFF = "KVIFF",
477
+ KVIFF_WEB = "KVIFF_WEB",
478
+ SPORTY_TV = "SPORTY_TV",
479
+ PALATINUM = "PALATINUM",
480
+ MIRA_BOSAK = "MIRA_BOSAK",
481
+ KOVACIC_360 = "KOVACIC_360",
482
+ SIFRA_TV = "SIFRA_TV",
483
+ BLESK = "BLESK",
484
+ NERUDA_TV = "NERUDA_TV",
485
+ DAVID_FRANK_TV = "DAVID_FRANK_TV",
486
+ LEPSI_UZ_TO_NEBUDE = "LEPSI_UZ_TO_NEBUDE",
487
+ BEAT_SEXISM = "BEAT_SEXISM"
382
488
  }
383
489
 
384
490
  /**
@@ -489,6 +595,15 @@ declare type FollowedOrganizationData = {
489
595
  };
490
596
  };
491
597
 
598
+ /**
599
+ * @public
600
+ */
601
+ declare type FrequencyInfo = {
602
+ title: Translation;
603
+ unit: string;
604
+ value: number;
605
+ };
606
+
492
607
  /**
493
608
  * @public
494
609
  */
@@ -526,6 +641,20 @@ declare interface GetSourceUrlResponse {
526
641
  * Returns url to manifest with audio only chunks.
527
642
  */
528
643
  audioOnly?: boolean;
644
+ /**
645
+ * Current session id for given user and source.
646
+ */
647
+ sessionId?: string;
648
+ /**
649
+ * Template for generating image previews for user scrubbing in player.
650
+ */
651
+ seekingMatrix?: SeekingMatrixTemplate;
652
+ }
653
+
654
+ declare interface GetUserRssUrlResponse {
655
+ rssUrl: string;
656
+ createdAt?: number;
657
+ expiresAt?: number;
529
658
  }
530
659
 
531
660
  declare type InternalConf = {
@@ -698,6 +827,41 @@ declare interface Marker {
698
827
  type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
699
828
  }
700
829
 
830
+ /**
831
+ * @public
832
+ */
833
+ declare interface Message {
834
+ id: string;
835
+ text: string;
836
+ videoTime: number | null;
837
+ createdAt: Date;
838
+ editedAt: Date | null;
839
+ user: MessageUser | null;
840
+ reactions: Record<string, number> | null;
841
+ repliesCount: number | null;
842
+ isReady: boolean;
843
+ updateRepliesCount: (increment: boolean) => void;
844
+ }
845
+
846
+ /**
847
+ * @public
848
+ */
849
+ declare interface MessageParticipant {
850
+ path: string;
851
+ name: string;
852
+ avatarUrl: string;
853
+ email: string;
854
+ }
855
+
856
+ /**
857
+ * @public
858
+ */
859
+ declare interface MessageUser {
860
+ name: string;
861
+ avatarUrl: string | null;
862
+ email: string;
863
+ }
864
+
701
865
  declare interface MonetizableItem {
702
866
  /**
703
867
  * Returns true if content is purchased (via transaction or subscription) or free.
@@ -723,6 +887,7 @@ declare interface Monetization {
723
887
  name?: string;
724
888
  description?: string;
725
889
  organizationId?: string;
890
+ order?: number;
726
891
  }
727
892
 
728
893
  /**
@@ -755,6 +920,8 @@ declare enum MONETIZATION_FREQUENCY {
755
920
  */
756
921
  declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription' | 'display';
757
922
 
923
+ declare type NextPageParamType = 'screenId' | 'rowId' | 'filter';
924
+
758
925
  /**
759
926
  * @public
760
927
  */
@@ -781,6 +948,7 @@ declare interface Organization {
781
948
  logoLandscape: string | null;
782
949
  organizationBanner: string | null;
783
950
  profilePhoto: string | null;
951
+ defaultLanguage?: string;
784
952
  }
785
953
 
786
954
  /**
@@ -793,6 +961,23 @@ declare type OtherSource = SourceBase & StartAndContinuePosition & {
793
961
  type: 'other';
794
962
  };
795
963
 
964
+ declare interface PaginatedResponse<T = unknown, U extends NextPageParamType = NextPageParamType> {
965
+ items: T[];
966
+ nextPageParams: {
967
+ offset: number;
968
+ limit: number;
969
+ } & (U extends 'screenId' ? {
970
+ organizationId: string;
971
+ screenId: string;
972
+ initialTilesCount: number;
973
+ } : U extends 'rowId' ? {
974
+ organizationId: string;
975
+ rowId: string;
976
+ } : U extends 'filter' ? {
977
+ filter: Omit<RowFilterField, 'limit'>;
978
+ } : {}) | null;
979
+ }
980
+
796
981
  /**
797
982
  * @public
798
983
  */
@@ -801,6 +986,7 @@ declare type PaginationInterface<Entity> = {
801
986
  fetchMore: () => void;
802
987
  hasNextPage?: boolean;
803
988
  loading?: boolean;
989
+ initialLoading?: boolean;
804
990
  };
805
991
 
806
992
  /**
@@ -1189,6 +1375,25 @@ declare interface Promotion {
1189
1375
  hideOtherSubscriptions?: boolean;
1190
1376
  }
1191
1377
 
1378
+ /**
1379
+ * @public
1380
+ */
1381
+ declare enum PublishedStatus {
1382
+ /**
1383
+ * Content is not published, is not shown in any application and cannot be played,
1384
+ * even if user enters url directly into browser.
1385
+ */
1386
+ DRAFT = "DRAFT",
1387
+ /**
1388
+ * Content is published and can be accessed and played freely in any application.
1389
+ */
1390
+ PUBLISHED = "PUBLISHED",
1391
+ /**
1392
+ * Content is not visible in the application (e.g. rows, search), but if user has direct url to it, they can play it.
1393
+ */
1394
+ UNLISTED = "UNLISTED"
1395
+ }
1396
+
1192
1397
  /**
1193
1398
  * @public
1194
1399
  */
@@ -1203,6 +1408,7 @@ declare interface PurchasableMonetization extends Monetization {
1203
1408
  price?: string | number;
1204
1409
  promotion: Promotion | null;
1205
1410
  frequency?: MONETIZATION_FREQUENCY;
1411
+ frequencyInfo?: FrequencyInfo;
1206
1412
  durationDays?: number;
1207
1413
  /**
1208
1414
  * Returns TRUE if subscription is purchased (and not expired) by user.
@@ -1233,6 +1439,15 @@ declare interface PurchasableMonetization extends Monetization {
1233
1439
  * When set to true, subscription is hidden in UI (e.g. in MonetizationSelectOverlay).
1234
1440
  */
1235
1441
  subscriptionIsHidden?: boolean;
1442
+ /**
1443
+ * Price that is used for marketing purposes (strike-through price).
1444
+ */
1445
+ regularPrice?: DetailedPrice;
1446
+ /**
1447
+ * Number of seats left for the subscription.
1448
+ */
1449
+ seatsLeft?: number;
1450
+ maxQuantity?: number;
1236
1451
  }
1237
1452
 
1238
1453
  /**
@@ -1283,7 +1498,8 @@ declare enum PurchaseDocumentGateway {
1283
1498
  'tivio' = "tivio",
1284
1499
  'patreon' = "patreon",
1285
1500
  'paypal' = "paypal",
1286
- 'unknown' = "unknown"
1501
+ 'unknown' = "unknown",
1502
+ 'stargaze' = "stargaze"
1287
1503
  }
1288
1504
 
1289
1505
  /**
@@ -1333,7 +1549,12 @@ declare enum PurchaseStatus {
1333
1549
  /**
1334
1550
  * From PAID to EXPIRED when payment fails to renew subscription.
1335
1551
  */
1336
- EXPIRED = "EXPIRED"
1552
+ EXPIRED = "EXPIRED",
1553
+ /**
1554
+ * From PAID to EXPIRING when a Stargaze purchase has passed its expire date but hasn't been fully expired yet.
1555
+ * Stargaze will try to renew the purchase even after it has expired.
1556
+ */
1557
+ EXPIRING = "EXPIRING"
1337
1558
  }
1338
1559
 
1339
1560
  /**
@@ -1352,6 +1573,9 @@ declare interface ReactableContent {
1352
1573
  [key in ReactionEnum]?: number;
1353
1574
  } | null;
1354
1575
  updateReactionCount: (reaction: ReactionEnum, newCount: number) => void;
1576
+ isFavorite?: boolean;
1577
+ removeFromFavorites?: () => void;
1578
+ addToFavorites?: () => void;
1355
1579
  }
1356
1580
 
1357
1581
  /**
@@ -1401,6 +1625,29 @@ export declare type RemoteProviderProps = {
1401
1625
  language?: string;
1402
1626
  };
1403
1627
 
1628
+ /**
1629
+ * Conditions that are dynamically applied to screens before they are rendered.
1630
+ * eg. when we want to render an embed only if certain conditions are met.
1631
+ * 'type' indicates type of the condition, eg. 'subscribed'.
1632
+ * 'else' indicates what should happen if the conditions are not met.
1633
+ * 'elseValue' is a payload.
1634
+ */
1635
+ declare interface RenderCondition {
1636
+ type: ScreenConditionType;
1637
+ value?: RenderConditionValue[];
1638
+ else: ScreenConditionElse;
1639
+ elseValue: RenderConditionElseValue[];
1640
+ }
1641
+
1642
+ declare interface RenderConditionElseValue {
1643
+ key: string;
1644
+ value: string;
1645
+ }
1646
+
1647
+ declare interface RenderConditionValue {
1648
+ subscriptionRefs?: any[];
1649
+ }
1650
+
1404
1651
  /**
1405
1652
  * @public
1406
1653
  */
@@ -1420,6 +1667,8 @@ declare interface Row {
1420
1667
  rowComponent: RowComponent.ROW | RowComponent.BANNER;
1421
1668
  itemComponent: RowItemComponent | BannerItemComponent;
1422
1669
  organizationId?: string;
1670
+ bottomComponent?: BottomComponent;
1671
+ showDescriptionAsTitle?: boolean;
1423
1672
  }
1424
1673
 
1425
1674
  /**
@@ -1443,6 +1692,37 @@ declare enum RowComponent {
1443
1692
  BANNER = "BANNER"
1444
1693
  }
1445
1694
 
1695
+ declare enum RowFilterCollection {
1696
+ VIDEOS = "videos",
1697
+ /**
1698
+ * This is not real collection path. Path always should be ${organizationId}/tags
1699
+ */
1700
+ TAGS = "tags",
1701
+ TV_CHANNELS = "tvChannels",
1702
+ CONTENTS = "contents",
1703
+ APPLICATIONS = "applications"
1704
+ }
1705
+
1706
+ /**
1707
+ * RowFilterField that is used in @tivio/firebase needs to be retyped here.
1708
+ * @public
1709
+ */
1710
+ declare interface RowFilterField {
1711
+ collection: RowFilterCollection;
1712
+ limit?: number;
1713
+ orderBy?: {
1714
+ fieldPath: RowOrderByFieldPath;
1715
+ directionStr?: OrderByDirection;
1716
+ };
1717
+ where?: RowFilterWhereField[];
1718
+ }
1719
+
1720
+ declare interface RowFilterWhereField {
1721
+ fieldPath: RowWhereFilterFieldPath;
1722
+ opStr: WhereFilterOp;
1723
+ value: any;
1724
+ }
1725
+
1446
1726
  /**
1447
1727
  * @public
1448
1728
  */
@@ -1494,6 +1774,27 @@ declare enum RowItemComponent {
1494
1774
  ROW_ITEM_PLAIN = "ROW_ITEM_PLAIN"
1495
1775
  }
1496
1776
 
1777
+ /**
1778
+ * RowOrderByFieldPath that is used in @tivio/firebase needs to be retyped here.
1779
+ * @public
1780
+ */
1781
+ declare enum RowOrderByFieldPath {
1782
+ CREATED = "created",
1783
+ DEFAULT_NAME = "defaultName"
1784
+ }
1785
+
1786
+ declare enum RowWhereFilterFieldPath {
1787
+ CREATED = "created",
1788
+ TAGS = "tags",
1789
+ TAG_TYPE_REF = "tagTypeRef",
1790
+ TYPE = "type",
1791
+ CONTENT_TYPE = "contentType",
1792
+ CHANNEL_KEY = "channelKey",
1793
+ PUBLISHED_STATUS = "publishedStatus",
1794
+ ORGANIZATION_REF = "organizationRef",
1795
+ TRANSCODING_STATUS = "transcodingStatus"
1796
+ }
1797
+
1497
1798
  /**
1498
1799
  * @public
1499
1800
  */
@@ -1503,6 +1804,43 @@ declare type ScalableAsset = {
1503
1804
  '@3'?: Asset;
1504
1805
  };
1505
1806
 
1807
+ /**
1808
+ * @public
1809
+ */
1810
+ declare interface Screen_2 {
1811
+ id: string;
1812
+ name: string | null;
1813
+ description?: string | null;
1814
+ assets: AssetsField;
1815
+ rows: PaginatedResponse<Row>;
1816
+ type?: ScreenType;
1817
+ filter?: RowFilterField | null;
1818
+ embedUrl?: string;
1819
+ screenId: string;
1820
+ renderConditions: RenderCondition[];
1821
+ getRenderCondition: (context: {
1822
+ purchasedSubscriptions: Purchase[];
1823
+ }) => RenderCondition | undefined;
1824
+ applyRenderCondition: (payload: ApplyScreenConditionPayload) => {
1825
+ isSignInRequired?: boolean;
1826
+ isPurchaseRequired?: boolean;
1827
+ embedUrl?: string;
1828
+ };
1829
+ fetchMoreRows: () => Promise<void>;
1830
+ hasNextPage: boolean;
1831
+ refetchIfNeeded: () => Promise<void>;
1832
+ }
1833
+
1834
+ declare enum ScreenConditionElse {
1835
+ SET_QUERY_PARAMS = "setQueryParams",
1836
+ SHOW_PURCHASE_MODAL = "showPurchaseModal"
1837
+ }
1838
+
1839
+ declare enum ScreenConditionType {
1840
+ SUBSCRIBED = "subscribed",
1841
+ SIGNED_IN = "signedIn"
1842
+ }
1843
+
1506
1844
  /**
1507
1845
  * @public
1508
1846
  */
@@ -1523,6 +1861,48 @@ declare type ScreenConfig = {
1523
1861
  */
1524
1862
  declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites' | 'topWatched' | 'applications';
1525
1863
 
1864
+ declare enum ScreenType {
1865
+ DEFAULT = "default",
1866
+ GRID = "grid",
1867
+ EMBED = "embed",
1868
+ RECOMMENDATION = "recommendation",
1869
+ FEED = "feed",
1870
+ EPG = "epg"
1871
+ }
1872
+
1873
+ /**
1874
+ * @public
1875
+ */
1876
+ declare interface SeekingMatrix {
1877
+ url: string;
1878
+ x: number;
1879
+ y: number;
1880
+ width: number;
1881
+ height: number;
1882
+ interval: number;
1883
+ timeMs: number;
1884
+ }
1885
+
1886
+ /**
1887
+ * @public
1888
+ */
1889
+ declare interface SeekingMatrixTemplate {
1890
+ pattern: string;
1891
+ width: number;
1892
+ height: number;
1893
+ columns: number;
1894
+ rows: number;
1895
+ interval: number;
1896
+ }
1897
+
1898
+ /**
1899
+ * @public
1900
+ */
1901
+ declare interface SendMessageResponse {
1902
+ conversationId: string;
1903
+ messageId?: string;
1904
+ }
1905
+
1526
1906
  /**
1527
1907
  * @public
1528
1908
  */
@@ -1538,6 +1918,12 @@ declare interface Series extends RowItem, MonetizableItem, ReactableContent {
1538
1918
  ref: DocumentReference<any>;
1539
1919
  availableSeasons: AvailableSeason[];
1540
1920
  actors?: DocumentReference<any>[];
1921
+ linkedContent?: {
1922
+ type: ContentType;
1923
+ contentRef: DocumentReference<any>;
1924
+ }[];
1925
+ seriesDetailArticle?: Article;
1926
+ originalTagId?: string;
1541
1927
  }
1542
1928
 
1543
1929
  declare type Settings = {
@@ -1630,7 +2016,7 @@ declare interface StorageManager_2 {
1630
2016
  /**
1631
2017
  * @public
1632
2018
  */
1633
- declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error | null, data: PaginationInterface<ItemInRow> | null) => void, options?: SubscribeToItemsInRowOptions) => Disposer_2;
2019
+ declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error | null, data: PaginationInterface<ItemInRow> | null) => void, options?: SubscribeToItemsInRowOptions, organizationId?: string) => Disposer_2;
1634
2020
 
1635
2021
  /**
1636
2022
  * @public
@@ -1649,7 +2035,7 @@ declare type SubscribeToRowsInScreen = (screenId: string, cb: (error: Error | nu
1649
2035
  /**
1650
2036
  * @public
1651
2037
  */
1652
- declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Error | null, data: PaginationInterface<Video> | null) => void, options?: SubscribeToTaggedVideosOptions) => Disposer_2;
2038
+ declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Error | null, data: PaginationInterface<Video> | null) => void, options?: SubscribeToTaggedVideosOptions, organizationPath?: string) => Disposer_2;
1653
2039
 
1654
2040
  /**
1655
2041
  * @public
@@ -1680,6 +2066,10 @@ declare interface Tag extends RowItem {
1680
2066
  getSeriesEntity: (path: string) => Promise<Series>;
1681
2067
  ref: DocumentReference<any>;
1682
2068
  seriesEntity: Series | null;
2069
+ tagType: {
2070
+ tagTypeId: string | null;
2071
+ } | null;
2072
+ initSeries: () => Promise<void>;
1683
2073
  }
1684
2074
 
1685
2075
  declare interface TagAvailableSeasonsFieldType extends TagMetadataFieldDefinition {
@@ -1825,13 +2215,25 @@ declare type TivioGetters = {
1825
2215
  getPlayerWrapper: (opt: {
1826
2216
  playerWrapperId?: string;
1827
2217
  }) => PlayerWrapper_2;
1828
- getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
2218
+ organization: {
2219
+ /**
2220
+ * Get organization subscriptions
2221
+ * @returns {Promise<Monetization[] | undefined>} organization subscriptions or undefined if organization does not exists
2222
+ */
2223
+ getSubscriptions: () => Promise<Monetization[] | undefined>;
2224
+ };
1829
2225
  /**
1830
2226
  * Get video by its id.
1831
2227
  * @param videoId - video id
1832
2228
  * @returns {Promise<Video | null>} video or null if video does not exists
1833
2229
  */
1834
2230
  getVideoById: (videoId: string) => Promise<Video | null>;
2231
+ /**
2232
+ * Get screen by its id.
2233
+ * @param screenId - screen id
2234
+ * @returns {Promise<Screen | null>} screen or null if screen does not exists
2235
+ */
2236
+ getScreenById: (screenId: string, cb?: (error: Error | null, data: Screen_2 | null, disposer?: Disposer_2) => void) => Promise<Screen_2 | null>;
1835
2237
  /**
1836
2238
  * Get player capabilities based on user's browser and OS as resolved by Tivio.
1837
2239
  * @returns PlayerCapability[]
@@ -1866,7 +2268,7 @@ declare type TivioJsBundleExposedApi = {
1866
2268
  getTagById: (tagId: string) => Promise<Tag | null>;
1867
2269
  createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
1868
2270
  destroy: () => Promise<void>;
1869
- } & Pick<TivioGetters, 'getVideoById'> & Pick<TivioSubscriptions, 'subscribeToVideo' | 'subscribeToItemsInRow'> & Pick<TivioAuth, 'createUserWithEmailAndPassword' | 'signInWithEmailAndPassword'> & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
2271
+ } & Pick<TivioGetters, 'getVideoById' | 'getScreenById' | 'organization'> & Pick<TivioSubscriptions, 'subscribeToVideo' | 'subscribeToItemsInRow' | 'subscribeToRowsInScreen'> & Pick<TivioAuth, 'createUserWithEmailAndPassword' | 'signInWithEmailAndPassword'> & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
1870
2272
 
1871
2273
  /**
1872
2274
  * @public
@@ -1929,6 +2331,15 @@ declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
1929
2331
  videoPath: string;
1930
2332
  };
1931
2333
 
2334
+ declare interface TokenInterface {
2335
+ token: string;
2336
+ expirationDate: Date;
2337
+ type: TokenType;
2338
+ active: boolean;
2339
+ }
2340
+
2341
+ declare type TokenType = 'rss';
2342
+
1932
2343
  /**
1933
2344
  * @public
1934
2345
  * Video track
@@ -2010,6 +2421,8 @@ declare interface TvProgram {
2010
2421
  image: string;
2011
2422
  landscape?: string | null;
2012
2423
  video: Video | null;
2424
+ tvChannelRef?: any;
2425
+ loadVideo?: () => Promise<void>;
2013
2426
  }
2014
2427
 
2015
2428
  /**
@@ -2095,13 +2508,19 @@ declare type User = {
2095
2508
  followedOrganizationIds: string[];
2096
2509
  isAnonymous: boolean;
2097
2510
  isDiscordConnected: boolean;
2511
+ disconnectDiscord: () => Promise<void>;
2098
2512
  createUserProfile: (request: any) => Promise<void>;
2099
2513
  deleteUserProfile: (profileId: string) => Promise<void>;
2100
2514
  setActiveUserProfileId: (id: string) => void;
2101
2515
  getFollowedOrganizations: () => Promise<Array<FollowedOrganizationData | undefined>>;
2102
2516
  sendFinalizeRegistrationEmail: (email: string) => Promise<void>;
2103
- isUserAlreadyRegisteredByTenant: (email: string, tenantId: string) => Promise<boolean>;
2517
+ isUserAlreadyRegisteredByTenant: (email: string) => Promise<boolean>;
2104
2518
  getAllExtendableSubscriptions: () => Promise<Purchase[]>;
2519
+ getRssValidToken: () => Promise<TokenInterface | undefined>;
2520
+ getRssUrl: () => Promise<GetUserRssUrlResponse>;
2521
+ invalidateAllTokens: (type: TokenType) => Promise<void>;
2522
+ isPartiallyRegistered: boolean;
2523
+ conversationStore: ConversationStore;
2105
2524
  };
2106
2525
 
2107
2526
  /**
@@ -2178,15 +2597,7 @@ declare interface Video extends RowItem, MonetizableItem, ReactableContent {
2178
2597
  }): Promise<GetSourceUrlResponse & {
2179
2598
  language?: LangCode;
2180
2599
  }>;
2181
- getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex?: number): {
2182
- url: string;
2183
- x: number;
2184
- y: number;
2185
- width: number;
2186
- height: number;
2187
- interval: number;
2188
- timeMs: number;
2189
- } | null;
2600
+ getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex?: number): SeekingMatrix | null;
2190
2601
  purchasableMonetization: any | null;
2191
2602
  transaction: PurchasableMonetization | undefined;
2192
2603
  subscriptions: PurchasableMonetization[];
@@ -2235,6 +2646,11 @@ declare interface Video extends RowItem, MonetizableItem, ReactableContent {
2235
2646
  initApplication: () => Promise<void>;
2236
2647
  init: () => Promise<void>;
2237
2648
  progress?: number;
2649
+ backgroundBlurBannerMobile?: string | null;
2650
+ isWatched?: boolean;
2651
+ pgRating?: string;
2652
+ contentDescriptors?: string[];
2653
+ publishedStatus?: PublishedStatus;
2238
2654
  }
2239
2655
 
2240
2656
  /**
@@ -2251,7 +2667,8 @@ declare enum VideoContentType {
2251
2667
 
2252
2668
  declare enum VideoSourceCodec {
2253
2669
  H264 = "h264",
2254
- H265 = "h265"
2670
+ H265 = "h265",
2671
+ MPEG_2 = "MPEG-2"
2255
2672
  }
2256
2673
 
2257
2674
  declare enum VideoSourceEncryption {
@@ -2264,7 +2681,8 @@ declare enum VideoSourceEncryption {
2264
2681
  declare enum VideoSourceProtocol {
2265
2682
  HLS = "hls",
2266
2683
  DASH = "dash",
2267
- MP4 = "mp4"
2684
+ MP4 = "mp4",
2685
+ MP3 = "mp3"
2268
2686
  }
2269
2687
 
2270
2688
  /**
@@ -2276,7 +2694,6 @@ declare interface VirtualChannelSourceInterface extends ChannelSourceInterface {
2276
2694
  video?: Video | null;
2277
2695
  clone(params?: Partial<VirtualChannelSourceParams>): VirtualChannelSourceInterface;
2278
2696
  initializeNext(): Promise<void>;
2279
- deltaMsFromStart: number;
2280
2697
  }
2281
2698
 
2282
2699
  /**