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