@tivio/sdk-react 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +10 -1
- package/README.md.bak +10 -1
- package/dist/index.d.ts +501 -51
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/doc/changelog.md +0 -0
package/dist/index.d.ts
CHANGED
@@ -1,44 +1,10 @@
|
|
1
|
-
import { AuthOverlayState } from '@tivio/common';
|
2
|
-
import { Channel as Channel_2 } from '@tivio/common/dist/types/externalTypes/channel';
|
3
|
-
import { Channel as Channel_3 } from '@tivio/common';
|
4
1
|
import { ComponentType } from 'react';
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import { CUSTOMER_BUILD } from '@tivio/common';
|
2
|
+
import { default as firebase_2 } from 'firebase';
|
3
|
+
import type { default as firebase_3 } from 'firebase/app';
|
8
4
|
import { FunctionComponentElement } from 'react';
|
9
|
-
import {
|
10
|
-
import { Monetization } from '@tivio/common';
|
11
|
-
import { PaginationInterface } from '@tivio/common';
|
12
|
-
import { PaginationOptions } from '@tivio/common';
|
13
|
-
import { PLATFORM } from '@tivio/common';
|
14
|
-
import type { Purchase as Purchase_2 } from '@tivio/common';
|
15
|
-
import { Purchase as Purchase_3 } from '@tivio/common/dist/types/externalTypes/user';
|
16
|
-
import { QerkoCancellationInfo } from '@tivio/common';
|
17
|
-
import type { QerkoPaymentInfo } from '@tivio/common';
|
18
|
-
import { QerkoTransaction } from '@tivio/common';
|
5
|
+
import { OrderByDirection } from '@firebase/firestore-types';
|
19
6
|
import { default as React_2 } from 'react';
|
20
|
-
import {
|
21
|
-
import { Screen as Screen_2 } from '@tivio/common';
|
22
|
-
import { ScreenOptions } from '@tivio/common';
|
23
|
-
import { Section as Section_2 } from '@tivio/common/dist/types/externalTypes/section';
|
24
|
-
import { Section as Section_3 } from '@tivio/common';
|
25
|
-
import type { SubscribeToItemsInRow } from '@tivio/common';
|
26
|
-
import { SubscribeToItemsInRowOptions } from '@tivio/common';
|
27
|
-
import type { SubscribeToRowsInScreen } from '@tivio/common';
|
28
|
-
import type { SubscribeToScreen } from '@tivio/common';
|
29
|
-
import { SubscribeToTaggedVideos } from '@tivio/common';
|
30
|
-
import { Tag } from '@tivio/common';
|
31
|
-
import { TilePropsPartial } from '@tivio/common';
|
32
|
-
import type { TvAppProps } from '@tivio/common';
|
33
|
-
import { UseCancelSubscription } from '@tivio/common';
|
34
|
-
import { UseChannelSource } from '@tivio/common';
|
35
|
-
import type { User } from '@tivio/common';
|
36
|
-
import { User as User_2 } from '@tivio/common/dist/types/externalTypes/user';
|
37
|
-
import { UseSearch } from '@tivio/common';
|
38
|
-
import type { UseTvChannel } from '@tivio/common';
|
39
|
-
import { Video } from '@tivio/common';
|
40
|
-
import { WebRowProps } from '@tivio/common';
|
41
|
-
import { WebSeriesDetailScreenProps } from '@tivio/common';
|
7
|
+
import { WhereFilterOp } from '@firebase/firestore-types';
|
42
8
|
|
43
9
|
declare type AdSegment = {
|
44
10
|
id: string;
|
@@ -101,11 +67,43 @@ export declare type AdSource = {
|
|
101
67
|
* @public
|
102
68
|
*/
|
103
69
|
export declare enum ALGOLIA_INDEX_NAME {
|
104
|
-
VIDEOS =
|
105
|
-
VIDEOSDESC =
|
106
|
-
TAGS =
|
107
|
-
TV_CHANNELS =
|
108
|
-
USERS =
|
70
|
+
VIDEOS = "videos",
|
71
|
+
VIDEOSDESC = "videos_created_desc",
|
72
|
+
TAGS = "tags",
|
73
|
+
TV_CHANNELS = "tvChannels",
|
74
|
+
USERS = "users"
|
75
|
+
}
|
76
|
+
|
77
|
+
declare interface Asset {
|
78
|
+
background: string;
|
79
|
+
}
|
80
|
+
|
81
|
+
declare type Assets = {
|
82
|
+
[assetName: string]: ScalableAsset;
|
83
|
+
};
|
84
|
+
|
85
|
+
declare type AuthOverlayPayload = {
|
86
|
+
prefilledData?: {
|
87
|
+
email: string;
|
88
|
+
};
|
89
|
+
/**
|
90
|
+
* "Goto" function (see router.utils.ts) to run after the overlay is closed. Null if no redirect is required.
|
91
|
+
* Defaults to homepage.
|
92
|
+
*/
|
93
|
+
redirectAfterSubmit?: ((...args: any[]) => void) | null;
|
94
|
+
};
|
95
|
+
|
96
|
+
declare type AuthOverlayState = {
|
97
|
+
type: AuthOverlayType;
|
98
|
+
closeAuthOverlay: () => void;
|
99
|
+
openAuthOverlay: (type: AuthOverlayType, payload?: AuthOverlayPayload) => void;
|
100
|
+
payload?: AuthOverlayPayload | null;
|
101
|
+
};
|
102
|
+
|
103
|
+
declare type AuthOverlayType = 'login' | 'registration' | 'closed' | 'reset-password';
|
104
|
+
|
105
|
+
declare interface AvailableSeason {
|
106
|
+
seasonNumber: number;
|
109
107
|
}
|
110
108
|
|
111
109
|
export declare type BadRequestError = Error & {
|
@@ -140,7 +138,10 @@ export declare type Channel = {
|
|
140
138
|
recentVideos: Video[];
|
141
139
|
};
|
142
140
|
|
143
|
-
|
141
|
+
declare interface Channel_2 {
|
142
|
+
}
|
143
|
+
|
144
|
+
export declare const ChannelsContext: React_2.Context<DataState<Channel_2>>;
|
144
145
|
|
145
146
|
export declare type ChannelSource = {
|
146
147
|
new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
|
@@ -156,6 +157,18 @@ export declare type ChannelSource = {
|
|
156
157
|
} | null;
|
157
158
|
};
|
158
159
|
|
160
|
+
declare interface ChannelSource_2 {
|
161
|
+
type: 'ChannelSource';
|
162
|
+
uri: string;
|
163
|
+
originalOptions: any;
|
164
|
+
channelName: string;
|
165
|
+
programName: string;
|
166
|
+
programDescription: string;
|
167
|
+
from: Date;
|
168
|
+
to: Date;
|
169
|
+
poster?: string;
|
170
|
+
}
|
171
|
+
|
159
172
|
export declare interface ChannelSourcePojo {
|
160
173
|
type: 'ChannelSource';
|
161
174
|
uri: string;
|
@@ -179,6 +192,13 @@ export declare type Config = Pick<InternalConfig, 'bundleUrlOverride' | 'currenc
|
|
179
192
|
runFeatureSupportCheck?: boolean;
|
180
193
|
};
|
181
194
|
|
195
|
+
declare type CoverPadding = {
|
196
|
+
top?: number;
|
197
|
+
bottom?: number;
|
198
|
+
left?: number;
|
199
|
+
right?: number;
|
200
|
+
};
|
201
|
+
|
182
202
|
export declare const createPubSub: () => PubSub;
|
183
203
|
|
184
204
|
/**
|
@@ -188,7 +208,18 @@ export declare const createRemotePackageLoader: () => (secret: string, conf: Int
|
|
188
208
|
|
189
209
|
export declare const createUseRemoteBundle: () => (conf: InternalConfig) => RemoteBundleState;
|
190
210
|
|
191
|
-
|
211
|
+
declare type CreateUserWithEmailAndPassword = (email: string, password: string, username?: string, referralToken?: string) => Promise<string | null>;
|
212
|
+
|
213
|
+
export declare type Currency = 'CZK' | 'EUR' | 'USD';
|
214
|
+
|
215
|
+
export declare enum CUSTOMER_BUILD {
|
216
|
+
OKTAGON = "OKTAGON",
|
217
|
+
JOJ = "JOJ",
|
218
|
+
MALL = "MALL",
|
219
|
+
GARAZ = "GARAZ",
|
220
|
+
U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
|
221
|
+
INVESTOREES = "INVESTOREES"
|
222
|
+
}
|
192
223
|
|
193
224
|
declare interface DataState<T> {
|
194
225
|
data: {
|
@@ -197,8 +228,23 @@ declare interface DataState<T> {
|
|
197
228
|
setData: (key: string, data: HookData<T>) => void;
|
198
229
|
}
|
199
230
|
|
231
|
+
declare type DefaultOrderByField = 'created';
|
232
|
+
|
233
|
+
declare type DetailedPrice = {
|
234
|
+
amount: number;
|
235
|
+
currency: Currency;
|
236
|
+
frequency?: MONETIZATION_FREQUENCY;
|
237
|
+
};
|
238
|
+
|
200
239
|
export declare type Disposer = () => void;
|
201
240
|
|
241
|
+
declare type Disposer_2 = () => void;
|
242
|
+
|
243
|
+
declare type DocumentOptions = Partial<{
|
244
|
+
lazyLoading: boolean;
|
245
|
+
subscribeOnChanges: boolean;
|
246
|
+
}>;
|
247
|
+
|
202
248
|
export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
|
203
249
|
|
204
250
|
export declare type Events = {
|
@@ -206,6 +252,10 @@ export declare type Events = {
|
|
206
252
|
'on-error': Error;
|
207
253
|
};
|
208
254
|
|
255
|
+
export declare type ExternalTvConfig = {
|
256
|
+
logo: string;
|
257
|
+
};
|
258
|
+
|
209
259
|
/**
|
210
260
|
* @throws if fetch fails
|
211
261
|
*/
|
@@ -287,6 +337,11 @@ declare interface IntroMarker {
|
|
287
337
|
skip: () => void;
|
288
338
|
}
|
289
339
|
|
340
|
+
declare type ItemsInRow = Tag | Video | TvChannel;
|
341
|
+
|
342
|
+
/**
|
343
|
+
* Enum of all supported languages codes as in ISO 639-1
|
344
|
+
*/
|
290
345
|
export declare enum LangCode {
|
291
346
|
CS = "cs",
|
292
347
|
DE = "de",
|
@@ -297,6 +352,11 @@ export declare enum LangCode {
|
|
297
352
|
SP = "sp"
|
298
353
|
}
|
299
354
|
|
355
|
+
declare type LinkedVideo = {
|
356
|
+
video: Video;
|
357
|
+
type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
|
358
|
+
};
|
359
|
+
|
300
360
|
declare interface Logger {
|
301
361
|
/** important messages */
|
302
362
|
warn(...data: LoggerArgs): void;
|
@@ -326,7 +386,26 @@ export declare type Marker = {
|
|
326
386
|
toMs?: number;
|
327
387
|
};
|
328
388
|
|
329
|
-
export
|
389
|
+
export declare interface Monetization {
|
390
|
+
id: string;
|
391
|
+
price?: string | number;
|
392
|
+
type?: MonetizationType;
|
393
|
+
frequency?: MONETIZATION_FREQUENCY;
|
394
|
+
name?: string;
|
395
|
+
description?: string;
|
396
|
+
benefits?: Translation[];
|
397
|
+
localizedBenefits?: string[];
|
398
|
+
}
|
399
|
+
|
400
|
+
declare enum MONETIZATION_FREQUENCY {
|
401
|
+
ONE_TIME_PAYMENT = "ONE_TIME_PAYMENT",
|
402
|
+
DAILY = "DAILY",
|
403
|
+
WEEKLY = "WEEKLY",
|
404
|
+
MONTHLY = "MONTHLY",
|
405
|
+
ANNUALLY = "ANNUALLY"
|
406
|
+
}
|
407
|
+
|
408
|
+
declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
|
330
409
|
|
331
410
|
/**
|
332
411
|
* TODO: Duplicate, because we can't import types from core-js.
|
@@ -339,12 +418,35 @@ export declare type Nullable<T> = {
|
|
339
418
|
[P in keyof T]: T[P] | null;
|
340
419
|
};
|
341
420
|
|
421
|
+
declare interface OrderBy {
|
422
|
+
field: string;
|
423
|
+
directionStr?: OrderByDirection;
|
424
|
+
}
|
425
|
+
|
342
426
|
declare type PaginationData<T> = {
|
343
427
|
items: T[];
|
344
428
|
hasNextPage: boolean;
|
345
429
|
fetchMore: Function;
|
346
430
|
};
|
347
431
|
|
432
|
+
declare type PaginationInterface<Entity> = {
|
433
|
+
items: Entity[];
|
434
|
+
fetchMore: () => void;
|
435
|
+
hasNextPage?: boolean;
|
436
|
+
loading?: boolean;
|
437
|
+
};
|
438
|
+
|
439
|
+
declare type PaginationOptions = Partial<{
|
440
|
+
limit: number;
|
441
|
+
noLimit: boolean;
|
442
|
+
}>;
|
443
|
+
|
444
|
+
export declare enum PLATFORM {
|
445
|
+
MOBILE = "MOBILE",
|
446
|
+
WEB = "WEB",
|
447
|
+
TV = "TV"
|
448
|
+
}
|
449
|
+
|
348
450
|
export declare interface PlayerCapability {
|
349
451
|
codec: 'h264' | 'h265';
|
350
452
|
encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
|
@@ -480,6 +582,48 @@ export declare type Purchase = {
|
|
480
582
|
video: Video | null;
|
481
583
|
};
|
482
584
|
|
585
|
+
declare type Purchase_2 = {
|
586
|
+
id: string;
|
587
|
+
isPurchased: boolean;
|
588
|
+
monetizationRef: firebase_3.firestore.DocumentReference | null;
|
589
|
+
monetization: PurchaseMonetization | null;
|
590
|
+
monetizationId: string | null;
|
591
|
+
type: MonetizationType | null;
|
592
|
+
videoId: string | null;
|
593
|
+
status: PurchaseStatus | null;
|
594
|
+
video: Video | null;
|
595
|
+
videoRef: firebase_3.firestore.DocumentReference | null;
|
596
|
+
expirationDate: Date | null;
|
597
|
+
isExpired: boolean;
|
598
|
+
voucherId?: string;
|
599
|
+
};
|
600
|
+
|
601
|
+
declare type PurchaseMonetization = {
|
602
|
+
currency: Currency;
|
603
|
+
period: number;
|
604
|
+
price: number;
|
605
|
+
type: MonetizationType;
|
606
|
+
title: string;
|
607
|
+
frequency: MONETIZATION_FREQUENCY | null;
|
608
|
+
/**
|
609
|
+
* If set, purchase (subscription) activated by voucher will stay valid for this amount of seconds.
|
610
|
+
* Otherwise, purchase will be valid for one "monetization frequency" period.
|
611
|
+
*/
|
612
|
+
voucherPurchaseDuration?: number;
|
613
|
+
};
|
614
|
+
|
615
|
+
declare enum PurchaseStatus {
|
616
|
+
NEW = "NEW",
|
617
|
+
PAID = "PAID",
|
618
|
+
CANCELLED = "CANCELLED",
|
619
|
+
ERROR = "ERROR"
|
620
|
+
}
|
621
|
+
|
622
|
+
export declare interface QerkoCancellationInfo {
|
623
|
+
purchaseId: string;
|
624
|
+
status: PurchaseStatus;
|
625
|
+
}
|
626
|
+
|
483
627
|
export declare interface QerkoData {
|
484
628
|
monetization: Monetization;
|
485
629
|
video?: Video;
|
@@ -493,6 +637,26 @@ export declare interface QerkoOverlayState {
|
|
493
637
|
closeQerkoOverlay: () => void;
|
494
638
|
}
|
495
639
|
|
640
|
+
export declare interface QerkoPaymentInfo {
|
641
|
+
webPaymentGatewayLink: string;
|
642
|
+
gatewayUri: string;
|
643
|
+
paymentQRCodeUri: string;
|
644
|
+
purchaseId: string;
|
645
|
+
currency: string;
|
646
|
+
amount: number;
|
647
|
+
monetizationType: MonetizationType;
|
648
|
+
recovery?: boolean;
|
649
|
+
monetizationFrequency: MONETIZATION_FREQUENCY;
|
650
|
+
}
|
651
|
+
|
652
|
+
declare interface QerkoTransaction {
|
653
|
+
paymentInfo: QerkoPaymentInfo | null;
|
654
|
+
paymentError: string | null;
|
655
|
+
paymentStatus: string | null;
|
656
|
+
getPaymentInfo: () => Promise<void>;
|
657
|
+
voucherId?: string;
|
658
|
+
}
|
659
|
+
|
496
660
|
export declare type RemoteBundleState = {
|
497
661
|
config: InternalConfig;
|
498
662
|
error: string | null;
|
@@ -519,6 +683,69 @@ export declare interface RouterOverridesContextState {
|
|
519
683
|
routerOverrides: RouterOverrides;
|
520
684
|
}
|
521
685
|
|
686
|
+
declare interface Row {
|
687
|
+
id: string;
|
688
|
+
rowId: string;
|
689
|
+
name: string;
|
690
|
+
description?: string;
|
691
|
+
itemComponent: RowItemComponent;
|
692
|
+
rowComponent: RowComponent;
|
693
|
+
assets: Assets;
|
694
|
+
type: ScreenRowType;
|
695
|
+
}
|
696
|
+
|
697
|
+
export declare enum ROW_ITEM_TYPES {
|
698
|
+
VIDEO = "VIDEO",
|
699
|
+
TAG = "TAG",
|
700
|
+
TV_CHANNEL = "TV_CHANNEL"
|
701
|
+
}
|
702
|
+
|
703
|
+
declare enum RowComponent {
|
704
|
+
ROW = "ROW",
|
705
|
+
BANNER = "BANNER"
|
706
|
+
}
|
707
|
+
|
708
|
+
declare interface RowItem extends RowItemAssets {
|
709
|
+
itemType: ROW_ITEM_TYPES;
|
710
|
+
name?: string;
|
711
|
+
description?: string;
|
712
|
+
assets: Assets | null;
|
713
|
+
}
|
714
|
+
|
715
|
+
declare interface RowItemAssets {
|
716
|
+
landscape?: string | null;
|
717
|
+
portrait?: string | null;
|
718
|
+
circled?: string | null;
|
719
|
+
banner?: string | null;
|
720
|
+
}
|
721
|
+
|
722
|
+
declare enum RowItemComponent {
|
723
|
+
ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
|
724
|
+
ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
|
725
|
+
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
726
|
+
}
|
727
|
+
|
728
|
+
declare type ScalableAsset = {
|
729
|
+
'@1': Asset;
|
730
|
+
'@2'?: Asset;
|
731
|
+
'@3'?: Asset;
|
732
|
+
};
|
733
|
+
|
734
|
+
declare interface Screen_2 {
|
735
|
+
id: string;
|
736
|
+
name: string;
|
737
|
+
description?: string;
|
738
|
+
assets: Assets;
|
739
|
+
rows: Row[];
|
740
|
+
}
|
741
|
+
|
742
|
+
declare type ScreenOptions = Partial<{
|
743
|
+
language: LangCode;
|
744
|
+
initRows: boolean;
|
745
|
+
}> & DocumentOptions;
|
746
|
+
|
747
|
+
declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites';
|
748
|
+
|
522
749
|
export declare type Section = {
|
523
750
|
id: string;
|
524
751
|
name: string;
|
@@ -526,7 +753,10 @@ export declare type Section = {
|
|
526
753
|
videos: Video[];
|
527
754
|
};
|
528
755
|
|
529
|
-
|
756
|
+
declare interface Section_2 {
|
757
|
+
}
|
758
|
+
|
759
|
+
export declare const SectionsContext: React_2.Context<DataState<Section_2>>;
|
530
760
|
|
531
761
|
export declare type Settings = {
|
532
762
|
/**
|
@@ -545,6 +775,25 @@ export declare const setUser: (userId: string | null, payload?: UserPayload | un
|
|
545
775
|
|
546
776
|
export declare const showGdprConsentPreferences: () => Promise<void>;
|
547
777
|
|
778
|
+
declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error | null, data: PaginationInterface<ItemsInRow> | null) => void, options?: SubscribeToItemsInRowOptions) => Disposer_2;
|
779
|
+
|
780
|
+
declare type SubscribeToItemsInRowOptions = Partial<{
|
781
|
+
fetchTags: boolean;
|
782
|
+
}> & PaginationOptions;
|
783
|
+
|
784
|
+
declare type SubscribeToRowsInScreen = (screenId: string, cb: (error: Error | null, data: PaginationInterface<Row> | null) => void, options?: PaginationOptions) => Disposer_2;
|
785
|
+
|
786
|
+
declare type SubscribeToScreen = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void, options?: ScreenOptions) => Disposer_2;
|
787
|
+
|
788
|
+
declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Error | null, data: PaginationInterface<Video> | null) => void, options?: SubscribeToTaggedVideosOptions) => Disposer_2;
|
789
|
+
|
790
|
+
declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOptions & {
|
791
|
+
orderBy?: (Omit<OrderBy, 'field'> & {
|
792
|
+
field: TaggedVideosOrderByField;
|
793
|
+
})[];
|
794
|
+
where?: WhereFilter[];
|
795
|
+
};
|
796
|
+
|
548
797
|
declare type SubscriptionInfo = {
|
549
798
|
type: 'subscription';
|
550
799
|
name: string;
|
@@ -564,6 +813,49 @@ export declare type SubscriptionOverlayState = {
|
|
564
813
|
openSubscriptionOverlay: (data: SubscriptionOverlayData) => void;
|
565
814
|
};
|
566
815
|
|
816
|
+
declare interface Tag extends RowItem {
|
817
|
+
id: string;
|
818
|
+
tagId: string;
|
819
|
+
type?: string | null;
|
820
|
+
metadata?: any[];
|
821
|
+
color?: string;
|
822
|
+
detailBanner?: string;
|
823
|
+
availableSeasons?: AvailableSeason[];
|
824
|
+
isFavorite: boolean;
|
825
|
+
addToFavorites: () => void;
|
826
|
+
removeFromFavorites: () => void;
|
827
|
+
}
|
828
|
+
|
829
|
+
declare type TaggedVideosOrderByField = 'seasonNumber' | 'episodeNumber' | 'contentType' | DefaultOrderByField;
|
830
|
+
|
831
|
+
declare type TileProps = {
|
832
|
+
cover: string;
|
833
|
+
isLoading: boolean;
|
834
|
+
bottomLabel: string;
|
835
|
+
bottomLabelAreaHeight: number;
|
836
|
+
innerLabel: string;
|
837
|
+
duration: string;
|
838
|
+
price: string | null;
|
839
|
+
focused: boolean;
|
840
|
+
onClick?: () => void;
|
841
|
+
hoverable: boolean;
|
842
|
+
overlay: boolean;
|
843
|
+
coverPadding: CoverPadding;
|
844
|
+
variant: RowItemComponent;
|
845
|
+
coverWidth: number;
|
846
|
+
progress?: number;
|
847
|
+
time?: string;
|
848
|
+
logo?: string;
|
849
|
+
coverHeight: number;
|
850
|
+
/**
|
851
|
+
* Margin of inner TileContainer.
|
852
|
+
* Now used for backward compatibility for WebTileGrid. Consider to use it other way.
|
853
|
+
*/
|
854
|
+
containerMargin?: number | string;
|
855
|
+
};
|
856
|
+
|
857
|
+
declare type TilePropsPartial = Partial<TileProps>;
|
858
|
+
|
567
859
|
export declare interface TivioAuth {
|
568
860
|
changePassword: (newPassword: string) => Promise<void>;
|
569
861
|
changeUserPhoto(file: File): Promise<void>;
|
@@ -927,6 +1219,31 @@ declare type TransactionInfo = {
|
|
927
1219
|
description: string;
|
928
1220
|
};
|
929
1221
|
|
1222
|
+
/**
|
1223
|
+
* Represents one string in every supported language mutation.
|
1224
|
+
*/
|
1225
|
+
export declare type Translation = {
|
1226
|
+
[key in LangCode]: string;
|
1227
|
+
};
|
1228
|
+
|
1229
|
+
declare type TvAppProps = {
|
1230
|
+
customer: CUSTOMER_BUILD;
|
1231
|
+
};
|
1232
|
+
|
1233
|
+
declare interface TvChannel extends RowItem {
|
1234
|
+
name: string;
|
1235
|
+
id: string;
|
1236
|
+
path: string;
|
1237
|
+
itemType: ROW_ITEM_TYPES;
|
1238
|
+
country?: string;
|
1239
|
+
filters: string[];
|
1240
|
+
logo?: string;
|
1241
|
+
hls: string;
|
1242
|
+
dash: string;
|
1243
|
+
purchasableMonetization: any | null;
|
1244
|
+
price: number;
|
1245
|
+
}
|
1246
|
+
|
930
1247
|
export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
|
931
1248
|
|
932
1249
|
export declare const useAd: () => AdSource | null;
|
@@ -962,6 +1279,12 @@ export declare function useApplyInviteCode(): {
|
|
962
1279
|
|
963
1280
|
export declare const useBetOffer: () => BetOffer | null;
|
964
1281
|
|
1282
|
+
declare type UseCancelSubscription = (subscriptionId: string) => {
|
1283
|
+
cancelSubscription: () => Promise<void>;
|
1284
|
+
cancellationInfo: QerkoCancellationInfo | null;
|
1285
|
+
error?: string | null;
|
1286
|
+
};
|
1287
|
+
|
965
1288
|
export declare const useCancelSubscription: UseCancelSubscription;
|
966
1289
|
|
967
1290
|
/**
|
@@ -984,6 +1307,11 @@ export declare const useChannelsInWidget: (widgetId: string, limit?: number) =>
|
|
984
1307
|
isLoading: boolean;
|
985
1308
|
};
|
986
1309
|
|
1310
|
+
declare type UseChannelSource = (tvChannelId: string) => {
|
1311
|
+
source: ChannelSource_2 | null;
|
1312
|
+
error: Error | null;
|
1313
|
+
};
|
1314
|
+
|
987
1315
|
export declare const useCurrentMarker: () => Marker | null;
|
988
1316
|
|
989
1317
|
export declare const useFreePurchase: () => {
|
@@ -1046,10 +1374,24 @@ export declare const usePurchaseSubscription: (monetizationId: string, voucher?:
|
|
1046
1374
|
* Return purchases with initialized video (purchases[i].video not null)
|
1047
1375
|
*/
|
1048
1376
|
export declare const usePurchasesWithVideos: () => {
|
1049
|
-
purchases:
|
1377
|
+
purchases: Purchase_2[];
|
1050
1378
|
};
|
1051
1379
|
|
1052
|
-
export
|
1380
|
+
export declare type User = {
|
1381
|
+
purchases: Purchase_2[];
|
1382
|
+
allPurchases: Purchase_2[];
|
1383
|
+
purchasedVods: Purchase_2[];
|
1384
|
+
purchasedSubscriptions: Purchase_2[];
|
1385
|
+
isPurchasesInitialized: boolean;
|
1386
|
+
isSignedIn: boolean;
|
1387
|
+
email?: string;
|
1388
|
+
type?: UserType;
|
1389
|
+
photoURL: string | null;
|
1390
|
+
name?: string;
|
1391
|
+
authUserId?: string;
|
1392
|
+
favorites: any[];
|
1393
|
+
watchedPositions: any[];
|
1394
|
+
};
|
1053
1395
|
|
1054
1396
|
export declare const useRowsInScreen: (screenId: string, options?: PaginationOptions) => {
|
1055
1397
|
pagination: PaginationInterface<Row> | null;
|
@@ -1058,6 +1400,11 @@ export declare const useRowsInScreen: (screenId: string, options?: PaginationOpt
|
|
1058
1400
|
|
1059
1401
|
export declare type UserPayload = Record<string, any>;
|
1060
1402
|
|
1403
|
+
declare enum UserType {
|
1404
|
+
ORGANIZATION_USER = "ORGANIZATION_USER",
|
1405
|
+
TIVIO_USER = "TIVIO_USER"
|
1406
|
+
}
|
1407
|
+
|
1061
1408
|
/**
|
1062
1409
|
* @deprecated
|
1063
1410
|
*
|
@@ -1071,6 +1418,14 @@ export declare const useScreens: () => {
|
|
1071
1418
|
screens: Screen_2[];
|
1072
1419
|
};
|
1073
1420
|
|
1421
|
+
declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, options?: UseSearchOptions) => {
|
1422
|
+
search: (query: string) => void;
|
1423
|
+
pagination: PaginationInterface<UseSearchResult<T>> | null;
|
1424
|
+
error: Error | null;
|
1425
|
+
isLoading: boolean;
|
1426
|
+
lastQuery: string;
|
1427
|
+
};
|
1428
|
+
|
1074
1429
|
/**
|
1075
1430
|
* Full text search that returns entities based on search query.
|
1076
1431
|
* @param indexName - index that search would be performed on ('videos', 'tags', etc.)
|
@@ -1078,6 +1433,12 @@ export declare const useScreens: () => {
|
|
1078
1433
|
*/
|
1079
1434
|
export declare const useSearch: UseSearch;
|
1080
1435
|
|
1436
|
+
declare type UseSearchOptions = PaginationOptions & Partial<{
|
1437
|
+
minQueryLength: number;
|
1438
|
+
}>;
|
1439
|
+
|
1440
|
+
declare type UseSearchResult<T extends ALGOLIA_INDEX_NAME> = T extends ALGOLIA_INDEX_NAME.VIDEOS ? Video : T extends ALGOLIA_INDEX_NAME.TAGS ? Tag : T extends ALGOLIA_INDEX_NAME.TV_CHANNELS ? TvChannel : unknown;
|
1441
|
+
|
1081
1442
|
/**
|
1082
1443
|
* Use section
|
1083
1444
|
* @param sectionId - section id
|
@@ -1116,8 +1477,14 @@ export declare const useTivioReadyData: () => RemoteBundleState | null;
|
|
1116
1477
|
|
1117
1478
|
export declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
|
1118
1479
|
|
1480
|
+
declare type UseTvChannel = (tvChannelId: string) => {
|
1481
|
+
tvChannel: TvChannel | null;
|
1482
|
+
error: Error | null;
|
1483
|
+
loading: boolean;
|
1484
|
+
};
|
1485
|
+
|
1119
1486
|
export declare const useUser: () => {
|
1120
|
-
user:
|
1487
|
+
user: User | null;
|
1121
1488
|
error: string | null;
|
1122
1489
|
isInitialized: boolean;
|
1123
1490
|
};
|
@@ -1170,7 +1537,72 @@ export declare const useWidget: (widgetId: string) => {
|
|
1170
1537
|
widget: Widget | null;
|
1171
1538
|
};
|
1172
1539
|
|
1173
|
-
export
|
1540
|
+
export declare interface Video extends RowItem {
|
1541
|
+
id: string;
|
1542
|
+
/**
|
1543
|
+
* @deprecated use assets instead
|
1544
|
+
*/
|
1545
|
+
cover: string | null;
|
1546
|
+
created: Date;
|
1547
|
+
sectionId: string | null;
|
1548
|
+
channelId: string | null;
|
1549
|
+
/**
|
1550
|
+
* seconds
|
1551
|
+
*/
|
1552
|
+
duration: number;
|
1553
|
+
path: string;
|
1554
|
+
tags: Tag[];
|
1555
|
+
image: string | null;
|
1556
|
+
isPlayable: boolean;
|
1557
|
+
monetizations: Monetization[];
|
1558
|
+
monetization: Monetization | undefined;
|
1559
|
+
transactionId?: string;
|
1560
|
+
transaction: Monetization | undefined;
|
1561
|
+
subscriptions: Monetization[];
|
1562
|
+
subscriptionIds: string[];
|
1563
|
+
isPlaylist: boolean;
|
1564
|
+
name: string;
|
1565
|
+
description?: string;
|
1566
|
+
price: number | null;
|
1567
|
+
detailedPrice: DetailedPrice | null;
|
1568
|
+
uri: string;
|
1569
|
+
url: string;
|
1570
|
+
adMonetizationId?: string;
|
1571
|
+
from?: Date;
|
1572
|
+
to?: Date;
|
1573
|
+
detailBanner?: string;
|
1574
|
+
linkedVideosRaw: any[];
|
1575
|
+
linkedVideos: LinkedVideo[];
|
1576
|
+
purchasableMonetization: any | null;
|
1577
|
+
contentType: VideoContentType | null;
|
1578
|
+
year?: number;
|
1579
|
+
episodeNumber?: number;
|
1580
|
+
seasonNumber?: number;
|
1581
|
+
getTagsOfType: (type: string) => Tag[];
|
1582
|
+
loadLinkedVideos: () => any;
|
1583
|
+
getLinkedVideos: (type: any) => any;
|
1584
|
+
trailer: Video | null;
|
1585
|
+
watchPosition: number | null;
|
1586
|
+
isFavorite: boolean;
|
1587
|
+
addToFavorites: () => void;
|
1588
|
+
removeFromFavorites: () => void;
|
1589
|
+
availability: VideoAvailabilityField | null;
|
1590
|
+
}
|
1591
|
+
|
1592
|
+
declare type VideoAvailabilityField = {
|
1593
|
+
from: firebase_2.firestore.Timestamp;
|
1594
|
+
to: firebase_2.firestore.Timestamp | null;
|
1595
|
+
manual: boolean;
|
1596
|
+
};
|
1597
|
+
|
1598
|
+
declare enum VideoContentType {
|
1599
|
+
/**
|
1600
|
+
* Default video content type
|
1601
|
+
*/
|
1602
|
+
VIDEO = "VIDEO",
|
1603
|
+
FILM = "FILM",
|
1604
|
+
SERIES = "SERIES"
|
1605
|
+
}
|
1174
1606
|
|
1175
1607
|
declare type VideoPath = string;
|
1176
1608
|
|
@@ -1264,6 +1696,24 @@ export declare interface WebPlayerProps {
|
|
1264
1696
|
onPlayerControllerCreated?: (playerController: any) => void;
|
1265
1697
|
}
|
1266
1698
|
|
1699
|
+
declare type WebRowProps = {
|
1700
|
+
items?: ItemsInRow[];
|
1701
|
+
variant?: RowItemComponent;
|
1702
|
+
rowName?: string;
|
1703
|
+
fetchMore?: () => void;
|
1704
|
+
onTileClick?: (item: ItemsInRow) => void;
|
1705
|
+
};
|
1706
|
+
|
1707
|
+
declare type WebSeriesDetailScreenProps = {
|
1708
|
+
tagId: string;
|
1709
|
+
};
|
1710
|
+
|
1711
|
+
declare interface WhereFilter {
|
1712
|
+
field: string;
|
1713
|
+
operator: WhereFilterOp;
|
1714
|
+
value: any;
|
1715
|
+
}
|
1716
|
+
|
1267
1717
|
export declare type Widget = {
|
1268
1718
|
id: string;
|
1269
1719
|
channels: Channel[];
|