import { ITimer, TimerType } from '../helpers/TimerHelper'; import { IProprietaryTimer, ProprietaryTimerType } from '../helpers/ProprietaryTimerHelper'; import { AnyString } from '../../../utils/types'; /** @deprecated Use IScheduledRebootAction instead */ export type IScheduledRebootActions = IScheduledRebootAction; /** * Interface representing the scheduled reboot action. */ export interface IScheduledRebootAction { /** Random generated ID for the scheduled reboot action */ id: string; /** The rule of the scheduled reboot */ rule: TRule; } /** @internal */ export interface IScheduledRebootRuleRaw { /** Weekdays as numbers or strings. Number types are received from server. */ weekdays: WeekdayNumberType[]; /** Time in HH:mm:ss format */ time: string; } export interface IScheduledRebootRule { /** @deprecated use shortWeekdays property */ weekdays: WeekdayType[]; shortWeekdays: ShortWeekdayType[]; time: string; } export type ShortWeekdayType = 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'; /** * Allowed scheduled action weekday types * @deprecated Use ShortWeekdayType instead */ export type WeekdayType = 'SUNDAY' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY'; /** * This enum is necessary to convert between the number representation of the weekday and the string representation. * On device and servers values are stored as numbers, but in the JS API, we use strings for better human friendly values. * * @deprecated Use ShortWeekdayType instead */ export declare enum WeekdayNumbered { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6 } /** @deprecated Use ShortWeekdayType instead */ export type WeekdayNumberType = 0 | 1 | 2 | 3 | 4 | 5 | 6; /** @deprecated Use ShortWeekdayType instead */ export declare enum WeekdayNamed { SUNDAY = "SUNDAY", MONDAY = "MONDAY", TUESDAY = "TUESDAY", WEDNESDAY = "WEDNESDAY", THURSDAY = "THURSDAY", FRIDAY = "FRIDAY", SATURDAY = "SATURDAY" } export default interface IPower { systemReboot(): Promise; appRestart(): Promise; getTimers(): Promise; setTimer(type: keyof typeof TimerType, timeOn: string | null, timeOff: string | null, weekdays: (ShortWeekdayType | AnyString)[], // TODO: remove AnyString in the next major release volume: number): Promise; unsetTimer(type: keyof typeof TimerType): Promise; getProprietaryTimers(): Promise; setProprietaryTimer(type: ProprietaryTimerType, timeOn: string | null, timeOff: string | null, weekdays: (ShortWeekdayType | AnyString)[], // TODO: remove AnyString in the next major release keepAppletRunning?: boolean): Promise; unsetProprietaryTimer(type: ProprietaryTimerType): Promise; setScheduledReboot(weekdays: (ShortWeekdayType | AnyString)[], // TODO: remove AnyString in the next major release time: string): Promise; removeScheduledReboot(id: string): Promise; getScheduledReboots(): Promise[]>; clearScheduledReboots(): Promise; }