Commit | Line | Data |
---|---|---|
c0560973 JB |
1 | import { OCPP16AvailabilityType, OCPP16BootNotificationRequest, OCPP16IncomingRequestCommand, OCPP16RequestCommand } from './1.6/Requests'; |
2 | ||
d1888640 | 3 | import { JsonType } from '../JsonType'; |
6a64534b | 4 | import { MessageType } from './MessageType'; |
47e22477 | 5 | import { OCPP16DiagnosticsStatus } from './1.6/DiagnosticsStatus'; |
e58068fd | 6 | import OCPPError from '../../exception/OCPPError'; |
6a64534b | 7 | |
caad9d6b JB |
8 | export interface SendParams { |
9 | skipBufferingOnError?: boolean, | |
10 | triggerMessage?: boolean | |
11 | } | |
12 | ||
d1888640 | 13 | export type IncomingRequestHandler = (commandPayload: JsonType) => JsonType | Promise<JsonType>; |
58144adb | 14 | |
c0560973 JB |
15 | export type BootNotificationRequest = OCPP16BootNotificationRequest; |
16 | ||
7e3926cc | 17 | export type AvailabilityType = OCPP16AvailabilityType; |
c0560973 JB |
18 | |
19 | export const AvailabilityType = { | |
20 | ...OCPP16AvailabilityType | |
21 | }; | |
22 | ||
7e3926cc | 23 | export type RequestCommand = OCPP16RequestCommand; |
c0560973 JB |
24 | |
25 | export const RequestCommand = { | |
26 | ...OCPP16RequestCommand | |
27 | }; | |
28 | ||
7e3926cc | 29 | export type IncomingRequestCommand = OCPP16IncomingRequestCommand; |
9c13b3b5 JB |
30 | |
31 | export const IncomingRequestCommand = { | |
32 | ...OCPP16IncomingRequestCommand | |
33 | }; | |
c0560973 | 34 | |
47e22477 JB |
35 | export type DiagnosticsStatus = OCPP16DiagnosticsStatus; |
36 | ||
37 | export const DiagnosticsStatus = { | |
38 | ...OCPP16DiagnosticsStatus | |
39 | }; | |
40 | ||
d1888640 | 41 | export type Request = [MessageType, string, RequestCommand, JsonType, JsonType]; |
6a64534b | 42 | |
d1888640 | 43 | export type IncomingRequest = [MessageType, string, IncomingRequestCommand, JsonType, JsonType]; |
32b02249 | 44 | |
d1888640 | 45 | export type CachedRequest = [(payload: JsonType, requestPayload: JsonType) => void, (error: OCPPError, requestStatistic?: boolean) => void, RequestCommand | IncomingRequestCommand, JsonType | OCPPError]; |