X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=ui%2Fweb%2Fsrc%2Ftypes%2FUIProtocol.ts;h=5b3efcdcef1efb81cccc8eeddc5525ccda0797f1;hb=e82376450bef7a755869accf8f662826147832d8;hp=1f8d1e6fe7ba432fa02516cb4da851757297a47f;hpb=217db0589a326b179780002c076e9ec7fca59d8c;p=e-mobility-charging-stations-simulator.git diff --git a/ui/web/src/types/UIProtocol.ts b/ui/web/src/types/UIProtocol.ts index 1f8d1e6f..5b3efcdc 100644 --- a/ui/web/src/types/UIProtocol.ts +++ b/ui/web/src/types/UIProtocol.ts @@ -14,7 +14,7 @@ export enum ProtocolVersion { } export enum AuthenticationType { - BASIC_AUTH = 'basic-auth' + PROTOCOL_BASIC_AUTH = 'protocol-basic-auth' } export type ProtocolRequest = [string, ProcedureName, RequestPayload] @@ -25,9 +25,14 @@ export type ProtocolRequestHandler = ( ) => ResponsePayload | Promise export enum ProcedureName { + SIMULATOR_STATE = 'simulatorState', START_SIMULATOR = 'startSimulator', STOP_SIMULATOR = 'stopSimulator', + LIST_TEMPLATES = 'listTemplates', LIST_CHARGING_STATIONS = 'listChargingStations', + ADD_CHARGING_STATIONS = 'addChargingStations', + DELETE_CHARGING_STATIONS = 'deleteChargingStations', + SET_SUPERVISION_URL = 'setSupervisionUrl', START_CHARGING_STATION = 'startChargingStation', STOP_CHARGING_STATION = 'stopChargingStation', OPEN_CONNECTION = 'openConnection', @@ -52,3 +57,16 @@ export interface ResponsePayload extends JsonObject { status: ResponseStatus hashIds?: string[] } + +interface TemplateStatistics extends JsonObject { + configured: number + added: number + started: number + indexes: number[] +} + +export interface SimulatorState extends JsonObject { + version: string + started: boolean + templateStatistics: Record +}