|
@ -1,25 +1,16 @@ |
|
|
declare namespace Socket { |
|
|
declare namespace Socket { |
|
|
type Response = NotificationResponse | MachineStateResponse |
|
|
|
|
|
|
|
|
type Response = NotificationResponse |
|
|
|
|
|
|
|
|
interface NotificationResponse { |
|
|
|
|
|
type: 'notification' |
|
|
|
|
|
data: NotificationData |
|
|
|
|
|
|
|
|
interface cmdResponse { |
|
|
|
|
|
type: 'cmd_debug' | 'cmd_response' |
|
|
|
|
|
data: cmdData |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
interface MachineStateResponse { |
|
|
|
|
|
type: 'machineState' |
|
|
|
|
|
data: MachineStateData |
|
|
|
|
|
} |
|
|
|
|
|
interface NotificationData { |
|
|
|
|
|
|
|
|
interface cmdData { |
|
|
commandId: string |
|
|
commandId: string |
|
|
command: string |
|
|
command: string |
|
|
level: string |
|
|
|
|
|
|
|
|
status: 'receive' | 'start' | 'device_result' | 'device_send' | 'success' | 'error' | 'finish' |
|
|
title: string |
|
|
title: string |
|
|
content: string |
|
|
content: string |
|
|
dateTime: string |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type MachineStateData = MachineStateBase & { |
|
|
|
|
|
[key: string]: any |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |