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