2 OCPP16AvailabilityType
,
3 OCPP16BootNotificationRequest
,
4 OCPP16IncomingRequestCommand
,
6 } from
'./1.6/Requests';
8 import { JsonType
} from
'../JsonType';
9 import { MessageType
} from
'./MessageType';
10 import { OCPP16DiagnosticsStatus
} from
'./1.6/DiagnosticsStatus';
11 import OCPPError from
'../../exception/OCPPError';
13 export interface SendParams
{
14 skipBufferingOnError
?: boolean;
15 triggerMessage
?: boolean;
18 export type IncomingRequestHandler
= (commandPayload
: JsonType
) => JsonType
| Promise
<JsonType
>;
20 export type ResponseType
= JsonType
| OCPPError
| string;
22 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
24 export type AvailabilityType
= OCPP16AvailabilityType
;
26 export const AvailabilityType
= {
27 ...OCPP16AvailabilityType
,
30 export type RequestCommand
= OCPP16RequestCommand
;
32 export const RequestCommand
= {
33 ...OCPP16RequestCommand
,
36 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
38 export const IncomingRequestCommand
= {
39 ...OCPP16IncomingRequestCommand
,
42 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
44 export const DiagnosticsStatus
= {
45 ...OCPP16DiagnosticsStatus
,
48 export type Request
= [MessageType
, string, RequestCommand
, JsonType
, JsonType
];
50 export type IncomingRequest
= [MessageType
, string, IncomingRequestCommand
, JsonType
, JsonType
];
52 export type CachedRequest
= [
53 (payload
: JsonType
, requestPayload
: JsonType
) => void,
54 (error
: OCPPError
, requestStatistic
?: boolean) => void,
55 RequestCommand
| IncomingRequestCommand
,