X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2FRequests.ts;h=4cb32e27479ba8828424823846a7c6ecabf38e95;hb=b8efd65b4afd9229385af677e3e2a829f3280712;hp=a2407476fd90d24eb6d971afd66ff664390c1e50;hpb=e1d9a0f4d6ff1a90048e9a694fd12b7031cc6961;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/Requests.ts b/src/types/ocpp/Requests.ts index a2407476..4cb32e27 100644 --- a/src/types/ocpp/Requests.ts +++ b/src/types/ocpp/Requests.ts @@ -49,6 +49,11 @@ export type IncomingRequestCommand = OCPP16IncomingRequestCommand | OCPP20Incomi export type IncomingRequest = [MessageType.CALL_MESSAGE, string, IncomingRequestCommand, JsonType]; +export type IncomingRequestHandler = ( + chargingStation: ChargingStation, + commandPayload: JsonType, +) => JsonType | Promise; + export type ResponseCallback = (payload: JsonType, requestPayload: JsonType) => void; export type ErrorCallback = (error: OCPPError, requestStatistic?: boolean) => void; @@ -81,11 +86,6 @@ export type DiagnosticsStatusNotificationRequest = OCPP16DiagnosticsStatusNotifi export type FirmwareStatusNotificationRequest = OCPP16FirmwareStatusNotificationRequest; -export type IncomingRequestHandler = ( - chargingStation: ChargingStation, - commandPayload: JsonType, -) => JsonType | Promise; - export const AvailabilityType = { ...OCPP16AvailabilityType, ...OperationalStatusEnumType,