UI protocol: move Insomnia requests collection to its own directory
[e-mobility-charging-stations-simulator.git] / src / types / WorkerBroadcastChannel.ts
index 65c431404a44d2e842f56c12784a9613a49ea4e3..788f7d68f864c63f3dce8f88e558d3fc6c94e496 100644 (file)
@@ -16,27 +16,18 @@ export enum BroadcastChannelProcedureName {
   STOP_TRANSACTION = 'stopTransaction',
   START_AUTOMATIC_TRANSACTION_GENERATOR = 'startAutomaticTransactionGenerator',
   STOP_AUTOMATIC_TRANSACTION_GENERATOR = 'stopAutomaticTransactionGenerator',
+  STATUS_NOTIFICATION = 'statusNotification',
+  HEARTBEAT = 'heartbeat',
 }
 
-interface BaseBroadcastChannelRequestPayload extends Omit<RequestPayload, 'hashId' | 'hashIds'> {
+export interface BroadcastChannelRequestPayload extends RequestPayload {
   connectorId?: number;
   transactionId?: number;
   idTag?: string;
 }
 
-interface HashIdBroadcastChannelRequestPayload extends BaseBroadcastChannelRequestPayload {
-  hashId: string;
-}
-
-interface HashIdsBroadcastChannelRequestPayload extends BaseBroadcastChannelRequestPayload {
-  hashIds: string[];
-}
-
-export type BroadcastChannelRequestPayload =
-  | HashIdBroadcastChannelRequestPayload
-  | HashIdsBroadcastChannelRequestPayload;
-
-export interface BroadcastChannelResponsePayload extends ResponsePayload {
+export interface BroadcastChannelResponsePayload
+  extends Omit<ResponsePayload, 'hashIdsSucceeded' | 'hashIdsFailed' | 'responsesFailed'> {
   hashId: string;
 }