mythtv-services-api
Version:
Mythtv Service Api Bindings
253 lines (252 loc) • 10.6 kB
TypeScript
import { InternalTypes } from "./CommonTypes";
import { AbstractService } from "./Communication";
import ApiTypes from './ApiTypes';
export declare namespace DvrService {
namespace Request {
export interface GetRecordedList extends Partial<ApiTypes.MultiSortedListRequest<'starttime' | 'title' | 'subtitle' | 'season' | 'episode' | 'category' | 'watched' | 'stars' | 'originalairdate' | 'recgroup' | 'storagegroup' | 'channum' | 'callsign' | 'name'>> {
Descending?: boolean;
TitleRegEx?: string;
RecGroup?: string;
StorageGroup?: string;
Category?: string;
}
export interface RecTypeToString {
RecType: string;
}
export interface RecordedIdForPathname {
Pathname: string;
}
export interface RemoveRecordSchedule {
RecordId: number;
}
export type RemoveRecorded = InternalTypes.RecordingKey & {
ForceDelete: boolean;
AllowRerecord: boolean;
};
export type SetSavedBookmark = OffsetTypeRequest & {
Offset: number;
};
export type StopRecording = InternalTypes.RecordedIdRequest;
export type UnDeleteRecording = InternalTypes.RecordingKey;
export interface UpdateRecordSchedule {
RecordId: number;
Title: string;
Subtitle: string;
Description: string;
Category: string;
StartTime: Date;
EndTime: Date;
SeriesId: string;
ProgramId: string;
ChanId: number;
Station: string;
FindDay: number;
FindTime: Date;
Inactive: boolean;
Season: number;
Episode: number;
Inetref: string;
Type: string;
SearchType: string;
RecPriority: number;
PreferredInput: number;
StartOffset: number;
EndOffset: number;
DupMethod: string;
DupIn: string;
Filter: number;
RecProfile: string;
RecGroup: string;
StorageGroup: string;
PlayGroup: string;
AutoExpire: boolean;
MaxEpisodes: number;
MaxNewest: boolean;
AutoCommflag: boolean;
AutoTranscode: boolean;
AutoMetaLookup: boolean;
AutoUserJob1: boolean;
AutoUserJob2: boolean;
AutoUserJob3: boolean;
AutoUserJob4: boolean;
Transcoder: number;
}
export type UpdateRecordedWatchedStatus = InternalTypes.RecordingKey & {
Watched: boolean;
};
export interface RecStatusToString {
RecStatus: number;
}
export interface RecTypeToDescription {
RecType: string;
}
export interface AddDontRecordSchedule {
ChanId: number;
StartTime: Date;
NeverRecord: boolean;
}
export interface AddRecordSchedule {
Title: string;
Subtitle: string;
Description: string;
Category: string;
StartTime: Date;
EndTime: Date;
SeriesId: string;
ProgramId: string;
ChanId: number;
Station: string;
FindDay: number;
FindTime: Date;
ParentId: number;
Inactive: boolean;
Season: number;
Episode: number;
Inetref: string;
Type: string;
SearchType: string;
RecPriority: number;
PreferredInput: number;
StartOffset: number;
EndOffset: number;
DupMethod: string;
DupIn: string;
Filter: number;
RecProfile: string;
RecGroup: string;
StorageGroup: string;
PlayGroup: string;
AutoExpire: boolean;
MaxEpisodes: number;
MaxNewest: boolean;
AutoCommflag: boolean;
AutoTranscode: boolean;
AutoMetaLookup: boolean;
AutoUserJob1: boolean;
AutoUserJob2: boolean;
AutoUserJob3: boolean;
AutoUserJob4: boolean;
Transcoder: number;
}
export type DeleteRecording = InternalTypes.RecordingKey & {
ForceDelete?: boolean;
AllowRerecord?: boolean;
};
export interface DisableRecordSchedule {
RecordId: number;
}
export interface DupInToDescription {
DupIn: string;
}
export interface DupInToString {
DupIn: string;
}
export interface DupMethodToDescription {
DupMethod: string;
}
export interface DupMethodToString {
DupMethod: string;
}
export interface EnableRecordSchedule {
RecordId: number;
}
export interface GetConflictList extends Partial<ApiTypes.ListRequest> {
RecordId?: number;
}
export interface GetExpiringList extends Partial<ApiTypes.ListRequest> {
}
export interface GetOldRecordedList extends Partial<ApiTypes.SortedListRequest<'starttime' | 'title'>> {
StartTime?: Date;
EndTime?: Date;
Title?: string;
SeriesId?: string;
RecordId?: number;
}
export type GetRecordSchedule = (InternalTypes.RecordingKey | {
RecordId: number;
} | {
Template?: string;
}) & {
MakeOverride?: boolean;
};
export interface GetRecordScheduleList extends Partial<ApiTypes.SortedListRequest<'lastrecorded' | 'nextrecording' | 'title' | 'priority' | 'type'>> {
}
export type GetRecorded = InternalTypes.RecordingKey;
type OffsetType = {
OffsetType: 'BYTES' | 'DURATION';
};
type OffsetTypeRequest = InternalTypes.RecordingKey & OffsetType;
type OffsetTypeRecordedIdRequest = InternalTypes.RecordedIdRequest & OffsetType;
export type GetRecordedCommBreak = OffsetTypeRequest;
export type GetRecordedCutList = OffsetTypeRequest;
export type GetRecordedSeek = OffsetTypeRecordedIdRequest;
export type GetSavedBookmark = OffsetTypeRequest;
export interface GetTitleList {
RecGroup: string;
}
export interface GetUpcomingList extends Partial<ApiTypes.ListRequest> {
ShowAll?: boolean;
RecordId?: number;
RecStatus?: number;
}
export type ReactivateRecording = InternalTypes.RecordingKey;
export interface RecStatusToDescription {
RecStatus: number;
RecType: number;
StartTime: Date;
}
export interface GetProgramCategories {
OnlyRecorded: boolean;
}
export type RecordedIdForKey = InternalTypes.ChanIdRequest;
export {};
}
class Service extends AbstractService {
constructor(baseUrl: URL);
GetEncoderList(): Promise<ApiTypes.Encoder[]>;
GetRecordedList(req: Request.GetRecordedList): Promise<ApiTypes.ProgramList>;
GetUpcomingList(req: Request.GetUpcomingList): Promise<ApiTypes.ProgramList>;
AddDontRecordSchedule(req: Request.AddDontRecordSchedule): Promise<void>;
AddRecordSchedule(req: Request.AddRecordSchedule): Promise<number>;
DeleteRecording(req: Request.DeleteRecording): Promise<void>;
DisableRecordSchedule(req: Request.DisableRecordSchedule): Promise<void>;
DupInToDescription(req: Request.DupInToDescription): Promise<string>;
DupInToString(req: Request.DupInToString): Promise<string>;
DupMethodToDescription(req: Request.DupMethodToDescription): Promise<string>;
DupMethodToString(req: Request.DupMethodToString): Promise<string>;
EnableRecordSchedule(req: Request.EnableRecordSchedule): Promise<void>;
GetConflictList(req: Request.GetConflictList): Promise<ApiTypes.ProgramList>;
GetExpiringList(req: Request.GetExpiringList): Promise<ApiTypes.ProgramList>;
GetInputList(): Promise<ApiTypes.Input[]>;
GetOldRecordedList(req: Request.GetOldRecordedList): Promise<ApiTypes.ProgramList>;
GetPlayGroupList(): Promise<string[]>;
GetRecGroupList(): Promise<string[]>;
GetRecRuleFilterList(): Promise<ApiTypes.RecRuleFilterList>;
GetRecStorageGroupList(): Promise<string[]>;
GetRecordSchedule(req: Request.GetRecordSchedule): Promise<ApiTypes.RecRule>;
GetRecordScheduleList(req: Request.GetRecordScheduleList): Promise<ApiTypes.RecRuleList>;
GetRecorded(req: Request.GetRecorded): Promise<ApiTypes.Program>;
GetRecordedCommBreak(req: Request.GetRecordedCommBreak): Promise<ApiTypes.Cutting[]>;
GetRecordedCutList(req: Request.GetRecordedCutList): Promise<ApiTypes.Cutting[]>;
GetRecordedSeek(req: Request.GetRecordedSeek): Promise<ApiTypes.Cutting[]>;
GetSavedBookmark(req: Request.GetSavedBookmark): Promise<number>;
GetTitleInfoList(): Promise<ApiTypes.TitleInfo[]>;
GetTitleList(req: Request.GetTitleList): Promise<string[]>;
ReactivateRecording(req: Request.ReactivateRecording): Promise<void>;
RecStatusToDescription(req: Request.RecStatusToDescription): Promise<string>;
RecStatusToString(req: Request.RecStatusToString): Promise<string>;
RecTypeToDescription(req: Request.RecTypeToDescription): Promise<string>;
RecTypeToString(req: Request.RecTypeToString): Promise<string>;
RecordedIdForPathname(req: Request.RecordedIdForPathname): Promise<number>;
RemoveRecordSchedule(req: Request.RemoveRecordSchedule): Promise<void>;
RemoveRecorded(req: Request.RemoveRecorded): Promise<void>;
RescheduleRecordings(): Promise<void>;
SetSavedBookmark(req: Request.SetSavedBookmark): Promise<void>;
StopRecording(req: Request.StopRecording): Promise<void>;
UnDeleteRecording(req: Request.UnDeleteRecording): Promise<void>;
UpdateRecordSchedule(req: Request.UpdateRecordSchedule): Promise<void>;
UpdateRecordedWatchedStatus(req: Request.UpdateRecordedWatchedStatus): Promise<void>;
GetProgramCategories(req: Request.GetProgramCategories): Promise<string[]>;
RecordedIdForKey(req: Request.RecordedIdForKey): Promise<number>;
}
}