1 import type { JsonObject
} from
'./JsonType'
7 export enum ApplicationProtocol
{
12 export enum ProtocolVersion
{
16 export enum AuthenticationType
{
17 PROTOCOL_BASIC_AUTH
= 'protocol-basic-auth'
20 export type ProtocolRequest
= [string, ProcedureName
, RequestPayload
]
21 export type ProtocolResponse
= [string, ResponsePayload
]
23 export type ProtocolRequestHandler
= (
24 payload
: RequestPayload
25 ) => ResponsePayload
| Promise
<ResponsePayload
>
27 export enum ProcedureName
{
28 START_SIMULATOR
= 'startSimulator',
29 STOP_SIMULATOR
= 'stopSimulator',
30 LIST_TEMPLATES
= 'listTemplates',
31 LIST_CHARGING_STATIONS
= 'listChargingStations',
32 ADD_CHARGING_STATIONS
= 'addChargingStations',
33 DELETE_CHARGING_STATIONS
= 'deleteChargingStations',
34 START_CHARGING_STATION
= 'startChargingStation',
35 STOP_CHARGING_STATION
= 'stopChargingStation',
36 OPEN_CONNECTION
= 'openConnection',
37 CLOSE_CONNECTION
= 'closeConnection',
38 START_AUTOMATIC_TRANSACTION_GENERATOR
= 'startAutomaticTransactionGenerator',
39 STOP_AUTOMATIC_TRANSACTION_GENERATOR
= 'stopAutomaticTransactionGenerator',
40 START_TRANSACTION
= 'startTransaction',
41 STOP_TRANSACTION
= 'stopTransaction'
44 export interface RequestPayload
extends JsonObject
{
46 connectorIds
?: number[]
49 export enum ResponseStatus
{
54 export interface ResponsePayload
extends JsonObject
{
55 status: ResponseStatus