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