@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/README.md
CHANGED
@@ -5,6 +5,9 @@ above Tivio Studio. You can comfortably manage all you videos, settings such as
|
|
5
5
|
settings in the administration of Tivio Studio while having the freedom to build your own application.
|
6
6
|
|
7
7
|
## Changelog
|
8
|
+
* 9.1.6
|
9
|
+
* minor: add remote controller
|
10
|
+
|
8
11
|
* 9.1.5
|
9
12
|
* patch: expose purchase loyalty points through types
|
10
13
|
|
package/README.md.bak
CHANGED
@@ -5,6 +5,9 @@ above Tivio Studio. You can comfortably manage all you videos, settings such as
|
|
5
5
|
settings in the administration of Tivio Studio while having the freedom to build your own application.
|
6
6
|
|
7
7
|
## Changelog
|
8
|
+
* 9.1.6
|
9
|
+
* minor: add remote controller
|
10
|
+
|
8
11
|
* 9.1.5
|
9
12
|
* patch: expose purchase loyalty points through types
|
10
13
|
|
package/dist/index.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 = {
|
@@ -854,6 +859,22 @@ export declare type ContentType = 'ARTICLE' | 'VIDEO' | 'SERIES' | 'EPISODE';
|
|
854
859
|
*/
|
855
860
|
export declare type ContinuePosition = number | null | Promise<number | null>;
|
856
861
|
|
862
|
+
export declare interface ControlPlayback {
|
863
|
+
delaySegmentCount?: number;
|
864
|
+
status: ControlPlaybackStatus;
|
865
|
+
}
|
866
|
+
|
867
|
+
export declare enum ControlPlaybackStatus {
|
868
|
+
PAUSED = "paused",
|
869
|
+
PLAYING = "playing"
|
870
|
+
}
|
871
|
+
|
872
|
+
export declare interface ControlReplay {
|
873
|
+
videoId: string;
|
874
|
+
fromSegment?: number;
|
875
|
+
toSegment?: number;
|
876
|
+
}
|
877
|
+
|
857
878
|
/**
|
858
879
|
* @public
|
859
880
|
*/
|
@@ -1069,6 +1090,14 @@ export declare interface CurrentQuestion {
|
|
1069
1090
|
|
1070
1091
|
export declare type CurrentQuestionScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.CURRENT_QUESTION>;
|
1071
1092
|
|
1093
|
+
export declare interface currentSubscription {
|
1094
|
+
subscriptionId?: string;
|
1095
|
+
subscriptionItemType: primaSubscriptionItemType;
|
1096
|
+
startDatetime?: Date;
|
1097
|
+
endDateTime?: Date;
|
1098
|
+
actualPrice: actualPriceDetails;
|
1099
|
+
}
|
1100
|
+
|
1072
1101
|
/**
|
1073
1102
|
* @public
|
1074
1103
|
*/
|
@@ -1126,7 +1155,8 @@ export declare enum CustomerId {
|
|
1126
1155
|
LEPSI_UZ_TO_NEBUDE = "LEPSI_UZ_TO_NEBUDE",
|
1127
1156
|
BEAT_SEXISM = "BEAT_SEXISM",
|
1128
1157
|
KAROL_A_KVIDO = "KAROL_A_KVIDO",
|
1129
|
-
UZ_BUDU = "UZ_BUDU"
|
1158
|
+
UZ_BUDU = "UZ_BUDU",
|
1159
|
+
PRIMA = "PRIMA"
|
1130
1160
|
}
|
1131
1161
|
|
1132
1162
|
export declare interface CustomScript {
|
@@ -1280,6 +1310,15 @@ export declare enum DurationUnits {
|
|
1280
1310
|
MONTH = "month"
|
1281
1311
|
}
|
1282
1312
|
|
1313
|
+
/**
|
1314
|
+
* Custom text for duration units used by formatDuration
|
1315
|
+
*/
|
1316
|
+
export declare interface DurationUnitTexts {
|
1317
|
+
hour: string;
|
1318
|
+
minute: string;
|
1319
|
+
seconds?: string;
|
1320
|
+
}
|
1321
|
+
|
1283
1322
|
/**
|
1284
1323
|
* Duration field using dayjs duration
|
1285
1324
|
*/
|
@@ -1467,6 +1506,14 @@ export declare interface ForbiddenOnCallError extends GenericOnCallError {
|
|
1467
1506
|
export declare enum ForbiddenReason {
|
1468
1507
|
MONETIZATION = "MONETIZATION",
|
1469
1508
|
GEO_BLOCKING = "GEO_BLOCKING",
|
1509
|
+
EMAIL_ALREADY_EXISTS = "EMAIL_ALREADY_EXISTS",
|
1510
|
+
EMAIL_CONTAINS_PLUS_SIGN = "EMAIL_CONTAINS_PLUS_SIGN",
|
1511
|
+
EMAIL_NOT_VERIFIED = "EMAIL_NOT_VERIFIED",
|
1512
|
+
INVALID_BIRTH_YEAR = "INVALID_BIRTH_YEAR",
|
1513
|
+
INVALID_EMAIL_ADDRESS = "INVALID_EMAIL_ADDRESS",
|
1514
|
+
NAME_CONTAINS_INVALID_CHAR = "NAME_CONTAINS_INVALID_CHAR",
|
1515
|
+
USER_ACCOUNT_LOCKED = "USER_ACCOUNT_LOCKED",
|
1516
|
+
USER_NOT_FOUND = "USER_NOT_FOUND",
|
1470
1517
|
UNSUPPORTED_BROWSER = "UNSUPPORTED_BROWSER"
|
1471
1518
|
}
|
1472
1519
|
|
@@ -1554,6 +1601,7 @@ export declare const getPubSub: () => PubSub;
|
|
1554
1601
|
*/
|
1555
1602
|
export declare interface GetPurchasableMonetizationsOptions {
|
1556
1603
|
includeMonetizationsWithPurchaseDisabled: boolean;
|
1604
|
+
ignoreActiveOrganizationCheck?: boolean;
|
1557
1605
|
}
|
1558
1606
|
|
1559
1607
|
/**
|
@@ -1654,6 +1702,10 @@ export declare interface GetSourceUrlResponse {
|
|
1654
1702
|
* Current session id for given user and source.
|
1655
1703
|
*/
|
1656
1704
|
sessionId?: string;
|
1705
|
+
/**
|
1706
|
+
* Active content (e.g. video) id in generated session.
|
1707
|
+
*/
|
1708
|
+
activeContentId?: string;
|
1657
1709
|
/**
|
1658
1710
|
* Template for generating image previews for user scrubbing in player.
|
1659
1711
|
*/
|
@@ -2149,7 +2201,9 @@ export declare interface LinkedVideo {
|
|
2149
2201
|
/**
|
2150
2202
|
* Will not render separate player, it will override main video source.
|
2151
2203
|
*/
|
2152
|
-
| 'COMPOSED_PIP';
|
2204
|
+
| 'COMPOSED_PIP' | 'MATRIX';
|
2205
|
+
name?: string;
|
2206
|
+
color?: string;
|
2153
2207
|
}
|
2154
2208
|
|
2155
2209
|
/**
|
@@ -2420,7 +2474,8 @@ export declare enum MONETIZATION_FREQUENCY {
|
|
2420
2474
|
WEEKLY = "WEEKLY",
|
2421
2475
|
MONTHLY = "MONTHLY",
|
2422
2476
|
HALF_ANNUALLY = "HALF_ANNUALLY",
|
2423
|
-
ANNUALLY = "ANNUALLY"
|
2477
|
+
ANNUALLY = "ANNUALLY",
|
2478
|
+
EVENT = "EVENT"
|
2424
2479
|
}
|
2425
2480
|
|
2426
2481
|
/**
|
@@ -3299,6 +3354,8 @@ export declare interface PlayerSourceParams<T extends NonAdSourceType = NonAdSou
|
|
3299
3354
|
from?: Date;
|
3300
3355
|
sourceHistory?: string[];
|
3301
3356
|
seekingMatrix?: SeekingMatrixTemplate;
|
3357
|
+
sessionType?: VideoSourceField['sessionType'];
|
3358
|
+
sessionId?: string;
|
3302
3359
|
}
|
3303
3360
|
|
3304
3361
|
export declare type PlayersScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.PLAYERS>;
|
@@ -3401,6 +3458,80 @@ export declare enum PlayerWrapperEventType {
|
|
3401
3458
|
*/
|
3402
3459
|
export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
|
3403
3460
|
|
3461
|
+
export declare enum primaPlusMonetizationLevel {
|
3462
|
+
light = "z7soJTA2dYSxnOOJw7B0",
|
3463
|
+
premium = "kwfM0D7Vzv5wfLf5go8o",
|
3464
|
+
noAds = "L4dzWZHCZenezYawqEbl"
|
3465
|
+
}
|
3466
|
+
|
3467
|
+
export declare interface primaPlusRefreshTokenResponse {
|
3468
|
+
result?: {
|
3469
|
+
data: {
|
3470
|
+
payload: {
|
3471
|
+
sessionId: string | null;
|
3472
|
+
userUuid: string;
|
3473
|
+
accessToken: {
|
3474
|
+
token: string;
|
3475
|
+
insecure: boolean;
|
3476
|
+
expiresAt: string;
|
3477
|
+
};
|
3478
|
+
refreshToken: {
|
3479
|
+
token: string;
|
3480
|
+
insecure: boolean;
|
3481
|
+
expiresAt: string;
|
3482
|
+
};
|
3483
|
+
};
|
3484
|
+
};
|
3485
|
+
datetime: string;
|
3486
|
+
};
|
3487
|
+
error?: {
|
3488
|
+
code: number;
|
3489
|
+
message: string;
|
3490
|
+
datetime: string;
|
3491
|
+
};
|
3492
|
+
}
|
3493
|
+
|
3494
|
+
export declare interface primaPlusSubscription {
|
3495
|
+
result?: {
|
3496
|
+
data: {
|
3497
|
+
subscription: {
|
3498
|
+
currentSubscription?: currentSubscription;
|
3499
|
+
};
|
3500
|
+
};
|
3501
|
+
};
|
3502
|
+
error?: {
|
3503
|
+
code: number;
|
3504
|
+
message: string;
|
3505
|
+
datetime: string;
|
3506
|
+
};
|
3507
|
+
}
|
3508
|
+
|
3509
|
+
export declare enum primaSubscriptionItemType {
|
3510
|
+
REGISTERED = "REGISTERED",
|
3511
|
+
HVOD_STANDARD = "HVOD_STANDARD",
|
3512
|
+
SVOD_STANDARD = "SVOD_STANDARD",
|
3513
|
+
IPBR_STANDARD = "IPBR_STANDARD",
|
3514
|
+
PREMIUM_STANDARD = "PREMIUM_STANDARD",
|
3515
|
+
IPRIMA_NO_ADS_STANDARD = "IPRIMA_NO_ADS_STANDARD",
|
3516
|
+
HVOD_PARTIAL = "HVOD_PARTIAL",
|
3517
|
+
IPBR_PARTIAL = "IPBR_PARTIAL",
|
3518
|
+
PREMIUM_PARTIAL = "PREMIUM_PARTIAL",
|
3519
|
+
IPRIMA_NO_ADS_PARTIAL = "IPRIMA_NO_ADS_PARTIAL",
|
3520
|
+
SVOD_PREPAID_VOUCHER = "SVOD_PREPAID_VOUCHER",
|
3521
|
+
SVOD_DISCOUNT_VOUCHER = "SVOD_DISCOUNT_VOUCHER",
|
3522
|
+
HVOD_PREPAID_VOUCHER = "HVOD_PREPAID_VOUCHER",
|
3523
|
+
HVOD_DISCOUNT_VOUCHER = "HVOD_DISCOUNT_VOUCHER"
|
3524
|
+
}
|
3525
|
+
|
3526
|
+
declare enum primaSupportedCurrency {
|
3527
|
+
CZK = "CZK",
|
3528
|
+
EUR = "EUR",
|
3529
|
+
PLN = "PLN",
|
3530
|
+
USD = "USD",
|
3531
|
+
GBP = "GBP",
|
3532
|
+
HUF = "HUF"
|
3533
|
+
}
|
3534
|
+
|
3404
3535
|
/**
|
3405
3536
|
* Values that user entered in survey for given profile.
|
3406
3537
|
*/
|
@@ -3561,7 +3692,8 @@ export declare enum PurchaseDocumentGateway {
|
|
3561
3692
|
'patreon' = "patreon",
|
3562
3693
|
'paypal' = "paypal",
|
3563
3694
|
'unknown' = "unknown",
|
3564
|
-
'stargaze' = "stargaze"
|
3695
|
+
'stargaze' = "stargaze",
|
3696
|
+
'prima' = "prima"
|
3565
3697
|
}
|
3566
3698
|
|
3567
3699
|
/**
|
@@ -4048,6 +4180,76 @@ export declare type RemoteBundleState = {
|
|
4048
4180
|
state: 'loading' | 'error' | 'ready';
|
4049
4181
|
} & Nullable<TivioBundle>;
|
4050
4182
|
|
4183
|
+
export declare interface RemoteControlGenerateSourceResponse {
|
4184
|
+
sessionId?: string;
|
4185
|
+
url?: string;
|
4186
|
+
}
|
4187
|
+
|
4188
|
+
export declare interface RemoteControlGetSourceUrlPayload {
|
4189
|
+
videoId: string;
|
4190
|
+
userId: string;
|
4191
|
+
profileId: string;
|
4192
|
+
capabilities: PlayerCapability[];
|
4193
|
+
activeVideoId: string;
|
4194
|
+
}
|
4195
|
+
|
4196
|
+
/**
|
4197
|
+
* @public
|
4198
|
+
*/
|
4199
|
+
export declare interface RemoteControllerProps {
|
4200
|
+
video: Video;
|
4201
|
+
className?: string;
|
4202
|
+
}
|
4203
|
+
|
4204
|
+
export declare enum RemoteControlMethod {
|
4205
|
+
pairDevice = "pairDevice",
|
4206
|
+
unpairDevice = "unpairDevice",
|
4207
|
+
playHighlight = "playHighlight",
|
4208
|
+
playbackControl = "playbackControl",
|
4209
|
+
selectCamera = "selectCamera",
|
4210
|
+
getSourceUrl = "getSourceUrl"
|
4211
|
+
}
|
4212
|
+
|
4213
|
+
export declare interface RemoteControlPairPayload {
|
4214
|
+
code: string;
|
4215
|
+
videoId: string;
|
4216
|
+
profileId: string;
|
4217
|
+
}
|
4218
|
+
|
4219
|
+
export declare interface RemoteControlPlaybackControlPayload {
|
4220
|
+
sessionId: string;
|
4221
|
+
videoId: string;
|
4222
|
+
playback: ControlPlayback;
|
4223
|
+
activeVideoId?: string;
|
4224
|
+
}
|
4225
|
+
|
4226
|
+
export declare interface RemoteControlPlayHighlightPayload {
|
4227
|
+
sessionId: string;
|
4228
|
+
videoId: string;
|
4229
|
+
activeVideoId: string;
|
4230
|
+
replay: ControlReplay;
|
4231
|
+
}
|
4232
|
+
|
4233
|
+
export declare type RemoteControlRequest = RemoteControlRequestBase<RemoteControlMethod.pairDevice> | RemoteControlRequestBase<RemoteControlMethod.unpairDevice> | RemoteControlRequestBase<RemoteControlMethod.playHighlight> | RemoteControlRequestBase<RemoteControlMethod.playbackControl> | RemoteControlRequestBase<RemoteControlMethod.selectCamera> | RemoteControlRequestBase<RemoteControlMethod.getSourceUrl>;
|
4234
|
+
|
4235
|
+
declare interface RemoteControlRequestBase<TMethod extends RemoteControlMethod> {
|
4236
|
+
method: TMethod;
|
4237
|
+
payload: RemoteControlRequestPayload<TMethod>;
|
4238
|
+
}
|
4239
|
+
|
4240
|
+
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;
|
4241
|
+
|
4242
|
+
export declare interface RemoteControlSelectCameraPayload {
|
4243
|
+
sessionId: string;
|
4244
|
+
videoId: string;
|
4245
|
+
activeVideoId: string;
|
4246
|
+
}
|
4247
|
+
|
4248
|
+
export declare interface RemoteControlUnpairPayload {
|
4249
|
+
sessionId: string;
|
4250
|
+
videoId: string;
|
4251
|
+
}
|
4252
|
+
|
4051
4253
|
/**
|
4052
4254
|
* @public
|
4053
4255
|
*/
|
@@ -4881,7 +5083,9 @@ export declare enum SurveyItemComponent {
|
|
4881
5083
|
SURVEY = "SURVEY"
|
4882
5084
|
}
|
4883
5085
|
|
4884
|
-
export declare type SynchronizeUserTypeFunction = (payload: CreateUserPayload, tenantId: string, tenantUserId: string, organizationId?: string
|
5086
|
+
export declare type SynchronizeUserTypeFunction = (payload: CreateUserPayload, tenantId: string, tenantUserId: string, organizationId?: string, additionalData?: {
|
5087
|
+
[key: string]: any;
|
5088
|
+
}) => Promise<string>;
|
4885
5089
|
|
4886
5090
|
/**
|
4887
5091
|
* @public
|
@@ -5185,6 +5389,7 @@ export declare interface TivioComponents {
|
|
5185
5389
|
ContentSortPicker: React_2.ComponentType<ContentSortPickerProps>;
|
5186
5390
|
WebProfileScreen: React_2.ComponentType<WebProfileScreenProps>;
|
5187
5391
|
WebTivioProVideoScreen: React_2.ComponentType<WebTivioProVideoScreenProps>;
|
5392
|
+
RemoteController: React_2.ComponentType<RemoteControllerProps>;
|
5188
5393
|
}
|
5189
5394
|
|
5190
5395
|
/**
|
@@ -6150,6 +6355,7 @@ export declare type User = {
|
|
6150
6355
|
invalidateAllTokens: (type: TokenType) => Promise<void>;
|
6151
6356
|
isPartiallyRegistered: boolean;
|
6152
6357
|
conversationStore: ConversationStore;
|
6358
|
+
streamingSessions?: UserStreamingSessionFieldInterface[];
|
6153
6359
|
};
|
6154
6360
|
|
6155
6361
|
/**
|
@@ -6216,6 +6422,14 @@ export declare type UserProfile = {
|
|
6216
6422
|
survey?: ProfileSurvey;
|
6217
6423
|
};
|
6218
6424
|
|
6425
|
+
export declare interface UserStreamingSessionFieldInterface {
|
6426
|
+
sessionId: string;
|
6427
|
+
sessionType: Exclude<VideoSourceField['sessionType'], undefined>;
|
6428
|
+
contentId: string;
|
6429
|
+
activeContentId?: string;
|
6430
|
+
created: Date;
|
6431
|
+
}
|
6432
|
+
|
6219
6433
|
/**
|
6220
6434
|
* @public
|
6221
6435
|
*/
|
@@ -6552,11 +6766,12 @@ export declare interface VideoHighlight {
|
|
6552
6766
|
id: string;
|
6553
6767
|
title: string;
|
6554
6768
|
description?: string;
|
6555
|
-
|
6556
|
-
|
6769
|
+
fromSegment?: number;
|
6770
|
+
toSegment?: number;
|
6557
6771
|
imageUrl?: string;
|
6558
6772
|
videoTime?: string;
|
6559
6773
|
videoId?: string;
|
6774
|
+
created?: Date;
|
6560
6775
|
}
|
6561
6776
|
|
6562
6777
|
declare type VideoPath = string;
|
@@ -6811,6 +7026,7 @@ export declare interface VodTivioSourceInterface extends PlayerSourceInterface<S
|
|
6811
7026
|
managementUrl?: string;
|
6812
7027
|
video: Video;
|
6813
7028
|
clone: (params?: Partial<VodTivioSourceParams>) => VodTivioSourceInterface;
|
7029
|
+
sessionType?: VideoSourceField['sessionType'];
|
6814
7030
|
}
|
6815
7031
|
|
6816
7032
|
/**
|
@@ -6825,8 +7041,13 @@ export declare interface VodTivioSourceParams extends PlayerSourceParams<SourceT
|
|
6825
7041
|
/**
|
6826
7042
|
* URL for source modification for user (e.g. add PIP window to livestream).
|
6827
7043
|
* TODO mb move to PlayerSourceParams
|
7044
|
+
* TODO: Remove managementUrl
|
6828
7045
|
*/
|
6829
7046
|
managementUrl?: string;
|
7047
|
+
/**
|
7048
|
+
* Session ID for authentication and optionally controlling the cameras
|
7049
|
+
*/
|
7050
|
+
sessionId?: string;
|
6830
7051
|
}
|
6831
7052
|
|
6832
7053
|
/**
|