2017-10-10 16:25:21 -06:00
|
|
|
import { Response as ResponseData } from "@common/sprinklers/requests";
|
|
|
|
|
2017-10-09 08:09:08 -06:00
|
|
|
export interface IDeviceUpdate {
|
|
|
|
type: "deviceUpdate";
|
|
|
|
name: string;
|
|
|
|
data: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IDeviceCallResponse {
|
|
|
|
type: "deviceCallResponse";
|
|
|
|
id: number;
|
2017-10-10 16:25:21 -06:00
|
|
|
data: ResponseData;
|
2017-10-09 08:09:08 -06:00
|
|
|
}
|
|
|
|
|
2018-06-16 23:54:03 -06:00
|
|
|
export interface IBrokerConnectionUpdate {
|
|
|
|
type: "brokerConnectionUpdate";
|
|
|
|
brokerConnected: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type IServerMessage = IDeviceUpdate | IDeviceCallResponse | IBrokerConnectionUpdate;
|
2017-10-09 08:09:08 -06:00
|
|
|
|
|
|
|
export interface IDeviceCallRequest {
|
|
|
|
type: "deviceCallRequest";
|
|
|
|
id: number;
|
|
|
|
deviceName: string;
|
2017-10-10 16:25:21 -06:00
|
|
|
data: any;
|
2017-10-09 08:09:08 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export type IClientMessage = IDeviceCallRequest;
|