1 import { JsonObject
} from
'./JsonType';
7 export enum ApplicationProtocol
{
12 export enum ProtocolVersion
{
16 export type ProtocolRequest
= [string, ProcedureName
, RequestPayload
];
17 export type ProtocolResponse
= [string, ResponsePayload
];
19 export type ProtocolRequestHandler
= (
21 payload
?: RequestPayload
22 ) => ResponsePayload
| Promise
<ResponsePayload
>;
24 export enum ProcedureName
{
25 LIST_CHARGING_STATIONS
= 'listChargingStations',
26 START_CHARGING_STATION
= 'startChargingStation',
27 STOP_CHARGING_STATION
= 'stopChargingStation',
28 START_TRANSACTION
= 'startTransaction',
29 STOP_TRANSACTION
= 'stopTransaction',
30 START_SIMULATOR
= 'startSimulator',
31 STOP_SIMULATOR
= 'stopSimulator',
33 export interface RequestPayload
extends JsonObject
{
37 export enum ResponseStatus
{
42 export interface ResponsePayload
extends JsonObject
{
43 status: ResponseStatus
;