refactor: move template firmware defaults to constants
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationInfo.ts
index 1c6415ae801ed52b0fb3c2975bf08bae64114f41..12327cd891b918cee810e3843f180503f0f41547 100644 (file)
@@ -1,24 +1,33 @@
-import ChargingStationTemplate from './ChargingStationTemplate';
+import type { ChargingStationTemplate } from './ChargingStationTemplate.js'
+import type { FirmwareStatus } from './ocpp/Requests.js'
 
-export default interface ChargingStationInfo
-  extends Omit<
-    ChargingStationTemplate,
-    | 'AutomaticTransactionGenerator'
-    | 'Configuration'
-    | 'power'
-    | 'powerUnit'
-    | 'chargeBoxSerialNumberPrefix'
-    | 'chargePointSerialNumberPrefix'
-  > {
-  infoHash?: string;
-  chargingStationId?: string;
-  chargeBoxSerialNumber?: string;
-  chargePointSerialNumber?: string;
-  meterSerialNumber?: string;
-  maximumPower?: number; // Always in Watt
-  maximumAmperage?: number; // Always in Ampere
+export type ChargingStationInfo = Omit<
+ChargingStationTemplate,
+| 'Connectors'
+| 'Evses'
+| 'Configuration'
+| 'AutomaticTransactionGenerator'
+| 'numberOfConnectors'
+| 'power'
+| 'powerUnit'
+| 'chargeBoxSerialNumberPrefix'
+| 'chargePointSerialNumberPrefix'
+| 'meterSerialNumberPrefix'
+> & {
+  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 interface ChargingStationInfoConfiguration {
-  stationInfo?: ChargingStationInfo;
+  stationInfo?: ChargingStationInfo
 }