@mediahub-bg/ott-objects 0.5.33 → 0.5.37

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 +1 -1
  2. package/web/types.ts +107 -87
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediahub-bg/ott-objects",
3
- "version": "0.5.33",
3
+ "version": "0.5.37",
4
4
  "types": "web/types.d.ts",
5
5
  "files": [
6
6
  "web"
package/web/types.ts CHANGED
@@ -349,93 +349,6 @@ export interface PubChannel {
349
349
  changets: number /* uint64 */;
350
350
  profiles?: PubM3U8Profile[];
351
351
  }
352
- export interface ChannelUpdateRequest {
353
- id: string;
354
- access_mask?: string;
355
- category?: number /* int */;
356
- position?: number /* int */;
357
- view_mask_array?: string[];
358
- hideNoAccess?: boolean;
359
- recordTime?: number /* uint64 */;
360
- recBeginTS?: number /* int64 */;
361
- transcoding?: any /* bson.M */[];
362
- muxer?: any /* bson.M */[];
363
- active?: boolean;
364
- name?: string;
365
- profiles?: M3U8Profile[];
366
- transcoder?: string;
367
- dbType?: string;
368
- dbhost?: string;
369
- dbport?: number /* uint */;
370
- dbname?: string;
371
- dbuser?: string;
372
- dbpass?: string;
373
- dbReplicaSet?: string;
374
- chunkpath?: string;
375
- tumblrpath?: string;
376
- dbchunkprefix?: string;
377
- dbtumblrprefix?: string;
378
- adult?: boolean;
379
- liveOnly?: boolean;
380
- age?: number /* uint */;
381
- epgInfo?: EPGInfoUpdate;
382
- profileGroups?: ProfileGroupUpdate[];
383
- images?: { [key: string]: string};
384
- monitoring?: ChanMon;
385
- }
386
- export interface ChannelStat {
387
- id: string;
388
- name: string;
389
- live: number /* int64 */;
390
- vod: number /* int64 */;
391
- total: number /* int64 */;
392
- livePercent: number /* float64 */;
393
- vodPercent: number /* float64 */;
394
- totalPercent: number /* float64 */;
395
- }
396
- export interface ChannelStatsResponse {
397
- sortField: string;
398
- begin: number /* int64 */;
399
- end: number /* int64 */;
400
- all: { [key: string]: number /* int64 */};
401
- chanStats: ChannelStat[];
402
- }
403
- /**
404
- * ChannelCloneRequest is the body for the channel-clone webhook endpoint.
405
- */
406
- export interface ChannelCloneRequest {
407
- newId?: string;
408
- }
409
- /**
410
- * EPGInfoUpdate carries the user-editable sub-fields of EPGInfo.
411
- * * LastUpdate, LastSync and Sums are server-managed and not included.
412
- */
413
- export interface EPGInfoUpdate {
414
- id?: number /* uint */;
415
- name?: string;
416
- type?: string;
417
- url?: string;
418
- customHeaders?: string[];
419
- }
420
- /**
421
- * ProfileGroupUpdate is the JSON-serialisable equivalent of M3U8ProfileGroup.
422
- * * M3U8ProfileGroup carries json:"-" on all fields to hide them from the
423
- * * client-facing API; this type is used only in admin update requests.
424
- */
425
- export interface ProfileGroupUpdate {
426
- type: string;
427
- regex?: string;
428
- profileIds: number /* int */[];
429
- name?: string;
430
- }
431
- export interface ChannelRPCRequest {
432
- cmd: string;
433
- args: string[];
434
- }
435
- export interface SchemaReportItem {
436
- valid: boolean;
437
- error?: string;
438
- }
439
352
 
440
353
  //////////
441
354
  // source: epgs_pub.go
@@ -1079,3 +992,110 @@ export interface BanEntry {
1079
992
  banTime: number /* int64 */;
1080
993
  expire: number /* int64 */;
1081
994
  }
995
+
996
+ //////////
997
+ // source: usersettings_pub.go
998
+ /*
999
+ Copyright (C) MediaHub Ltd - All Rights Reserved
1000
+ * Unauthorized copying of this file, via any medium is strictly prohibited
1001
+ * Proprietary and confidential
1002
+ * Written by Peter Gerasimov <gerasimov@mediahub.eu>, June 2026
1003
+ */
1004
+
1005
+ export interface DeviceSettingsChannel {
1006
+ id: string;
1007
+ audio: string; // language code | "und" default
1008
+ audioIsChangedByUser: boolean; // user set audio explicitly
1009
+ subtitles: string; // language code | "und" default | "zxx" off
1010
+ areSubtitlesChangedByUser: boolean; // user set subtitles explicitly
1011
+ resolution: string; // "auto" | "WIDTHxHEIGHT"
1012
+ resolutionIsChangedByUser: boolean; // user set resolution explicitly
1013
+ }
1014
+ export interface DeviceChannelSettings {
1015
+ visible?: boolean;
1016
+ locked?: boolean; // requires PIN
1017
+ timeshift?: boolean;
1018
+ position?: number /* int */; // order in the channel list
1019
+ favoritePosition?: number /* int */; // order in favorites
1020
+ hasBeenReordered?: boolean; // ott-client-flutter only
1021
+ }
1022
+ export interface DeviceSettingsChannelItem {
1023
+ channelInfo: DeviceSettingsChannel;
1024
+ channelSettings: DeviceChannelSettings;
1025
+ }
1026
+ export interface EpgFavoriteInfo {
1027
+ channelId: string;
1028
+ start: number /* int64 */; // program start, unix
1029
+ stop: number /* int64 */; // program stop, unix
1030
+ timestamp: number /* int64 */; // when the favorite was saved, unix
1031
+ }
1032
+ export interface DeviceSettings {
1033
+ password?: string; // parental PIN
1034
+ languageCode?: string; // UI language
1035
+ channelPreffs?: { [key: string]: DeviceChannelSettings}; // per-channel state, keyed by channel id
1036
+ favoriteAssets?: EpgFavoriteInfo[]; // saved EPG favorites
1037
+ unlock_channel_period?: number /* int64 */; // re-lock timeout
1038
+ is_clock_always_on?: boolean;
1039
+ DeviceSettingsItemList?: DeviceSettingsChannelItem[];
1040
+ }
1041
+ export interface MobileSettings {
1042
+ is_clock_always_on?: boolean;
1043
+ languageCode?: string; // UI language
1044
+ password?: string; // parental PIN
1045
+ unlock_channel_period?: number /* int */; // re-lock timeout
1046
+ resolution?: string; // "auto" | "WIDTHxHEIGHT"
1047
+ DeviceSettingsItemList?: DeviceSettingsChannelItem[];
1048
+ favoriteAssets?: EpgFavoriteInfo[]; // saved EPG favorites
1049
+ isWelcomeScreenShownOnMobile?: boolean;
1050
+ isOldClient?: boolean;
1051
+ }
1052
+ export interface ReactChannelSetting {
1053
+ favoritePosition: number /* int */; // 0 = not a favorite
1054
+ favorite?: boolean;
1055
+ visible?: boolean;
1056
+ audio?: string; // null = inherit global
1057
+ resolution?: string; // null = inherit global
1058
+ subtitles?: string; // null = inherit global
1059
+ position?: number /* int */; // manual order; null = original
1060
+ locked?: boolean; // requires PIN
1061
+ }
1062
+ export interface ReactTVSettings {
1063
+ resolution: string; // "auto" | "WIDTHxHEIGHT"
1064
+ subtitles: string; // code | "und" default | "zxx" off
1065
+ audio: string; // code | "und" default
1066
+ channels: { [key: string]: ReactChannelSetting}; // per-channel overrides, keyed by channel id
1067
+ lockPeriod: number /* int64 */; // parental-lock period in ms; -1 = always, -2 = session
1068
+ clockPosition: string; // "in-menu" | "always"
1069
+ }
1070
+ export interface WebChannelInfo {
1071
+ id: string;
1072
+ name?: string; // recomputed from the channel list on read
1073
+ }
1074
+ export interface WebChannelSettings {
1075
+ favoritePosition?: number /* int */;
1076
+ timeshift?: boolean;
1077
+ visible?: boolean;
1078
+ audio?: string; // null = inherit global
1079
+ resolution?: string; // null = inherit global
1080
+ subtitles?: string; // null = inherit global
1081
+ position?: number /* int */;
1082
+ locked?: boolean; // requires PIN
1083
+ }
1084
+ export interface WebDeviceSettingsItem {
1085
+ channelInfo: WebChannelInfo;
1086
+ channelSettings: WebChannelSettings;
1087
+ }
1088
+ export interface WebSettings {
1089
+ filterTypeRecorded: boolean; // show recorded content
1090
+ filterTypeLive: boolean; // show live content
1091
+ isVerticalLayout: boolean;
1092
+ resolution: string; // "auto" | "WIDTHxHEIGHT"
1093
+ subtitles: string; // code | "und" default | "zxx" off
1094
+ audio: string; // code | "und" default
1095
+ DeviceSettingsItemList: WebDeviceSettingsItem[];
1096
+ lockPeriod: number /* int64 */; // parental-lock period in ms; -1 = always, -2 = session
1097
+ }
1098
+ export interface ProfileSettings {
1099
+ react_tv_settings?: ReactTVSettings; // react-tv-app (ClearReact)
1100
+ web_settings?: WebSettings; // mediahub-web-portal (ClearWeb)
1101
+ }