2 OCPP16AvailabilityType
,
3 OCPP16BootNotificationRequest
,
4 OCPP16HeartbeatRequest
,
5 OCPP16IncomingRequestCommand
,
7 OCPP16StatusNotificationRequest
,
8 } from
'./1.6/Requests';
10 import { JsonType
} from
'../JsonType';
11 import { MessageType
} from
'./MessageType';
12 import { OCPP16DiagnosticsStatus
} from
'./1.6/DiagnosticsStatus';
13 import { OCPP16MeterValuesRequest
} from
'./1.6/MeterValues';
14 import OCPPError from
'../../exception/OCPPError';
16 export interface RequestParams
{
17 skipBufferingOnError
?: boolean;
18 triggerMessage
?: boolean;
21 export type IncomingRequestHandler
= (commandPayload
: JsonType
) => JsonType
| Promise
<JsonType
>;
23 export type ResponseType
= JsonType
| OCPPError
| string;
25 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
27 export type HeartbeatRequest
= OCPP16HeartbeatRequest
;
29 export type StatusNotificationRequest
= OCPP16StatusNotificationRequest
;
31 export type MeterValuesRequest
= OCPP16MeterValuesRequest
;
33 export type AvailabilityType
= OCPP16AvailabilityType
;
35 export const AvailabilityType
= {
36 ...OCPP16AvailabilityType
,
39 export type RequestCommand
= OCPP16RequestCommand
;
41 export const RequestCommand
= {
42 ...OCPP16RequestCommand
,
45 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
47 export const IncomingRequestCommand
= {
48 ...OCPP16IncomingRequestCommand
,
51 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
53 export const DiagnosticsStatus
= {
54 ...OCPP16DiagnosticsStatus
,
57 export type Request
= [MessageType
, string, RequestCommand
, JsonType
, JsonType
];
59 export type IncomingRequest
= [MessageType
, string, IncomingRequestCommand
, JsonType
, JsonType
];
61 export type CachedRequest
= [
62 (payload
: JsonType
, requestPayload
: JsonType
) => void,
63 (error
: OCPPError
, requestStatistic
?: boolean) => void,
64 RequestCommand
| IncomingRequestCommand
,