UNPKG

dt-common-device

Version:

A secure and robust device management library for IoT applications

15 lines (14 loc) 1.14 kB
import { IAuditProperties } from "../audit/IAuditProperties"; import { IDevice, IStatus, IStatusQuery } from "../entities/device/local/interfaces"; export declare class EventHandler { constructor(); onDeviceCreate(body: IDevice): Promise<void>; onDeviceUpdate(deviceId: string, body: any, auditBody: IAuditProperties): Promise<void>; onDeviceDelete(deviceId: string, auditBody: IAuditProperties): Promise<void>; onStateChange(deviceId: string, state: any, auditProperties: IAuditProperties, eventType?: any): Promise<void>; onStatusChange(deviceId: string, status: any, auditProperties: IAuditProperties, eventType: any): Promise<void>; onStatusChangeMany(query: IStatusQuery, status: IStatus, auditProperties: IAuditProperties, eventType: any): Promise<void>; onBatteryLevelChange(deviceId: string, batteryLevel: number, auditProperties: IAuditProperties): Promise<void>; onBatteryReplaced(deviceId: string, batteryLevel: number, auditProperties: IAuditProperties): Promise<void>; onDeviceMetaChange(deviceId: string, metaData: Record<string, any>, auditProperties: IAuditProperties): Promise<void>; }