X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2FResponses.ts;h=35424a78f31945f9d198bf2f1be101d2a41738ac;hb=d270cc878c61c42098557a0e03cc1620f74112de;hp=59884dfd208fc127d71068177b6423a45b95ccdd;hpb=439fc71b2ebd8322233792b2f3c466e3ddd6e354;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/Responses.ts b/src/types/ocpp/Responses.ts index 59884dfd..35424a78 100644 --- a/src/types/ocpp/Responses.ts +++ b/src/types/ocpp/Responses.ts @@ -10,11 +10,11 @@ import { type OCPP16DataTransferResponse, OCPP16DataTransferStatus, type OCPP16HeartbeatResponse, - OCPP16RegistrationStatus, type OCPP16StatusNotificationResponse, OCPP16TriggerMessageStatus, OCPP16UnlockStatus, } from './1.6/Responses'; +import type { OCPP20BootNotificationResponse } from './2.0/Responses'; import type { ErrorType } from './ErrorType'; import type { MessageType } from './MessageType'; @@ -28,7 +28,9 @@ export type ResponseHandler = ( requestPayload?: JsonType ) => void | Promise; -export type BootNotificationResponse = OCPP16BootNotificationResponse; +export type BootNotificationResponse = + | OCPP16BootNotificationResponse + | OCPP20BootNotificationResponse; export type HeartbeatResponse = OCPP16HeartbeatResponse; @@ -47,10 +49,11 @@ export type DefaultResponse = { status: DefaultStatus; }; -export const RegistrationStatus = { - ...OCPP16RegistrationStatus, -} as const; -export type RegistrationStatus = OCPP16RegistrationStatus; +export enum RegistrationStatusEnumType { + ACCEPTED = 'Accepted', + PENDING = 'Pending', + REJECTED = 'Rejected', +} export const AvailabilityStatus = { ...OCPP16AvailabilityStatus,