fix(ui): handle missing version in simulator state
[e-mobility-charging-stations-simulator.git] / ui / web / src / types / ConfigurationType.ts
index 9b74808278eca7e1ed1cb37cba3d967b50115c52..18ea267a5e16052c1e58ff4afd9ee5d5c826ba46 100644 (file)
@@ -1,11 +1,20 @@
-export type BaseConfig = {
-  uiServer: UIServerConfig;
-};
+import type { AuthenticationType, Protocol, ProtocolVersion } from './UIProtocol'
 
-type UIServerConfig = {
-  host: string;
-  port: number;
-  protocol: string;
-  username?: string;
-  password?: string;
-};
+export type ConfigurationData = {
+  uiServer: UIServerConfigurationSection | UIServerConfigurationSection[]
+}
+
+export type UIServerConfigurationSection = {
+  name?: string
+  host: string
+  port: number
+  secure?: boolean
+  protocol: Protocol
+  version: ProtocolVersion
+  authentication?: {
+    enabled: boolean
+    type: AuthenticationType
+    username?: string
+    password?: string
+  }
+}