1 import type { BroadcastChannelResponsePayload
, JsonObject
} from
'./internal';
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 procedureName
?: ProcedureName
,
26 payload
?: RequestPayload
27 ) => undefined | Promise
<undefined> | ResponsePayload
| Promise
<ResponsePayload
>;
29 export enum ProcedureName
{
30 START_SIMULATOR
= 'startSimulator',
31 STOP_SIMULATOR
= 'stopSimulator',
32 LIST_CHARGING_STATIONS
= 'listChargingStations',
33 START_CHARGING_STATION
= 'startChargingStation',
34 STOP_CHARGING_STATION
= 'stopChargingStation',
35 OPEN_CONNECTION
= 'openConnection',
36 CLOSE_CONNECTION
= 'closeConnection',
37 START_AUTOMATIC_TRANSACTION_GENERATOR
= 'startAutomaticTransactionGenerator',
38 STOP_AUTOMATIC_TRANSACTION_GENERATOR
= 'stopAutomaticTransactionGenerator',
39 SET_SUPERVISION_URL
= 'setSupervisionUrl',
40 START_TRANSACTION
= 'startTransaction',
41 STOP_TRANSACTION
= 'stopTransaction',
42 AUTHORIZE
= 'authorize',
43 BOOT_NOTIFICATION
= 'bootNotification',
44 STATUS_NOTIFICATION
= 'statusNotification',
45 HEARTBEAT
= 'heartbeat',
46 METER_VALUES
= 'meterValues',
47 DATA_TRANSFER
= 'dataTransfer',
48 DIAGNOSTICS_STATUS_NOTIFICATION
= 'diagnosticsStatusNotification',
49 FIRMWARE_STATUS_NOTIFICATION
= 'firmwareStatusNotification',
52 export interface RequestPayload
extends JsonObject
{
54 connectorIds
?: number[];
57 export enum ResponseStatus
{
62 export interface ResponsePayload
extends JsonObject
{
63 status: ResponseStatus
;
64 hashIdsSucceeded
?: string[];
65 hashIdsFailed
?: string[];
66 responsesFailed
?: BroadcastChannelResponsePayload
[];