build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / src / utils / MessageChannelUtils.ts
index 212ed5f20124c419fbf3933b6e2855dfcb482a07..36f797f5eb88feb3a9f5e0a4b6ea978b660a9f9b 100644 (file)
@@ -21,6 +21,15 @@ export const buildAddedMessage = (
   }
 }
 
+export const buildDeletedMessage = (
+  chargingStation: ChargingStation
+): ChargingStationWorkerMessage<ChargingStationData> => {
+  return {
+    event: ChargingStationWorkerMessageEvents.deleted,
+    data: buildChargingStationDataPayload(chargingStation)
+  }
+}
+
 export const buildStartedMessage = (
   chargingStation: ChargingStation
 ): ChargingStationWorkerMessage<ChargingStationData> => {
@@ -68,6 +77,7 @@ export const buildChargingStationDataPayload = (
     evses: buildEvsesStatus(chargingStation, OutputFormat.worker),
     // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
     ocppConfiguration: chargingStation.ocppConfiguration!,
+    supervisionUrl: chargingStation.wsConnectionUrl.href,
     wsState: chargingStation.wsConnection?.readyState,
     bootNotificationResponse: chargingStation.bootNotificationResponse,
     ...(chargingStation.automaticTransactionGenerator != null && {