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