README.md: small refinement
[e-mobility-charging-stations-simulator.git] / src / types / UIProtocol.ts
... / ...
CommitLineData
1import { JsonType } from './JsonType';
2
3export enum Protocol {
4 UI = 'ui',
5}
6
7export enum ProtocolVersion {
8 '0.0.1' = '0.0.1',
9}
10
11export enum ProtocolCommand {
12 LIST_CHARGING_STATIONS = 'listChargingStations',
13 START_TRANSACTION = 'startTransaction',
14 STOP_TRANSACTION = 'stopTransaction',
15 UNKNOWN = 'unknown',
16}
17
18export type ProtocolRequest = [ProtocolCommand, JsonType];
19
20export type ProtocolRequestHandler = (
21 payload: JsonType
22) => void | Promise<void> | JsonType | Promise<JsonType>;