@tivio/sdk-react 9.1.5 → 9.1.7

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.
@@ -28,6 +28,11 @@ export declare interface ActivatedPromotionsWithIdsResponse {
28
28
 
29
29
  export declare type ActivateVoucherResponse = string | ActivatedPromotionsResponse | ActivatedPromotionsWithIdsResponse;
30
30
 
31
+ declare interface actualPriceDetails {
32
+ amountCents: number;
33
+ currency?: primaSupportedCurrency;
34
+ }
35
+
31
36
  export declare type AdBannerScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.AD_BANNER>;
32
37
 
33
38
  export declare type AddEditCommentResponse = {
@@ -882,6 +887,22 @@ export declare type ContentType = 'ARTICLE' | 'VIDEO' | 'SERIES' | 'EPISODE';
882
887
  */
883
888
  export declare type ContinuePosition = number | null | Promise<number | null>;
884
889
 
890
+ export declare interface ControlPlayback {
891
+ delaySegmentCount?: number;
892
+ status: ControlPlaybackStatus;
893
+ }
894
+
895
+ export declare enum ControlPlaybackStatus {
896
+ PAUSED = "paused",
897
+ PLAYING = "playing"
898
+ }
899
+
900
+ export declare interface ControlReplay {
901
+ videoId: string;
902
+ fromSegment?: number;
903
+ toSegment?: number;
904
+ }
905
+
885
906
  /**
886
907
  * @public
887
908
  */
@@ -1097,6 +1118,14 @@ export declare interface CurrentQuestion {
1097
1118
 
1098
1119
  export declare type CurrentQuestionScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.CURRENT_QUESTION>;
1099
1120
 
1121
+ export declare interface currentSubscription {
1122
+ subscriptionId?: string;
1123
+ subscriptionItemType: primaSubscriptionItemType;
1124
+ startDatetime?: Date;
1125
+ endDateTime?: Date;
1126
+ actualPrice: actualPriceDetails;
1127
+ }
1128
+
1100
1129
  /**
1101
1130
  * @public
1102
1131
  */
@@ -1154,7 +1183,8 @@ export declare enum CustomerId {
1154
1183
  LEPSI_UZ_TO_NEBUDE = "LEPSI_UZ_TO_NEBUDE",
1155
1184
  BEAT_SEXISM = "BEAT_SEXISM",
1156
1185
  KAROL_A_KVIDO = "KAROL_A_KVIDO",
1157
- UZ_BUDU = "UZ_BUDU"
1186
+ UZ_BUDU = "UZ_BUDU",
1187
+ PRIMA = "PRIMA"
1158
1188
  }
1159
1189
 
1160
1190
  /**
@@ -1285,6 +1315,7 @@ export declare interface Customizations {
1285
1315
  color: string;
1286
1316
  mobileColor?: string;
1287
1317
  display?: 'none' | 'block';
1318
+ durationUnitTexts?: DurationUnitTexts;
1288
1319
  };
1289
1320
  OverlayControls?: {
1290
1321
  size?: number;
@@ -1518,6 +1549,15 @@ export declare enum DurationUnits {
1518
1549
  MONTH = "month"
1519
1550
  }
1520
1551
 
1552
+ /**
1553
+ * Custom text for duration units used by formatDuration
1554
+ */
1555
+ export declare interface DurationUnitTexts {
1556
+ hour: string;
1557
+ minute: string;
1558
+ seconds?: string;
1559
+ }
1560
+
1521
1561
  /**
1522
1562
  * Duration field using dayjs duration
1523
1563
  */
@@ -1705,6 +1745,14 @@ export declare interface ForbiddenOnCallError extends GenericOnCallError {
1705
1745
  export declare enum ForbiddenReason {
1706
1746
  MONETIZATION = "MONETIZATION",
1707
1747
  GEO_BLOCKING = "GEO_BLOCKING",
1748
+ EMAIL_ALREADY_EXISTS = "EMAIL_ALREADY_EXISTS",
1749
+ EMAIL_CONTAINS_PLUS_SIGN = "EMAIL_CONTAINS_PLUS_SIGN",
1750
+ EMAIL_NOT_VERIFIED = "EMAIL_NOT_VERIFIED",
1751
+ INVALID_BIRTH_YEAR = "INVALID_BIRTH_YEAR",
1752
+ INVALID_EMAIL_ADDRESS = "INVALID_EMAIL_ADDRESS",
1753
+ NAME_CONTAINS_INVALID_CHAR = "NAME_CONTAINS_INVALID_CHAR",
1754
+ USER_ACCOUNT_LOCKED = "USER_ACCOUNT_LOCKED",
1755
+ USER_NOT_FOUND = "USER_NOT_FOUND",
1708
1756
  UNSUPPORTED_BROWSER = "UNSUPPORTED_BROWSER"
1709
1757
  }
1710
1758
 
@@ -1792,6 +1840,7 @@ export declare const getPubSub: () => PubSub;
1792
1840
  */
1793
1841
  export declare interface GetPurchasableMonetizationsOptions {
1794
1842
  includeMonetizationsWithPurchaseDisabled: boolean;
1843
+ ignoreActiveOrganizationCheck?: boolean;
1795
1844
  }
1796
1845
 
1797
1846
  /**
@@ -1892,6 +1941,10 @@ export declare interface GetSourceUrlResponse {
1892
1941
  * Current session id for given user and source.
1893
1942
  */
1894
1943
  sessionId?: string;
1944
+ /**
1945
+ * Active content (e.g. video) id in generated session.
1946
+ */
1947
+ activeContentId?: string;
1895
1948
  /**
1896
1949
  * Template for generating image previews for user scrubbing in player.
1897
1950
  */
@@ -2099,6 +2152,7 @@ export declare interface IndexedVideo extends IndexedObject {
2099
2152
  */
2100
2153
  export declare interface InputOptions {
2101
2154
  borderRadius: string;
2155
+ borderColor?: string;
2102
2156
  backgroundColor?: string;
2103
2157
  color?: string;
2104
2158
  }
@@ -2396,7 +2450,10 @@ export declare interface LinkedVideo {
2396
2450
  /**
2397
2451
  * Will not render separate player, it will override main video source.
2398
2452
  */
2399
- | 'COMPOSED_PIP';
2453
+ | 'COMPOSED_PIP' | 'MATRIX';
2454
+ name?: string;
2455
+ color?: string;
2456
+ language?: LangCode;
2400
2457
  }
2401
2458
 
2402
2459
  /**
@@ -2667,7 +2724,8 @@ export declare enum MONETIZATION_FREQUENCY {
2667
2724
  WEEKLY = "WEEKLY",
2668
2725
  MONTHLY = "MONTHLY",
2669
2726
  HALF_ANNUALLY = "HALF_ANNUALLY",
2670
- ANNUALLY = "ANNUALLY"
2727
+ ANNUALLY = "ANNUALLY",
2728
+ EVENT = "EVENT"
2671
2729
  }
2672
2730
 
2673
2731
  /**
@@ -3556,6 +3614,8 @@ export declare interface PlayerSourceParams<T extends NonAdSourceType = NonAdSou
3556
3614
  from?: Date;
3557
3615
  sourceHistory?: string[];
3558
3616
  seekingMatrix?: SeekingMatrixTemplate;
3617
+ sessionType?: VideoSourceField['sessionType'];
3618
+ sessionId?: string;
3559
3619
  }
3560
3620
 
3561
3621
  export declare type PlayersScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.PLAYERS>;
@@ -3658,6 +3718,80 @@ export declare enum PlayerWrapperEventType {
3658
3718
  */
3659
3719
  export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
3660
3720
 
3721
+ export declare enum primaPlusMonetizationLevel {
3722
+ light = "z7soJTA2dYSxnOOJw7B0",
3723
+ premium = "kwfM0D7Vzv5wfLf5go8o",
3724
+ noAds = "L4dzWZHCZenezYawqEbl"
3725
+ }
3726
+
3727
+ export declare interface primaPlusRefreshTokenResponse {
3728
+ result?: {
3729
+ data: {
3730
+ payload: {
3731
+ sessionId: string | null;
3732
+ userUuid: string;
3733
+ accessToken: {
3734
+ token: string;
3735
+ insecure: boolean;
3736
+ expiresAt: string;
3737
+ };
3738
+ refreshToken: {
3739
+ token: string;
3740
+ insecure: boolean;
3741
+ expiresAt: string;
3742
+ };
3743
+ };
3744
+ };
3745
+ datetime: string;
3746
+ };
3747
+ error?: {
3748
+ code: number;
3749
+ message: string;
3750
+ datetime: string;
3751
+ };
3752
+ }
3753
+
3754
+ export declare interface primaPlusSubscription {
3755
+ result?: {
3756
+ data: {
3757
+ subscription: {
3758
+ currentSubscription?: currentSubscription;
3759
+ };
3760
+ };
3761
+ };
3762
+ error?: {
3763
+ code: number;
3764
+ message: string;
3765
+ datetime: string;
3766
+ };
3767
+ }
3768
+
3769
+ export declare enum primaSubscriptionItemType {
3770
+ REGISTERED = "REGISTERED",
3771
+ HVOD_STANDARD = "HVOD_STANDARD",
3772
+ SVOD_STANDARD = "SVOD_STANDARD",
3773
+ IPBR_STANDARD = "IPBR_STANDARD",
3774
+ PREMIUM_STANDARD = "PREMIUM_STANDARD",
3775
+ IPRIMA_NO_ADS_STANDARD = "IPRIMA_NO_ADS_STANDARD",
3776
+ HVOD_PARTIAL = "HVOD_PARTIAL",
3777
+ IPBR_PARTIAL = "IPBR_PARTIAL",
3778
+ PREMIUM_PARTIAL = "PREMIUM_PARTIAL",
3779
+ IPRIMA_NO_ADS_PARTIAL = "IPRIMA_NO_ADS_PARTIAL",
3780
+ SVOD_PREPAID_VOUCHER = "SVOD_PREPAID_VOUCHER",
3781
+ SVOD_DISCOUNT_VOUCHER = "SVOD_DISCOUNT_VOUCHER",
3782
+ HVOD_PREPAID_VOUCHER = "HVOD_PREPAID_VOUCHER",
3783
+ HVOD_DISCOUNT_VOUCHER = "HVOD_DISCOUNT_VOUCHER"
3784
+ }
3785
+
3786
+ declare enum primaSupportedCurrency {
3787
+ CZK = "CZK",
3788
+ EUR = "EUR",
3789
+ PLN = "PLN",
3790
+ USD = "USD",
3791
+ GBP = "GBP",
3792
+ HUF = "HUF"
3793
+ }
3794
+
3661
3795
  /**
3662
3796
  * Values that user entered in survey for given profile.
3663
3797
  */
@@ -3818,7 +3952,8 @@ export declare enum PurchaseDocumentGateway {
3818
3952
  'patreon' = "patreon",
3819
3953
  'paypal' = "paypal",
3820
3954
  'unknown' = "unknown",
3821
- 'stargaze' = "stargaze"
3955
+ 'stargaze' = "stargaze",
3956
+ 'prima' = "prima"
3822
3957
  }
3823
3958
 
3824
3959
  /**
@@ -4305,6 +4440,75 @@ export declare type RemoteBundleState = {
4305
4440
  state: 'loading' | 'error' | 'ready';
4306
4441
  } & Nullable<TivioBundle>;
4307
4442
 
4443
+ export declare interface RemoteControlGenerateSourceResponse {
4444
+ sessionId?: string;
4445
+ url?: string;
4446
+ }
4447
+
4448
+ export declare interface RemoteControlGetSourceUrlPayload {
4449
+ videoId: string;
4450
+ userId: string;
4451
+ profileId: string;
4452
+ capabilities: PlayerCapability[];
4453
+ activeVideoId: string;
4454
+ }
4455
+
4456
+ /**
4457
+ * @public
4458
+ */
4459
+ export declare interface RemoteControllerProps {
4460
+ className?: string;
4461
+ }
4462
+
4463
+ export declare enum RemoteControlMethod {
4464
+ pairDevice = "pairDevice",
4465
+ unpairDevice = "unpairDevice",
4466
+ playHighlight = "playHighlight",
4467
+ playbackControl = "playbackControl",
4468
+ selectCamera = "selectCamera",
4469
+ getSourceUrl = "getSourceUrl"
4470
+ }
4471
+
4472
+ export declare interface RemoteControlPairPayload {
4473
+ code: string;
4474
+ videoId: string;
4475
+ profileId: string;
4476
+ }
4477
+
4478
+ export declare interface RemoteControlPlaybackControlPayload {
4479
+ sessionId: string;
4480
+ videoId: string;
4481
+ playback: ControlPlayback;
4482
+ activeVideoId?: string;
4483
+ }
4484
+
4485
+ export declare interface RemoteControlPlayHighlightPayload {
4486
+ sessionId: string;
4487
+ videoId: string;
4488
+ activeVideoId: string;
4489
+ replay: ControlReplay;
4490
+ }
4491
+
4492
+ export declare type RemoteControlRequest = RemoteControlRequestBase<RemoteControlMethod.pairDevice> | RemoteControlRequestBase<RemoteControlMethod.unpairDevice> | RemoteControlRequestBase<RemoteControlMethod.playHighlight> | RemoteControlRequestBase<RemoteControlMethod.playbackControl> | RemoteControlRequestBase<RemoteControlMethod.selectCamera> | RemoteControlRequestBase<RemoteControlMethod.getSourceUrl>;
4493
+
4494
+ declare interface RemoteControlRequestBase<TMethod extends RemoteControlMethod> {
4495
+ method: TMethod;
4496
+ payload: RemoteControlRequestPayload<TMethod>;
4497
+ }
4498
+
4499
+ export declare type RemoteControlRequestPayload<TMethod extends RemoteControlMethod> = TMethod extends RemoteControlMethod.pairDevice ? RemoteControlPairPayload : TMethod extends RemoteControlMethod.unpairDevice ? RemoteControlUnpairPayload : TMethod extends RemoteControlMethod.playHighlight ? RemoteControlPlayHighlightPayload : TMethod extends RemoteControlMethod.playbackControl ? RemoteControlPlaybackControlPayload : TMethod extends RemoteControlMethod.selectCamera ? RemoteControlSelectCameraPayload : TMethod extends RemoteControlMethod.getSourceUrl ? RemoteControlGetSourceUrlPayload : object;
4500
+
4501
+ export declare interface RemoteControlSelectCameraPayload {
4502
+ sessionId: string;
4503
+ videoId: string;
4504
+ activeVideoId: string;
4505
+ }
4506
+
4507
+ export declare interface RemoteControlUnpairPayload {
4508
+ sessionId: string;
4509
+ videoId: string;
4510
+ }
4511
+
4308
4512
  /**
4309
4513
  * @public
4310
4514
  */
@@ -5147,7 +5351,9 @@ export declare enum SurveyItemComponent {
5147
5351
  SURVEY = "SURVEY"
5148
5352
  }
5149
5353
 
5150
- export declare type SynchronizeUserTypeFunction = (payload: CreateUserPayload, tenantId: string, tenantUserId: string, organizationId?: string) => Promise<string>;
5354
+ export declare type SynchronizeUserTypeFunction = (payload: CreateUserPayload, tenantId: string, tenantUserId: string, organizationId?: string, additionalData?: {
5355
+ [key: string]: any;
5356
+ }) => Promise<string>;
5151
5357
 
5152
5358
  /**
5153
5359
  * @public
@@ -5537,6 +5743,7 @@ export declare interface TivioComponents {
5537
5743
  ContentSortPicker: React_2.ComponentType<ContentSortPickerProps>;
5538
5744
  WebProfileScreen: React_2.ComponentType<WebProfileScreenProps>;
5539
5745
  WebTivioProVideoScreen: React_2.ComponentType<WebTivioProVideoScreenProps>;
5746
+ RemoteController: React_2.ComponentType<RemoteControllerProps>;
5540
5747
  }
5541
5748
 
5542
5749
  /**
@@ -6510,6 +6717,7 @@ export declare type User = {
6510
6717
  invalidateAllTokens: (type: TokenType) => Promise<void>;
6511
6718
  isPartiallyRegistered: boolean;
6512
6719
  conversationStore: ConversationStore;
6720
+ streamingSessions?: UserStreamingSessionFieldInterface[];
6513
6721
  };
6514
6722
 
6515
6723
  /**
@@ -6576,6 +6784,14 @@ export declare type UserProfile = {
6576
6784
  survey?: ProfileSurvey;
6577
6785
  };
6578
6786
 
6787
+ export declare interface UserStreamingSessionFieldInterface {
6788
+ sessionId: string;
6789
+ sessionType: Exclude<VideoSourceField['sessionType'], undefined>;
6790
+ contentId: string;
6791
+ activeContentId?: string;
6792
+ created: Date;
6793
+ }
6794
+
6579
6795
  /**
6580
6796
  * @public
6581
6797
  */
@@ -6865,6 +7081,8 @@ export declare interface Video extends RowItem, MonetizableItem, ReactableConten
6865
7081
  initApplication: () => Promise<void>;
6866
7082
  init: () => Promise<void>;
6867
7083
  progress?: number;
7084
+ purchasableMonetizationPurchase: Purchase | null;
7085
+ purchaseByVideoId: Purchase | null;
6868
7086
  backgroundBlurBannerMobile?: string | null;
6869
7087
  isWatched?: boolean;
6870
7088
  pgRating?: string;
@@ -6872,6 +7090,8 @@ export declare interface Video extends RowItem, MonetizableItem, ReactableConten
6872
7090
  publishedStatus?: PublishedStatus;
6873
7091
  widgetPaths?: string[];
6874
7092
  forcedCapabilities: PlayerCapability[] | null;
7093
+ mainLinkedVideoId?: string;
7094
+ getLinkedVideoIdByLanguage: (lang: LangCode) => string | undefined;
6875
7095
  }
6876
7096
 
6877
7097
  /**
@@ -6912,11 +7132,12 @@ export declare interface VideoHighlight {
6912
7132
  id: string;
6913
7133
  title: string;
6914
7134
  description?: string;
6915
- fromTimestamp?: number;
6916
- toTimestamp?: number;
7135
+ fromSegment?: number;
7136
+ toSegment?: number;
6917
7137
  imageUrl?: string;
6918
7138
  videoTime?: string;
6919
7139
  videoId?: string;
7140
+ created?: Date;
6920
7141
  }
6921
7142
 
6922
7143
  declare type VideoPath = string;
@@ -7168,9 +7389,10 @@ export declare interface VodTivioSourceInterface extends PlayerSourceInterface<S
7168
7389
  canWatchOnDevice: boolean;
7169
7390
  isAvailable: boolean;
7170
7391
  availability: ContentAvailability | null;
7171
- managementUrl?: string;
7172
7392
  video: Video;
7173
7393
  clone: (params?: Partial<VodTivioSourceParams>) => VodTivioSourceInterface;
7394
+ sessionType?: VideoSourceField['sessionType'];
7395
+ sessionId?: string;
7174
7396
  }
7175
7397
 
7176
7398
  /**
@@ -7183,10 +7405,9 @@ export declare interface VodTivioSourceParams extends PlayerSourceParams<SourceT
7183
7405
  drm?: Drm;
7184
7406
  ignoreWatchPosition?: boolean;
7185
7407
  /**
7186
- * URL for source modification for user (e.g. add PIP window to livestream).
7187
- * TODO mb move to PlayerSourceParams
7408
+ * Session ID for authentication and optionally controlling the cameras
7188
7409
  */
7189
- managementUrl?: string;
7410
+ sessionId?: string;
7190
7411
  }
7191
7412
 
7192
7413
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tivio/sdk-react",
3
- "version": "9.1.5",
3
+ "version": "9.1.7",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "source": "src/index.ts",
@@ -38,7 +38,7 @@
38
38
  "@material-ui/core": "^4.11.2",
39
39
  "@material-ui/icons": "^4.11.2",
40
40
  "@sentry/browser": "^6.1.0",
41
- "@tivio/common": "1.1.127",
41
+ "@tivio/common": "1.1.129",
42
42
  "dayjs": "^1.11.0",
43
43
  "es7-object-polyfill": "^1.0.1",
44
44
  "firebase": "8.10.1",