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
= (
21 payload
?: RequestPayload
22 ) => undefined | Promise
<undefined> | ResponsePayload
| Promise
<ResponsePayload
>;
24 export enum ProcedureName
{
25 LIST_CHARGING_STATIONS
= 'listChargingStations',
26 START_CHARGING_STATION
= 'startChargingStation',
27 STOP_CHARGING_STATION
= 'stopChargingStation',
28 START_SIMULATOR
= 'startSimulator',
29 STOP_SIMULATOR
= 'stopSimulator',
30 OPEN_CONNECTION
= 'openConnection',
31 CLOSE_CONNECTION
= 'closeConnection',
32 START_TRANSACTION
= 'startTransaction',
33 STOP_TRANSACTION
= 'stopTransaction',
34 START_AUTOMATIC_TRANSACTION_GENERATOR
= 'startAutomaticTransactionGenerator',
35 STOP_AUTOMATIC_TRANSACTION_GENERATOR
= 'stopAutomaticTransactionGenerator',
38 export interface RequestPayload
extends JsonObject
{
40 connectorIds
?: number[];
43 export enum ResponseStatus
{
48 export interface ResponsePayload
extends JsonObject
{
49 status: ResponseStatus
;