X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2FRequests.ts;h=aeb6828c7c97cd1e9e1bcff8ebcf3c480a45f5de;hb=7e1dc8784bef178de6438ae9af2bece427809cde;hp=ea2da2436ddf00d66d85309b3c229030a3aef56b;hpb=690e5af73261da3434b37ef02c67c22ff19b8e5e;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/Requests.ts b/src/types/ocpp/Requests.ts index ea2da243..aeb6828c 100644 --- a/src/types/ocpp/Requests.ts +++ b/src/types/ocpp/Requests.ts @@ -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, requestPayload?: Record) => void, (error?: OCPPError) => void, Record]; +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, requestPayload: Record) => void, (error: OCPPError) => void, Record]; export type IncomingRequest = [MessageType, string, IncomingRequestCommand, Record, Record];