refactor(simulator): align casing on enums between key and value
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationWorker.ts
index c27ec6eb32e3eeec4c3cd8290c3cd414502288fc..7578b217270a8e7f6342ef68c7bc90638d9efcd9 100644 (file)
@@ -1,14 +1,17 @@
 import type { WebSocket } from 'ws';
 
-import type { ChargingStationAutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
-import type { ChargingStationInfo } from './ChargingStationInfo';
-import type { ConnectorStatus } from './ConnectorStatus';
-import type { JsonObject } from './JsonType';
-import type { BootNotificationResponse } from './ocpp/Responses';
-import type { Statistics } from './Statistics';
-import { WorkerData, WorkerMessage, WorkerMessageEvents } from './Worker';
-
-export interface ChargingStationWorkerOptions extends JsonObject {
+import type {
+  BootNotificationResponse,
+  ChargingStationAutomaticTransactionGeneratorConfiguration,
+  ChargingStationInfo,
+  ChargingStationOcppConfiguration,
+  ConnectorStatus,
+  JsonObject,
+  Statistics,
+} from './internal';
+import { type WorkerData, type WorkerMessage, WorkerMessageEvents } from '../worker';
+
+interface ChargingStationWorkerOptions extends JsonObject {
   elementStartDelay?: number;
 }
 
@@ -19,23 +22,24 @@ export interface ChargingStationWorkerData extends WorkerData {
 }
 
 export interface ChargingStationData extends WorkerData {
-  stationInfo: ChargingStationInfo;
   started: boolean;
+  stationInfo: ChargingStationInfo;
+  connectors: ConnectorStatus[];
+  ocppConfiguration: ChargingStationOcppConfiguration;
   wsState?:
     | typeof WebSocket.CONNECTING
     | typeof WebSocket.OPEN
     | typeof WebSocket.CLOSING
     | typeof WebSocket.CLOSED;
-  bootNotificationResponse: BootNotificationResponse;
-  connectors: ConnectorStatus[];
+  bootNotificationResponse?: BootNotificationResponse;
   automaticTransactionGenerator?: ChargingStationAutomaticTransactionGeneratorConfiguration;
 }
 
 enum ChargingStationMessageEvents {
-  STARTED = 'started',
-  STOPPED = 'stopped',
-  UPDATED = 'updated',
-  PERFORMANCE_STATISTICS = 'performanceStatistics',
+  started = 'started',
+  stopped = 'stopped',
+  updated = 'updated',
+  performanceStatistics = 'performanceStatistics',
 }
 
 export const ChargingStationWorkerMessageEvents = {