Improve vscode debug setup.
[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
12export type AvailabilityType = OCPP16AvailabilityType;
13
14export const AvailabilityType = {
15 ...OCPP16AvailabilityType
16};
17
18export type RequestCommand = OCPP16RequestCommand;
19
20export const RequestCommand = {
21 ...OCPP16RequestCommand
22};
23
24export type IncomingRequestCommand = OCPP16IncomingRequestCommand;
25
5b0e583f 26export type Request = [(payload?: Record<string, unknown>, requestPayload?: Record<string, unknown>) => void, (error?: OCPPError) => void, Record<string, unknown>];
6a64534b 27
690e5af7 28export type IncomingRequest = [MessageType, string, IncomingRequestCommand, Record<string, unknown>, Record<string, unknown>];