refactor: cleanup some OCPP type definitions
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 22 Nov 2024 21:09:37 +0000 (22:09 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 22 Nov 2024 21:09:37 +0000 (22:09 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/types/ocpp/Responses.ts

index ec444fcf855d0961366da7d7bb33b8d0c20bba2a..e6b88f00dfe807420e92b6a0d625cf500a7c63f8 100644 (file)
@@ -27,6 +27,8 @@ export type BootNotificationResponse =
   | OCPP16BootNotificationResponse
   | OCPP20BootNotificationResponse
 
+export type CancelReservationResponse = GenericResponse
+
 export type ClearCacheResponse = GenericResponse | OCPP20ClearCacheResponse
 
 export type DataTransferResponse = OCPP16DataTransferResponse
@@ -93,16 +95,14 @@ export const DataTransferStatus = {
 // eslint-disable-next-line @typescript-eslint/no-redeclare
 export type DataTransferStatus = OCPP16DataTransferStatus
 
-export type ReservationStatus = OCPP16ReservationStatus
-// eslint-disable-next-line @typescript-eslint/no-redeclare
 export const ReservationStatus = {
   ...OCPP16ReservationStatus,
 } as const
-
-export type CancelReservationStatus = GenericStatus
 // eslint-disable-next-line @typescript-eslint/no-redeclare
+export type ReservationStatus = OCPP16ReservationStatus
+
 export const CancelReservationStatus = {
   ...GenericStatus,
 } as const
-
-export type CancelReservationResponse = GenericResponse
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export type CancelReservationStatus = GenericStatus