refactor: cleanup reservation handling code
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationTemplate.ts
index 23644c7faa86d146867df651a2717a1ba57d9367..10f9733fbe2f595a684c5a460babb29be13c7ae5 100644 (file)
@@ -2,18 +2,18 @@ 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 {
-  AutomaticTransactionGeneratorConfiguration,
-  ChargingStationOcppConfiguration,
-  ConnectorStatus,
-  EvseTemplate,
   FirmwareStatus,
   IncomingRequestCommand,
   MessageTrigger,
-  OCPPProtocol,
-  OCPPVersion,
   RequestCommand,
-} from './internal';
+} from './ocpp/Requests';
 
 export enum CurrentType {
   AC = 'AC',
@@ -55,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[];
@@ -67,6 +76,7 @@ export type ChargingStationTemplate = {
   ocppStrictCompliance?: boolean;
   ocppPersistentConfiguration?: boolean;
   stationInfoPersistentConfiguration?: boolean;
+  automaticTransactionGeneratorPersistentConfiguration?: boolean;
   wsOptions?: WsOptions;
   idTagsFile?: string;
   baseName: string;
@@ -115,4 +125,5 @@ export type ChargingStationTemplate = {
   AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration;
   Evses?: Record<string, EvseTemplate>;
   Connectors?: Record<string, ConnectorStatus>;
+  x509Certificates?: Record<x509CertificateType, string>;
 };