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