build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / src / types / WorkerBroadcastChannel.ts
CommitLineData
69074173 1import type { RequestPayload, ResponsePayload } from './UIProtocol';
32de5a57 2
4e3ff94d
JB
3export type BroadcastChannelRequest = [
4 string,
5 BroadcastChannelProcedureName,
5edd8ba0 6 BroadcastChannelRequestPayload,
4e3ff94d
JB
7];
8export type BroadcastChannelResponse = [string, BroadcastChannelResponsePayload];
89b7a234
JB
9
10export enum BroadcastChannelProcedureName {
11 START_CHARGING_STATION = 'startChargingStation',
12 STOP_CHARGING_STATION = 'stopChargingStation',
db2336d9
JB
13 OPEN_CONNECTION = 'openConnection',
14 CLOSE_CONNECTION = 'closeConnection',
4f69be04
JB
15 START_AUTOMATIC_TRANSACTION_GENERATOR = 'startAutomaticTransactionGenerator',
16 STOP_AUTOMATIC_TRANSACTION_GENERATOR = 'stopAutomaticTransactionGenerator',
269de583 17 SET_SUPERVISION_URL = 'setSupervisionUrl',
5e8e29f4
JB
18 START_TRANSACTION = 'startTransaction',
19 STOP_TRANSACTION = 'stopTransaction',
1984f194 20 AUTHORIZE = 'authorize',
8bfbc743 21 BOOT_NOTIFICATION = 'bootNotification',
a9ed42b2 22 STATUS_NOTIFICATION = 'statusNotification',
10db00b2 23 HEARTBEAT = 'heartbeat',
d3195f0a 24 METER_VALUES = 'meterValues',
91a7d3ea 25 DATA_TRANSFER = 'dataTransfer',
c9a4f9ea
JB
26 DIAGNOSTICS_STATUS_NOTIFICATION = 'diagnosticsStatusNotification',
27 FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification',
89b7a234
JB
28}
29
39257250 30export interface BroadcastChannelRequestPayload extends RequestPayload {
32de5a57
LM
31 connectorId?: number;
32 transactionId?: number;
32de5a57 33}
89b7a234 34
a9ed42b2
JB
35export interface BroadcastChannelResponsePayload
36 extends Omit<ResponsePayload, 'hashIdsSucceeded' | 'hashIdsFailed' | 'responsesFailed'> {
10d244c0
JB
37 hashId: string;
38}
6c8f5d90
JB
39
40export type MessageEvent = { data: BroadcastChannelRequest | BroadcastChannelResponse };