Commit | Line | Data |
---|---|---|
6c1761d4 | 1 | import type { RequestPayload, ResponsePayload } from './UIProtocol'; |
32de5a57 | 2 | |
4e3ff94d JB |
3 | export type BroadcastChannelRequest = [ |
4 | string, | |
5 | BroadcastChannelProcedureName, | |
6 | BroadcastChannelRequestPayload | |
7 | ]; | |
8 | export type BroadcastChannelResponse = [string, BroadcastChannelResponsePayload]; | |
89b7a234 JB |
9 | |
10 | export 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', | |
5e8e29f4 JB |
17 | START_TRANSACTION = 'startTransaction', |
18 | STOP_TRANSACTION = 'stopTransaction', | |
1984f194 | 19 | AUTHORIZE = 'authorize', |
8bfbc743 | 20 | BOOT_NOTIFICATION = 'bootNotification', |
a9ed42b2 | 21 | STATUS_NOTIFICATION = 'statusNotification', |
10db00b2 | 22 | HEARTBEAT = 'heartbeat', |
d3195f0a | 23 | METER_VALUES = 'meterValues', |
91a7d3ea | 24 | DATA_TRANSFER = 'dataTransfer', |
c9a4f9ea JB |
25 | DIAGNOSTICS_STATUS_NOTIFICATION = 'diagnosticsStatusNotification', |
26 | FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification', | |
89b7a234 JB |
27 | } |
28 | ||
39257250 | 29 | export interface BroadcastChannelRequestPayload extends RequestPayload { |
32de5a57 LM |
30 | connectorId?: number; |
31 | transactionId?: number; | |
32de5a57 | 32 | } |
89b7a234 | 33 | |
a9ed42b2 JB |
34 | export interface BroadcastChannelResponsePayload |
35 | extends Omit<ResponsePayload, 'hashIdsSucceeded' | 'hashIdsFailed' | 'responsesFailed'> { | |
10d244c0 JB |
36 | hashId: string; |
37 | } | |
6c8f5d90 JB |
38 | |
39 | export type MessageEvent = { data: BroadcastChannelRequest | BroadcastChannelResponse }; |