import { Status } from "../../DataFrame"; import { DeviceResponseType } from "../Devices/IDevice"; import { IDeviceStateData } from "../Devices/IDeviceState"; import { IDeviceTask } from "../Devices/IDeviceTask"; import { ResponseResult } from "../FieldChangeResult"; import { IScenesService, ScenesServiceErrorCode } from "./IScenesService"; import { ArgumentType, ConditionsTypes, HandledType, ISequence, ISequenceInfo, ILeftArgument, LeftArgumentTypes, ISequenceTasks, IRawSequence, ScenesUtils, ISceneTask, SceneTasks, SceneTaskType, ScenesUsedIn, SupportedTaskTypes } from "./Scenes"; import { SequenceBuilder, SequenceRequestData } from "./ScenesBuilder"; /** * @type Class */ export declare class ScenesService implements IScenesService { static readonly ServiceName: string; private _connection; private _configurationService; constructor(); GetServiceName(): string; GetSequencesListAsync(): Promise | ISequenceInfo[]>; GetSequenceAsync(sequenceInfo: ISequenceInfo): Promise | (ISequence & IRawSequence)>; GetSequenceAsync(sequenceGuid: string): Promise | (ISequence & IRawSequence)>; GetSequenceBuilder(newSequenceName: string, newSequenceIcon: string): SequenceBuilder; GetSequenceBuilder(newSequenceName: string): SequenceBuilder; GetSequenceBuilder(): SequenceBuilder; CreateSequenceAsync(sequence: SequenceRequestData): Promise; CheckIfSequenceIsUsedInAnotherSequenceAsync(sequenceInfo: ISequenceInfo): Promise>; CheckIfSequenceIsUsedInAnotherSequenceAsync(sequenceGuid: string): Promise>; DeleteSequenceAsync(sequenceInfo: ISequenceInfo): Promise; DeleteSequenceAsync(sequenceGuid: string): Promise; EditSequenceAsync(sequence: SequenceRequestData): Promise; EnableSequenceAsync(sequenceInfo: ISequenceInfo): Promise; EnableSequenceAsync(sequenceGuid: string): Promise; DisableSequenceAsync(sequenceInfo: ISequenceInfo): Promise; DisableSequenceAsync(sequenceGuid: string): Promise; RunSequenceAsync(sequenceInfo: ISequenceInfo): Promise; RunSequenceAsync(sequenceGuid: string): Promise; GetUtilsAsync(): Promise; protected _parseLinearScaleToLux(linearScaleVal: number): number | undefined; protected _parseLuxToLinearScale(lux: number): number; protected SunCalculatorAsync(): Promise<{ GetSunRiseTime: () => Date; GetSunSetTime: () => Date; }>; protected MapSequence(rawSequenceResponse: any, ignoreRightArgument?: boolean): Sequence; /** * Functions map all nested right arguments recursively * @param arg * @returns */ protected MapRightArgument(arg: any, argType: ArgumentType): Sequence | null; /** * Function maps raw LeftArgument JSON to object-key typed parameters property * @param arg * @returns */ protected MapLeftArgument(arg: any, argType: ArgumentType): LeftArgument; /** * Function changes numeric based enum to string based enum, string enum is more user frienldy and is used for key of left argument typed property * @param argumentType * @returns */ protected MapArgumentType(argumentType: ArgumentTypeNum): ArgumentType; /** * Maps types of device state from Scenes extension state enum to general device states enum in library * @param stateType * @returns */ protected MapDeviceStateTypeToResponseType(stateType: number): DeviceResponseType; /** * Function converts device state from Scenes extension to general device states in library * @param argumentData * @param responseType * @returns */ protected CreateDeviceState(argumentData: any, channel: number, responseType: DeviceResponseType): T; protected MapDeviceTask(rawTasks: any): IDeviceTask; protected MapControllerTasks(rawTasks: any[]): ControllerTasks[]; GetSupportedTaskTypesAsync(): Promise; } declare class Sequence implements ISequence, IRawSequence { _rawRequestData: SequenceRequestData; Tasks: ISequenceTasks; Guid: string; ObjectType: number; Name: string; Icon: string; AtMeetCondition: boolean; ExecuteOnce: boolean; IsDisabled: boolean; HandledType: HandledType; ConditionType: ConditionsTypes; ConditionTimeout: number; LeftArgumentType: ArgumentType; RightArgumentType: ArgumentType; LeftArgument: ILeftArgument; RightArgument: ISequence | null; get DoesHaveTriggers(): boolean; } declare class LeftArgument implements ILeftArgument { HandledType: ArgumentTypeNum; Argument: LeftArgumentTypes; } declare enum ArgumentTypeNum { Null = 0, Condition = 1, ConditionGroup = 2, ArgumentAsInt = 3, ArgumentAsTimeSpan = 4, ArgumentAsBoolean = 5, ArgumentAsTimeout = 6, ArgumentAsDayOfWeek = 7, ArgumentAsDaysOfWeek = 8, ArgumentAsAstronomicalClock = 9, ArgumentAsTime = 10, ArgumentAsDeviceState = 11, ArgumentAsNumber = 12, ArgumentAsAstronomicalClockWithOffset = 13, ArgumentAsConditionInfo = 14 } declare class ControllerTasks implements ISceneTask { TaskId: string; Guid: string; TaskType: SceneTaskType; Task: SceneTasks; } export {};