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 interface SendParams
{
8 skipBufferingOnError
?: boolean,
9 triggerMessage
?: boolean
12 export type IncomingRequestHandler
= (commandPayload
: Record
<string, unknown
>) => Record
<string, unknown
> | Promise
<Record
<string, unknown
>>;
14 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
16 export type AvailabilityType
= OCPP16AvailabilityType
;
18 export const AvailabilityType
= {
19 ...OCPP16AvailabilityType
22 export type RequestCommand
= OCPP16RequestCommand
;
24 export const RequestCommand
= {
25 ...OCPP16RequestCommand
28 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
30 export const IncomingRequestCommand
= {
31 ...OCPP16IncomingRequestCommand
34 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
36 export const DiagnosticsStatus
= {
37 ...OCPP16DiagnosticsStatus
40 export type Request
= [MessageType
, string, RequestCommand
, Record
<string, unknown
>, Record
<string, unknown
>];
42 export type IncomingRequest
= [MessageType
, string, IncomingRequestCommand
, Record
<string, unknown
>, Record
<string, unknown
>];
44 export type CachedRequest
= [(payload
: Record
<string, unknown
> | string, requestPayload
: Record
<string, unknown
>) => void, (error
: OCPPError
, requestStatistic
?: boolean) => void, RequestCommand
| IncomingRequestCommand
, Record
<string, unknown
>];