X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2FRequests.ts;h=713fa0e6da50d64f42f89d4eb3f4a57f64783d20;hb=071a9315b94fb1c6f7996ca71e42794ac9ff9f82;hp=8292156d500b3295d45a404e4ec2746c44d4b313;hpb=9c13b3b52e1ab803a92f090da6920310c80c12da;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/Requests.ts b/src/types/ocpp/Requests.ts index 8292156d..713fa0e6 100644 --- a/src/types/ocpp/Requests.ts +++ b/src/types/ocpp/Requests.ts @@ -1,32 +1,35 @@ import { OCPP16AvailabilityType, OCPP16BootNotificationRequest, OCPP16IncomingRequestCommand, OCPP16RequestCommand } from './1.6/Requests'; import { MessageType } from './MessageType'; -import OCPPError from '../../charging-station/OcppError'; - -export default interface Requests { - [id: string]: Request; -} +import { OCPP16DiagnosticsStatus } from './1.6/DiagnosticsStatus'; +import OCPPError from '../../charging-station/ocpp/OCPPError'; export type BootNotificationRequest = OCPP16BootNotificationRequest; -export type AvailabilityType = typeof AvailabilityType; +export type AvailabilityType = OCPP16AvailabilityType; export const AvailabilityType = { ...OCPP16AvailabilityType }; -export type RequestCommand = typeof RequestCommand; +export type RequestCommand = OCPP16RequestCommand; export const RequestCommand = { ...OCPP16RequestCommand }; -export type IncomingRequestCommand = typeof IncomingRequestCommand; +export type IncomingRequestCommand = OCPP16IncomingRequestCommand; export const IncomingRequestCommand = { ...OCPP16IncomingRequestCommand }; -export type Request = [(payload?: Record, requestPayload?: Record) => void, (error?: OCPPError) => void, Record]; +export type DiagnosticsStatus = OCPP16DiagnosticsStatus; + +export const DiagnosticsStatus = { + ...OCPP16DiagnosticsStatus +}; + +export type Request = [(payload: Record | string, requestPayload: Record) => void, (error: OCPPError) => void, Record]; export type IncomingRequest = [MessageType, string, IncomingRequestCommand, Record, Record];