1 import type { JsonObject
} from
'./JsonType';
7 export enum ApplicationProtocol
{
12 export enum AuthenticationType
{
13 BASIC_AUTH
= 'basic-auth',
16 export enum ProtocolVersion
{
20 export type ProtocolRequest
= [string, ProcedureName
, RequestPayload
];
21 export type ProtocolResponse
= [string, ResponsePayload
];
23 export type ProtocolRequestHandler
= (
25 payload
?: RequestPayload
26 ) => undefined | Promise
<undefined> | ResponsePayload
| Promise
<ResponsePayload
>;
28 export enum ProcedureName
{
29 LIST_CHARGING_STATIONS
= 'listChargingStations',
30 START_CHARGING_STATION
= 'startChargingStation',
31 STOP_CHARGING_STATION
= 'stopChargingStation',
32 START_SIMULATOR
= 'startSimulator',
33 STOP_SIMULATOR
= 'stopSimulator',
34 OPEN_CONNECTION
= 'openConnection',
35 CLOSE_CONNECTION
= 'closeConnection',
36 START_TRANSACTION
= 'startTransaction',
37 STOP_TRANSACTION
= 'stopTransaction',
38 START_AUTOMATIC_TRANSACTION_GENERATOR
= 'startAutomaticTransactionGenerator',
39 STOP_AUTOMATIC_TRANSACTION_GENERATOR
= 'stopAutomaticTransactionGenerator',
42 export interface RequestPayload
extends JsonObject
{
44 connectorIds
?: number[];
47 export enum ResponseStatus
{
52 export interface ResponsePayload
extends JsonObject
{
53 status: ResponseStatus
;
54 hashIdsSucceeded
?: string[];
55 hashIdsFailed
?: string[];