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