@tivio/sdk-react 5.0.3-alpha-2 → 5.0.3-alpha-4
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/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/sdk-react.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
|
/**
|
@@ -424,6 +440,7 @@ export declare interface ConfirmationOverlayPayloadBase {
|
|
424
440
|
|
425
441
|
/**
|
426
442
|
* Entity aggregate conversion statistics per day
|
443
|
+
* TODO in future change structure, new used like array item
|
427
444
|
*/
|
428
445
|
export declare interface ConversionAnalytic {
|
429
446
|
/**
|
@@ -734,6 +751,14 @@ export declare type DocumentOptions = Partial<{
|
|
734
751
|
subscribeOnChanges: boolean;
|
735
752
|
}>;
|
736
753
|
|
754
|
+
export declare interface Drm {
|
755
|
+
configuration: FairplayDrmConfiguration | PlayreadyDrmConfiguration | WidevineDrmConfiguration;
|
756
|
+
/**
|
757
|
+
* License string
|
758
|
+
*/
|
759
|
+
license: string;
|
760
|
+
}
|
761
|
+
|
737
762
|
/**
|
738
763
|
* @public
|
739
764
|
*/
|
@@ -776,6 +801,17 @@ export declare type ExternalTvConfig = {
|
|
776
801
|
splashScreenBackgroundColor?: string;
|
777
802
|
};
|
778
803
|
|
804
|
+
export declare interface FairplayDrmConfiguration {
|
805
|
+
/**
|
806
|
+
* Url to retrieve fairplay certificate from.
|
807
|
+
*/
|
808
|
+
fairplayCertificateUrl: string;
|
809
|
+
/**
|
810
|
+
* Url to send license to.
|
811
|
+
*/
|
812
|
+
fairplayLicenseUrl: string;
|
813
|
+
}
|
814
|
+
|
779
815
|
/**
|
780
816
|
* @throws if fetch fails
|
781
817
|
* @public
|
@@ -817,6 +853,31 @@ export declare interface GenericOnCallError extends Error {
|
|
817
853
|
details?: Record<string, string>;
|
818
854
|
}
|
819
855
|
|
856
|
+
export declare interface GetBaseAnalyticsRequest {
|
857
|
+
/**
|
858
|
+
* Id of organization to return analytics data.
|
859
|
+
*/
|
860
|
+
organizationId: string;
|
861
|
+
/**
|
862
|
+
* Date in string with format e.g. '2023-04-19'.
|
863
|
+
*/
|
864
|
+
startDate: string;
|
865
|
+
/**
|
866
|
+
* Date in string with format e.g. '2023-04-26'.
|
867
|
+
*/
|
868
|
+
endDate: string;
|
869
|
+
}
|
870
|
+
|
871
|
+
export declare interface GetConversionAnalyticsRequest extends GetBaseAnalyticsRequest {
|
872
|
+
}
|
873
|
+
|
874
|
+
export declare interface GetMonetizationsAnalyticsRequest extends GetBaseAnalyticsRequest {
|
875
|
+
}
|
876
|
+
|
877
|
+
export declare interface GetMonetizationsAnalyticsResponse {
|
878
|
+
monetizationsAnalytics: MonetizationSummaryItem[];
|
879
|
+
}
|
880
|
+
|
820
881
|
/**
|
821
882
|
* Share singleton instance
|
822
883
|
* @public
|
@@ -894,6 +955,18 @@ export declare interface GetSourceUrlResponse {
|
|
894
955
|
* Which sources did client (or cloud function) has already tried out.
|
895
956
|
*/
|
896
957
|
sourceHistory: string[];
|
958
|
+
/**
|
959
|
+
* DRM configuration to {@link url} if source is encrypted.
|
960
|
+
*/
|
961
|
+
drm?: Drm;
|
962
|
+
}
|
963
|
+
|
964
|
+
export declare interface GetViewAnalyticsResponse {
|
965
|
+
viewCountAnalytics: ViewCountItem[];
|
966
|
+
topWatched: TopWatchItem[];
|
967
|
+
}
|
968
|
+
|
969
|
+
export declare interface GetViewsAnalyticsRequest extends GetBaseAnalyticsRequest {
|
897
970
|
}
|
898
971
|
|
899
972
|
/**
|
@@ -1274,11 +1347,51 @@ export declare type MonetizationsSelectOverlayState = {
|
|
1274
1347
|
closeMonetizationsSelectOverlay: () => void;
|
1275
1348
|
};
|
1276
1349
|
|
1350
|
+
export declare interface MonetizationSummaryItem {
|
1351
|
+
/**
|
1352
|
+
* Unix timestamp at which the data is aggregated
|
1353
|
+
*/
|
1354
|
+
date: number;
|
1355
|
+
/**
|
1356
|
+
* Monetization under the videos played, if not filled it is free
|
1357
|
+
*/
|
1358
|
+
monetizationId: string;
|
1359
|
+
/**
|
1360
|
+
* Sum of successful (new and regular) payment price in current period
|
1361
|
+
*/
|
1362
|
+
totalPrice: number;
|
1363
|
+
/**
|
1364
|
+
* Count of new payments in the current period
|
1365
|
+
*/
|
1366
|
+
newPaymentCount: number;
|
1367
|
+
/**
|
1368
|
+
* Count of payments cancelled in in the current period
|
1369
|
+
*/
|
1370
|
+
cancelledPaymentCount: number;
|
1371
|
+
/**
|
1372
|
+
* Count of payments made regularly like in the previous period
|
1373
|
+
*/
|
1374
|
+
regularPaymentCount: number;
|
1375
|
+
/**
|
1376
|
+
* Price which was charged independent on price list (full and discounted)
|
1377
|
+
*/
|
1378
|
+
paymentPrice: number;
|
1379
|
+
/**
|
1380
|
+
* Monetization type frequency
|
1381
|
+
*/
|
1382
|
+
monetizationFrequency: MONETIZATION_FREQUENCY;
|
1383
|
+
/**
|
1384
|
+
* For PPV payments there will be videoId for which payment charged
|
1385
|
+
* If not filled it is not PPV
|
1386
|
+
*/
|
1387
|
+
videoId?: string;
|
1388
|
+
}
|
1389
|
+
|
1277
1390
|
/**
|
1278
1391
|
* @public
|
1279
1392
|
* @TODO change to enum
|
1280
1393
|
*/
|
1281
|
-
export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
|
1394
|
+
export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription' | 'display';
|
1282
1395
|
|
1283
1396
|
/**
|
1284
1397
|
* TODO: Duplicate, because we can't import types from core-js.
|
@@ -1384,7 +1497,11 @@ export declare enum PLATFORM {
|
|
1384
1497
|
*/
|
1385
1498
|
MOBILE = "MOBILE",
|
1386
1499
|
WEB = "WEB",
|
1387
|
-
TV = "TV"
|
1500
|
+
TV = "TV",
|
1501
|
+
/**
|
1502
|
+
* @deprecated Used only in big query. In the future we'll migrate to undefined value and delete this.
|
1503
|
+
*/
|
1504
|
+
UNKNOWN = "unknown"
|
1388
1505
|
}
|
1389
1506
|
|
1390
1507
|
/**
|
@@ -1632,6 +1749,13 @@ export declare enum PlayerWrapperEventType {
|
|
1632
1749
|
*/
|
1633
1750
|
export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
|
1634
1751
|
|
1752
|
+
export declare interface PlayreadyDrmConfiguration {
|
1753
|
+
/**
|
1754
|
+
* Url to send license to.
|
1755
|
+
*/
|
1756
|
+
playreadyLicenseUrl: string;
|
1757
|
+
}
|
1758
|
+
|
1635
1759
|
/**
|
1636
1760
|
* @public
|
1637
1761
|
*/
|
@@ -2091,6 +2215,9 @@ declare interface RowBase {
|
|
2091
2215
|
type: ScreenRowType;
|
2092
2216
|
isLiveRow: boolean;
|
2093
2217
|
numberOfLines?: number;
|
2218
|
+
monetizations?: {
|
2219
|
+
monetizationRef: any;
|
2220
|
+
}[];
|
2094
2221
|
}
|
2095
2222
|
|
2096
2223
|
/**
|
@@ -2129,8 +2256,7 @@ export declare interface RowItemAssets {
|
|
2129
2256
|
export declare enum RowItemComponent {
|
2130
2257
|
ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
|
2131
2258
|
ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
|
2132
|
-
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
2133
|
-
ROW_ITEM_BANNER = "ROW_ITEM_BANNER"
|
2259
|
+
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
2134
2260
|
}
|
2135
2261
|
|
2136
2262
|
/**
|
@@ -2505,7 +2631,7 @@ export declare type TileSizes = {
|
|
2505
2631
|
* @internal
|
2506
2632
|
*/
|
2507
2633
|
export declare type TileSizesMap = {
|
2508
|
-
[item in RowItemComponent]: TileSizes;
|
2634
|
+
[item in RowItemComponent | BannerItemComponent]: TileSizes;
|
2509
2635
|
};
|
2510
2636
|
|
2511
2637
|
/**
|
@@ -3007,6 +3133,7 @@ export declare interface TivioWidgetProps {
|
|
3007
3133
|
x: number;
|
3008
3134
|
}) => any;
|
3009
3135
|
navigateFunction?: any;
|
3136
|
+
isFocused?: boolean;
|
3010
3137
|
}
|
3011
3138
|
|
3012
3139
|
/**
|
@@ -3025,6 +3152,26 @@ export declare interface TivioWidgetRef {
|
|
3025
3152
|
});
|
3026
3153
|
}
|
3027
3154
|
|
3155
|
+
export declare interface TopWatchItem {
|
3156
|
+
videoId: string;
|
3157
|
+
/**
|
3158
|
+
* If video is part of series we get a tagId to series
|
3159
|
+
*/
|
3160
|
+
seriesId?: string;
|
3161
|
+
/**
|
3162
|
+
* Video type {@link VideoType}
|
3163
|
+
*/
|
3164
|
+
videoType: VideoType;
|
3165
|
+
/**
|
3166
|
+
* Uniq users count
|
3167
|
+
*/
|
3168
|
+
userCount: number;
|
3169
|
+
/**
|
3170
|
+
* Count of video view events
|
3171
|
+
*/
|
3172
|
+
viewCount: number;
|
3173
|
+
}
|
3174
|
+
|
3028
3175
|
declare type TransactionInfo = {
|
3029
3176
|
type: 'transaction';
|
3030
3177
|
name: string;
|
@@ -3046,6 +3193,7 @@ export declare type Translation = {
|
|
3046
3193
|
*/
|
3047
3194
|
export declare type TvAppProps = {
|
3048
3195
|
customer: CustomerId;
|
3196
|
+
navigateFunction: (url: string) => void;
|
3049
3197
|
};
|
3050
3198
|
|
3051
3199
|
/**
|
@@ -3066,7 +3214,11 @@ export declare interface TvChannel extends RowItem {
|
|
3066
3214
|
* Transactions before subscriptions, sorted by price ascending.
|
3067
3215
|
*/
|
3068
3216
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
3069
|
-
getSourceUrl(
|
3217
|
+
getSourceUrl(options?: {
|
3218
|
+
language?: LangCode;
|
3219
|
+
}): Promise<GetSourceUrlResponse & {
|
3220
|
+
language?: LangCode;
|
3221
|
+
}>;
|
3070
3222
|
purchasableMonetization: any | null;
|
3071
3223
|
price: number;
|
3072
3224
|
cover: string;
|
@@ -3074,6 +3226,16 @@ export declare interface TvChannel extends RowItem {
|
|
3074
3226
|
uri: string;
|
3075
3227
|
}
|
3076
3228
|
|
3229
|
+
export declare interface TvProgram {
|
3230
|
+
from: Date | null;
|
3231
|
+
to: Date | null;
|
3232
|
+
name: string;
|
3233
|
+
description: string;
|
3234
|
+
uri: string;
|
3235
|
+
image: string;
|
3236
|
+
video: Video | null;
|
3237
|
+
}
|
3238
|
+
|
3077
3239
|
/**
|
3078
3240
|
* @public
|
3079
3241
|
*/
|
@@ -3178,7 +3340,7 @@ export declare interface UseCancelSubscriptionsResult {
|
|
3178
3340
|
* @public
|
3179
3341
|
*/
|
3180
3342
|
export declare type UseChannelSource = (tvChannelId: string) => {
|
3181
|
-
source: ChannelSourcePojo | null;
|
3343
|
+
source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
|
3182
3344
|
error: Error | null;
|
3183
3345
|
};
|
3184
3346
|
|
@@ -3188,7 +3350,7 @@ export declare type UseChannelSource = (tvChannelId: string) => {
|
|
3188
3350
|
* @public
|
3189
3351
|
*/
|
3190
3352
|
export declare const useChannelSource: (tvChannelId: string) => {
|
3191
|
-
source: ChannelSourcePojo | null;
|
3353
|
+
source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
|
3192
3354
|
error: Error | null;
|
3193
3355
|
};
|
3194
3356
|
|
@@ -3532,7 +3694,11 @@ export declare interface Video extends RowItem {
|
|
3532
3694
|
* Transactions before subscriptions, sorted by price ascending.
|
3533
3695
|
*/
|
3534
3696
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
3535
|
-
getSourceUrl(
|
3697
|
+
getSourceUrl(options?: {
|
3698
|
+
language?: LangCode;
|
3699
|
+
}): Promise<GetSourceUrlResponse & {
|
3700
|
+
language?: LangCode;
|
3701
|
+
}>;
|
3536
3702
|
purchasableMonetization: any | null;
|
3537
3703
|
transaction: PurchasableMonetization | undefined;
|
3538
3704
|
subscriptions: PurchasableMonetization[];
|
@@ -3627,10 +3793,37 @@ export declare enum VideoType {
|
|
3627
3793
|
/**
|
3628
3794
|
* @public
|
3629
3795
|
*/
|
3630
|
-
export declare type
|
3796
|
+
export declare type VideoUrlNames = {
|
3631
3797
|
[key in LangCode]?: string[];
|
3632
3798
|
};
|
3633
3799
|
|
3800
|
+
export declare interface ViewCountItem {
|
3801
|
+
/**
|
3802
|
+
* Unix timestamp
|
3803
|
+
*/
|
3804
|
+
date: number;
|
3805
|
+
/**
|
3806
|
+
* Monetization under the videos played, if not filled it is free
|
3807
|
+
*/
|
3808
|
+
monetizationId?: string;
|
3809
|
+
/**
|
3810
|
+
* Device where the video played
|
3811
|
+
*/
|
3812
|
+
deviceType: PLATFORM;
|
3813
|
+
/**
|
3814
|
+
* Count of video view events in group
|
3815
|
+
*/
|
3816
|
+
totalCount: number;
|
3817
|
+
}
|
3818
|
+
|
3819
|
+
/**
|
3820
|
+
* @public
|
3821
|
+
*/
|
3822
|
+
export declare interface VirtualChannelSourcePojo extends Omit<ChannelSourcePojo, 'type'> {
|
3823
|
+
type: 'VirtualChannelSource';
|
3824
|
+
epg: TvProgram[];
|
3825
|
+
}
|
3826
|
+
|
3634
3827
|
/**
|
3635
3828
|
* @public
|
3636
3829
|
*/
|
@@ -3689,7 +3882,7 @@ export declare interface WarningConfirmationOverlayPayload extends ConfirmationO
|
|
3689
3882
|
*/
|
3690
3883
|
export declare interface WebPlayerProps {
|
3691
3884
|
id: string;
|
3692
|
-
source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
|
3885
|
+
source?: VodTivioSourcePojo | ChannelSourcePojo | VirtualChannelSourcePojo | VideoPath | null;
|
3693
3886
|
onEnded?: () => any;
|
3694
3887
|
/**
|
3695
3888
|
* If this function is specified, then "Back" button is shown in top right corner.
|
@@ -3774,6 +3967,13 @@ export declare type WhereFilterArray = [string, WhereFilterOp, any];
|
|
3774
3967
|
|
3775
3968
|
declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
|
3776
3969
|
|
3970
|
+
export declare interface WidevineDrmConfiguration {
|
3971
|
+
/**
|
3972
|
+
* Url to send license to.
|
3973
|
+
*/
|
3974
|
+
widevineLicenseUrl: string;
|
3975
|
+
}
|
3976
|
+
|
3777
3977
|
/**
|
3778
3978
|
* @public
|
3779
3979
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "5.0.3-alpha-
|
3
|
+
"version": "5.0.3-alpha-4",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"typings": "dist/index.d.ts",
|
6
6
|
"source": "src/index.ts",
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"@material-ui/core": "^4.11.2",
|
34
34
|
"@material-ui/icons": "^4.11.2",
|
35
35
|
"@sentry/browser": "^6.1.0",
|
36
|
-
"@tivio/common": "1.1.
|
36
|
+
"@tivio/common": "1.1.109",
|
37
37
|
"dayjs": "^1.11.0",
|
38
38
|
"es7-object-polyfill": "^1.0.1",
|
39
39
|
"firebase": "8.10.1",
|