Commit | Line | Data |
---|---|---|
d1888640 JB |
1 | import { JsonType } from './JsonType'; |
2 | ||
4198ad5c JB |
3 | export enum Protocol { |
4 | UI = 'ui', | |
5 | } | |
8244f5f0 JB |
6 | |
7 | export enum ProtocolVersion { | |
8 | '0.0.1' = '0.0.1', | |
8244f5f0 JB |
9 | } |
10 | ||
11 | export enum ProtocolCommand { | |
ee0f106b | 12 | LIST_CHARGING_STATIONS = 'listChargingStations', |
8244f5f0 JB |
13 | START_TRANSACTION = 'startTransaction', |
14 | STOP_TRANSACTION = 'stopTransaction', | |
15 | UNKNOWN = 'unknown', | |
16 | } | |
17 | ||
d1888640 | 18 | export type ProtocolRequest = [ProtocolCommand, JsonType]; |
8244f5f0 | 19 | |
e7aeea18 JB |
20 | export type ProtocolRequestHandler = ( |
21 | payload: JsonType | |
22 | ) => void | Promise<void> | JsonType | Promise<JsonType>; |