feat(simulator): add certificates related OCPP 2.x types
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 2.0 / Common.ts
CommitLineData
6b635033
JB
1import type { GenericStatus, JsonObject } from '../../internal';
2
3export enum DataEnumType {
4 // eslint-disable-next-line id-blacklist
5 string = 'string',
6 decimal = 'decimal',
7 integer = 'integer',
8 dateTime = 'dateTime',
9 // eslint-disable-next-line id-blacklist
10 boolean = 'boolean',
11 OptionList = 'OptionList',
12 SequenceList = 'SequenceList',
13 MemberList = 'MemberList',
14}
28f1c574
JB
15
16export enum BootReasonEnumType {
17 ApplicationReset = 'ApplicationReset',
18 FirmwareUpdate = 'FirmwareUpdate',
19 LocalReset = 'LocalReset',
20 PowerUp = 'PowerUp',
21 RemoteReset = 'RemoteReset',
22 ScheduledReset = 'ScheduledReset',
23 Triggered = 'Triggered',
24 Unknown = 'Unknown',
25 Watchdog = 'Watchdog',
26}
27
28export enum OCPP20ConnectorStatusEnumType {
29 AVAILABLE = 'Available',
30 OCCUPIED = 'Occupied',
31 RESERVED = 'Reserved',
32 UNAVAILABLE = 'Unavailable',
33 FAULTED = 'Faulted',
34}
35
6b635033
JB
36export type GenericStatusEnumType = GenericStatus;
37
38export enum HashAlgorithmEnumType {
39 SHA256 = 'SHA256',
40 SHA384 = 'SHA384',
41 SHA512 = 'SHA512',
42}
43
44export enum GetCertificateIdUseEnumType {
45 V2GRootCertificate = 'V2GRootCertificate',
46 MORootCertificate = 'MORootCertificate',
47 CSMSRootCertificate = 'CSMSRootCertificate',
48 V2GCertificateChain = 'V2GCertificateChain',
49 ManufacturerRootCertificate = 'ManufacturerRootCertificate',
50}
51
52export enum GetCertificateStatusEnumType {
53 Accepted = 'Accepted',
54 Failed = 'Failed',
55}
56
57export enum GetInstalledCertificateStatusEnumType {
58 Accepted = 'Accepted',
59 NotFound = 'NotFound',
60}
61
62export enum InstallCertificateStatusEnumType {
63 Accepted = 'Accepted',
64 Rejected = 'Rejected',
65 Failed = 'Failed',
66}
67
68export enum InstallCertificateUseEnumType {
69 V2GRootCertificate = 'V2GRootCertificate',
70 MORootCertificate = 'MORootCertificate',
71 CSMSRootCertificate = 'CSMSRootCertificate',
72 ManufacturerRootCertificate = 'ManufacturerRootCertificate',
73}
74
75export enum DeleteCertificateStatusEnumType {
76 Accepted = 'Accepted',
77 Failed = 'Failed',
78 NotFound = 'NotFound',
79}
80
81export enum CertificateActionEnumType {
82 Install = 'Install',
83 Update = 'Update',
84}
85
86export enum CertificateSigningUseEnumType {
87 ChargingStationCertificate = 'ChargingStationCertificate',
88 V2GCertificate = 'V2GCertificate',
89}
90
91export type CertificateSignedStatusEnumType = GenericStatus;
92
93export type CertificateHashDataType = {
94 hashAlgorithm: HashAlgorithmEnumType;
95 issuerNameHash: string;
96 issuerKeyHash: string;
97 serialNumber: string;
98} & JsonObject;
99
100export type CertificateHashDataChainType = {
101 certificateType: GetCertificateIdUseEnumType;
102 certificateHashData: CertificateHashDataType;
103 childCertificateHashData?: CertificateHashDataType;
104} & JsonObject;
105
106export type OCSPRequestDataType = {
107 hashAlgorithm: HashAlgorithmEnumType;
108 issuerNameHash: string;
109 issuerKeyHash: string;
110 serialNumber: string;
111 responderURL: string;
112} & JsonObject;
113
28f1c574
JB
114export type StatusInfoType = {
115 reasonCode: string;
116 additionalInfo?: string;
117} & JsonObject;
118
119export type EVSEType = {
120 id: number;
121 connectorId?: string;
122} & JsonObject;