refactor: move template firmware defaults to constants
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationInfo.ts
index fff8a1ad69e6805034807c9df1052bf4b560cf43..12327cd891b918cee810e3843f180503f0f41547 100644 (file)
@@ -1,40 +1,33 @@
-import type { ChargingStationTemplate } from './ChargingStationTemplate';
-import type { FirmwareStatus } from './ocpp/Requests';
-
-enum x509CertificateType {
-  V2GRootCertificate = 'V2GRootCertificate',
-  MORootCertificate = 'MORootCertificate',
-  CSMSRootCertificate = 'CSMSRootCertificate',
-  ManufacturerRootCertificate = 'ManufacturerRootCertificate',
-  ChargingStationCertificate = 'ChargingStationCertificate',
-  V2GCertificate = 'V2GCertificate',
-}
+import type { ChargingStationTemplate } from './ChargingStationTemplate.js'
+import type { FirmwareStatus } from './ocpp/Requests.js'
 
 export type ChargingStationInfo = Omit<
-  ChargingStationTemplate,
-  | 'AutomaticTransactionGenerator'
-  | 'Configuration'
-  | 'Connectors'
-  | 'Evses'
-  | 'power'
-  | 'powerUnit'
-  | 'chargeBoxSerialNumberPrefix'
-  | 'chargePointSerialNumberPrefix'
-  | 'meterSerialNumberPrefix'
+ChargingStationTemplate,
+| 'Connectors'
+| 'Evses'
+| 'Configuration'
+| 'AutomaticTransactionGenerator'
+| 'numberOfConnectors'
+| 'power'
+| 'powerUnit'
+| 'chargeBoxSerialNumberPrefix'
+| 'chargePointSerialNumberPrefix'
+| 'meterSerialNumberPrefix'
 > & {
-  hashId: string;
-  /** @deprecated Use hashId instead */
-  infoHash?: string;
-  chargingStationId?: string;
-  chargeBoxSerialNumber?: string;
-  chargePointSerialNumber?: string;
-  meterSerialNumber?: string;
-  maximumPower?: number; // Always in Watt
-  maximumAmperage?: number; // Always in Ampere
-  firmwareStatus?: FirmwareStatus;
-  x509Certificates?: Record<x509CertificateType, string>;
-};
+  hashId: string
+  templateIndex: number
+  templateName: string
+  /** @deprecated Use `hashId` instead. */
+  infoHash?: string
+  chargingStationId?: string
+  chargeBoxSerialNumber?: string
+  chargePointSerialNumber?: string
+  meterSerialNumber?: string
+  maximumPower?: number // Always in Watt
+  maximumAmperage?: number // Always in Ampere
+  firmwareStatus?: FirmwareStatus
+}
 
-export type ChargingStationInfoConfiguration = {
-  stationInfo?: ChargingStationInfo;
-};
+export interface ChargingStationInfoConfiguration {
+  stationInfo?: ChargingStationInfo
+}