Forward UI request UUID to broadcast channel request
[e-mobility-charging-stations-simulator.git] / src / types / WorkerBroadcastChannel.ts
CommitLineData
89b7a234 1import { JsonObject } from './JsonType';
4e3ff94d 2import { RequestPayload, ResponsePayload } from './UIProtocol';
32de5a57 3
4e3ff94d
JB
4export type BroadcastChannelRequest = [
5 string,
6 BroadcastChannelProcedureName,
7 BroadcastChannelRequestPayload
8];
9export type BroadcastChannelResponse = [string, BroadcastChannelResponsePayload];
89b7a234
JB
10
11export enum BroadcastChannelProcedureName {
12 START_CHARGING_STATION = 'startChargingStation',
13 STOP_CHARGING_STATION = 'stopChargingStation',
14 START_TRANSACTION = 'startTransaction',
15 STOP_TRANSACTION = 'stopTransaction',
16}
17
4e3ff94d 18interface BroadcastChannelBasePayload extends JsonObject {
89b7a234
JB
19 hashId: string;
20}
21
4e3ff94d
JB
22export interface BroadcastChannelRequestPayload
23 extends BroadcastChannelBasePayload,
24 Omit<RequestPayload, 'hashId'> {
32de5a57
LM
25 connectorId?: number;
26 transactionId?: number;
27 idTag?: string;
28}
89b7a234 29
4e3ff94d 30export type BroadcastChannelResponsePayload = ResponsePayload;