dt-common-device
Version:
A secure and robust device management library for IoT applications
39 lines (38 loc) • 1.67 kB
TypeScript
import { ISmartthingsDeviceCommandManager } from "../interface";
import { IDeviceCommand, ISmartthingsDeviceCommand, ICommandResponse } from "../types";
/**
* SmartThings Device Service Class
* Implements ISmartthingsDeviceCommandManager interface with empty implementations
* Implementation will be provided by the consuming project
*/
export declare class SmartThingsDeviceService implements ISmartthingsDeviceCommandManager {
/**
* Invokes a command on a device
* @param command - Device command to execute
* @param deviceId - Device identifier
* @returns Promise with command response
*/
invokeCommand(command: IDeviceCommand, deviceId: string): Promise<ICommandResponse>;
/**
* Performs device action for SmartThings
* @param commands - Array of SmartThings device commands
* @param deviceId - Device identifier
* @param accessToken - Access token for authentication
* @returns Promise with action result
*/
performDeviceAction(commands: ISmartthingsDeviceCommand[], deviceId: string, accessToken: string): Promise<any>;
/**
* Gets device status for SmartThings
* @param deviceId - Device identifier
* @param accessToken - Access token for authentication
* @returns Promise with device status
*/
getDeviceStatus(deviceId: string, accessToken: string): Promise<any>;
/**
* Gets device lock status for SmartThings
* @param deviceId - Device identifier
* @param accessToken - Access token for authentication
* @returns Promise with lock status
*/
getDeviceLockStatus(deviceId: string, accessToken: string): Promise<any>;
}