1 import { OCPP16AvailabilityType
, OCPP16BootNotificationRequest
, OCPP16IncomingRequestCommand
, OCPP16RequestCommand
} from
'./1.6/Requests';
3 import { JsonType
} from
'../JsonType';
4 import { MessageType
} from
'./MessageType';
5 import { OCPP16DiagnosticsStatus
} from
'./1.6/DiagnosticsStatus';
6 import OCPPError from
'../../exception/OCPPError';
8 export interface SendParams
{
9 skipBufferingOnError
?: boolean,
10 triggerMessage
?: boolean
13 export type IncomingRequestHandler
= (commandPayload
: JsonType
) => JsonType
| Promise
<JsonType
>;
15 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
17 export type AvailabilityType
= OCPP16AvailabilityType
;
19 export const AvailabilityType
= {
20 ...OCPP16AvailabilityType
23 export type RequestCommand
= OCPP16RequestCommand
;
25 export const RequestCommand
= {
26 ...OCPP16RequestCommand
29 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
31 export const IncomingRequestCommand
= {
32 ...OCPP16IncomingRequestCommand
35 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
37 export const DiagnosticsStatus
= {
38 ...OCPP16DiagnosticsStatus
41 export type Request
= [MessageType
, string, RequestCommand
, JsonType
, JsonType
];
43 export type IncomingRequest
= [MessageType
, string, IncomingRequestCommand
, JsonType
, JsonType
];
45 export type CachedRequest
= [(payload
: JsonType
, requestPayload
: JsonType
) => void, (error
: OCPPError
, requestStatistic
?: boolean) => void, RequestCommand
| IncomingRequestCommand
, JsonType
| OCPPError
];