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 ResponseType
= JsonType
| OCPPError
| string;
17 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
19 export type AvailabilityType
= OCPP16AvailabilityType
;
21 export const AvailabilityType
= {
22 ...OCPP16AvailabilityType
25 export type RequestCommand
= OCPP16RequestCommand
;
27 export const RequestCommand
= {
28 ...OCPP16RequestCommand
31 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
33 export const IncomingRequestCommand
= {
34 ...OCPP16IncomingRequestCommand
37 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
39 export const DiagnosticsStatus
= {
40 ...OCPP16DiagnosticsStatus
43 export type Request
= [MessageType
, string, RequestCommand
, JsonType
, JsonType
];
45 export type IncomingRequest
= [MessageType
, string, IncomingRequestCommand
, JsonType
, JsonType
];
47 export type CachedRequest
= [(payload
: JsonType
, requestPayload
: JsonType
) => void, (error
: OCPPError
, requestStatistic
?: boolean) => void, RequestCommand
| IncomingRequestCommand
, JsonType
| OCPPError
];