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