refactor: cleanup reservation handling code
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationTemplate.ts
index 5c44ede928435031caf6d445fdaf03a0f7602e62..10f9733fbe2f595a684c5a460babb29be13c7ae5 100644 (file)
@@ -1,10 +1,11 @@
-import type { ClientRequestArgs } from 'http';
+import type { ClientRequestArgs } from 'node:http';
 
 import type { ClientOptions } from 'ws';
 
 import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
 import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration';
 import type { ConnectorStatus } from './ConnectorStatus';
+import type { EvseTemplate } from './Evse';
 import type { OCPPProtocol } from './ocpp/OCPPProtocol';
 import type { OCPPVersion } from './ocpp/OCPPVersion';
 import type {
@@ -54,6 +55,15 @@ type CommandsSupport = {
   outgoingCommands?: Record<RequestCommand, boolean>;
 };
 
+enum x509CertificateType {
+  V2GRootCertificate = 'V2GRootCertificate',
+  MORootCertificate = 'MORootCertificate',
+  CSMSRootCertificate = 'CSMSRootCertificate',
+  ManufacturerRootCertificate = 'ManufacturerRootCertificate',
+  ChargingStationCertificate = 'ChargingStationCertificate',
+  V2GCertificate = 'V2GCertificate',
+}
+
 export type ChargingStationTemplate = {
   templateHash?: string;
   supervisionUrls?: string | string[];
@@ -66,8 +76,9 @@ export type ChargingStationTemplate = {
   ocppStrictCompliance?: boolean;
   ocppPersistentConfiguration?: boolean;
   stationInfoPersistentConfiguration?: boolean;
+  automaticTransactionGeneratorPersistentConfiguration?: boolean;
   wsOptions?: WsOptions;
-  authorizationFile?: string;
+  idTagsFile?: string;
   baseName: string;
   nameSuffix?: string;
   fixedName?: boolean;
@@ -112,5 +123,7 @@ export type ChargingStationTemplate = {
   messageTriggerSupport?: Record<MessageTrigger, boolean>;
   Configuration?: ChargingStationOcppConfiguration;
   AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration;
-  Connectors: Record<string, ConnectorStatus>;
+  Evses?: Record<string, EvseTemplate>;
+  Connectors?: Record<string, ConnectorStatus>;
+  x509Certificates?: Record<x509CertificateType, string>;
 };