-export type IncomingRequest = [
- MessageType.CALL_MESSAGE,
- string,
- IncomingRequestCommand,
- JsonObject
-];
+export type RequestParams = {
+ skipBufferingOnError?: boolean;
+ triggerMessage?: boolean;
+ throwError?: boolean;
+};
+
+export const IncomingRequestCommand = {
+ ...OCPP16IncomingRequestCommand,
+ ...OCPP20IncomingRequestCommand,
+} as const;
+export type IncomingRequestCommand = OCPP16IncomingRequestCommand | OCPP20IncomingRequestCommand;
+
+export type IncomingRequest = [MessageType.CALL_MESSAGE, string, IncomingRequestCommand, JsonType];
+
+export type ResponseCallback = (payload: JsonType, requestPayload: JsonType) => void;
+
+export type ErrorCallback = (error: OCPPError, requestStatistic?: boolean) => void;