UNPKG

node-red-contrib-mobius-flow-thingsboard

Version:

Node-RED nodes to work with MOBiUSFlow and ThingsBoard.io

43 lines (42 loc) 1.74 kB
import { IThingsboardHttpClient } from '../thingsboard-http-client-v2'; import { IThingsboardMqttClient } from '../thingsboard-mqtt-client-v2'; export interface NodeInterface { on(type: 'input', callback: (msg: any, done?: any) => void): any; on(type: 'close', callback: (done?: any) => void): any; send(msg: any): any; status(status: any): any; log(msg: string): any; warn(msg: string): any; error(msg: string): any; } export interface IConnectionManagerInterface { credentials: any; context: any; httpClient: IThingsboardHttpClient; mqttClient: IThingsboardMqttClient; id: string; on(type: 'input', callback: (msg: any, done?: any) => void): any; on(type: 'close', callback: (done?: any) => void): any; on(type: 'connecting', callback: () => void): any; on(type: 'disconnected', callback: () => void): any; on(type: 'connected', callback: () => void): any; send(msg: any): any; status(status: any): any; log(msg: string): any; warn(msg: string): any; error(msg: string): any; register(thingsboardNode: any): void; deregister(thingsboardNode: any, done?: any): void; getHttpClient(): IThingsboardHttpClient; getMqttClient(): IThingsboardMqttClient; clearRegisteredDevices(): void; refreshRegisteredDevices(): Promise<number>; addDeviceToRegister(name: string, deviceId: string): any; deviceIsRegistered(name: string): boolean; getDeviceId(name: string): string | undefined; clearRegisteredAssets(): void; refreshRegisteredAssets(): Promise<number>; addAssetToRegister(name: string, assetId: string): any; assetIsRegistered(name: string): boolean; getAssetId(name: string): string | undefined; }