@tivio/sdk-react 5.0.3-alpha-2 → 5.0.3-alpha-4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +212 -12
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +213 -13
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -140,6 +140,14 @@ export declare interface Advertisement extends RowItem {
|
|
140
140
|
type?: string | null;
|
141
141
|
}
|
142
142
|
|
143
|
+
export declare type AdvertisementAnalyticParams = {
|
144
|
+
adFramework?: string;
|
145
|
+
adOrder: number;
|
146
|
+
adProvider?: string;
|
147
|
+
adTitle?: string;
|
148
|
+
videoId: string;
|
149
|
+
};
|
150
|
+
|
143
151
|
/**
|
144
152
|
* @public
|
145
153
|
*/
|
@@ -198,14 +206,22 @@ export declare enum AnalyticsConversionTargetBase {
|
|
198
206
|
}
|
199
207
|
|
200
208
|
export declare interface AnalyticsInterface {
|
201
|
-
reportAdvertisementPlay: () => void;
|
209
|
+
reportAdvertisementPlay: (params: AdvertisementAnalyticParams) => void;
|
202
210
|
reportAdvertisementProgress: () => void;
|
203
211
|
reportElementClick: (elementId: string) => void;
|
204
212
|
reportLocationChange: (path: string, pathParam?: string) => void;
|
205
213
|
createMonetizationPurchase: () => void;
|
206
214
|
completeMonetizationPurchase: (status: AnalyticsConversionStatus, monetizationId?: string) => void;
|
207
215
|
reportVideoPlay: (status: AnalyticsConversionStatus, videoId: string) => void;
|
208
|
-
reportVideoProgress: (
|
216
|
+
reportVideoProgress: (data: {
|
217
|
+
checkpoint: number;
|
218
|
+
organizationId?: string;
|
219
|
+
seriesId?: string;
|
220
|
+
videoDuration: string;
|
221
|
+
videoId: string;
|
222
|
+
videoMonetizationId?: string;
|
223
|
+
videoType?: VideoType;
|
224
|
+
}) => void;
|
209
225
|
}
|
210
226
|
|
211
227
|
/**
|
@@ -399,6 +415,7 @@ export declare interface ConfirmationOverlayPayloadBase {
|
|
399
415
|
|
400
416
|
/**
|
401
417
|
* Entity aggregate conversion statistics per day
|
418
|
+
* TODO in future change structure, new used like array item
|
402
419
|
*/
|
403
420
|
export declare interface ConversionAnalytic {
|
404
421
|
/**
|
@@ -588,6 +605,14 @@ export declare type DocumentOptions = Partial<{
|
|
588
605
|
subscribeOnChanges: boolean;
|
589
606
|
}>;
|
590
607
|
|
608
|
+
export declare interface Drm {
|
609
|
+
configuration: FairplayDrmConfiguration | PlayreadyDrmConfiguration | WidevineDrmConfiguration;
|
610
|
+
/**
|
611
|
+
* License string
|
612
|
+
*/
|
613
|
+
license: string;
|
614
|
+
}
|
615
|
+
|
591
616
|
/**
|
592
617
|
* @public
|
593
618
|
*/
|
@@ -630,6 +655,17 @@ export declare type ExternalTvConfig = {
|
|
630
655
|
splashScreenBackgroundColor?: string;
|
631
656
|
};
|
632
657
|
|
658
|
+
export declare interface FairplayDrmConfiguration {
|
659
|
+
/**
|
660
|
+
* Url to retrieve fairplay certificate from.
|
661
|
+
*/
|
662
|
+
fairplayCertificateUrl: string;
|
663
|
+
/**
|
664
|
+
* Url to send license to.
|
665
|
+
*/
|
666
|
+
fairplayLicenseUrl: string;
|
667
|
+
}
|
668
|
+
|
633
669
|
/**
|
634
670
|
* @throws if fetch fails
|
635
671
|
* @public
|
@@ -671,6 +707,31 @@ export declare interface GenericOnCallError extends Error {
|
|
671
707
|
details?: Record<string, string>;
|
672
708
|
}
|
673
709
|
|
710
|
+
export declare interface GetBaseAnalyticsRequest {
|
711
|
+
/**
|
712
|
+
* Id of organization to return analytics data.
|
713
|
+
*/
|
714
|
+
organizationId: string;
|
715
|
+
/**
|
716
|
+
* Date in string with format e.g. '2023-04-19'.
|
717
|
+
*/
|
718
|
+
startDate: string;
|
719
|
+
/**
|
720
|
+
* Date in string with format e.g. '2023-04-26'.
|
721
|
+
*/
|
722
|
+
endDate: string;
|
723
|
+
}
|
724
|
+
|
725
|
+
export declare interface GetConversionAnalyticsRequest extends GetBaseAnalyticsRequest {
|
726
|
+
}
|
727
|
+
|
728
|
+
export declare interface GetMonetizationsAnalyticsRequest extends GetBaseAnalyticsRequest {
|
729
|
+
}
|
730
|
+
|
731
|
+
export declare interface GetMonetizationsAnalyticsResponse {
|
732
|
+
monetizationsAnalytics: MonetizationSummaryItem[];
|
733
|
+
}
|
734
|
+
|
674
735
|
/**
|
675
736
|
* Share singleton instance
|
676
737
|
* @public
|
@@ -748,6 +809,18 @@ export declare interface GetSourceUrlResponse {
|
|
748
809
|
* Which sources did client (or cloud function) has already tried out.
|
749
810
|
*/
|
750
811
|
sourceHistory: string[];
|
812
|
+
/**
|
813
|
+
* DRM configuration to {@link url} if source is encrypted.
|
814
|
+
*/
|
815
|
+
drm?: Drm;
|
816
|
+
}
|
817
|
+
|
818
|
+
export declare interface GetViewAnalyticsResponse {
|
819
|
+
viewCountAnalytics: ViewCountItem[];
|
820
|
+
topWatched: TopWatchItem[];
|
821
|
+
}
|
822
|
+
|
823
|
+
export declare interface GetViewsAnalyticsRequest extends GetBaseAnalyticsRequest {
|
751
824
|
}
|
752
825
|
|
753
826
|
/**
|
@@ -1121,11 +1194,51 @@ export declare type MonetizationsSelectOverlayState = {
|
|
1121
1194
|
closeMonetizationsSelectOverlay: () => void;
|
1122
1195
|
};
|
1123
1196
|
|
1197
|
+
export declare interface MonetizationSummaryItem {
|
1198
|
+
/**
|
1199
|
+
* Unix timestamp at which the data is aggregated
|
1200
|
+
*/
|
1201
|
+
date: number;
|
1202
|
+
/**
|
1203
|
+
* Monetization under the videos played, if not filled it is free
|
1204
|
+
*/
|
1205
|
+
monetizationId: string;
|
1206
|
+
/**
|
1207
|
+
* Sum of successful (new and regular) payment price in current period
|
1208
|
+
*/
|
1209
|
+
totalPrice: number;
|
1210
|
+
/**
|
1211
|
+
* Count of new payments in the current period
|
1212
|
+
*/
|
1213
|
+
newPaymentCount: number;
|
1214
|
+
/**
|
1215
|
+
* Count of payments cancelled in in the current period
|
1216
|
+
*/
|
1217
|
+
cancelledPaymentCount: number;
|
1218
|
+
/**
|
1219
|
+
* Count of payments made regularly like in the previous period
|
1220
|
+
*/
|
1221
|
+
regularPaymentCount: number;
|
1222
|
+
/**
|
1223
|
+
* Price which was charged independent on price list (full and discounted)
|
1224
|
+
*/
|
1225
|
+
paymentPrice: number;
|
1226
|
+
/**
|
1227
|
+
* Monetization type frequency
|
1228
|
+
*/
|
1229
|
+
monetizationFrequency: MONETIZATION_FREQUENCY;
|
1230
|
+
/**
|
1231
|
+
* For PPV payments there will be videoId for which payment charged
|
1232
|
+
* If not filled it is not PPV
|
1233
|
+
*/
|
1234
|
+
videoId?: string;
|
1235
|
+
}
|
1236
|
+
|
1124
1237
|
/**
|
1125
1238
|
* @public
|
1126
1239
|
* @TODO change to enum
|
1127
1240
|
*/
|
1128
|
-
export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
|
1241
|
+
export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription' | 'display';
|
1129
1242
|
|
1130
1243
|
/**
|
1131
1244
|
* TODO: Duplicate, because we can't import types from core-js.
|
@@ -1221,7 +1334,11 @@ export declare enum PLATFORM {
|
|
1221
1334
|
*/
|
1222
1335
|
MOBILE = "MOBILE",
|
1223
1336
|
WEB = "WEB",
|
1224
|
-
TV = "TV"
|
1337
|
+
TV = "TV",
|
1338
|
+
/**
|
1339
|
+
* @deprecated Used only in big query. In the future we'll migrate to undefined value and delete this.
|
1340
|
+
*/
|
1341
|
+
UNKNOWN = "unknown"
|
1225
1342
|
}
|
1226
1343
|
|
1227
1344
|
/**
|
@@ -1469,6 +1586,13 @@ export declare enum PlayerWrapperEventType {
|
|
1469
1586
|
*/
|
1470
1587
|
export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
|
1471
1588
|
|
1589
|
+
export declare interface PlayreadyDrmConfiguration {
|
1590
|
+
/**
|
1591
|
+
* Url to send license to.
|
1592
|
+
*/
|
1593
|
+
playreadyLicenseUrl: string;
|
1594
|
+
}
|
1595
|
+
|
1472
1596
|
/**
|
1473
1597
|
* @public
|
1474
1598
|
*/
|
@@ -1919,6 +2043,9 @@ declare interface RowBase {
|
|
1919
2043
|
type: ScreenRowType;
|
1920
2044
|
isLiveRow: boolean;
|
1921
2045
|
numberOfLines?: number;
|
2046
|
+
monetizations?: {
|
2047
|
+
monetizationRef: any;
|
2048
|
+
}[];
|
1922
2049
|
}
|
1923
2050
|
|
1924
2051
|
/**
|
@@ -1957,8 +2084,7 @@ export declare interface RowItemAssets {
|
|
1957
2084
|
export declare enum RowItemComponent {
|
1958
2085
|
ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
|
1959
2086
|
ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
|
1960
|
-
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
1961
|
-
ROW_ITEM_BANNER = "ROW_ITEM_BANNER"
|
2087
|
+
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
1962
2088
|
}
|
1963
2089
|
|
1964
2090
|
/**
|
@@ -2757,6 +2883,7 @@ export declare interface TivioWidgetProps {
|
|
2757
2883
|
x: number;
|
2758
2884
|
}) => any;
|
2759
2885
|
navigateFunction?: any;
|
2886
|
+
isFocused?: boolean;
|
2760
2887
|
}
|
2761
2888
|
|
2762
2889
|
/**
|
@@ -2775,6 +2902,26 @@ export declare interface TivioWidgetRef {
|
|
2775
2902
|
});
|
2776
2903
|
}
|
2777
2904
|
|
2905
|
+
export declare interface TopWatchItem {
|
2906
|
+
videoId: string;
|
2907
|
+
/**
|
2908
|
+
* If video is part of series we get a tagId to series
|
2909
|
+
*/
|
2910
|
+
seriesId?: string;
|
2911
|
+
/**
|
2912
|
+
* Video type {@link VideoType}
|
2913
|
+
*/
|
2914
|
+
videoType: VideoType;
|
2915
|
+
/**
|
2916
|
+
* Uniq users count
|
2917
|
+
*/
|
2918
|
+
userCount: number;
|
2919
|
+
/**
|
2920
|
+
* Count of video view events
|
2921
|
+
*/
|
2922
|
+
viewCount: number;
|
2923
|
+
}
|
2924
|
+
|
2778
2925
|
declare type TransactionInfo = {
|
2779
2926
|
type: 'transaction';
|
2780
2927
|
name: string;
|
@@ -2796,6 +2943,7 @@ export declare type Translation = {
|
|
2796
2943
|
*/
|
2797
2944
|
export declare type TvAppProps = {
|
2798
2945
|
customer: CustomerId;
|
2946
|
+
navigateFunction: (url: string) => void;
|
2799
2947
|
};
|
2800
2948
|
|
2801
2949
|
/**
|
@@ -2816,7 +2964,11 @@ export declare interface TvChannel extends RowItem {
|
|
2816
2964
|
* Transactions before subscriptions, sorted by price ascending.
|
2817
2965
|
*/
|
2818
2966
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
2819
|
-
getSourceUrl(
|
2967
|
+
getSourceUrl(options?: {
|
2968
|
+
language?: LangCode;
|
2969
|
+
}): Promise<GetSourceUrlResponse & {
|
2970
|
+
language?: LangCode;
|
2971
|
+
}>;
|
2820
2972
|
purchasableMonetization: any | null;
|
2821
2973
|
price: number;
|
2822
2974
|
cover: string;
|
@@ -2824,6 +2976,16 @@ export declare interface TvChannel extends RowItem {
|
|
2824
2976
|
uri: string;
|
2825
2977
|
}
|
2826
2978
|
|
2979
|
+
export declare interface TvProgram {
|
2980
|
+
from: Date | null;
|
2981
|
+
to: Date | null;
|
2982
|
+
name: string;
|
2983
|
+
description: string;
|
2984
|
+
uri: string;
|
2985
|
+
image: string;
|
2986
|
+
video: Video | null;
|
2987
|
+
}
|
2988
|
+
|
2827
2989
|
/**
|
2828
2990
|
* @public
|
2829
2991
|
*/
|
@@ -2928,7 +3090,7 @@ export declare interface UseCancelSubscriptionsResult {
|
|
2928
3090
|
* @public
|
2929
3091
|
*/
|
2930
3092
|
export declare type UseChannelSource = (tvChannelId: string) => {
|
2931
|
-
source: ChannelSourcePojo | null;
|
3093
|
+
source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
|
2932
3094
|
error: Error | null;
|
2933
3095
|
};
|
2934
3096
|
|
@@ -2938,7 +3100,7 @@ export declare type UseChannelSource = (tvChannelId: string) => {
|
|
2938
3100
|
* @public
|
2939
3101
|
*/
|
2940
3102
|
export declare const useChannelSource: (tvChannelId: string) => {
|
2941
|
-
source: ChannelSourcePojo | null;
|
3103
|
+
source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
|
2942
3104
|
error: Error | null;
|
2943
3105
|
};
|
2944
3106
|
|
@@ -3282,7 +3444,11 @@ export declare interface Video extends RowItem {
|
|
3282
3444
|
* Transactions before subscriptions, sorted by price ascending.
|
3283
3445
|
*/
|
3284
3446
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
3285
|
-
getSourceUrl(
|
3447
|
+
getSourceUrl(options?: {
|
3448
|
+
language?: LangCode;
|
3449
|
+
}): Promise<GetSourceUrlResponse & {
|
3450
|
+
language?: LangCode;
|
3451
|
+
}>;
|
3286
3452
|
purchasableMonetization: any | null;
|
3287
3453
|
transaction: PurchasableMonetization | undefined;
|
3288
3454
|
subscriptions: PurchasableMonetization[];
|
@@ -3377,10 +3543,37 @@ export declare enum VideoType {
|
|
3377
3543
|
/**
|
3378
3544
|
* @public
|
3379
3545
|
*/
|
3380
|
-
export declare type
|
3546
|
+
export declare type VideoUrlNames = {
|
3381
3547
|
[key in LangCode]?: string[];
|
3382
3548
|
};
|
3383
3549
|
|
3550
|
+
export declare interface ViewCountItem {
|
3551
|
+
/**
|
3552
|
+
* Unix timestamp
|
3553
|
+
*/
|
3554
|
+
date: number;
|
3555
|
+
/**
|
3556
|
+
* Monetization under the videos played, if not filled it is free
|
3557
|
+
*/
|
3558
|
+
monetizationId?: string;
|
3559
|
+
/**
|
3560
|
+
* Device where the video played
|
3561
|
+
*/
|
3562
|
+
deviceType: PLATFORM;
|
3563
|
+
/**
|
3564
|
+
* Count of video view events in group
|
3565
|
+
*/
|
3566
|
+
totalCount: number;
|
3567
|
+
}
|
3568
|
+
|
3569
|
+
/**
|
3570
|
+
* @public
|
3571
|
+
*/
|
3572
|
+
export declare interface VirtualChannelSourcePojo extends Omit<ChannelSourcePojo, 'type'> {
|
3573
|
+
type: 'VirtualChannelSource';
|
3574
|
+
epg: TvProgram[];
|
3575
|
+
}
|
3576
|
+
|
3384
3577
|
/**
|
3385
3578
|
* @public
|
3386
3579
|
*/
|
@@ -3439,7 +3632,7 @@ export declare interface WarningConfirmationOverlayPayload extends ConfirmationO
|
|
3439
3632
|
*/
|
3440
3633
|
export declare interface WebPlayerProps {
|
3441
3634
|
id: string;
|
3442
|
-
source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
|
3635
|
+
source?: VodTivioSourcePojo | ChannelSourcePojo | VirtualChannelSourcePojo | VideoPath | null;
|
3443
3636
|
onEnded?: () => any;
|
3444
3637
|
/**
|
3445
3638
|
* If this function is specified, then "Back" button is shown in top right corner.
|
@@ -3524,6 +3717,13 @@ export declare type WhereFilterArray = [string, WhereFilterOp, any];
|
|
3524
3717
|
|
3525
3718
|
declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
|
3526
3719
|
|
3720
|
+
export declare interface WidevineDrmConfiguration {
|
3721
|
+
/**
|
3722
|
+
* Url to send license to.
|
3723
|
+
*/
|
3724
|
+
widevineLicenseUrl: string;
|
3725
|
+
}
|
3726
|
+
|
3527
3727
|
/**
|
3528
3728
|
* @public
|
3529
3729
|
*/
|