Switch log messages to string literal
[e-mobility-charging-stations-simulator.git] / ui / web / src / types / ChargingStationType.ts
index a3f9931c2387cdcee226dcdddfb3d5d6c27dad4a..2446839275a6f9f115d95be1e41e7a1ac6e54060 100644 (file)
@@ -18,6 +18,7 @@ export type ChargingStationInfo = {
   chargingStationId?: string;
   chargePointModel: string;
   chargePointVendor: string;
+  firmwareVersionPattern?: string;
   firmwareVersion?: string;
   numberOfConnectors?: number | number[];
   baseName: string;
@@ -67,6 +68,7 @@ export type ChargingStationInfo = {
   phaseLineToLineVoltageMeterValues?: boolean;
   customValueLimitationMeterValues?: boolean;
   commandsSupport?: CommandsSupport;
+  messageTriggerSupport?: Record<MessageTrigger, boolean>;
 };
 
 export enum OCPP16IncomingRequestCommand {
@@ -84,11 +86,10 @@ export enum OCPP16IncomingRequestCommand {
   TRIGGER_MESSAGE = 'TriggerMessage',
 }
 
-export type IncomingRequestCommand = OCPP16IncomingRequestCommand;
-
 export const IncomingRequestCommand = {
   ...OCPP16IncomingRequestCommand,
-};
+} as const;
+export type IncomingRequestCommand = OCPP16IncomingRequestCommand;
 
 export enum OCPP16RequestCommand {
   BOOT_NOTIFICATION = 'BootNotification',
@@ -101,11 +102,10 @@ export enum OCPP16RequestCommand {
   DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification',
 }
 
-export type RequestCommand = OCPP16RequestCommand;
-
 export const RequestCommand = {
   ...OCPP16RequestCommand,
-};
+} as const;
+export type RequestCommand = OCPP16RequestCommand;
 
 export type BootNotificationResponse = OCPP16BootNotificationResponse;
 
@@ -117,10 +117,24 @@ export enum OCPP16RegistrationStatus {
 
 export interface OCPP16BootNotificationResponse extends JsonObject {
   status: OCPP16RegistrationStatus;
-  currentTime: string;
+  currentTime: Date;
   interval: number;
 }
 
+export enum OCPP16MessageTrigger {
+  BootNotification = 'BootNotification',
+  DiagnosticsStatusNotification = 'DiagnosticsStatusNotification',
+  FirmwareStatusNotification = 'FirmwareStatusNotification',
+  Heartbeat = 'Heartbeat',
+  MeterValues = 'MeterValues',
+  StatusNotification = 'StatusNotification',
+}
+
+export const MessageTrigger = {
+  ...OCPP16MessageTrigger,
+} as const;
+export type MessageTrigger = OCPP16MessageTrigger;
+
 type CommandsSupport = {
   incomingCommands: Record<IncomingRequestCommand, boolean>;
   outgoingCommands?: Record<RequestCommand, boolean>;
@@ -132,7 +146,6 @@ export enum OCPPVersion {
 }
 
 export enum OCPPProtocol {
-  SOAP = 'soap',
   JSON = 'json',
 }