2 OCPP16AvailabilityType
,
3 OCPP16BootNotificationRequest
,
4 OCPP16HeartbeatRequest
,
5 OCPP16IncomingRequestCommand
,
7 OCPP16StatusNotificationRequest
,
8 } from
'./1.6/Requests';
10 import { JsonObject
} from
'../JsonType';
11 import { MessageType
} from
'./MessageType';
12 import { OCPP16DiagnosticsStatus
} from
'./1.6/DiagnosticsStatus';
13 import { OCPP16MeterValuesRequest
} from
'./1.6/MeterValues';
14 import OCPPError from
'../../exception/OCPPError';
16 export type OutgoingRequest
= [MessageType
.CALL_MESSAGE
, string, RequestCommand
, JsonObject
];
18 export type IncomingRequest
= [
19 MessageType
.CALL_MESSAGE
,
21 IncomingRequestCommand
,
25 export type CachedRequest
= [
26 (payload
: JsonObject
, requestPayload
: JsonObject
) => void,
27 (error
: OCPPError
, requestStatistic
?: boolean) => void,
28 RequestCommand
| IncomingRequestCommand
,
32 export type IncomingRequestHandler
= (
33 commandPayload
: JsonObject
34 ) => JsonObject
| Promise
<JsonObject
>;
36 export type ResponseType
= JsonObject
| OCPPError
;
38 export interface RequestParams
{
39 skipBufferingOnError
?: boolean;
40 triggerMessage
?: boolean;
43 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
45 export type HeartbeatRequest
= OCPP16HeartbeatRequest
;
47 export type StatusNotificationRequest
= OCPP16StatusNotificationRequest
;
49 export type MeterValuesRequest
= OCPP16MeterValuesRequest
;
51 export type AvailabilityType
= OCPP16AvailabilityType
;
53 export const AvailabilityType
= {
54 ...OCPP16AvailabilityType
,
57 export type RequestCommand
= OCPP16RequestCommand
;
59 export const RequestCommand
= {
60 ...OCPP16RequestCommand
,
63 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
65 export const IncomingRequestCommand
= {
66 ...OCPP16IncomingRequestCommand
,
69 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
71 export const DiagnosticsStatus
= {
72 ...OCPP16DiagnosticsStatus
,