feat: add initial support for evse definition in template
[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
2585c6e9
JB
28export enum OperationalStatusEnumType {
29 Operative = 'Operative',
30 Inoperative = 'Inoperative',
31}
32
28f1c574 33export enum OCPP20ConnectorStatusEnumType {
721646e9
JB
34 Available = 'Available',
35 Occupied = 'Occupied',
36 Reserved = 'Reserved',
37 Unavailable = 'Unavailable',
38 Faulted = 'Faulted',
28f1c574
JB
39}
40
6b635033
JB
41export type GenericStatusEnumType = GenericStatus;
42
43export enum HashAlgorithmEnumType {
44 SHA256 = 'SHA256',
45 SHA384 = 'SHA384',
46 SHA512 = 'SHA512',
47}
48
49export enum GetCertificateIdUseEnumType {
50 V2GRootCertificate = 'V2GRootCertificate',
51 MORootCertificate = 'MORootCertificate',
52 CSMSRootCertificate = 'CSMSRootCertificate',
53 V2GCertificateChain = 'V2GCertificateChain',
54 ManufacturerRootCertificate = 'ManufacturerRootCertificate',
55}
56
57export enum GetCertificateStatusEnumType {
58 Accepted = 'Accepted',
59 Failed = 'Failed',
60}
61
62export enum GetInstalledCertificateStatusEnumType {
63 Accepted = 'Accepted',
64 NotFound = 'NotFound',
65}
66
67export enum InstallCertificateStatusEnumType {
68 Accepted = 'Accepted',
69 Rejected = 'Rejected',
70 Failed = 'Failed',
71}
72
73export enum InstallCertificateUseEnumType {
74 V2GRootCertificate = 'V2GRootCertificate',
75 MORootCertificate = 'MORootCertificate',
76 CSMSRootCertificate = 'CSMSRootCertificate',
77 ManufacturerRootCertificate = 'ManufacturerRootCertificate',
78}
79
80export enum DeleteCertificateStatusEnumType {
81 Accepted = 'Accepted',
82 Failed = 'Failed',
83 NotFound = 'NotFound',
84}
85
86export enum CertificateActionEnumType {
87 Install = 'Install',
88 Update = 'Update',
89}
90
91export enum CertificateSigningUseEnumType {
92 ChargingStationCertificate = 'ChargingStationCertificate',
93 V2GCertificate = 'V2GCertificate',
94}
95
96export type CertificateSignedStatusEnumType = GenericStatus;
97
98export type CertificateHashDataType = {
99 hashAlgorithm: HashAlgorithmEnumType;
100 issuerNameHash: string;
101 issuerKeyHash: string;
102 serialNumber: string;
103} & JsonObject;
104
105export type CertificateHashDataChainType = {
106 certificateType: GetCertificateIdUseEnumType;
107 certificateHashData: CertificateHashDataType;
108 childCertificateHashData?: CertificateHashDataType;
109} & JsonObject;
110
111export type OCSPRequestDataType = {
112 hashAlgorithm: HashAlgorithmEnumType;
113 issuerNameHash: string;
114 issuerKeyHash: string;
115 serialNumber: string;
116 responderURL: string;
117} & JsonObject;
118
28f1c574
JB
119export type StatusInfoType = {
120 reasonCode: string;
121 additionalInfo?: string;
122} & JsonObject;
123
124export type EVSEType = {
125 id: number;
126 connectorId?: string;
127} & JsonObject;