@tivio/sdk-react 9.1.5 → 9.1.6
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/README.md +3 -0
- package/README.md.bak +3 -0
- package/dist/index.d.ts +228 -7
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +230 -7
- package/package.json +2 -2
package/dist/sdk-react.d.ts
CHANGED
@@ -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,9 @@ 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;
|
2400
2456
|
}
|
2401
2457
|
|
2402
2458
|
/**
|
@@ -2667,7 +2723,8 @@ export declare enum MONETIZATION_FREQUENCY {
|
|
2667
2723
|
WEEKLY = "WEEKLY",
|
2668
2724
|
MONTHLY = "MONTHLY",
|
2669
2725
|
HALF_ANNUALLY = "HALF_ANNUALLY",
|
2670
|
-
ANNUALLY = "ANNUALLY"
|
2726
|
+
ANNUALLY = "ANNUALLY",
|
2727
|
+
EVENT = "EVENT"
|
2671
2728
|
}
|
2672
2729
|
|
2673
2730
|
/**
|
@@ -3556,6 +3613,8 @@ export declare interface PlayerSourceParams<T extends NonAdSourceType = NonAdSou
|
|
3556
3613
|
from?: Date;
|
3557
3614
|
sourceHistory?: string[];
|
3558
3615
|
seekingMatrix?: SeekingMatrixTemplate;
|
3616
|
+
sessionType?: VideoSourceField['sessionType'];
|
3617
|
+
sessionId?: string;
|
3559
3618
|
}
|
3560
3619
|
|
3561
3620
|
export declare type PlayersScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.PLAYERS>;
|
@@ -3658,6 +3717,80 @@ export declare enum PlayerWrapperEventType {
|
|
3658
3717
|
*/
|
3659
3718
|
export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
|
3660
3719
|
|
3720
|
+
export declare enum primaPlusMonetizationLevel {
|
3721
|
+
light = "z7soJTA2dYSxnOOJw7B0",
|
3722
|
+
premium = "kwfM0D7Vzv5wfLf5go8o",
|
3723
|
+
noAds = "L4dzWZHCZenezYawqEbl"
|
3724
|
+
}
|
3725
|
+
|
3726
|
+
export declare interface primaPlusRefreshTokenResponse {
|
3727
|
+
result?: {
|
3728
|
+
data: {
|
3729
|
+
payload: {
|
3730
|
+
sessionId: string | null;
|
3731
|
+
userUuid: string;
|
3732
|
+
accessToken: {
|
3733
|
+
token: string;
|
3734
|
+
insecure: boolean;
|
3735
|
+
expiresAt: string;
|
3736
|
+
};
|
3737
|
+
refreshToken: {
|
3738
|
+
token: string;
|
3739
|
+
insecure: boolean;
|
3740
|
+
expiresAt: string;
|
3741
|
+
};
|
3742
|
+
};
|
3743
|
+
};
|
3744
|
+
datetime: string;
|
3745
|
+
};
|
3746
|
+
error?: {
|
3747
|
+
code: number;
|
3748
|
+
message: string;
|
3749
|
+
datetime: string;
|
3750
|
+
};
|
3751
|
+
}
|
3752
|
+
|
3753
|
+
export declare interface primaPlusSubscription {
|
3754
|
+
result?: {
|
3755
|
+
data: {
|
3756
|
+
subscription: {
|
3757
|
+
currentSubscription?: currentSubscription;
|
3758
|
+
};
|
3759
|
+
};
|
3760
|
+
};
|
3761
|
+
error?: {
|
3762
|
+
code: number;
|
3763
|
+
message: string;
|
3764
|
+
datetime: string;
|
3765
|
+
};
|
3766
|
+
}
|
3767
|
+
|
3768
|
+
export declare enum primaSubscriptionItemType {
|
3769
|
+
REGISTERED = "REGISTERED",
|
3770
|
+
HVOD_STANDARD = "HVOD_STANDARD",
|
3771
|
+
SVOD_STANDARD = "SVOD_STANDARD",
|
3772
|
+
IPBR_STANDARD = "IPBR_STANDARD",
|
3773
|
+
PREMIUM_STANDARD = "PREMIUM_STANDARD",
|
3774
|
+
IPRIMA_NO_ADS_STANDARD = "IPRIMA_NO_ADS_STANDARD",
|
3775
|
+
HVOD_PARTIAL = "HVOD_PARTIAL",
|
3776
|
+
IPBR_PARTIAL = "IPBR_PARTIAL",
|
3777
|
+
PREMIUM_PARTIAL = "PREMIUM_PARTIAL",
|
3778
|
+
IPRIMA_NO_ADS_PARTIAL = "IPRIMA_NO_ADS_PARTIAL",
|
3779
|
+
SVOD_PREPAID_VOUCHER = "SVOD_PREPAID_VOUCHER",
|
3780
|
+
SVOD_DISCOUNT_VOUCHER = "SVOD_DISCOUNT_VOUCHER",
|
3781
|
+
HVOD_PREPAID_VOUCHER = "HVOD_PREPAID_VOUCHER",
|
3782
|
+
HVOD_DISCOUNT_VOUCHER = "HVOD_DISCOUNT_VOUCHER"
|
3783
|
+
}
|
3784
|
+
|
3785
|
+
declare enum primaSupportedCurrency {
|
3786
|
+
CZK = "CZK",
|
3787
|
+
EUR = "EUR",
|
3788
|
+
PLN = "PLN",
|
3789
|
+
USD = "USD",
|
3790
|
+
GBP = "GBP",
|
3791
|
+
HUF = "HUF"
|
3792
|
+
}
|
3793
|
+
|
3661
3794
|
/**
|
3662
3795
|
* Values that user entered in survey for given profile.
|
3663
3796
|
*/
|
@@ -3818,7 +3951,8 @@ export declare enum PurchaseDocumentGateway {
|
|
3818
3951
|
'patreon' = "patreon",
|
3819
3952
|
'paypal' = "paypal",
|
3820
3953
|
'unknown' = "unknown",
|
3821
|
-
'stargaze' = "stargaze"
|
3954
|
+
'stargaze' = "stargaze",
|
3955
|
+
'prima' = "prima"
|
3822
3956
|
}
|
3823
3957
|
|
3824
3958
|
/**
|
@@ -4305,6 +4439,76 @@ export declare type RemoteBundleState = {
|
|
4305
4439
|
state: 'loading' | 'error' | 'ready';
|
4306
4440
|
} & Nullable<TivioBundle>;
|
4307
4441
|
|
4442
|
+
export declare interface RemoteControlGenerateSourceResponse {
|
4443
|
+
sessionId?: string;
|
4444
|
+
url?: string;
|
4445
|
+
}
|
4446
|
+
|
4447
|
+
export declare interface RemoteControlGetSourceUrlPayload {
|
4448
|
+
videoId: string;
|
4449
|
+
userId: string;
|
4450
|
+
profileId: string;
|
4451
|
+
capabilities: PlayerCapability[];
|
4452
|
+
activeVideoId: string;
|
4453
|
+
}
|
4454
|
+
|
4455
|
+
/**
|
4456
|
+
* @public
|
4457
|
+
*/
|
4458
|
+
export declare interface RemoteControllerProps {
|
4459
|
+
video: Video;
|
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
|
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
|
*/
|
@@ -6912,11 +7128,12 @@ export declare interface VideoHighlight {
|
|
6912
7128
|
id: string;
|
6913
7129
|
title: string;
|
6914
7130
|
description?: string;
|
6915
|
-
|
6916
|
-
|
7131
|
+
fromSegment?: number;
|
7132
|
+
toSegment?: number;
|
6917
7133
|
imageUrl?: string;
|
6918
7134
|
videoTime?: string;
|
6919
7135
|
videoId?: string;
|
7136
|
+
created?: Date;
|
6920
7137
|
}
|
6921
7138
|
|
6922
7139
|
declare type VideoPath = string;
|
@@ -7171,6 +7388,7 @@ export declare interface VodTivioSourceInterface extends PlayerSourceInterface<S
|
|
7171
7388
|
managementUrl?: string;
|
7172
7389
|
video: Video;
|
7173
7390
|
clone: (params?: Partial<VodTivioSourceParams>) => VodTivioSourceInterface;
|
7391
|
+
sessionType?: VideoSourceField['sessionType'];
|
7174
7392
|
}
|
7175
7393
|
|
7176
7394
|
/**
|
@@ -7185,8 +7403,13 @@ export declare interface VodTivioSourceParams extends PlayerSourceParams<SourceT
|
|
7185
7403
|
/**
|
7186
7404
|
* URL for source modification for user (e.g. add PIP window to livestream).
|
7187
7405
|
* TODO mb move to PlayerSourceParams
|
7406
|
+
* TODO: Remove managementUrl
|
7188
7407
|
*/
|
7189
7408
|
managementUrl?: string;
|
7409
|
+
/**
|
7410
|
+
* Session ID for authentication and optionally controlling the cameras
|
7411
|
+
*/
|
7412
|
+
sessionId?: string;
|
7190
7413
|
}
|
7191
7414
|
|
7192
7415
|
/**
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "9.1.
|
3
|
+
"version": "9.1.6",
|
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.
|
41
|
+
"@tivio/common": "1.1.128",
|
42
42
|
"dayjs": "^1.11.0",
|
43
43
|
"es7-object-polyfill": "^1.0.1",
|
44
44
|
"firebase": "8.10.1",
|