2 OCPP16AvailabilityType
,
3 OCPP16BootNotificationRequest
,
4 OCPP16HeartbeatRequest
,
5 OCPP16IncomingRequestCommand
,
7 OCPP16StatusNotificationRequest
,
8 } from
'./1.6/Requests';
10 import { JsonType
} 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
, JsonType
];
18 export type IncomingRequest
= [MessageType
.CALL_MESSAGE
, string, IncomingRequestCommand
, JsonType
];
20 export type CachedRequest
= [
21 (payload
: JsonType
, requestPayload
: JsonType
) => void,
22 (error
: OCPPError
, requestStatistic
?: boolean) => void,
23 RequestCommand
| IncomingRequestCommand
,
27 export type IncomingRequestHandler
= (commandPayload
: JsonType
) => JsonType
| Promise
<JsonType
>;
29 export type ResponseType
= JsonType
| OCPPError
;
31 export interface RequestParams
{
32 skipBufferingOnError
?: boolean;
33 triggerMessage
?: boolean;
36 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
38 export type HeartbeatRequest
= OCPP16HeartbeatRequest
;
40 export type StatusNotificationRequest
= OCPP16StatusNotificationRequest
;
42 export type MeterValuesRequest
= OCPP16MeterValuesRequest
;
44 export type AvailabilityType
= OCPP16AvailabilityType
;
46 export const AvailabilityType
= {
47 ...OCPP16AvailabilityType
,
50 export type RequestCommand
= OCPP16RequestCommand
;
52 export const RequestCommand
= {
53 ...OCPP16RequestCommand
,
56 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
58 export const IncomingRequestCommand
= {
59 ...OCPP16IncomingRequestCommand
,
62 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
64 export const DiagnosticsStatus
= {
65 ...OCPP16DiagnosticsStatus
,