refactor: more coding style fixes
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 2.0 / Common.ts
CommitLineData
66a7748d
JB
1import type { JsonObject } from '../../JsonType.js'
2import type { GenericStatus } from '../Common.js'
6b635033
JB
3
4export enum DataEnumType {
6b635033
JB
5 string = 'string',
6 decimal = 'decimal',
7 integer = 'integer',
8 dateTime = 'dateTime',
6b635033
JB
9 boolean = 'boolean',
10 OptionList = 'OptionList',
11 SequenceList = 'SequenceList',
a807045b 12 MemberList = 'MemberList',
6b635033 13}
28f1c574
JB
14
15export 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',
a807045b 24 Watchdog = 'Watchdog',
28f1c574
JB
25}
26
2585c6e9
JB
27export enum OperationalStatusEnumType {
28 Operative = 'Operative',
a807045b 29 Inoperative = 'Inoperative',
2585c6e9
JB
30}
31
28f1c574 32export enum OCPP20ConnectorStatusEnumType {
721646e9
JB
33 Available = 'Available',
34 Occupied = 'Occupied',
35 Reserved = 'Reserved',
36 Unavailable = 'Unavailable',
a807045b 37 Faulted = 'Faulted',
28f1c574
JB
38}
39
66a7748d 40export type GenericStatusEnumType = GenericStatus
6b635033
JB
41
42export enum HashAlgorithmEnumType {
43 SHA256 = 'SHA256',
44 SHA384 = 'SHA384',
a807045b 45 SHA512 = 'SHA512',
6b635033
JB
46}
47
48export enum GetCertificateIdUseEnumType {
49 V2GRootCertificate = 'V2GRootCertificate',
50 MORootCertificate = 'MORootCertificate',
51 CSMSRootCertificate = 'CSMSRootCertificate',
52 V2GCertificateChain = 'V2GCertificateChain',
a807045b 53 ManufacturerRootCertificate = 'ManufacturerRootCertificate',
6b635033
JB
54}
55
56export enum GetCertificateStatusEnumType {
57 Accepted = 'Accepted',
a807045b 58 Failed = 'Failed',
6b635033
JB
59}
60
61export enum GetInstalledCertificateStatusEnumType {
62 Accepted = 'Accepted',
a807045b 63 NotFound = 'NotFound',
6b635033
JB
64}
65
66export enum InstallCertificateStatusEnumType {
67 Accepted = 'Accepted',
68 Rejected = 'Rejected',
a807045b 69 Failed = 'Failed',
6b635033
JB
70}
71
72export enum InstallCertificateUseEnumType {
73 V2GRootCertificate = 'V2GRootCertificate',
74 MORootCertificate = 'MORootCertificate',
75 CSMSRootCertificate = 'CSMSRootCertificate',
a807045b 76 ManufacturerRootCertificate = 'ManufacturerRootCertificate',
6b635033
JB
77}
78
79export enum DeleteCertificateStatusEnumType {
80 Accepted = 'Accepted',
81 Failed = 'Failed',
a807045b 82 NotFound = 'NotFound',
6b635033
JB
83}
84
85export enum CertificateActionEnumType {
86 Install = 'Install',
a807045b 87 Update = 'Update',
6b635033
JB
88}
89
90export enum CertificateSigningUseEnumType {
91 ChargingStationCertificate = 'ChargingStationCertificate',
a807045b 92 V2GCertificate = 'V2GCertificate',
6b635033
JB
93}
94
66a7748d 95export type CertificateSignedStatusEnumType = GenericStatusEnumType
6b635033
JB
96
97export type CertificateHashDataType = {
66a7748d
JB
98 hashAlgorithm: HashAlgorithmEnumType
99 issuerNameHash: string
100 issuerKeyHash: string
101 serialNumber: string
102} & JsonObject
6b635033
JB
103
104export type CertificateHashDataChainType = {
66a7748d
JB
105 certificateType: GetCertificateIdUseEnumType
106 certificateHashData: CertificateHashDataType
107 childCertificateHashData?: CertificateHashDataType
108} & JsonObject
6b635033
JB
109
110export type OCSPRequestDataType = {
66a7748d
JB
111 hashAlgorithm: HashAlgorithmEnumType
112 issuerNameHash: string
113 issuerKeyHash: string
114 serialNumber: string
115 responderURL: string
116} & JsonObject
6b635033 117
28f1c574 118export type StatusInfoType = {
66a7748d
JB
119 reasonCode: string
120 additionalInfo?: string
121} & JsonObject
28f1c574
JB
122
123export type EVSEType = {
66a7748d
JB
124 id: number
125 connectorId?: string
126} & JsonObject