Documentation on OCPP parameters
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / Requests.ts
index ea2da2436ddf00d66d85309b3c229030a3aef56b..aeb6828c7c97cd1e9e1bcff8ebcf3c480a45f5de 100644 (file)
@@ -1,4 +1,5 @@
-import { IncomingRequestCommand } from './1.6/Requests';
+import { OCPP16AvailabilityType, OCPP16BootNotificationRequest, OCPP16IncomingRequestCommand, OCPP16RequestCommand } from './1.6/Requests';
+
 import { MessageType } from './MessageType';
 import OCPPError from '../../charging-station/OcppError';
 
@@ -6,6 +7,26 @@ export default interface Requests {
   [id: string]: Request;
 }
 
-export type Request = [(payload?: Record<string, unknown>, requestPayload?: Record<string, unknown>) => void, (error?: OCPPError) => void, Record<string, unknown>];
+export type BootNotificationRequest = OCPP16BootNotificationRequest;
+
+export type AvailabilityType = OCPP16AvailabilityType;
+
+export const AvailabilityType = {
+  ...OCPP16AvailabilityType
+};
+
+export type RequestCommand = OCPP16RequestCommand;
+
+export const RequestCommand = {
+  ...OCPP16RequestCommand
+};
+
+export type IncomingRequestCommand = OCPP16IncomingRequestCommand;
+
+export const IncomingRequestCommand = {
+  ...OCPP16IncomingRequestCommand
+};
+
+export type Request = [(payload: Record<string, unknown> | string, requestPayload: Record<string, unknown>) => void, (error: OCPPError) => void, Record<string, unknown>];
 
 export type IncomingRequest = [MessageType, string, IncomingRequestCommand, Record<string, unknown>, Record<string, unknown>];