@tivio/sdk-react 4.5.0 → 5.0.1
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 +222 -211
- package/README.md.bak +222 -211
- package/changelog.md +224 -0
- package/dist/index.d.ts +311 -40
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +311 -40
- package/package.json +22 -19
package/dist/sdk-react.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ComponentType } from 'react';
|
2
2
|
import { FunctionComponentElement } from 'react';
|
3
|
+
import { OperatingSystem } from 'detect-browser';
|
3
4
|
import { default as React_2 } from 'react';
|
4
5
|
|
5
6
|
/**
|
@@ -129,6 +130,15 @@ declare type AdSource_2 = SourceBase & {
|
|
129
130
|
type: 'ad';
|
130
131
|
};
|
131
132
|
|
133
|
+
/**
|
134
|
+
* @public
|
135
|
+
*/
|
136
|
+
export declare interface Advertisement extends RowItem {
|
137
|
+
id: string;
|
138
|
+
itemType: ROW_ITEM_TYPES.ADVERTISEMENT;
|
139
|
+
type?: string | null;
|
140
|
+
}
|
141
|
+
|
132
142
|
/**
|
133
143
|
* @public
|
134
144
|
*/
|
@@ -140,6 +150,63 @@ export declare enum ALGOLIA_INDEX_NAME {
|
|
140
150
|
USERS = "users"
|
141
151
|
}
|
142
152
|
|
153
|
+
/**
|
154
|
+
* List of conversion types that we send to analytics.
|
155
|
+
*/
|
156
|
+
export declare enum AnalyticsConversionName {
|
157
|
+
CLICK = "click",
|
158
|
+
PLAY = "play",
|
159
|
+
PURCHASE = "purchase",
|
160
|
+
VISIT = "visit"
|
161
|
+
}
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Map of Tivio targets in our apps.
|
165
|
+
* Values are based on url paths and rewrites from firebase.json
|
166
|
+
*/
|
167
|
+
export declare enum AnalyticsConversionPage {
|
168
|
+
Videos = "videos",
|
169
|
+
Series = "series",
|
170
|
+
Profile = "profile",
|
171
|
+
Tags = "tags",
|
172
|
+
Screens = "screens",
|
173
|
+
Registration = "registration",
|
174
|
+
Login = "login",
|
175
|
+
About = "about",
|
176
|
+
ResetPassword = "reset-password",
|
177
|
+
Player = "player",
|
178
|
+
Redeem = "redeem",
|
179
|
+
Referral = "referral",
|
180
|
+
Pair = "pair",
|
181
|
+
Search = "search"
|
182
|
+
}
|
183
|
+
|
184
|
+
/**
|
185
|
+
* For conversion purchases
|
186
|
+
*/
|
187
|
+
export declare enum AnalyticsConversionStatus {
|
188
|
+
SUCCESS = "SUCCESS",
|
189
|
+
FAILED = "FAILED"
|
190
|
+
}
|
191
|
+
|
192
|
+
export declare type AnalyticsConversionTarget = AnalyticsConversionTargetBase | AnalyticsConversionPage;
|
193
|
+
|
194
|
+
export declare enum AnalyticsConversionTargetBase {
|
195
|
+
Element = "element",
|
196
|
+
Monetization = "monetization"
|
197
|
+
}
|
198
|
+
|
199
|
+
export declare interface AnalyticsInterface {
|
200
|
+
reportAdvertisementPlay: () => void;
|
201
|
+
reportAdvertisementProgress: () => void;
|
202
|
+
reportElementClick: (elementId: string) => void;
|
203
|
+
reportLocationChange: (path: string, pathParam?: string) => void;
|
204
|
+
createMonetizationPurchase: () => void;
|
205
|
+
completeMonetizationPurchase: (status: AnalyticsConversionStatus, monetizationId?: string) => void;
|
206
|
+
reportVideoPlay: (status: AnalyticsConversionStatus, videoId: string) => void;
|
207
|
+
reportVideoProgress: (videoId: string, videoDuration: number, checkpoint: number) => void;
|
208
|
+
}
|
209
|
+
|
143
210
|
/**
|
144
211
|
* @public
|
145
212
|
*/
|
@@ -201,7 +268,6 @@ export declare type BannerProps = {
|
|
201
268
|
focused: boolean;
|
202
269
|
onClick?: () => void;
|
203
270
|
hoverable: boolean;
|
204
|
-
broadcastInfo: string;
|
205
271
|
height: number;
|
206
272
|
cover: string;
|
207
273
|
overlay: boolean;
|
@@ -355,6 +421,77 @@ export declare interface ConfirmationOverlayPayloadBase {
|
|
355
421
|
automaticConfirmDelayMs?: number;
|
356
422
|
}
|
357
423
|
|
424
|
+
/**
|
425
|
+
* Entity aggregate conversion statistics per day
|
426
|
+
*/
|
427
|
+
export declare interface ConversionAnalytic {
|
428
|
+
/**
|
429
|
+
* Unix timestamp
|
430
|
+
*/
|
431
|
+
date: number;
|
432
|
+
type: AnalyticsConversionName;
|
433
|
+
statistics: ConversionsItem[];
|
434
|
+
}
|
435
|
+
|
436
|
+
export declare interface ConversionsItem {
|
437
|
+
technology: PLATFORM;
|
438
|
+
os: DeviceOs;
|
439
|
+
osVersion: string;
|
440
|
+
details: {
|
441
|
+
/**
|
442
|
+
* Count of conversion with Success state
|
443
|
+
*/
|
444
|
+
successCount: number;
|
445
|
+
/**
|
446
|
+
* Count of all conversion regardless of status
|
447
|
+
*/
|
448
|
+
totalCount: number;
|
449
|
+
targets: ConversionsTargetItem[];
|
450
|
+
};
|
451
|
+
}
|
452
|
+
|
453
|
+
/**
|
454
|
+
* Entity with statistics conversion for url
|
455
|
+
*/
|
456
|
+
export declare interface ConversionsTargetItem {
|
457
|
+
/**
|
458
|
+
* Target id represent different values for every conversion.
|
459
|
+
* e.g. for visit conversion on video page saving videoId
|
460
|
+
* e.g. for visit conversion on profile page not saving anything
|
461
|
+
* e.g. for purchase conversion save monetizationId when user select specific monetization
|
462
|
+
* e.g. for purchase conversion not save anything when user leave monetization before select
|
463
|
+
* e.g. for click conversion save elementId
|
464
|
+
*/
|
465
|
+
targetId: string;
|
466
|
+
/**
|
467
|
+
* Target type represent different values for every conversion.
|
468
|
+
* e.g. for visit conversion show current path
|
469
|
+
* e.g. for purchase conversion is every time monetization
|
470
|
+
* e.g. for click conversion is every time element
|
471
|
+
*/
|
472
|
+
targetType: AnalyticsConversionTarget;
|
473
|
+
/**
|
474
|
+
* Path is page of conversion
|
475
|
+
* e.g. for visit conversion represent previews page
|
476
|
+
* e.g. for purchase conversion is page where purchase happened
|
477
|
+
* e.g. for click conversion is page where click happened
|
478
|
+
*/
|
479
|
+
path: string;
|
480
|
+
/**
|
481
|
+
* Path param is param from url of conversion (e.g. video page -> videoId, profile page -> unknown)
|
482
|
+
* e.g. for visit conversion represent parameters previews page
|
483
|
+
* e.g. for purchase conversion where purchase happened
|
484
|
+
* e.g. for click conversion where click happened
|
485
|
+
*/
|
486
|
+
pathParam: string | undefined;
|
487
|
+
/** Count of conversion with Success state on specific page */
|
488
|
+
successCount: number;
|
489
|
+
/**
|
490
|
+
* Count of all conversion regardless of status on specific page
|
491
|
+
*/
|
492
|
+
totalCount: number;
|
493
|
+
}
|
494
|
+
|
358
495
|
/**
|
359
496
|
* @public
|
360
497
|
* @TODO move somewhere else
|
@@ -401,14 +538,20 @@ export declare type Currency = 'CZK' | 'EUR' | 'USD';
|
|
401
538
|
/**
|
402
539
|
* @public
|
403
540
|
*/
|
404
|
-
export declare enum
|
541
|
+
export declare enum CustomerId {
|
405
542
|
OKTAGON = "OKTAGON",
|
406
543
|
JOJ = "JOJ",
|
407
544
|
MALL = "MALL",
|
408
545
|
GARAZ = "GARAZ",
|
409
546
|
U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
|
410
547
|
INVESTOREES = "INVESTOREES",
|
411
|
-
DVTV = "DVTV"
|
548
|
+
DVTV = "DVTV",
|
549
|
+
DVTV_DEV = "DVTV_DEV",
|
550
|
+
O2 = "O2",
|
551
|
+
GRAPE = "GRAPE",
|
552
|
+
TIVIO = "TIVIO",
|
553
|
+
STORYBOOK = "STORYBOOK",
|
554
|
+
NANGU_DEV = "NANGU_DEV"
|
412
555
|
}
|
413
556
|
|
414
557
|
/**
|
@@ -559,6 +702,11 @@ export declare type DetailedPrice = {
|
|
559
702
|
*/
|
560
703
|
export declare type DeviceInfo = ArrisDeviceInfo | ReactNativeDeviceInfo;
|
561
704
|
|
705
|
+
/**
|
706
|
+
* @public
|
707
|
+
*/
|
708
|
+
export declare type DeviceOs = OperatingSystem | 'Tizen' | 'webOS' | 'Arris' | 'Android TV' | 'tvOS';
|
709
|
+
|
562
710
|
/**
|
563
711
|
* @public
|
564
712
|
*/
|
@@ -624,6 +772,7 @@ export declare type Events = {
|
|
624
772
|
*/
|
625
773
|
export declare type ExternalTvConfig = {
|
626
774
|
logo: string;
|
775
|
+
splashScreenBackgroundColor?: string;
|
627
776
|
};
|
628
777
|
|
629
778
|
/**
|
@@ -639,12 +788,32 @@ export declare const fetchBundle: (secret: string, conf: InternalConfig) => Prom
|
|
639
788
|
declare type FetchPackage = (url: string) => Promise<string>;
|
640
789
|
|
641
790
|
/**
|
791
|
+
* Counterpart for {@link ForbiddenError} from @tivio/api.
|
642
792
|
* @public
|
643
793
|
*/
|
644
|
-
export declare interface GenericOnCallError {
|
645
|
-
code:
|
646
|
-
|
647
|
-
|
794
|
+
export declare interface ForbiddenOnCallError extends GenericOnCallError {
|
795
|
+
code: 'permission-denied';
|
796
|
+
details?: {
|
797
|
+
reason: ForbiddenReason;
|
798
|
+
};
|
799
|
+
}
|
800
|
+
|
801
|
+
export declare enum ForbiddenReason {
|
802
|
+
MONETIZATION = "MONETIZATION",
|
803
|
+
GEO_BLOCKING = "GEO_BLOCKING"
|
804
|
+
}
|
805
|
+
|
806
|
+
/**
|
807
|
+
* On call error interface for front-end.
|
808
|
+
* Do not use it / throw it from @tivio/api.
|
809
|
+
* @public
|
810
|
+
*/
|
811
|
+
export declare interface GenericOnCallError extends Error {
|
812
|
+
/**
|
813
|
+
* Based on {@link FunctionsErrorCode} from firebase-functions.
|
814
|
+
*/
|
815
|
+
code: 'ok' | 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated';
|
816
|
+
details?: Record<string, string>;
|
648
817
|
}
|
649
818
|
|
650
819
|
/**
|
@@ -675,6 +844,57 @@ export declare type GetPurchaseInfoResponse = {
|
|
675
844
|
};
|
676
845
|
};
|
677
846
|
|
847
|
+
export declare interface GetSourceUrlRequest {
|
848
|
+
/**
|
849
|
+
* Id of the document to return source for.
|
850
|
+
*/
|
851
|
+
id: string;
|
852
|
+
/**
|
853
|
+
* Type of the document to return source for.
|
854
|
+
*/
|
855
|
+
documentType: 'video' | 'tvChannel';
|
856
|
+
/**
|
857
|
+
* Which capabilities should the resulting source support.
|
858
|
+
*/
|
859
|
+
capabilities: PlayerCapability[];
|
860
|
+
/**
|
861
|
+
* Which language the resulting source should support.
|
862
|
+
* If not present, language is not taken into consideration when picking the resulting source.
|
863
|
+
*/
|
864
|
+
language?: LangCode;
|
865
|
+
/**
|
866
|
+
* Which sources did client (or cloud function) has already tried out.
|
867
|
+
*/
|
868
|
+
sourceHistory?: string[];
|
869
|
+
/**
|
870
|
+
* When set to true the function will return urls with unsecured http protocol.
|
871
|
+
* We need this because some devices in certain circumstances are not able to use https.
|
872
|
+
*
|
873
|
+
* e.g. On LG it is not possible to use HTTPS certificates with root authority
|
874
|
+
* `Let's Encrypt` (for more info see https://jira.nangu.tv/browse/TIV-1047),
|
875
|
+
* which is used on cdn3.tiv.io domain.
|
876
|
+
*
|
877
|
+
* Switching this urls to http is a workaround for these cases.
|
878
|
+
*/
|
879
|
+
preferHttp?: boolean;
|
880
|
+
/**
|
881
|
+
* If set to true, sources on the document will be skipped and function will try to
|
882
|
+
* construct sources based on source domains right away.
|
883
|
+
*/
|
884
|
+
ignoreDocumentSources?: boolean;
|
885
|
+
}
|
886
|
+
|
887
|
+
export declare interface GetSourceUrlResponse {
|
888
|
+
/**
|
889
|
+
* The resulting source url.
|
890
|
+
*/
|
891
|
+
url: string;
|
892
|
+
/**
|
893
|
+
* Which sources did client (or cloud function) has already tried out.
|
894
|
+
*/
|
895
|
+
sourceHistory: string[];
|
896
|
+
}
|
897
|
+
|
678
898
|
/**
|
679
899
|
* @public
|
680
900
|
*/
|
@@ -794,7 +1014,7 @@ export declare type ItemComponent = RowItemComponent | BannerItemComponent;
|
|
794
1014
|
/**
|
795
1015
|
* @public
|
796
1016
|
*/
|
797
|
-
export declare type ItemsInRow = Tag | Video | TvChannel;
|
1017
|
+
export declare type ItemsInRow = Tag | Video | TvChannel | Advertisement;
|
798
1018
|
|
799
1019
|
/**
|
800
1020
|
* @public
|
@@ -939,6 +1159,14 @@ export declare interface Marker {
|
|
939
1159
|
type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
|
940
1160
|
}
|
941
1161
|
|
1162
|
+
/**
|
1163
|
+
* @public
|
1164
|
+
*/
|
1165
|
+
export declare type MarkersProps = {
|
1166
|
+
color?: string;
|
1167
|
+
className?: string;
|
1168
|
+
};
|
1169
|
+
|
942
1170
|
/**
|
943
1171
|
* External information of video migrated via our Public API.
|
944
1172
|
* @public
|
@@ -1004,6 +1232,7 @@ export declare interface MonetizationsSelectOverlayData {
|
|
1004
1232
|
* Otherwise, user is making a purchase for himself.
|
1005
1233
|
*/
|
1006
1234
|
voucherPurchase?: boolean;
|
1235
|
+
registrationRedirect?: boolean;
|
1007
1236
|
onPurchase?: () => void;
|
1008
1237
|
onClose?: () => void;
|
1009
1238
|
}
|
@@ -1012,9 +1241,10 @@ export declare interface MonetizationsSelectOverlayData {
|
|
1012
1241
|
* @public
|
1013
1242
|
*/
|
1014
1243
|
export declare type MonetizationsSelectOverlayState = {
|
1244
|
+
isOpen: boolean;
|
1015
1245
|
data: MonetizationsSelectOverlayData | null;
|
1016
|
-
closeMonetizationsSelectOverlay: () => void;
|
1017
1246
|
openMonetizationsSelectOverlay: (data: MonetizationsSelectOverlayData) => void;
|
1247
|
+
closeMonetizationsSelectOverlay: () => void;
|
1018
1248
|
};
|
1019
1249
|
|
1020
1250
|
/**
|
@@ -1115,12 +1345,16 @@ export declare type PaginationInterface<Entity> = {
|
|
1115
1345
|
export declare type PaginationOptions = Partial<{
|
1116
1346
|
limit: number;
|
1117
1347
|
noLimit: boolean;
|
1348
|
+
noAutoFetch: boolean;
|
1118
1349
|
}>;
|
1119
1350
|
|
1120
1351
|
/**
|
1121
1352
|
* @public
|
1122
1353
|
*/
|
1123
1354
|
export declare enum PLATFORM {
|
1355
|
+
/**
|
1356
|
+
* Includes tablets.
|
1357
|
+
*/
|
1124
1358
|
MOBILE = "MOBILE",
|
1125
1359
|
WEB = "WEB",
|
1126
1360
|
TV = "TV"
|
@@ -1721,8 +1955,13 @@ export declare type ReactNativeDeviceInfo = {
|
|
1721
1955
|
os?: 'iOS' | 'Android OS';
|
1722
1956
|
osVersion: string;
|
1723
1957
|
platform: PLATFORM;
|
1958
|
+
isTablet?: boolean;
|
1724
1959
|
};
|
1725
1960
|
|
1961
|
+
export declare enum RegistrationRedirect {
|
1962
|
+
PAYMENT = "payment"
|
1963
|
+
}
|
1964
|
+
|
1726
1965
|
/**
|
1727
1966
|
* @public
|
1728
1967
|
*/
|
@@ -1738,7 +1977,7 @@ export declare type RemoteBundleState = {
|
|
1738
1977
|
export declare type RemoteProviderProps = {
|
1739
1978
|
disableUnmounting?: boolean;
|
1740
1979
|
language?: LangCode;
|
1741
|
-
children:
|
1980
|
+
children: React_2.ReactNode;
|
1742
1981
|
};
|
1743
1982
|
|
1744
1983
|
/**
|
@@ -1769,7 +2008,9 @@ export declare interface RouterOverrides {
|
|
1769
2008
|
manual?: boolean;
|
1770
2009
|
origin?: LoginRedirect;
|
1771
2010
|
}) => void;
|
1772
|
-
goToRegistrationPage: (
|
2011
|
+
goToRegistrationPage: (options?: {
|
2012
|
+
origin?: RegistrationRedirect;
|
2013
|
+
}) => void;
|
1773
2014
|
goBack: () => void;
|
1774
2015
|
goLivePlayer: (tvChannelId: string) => void;
|
1775
2016
|
goVodPlayer: (videoIdOrUrlName: string) => void;
|
@@ -1783,6 +2024,7 @@ export declare interface RouterOverrides {
|
|
1783
2024
|
export declare interface RouterOverridesContextState {
|
1784
2025
|
routerOverrides: RouterOverrides;
|
1785
2026
|
Link: React_2.ComponentType<{
|
2027
|
+
children?: React_2.ReactNode;
|
1786
2028
|
href?: string;
|
1787
2029
|
}>;
|
1788
2030
|
}
|
@@ -1798,7 +2040,8 @@ export declare type Row = RowStandard | RowBanner;
|
|
1798
2040
|
export declare enum ROW_ITEM_TYPES {
|
1799
2041
|
VIDEO = "VIDEO",
|
1800
2042
|
TAG = "TAG",
|
1801
|
-
TV_CHANNEL = "TV_CHANNEL"
|
2043
|
+
TV_CHANNEL = "TV_CHANNEL",
|
2044
|
+
ADVERTISEMENT = "ADVERTISEMENT"
|
1802
2045
|
}
|
1803
2046
|
|
1804
2047
|
/**
|
@@ -1859,7 +2102,8 @@ export declare interface RowItemAssets {
|
|
1859
2102
|
export declare enum RowItemComponent {
|
1860
2103
|
ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
|
1861
2104
|
ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
|
1862
|
-
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
2105
|
+
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED",
|
2106
|
+
ROW_ITEM_BANNER = "ROW_ITEM_BANNER"
|
1863
2107
|
}
|
1864
2108
|
|
1865
2109
|
/**
|
@@ -1934,7 +2178,7 @@ export declare type ScreenOptions = Partial<{
|
|
1934
2178
|
/**
|
1935
2179
|
* @public
|
1936
2180
|
*/
|
1937
|
-
export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites';
|
2181
|
+
export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites' | 'topWatched';
|
1938
2182
|
|
1939
2183
|
/**
|
1940
2184
|
* Listen to screen data
|
@@ -2000,7 +2244,7 @@ export declare interface SettingsItem {
|
|
2000
2244
|
* Sign out - setUser(null)
|
2001
2245
|
* @public
|
2002
2246
|
*/
|
2003
|
-
export declare const setUser: (userId: string | null, payload?: UserPayload
|
2247
|
+
export declare const setUser: (userId: string | null, payload?: UserPayload) => Promise<void>;
|
2004
2248
|
|
2005
2249
|
/**
|
2006
2250
|
* @public
|
@@ -2181,6 +2425,7 @@ export declare type TileOptions = {
|
|
2181
2425
|
* @public
|
2182
2426
|
*/
|
2183
2427
|
export declare type TileProps = {
|
2428
|
+
children?: React_2.ReactNode;
|
2184
2429
|
cover: string;
|
2185
2430
|
bottomLabel: string;
|
2186
2431
|
bottomLabelAreaHeight: number;
|
@@ -2243,6 +2488,13 @@ export declare type TileSizesMap = {
|
|
2243
2488
|
*/
|
2244
2489
|
export declare type TileSizeVariant = 'default' | 'mobile';
|
2245
2490
|
|
2491
|
+
/**
|
2492
|
+
* @public
|
2493
|
+
*/
|
2494
|
+
export declare type TivioAnalytics = {
|
2495
|
+
analytics: AnalyticsInterface;
|
2496
|
+
};
|
2497
|
+
|
2246
2498
|
/**
|
2247
2499
|
* @public
|
2248
2500
|
*/
|
@@ -2282,8 +2534,10 @@ export declare type TivioBundleFile = {
|
|
2282
2534
|
* @public
|
2283
2535
|
*/
|
2284
2536
|
export declare type TivioComponents = {
|
2285
|
-
Markers: React_2.
|
2286
|
-
PlayerDataContext: React_2.
|
2537
|
+
Markers: React_2.ComponentType<MarkersProps>;
|
2538
|
+
PlayerDataContext: React_2.Context<{
|
2539
|
+
player: any | null;
|
2540
|
+
}>;
|
2287
2541
|
Provider: React_2.ComponentType<RemoteProviderProps>;
|
2288
2542
|
WebPlayer: React_2.ComponentType<WebPlayerProps>;
|
2289
2543
|
Widget: React_2.ComponentType<TivioWidgetProps>;
|
@@ -2352,6 +2606,13 @@ export declare interface TivioConfig {
|
|
2352
2606
|
*/
|
2353
2607
|
deviceInfo?: DeviceInfo;
|
2354
2608
|
player?: PlayerConfig;
|
2609
|
+
/**
|
2610
|
+
* Used for purposes where we need to differentiate organizations before it is known based on secret and data from DB.
|
2611
|
+
*
|
2612
|
+
* At this time it is necessary only for LG builds because on LG TVs it is needed to separate apps indexedDB storages
|
2613
|
+
* (otherwise organizations would share login token).
|
2614
|
+
*/
|
2615
|
+
customerId?: CustomerId;
|
2355
2616
|
}
|
2356
2617
|
|
2357
2618
|
/**
|
@@ -2485,7 +2746,7 @@ export declare type TivioInternalHooks = {
|
|
2485
2746
|
promotionId?: string;
|
2486
2747
|
referralId: string;
|
2487
2748
|
promotion?: any;
|
2488
|
-
};
|
2749
|
+
} | null;
|
2489
2750
|
error: Error | null;
|
2490
2751
|
loading: boolean;
|
2491
2752
|
});
|
@@ -2506,15 +2767,19 @@ export declare type TivioInternalHooks = {
|
|
2506
2767
|
export declare type TivioInternalProviders = {
|
2507
2768
|
AppThemeProvider: React_2.ComponentType;
|
2508
2769
|
CustomerProvider: React_2.ComponentType<{
|
2509
|
-
customer:
|
2770
|
+
customer: CustomerId;
|
2510
2771
|
platform: PLATFORM;
|
2511
|
-
children
|
2772
|
+
children?: React_2.ReactNode;
|
2773
|
+
}>;
|
2774
|
+
ConfigProvider: React_2.ComponentType<React_2.PropsWithChildren>;
|
2775
|
+
UserContextProvider: React_2.ComponentType<{
|
2776
|
+
children?: React_2.ReactNode;
|
2512
2777
|
}>;
|
2513
|
-
ConfigProvider: React_2.ComponentType;
|
2514
|
-
UserContextProvider: React_2.ComponentType;
|
2515
2778
|
MonetizationsSelectOverlayContextProvider: React_2.ComponentType;
|
2516
2779
|
QerkoOverlayContextProvider: React_2.ComponentType;
|
2517
|
-
PurchasesWithVideosContextProvider: React_2.ComponentType
|
2780
|
+
PurchasesWithVideosContextProvider: React_2.ComponentType<{
|
2781
|
+
children?: React_2.ReactNode;
|
2782
|
+
}>;
|
2518
2783
|
/**
|
2519
2784
|
* @deprecated not used in our app, can be removed when no sdk in production uses it
|
2520
2785
|
*/
|
@@ -2619,6 +2884,7 @@ export declare type TivioReactBundle = {
|
|
2619
2884
|
* TODO should not be the part of public API
|
2620
2885
|
*/
|
2621
2886
|
internal: TivioInternalBundle;
|
2887
|
+
analytics: TivioAnalytics;
|
2622
2888
|
destroy: () => Promise<void>;
|
2623
2889
|
} & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
|
2624
2890
|
|
@@ -2680,7 +2946,7 @@ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
|
|
2680
2946
|
/**
|
2681
2947
|
* @public
|
2682
2948
|
*/
|
2683
|
-
export declare const TivioWidget: React_2.ForwardRefExoticComponent<
|
2949
|
+
export declare const TivioWidget: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<TivioWidgetRef>>;
|
2684
2950
|
|
2685
2951
|
/**
|
2686
2952
|
* @public
|
@@ -2746,7 +3012,7 @@ export declare type Translation = {
|
|
2746
3012
|
* @public
|
2747
3013
|
*/
|
2748
3014
|
export declare type TvAppProps = {
|
2749
|
-
customer:
|
3015
|
+
customer: CustomerId;
|
2750
3016
|
};
|
2751
3017
|
|
2752
3018
|
/**
|
@@ -2767,10 +3033,12 @@ export declare interface TvChannel extends RowItem {
|
|
2767
3033
|
* Transactions before subscriptions, sorted by price ascending.
|
2768
3034
|
*/
|
2769
3035
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
3036
|
+
getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
|
2770
3037
|
purchasableMonetization: any | null;
|
2771
3038
|
price: number;
|
2772
3039
|
cover: string;
|
2773
3040
|
isPlayable: boolean;
|
3041
|
+
uri: string;
|
2774
3042
|
}
|
2775
3043
|
|
2776
3044
|
/**
|
@@ -2924,7 +3192,7 @@ export declare const useMarkers: () => Marker[] | null;
|
|
2924
3192
|
/**
|
2925
3193
|
* @public
|
2926
3194
|
*/
|
2927
|
-
export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean
|
3195
|
+
export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
|
2928
3196
|
subscriptions: PurchasableMonetization[];
|
2929
3197
|
};
|
2930
3198
|
|
@@ -2957,7 +3225,7 @@ export declare function usePurchaseRecovery(): {
|
|
2957
3225
|
/**
|
2958
3226
|
* @public
|
2959
3227
|
*/
|
2960
|
-
export declare const usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher
|
3228
|
+
export declare const usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher) => QerkoTransaction;
|
2961
3229
|
|
2962
3230
|
/**
|
2963
3231
|
* Return purchases with initialized video (purchases[i].video not null)
|
@@ -3006,6 +3274,7 @@ export declare type User = {
|
|
3006
3274
|
profiles: any[];
|
3007
3275
|
activeUserProfileId: string | null;
|
3008
3276
|
createUserProfile: (request: any) => Promise<void>;
|
3277
|
+
deleteUserProfile: (profileId: string) => Promise<void>;
|
3009
3278
|
setActiveUserProfileId: (id: string) => void;
|
3010
3279
|
};
|
3011
3280
|
|
@@ -3101,7 +3370,7 @@ export declare const useTivioReadyData: () => RemoteBundleState | null;
|
|
3101
3370
|
/**
|
3102
3371
|
* @public
|
3103
3372
|
*/
|
3104
|
-
export declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher
|
3373
|
+
export declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher) => QerkoTransaction;
|
3105
3374
|
|
3106
3375
|
/**
|
3107
3376
|
* @public
|
@@ -3127,7 +3396,7 @@ export declare const useUser: () => {
|
|
3127
3396
|
* @param videoIdOrUrlName - video id or video nice url (e.g. some-interesting-video)
|
3128
3397
|
* @public
|
3129
3398
|
*/
|
3130
|
-
export declare const useVideo: (videoIdOrUrlName?: string
|
3399
|
+
export declare const useVideo: (videoIdOrUrlName?: string) => {
|
3131
3400
|
data: Video | null;
|
3132
3401
|
error: string | null;
|
3133
3402
|
};
|
@@ -3160,15 +3429,7 @@ export declare const useWatchWithoutAdsOffer: () => {
|
|
3160
3429
|
/**
|
3161
3430
|
* @public
|
3162
3431
|
*/
|
3163
|
-
export declare const VAST_PROVIDERS:
|
3164
|
-
id: VastProvider;
|
3165
|
-
name: string;
|
3166
|
-
development?: undefined;
|
3167
|
-
} | {
|
3168
|
-
id: VastProvider;
|
3169
|
-
name: string;
|
3170
|
-
development: boolean;
|
3171
|
-
})[];
|
3432
|
+
export declare const VAST_PROVIDERS: VastProvidersItem[];
|
3172
3433
|
|
3173
3434
|
/**
|
3174
3435
|
* @public
|
@@ -3190,11 +3451,18 @@ export declare enum VastProvider {
|
|
3190
3451
|
PRIMA = "prima",
|
3191
3452
|
TEST = "test",
|
3192
3453
|
TEST_VPAID = "test-vpaid",
|
3454
|
+
TIVIO_ADS = "tivio-ads",
|
3193
3455
|
JOJ_TEST_AD_FORM_PROGRAMMATIC = "joj-test-ad-form-programmatic",
|
3194
3456
|
JOJ_TEST_TESTER_VASTERIX = "joj-test-tester-vasterix",
|
3195
3457
|
JOJ_TEST_TESTER_ADFORM_30 = "joj-test-tester-adform-30"
|
3196
3458
|
}
|
3197
3459
|
|
3460
|
+
declare type VastProvidersItem = {
|
3461
|
+
id: VastProvider;
|
3462
|
+
name: string;
|
3463
|
+
development?: boolean;
|
3464
|
+
};
|
3465
|
+
|
3198
3466
|
/**
|
3199
3467
|
* @public
|
3200
3468
|
*/
|
@@ -3221,6 +3489,7 @@ export declare interface Video extends RowItem {
|
|
3221
3489
|
* Transactions before subscriptions, sorted by price ascending.
|
3222
3490
|
*/
|
3223
3491
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
3492
|
+
getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
|
3224
3493
|
purchasableMonetization: any | null;
|
3225
3494
|
transaction: PurchasableMonetization | undefined;
|
3226
3495
|
subscriptions: PurchasableMonetization[];
|
@@ -3252,6 +3521,8 @@ export declare interface Video extends RowItem {
|
|
3252
3521
|
addToFavorites: () => void;
|
3253
3522
|
removeFromFavorites: () => void;
|
3254
3523
|
availability: VideoAvailability | null;
|
3524
|
+
sourceLanguages: LangCode[];
|
3525
|
+
uriByLanguage: (lang: LangCode) => string | undefined;
|
3255
3526
|
}
|
3256
3527
|
|
3257
3528
|
/**
|
@@ -3432,7 +3703,7 @@ export declare type WebRowProps = {
|
|
3432
3703
|
variant?: RowItemComponent;
|
3433
3704
|
rowName?: string | any;
|
3434
3705
|
fetchMore?: () => void;
|
3435
|
-
onTileClick?: (item
|
3706
|
+
onTileClick?: (item?: ItemsInRow | null) => void;
|
3436
3707
|
};
|
3437
3708
|
|
3438
3709
|
/**
|
@@ -3476,6 +3747,6 @@ export declare type Widget = {
|
|
3476
3747
|
/**
|
3477
3748
|
* @public
|
3478
3749
|
*/
|
3479
|
-
export declare function withPlayerContext(id: string): <P>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
|
3750
|
+
export declare function withPlayerContext(id: string): <P extends JSX.IntrinsicAttributes>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
|
3480
3751
|
|
3481
3752
|
export { }
|