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