@mediahub-bg/ott-objects 0.3.56

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.
Files changed (2) hide show
  1. package/package.json +8 -0
  2. package/web/types.ts +674 -0
package/package.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@mediahub-bg/ott-objects",
3
+ "version": "0.3.56",
4
+ "types": "web/types.d.ts",
5
+ "files": [
6
+ "web"
7
+ ]
8
+ }
package/web/types.ts ADDED
@@ -0,0 +1,674 @@
1
+ // Code generated by tygo. DO NOT EDIT.
2
+
3
+ //////////
4
+ // source: billing_pub.go
5
+
6
+ export interface PubPromoPic {
7
+ position: string;
8
+ url: string;
9
+ }
10
+ export interface PubBillingAddon {
11
+ id: string;
12
+ name: string;
13
+ type: string;
14
+ chargeType: string;
15
+ price: number /* int64 */;
16
+ currencyCode: string;
17
+ invoiceName: string;
18
+ description: string;
19
+ period?: number /* int64 */;
20
+ periodUnit: string;
21
+ resourceVersion: number /* int64 */;
22
+ taxable: boolean;
23
+ metaData?: { [key: string]: any};
24
+ unit?: string;
25
+ cfMaxAmount?: number /* int64 */;
26
+ CfBit: string;
27
+ expire?: number /* int64 */;
28
+ trial?: number /* int64 */;
29
+ paid?: boolean;
30
+ }
31
+ export interface PubBillingPlan {
32
+ id: string;
33
+ name: string;
34
+ chargeModel: string;
35
+ price: number /* int64 */;
36
+ currencyCode: string;
37
+ invoiceName: string;
38
+ freeQuantity: number /* int64 */;
39
+ description: string;
40
+ updatedAt: number /* int64 */;
41
+ period: number /* int64 */;
42
+ periodUnit: string;
43
+ resourceVersion: number /* int64 */;
44
+ taxable: boolean;
45
+ metaData: { [key: string]: any};
46
+ cfSalesVisibility: boolean;
47
+ cfScreens: number /* int64 */;
48
+ cfPeriod: number /* int64 */;
49
+ cfBit: string;
50
+ cfDetailedView?: boolean;
51
+ cfFrontendColor?: string;
52
+ cfFrontendOrder?: number /* int */;
53
+ cfHdChannels?: number /* int */;
54
+ cfPlan?: boolean;
55
+ cfPromoDiscount?: number /* int */;
56
+ cfPromoPrice?: number /* int */;
57
+ cfSubscriptionClass?: string;
58
+ cfSubscriptionOrder?: number /* int */;
59
+ cfTvChannels?: number /* int */;
60
+ currency?: string;
61
+ enabledInPortal?: boolean;
62
+ expire?: number /* int64 */;
63
+ trial?: number /* int64 */;
64
+ paid?: boolean;
65
+ }
66
+ export interface SubscriptionEstimate {
67
+ id: string;
68
+ currencyCode: string;
69
+ status: string;
70
+ nextBillingAt: number /* int64 */;
71
+ }
72
+ export interface PubLineItem {
73
+ id: string;
74
+ subscriptionId: string;
75
+ dateFrom: number /* int64 */;
76
+ dateTo: number /* int64 */;
77
+ unitAmount: number /* int64 */;
78
+ quantity: number /* int32 */;
79
+ isTaxed: boolean;
80
+ taxAmount: number /* int64 */;
81
+ taxRate: number /* float64 */;
82
+ amount: number /* int64 */;
83
+ discountAmount: number /* int64 */;
84
+ itemLevelDiscountAmount: number /* int64 */;
85
+ description: string;
86
+ entityType: string;
87
+ taxExemptReason: string;
88
+ entityId: string;
89
+ }
90
+ export interface PubLineItemDiscount {
91
+ lineItemId: string;
92
+ discountAmount: number /* int64 */;
93
+ couponId: string;
94
+ discountType: string;
95
+ }
96
+ export interface PubTax {
97
+ amount: number /* int64 */;
98
+ name: string;
99
+ description: string;
100
+ }
101
+ export interface PubDiscount {
102
+ amount: number /* int64 */;
103
+ description: string;
104
+ entityType: string;
105
+ entityId: string;
106
+ }
107
+ export interface PubInvoice {
108
+ id: string;
109
+ status: string;
110
+ date: number /* int64 */;
111
+ total: number /* int64 */;
112
+ amountPaid: number /* int64 */;
113
+ amountAdjusted: number /* int64 */;
114
+ creditsApplied: number /* int64 */;
115
+ paidAt: number /* int64 */;
116
+ currencyCode: string;
117
+ }
118
+ export interface PubInvoiceEstimate {
119
+ recurring: boolean;
120
+ priceType: string;
121
+ currencyCode: string;
122
+ subTotal: number /* int64 */;
123
+ total: number /* int64 */;
124
+ creditsApplied: number /* int64 */;
125
+ amountPaid: number /* int64 */;
126
+ amountDue: number /* int64 */;
127
+ lineItems: PubLineItem[];
128
+ discounts: PubDiscount[];
129
+ taxes: PubTax[];
130
+ lineItemDiscounts: PubLineItemDiscount[];
131
+ }
132
+ export interface PubEstimate {
133
+ subscription: SubscriptionEstimate;
134
+ invoiceEstimate?: PubInvoiceEstimate;
135
+ }
136
+ export interface PubFutureEstimate {
137
+ futureInvoiceEstimate?: PubInvoiceEstimate;
138
+ }
139
+ export interface PubPaymentMethod {
140
+ type: string;
141
+ psId: string;
142
+ firstName?: string;
143
+ lastName?: string;
144
+ cardType?: string;
145
+ expiryMonth?: number /* int32 */;
146
+ expiryYear?: number /* int32 */;
147
+ billingCountry?: string;
148
+ maskedNumber?: string;
149
+ email?: string;
150
+ agreementId?: string;
151
+ }
152
+ export interface PubUpdatePaymentMethod {
153
+ id?: string;
154
+ url?: string;
155
+ expiresAt: number /* int */;
156
+ createdAt: number /* int */;
157
+ state?: string;
158
+ embed: boolean;
159
+ passThruContent?: string;
160
+ content?: string;
161
+ updatedAt: number /* int */;
162
+ resourceVersion: number /* int64 */;
163
+ }
164
+ export interface CustomerAddress {
165
+ country?: string;
166
+ firstName?: string;
167
+ lastName?: string;
168
+ phone?: string;
169
+ city?: string;
170
+ zip?: string;
171
+ address?: string;
172
+ /**
173
+ * TK fields
174
+ */
175
+ middleName?: string;
176
+ /**
177
+ * Address in TK is split
178
+ */
179
+ district?: string;
180
+ street?: string;
181
+ streetNo?: string;
182
+ block?: string;
183
+ entrance?: string;
184
+ floor?: string;
185
+ flat?: string;
186
+ }
187
+ export interface PubBillingCustomer {
188
+ billingAddress: CustomerAddress;
189
+ autoCollection: boolean;
190
+ refundableCredits: number /* int64 */;
191
+ promotionalCredits: number /* int64 */;
192
+ excessPayments: number /* int64 */;
193
+ cf_marketing?: boolean;
194
+ cid?: string;
195
+ }
196
+ export interface PubBillingCoupon {
197
+ id: string;
198
+ discountType: string;
199
+ discountPercentage: number /* float64 */;
200
+ discountAmount: number /* int64 */;
201
+ name: string;
202
+ maxRedemptions: number /* int32 */;
203
+ status: string;
204
+ applyOn: string;
205
+ currencyCode: string;
206
+ durationType: string;
207
+ durationMonth: number /* int32 */;
208
+ validTill: number /* int64 */;
209
+ planConstraint: string;
210
+ addonConstraint: string;
211
+ createdAt: number /* int64 */;
212
+ redemptions: number /* int32 */;
213
+ metaData: string;
214
+ planIds: string[];
215
+ addonIds: string[];
216
+ }
217
+ export interface PubSubscription {
218
+ plan: PubBillingPlan[];
219
+ subscriptionId: string;
220
+ createdAt: number /* int64 */;
221
+ startedAt: number /* int64 */;
222
+ currentTermStart: number /* int64 */;
223
+ currentTermEnd: number /* int64 */;
224
+ cancelledAt: number /* int64 */;
225
+ status: string;
226
+ coupons: PubBillingCoupon[];
227
+ shippingAddress?: CustomerAddress;
228
+ planId: string;
229
+ totalDues: number /* int64 */;
230
+ addons: PubBillingAddon[];
231
+ }
232
+ export interface PubBillingPlanDetails {
233
+ isPaid?: boolean;
234
+ isBasic?: boolean;
235
+ plan?: PubBillingPlan[];
236
+ addons?: PubBillingAddon[];
237
+ oldClient?: boolean;
238
+ cid?: string;
239
+ /**
240
+ * This will be moved to the CMS
241
+ */
242
+ promoPics: PubPromoPic[];
243
+ }
244
+ export interface PubHostedPage {
245
+ id?: string;
246
+ url?: string;
247
+ expiresAt?: number /* int64 */;
248
+ createdAt?: number /* int64 */;
249
+ state?: string;
250
+ embed?: boolean;
251
+ passThruContent?: string;
252
+ content?: any /* json.RawMessage */;
253
+ updatedAt?: number /* int64 */;
254
+ resourceVersion?: number /* int64 */;
255
+ }
256
+ export interface PubInvoiceURL {
257
+ downloadURL: string;
258
+ validTill: number /* int64 */;
259
+ }
260
+ export interface PubBillingLocation {
261
+ country: string;
262
+ cities: string[];
263
+ }
264
+ export interface InClientAddress extends CustomerAddress {
265
+ gdprBilling: boolean;
266
+ gdprShipping: boolean;
267
+ }
268
+ export interface CustomBillingFields {
269
+ cf_marketing?: boolean;
270
+ cf_req_payment?: boolean;
271
+ cf_req_billing?: boolean;
272
+ cf_req_password?: boolean;
273
+ cf_terms?: boolean;
274
+ cf_bank_payment?: boolean;
275
+ cf_channels_hide?: boolean;
276
+ cf_email?: boolean;
277
+ cf_guide?: string;
278
+ cf_provider?: string;
279
+ }
280
+ export interface CustomerInfoSub {
281
+ shippingAddress?: InClientAddress;
282
+ }
283
+ export interface CustomerInfo extends CustomBillingFields {
284
+ sameAddress?: boolean;
285
+ billingAddress?: InClientAddress;
286
+ subscription?: CustomerInfoSub;
287
+ }
288
+ export interface InAddon {
289
+ id: string;
290
+ quantity: number /* int32 */;
291
+ recurring: boolean;
292
+ }
293
+ export interface InPlan {
294
+ id: string;
295
+ planId: string;
296
+ }
297
+ export interface InCreateSub {
298
+ plan: string;
299
+ }
300
+ export interface InUpdateSub {
301
+ plan: string;
302
+ addons?: InAddon[];
303
+ coupons?: string[];
304
+ }
305
+
306
+ //////////
307
+ // source: channels_pub.go
308
+
309
+ export interface PubM3U8Profile {
310
+ id: number /* int */;
311
+ name: string;
312
+ bandwidth: number /* uint */;
313
+ codecs: string;
314
+ resolution: string;
315
+ autoselect: boolean;
316
+ default_profile: boolean;
317
+ }
318
+ export interface PubChannel {
319
+ /**
320
+ * otto.Channel intersection
321
+ */
322
+ id: string;
323
+ locked: boolean;
324
+ name: string;
325
+ category: number /* uint */;
326
+ tumblrurl: string;
327
+ position: number /* uint */;
328
+ age: number /* uint */;
329
+ logos?: string;
330
+ images?: { [key: string]: string};
331
+ adult: boolean;
332
+ thumbnail?: string;
333
+ liveOnly: boolean;
334
+ access: number /* int */;
335
+ resolution: string;
336
+ currentepg?: PubEPG;
337
+ nextepg?: PubEPG;
338
+ /**
339
+ * User set
340
+ */
341
+ lockedPIN: string;
342
+ /**
343
+ * From DB
344
+ */
345
+ audio?: string;
346
+ subtitles?: string;
347
+ record_time: number /* uint64 */;
348
+ changets: number /* uint64 */;
349
+ profiles?: PubM3U8Profile[];
350
+ }
351
+
352
+ //////////
353
+ // source: epgs_pub.go
354
+
355
+ export interface EPGSkip {
356
+ offset: number /* int */;
357
+ skipTime: number /* int */;
358
+ }
359
+ export interface EPGPerson {
360
+ personId: number /* int64 */;
361
+ function: string;
362
+ name: string;
363
+ }
364
+ export interface EPGGuest {
365
+ personId: number /* int64 */;
366
+ function: string;
367
+ name: string;
368
+ }
369
+ export interface EPGRating {
370
+ Overall: number /* float64 */;
371
+ OverallMP: number /* float64 */;
372
+ Action: number /* float64 */;
373
+ Depth: number /* float64 */;
374
+ Humor: number /* float64 */;
375
+ Suspense: number /* float64 */;
376
+ Erotic: number /* float64 */;
377
+ }
378
+ export interface EPGNumeration {
379
+ EpisodeCount: number /* uint64 */;
380
+ SeasonCount: number /* uint64 */;
381
+ EpisodeNumber: number /* uint64 */;
382
+ SeasonNumber: number /* uint64 */;
383
+ }
384
+ export interface EPGPhoto {
385
+ url: string;
386
+ type: string;
387
+ }
388
+ export interface EPGSportsData {
389
+ provider: string;
390
+ sportType: number /* int64 */;
391
+ eventId: number /* int64 */;
392
+ homeTeam: number /* int64 */;
393
+ awayTeam: number /* int64 */;
394
+ tournamentId: number /* int64 */;
395
+ }
396
+ export interface PubEPG {
397
+ /**
398
+ * public fields
399
+ */
400
+ eventid?: string;
401
+ contentId: string;
402
+ baseContentId: string;
403
+ start: number /* uint64 */;
404
+ stop: number /* uint64 */;
405
+ title: string;
406
+ subtitle: string;
407
+ changets: number /* uint64 */;
408
+ addts: number /* uint64 */;
409
+ valid: number /* uint64 */;
410
+ originaltitle: string;
411
+ agerating?: string;
412
+ country?: string[];
413
+ year?: string;
414
+ persons?: EPGPerson[];
415
+ guests?: EPGGuest[];
416
+ duration: string;
417
+ rating: EPGRating;
418
+ fulltext: string;
419
+ shorttext: string;
420
+ actors?: string[];
421
+ numeration: EPGNumeration;
422
+ chanId: string;
423
+ chanName: string;
424
+ minor_categories?: string[];
425
+ major_category: string;
426
+ majorId: number /* uint64 */;
427
+ locked: boolean;
428
+ photos?: EPGPhoto[];
429
+ category_array?: number /* uint64 */[];
430
+ vod: boolean;
431
+ profiles?: PubM3U8Profile[];
432
+ id: string;
433
+ validFrom: number /* uint64 */;
434
+ skips?: { [key: string]: EPGSkip};
435
+ sportsData?: EPGSportsData[];
436
+ isLive?: boolean;
437
+ isRepetition?: boolean;
438
+ /**
439
+ * public export-only fields
440
+ */
441
+ now: number /* int */;
442
+ access: number /* int */;
443
+ /**
444
+ * public export-only deprecated fields
445
+ */
446
+ categories: string[];
447
+ chan_name: string;
448
+ chan_id: string;
449
+ }
450
+ export interface PubEPGSubCategory {
451
+ id: number /* int */;
452
+ name: string;
453
+ minor_category: string;
454
+ }
455
+ export interface PubEPGCategory {
456
+ id: number /* int */;
457
+ name: string;
458
+ position: number /* int */;
459
+ subcategories?: PubEPGSubCategory[];
460
+ }
461
+ export interface PubEPGSearchEntry {
462
+ score: number /* float64 */;
463
+ PubEPG: PubEPG;
464
+ }
465
+ export interface PubVodEPG {
466
+ /**
467
+ * public fields
468
+ */
469
+ baseContentId: string;
470
+ title: string;
471
+ subtitle: string;
472
+ subtitlesLangs?: string;
473
+ audioLangs?: string;
474
+ changets: number /* uint64 */;
475
+ addts: number /* uint64 */;
476
+ originaltitle: string;
477
+ agerating?: string;
478
+ country?: string[];
479
+ year?: string;
480
+ persons?: EPGPerson[];
481
+ rating: EPGRating;
482
+ numeration: EPGNumeration;
483
+ fulltext: string;
484
+ shorttext: string;
485
+ actors?: string[];
486
+ minor_categories: string[];
487
+ major_category: string;
488
+ majorId: number /* uint64 */;
489
+ locked: boolean;
490
+ photos?: EPGPhoto[];
491
+ score?: number /* float64 */;
492
+ epgs: PubEPG[];
493
+ valid: number /* uint64 */;
494
+ releaseDate?: string;
495
+ lastEPGActivateTs?: number /* uint64 */;
496
+ /**
497
+ * public export-only fields
498
+ */
499
+ access: number /* int */;
500
+ }
501
+
502
+ //////////
503
+ // source: token_pub.go
504
+
505
+ export interface PubToken {
506
+ access_token: string;
507
+ expires_in: number /* int64 */;
508
+ token_type: string;
509
+ scope: string;
510
+ refreshToken?: string;
511
+ }
512
+
513
+ //////////
514
+ // source: user_pub.go
515
+
516
+ export interface InProfileUpdate {
517
+ deviceSettings?: { [key: string]: any};
518
+ profileSettings?: { [key: string]: any};
519
+ mobileSettings?: { [key: string]: any};
520
+ video_quality?: string;
521
+ audio?: string;
522
+ subtitles?: string;
523
+ }
524
+ export interface InUserUpdate extends InProfileUpdate {
525
+ billingAddress?: InClientAddress;
526
+ sameAddress?: boolean;
527
+ cf_marketing?: boolean;
528
+ cf_terms?: boolean;
529
+ cf_guide?: string;
530
+ cf_req_payment?: boolean;
531
+ }
532
+ export interface InUpdateTrial {
533
+ name: string;
534
+ email: string;
535
+ phone: string;
536
+ tocAgreed: boolean;
537
+ gdprAgreed: boolean;
538
+ }
539
+ export interface RegMetaData {
540
+ cid: string;
541
+ pid: string;
542
+ }
543
+ export interface InRegisterUser {
544
+ email: string;
545
+ password: string;
546
+ repeatPassword: string;
547
+ regplan: string;
548
+ metadata: RegMetaData;
549
+ cf_marketing: boolean;
550
+ }
551
+ export interface InSignInGoogle {
552
+ idToken: string;
553
+ /**
554
+ * Web portal returns "" or true
555
+ */
556
+ gdpr: boolean;
557
+ rememberme: boolean;
558
+ viewmap: string[];
559
+ view: string[];
560
+ }
561
+ export interface InSignIn {
562
+ email: string;
563
+ password: string;
564
+ rememberme: boolean;
565
+ viewmap: string[];
566
+ requestRefreshToken: boolean;
567
+ }
568
+ export interface InRefreshToken {
569
+ grant_type: string;
570
+ refresh_token: string;
571
+ }
572
+ export interface InResetPassword {
573
+ email: string;
574
+ secret: string;
575
+ password: string;
576
+ repeatPassword: string;
577
+ }
578
+ export interface InDelUser {
579
+ password: string;
580
+ }
581
+ export interface InUpdatePassword {
582
+ oldpass: string;
583
+ password: string;
584
+ repeatPassword: string;
585
+ }
586
+ export interface InUserPayment {
587
+ type: string;
588
+ tmpToken: string;
589
+ }
590
+ export interface PubProfile {
591
+ handle?: string;
592
+ handleLower?: string;
593
+ deviceSettings?: { [key: string]: any};
594
+ profileSettings?: { [key: string]: any};
595
+ mobileSettings?: { [key: string]: any};
596
+ video_quality?: string;
597
+ audio?: string;
598
+ subtitles?: string;
599
+ created: number /* uint */;
600
+ current: boolean;
601
+ }
602
+ export interface LastPaymentInfo {
603
+ planDiscount: number /* int */;
604
+ creditsApplied: number /* int */;
605
+ }
606
+ export interface Trial {
607
+ action?: string;
608
+ duration?: number /* int64 */;
609
+ expire?: number /* int64 */;
610
+ detailsFilled?: boolean;
611
+ endDate?: number /* int64 */;
612
+ /**
613
+ * both expire and expirationDate were present in php, could be a bug
614
+ */
615
+ expirationDate?: number /* int64 */;
616
+ activationSettings?: { [key: string]: any};
617
+ activate?: boolean;
618
+ }
619
+ export interface PubUser extends PubBillingCustomer {
620
+ email: string;
621
+ audio: string;
622
+ subtitles: string;
623
+ video_quality: string;
624
+ lockedPIN: string;
625
+ gdprBilling: boolean;
626
+ gdprShipping: boolean;
627
+ sameAddress: boolean;
628
+ lastPaymentInfo: LastPaymentInfo;
629
+ detailsSet: boolean;
630
+ idleTimeout?: number /* int64 */;
631
+ virtualUser?: boolean;
632
+ cf_marketing?: boolean;
633
+ cf_req_payment?: boolean;
634
+ cf_req_billing?: boolean;
635
+ cf_req_password?: boolean;
636
+ cf_terms?: boolean;
637
+ cf_guide?: string;
638
+ cf_provider?: string;
639
+ cf_bank_payment?: boolean;
640
+ /**
641
+ * Not from pub fields
642
+ */
643
+ profiles: PubProfile[];
644
+ trial?: Trial;
645
+ /**
646
+ * Details
647
+ */
648
+ planDetails?: PubBillingPlanDetails;
649
+ paymentMethod?: PubPaymentMethod;
650
+ subscription?: PubSubscription[];
651
+ countryLastLogin?: string;
652
+ }
653
+ export interface UserChannelSettings {
654
+ locked: boolean;
655
+ }
656
+ export interface PubChannelSettings {
657
+ updated: number /* int64 */;
658
+ defaultPIN: string;
659
+ lockedPIN: string;
660
+ channelSettings: { [key: string]: UserChannelSettings};
661
+ }
662
+ export interface AllowedDest {
663
+ type: string;
664
+ name: string;
665
+ short: string;
666
+ }
667
+ export interface PubAllowedDests {
668
+ countries: AllowedDest[];
669
+ cities: AllowedDest[];
670
+ }
671
+ export interface BanEntry {
672
+ banTime: number /* int64 */;
673
+ expire: number /* int64 */;
674
+ }