Commit | Line | Data |
---|---|---|
c0560973 JB |
1 | import { OCPP16AvailabilityType, OCPP16BootNotificationRequest, OCPP16IncomingRequestCommand, OCPP16RequestCommand } from './1.6/Requests'; |
2 | ||
6a64534b JB |
3 | import { MessageType } from './MessageType'; |
4 | import OCPPError from '../../charging-station/OcppError'; | |
5 | ||
6 | export default interface Requests { | |
7 | [id: string]: Request; | |
8 | } | |
9 | ||
c0560973 JB |
10 | export type BootNotificationRequest = OCPP16BootNotificationRequest; |
11 | ||
7e3926cc | 12 | export type AvailabilityType = OCPP16AvailabilityType; |
c0560973 JB |
13 | |
14 | export const AvailabilityType = { | |
15 | ...OCPP16AvailabilityType | |
16 | }; | |
17 | ||
7e3926cc | 18 | export type RequestCommand = OCPP16RequestCommand; |
c0560973 JB |
19 | |
20 | export const RequestCommand = { | |
21 | ...OCPP16RequestCommand | |
22 | }; | |
23 | ||
7e3926cc | 24 | export type IncomingRequestCommand = OCPP16IncomingRequestCommand; |
9c13b3b5 JB |
25 | |
26 | export const IncomingRequestCommand = { | |
27 | ...OCPP16IncomingRequestCommand | |
28 | }; | |
c0560973 | 29 | |
5b0e583f | 30 | export type Request = [(payload?: Record<string, unknown>, requestPayload?: Record<string, unknown>) => void, (error?: OCPPError) => void, Record<string, unknown>]; |
6a64534b | 31 | |
690e5af7 | 32 | export type IncomingRequest = [MessageType, string, IncomingRequestCommand, Record<string, unknown>, Record<string, unknown>]; |