@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/index.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;
|
@@ -330,6 +396,77 @@ export declare interface ConfirmationOverlayPayloadBase {
|
|
330
396
|
automaticConfirmDelayMs?: number;
|
331
397
|
}
|
332
398
|
|
399
|
+
/**
|
400
|
+
* Entity aggregate conversion statistics per day
|
401
|
+
*/
|
402
|
+
export declare interface ConversionAnalytic {
|
403
|
+
/**
|
404
|
+
* Unix timestamp
|
405
|
+
*/
|
406
|
+
date: number;
|
407
|
+
type: AnalyticsConversionName;
|
408
|
+
statistics: ConversionsItem[];
|
409
|
+
}
|
410
|
+
|
411
|
+
export declare interface ConversionsItem {
|
412
|
+
technology: PLATFORM;
|
413
|
+
os: DeviceOs;
|
414
|
+
osVersion: string;
|
415
|
+
details: {
|
416
|
+
/**
|
417
|
+
* Count of conversion with Success state
|
418
|
+
*/
|
419
|
+
successCount: number;
|
420
|
+
/**
|
421
|
+
* Count of all conversion regardless of status
|
422
|
+
*/
|
423
|
+
totalCount: number;
|
424
|
+
targets: ConversionsTargetItem[];
|
425
|
+
};
|
426
|
+
}
|
427
|
+
|
428
|
+
/**
|
429
|
+
* Entity with statistics conversion for url
|
430
|
+
*/
|
431
|
+
export declare interface ConversionsTargetItem {
|
432
|
+
/**
|
433
|
+
* Target id represent different values for every conversion.
|
434
|
+
* e.g. for visit conversion on video page saving videoId
|
435
|
+
* e.g. for visit conversion on profile page not saving anything
|
436
|
+
* e.g. for purchase conversion save monetizationId when user select specific monetization
|
437
|
+
* e.g. for purchase conversion not save anything when user leave monetization before select
|
438
|
+
* e.g. for click conversion save elementId
|
439
|
+
*/
|
440
|
+
targetId: string;
|
441
|
+
/**
|
442
|
+
* Target type represent different values for every conversion.
|
443
|
+
* e.g. for visit conversion show current path
|
444
|
+
* e.g. for purchase conversion is every time monetization
|
445
|
+
* e.g. for click conversion is every time element
|
446
|
+
*/
|
447
|
+
targetType: AnalyticsConversionTarget;
|
448
|
+
/**
|
449
|
+
* Path is page of conversion
|
450
|
+
* e.g. for visit conversion represent previews page
|
451
|
+
* e.g. for purchase conversion is page where purchase happened
|
452
|
+
* e.g. for click conversion is page where click happened
|
453
|
+
*/
|
454
|
+
path: string;
|
455
|
+
/**
|
456
|
+
* Path param is param from url of conversion (e.g. video page -> videoId, profile page -> unknown)
|
457
|
+
* e.g. for visit conversion represent parameters previews page
|
458
|
+
* e.g. for purchase conversion where purchase happened
|
459
|
+
* e.g. for click conversion where click happened
|
460
|
+
*/
|
461
|
+
pathParam: string | undefined;
|
462
|
+
/** Count of conversion with Success state on specific page */
|
463
|
+
successCount: number;
|
464
|
+
/**
|
465
|
+
* Count of all conversion regardless of status on specific page
|
466
|
+
*/
|
467
|
+
totalCount: number;
|
468
|
+
}
|
469
|
+
|
333
470
|
/**
|
334
471
|
* @public
|
335
472
|
* @TODO move somewhere else
|
@@ -376,14 +513,20 @@ export declare type Currency = 'CZK' | 'EUR' | 'USD';
|
|
376
513
|
/**
|
377
514
|
* @public
|
378
515
|
*/
|
379
|
-
export declare enum
|
516
|
+
export declare enum CustomerId {
|
380
517
|
OKTAGON = "OKTAGON",
|
381
518
|
JOJ = "JOJ",
|
382
519
|
MALL = "MALL",
|
383
520
|
GARAZ = "GARAZ",
|
384
521
|
U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
|
385
522
|
INVESTOREES = "INVESTOREES",
|
386
|
-
DVTV = "DVTV"
|
523
|
+
DVTV = "DVTV",
|
524
|
+
DVTV_DEV = "DVTV_DEV",
|
525
|
+
O2 = "O2",
|
526
|
+
GRAPE = "GRAPE",
|
527
|
+
TIVIO = "TIVIO",
|
528
|
+
STORYBOOK = "STORYBOOK",
|
529
|
+
NANGU_DEV = "NANGU_DEV"
|
387
530
|
}
|
388
531
|
|
389
532
|
/**
|
@@ -413,6 +556,11 @@ export declare type DetailedPrice = {
|
|
413
556
|
*/
|
414
557
|
export declare type DeviceInfo = ArrisDeviceInfo | ReactNativeDeviceInfo;
|
415
558
|
|
559
|
+
/**
|
560
|
+
* @public
|
561
|
+
*/
|
562
|
+
export declare type DeviceOs = OperatingSystem | 'Tizen' | 'webOS' | 'Arris' | 'Android TV' | 'tvOS';
|
563
|
+
|
416
564
|
/**
|
417
565
|
* @public
|
418
566
|
*/
|
@@ -478,6 +626,7 @@ export declare type Events = {
|
|
478
626
|
*/
|
479
627
|
export declare type ExternalTvConfig = {
|
480
628
|
logo: string;
|
629
|
+
splashScreenBackgroundColor?: string;
|
481
630
|
};
|
482
631
|
|
483
632
|
/**
|
@@ -493,12 +642,32 @@ export declare const fetchBundle: (secret: string, conf: InternalConfig) => Prom
|
|
493
642
|
declare type FetchPackage = (url: string) => Promise<string>;
|
494
643
|
|
495
644
|
/**
|
645
|
+
* Counterpart for {@link ForbiddenError} from @tivio/api.
|
496
646
|
* @public
|
497
647
|
*/
|
498
|
-
export declare interface GenericOnCallError {
|
499
|
-
code:
|
500
|
-
|
501
|
-
|
648
|
+
export declare interface ForbiddenOnCallError extends GenericOnCallError {
|
649
|
+
code: 'permission-denied';
|
650
|
+
details?: {
|
651
|
+
reason: ForbiddenReason;
|
652
|
+
};
|
653
|
+
}
|
654
|
+
|
655
|
+
export declare enum ForbiddenReason {
|
656
|
+
MONETIZATION = "MONETIZATION",
|
657
|
+
GEO_BLOCKING = "GEO_BLOCKING"
|
658
|
+
}
|
659
|
+
|
660
|
+
/**
|
661
|
+
* On call error interface for front-end.
|
662
|
+
* Do not use it / throw it from @tivio/api.
|
663
|
+
* @public
|
664
|
+
*/
|
665
|
+
export declare interface GenericOnCallError extends Error {
|
666
|
+
/**
|
667
|
+
* Based on {@link FunctionsErrorCode} from firebase-functions.
|
668
|
+
*/
|
669
|
+
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';
|
670
|
+
details?: Record<string, string>;
|
502
671
|
}
|
503
672
|
|
504
673
|
/**
|
@@ -529,6 +698,57 @@ export declare type GetPurchaseInfoResponse = {
|
|
529
698
|
};
|
530
699
|
};
|
531
700
|
|
701
|
+
export declare interface GetSourceUrlRequest {
|
702
|
+
/**
|
703
|
+
* Id of the document to return source for.
|
704
|
+
*/
|
705
|
+
id: string;
|
706
|
+
/**
|
707
|
+
* Type of the document to return source for.
|
708
|
+
*/
|
709
|
+
documentType: 'video' | 'tvChannel';
|
710
|
+
/**
|
711
|
+
* Which capabilities should the resulting source support.
|
712
|
+
*/
|
713
|
+
capabilities: PlayerCapability[];
|
714
|
+
/**
|
715
|
+
* Which language the resulting source should support.
|
716
|
+
* If not present, language is not taken into consideration when picking the resulting source.
|
717
|
+
*/
|
718
|
+
language?: LangCode;
|
719
|
+
/**
|
720
|
+
* Which sources did client (or cloud function) has already tried out.
|
721
|
+
*/
|
722
|
+
sourceHistory?: string[];
|
723
|
+
/**
|
724
|
+
* When set to true the function will return urls with unsecured http protocol.
|
725
|
+
* We need this because some devices in certain circumstances are not able to use https.
|
726
|
+
*
|
727
|
+
* e.g. On LG it is not possible to use HTTPS certificates with root authority
|
728
|
+
* `Let's Encrypt` (for more info see https://jira.nangu.tv/browse/TIV-1047),
|
729
|
+
* which is used on cdn3.tiv.io domain.
|
730
|
+
*
|
731
|
+
* Switching this urls to http is a workaround for these cases.
|
732
|
+
*/
|
733
|
+
preferHttp?: boolean;
|
734
|
+
/**
|
735
|
+
* If set to true, sources on the document will be skipped and function will try to
|
736
|
+
* construct sources based on source domains right away.
|
737
|
+
*/
|
738
|
+
ignoreDocumentSources?: boolean;
|
739
|
+
}
|
740
|
+
|
741
|
+
export declare interface GetSourceUrlResponse {
|
742
|
+
/**
|
743
|
+
* The resulting source url.
|
744
|
+
*/
|
745
|
+
url: string;
|
746
|
+
/**
|
747
|
+
* Which sources did client (or cloud function) has already tried out.
|
748
|
+
*/
|
749
|
+
sourceHistory: string[];
|
750
|
+
}
|
751
|
+
|
532
752
|
/**
|
533
753
|
* @public
|
534
754
|
*/
|
@@ -641,7 +861,7 @@ export declare type ItemComponent = RowItemComponent | BannerItemComponent;
|
|
641
861
|
/**
|
642
862
|
* @public
|
643
863
|
*/
|
644
|
-
export declare type ItemsInRow = Tag | Video | TvChannel;
|
864
|
+
export declare type ItemsInRow = Tag | Video | TvChannel | Advertisement;
|
645
865
|
|
646
866
|
/**
|
647
867
|
* @public
|
@@ -786,6 +1006,14 @@ export declare interface Marker {
|
|
786
1006
|
type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
|
787
1007
|
}
|
788
1008
|
|
1009
|
+
/**
|
1010
|
+
* @public
|
1011
|
+
*/
|
1012
|
+
export declare type MarkersProps = {
|
1013
|
+
color?: string;
|
1014
|
+
className?: string;
|
1015
|
+
};
|
1016
|
+
|
789
1017
|
/**
|
790
1018
|
* External information of video migrated via our Public API.
|
791
1019
|
* @public
|
@@ -851,6 +1079,7 @@ export declare interface MonetizationsSelectOverlayData {
|
|
851
1079
|
* Otherwise, user is making a purchase for himself.
|
852
1080
|
*/
|
853
1081
|
voucherPurchase?: boolean;
|
1082
|
+
registrationRedirect?: boolean;
|
854
1083
|
onPurchase?: () => void;
|
855
1084
|
onClose?: () => void;
|
856
1085
|
}
|
@@ -859,9 +1088,10 @@ export declare interface MonetizationsSelectOverlayData {
|
|
859
1088
|
* @public
|
860
1089
|
*/
|
861
1090
|
export declare type MonetizationsSelectOverlayState = {
|
1091
|
+
isOpen: boolean;
|
862
1092
|
data: MonetizationsSelectOverlayData | null;
|
863
|
-
closeMonetizationsSelectOverlay: () => void;
|
864
1093
|
openMonetizationsSelectOverlay: (data: MonetizationsSelectOverlayData) => void;
|
1094
|
+
closeMonetizationsSelectOverlay: () => void;
|
865
1095
|
};
|
866
1096
|
|
867
1097
|
/**
|
@@ -952,12 +1182,16 @@ export declare type PaginationInterface<Entity> = {
|
|
952
1182
|
export declare type PaginationOptions = Partial<{
|
953
1183
|
limit: number;
|
954
1184
|
noLimit: boolean;
|
1185
|
+
noAutoFetch: boolean;
|
955
1186
|
}>;
|
956
1187
|
|
957
1188
|
/**
|
958
1189
|
* @public
|
959
1190
|
*/
|
960
1191
|
export declare enum PLATFORM {
|
1192
|
+
/**
|
1193
|
+
* Includes tablets.
|
1194
|
+
*/
|
961
1195
|
MOBILE = "MOBILE",
|
962
1196
|
WEB = "WEB",
|
963
1197
|
TV = "TV"
|
@@ -1558,8 +1792,13 @@ export declare type ReactNativeDeviceInfo = {
|
|
1558
1792
|
os?: 'iOS' | 'Android OS';
|
1559
1793
|
osVersion: string;
|
1560
1794
|
platform: PLATFORM;
|
1795
|
+
isTablet?: boolean;
|
1561
1796
|
};
|
1562
1797
|
|
1798
|
+
export declare enum RegistrationRedirect {
|
1799
|
+
PAYMENT = "payment"
|
1800
|
+
}
|
1801
|
+
|
1563
1802
|
/**
|
1564
1803
|
* @public
|
1565
1804
|
*/
|
@@ -1575,7 +1814,7 @@ export declare type RemoteBundleState = {
|
|
1575
1814
|
export declare type RemoteProviderProps = {
|
1576
1815
|
disableUnmounting?: boolean;
|
1577
1816
|
language?: LangCode;
|
1578
|
-
children:
|
1817
|
+
children: React_2.ReactNode;
|
1579
1818
|
};
|
1580
1819
|
|
1581
1820
|
/**
|
@@ -1597,7 +1836,9 @@ export declare interface RouterOverrides {
|
|
1597
1836
|
manual?: boolean;
|
1598
1837
|
origin?: LoginRedirect;
|
1599
1838
|
}) => void;
|
1600
|
-
goToRegistrationPage: (
|
1839
|
+
goToRegistrationPage: (options?: {
|
1840
|
+
origin?: RegistrationRedirect;
|
1841
|
+
}) => void;
|
1601
1842
|
goBack: () => void;
|
1602
1843
|
goLivePlayer: (tvChannelId: string) => void;
|
1603
1844
|
goVodPlayer: (videoIdOrUrlName: string) => void;
|
@@ -1611,6 +1852,7 @@ export declare interface RouterOverrides {
|
|
1611
1852
|
export declare interface RouterOverridesContextState {
|
1612
1853
|
routerOverrides: RouterOverrides;
|
1613
1854
|
Link: React_2.ComponentType<{
|
1855
|
+
children?: React_2.ReactNode;
|
1614
1856
|
href?: string;
|
1615
1857
|
}>;
|
1616
1858
|
}
|
@@ -1626,7 +1868,8 @@ export declare type Row = RowStandard | RowBanner;
|
|
1626
1868
|
export declare enum ROW_ITEM_TYPES {
|
1627
1869
|
VIDEO = "VIDEO",
|
1628
1870
|
TAG = "TAG",
|
1629
|
-
TV_CHANNEL = "TV_CHANNEL"
|
1871
|
+
TV_CHANNEL = "TV_CHANNEL",
|
1872
|
+
ADVERTISEMENT = "ADVERTISEMENT"
|
1630
1873
|
}
|
1631
1874
|
|
1632
1875
|
/**
|
@@ -1687,7 +1930,8 @@ export declare interface RowItemAssets {
|
|
1687
1930
|
export declare enum RowItemComponent {
|
1688
1931
|
ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
|
1689
1932
|
ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
|
1690
|
-
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
1933
|
+
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED",
|
1934
|
+
ROW_ITEM_BANNER = "ROW_ITEM_BANNER"
|
1691
1935
|
}
|
1692
1936
|
|
1693
1937
|
/**
|
@@ -1762,7 +2006,7 @@ export declare type ScreenOptions = Partial<{
|
|
1762
2006
|
/**
|
1763
2007
|
* @public
|
1764
2008
|
*/
|
1765
|
-
export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites';
|
2009
|
+
export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites' | 'topWatched';
|
1766
2010
|
|
1767
2011
|
/**
|
1768
2012
|
* Listen to screen data
|
@@ -1828,7 +2072,7 @@ export declare interface SettingsItem {
|
|
1828
2072
|
* Sign out - setUser(null)
|
1829
2073
|
* @public
|
1830
2074
|
*/
|
1831
|
-
export declare const setUser: (userId: string | null, payload?: UserPayload
|
2075
|
+
export declare const setUser: (userId: string | null, payload?: UserPayload) => Promise<void>;
|
1832
2076
|
|
1833
2077
|
/**
|
1834
2078
|
* @public
|
@@ -1971,6 +2215,7 @@ export declare type TaggedVideosOrderByField = 'seasonNumber' | 'episodeNumber'
|
|
1971
2215
|
* @public
|
1972
2216
|
*/
|
1973
2217
|
export declare type TileProps = {
|
2218
|
+
children?: React_2.ReactNode;
|
1974
2219
|
cover: string;
|
1975
2220
|
bottomLabel: string;
|
1976
2221
|
bottomLabelAreaHeight: number;
|
@@ -2001,6 +2246,13 @@ export declare type TileProps = {
|
|
2001
2246
|
*/
|
2002
2247
|
export declare type TilePropsPartial = Partial<TileProps>;
|
2003
2248
|
|
2249
|
+
/**
|
2250
|
+
* @public
|
2251
|
+
*/
|
2252
|
+
export declare type TivioAnalytics = {
|
2253
|
+
analytics: AnalyticsInterface;
|
2254
|
+
};
|
2255
|
+
|
2004
2256
|
/**
|
2005
2257
|
* @public
|
2006
2258
|
*/
|
@@ -2040,8 +2292,10 @@ export declare type TivioBundleFile = {
|
|
2040
2292
|
* @public
|
2041
2293
|
*/
|
2042
2294
|
export declare type TivioComponents = {
|
2043
|
-
Markers: React_2.
|
2044
|
-
PlayerDataContext: React_2.
|
2295
|
+
Markers: React_2.ComponentType<MarkersProps>;
|
2296
|
+
PlayerDataContext: React_2.Context<{
|
2297
|
+
player: any | null;
|
2298
|
+
}>;
|
2045
2299
|
Provider: React_2.ComponentType<RemoteProviderProps>;
|
2046
2300
|
WebPlayer: React_2.ComponentType<WebPlayerProps>;
|
2047
2301
|
Widget: React_2.ComponentType<TivioWidgetProps>;
|
@@ -2110,6 +2364,13 @@ export declare interface TivioConfig {
|
|
2110
2364
|
*/
|
2111
2365
|
deviceInfo?: DeviceInfo;
|
2112
2366
|
player?: PlayerConfig;
|
2367
|
+
/**
|
2368
|
+
* Used for purposes where we need to differentiate organizations before it is known based on secret and data from DB.
|
2369
|
+
*
|
2370
|
+
* At this time it is necessary only for LG builds because on LG TVs it is needed to separate apps indexedDB storages
|
2371
|
+
* (otherwise organizations would share login token).
|
2372
|
+
*/
|
2373
|
+
customerId?: CustomerId;
|
2113
2374
|
}
|
2114
2375
|
|
2115
2376
|
/**
|
@@ -2243,7 +2504,7 @@ export declare type TivioInternalHooks = {
|
|
2243
2504
|
promotionId?: string;
|
2244
2505
|
referralId: string;
|
2245
2506
|
promotion?: any;
|
2246
|
-
};
|
2507
|
+
} | null;
|
2247
2508
|
error: Error | null;
|
2248
2509
|
loading: boolean;
|
2249
2510
|
});
|
@@ -2264,15 +2525,19 @@ export declare type TivioInternalHooks = {
|
|
2264
2525
|
export declare type TivioInternalProviders = {
|
2265
2526
|
AppThemeProvider: React_2.ComponentType;
|
2266
2527
|
CustomerProvider: React_2.ComponentType<{
|
2267
|
-
customer:
|
2528
|
+
customer: CustomerId;
|
2268
2529
|
platform: PLATFORM;
|
2269
|
-
children
|
2530
|
+
children?: React_2.ReactNode;
|
2531
|
+
}>;
|
2532
|
+
ConfigProvider: React_2.ComponentType<React_2.PropsWithChildren>;
|
2533
|
+
UserContextProvider: React_2.ComponentType<{
|
2534
|
+
children?: React_2.ReactNode;
|
2270
2535
|
}>;
|
2271
|
-
ConfigProvider: React_2.ComponentType;
|
2272
|
-
UserContextProvider: React_2.ComponentType;
|
2273
2536
|
MonetizationsSelectOverlayContextProvider: React_2.ComponentType;
|
2274
2537
|
QerkoOverlayContextProvider: React_2.ComponentType;
|
2275
|
-
PurchasesWithVideosContextProvider: React_2.ComponentType
|
2538
|
+
PurchasesWithVideosContextProvider: React_2.ComponentType<{
|
2539
|
+
children?: React_2.ReactNode;
|
2540
|
+
}>;
|
2276
2541
|
/**
|
2277
2542
|
* @deprecated not used in our app, can be removed when no sdk in production uses it
|
2278
2543
|
*/
|
@@ -2369,6 +2634,7 @@ export declare type TivioReactBundle = {
|
|
2369
2634
|
* TODO should not be the part of public API
|
2370
2635
|
*/
|
2371
2636
|
internal: TivioInternalBundle;
|
2637
|
+
analytics: TivioAnalytics;
|
2372
2638
|
destroy: () => Promise<void>;
|
2373
2639
|
} & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
|
2374
2640
|
|
@@ -2430,7 +2696,7 @@ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
|
|
2430
2696
|
/**
|
2431
2697
|
* @public
|
2432
2698
|
*/
|
2433
|
-
export declare const TivioWidget: React_2.ForwardRefExoticComponent<
|
2699
|
+
export declare const TivioWidget: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<TivioWidgetRef>>;
|
2434
2700
|
|
2435
2701
|
/**
|
2436
2702
|
* @public
|
@@ -2496,7 +2762,7 @@ export declare type Translation = {
|
|
2496
2762
|
* @public
|
2497
2763
|
*/
|
2498
2764
|
export declare type TvAppProps = {
|
2499
|
-
customer:
|
2765
|
+
customer: CustomerId;
|
2500
2766
|
};
|
2501
2767
|
|
2502
2768
|
/**
|
@@ -2517,10 +2783,12 @@ export declare interface TvChannel extends RowItem {
|
|
2517
2783
|
* Transactions before subscriptions, sorted by price ascending.
|
2518
2784
|
*/
|
2519
2785
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
2786
|
+
getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
|
2520
2787
|
purchasableMonetization: any | null;
|
2521
2788
|
price: number;
|
2522
2789
|
cover: string;
|
2523
2790
|
isPlayable: boolean;
|
2791
|
+
uri: string;
|
2524
2792
|
}
|
2525
2793
|
|
2526
2794
|
/**
|
@@ -2674,7 +2942,7 @@ export declare const useMarkers: () => Marker[] | null;
|
|
2674
2942
|
/**
|
2675
2943
|
* @public
|
2676
2944
|
*/
|
2677
|
-
export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean
|
2945
|
+
export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
|
2678
2946
|
subscriptions: PurchasableMonetization[];
|
2679
2947
|
};
|
2680
2948
|
|
@@ -2707,7 +2975,7 @@ export declare function usePurchaseRecovery(): {
|
|
2707
2975
|
/**
|
2708
2976
|
* @public
|
2709
2977
|
*/
|
2710
|
-
export declare const usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher
|
2978
|
+
export declare const usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher) => QerkoTransaction;
|
2711
2979
|
|
2712
2980
|
/**
|
2713
2981
|
* Return purchases with initialized video (purchases[i].video not null)
|
@@ -2756,6 +3024,7 @@ export declare type User = {
|
|
2756
3024
|
profiles: any[];
|
2757
3025
|
activeUserProfileId: string | null;
|
2758
3026
|
createUserProfile: (request: any) => Promise<void>;
|
3027
|
+
deleteUserProfile: (profileId: string) => Promise<void>;
|
2759
3028
|
setActiveUserProfileId: (id: string) => void;
|
2760
3029
|
};
|
2761
3030
|
|
@@ -2851,7 +3120,7 @@ export declare const useTivioReadyData: () => RemoteBundleState | null;
|
|
2851
3120
|
/**
|
2852
3121
|
* @public
|
2853
3122
|
*/
|
2854
|
-
export declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher
|
3123
|
+
export declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher) => QerkoTransaction;
|
2855
3124
|
|
2856
3125
|
/**
|
2857
3126
|
* @public
|
@@ -2877,7 +3146,7 @@ export declare const useUser: () => {
|
|
2877
3146
|
* @param videoIdOrUrlName - video id or video nice url (e.g. some-interesting-video)
|
2878
3147
|
* @public
|
2879
3148
|
*/
|
2880
|
-
export declare const useVideo: (videoIdOrUrlName?: string
|
3149
|
+
export declare const useVideo: (videoIdOrUrlName?: string) => {
|
2881
3150
|
data: Video | null;
|
2882
3151
|
error: string | null;
|
2883
3152
|
};
|
@@ -2910,15 +3179,7 @@ export declare const useWatchWithoutAdsOffer: () => {
|
|
2910
3179
|
/**
|
2911
3180
|
* @public
|
2912
3181
|
*/
|
2913
|
-
export declare const VAST_PROVIDERS:
|
2914
|
-
id: VastProvider;
|
2915
|
-
name: string;
|
2916
|
-
development?: undefined;
|
2917
|
-
} | {
|
2918
|
-
id: VastProvider;
|
2919
|
-
name: string;
|
2920
|
-
development: boolean;
|
2921
|
-
})[];
|
3182
|
+
export declare const VAST_PROVIDERS: VastProvidersItem[];
|
2922
3183
|
|
2923
3184
|
/**
|
2924
3185
|
* @public
|
@@ -2940,11 +3201,18 @@ export declare enum VastProvider {
|
|
2940
3201
|
PRIMA = "prima",
|
2941
3202
|
TEST = "test",
|
2942
3203
|
TEST_VPAID = "test-vpaid",
|
3204
|
+
TIVIO_ADS = "tivio-ads",
|
2943
3205
|
JOJ_TEST_AD_FORM_PROGRAMMATIC = "joj-test-ad-form-programmatic",
|
2944
3206
|
JOJ_TEST_TESTER_VASTERIX = "joj-test-tester-vasterix",
|
2945
3207
|
JOJ_TEST_TESTER_ADFORM_30 = "joj-test-tester-adform-30"
|
2946
3208
|
}
|
2947
3209
|
|
3210
|
+
declare type VastProvidersItem = {
|
3211
|
+
id: VastProvider;
|
3212
|
+
name: string;
|
3213
|
+
development?: boolean;
|
3214
|
+
};
|
3215
|
+
|
2948
3216
|
/**
|
2949
3217
|
* @public
|
2950
3218
|
*/
|
@@ -2971,6 +3239,7 @@ export declare interface Video extends RowItem {
|
|
2971
3239
|
* Transactions before subscriptions, sorted by price ascending.
|
2972
3240
|
*/
|
2973
3241
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
3242
|
+
getSourceUrl(fallbackUrl?: string): Promise<GetSourceUrlResponse>;
|
2974
3243
|
purchasableMonetization: any | null;
|
2975
3244
|
transaction: PurchasableMonetization | undefined;
|
2976
3245
|
subscriptions: PurchasableMonetization[];
|
@@ -3002,6 +3271,8 @@ export declare interface Video extends RowItem {
|
|
3002
3271
|
addToFavorites: () => void;
|
3003
3272
|
removeFromFavorites: () => void;
|
3004
3273
|
availability: VideoAvailability | null;
|
3274
|
+
sourceLanguages: LangCode[];
|
3275
|
+
uriByLanguage: (lang: LangCode) => string | undefined;
|
3005
3276
|
}
|
3006
3277
|
|
3007
3278
|
/**
|
@@ -3182,7 +3453,7 @@ export declare type WebRowProps = {
|
|
3182
3453
|
variant?: RowItemComponent;
|
3183
3454
|
rowName?: string | any;
|
3184
3455
|
fetchMore?: () => void;
|
3185
|
-
onTileClick?: (item
|
3456
|
+
onTileClick?: (item?: ItemsInRow | null) => void;
|
3186
3457
|
};
|
3187
3458
|
|
3188
3459
|
/**
|
@@ -3226,6 +3497,6 @@ export declare type Widget = {
|
|
3226
3497
|
/**
|
3227
3498
|
* @public
|
3228
3499
|
*/
|
3229
|
-
export declare function withPlayerContext(id: string): <P>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
|
3500
|
+
export declare function withPlayerContext(id: string): <P extends JSX.IntrinsicAttributes>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
|
3230
3501
|
|
3231
3502
|
export { }
|