Fix power unit in kW handling in charging station template
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / Requests.ts
... / ...
CommitLineData
1import { OCPP16AvailabilityType, OCPP16BootNotificationRequest, OCPP16IncomingRequestCommand, OCPP16RequestCommand } from './1.6/Requests';
2
3import { MessageType } from './MessageType';
4import OCPPError from '../../charging-station/OcppError';
5
6export default interface Requests {
7 [id: string]: Request;
8}
9
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
26export const IncomingRequestCommand = {
27 ...OCPP16IncomingRequestCommand
28};
29
30export type Request = [(payload: Record<string, unknown> | string, requestPayload: Record<string, unknown>) => void, (error: OCPPError) => void, Record<string, unknown>];
31
32export type IncomingRequest = [MessageType, string, IncomingRequestCommand, Record<string, unknown>, Record<string, unknown>];