Fix build due to winston types definition fix
[e-mobility-charging-stations-simulator.git] / src / types / ConfigurationData.ts
index 604e249bd37b4ad1b6dbbaabe1dff3e901b44f41..fdb83b57486d3b9a1017e254ed874533ee406e25 100644 (file)
@@ -1,18 +1,45 @@
-export interface StationTemplateURL {
+import { ServerOptions } from 'ws';
+import { StorageType } from './Storage';
+import type { WorkerChoiceStrategy } from 'poolifier';
+import { WorkerProcessType } from './Worker';
+import { level } from 'winston';
+
+export enum SupervisionUrlDistribution {
+  ROUND_ROBIN = 'round-robin',
+  RANDOM = 'random',
+  SEQUENTIAL = 'sequential',
+}
+
+export interface StationTemplateUrl {
   file: string;
   numberOfStations: number;
 }
 
+export interface UIWebSocketServerConfiguration {
+  enabled?: boolean;
+  options?: ServerOptions;
+}
+
+export interface StorageConfiguration {
+  enabled?: boolean;
+  type?: StorageType;
+  uri?: string;
+}
+
 export default interface ConfigurationData {
-  supervisionURLs?: string[];
-  stationTemplateURLs: StationTemplateURL[];
-  statisticsDisplayInterval?: number;
-  connectionTimeout?: number;
+  supervisionUrls?: string | string[];
+  supervisionUrlDistribution?: SupervisionUrlDistribution;
+  stationTemplateUrls: StationTemplateUrl[];
+  uiWebSocketServer?: UIWebSocketServerConfiguration;
+  performanceStorage?: StorageConfiguration;
   autoReconnectMaxRetries?: number;
-  distributeStationsToTenantsEqually?: boolean;
-  useWorkerPool?: boolean;
-  workerMaxPoolSize?: number;
+  workerProcess?: WorkerProcessType;
+  workerStartDelay?: number;
+  workerPoolMinSize?: number;
+  workerPoolMaxSize?: number;
+  workerPoolStrategy?: WorkerChoiceStrategy;
   chargingStationsPerWorker?: number;
+  logStatisticsInterval?: number;
   logFormat?: string;
   logLevel?: string;
   logRotate?: boolean;