1 import { OCPP16AvailabilityType
, OCPP16BootNotificationRequest
, OCPP16IncomingRequestCommand
, OCPP16RequestCommand
} from
'./1.6/Requests';
3 import { MessageType
} from
'./MessageType';
4 import { OCPP16DiagnosticsStatus
} from
'./1.6/DiagnosticsStatus';
5 import OCPPError from
'../../exception/OCPPError';
7 export type IncomingRequestHandler
= (commandPayload
: Record
<string, unknown
>) => Record
<string, unknown
> | Promise
<Record
<string, unknown
>>;
9 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
11 export type AvailabilityType
= OCPP16AvailabilityType
;
13 export const AvailabilityType
= {
14 ...OCPP16AvailabilityType
17 export type RequestCommand
= OCPP16RequestCommand
;
19 export const RequestCommand
= {
20 ...OCPP16RequestCommand
23 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
25 export const IncomingRequestCommand
= {
26 ...OCPP16IncomingRequestCommand
29 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
31 export const DiagnosticsStatus
= {
32 ...OCPP16DiagnosticsStatus
35 export type Request
= [MessageType
, string, RequestCommand
, Record
<string, unknown
>, Record
<string, unknown
>];
37 export type IncomingRequest
= [MessageType
, string, IncomingRequestCommand
, Record
<string, unknown
>, Record
<string, unknown
>];
39 export type CachedRequest
= [(payload
: Record
<string, unknown
> | string, requestPayload
: Record
<string, unknown
>) => void, (error
: OCPPError
, requestStatistic
?: boolean) => void, RequestCommand
| IncomingRequestCommand
, Record
<string, unknown
>];