refactor(simulator): switch to internal modules export/import design
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 2.0 / Requests.ts
1 import type { EmptyObject, JsonObject } from '../../internal';
2
3 export enum OCPP20RequestCommand {
4 BOOT_NOTIFICATION = 'BootNotification',
5 HEARTBEAT = 'Heartbeat',
6 STATUS_NOTIFICATION = 'StatusNotification',
7 }
8
9 export enum OCPP20IncomingRequestCommand {
10 CLEAR_CACHE = 'ClearCache',
11 REQUEST_START_TRANSACTION = 'RequestStartTransaction',
12 REQUEST_STOP_TRANSACTION = 'RequestStopTransaction',
13 }
14
15 export enum BootReasonEnumType {
16 ApplicationReset = 'ApplicationReset',
17 FirmwareUpdate = 'FirmwareUpdate',
18 LocalReset = 'LocalReset',
19 PowerUp = 'PowerUp',
20 RemoteReset = 'RemoteReset',
21 ScheduledReset = 'ScheduledReset',
22 Triggered = 'Triggered',
23 Unknown = 'Unknown',
24 Watchdog = 'Watchdog',
25 }
26
27 export type ModemType = {
28 iccid?: string;
29 imsi?: string;
30 } & JsonObject;
31
32 export type ChargingStationType = {
33 serialNumber?: string;
34 model: string;
35 vendorName: string;
36 firmwareVersion?: string;
37 modem?: ModemType;
38 } & JsonObject;
39
40 export type OCPP20BootNotificationRequest = {
41 reason: BootReasonEnumType;
42 chargingStation: ChargingStationType;
43 } & JsonObject;
44
45 export type OCPP20HeartbeatRequest = EmptyObject;
46
47 export type OCPP20ClearCacheRequest = EmptyObject;
48
49 export enum OCPP20ConnectorStatusEnumType {
50 AVAILABLE = 'Available',
51 OCCUPIED = 'Occupied',
52 RESERVED = 'Reserved',
53 UNAVAILABLE = 'Unavailable',
54 FAULTED = 'Faulted',
55 }
56
57 export type OCPP20StatusNotificationRequest = {
58 timestamp: Date;
59 connectorStatus: OCPP20ConnectorStatusEnumType;
60 evseId: number;
61 connectorId: number;
62 } & JsonObject;