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