1 import type { OCPP16MeterValuesResponse
} from
'./1.6/MeterValues';
3 OCPP16AvailabilityStatus
,
4 type OCPP16BootNotificationResponse
,
5 OCPP16ChargingProfileStatus
,
6 OCPP16ClearChargingProfileStatus
,
7 OCPP16ConfigurationStatus
,
8 type OCPP16DataTransferResponse
,
9 OCPP16DataTransferStatus
,
10 type OCPP16DiagnosticsStatusNotificationResponse
,
11 type OCPP16FirmwareStatusNotificationResponse
,
12 type OCPP16HeartbeatResponse
,
13 OCPP16ReservationStatus
,
14 type OCPP16StatusNotificationResponse
,
15 OCPP16TriggerMessageStatus
,
17 } from
'./1.6/Responses';
18 import type { OCPP20BootNotificationResponse
, OCPP20ClearCacheResponse
} from
'./2.0/Responses';
19 import { type GenericResponse
, GenericStatus
} from
'./Common';
20 import type { ErrorType
} from
'./ErrorType';
21 import type { MessageType
} from
'./MessageType';
22 import type { ChargingStation
} from
'../../charging-station';
23 import type { JsonType
} from
'../JsonType';
25 export type Response
= [MessageType
.CALL_RESULT_MESSAGE
, string, JsonType
];
27 export type ErrorResponse
= [MessageType
.CALL_ERROR_MESSAGE
, string, ErrorType
, string, JsonType
];
29 export type ResponseHandler
= (
30 chargingStation
: ChargingStation
,
32 requestPayload
?: JsonType
,
33 ) => void | Promise
<void>;
35 export type BootNotificationResponse
=
36 | OCPP16BootNotificationResponse
37 | OCPP20BootNotificationResponse
;
39 export type HeartbeatResponse
= OCPP16HeartbeatResponse
;
41 export type ClearCacheResponse
= GenericResponse
| OCPP20ClearCacheResponse
;
43 export type StatusNotificationResponse
= OCPP16StatusNotificationResponse
;
45 export type MeterValuesResponse
= OCPP16MeterValuesResponse
;
47 export type DataTransferResponse
= OCPP16DataTransferResponse
;
49 export type DiagnosticsStatusNotificationResponse
= OCPP16DiagnosticsStatusNotificationResponse
;
51 export type FirmwareStatusNotificationResponse
= OCPP16FirmwareStatusNotificationResponse
;
53 export const AvailabilityStatus
= {
54 ...OCPP16AvailabilityStatus
,
56 export type AvailabilityStatus
= OCPP16AvailabilityStatus
;
58 export const ChargingProfileStatus
= {
59 ...OCPP16ChargingProfileStatus
,
61 export type ChargingProfileStatus
= OCPP16ChargingProfileStatus
;
63 export const ClearChargingProfileStatus
= {
64 ...OCPP16ClearChargingProfileStatus
,
66 export type ClearChargingProfileStatus
= OCPP16ClearChargingProfileStatus
;
68 export const ConfigurationStatus
= {
69 ...OCPP16ConfigurationStatus
,
71 export type ConfigurationStatus
= OCPP16ConfigurationStatus
;
73 export const UnlockStatus
= {
74 ...OCPP16UnlockStatus
,
76 export type UnlockStatus
= OCPP16UnlockStatus
;
78 export const TriggerMessageStatus
= {
79 ...OCPP16TriggerMessageStatus
,
81 export type TriggerMessageStatus
= OCPP16TriggerMessageStatus
;
83 export const DataTransferStatus
= {
84 ...OCPP16DataTransferStatus
,
86 export type DataTransferStatus
= OCPP16DataTransferStatus
;
88 export type ReservationStatus
= OCPP16ReservationStatus
;
89 export const ReservationStatus
= {
90 ...OCPP16ReservationStatus
,
93 export type CancelReservationStatus
= GenericStatus
;
94 export const CancelReservationStatus
= {
98 export type CancelReservationResponse
= GenericResponse
;