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'; |
6a64534b JB |
5 | import OCPPError from '../../charging-station/OcppError'; |
6 | ||
7 | export default interface Requests { | |
8 | [id: string]: Request; | |
9 | } | |
10 | ||
c0560973 JB |
11 | export type BootNotificationRequest = OCPP16BootNotificationRequest; |
12 | ||
7e3926cc | 13 | export type AvailabilityType = OCPP16AvailabilityType; |
c0560973 JB |
14 | |
15 | export const AvailabilityType = { | |
16 | ...OCPP16AvailabilityType | |
17 | }; | |
18 | ||
7e3926cc | 19 | export type RequestCommand = OCPP16RequestCommand; |
c0560973 JB |
20 | |
21 | export const RequestCommand = { | |
22 | ...OCPP16RequestCommand | |
23 | }; | |
24 | ||
7e3926cc | 25 | export type IncomingRequestCommand = OCPP16IncomingRequestCommand; |
9c13b3b5 JB |
26 | |
27 | export const IncomingRequestCommand = { | |
28 | ...OCPP16IncomingRequestCommand | |
29 | }; | |
c0560973 | 30 | |
47e22477 JB |
31 | export type DiagnosticsStatus = OCPP16DiagnosticsStatus; |
32 | ||
33 | export const DiagnosticsStatus = { | |
34 | ...OCPP16DiagnosticsStatus | |
35 | }; | |
36 | ||
6e0964c8 | 37 | export type Request = [(payload: Record<string, unknown> | string, requestPayload: Record<string, unknown>) => void, (error: OCPPError) => void, Record<string, unknown>]; |
6a64534b | 38 | |
690e5af7 | 39 | export type IncomingRequest = [MessageType, string, IncomingRequestCommand, Record<string, unknown>, Record<string, unknown>]; |