UNPKG

mythtv-services-api

Version:
80 lines (79 loc) 2.52 kB
import { AbstractService } from './Communication'; import { InternalTypes } from './CommonTypes'; import ApiTypes from './ApiTypes'; export declare namespace Frontend { namespace Request { interface GetActionList { Context?: string; } interface SendMessage { Message: string; } interface SendAction { Action: string; Value?: string; Width?: number; Height?: number; } interface SendKey { Key: string; } interface PlayVideo { Id: string; UseBookmark?: boolean; } interface SendNotification { Message: string; Error?: boolean; Type?: NotificationType; Origin?: string; Description?: string; Image?: string; Extra?: string; ProgressText?: string; Progress?: number; Timeout?: number; Fullscreen?: boolean; Visibility?: VisibilityType; Priority?: PriorityType; } type PlayRecording = InternalTypes.RecordingKey; enum NotificationType { normal = "normal", error = "error", warning = "warning", check = "check", busy = "busy" } enum PriorityType { default = 0, low = 1, medium = 2, high = 3, higher = 4, highest = 5 } enum VisibilityType { video_playback = 1, settings = 2, setup_wizard = 4, video_library = 8, music = 16, recordings_library = 32 } } class Service extends AbstractService { private readonly _hostname; constructor(baseUrl: URL, _hostname: string); GetActionList(req: Request.GetActionList): Promise<ApiTypes.StringKeyValue>; GetStatus(): Promise<ApiTypes.FrontendStatus>; SendMessage(req: Request.SendMessage): Promise<void>; SendAction(req: Request.SendAction, ignoreError?: boolean): Promise<void>; SendKey(req: Request.SendKey): Promise<void>; PlayRecording(req: Request.PlayRecording): Promise<void>; PlayVideo(req: Request.PlayVideo): Promise<void>; GetContextList(): Promise<string[]>; SendNotification(req: Request.SendNotification): Promise<void>; hostname(): string; } }