import { MqttCommandTopicInterface } from '../interfaces/mqttInterface'; import { CommandTopicData } from './mqttService'; /** * Topic Service. */ declare class TopicService { /** * The Topic Timeout IDs. * * @protected */ protected topicTimeoutIds: TopicTimeoutIds; /** * Prepare Message for the MQTT Topic. * * @param aliceValue * @param topicData * @returns Promise */ convertAliceValueToMqttMessage(aliceValue: any, topicData?: CommandTopicData): Promise; /** * Prepare Value for the Alice Device Capability State. * * @param mqttMessage * @param topicData * @returns Promise */ convertMqttMessageToAliceValue(mqttMessage: string, topicData?: CommandTopicData): Promise; /** * Set Topic Message to the Cache. * * @param topic * @param message * @returns Promise */ setTopicMessage(topic: string, message: string): Promise; /** * Get Topic Message from the Cache. * * @param topic * @returns Promise */ getTopicMessage(topic: string): Promise; /** * Get Value from the State Topic by Keys. * * @param topic * @param keys * @returns Promise */ getStateTopicValueByKey(topic: string, keys: string[]): Promise; /** * Get State Topic changes. * * @param oldMessage * @param newMessage * @param deviceType * @returns Promise */ getStateTopicChanges(oldMessage: string | undefined, newMessage: string, deviceType?: string): Promise; } /** * Changed MQTT Command Topic Interface. */ export interface ChangedCommandTopicInterface extends MqttCommandTopicInterface { deviceType: string; mqttValueOld: string | number; mqttValueNew: string | number; } /** * The "Topic => Timeout ID" Type. */ export type TopicTimeoutIds = { [key: string]: ReturnType; }; declare const _default: TopicService; export default _default;