chore: switch coding style to JS standard
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 2.0 / Requests.ts
1 import type {
2 BootReasonEnumType,
3 InstallCertificateUseEnumType,
4 OCPP20ConnectorStatusEnumType
5 } from './Common.js'
6 import type { OCPP20SetVariableDataType } from './Variables.js'
7 import type { EmptyObject } from '../../EmptyObject.js'
8 import type { JsonObject } from '../../JsonType.js'
9
10 export enum OCPP20RequestCommand {
11 BOOT_NOTIFICATION = 'BootNotification',
12 HEARTBEAT = 'Heartbeat',
13 STATUS_NOTIFICATION = 'StatusNotification'
14 }
15
16 export enum OCPP20IncomingRequestCommand {
17 CLEAR_CACHE = 'ClearCache',
18 REQUEST_START_TRANSACTION = 'RequestStartTransaction',
19 REQUEST_STOP_TRANSACTION = 'RequestStopTransaction'
20 }
21
22 type ModemType = {
23 iccid?: string
24 imsi?: string
25 } & JsonObject
26
27 type ChargingStationType = {
28 serialNumber?: string
29 model: string
30 vendorName: string
31 firmwareVersion?: string
32 modem?: ModemType
33 } & JsonObject
34
35 export type OCPP20BootNotificationRequest = {
36 reason: BootReasonEnumType
37 chargingStation: ChargingStationType
38 } & JsonObject
39
40 export type OCPP20HeartbeatRequest = EmptyObject
41
42 export type OCPP20ClearCacheRequest = EmptyObject
43
44 export type OCPP20StatusNotificationRequest = {
45 timestamp: Date
46 connectorStatus: OCPP20ConnectorStatusEnumType
47 evseId: number
48 connectorId: number
49 } & JsonObject
50
51 export type OCPP20SetVariablesRequest = {
52 setVariableData: OCPP20SetVariableDataType[]
53 } & JsonObject
54
55 export type OCPP20InstallCertificateRequest = {
56 certificateType: InstallCertificateUseEnumType
57 certificate: string
58 } & JsonObject