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