1 import type { 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
= (
20 payload
: RequestPayload
21 ) => ResponsePayload
| Promise
<ResponsePayload
>;
23 export enum ProcedureName
{
24 LIST_CHARGING_STATIONS
= 'listChargingStations',
25 START_CHARGING_STATION
= 'startChargingStation',
26 STOP_CHARGING_STATION
= 'stopChargingStation',
27 START_TRANSACTION
= 'startTransaction',
28 STOP_TRANSACTION
= 'stopTransaction',
29 START_SIMULATOR
= 'startSimulator',
30 STOP_SIMULATOR
= 'stopSimulator',
31 OPEN_CONNECTION
= 'openConnection',
32 CLOSE_CONNECTION
= 'closeConnection',
34 export interface RequestPayload
extends JsonObject
{
39 export enum ResponseStatus
{
44 export interface ResponsePayload
extends JsonObject
{
45 status: ResponseStatus
;