Strong type protocols payloads
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / Responses.ts
index a09da33b0fe86af5e6fa9cdcdff120c8b1c71180..21ddd903aa142cd39f11077879d2352ed2fc3233 100644 (file)
@@ -1,4 +1,8 @@
-import { OCPP16AvailabilityStatus, OCPP16BootNotificationResponse, OCPP16ChargingProfileStatus, OCPP16ClearChargingProfileStatus, OCPP16ConfigurationStatus, OCPP16RegistrationStatus, OCPP16UnlockStatus } from './1.6/Responses';
+import { OCPP16AvailabilityStatus, OCPP16BootNotificationResponse, OCPP16ChargingProfileStatus, OCPP16ClearChargingProfileStatus, OCPP16ConfigurationStatus, OCPP16RegistrationStatus, OCPP16TriggerMessageStatus, OCPP16UnlockStatus } from './1.6/Responses';
+
+import { JsonType } from '../JsonType';
+
+export type ResponseHandler = (payload: JsonType | string, requestPayload?: JsonType) => void | Promise<void>;
 
 export type BootNotificationResponse = OCPP16BootNotificationResponse;
 
@@ -46,3 +50,9 @@ export type UnlockStatus = OCPP16UnlockStatus;
 export const UnlockStatus = {
   ...OCPP16UnlockStatus
 };
+
+export type TriggerMessageStatus = OCPP16TriggerMessageStatus;
+
+export const TriggerMessageStatus = {
+  ...OCPP16TriggerMessageStatus
+};