Restructure UI server code to prepare it for issue #238
[e-mobility-charging-stations-simulator.git] / src / types / UIProtocol.ts
index ea01b4fc77558063716b3837e20715dc3a25285b..1756c0faff73b694a310f83bbf368c898aa8100f 100644 (file)
@@ -4,6 +4,11 @@ export enum Protocol {
   UI = 'ui',
 }
 
+export enum ApplicationProtocol {
+  HTTP = 'http',
+  WS = 'ws',
+}
+
 export enum ProtocolVersion {
   '0.0.1' = '0.0.1',
 }
@@ -12,9 +17,10 @@ export enum ProtocolCommand {
   LIST_CHARGING_STATIONS = 'listChargingStations',
   START_TRANSACTION = 'startTransaction',
   STOP_TRANSACTION = 'stopTransaction',
-  UNKNOWN = 'unknown',
 }
 
 export type ProtocolRequest = [ProtocolCommand, JsonType];
 
-export type ProtocolRequestHandler = (payload: JsonType) => void | Promise<void> | JsonType | Promise<JsonType>;
+export type ProtocolRequestHandler = (
+  payload: JsonType
+) => void | Promise<void> | JsonType | Promise<JsonType>;