docs: add code comment
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 2.0 / Common.ts
index 5e47a2512cbdc4eebe78ab019bb993f969a62ca1..e9226961476457e705bb86e782d8e44fc6d9aaa4 100644 (file)
@@ -1,4 +1,18 @@
-import type { JsonObject } from '../../internal';
+import type { JsonObject } from '../../JsonType';
+import type { GenericStatus } from '../Common';
+
+export enum DataEnumType {
+  // eslint-disable-next-line id-blacklist
+  string = 'string',
+  decimal = 'decimal',
+  integer = 'integer',
+  dateTime = 'dateTime',
+  // eslint-disable-next-line id-blacklist
+  boolean = 'boolean',
+  OptionList = 'OptionList',
+  SequenceList = 'SequenceList',
+  MemberList = 'MemberList',
+}
 
 export enum BootReasonEnumType {
   ApplicationReset = 'ApplicationReset',
@@ -12,14 +26,97 @@ export enum BootReasonEnumType {
   Watchdog = 'Watchdog',
 }
 
+export enum OperationalStatusEnumType {
+  Operative = 'Operative',
+  Inoperative = 'Inoperative',
+}
+
 export enum OCPP20ConnectorStatusEnumType {
-  AVAILABLE = 'Available',
-  OCCUPIED = 'Occupied',
-  RESERVED = 'Reserved',
-  UNAVAILABLE = 'Unavailable',
-  FAULTED = 'Faulted',
+  Available = 'Available',
+  Occupied = 'Occupied',
+  Reserved = 'Reserved',
+  Unavailable = 'Unavailable',
+  Faulted = 'Faulted',
+}
+
+export type GenericStatusEnumType = GenericStatus;
+
+export enum HashAlgorithmEnumType {
+  SHA256 = 'SHA256',
+  SHA384 = 'SHA384',
+  SHA512 = 'SHA512',
+}
+
+export enum GetCertificateIdUseEnumType {
+  V2GRootCertificate = 'V2GRootCertificate',
+  MORootCertificate = 'MORootCertificate',
+  CSMSRootCertificate = 'CSMSRootCertificate',
+  V2GCertificateChain = 'V2GCertificateChain',
+  ManufacturerRootCertificate = 'ManufacturerRootCertificate',
+}
+
+export enum GetCertificateStatusEnumType {
+  Accepted = 'Accepted',
+  Failed = 'Failed',
+}
+
+export enum GetInstalledCertificateStatusEnumType {
+  Accepted = 'Accepted',
+  NotFound = 'NotFound',
+}
+
+export enum InstallCertificateStatusEnumType {
+  Accepted = 'Accepted',
+  Rejected = 'Rejected',
+  Failed = 'Failed',
 }
 
+export enum InstallCertificateUseEnumType {
+  V2GRootCertificate = 'V2GRootCertificate',
+  MORootCertificate = 'MORootCertificate',
+  CSMSRootCertificate = 'CSMSRootCertificate',
+  ManufacturerRootCertificate = 'ManufacturerRootCertificate',
+}
+
+export enum DeleteCertificateStatusEnumType {
+  Accepted = 'Accepted',
+  Failed = 'Failed',
+  NotFound = 'NotFound',
+}
+
+export enum CertificateActionEnumType {
+  Install = 'Install',
+  Update = 'Update',
+}
+
+export enum CertificateSigningUseEnumType {
+  ChargingStationCertificate = 'ChargingStationCertificate',
+  V2GCertificate = 'V2GCertificate',
+}
+
+export type CertificateSignedStatusEnumType = GenericStatusEnumType;
+
+export type CertificateHashDataType = {
+  hashAlgorithm: HashAlgorithmEnumType;
+  issuerNameHash: string;
+  issuerKeyHash: string;
+  serialNumber: string;
+} & JsonObject;
+
+export type CertificateHashDataChainType = {
+  certificateType: GetCertificateIdUseEnumType;
+  certificateHashData: CertificateHashDataType;
+  childCertificateHashData?: CertificateHashDataType;
+} & JsonObject;
+
+export type OCSPRequestDataType = {
+  hashAlgorithm: HashAlgorithmEnumType;
+  issuerNameHash: string;
+  issuerKeyHash: string;
+  serialNumber: string;
+  responderURL: string;
+} & JsonObject;
+
 export type StatusInfoType = {
   reasonCode: string;
   additionalInfo?: string;