@tivio/sdk-react 9.1.3 → 9.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,9 @@
1
- import type { ComponentType } from 'react';
1
+ import { ComponentType } from 'react';
2
2
  import type dayjs from 'dayjs';
3
3
  import { DocumentReference } from '@firebase/firestore-types';
4
4
  import type duration from 'dayjs/plugin/duration';
5
- import type firebase from '@firebase/app-types';
5
+ import type { default as firebase_2 } from '@firebase/app-types';
6
+ import type { default as firebase_3 } from 'firebase';
6
7
  import { FunctionComponentElement } from 'react';
7
8
  import type { GeoPoint } from '@firebase/firestore-types';
8
9
  import { OperatingSystem } from 'detect-browser';
@@ -11,15 +12,21 @@ import { default as React_2 } from 'react';
11
12
  import { RecommendationsQuery } from '@algolia/recommend';
12
13
  import type { TagManagerArgs } from 'react-gtm-module';
13
14
 
14
- export declare interface ActivatedPromotionResponse {
15
+ export declare interface ActivatedPromotion {
15
16
  id: string;
16
17
  isFree: boolean;
17
18
  videoId?: string;
18
19
  }
19
20
 
20
- export declare type ActivateVoucherResponse = string | {
21
- activatedPromotions: ActivatedPromotionResponse[];
22
- };
21
+ export declare interface ActivatedPromotionsResponse {
22
+ activatedPromotions: ActivatedPromotion[];
23
+ }
24
+
25
+ export declare interface ActivatedPromotionsWithIdsResponse {
26
+ activatedPromotionsIds: string[];
27
+ }
28
+
29
+ export declare type ActivateVoucherResponse = string | ActivatedPromotionsResponse | ActivatedPromotionsWithIdsResponse;
23
30
 
24
31
  export declare type AdBannerScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.AD_BANNER>;
25
32
 
@@ -273,10 +280,6 @@ export declare enum ALGOLIA_INDEX_NAME {
273
280
  TV_CHANNELS = "tvChannels"
274
281
  }
275
282
 
276
- export declare interface AllStargazeCreatorsWithVoucherSubscriptionsResponse {
277
- creators: CreatorsWithVoucherSubscriptions[];
278
- }
279
-
280
283
  /**
281
284
  * List of conversion types that we send to analytics.
282
285
  */
@@ -416,6 +419,7 @@ export declare interface Article extends RowItem, MonetizableItem, ReactableCont
416
419
 
417
420
  /**
418
421
  * @public
422
+ * TODO this should union separated by article type, this way we don't need optional attributes
419
423
  */
420
424
  export declare interface ArticleBlock {
421
425
  id: string;
@@ -438,6 +442,45 @@ export declare interface ArticleBlockField extends Omit<ArticleBlock, 'textConte
438
442
  */
439
443
  export declare type ArticleBlockType = 'PARAGRAPH' | 'IMAGE' | 'VIDEO' | 'HEADING' | 'PAYWALL' | 'BLOCK_QUOTE';
440
444
 
445
+ /**
446
+ * Serialized version of {@link ArticleDocument} from @tivio/firebase.
447
+ * TODO duplicity with mentioned type, because we can't import firebase here.
448
+ */
449
+ declare interface ArticleDocumentSerialized {
450
+ type: 'ARTICLE';
451
+ name: Translation;
452
+ description?: Translation;
453
+ metadata?: ArticleMetadata;
454
+ assets?: AssetsField;
455
+ feedVisible?: boolean;
456
+ publishedStatus?: PublishedStatus;
457
+ reactions?: ReactionsField;
458
+ availability?: {
459
+ /**
460
+ * Unix timestamp in ms.
461
+ */
462
+ from: number;
463
+ /**
464
+ * Unix timestamp in ms.
465
+ */
466
+ to: number | null;
467
+ manual: boolean;
468
+ };
469
+ /**
470
+ * Unix timestamp in ms.
471
+ */
472
+ created: number;
473
+ organizationId: string;
474
+ tagPaths?: string[];
475
+ monetizations?: TileMonetizationData[];
476
+ seriesPath?: string;
477
+ blocks: ArticleBlockField[] | undefined;
478
+ }
479
+
480
+ export declare interface ArticleMetadata {
481
+ survey?: Survey;
482
+ }
483
+
441
484
  export declare interface ArticleTileSpecificData {
442
485
  organizationId: string;
443
486
  blocks: ArticleBlockField[];
@@ -702,6 +745,7 @@ export declare interface CommonSourceInterface<T extends SourceType = SourceType
702
745
  next: CommonSource | null;
703
746
  canSeek: boolean;
704
747
  hasNext: boolean;
748
+ isCastable: boolean;
705
749
  isFinished: boolean;
706
750
  setIsFinished(isFinished: boolean): void;
707
751
  isStarted: boolean;
@@ -720,6 +764,8 @@ export declare interface CommonSourceParams<T extends SourceType = SourceType> {
720
764
  name?: string;
721
765
  description?: string;
722
766
  autoplay?: boolean;
767
+ isCastable?: boolean;
768
+ videoPath?: string;
723
769
  }
724
770
 
725
771
  /**
@@ -995,9 +1041,10 @@ export declare const createPubSub: () => PubSub;
995
1041
  */
996
1042
  export declare const createRemotePackageLoader: () => (secret: string, conf: InternalConfig, checkBundleCharCount?: boolean) => Promise<TivioBundle>;
997
1043
 
998
- export declare const createTivio: () => (conf: SdkReactConfig) => Promise<RemoteBundleState>;
999
-
1000
- export declare const createUseRemoteBundle: () => (sdkReactConfig: SdkReactConfig, checkBundleCharCount?: boolean) => RemoteBundleState;
1044
+ /**
1045
+ * @public
1046
+ */
1047
+ export declare const createUseRemoteBundle: () => (conf: InternalConfig, checkBundleCharCount?: boolean) => RemoteBundleState;
1001
1048
 
1002
1049
  export declare interface CreateUserPayload {
1003
1050
  displayName?: string;
@@ -1106,7 +1153,8 @@ export declare enum CustomerId {
1106
1153
  DAVID_FRANK_TV = "DAVID_FRANK_TV",
1107
1154
  LEPSI_UZ_TO_NEBUDE = "LEPSI_UZ_TO_NEBUDE",
1108
1155
  BEAT_SEXISM = "BEAT_SEXISM",
1109
- KAROL_A_KVIDO = "KAROL_A_KVIDO"
1156
+ KAROL_A_KVIDO = "KAROL_A_KVIDO",
1157
+ UZ_BUDU = "UZ_BUDU"
1110
1158
  }
1111
1159
 
1112
1160
  /**
@@ -1295,6 +1343,10 @@ export declare interface Customizations {
1295
1343
  backgroundColor: string;
1296
1344
  color: string;
1297
1345
  };
1346
+ ModalDetailCoverOverlay?: {
1347
+ background: string;
1348
+ backgroundMobile: string;
1349
+ };
1298
1350
  }
1299
1351
 
1300
1352
  export declare interface CustomScript {
@@ -1555,7 +1607,7 @@ export declare interface EmailTemplateVersion {
1555
1607
 
1556
1608
  export declare type EmbedScreenMessageNavigateType = {
1557
1609
  type: EmbedScreenMessageType.NAVIGATE;
1558
- to: string | 'Profile' | 'Home' | 'Search' | 'Video' | 'Series' | 'Subscription';
1610
+ to: string | 'Profile' | 'Home' | 'Search' | 'Video' | 'Series' | 'Subscription' | 'Handle';
1559
1611
  value?: string;
1560
1612
  };
1561
1613
 
@@ -1652,7 +1704,8 @@ export declare interface ForbiddenOnCallError extends GenericOnCallError {
1652
1704
 
1653
1705
  export declare enum ForbiddenReason {
1654
1706
  MONETIZATION = "MONETIZATION",
1655
- GEO_BLOCKING = "GEO_BLOCKING"
1707
+ GEO_BLOCKING = "GEO_BLOCKING",
1708
+ UNSUPPORTED_BROWSER = "UNSUPPORTED_BROWSER"
1656
1709
  }
1657
1710
 
1658
1711
  /**
@@ -1686,6 +1739,15 @@ export declare type GeoBlocking = {
1686
1739
  blacklist: Array<any>;
1687
1740
  };
1688
1741
 
1742
+ export declare interface GetArticleRequest {
1743
+ id: string;
1744
+ }
1745
+
1746
+ export declare interface GetArticleResponse {
1747
+ article: ArticleDocumentSerialized;
1748
+ isBlockedByPurchase: boolean;
1749
+ }
1750
+
1689
1751
  export declare interface GetBaseAnalyticsRequest {
1690
1752
  /**
1691
1753
  * Id of organization to return analytics data.
@@ -1703,6 +1765,10 @@ export declare interface GetBaseAnalyticsRequest {
1703
1765
 
1704
1766
  export declare type GetConversionAnalyticsRequest = GetBaseAnalyticsRequest;
1705
1767
 
1768
+ export declare interface GetCreatorsWithVoucherResponse {
1769
+ creators: CreatorsWithVoucherSubscriptions[];
1770
+ }
1771
+
1706
1772
  export declare type GetMonetizationsAnalyticsRequest = GetBaseAnalyticsRequest;
1707
1773
 
1708
1774
  export declare interface GetMonetizationsAnalyticsResponse {
@@ -1818,6 +1884,10 @@ export declare interface GetSourceUrlResponse {
1818
1884
  * Returns url to manifest with audio only chunks.
1819
1885
  */
1820
1886
  audioOnly?: boolean;
1887
+ /**
1888
+ * In case of HYBRID mode, this field will contain the start date of the live stream in UNIX timestamp format.
1889
+ */
1890
+ from?: number;
1821
1891
  /**
1822
1892
  * Current session id for given user and source.
1823
1893
  */
@@ -1826,6 +1896,10 @@ export declare interface GetSourceUrlResponse {
1826
1896
  * Template for generating image previews for user scrubbing in player.
1827
1897
  */
1828
1898
  seekingMatrix?: SeekingMatrixTemplate;
1899
+ /**
1900
+ * Determines session type generated for source. If no provided it will be considered 'ondemand' session type.
1901
+ */
1902
+ sessionType?: VideoSourceField['sessionType'];
1829
1903
  }
1830
1904
 
1831
1905
  export declare type GetTilesInRowResponse<U extends NextPageParamType = NextPageParamType> = PaginatedResponse<TileData, U>;
@@ -1899,8 +1973,6 @@ export declare interface GetViewAnalyticsResponse {
1899
1973
 
1900
1974
  export declare type GetViewsAnalyticsRequest = GetBaseAnalyticsRequest;
1901
1975
 
1902
- export declare let globalSdkReactConfig: SdkReactConfig | undefined;
1903
-
1904
1976
  /**
1905
1977
  * @public
1906
1978
  */
@@ -1974,11 +2046,19 @@ export declare interface IndexedTvChannel extends IndexedObject {
1974
2046
  * @public
1975
2047
  */
1976
2048
  export declare interface IndexedVideo extends IndexedObject {
1977
- assets: any;
2049
+ assets?: AssetsField;
1978
2050
  organizationPath: string;
1979
2051
  sharedOrganizationPaths?: string[];
1980
2052
  tagPaths?: string[];
1981
2053
  created: Date | string;
2054
+ /**
2055
+ * Unix timestamp in seconds. This is standard date format for algolia records.
2056
+ *
2057
+ * @deprecated this is temporary workaround, the correct way is to migrate {@link created} to this format,
2058
+ * but before we need to adjust admin and front end applications to parse this format.
2059
+ * Do not read from this field when parsing response in front end applications, use {@link created} instead.
2060
+ */
2061
+ createdUnixTimestamp: number;
1982
2062
  /**
1983
2063
  * Is evaluated on publishedStatus and transcodingStatus fields.
1984
2064
  * TODO this will be true for videos with UNLISTED status, which is unintuitive for 'isDraft', we need to rename this
@@ -1991,6 +2071,7 @@ export declare interface IndexedVideo extends IndexedObject {
1991
2071
  publishedStatus?: PublishedStatus;
1992
2072
  type: VideoType;
1993
2073
  contentType?: VideoContentType;
2074
+ defaultName: string;
1994
2075
  name: string | Translation;
1995
2076
  description: string | Translation;
1996
2077
  hide: boolean;
@@ -2307,7 +2388,15 @@ export declare type LeaderboardScene = InteractiveWidgetSceneBase<InteractiveWid
2307
2388
  */
2308
2389
  export declare interface LinkedVideo {
2309
2390
  video: Video;
2310
- type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD' | 'TEASER' | 'TASTING' | 'VIRTUAL_PROGRAM' | 'PIP';
2391
+ type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD' | 'TEASER' | 'TASTING' | 'VIRTUAL_PROGRAM' | 'LANGUAGE'
2392
+ /**
2393
+ * Will render separate mini-player on top of the main one, playing given video.
2394
+ */
2395
+ | 'PIP'
2396
+ /**
2397
+ * Will not render separate player, it will override main video source.
2398
+ */
2399
+ | 'COMPOSED_PIP';
2311
2400
  }
2312
2401
 
2313
2402
  /**
@@ -2953,6 +3042,7 @@ export declare interface OrganizationSettingsField extends OrganizationResponsiv
2953
3042
  hideTitle?: boolean;
2954
3043
  };
2955
3044
  };
3045
+ voucher?: VoucherPageConfiguration;
2956
3046
  }
2957
3047
 
2958
3048
  /**
@@ -3057,6 +3147,15 @@ export declare type PatreonUserResponse = {
3057
3147
  errors?: PatreonError[];
3058
3148
  };
3059
3149
 
3150
+ /**
3151
+ * @public
3152
+ */
3153
+ export declare interface PaymentInfo {
3154
+ webPaymentGatewayLink?: string;
3155
+ gatewayUri?: string;
3156
+ paymentQRCodeUri?: string;
3157
+ }
3158
+
3060
3159
  /**
3061
3160
  * @public
3062
3161
  */
@@ -3180,7 +3279,7 @@ export declare interface PlayerEngineConfig {
3180
3279
  /**
3181
3280
  * @public
3182
3281
  */
3183
- export declare type PlayerEngineEvent = 'bufferingchange' | 'bufferedinfochange' | 'statechange' | 'loaded' | 'loadfailed' | 'togglefullscreen' | 'durationchange' | 'busychange' | 'trackschanged' | 'abort' | 'canplay' | 'canplaythrough' | 'emptied' | 'enginedurationchange' | 'enginetimeupdate' | 'ended' | 'error' | 'loadeddata' | 'loadedmetadata' | 'loadstart' | 'pause' | 'play' | 'playing' | 'progress' | 'ratechange' | 'seeked' | 'seeking' | 'stalled' | 'suspend' | 'timeupdate' | 'volumechange' | 'waiting' | 'click' | 'fullscreenchange';
3282
+ export declare type PlayerEngineEvent = 'bufferingchange' | 'bufferedinfochange' | 'statechange' | 'loaded' | 'loadfailed' | 'togglefullscreen' | 'durationchange' | 'busychange' | 'trackschanged' | 'abort' | 'canplay' | 'canplaythrough' | 'emptied' | 'adaptation' | 'buffering' | 'enginedurationchange' | 'enginestartrange' | 'enginetimeupdate' | 'ended' | 'error' | 'loadeddata' | 'loadedmetadata' | 'loadstart' | 'pause' | 'play' | 'playing' | 'progress' | 'ratechange' | 'seeked' | 'seeking' | 'stalled' | 'suspend' | 'timeupdate' | 'variantchanged' | 'volumechange' | 'waiting' | 'click' | 'fullscreenchange' | 'iscastingchanged';
3184
3283
 
3185
3284
  /**
3186
3285
  * @public
@@ -3303,21 +3402,11 @@ export declare interface PlayerEngineOptions {
3303
3402
  }
3304
3403
 
3305
3404
  export declare interface PlayerError {
3405
+ detail?: ShakaErrorDetail;
3306
3406
  message: string;
3407
+ timestamp: number;
3307
3408
  }
3308
3409
 
3309
- /**
3310
- * @public
3311
- */
3312
- export declare type PlayerEvent = {
3313
- name: PlayerEventName;
3314
- };
3315
-
3316
- /**
3317
- * @public
3318
- */
3319
- export declare type PlayerEventName = `${PlayerWrapperEvents}`;
3320
-
3321
3410
  /**
3322
3411
  * @public
3323
3412
  */
@@ -3445,7 +3534,12 @@ export declare interface PlayerSourceInterface<T extends NonAdSourceType = NonAd
3445
3534
  pauseReactions(): void;
3446
3535
  correctStartPosition(): Promise<void | null>;
3447
3536
  setCanSeek(canSeek: boolean): void;
3537
+ getOffset(): number;
3538
+ getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex?: number): SeekingMatrix | null;
3448
3539
  originalOptions: Record<string, any>;
3540
+ start?: Date;
3541
+ from?: Date;
3542
+ sourceHistory?: string[];
3449
3543
  }
3450
3544
 
3451
3545
  /**
@@ -3458,6 +3552,10 @@ export declare interface PlayerSourceParams<T extends NonAdSourceType = NonAdSou
3458
3552
  language?: LangCode | null;
3459
3553
  availableLanguages?: LangCode[] | null;
3460
3554
  sourcePlayMode: SourcePlayMode;
3555
+ start?: Date;
3556
+ from?: Date;
3557
+ sourceHistory?: string[];
3558
+ seekingMatrix?: SeekingMatrixTemplate;
3461
3559
  }
3462
3560
 
3463
3561
  export declare type PlayersScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.PLAYERS>;
@@ -3503,19 +3601,11 @@ export declare interface PlayerWrapper {
3503
3601
  * Pause video
3504
3602
  */
3505
3603
  pause: () => void;
3506
- ad: AdSourceInterface | null;
3507
- adMetadata: AdMetadata | null;
3508
- adSegment: AdSegment | null;
3509
- availableLanguages: LangCode[] | null;
3510
- canReplay: boolean;
3511
- currentTime: number;
3512
3604
  /**
3513
3605
  * Currently playing source
3514
3606
  */
3515
3607
  source: PlayerSource | null;
3516
- seekInterceptor: SeekInterceptor;
3517
3608
  events: EmitterInterface;
3518
- event: PlayerEvent | null;
3519
3609
  /**
3520
3610
  * Register a low level player that implements player methods, like play video, change volume, etc.
3521
3611
  */
@@ -3523,29 +3613,14 @@ export declare interface PlayerWrapper {
3523
3613
  /**
3524
3614
  * duration of current source in ms (both setter and getter)
3525
3615
  */
3526
- durationMs: number;
3527
- intro: {
3528
- marker: any;
3529
- skip: () => void;
3530
- } | null;
3531
- isBuffering: boolean;
3532
- isCurrentTimeLive: boolean;
3533
- isLiveSeekingEnabled: boolean;
3534
- isMuted: boolean;
3616
+ durationMs: number | null;
3535
3617
  isPlaybackStarted?: boolean;
3536
3618
  isPaused: boolean;
3537
3619
  isPlaying: boolean;
3538
3620
  isIdle: boolean;
3539
- language: LangCode | null;
3540
- nextRecommendedVideo: Video | null;
3541
- prerollCheck: PrerollCheck;
3542
- previousSource: PlayerSource | null;
3543
- progress: number | null;
3544
- progressMetadata: ProgressMetadata;
3545
- requestedSource: PlayerSource | null;
3546
3621
  error: PlayerError | null;
3547
- state: PlayerState;
3548
- volume: number;
3622
+ playbackError: PlayerError | null;
3623
+ canPlay: boolean;
3549
3624
  /**
3550
3625
  * Replay the video that finished playback
3551
3626
  */
@@ -3560,56 +3635,14 @@ export declare interface PlayerWrapper {
3560
3635
  * set volume to value between 0,1
3561
3636
  */
3562
3637
  setVolume: (volume: number) => void;
3563
- changeLanguage: (langCode: LangCode) => Promise<void>;
3564
3638
  /**
3565
3639
  * change volume by value between -1,1
3566
3640
  */
3567
3641
  changeVolumeBy: (volume: number) => void;
3568
3642
  setMuted: (muted: boolean) => void;
3643
+ setCanPlay: (canPlay: boolean) => void;
3569
3644
  toggleMuted: () => void;
3570
- getQualities: () => Track[];
3571
- playNativeImaAd: (url: string) => void;
3572
- playSourceAfterAdsRun: () => void;
3573
- putAd: (ad: AdSourceInterface) => void;
3574
- putAdMetadata: (ad: AdSourceInterface) => void;
3575
- reportLoadError: (error: Error) => void;
3576
- reportStateChanged: (state: PlayerState) => void;
3577
- reportTimeProgress: (ms: number) => void;
3578
- reportPlaybackCancelled: () => void;
3579
- reportPlaybackError: (error: Error) => void;
3580
- reportPlaybackEnded: () => void;
3581
- seekToPercent: (percentage: number) => void;
3582
- seekToInternal: (ms: number) => void;
3583
- seekToLive: () => void;
3584
- seekToLiveInternal: () => void;
3585
- setIsBuffering: (isBuffering: boolean) => void;
3586
- skipAd: () => void;
3587
- skipAllAds: () => void;
3588
- }
3589
-
3590
- /**
3591
- * @public
3592
- */
3593
- export declare enum PlayerWrapperEvents {
3594
- 'playback_cancelled' = "playback_cancelled",
3595
- /**
3596
- * Triggered when content video or ad finished playing until the end
3597
- */
3598
- 'playback_ended' = "playback_ended",
3599
- /**
3600
- * Triggered when both content video and all its associated ads finished playing until the end.
3601
- * Or in case of postroll, when content video finished playing unit the end and all postroll
3602
- * ads either finished / failed or were skipped.
3603
- */
3604
- 'video_unit_ended' = "video_unit_ended",
3605
- /**
3606
- * Pause was triggered
3607
- */
3608
- 'pause_triggered' = "pause_triggered",
3609
- /**
3610
- * Un-pause was triggered
3611
- */
3612
- 'unpause_triggered' = "unpause_triggered"
3645
+ resetErrors(): void;
3613
3646
  }
3614
3647
 
3615
3648
  /**
@@ -3625,18 +3658,6 @@ export declare enum PlayerWrapperEventType {
3625
3658
  */
3626
3659
  export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
3627
3660
 
3628
- /**
3629
- * @public
3630
- */
3631
- /**
3632
- * A promise that ads will be loaded. Resolves to the first ad source,
3633
- * other ads are linked to it via `ad.next` attribute.
3634
- *
3635
- * In case preroll is not configured or no ad
3636
- * manages to load successfully, resolves to null.
3637
- */
3638
- export declare type PrerollCheck = (source: PlayerSource) => Promise<AdSourceInterface | null>;
3639
-
3640
3661
  /**
3641
3662
  * Values that user entered in survey for given profile.
3642
3663
  */
@@ -3645,18 +3666,6 @@ export declare type ProfileSurvey = {
3645
3666
  age?: AgeRange;
3646
3667
  };
3647
3668
 
3648
- /**
3649
- * @public
3650
- */
3651
- export declare interface ProgressMetadata {
3652
- currentTimeMs: number;
3653
- durationMs: number;
3654
- percent: number;
3655
- remainingMs: number;
3656
- type: 'original' | 'cutout';
3657
- cutout?: Cutout;
3658
- }
3659
-
3660
3669
  /**
3661
3670
  * @public
3662
3671
  */
@@ -3769,6 +3778,11 @@ export declare type Purchase = {
3769
3778
  createdBy?: string;
3770
3779
  expirationDate: Date | null;
3771
3780
  gateway: PurchaseDocumentGateway | null;
3781
+ /**
3782
+ * Returns how many times user has purchased a monetization in a row.
3783
+ * @returns number of purchases (loyalty points)
3784
+ */
3785
+ getLoyaltyCount: () => Promise<number>;
3772
3786
  id: string;
3773
3787
  isExpired: boolean;
3774
3788
  /**
@@ -3843,7 +3857,7 @@ export declare type PurchaseEndpointPayload = {
3843
3857
  */
3844
3858
  expiration?: number;
3845
3859
  /**
3846
- * Paypal Id, Qerko Id or Voucher Id based on the gateway.
3860
+ * If purchase was made outside of standard Tivio payment method (e.g PayPal), this is its ID.
3847
3861
  */
3848
3862
  externalId?: string;
3849
3863
  /**
@@ -4066,10 +4080,7 @@ export declare interface QerkoOverlayState {
4066
4080
  * TODO more generic name, since we support stargaze payment gateway as well
4067
4081
  * @public
4068
4082
  */
4069
- export declare interface QerkoPaymentInfo {
4070
- webPaymentGatewayLink?: string;
4071
- gatewayUri?: string;
4072
- paymentQRCodeUri?: string;
4083
+ export declare interface QerkoPaymentInfo extends PaymentInfo {
4073
4084
  confirmationPaymentUrl?: string;
4074
4085
  purchaseId: string;
4075
4086
  currency: string;
@@ -4251,6 +4262,10 @@ export declare enum ReactionEnum {
4251
4262
  AWW = "AWW"
4252
4263
  }
4253
4264
 
4265
+ export declare type ReactionsField = {
4266
+ [reactionId in ReactionEnum]?: number;
4267
+ };
4268
+
4254
4269
  /**
4255
4270
  * @public
4256
4271
  */
@@ -4285,11 +4300,10 @@ declare type Relationship = {
4285
4300
  * @public
4286
4301
  */
4287
4302
  export declare type RemoteBundleState = {
4288
- state: 'loading' | 'error' | 'ready';
4289
- error: string | null;
4290
4303
  config: InternalConfig;
4291
- settings: Settings;
4292
- } & Omit<Partial<TivioJsBundleExposedApi>, 'createPlayerWrapper'> & Nullable<TivioBundle>;
4304
+ error: string | null;
4305
+ state: 'loading' | 'error' | 'ready';
4306
+ } & Nullable<TivioBundle>;
4293
4307
 
4294
4308
  /**
4295
4309
  * @public
@@ -4323,8 +4337,6 @@ export declare interface RenderConditionValue {
4323
4337
  subscriptionRefs?: any[];
4324
4338
  }
4325
4339
 
4326
- export declare const renderWebPlayer: (container: HTMLElement, props: WebPlayerProps) => void;
4327
-
4328
4340
  /**
4329
4341
  * Make all attributes in given type required, non-nullable and defined.
4330
4342
  * e.g. will make `{ attribute?: string | null }` to be `{ attribute: string }`
@@ -4816,26 +4828,6 @@ export declare interface SeekingMatrixTemplate {
4816
4828
  interval: number;
4817
4829
  }
4818
4830
 
4819
- export declare interface SeekInterceptionResult {
4820
- position: number | null;
4821
- didChangePosition: boolean;
4822
- priority: number;
4823
- }
4824
-
4825
- /**
4826
- * @public
4827
- */
4828
- export declare interface SeekInterceptor {
4829
- addInterceptor(interceptor: SeekInterceptorFunction, callback?: SeekInterceptorCallback): void;
4830
- applyInterceptors(currentPosition: number, seekPosition: number): SeekInterceptionResult;
4831
- callCallbacksAfterInterception(): void;
4832
- removeInterceptor(interceptor: SeekInterceptorFunction): void;
4833
- }
4834
-
4835
- export declare type SeekInterceptorCallback = (requestedSeekPosition: number) => void;
4836
-
4837
- export declare type SeekInterceptorFunction = (currentPosition: number, seekPosition: number) => SeekInterceptionResult;
4838
-
4839
4831
  export declare enum SemanticDate {
4840
4832
  YESTERDAY = "Yesterday",
4841
4833
  TODAY = "Today",
@@ -4905,13 +4897,6 @@ export declare interface SetCustomClaimsRequest {
4905
4897
  organizationId: string;
4906
4898
  }
4907
4899
 
4908
- export declare const setSdkReactConfig: (tivioConfig: SdkReactConfig) => void;
4909
-
4910
- declare type Settings = {
4911
- onSetUser: (handler: (userId: string, userPayload: UserPayload) => void) => void;
4912
- setUser: (userId: string, userPayload: UserPayload) => void;
4913
- };
4914
-
4915
4900
  /**
4916
4901
  * Used for entities, that can be global (e.g. asset presets, tag types).
4917
4902
  * Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
@@ -4932,6 +4917,21 @@ export declare interface SettingsItem {
4932
4917
  */
4933
4918
  export declare const setUser: (userId: string | null, payload?: UserPayload) => Promise<void>;
4934
4919
 
4920
+ export declare interface ShakaErrorDetail {
4921
+ category: number;
4922
+ code: number;
4923
+ data: Array<string | number>;
4924
+ handled: boolean;
4925
+ message: string;
4926
+ severity: ShakaErrorSeverity;
4927
+ stack: string;
4928
+ }
4929
+
4930
+ export declare enum ShakaErrorSeverity {
4931
+ RECOVERABLE = 1,
4932
+ CRITICAL = 2
4933
+ }
4934
+
4935
4935
  /**
4936
4936
  * @public
4937
4937
  */
@@ -5116,12 +5116,13 @@ export declare type SubscribeToTaggedVideosOptions = Omit<SubscribeToItemsInRowO
5116
5116
  orderBy?: OrderBy<TaggedVideosOrderByField>[];
5117
5117
  };
5118
5118
 
5119
- declare type SubscriptionInfo = {
5119
+ declare interface SubscriptionInfo {
5120
+ id: string;
5120
5121
  type: 'subscription';
5121
5122
  name: string;
5122
5123
  benefits: string[];
5123
5124
  frequency: string;
5124
- };
5125
+ }
5125
5126
 
5126
5127
  /**
5127
5128
  * @public
@@ -5131,6 +5132,17 @@ export declare interface SuccessConfirmationOverlayPayload extends ConfirmationO
5131
5132
  confirmButtonText?: string;
5132
5133
  }
5133
5134
 
5135
+ export declare interface Survey {
5136
+ items: SurveyItem[];
5137
+ }
5138
+
5139
+ export declare interface SurveyItem {
5140
+ id: string;
5141
+ imageUrl: string;
5142
+ description: string;
5143
+ title: string;
5144
+ }
5145
+
5134
5146
  export declare enum SurveyItemComponent {
5135
5147
  SURVEY = "SURVEY"
5136
5148
  }
@@ -5295,7 +5307,7 @@ export declare interface TileData<ItemSpecificData = VideoTileSpecificData | TvC
5295
5307
  itemSpecificData: ItemSpecificData;
5296
5308
  }
5297
5309
 
5298
- declare interface TileMonetizationData {
5310
+ export declare interface TileMonetizationData {
5299
5311
  id: string;
5300
5312
  path: string;
5301
5313
  placementType: 'channel' | 'tvChannel' | 'condition' | 'video' | 'section' | 'row';
@@ -5552,7 +5564,7 @@ export declare interface TivioConfig {
5552
5564
  debug?: boolean;
5553
5565
  verbose?: boolean;
5554
5566
  firebaseApp?: any | null;
5555
- firebaseFactory?: (config: Object, appName?: string) => firebase.FirebaseApp;
5567
+ firebaseFactory?: (config: Object, appName?: string) => firebase_2.FirebaseApp;
5556
5568
  authDomainOverride?: string;
5557
5569
  firestore?: any | null;
5558
5570
  currency: Currency;
@@ -5603,7 +5615,7 @@ export declare type TivioGetters = {
5603
5615
  * @returns {Promise<Monetization[] | undefined>} organization subscriptions or undefined if organization does not exists
5604
5616
  */
5605
5617
  getSubscriptions: () => Promise<Monetization[] | undefined>;
5606
- } | null;
5618
+ };
5607
5619
  /**
5608
5620
  * Get video by its id.
5609
5621
  * @param videoId - video id
@@ -5809,7 +5821,7 @@ export declare type TivioJsBundleExposedApi = {
5809
5821
  * @param id - player wrapper id
5810
5822
  * @returns {Player} player wrapper instance
5811
5823
  */
5812
- getPlayerWrapper: (id: string) => PlayerWrapper;
5824
+ getPlayerWrapper: (id: string) => Player;
5813
5825
  /**
5814
5826
  * Get tv channel by its id.
5815
5827
  * @param tvChannelId - tv channel id
@@ -5831,7 +5843,7 @@ export declare type TivioJsBundleExposedApi = {
5831
5843
  */
5832
5844
  export declare interface TivioPlayerWrapper {
5833
5845
  addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
5834
- reportError: (error: Error) => void;
5846
+ reportError: (error: Error, playerId?: string) => void;
5835
5847
  reportPlaybackEnded: () => void;
5836
5848
  reportTimeProgress: (ms: number) => void;
5837
5849
  seekTo: (ms: number) => void;
@@ -5850,12 +5862,13 @@ export declare const TivioProvider: React_2.FC<TivioProviderProps>;
5850
5862
  /**
5851
5863
  * @public
5852
5864
  */
5853
- export declare interface TivioProviderProps extends React_2.PropsWithChildren {
5865
+ export declare type TivioProviderProps = {
5854
5866
  /**
5855
5867
  * This prop must be set only once and not change value afterwards
5856
5868
  */
5857
5869
  conf: SdkReactConfig | undefined | null;
5858
- }
5870
+ children: React_2.ReactNode;
5871
+ };
5859
5872
 
5860
5873
  /**
5861
5874
  * @public
@@ -5884,7 +5897,7 @@ export declare type TivioReactBundle = {
5884
5897
  internal: TivioInternalBundle;
5885
5898
  analytics: TivioAnalytics;
5886
5899
  destroy: () => Promise<void>;
5887
- } & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'> & Omit<Partial<TivioJsBundleExposedApi>, 'createPlayerWrapper'>;
5900
+ } & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
5888
5901
 
5889
5902
  /**
5890
5903
  * @public
@@ -6034,13 +6047,16 @@ export declare interface Track {
6034
6047
  language: LangCode;
6035
6048
  }
6036
6049
 
6037
- declare type TransactionInfo = {
6050
+ declare interface TransactionInfo {
6051
+ id: string;
6038
6052
  type: 'transaction';
6039
6053
  name: string;
6040
6054
  videoId: string;
6041
6055
  cover: string;
6042
6056
  description: string;
6043
- };
6057
+ promotions?: firebase_3.firestore.DocumentReference<Promotion>[];
6058
+ fullDiscount?: boolean;
6059
+ }
6044
6060
 
6045
6061
  /**
6046
6062
  * Represents one string in every supported language mutation.
@@ -6388,6 +6404,8 @@ export declare type UseMessagesOptions = ContentOrConversationId & {
6388
6404
  autoInit?: boolean;
6389
6405
  };
6390
6406
 
6407
+ export declare type UseOrganizationSettingsReturn<TKey extends keyof OrganizationSettingsField> = OrganizationSettingsField[TKey] | undefined;
6408
+
6391
6409
  /**
6392
6410
  * @public
6393
6411
  *
@@ -6448,6 +6466,10 @@ export declare type User = {
6448
6466
  * Returns "active" (non-expired) subscription purchases
6449
6467
  */
6450
6468
  purchasedSubscriptions: Purchase[];
6469
+ /**
6470
+ * Returns voucher purchases
6471
+ */
6472
+ purchasedVouchers: Purchase[];
6451
6473
  /**
6452
6474
  * Returns last expired subscription which user can renew or undefined
6453
6475
  */
@@ -6793,12 +6815,9 @@ export declare interface Video extends RowItem, MonetizableItem, ReactableConten
6793
6815
  image: string | null;
6794
6816
  isPlayable: boolean;
6795
6817
  monetizations: Monetization[];
6796
- getSourceUrl(options?: {
6797
- language?: LangCode;
6798
- }): Promise<GetSourceUrlResponse & {
6818
+ getSourceUrl(options?: Partial<GetSourceUrlRequest>): Promise<GetSourceUrlResponse & {
6799
6819
  language?: LangCode;
6800
6820
  }>;
6801
- getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex?: number): SeekingMatrix | null;
6802
6821
  purchasableMonetization: any | null;
6803
6822
  transaction: PurchasableMonetization | undefined;
6804
6823
  subscriptions: PurchasableMonetization[];
@@ -6819,7 +6838,6 @@ export declare interface Video extends RowItem, MonetizableItem, ReactableConten
6819
6838
  organizationId?: string;
6820
6839
  linkedVideosRaw: LinkedVideoRaw[] | undefined;
6821
6840
  linkedVideos: LinkedVideo[] | undefined;
6822
- pipPaths?: string[];
6823
6841
  contentType: VideoContentType | null;
6824
6842
  year?: number;
6825
6843
  episodeNumber?: number;
@@ -6853,6 +6871,7 @@ export declare interface Video extends RowItem, MonetizableItem, ReactableConten
6853
6871
  contentDescriptors?: string[];
6854
6872
  publishedStatus?: PublishedStatus;
6855
6873
  widgetPaths?: string[];
6874
+ forcedCapabilities: PlayerCapability[] | null;
6856
6875
  }
6857
6876
 
6858
6877
  /**
@@ -7149,6 +7168,7 @@ export declare interface VodTivioSourceInterface extends PlayerSourceInterface<S
7149
7168
  canWatchOnDevice: boolean;
7150
7169
  isAvailable: boolean;
7151
7170
  availability: ContentAvailability | null;
7171
+ managementUrl?: string;
7152
7172
  video: Video;
7153
7173
  clone: (params?: Partial<VodTivioSourceParams>) => VodTivioSourceInterface;
7154
7174
  }
@@ -7162,18 +7182,38 @@ export declare interface VodTivioSourceParams extends PlayerSourceParams<SourceT
7162
7182
  language?: LangCode;
7163
7183
  drm?: Drm;
7164
7184
  ignoreWatchPosition?: boolean;
7185
+ /**
7186
+ * URL for source modification for user (e.g. add PIP window to livestream).
7187
+ * TODO mb move to PlayerSourceParams
7188
+ */
7189
+ managementUrl?: string;
7165
7190
  }
7166
7191
 
7167
7192
  /**
7168
7193
  * TODO: Should be in core-js, we can't import types from it, though.
7169
7194
  */
7170
- declare type Voucher = {
7195
+ declare interface Voucher {
7171
7196
  activate: () => void;
7172
7197
  isUsed: boolean;
7173
7198
  isExpired: boolean;
7174
7199
  status: 'NEW' | 'USED';
7175
7200
  voucherInfo: SubscriptionInfo | TransactionInfo;
7176
- };
7201
+ }
7202
+
7203
+ declare interface VoucherPageConfiguration {
7204
+ showVoucherButtonInHeader?: boolean;
7205
+ multiCreatorPage?: boolean;
7206
+ disableVoucherButtonInMonetizationCard?: boolean;
7207
+ voucherButtonText?: Translation;
7208
+ title: Translation;
7209
+ steps: {
7210
+ number: number;
7211
+ description: Translation;
7212
+ }[];
7213
+ customSorting?: {
7214
+ [key: string]: number;
7215
+ };
7216
+ }
7177
7217
 
7178
7218
  /**
7179
7219
  * @public