X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FUIProtocol.ts;h=1756c0faff73b694a310f83bbf368c898aa8100f;hb=ccb1d6e97cc0248cd96a9505cf5e8f037d66984c;hp=4ff499b48cfbbd52a03c5507709752782271d346;hpb=e3822d6f1b40477f7308ad70c290ed2c4106c585;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/UIProtocol.ts b/src/types/UIProtocol.ts index 4ff499b4..1756c0fa 100644 --- a/src/types/UIProtocol.ts +++ b/src/types/UIProtocol.ts @@ -1,9 +1,14 @@ -import { JsonObject } from './JsonType'; +import { JsonType } from './JsonType'; export enum Protocol { UI = 'ui', } +export enum ApplicationProtocol { + HTTP = 'http', + WS = 'ws', +} + export enum ProtocolVersion { '0.0.1' = '0.0.1', } @@ -12,11 +17,10 @@ export enum ProtocolCommand { LIST_CHARGING_STATIONS = 'listChargingStations', START_TRANSACTION = 'startTransaction', STOP_TRANSACTION = 'stopTransaction', - UNKNOWN = 'unknown', } -export type ProtocolRequest = [ProtocolCommand, JsonObject]; +export type ProtocolRequest = [ProtocolCommand, JsonType]; export type ProtocolRequestHandler = ( - payload: JsonObject -) => void | Promise | JsonObject | Promise; + payload: JsonType +) => void | Promise | JsonType | Promise;