Commit | Line | Data |
---|---|---|
66a7748d | 1 | import type { RequestPayload, ResponsePayload } from './UIProtocol.js' |
32de5a57 | 2 | |
4e3ff94d JB |
3 | export type BroadcastChannelRequest = [ |
4 | string, | |
5 | BroadcastChannelProcedureName, | |
a807045b | 6 | BroadcastChannelRequestPayload, |
66a7748d JB |
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', | |
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 | 26 | DIAGNOSTICS_STATUS_NOTIFICATION = 'diagnosticsStatusNotification', |
a807045b | 27 | FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification', |
89b7a234 JB |
28 | } |
29 | ||
39257250 | 30 | export interface BroadcastChannelRequestPayload extends RequestPayload { |
66a7748d JB |
31 | connectorId?: number |
32 | transactionId?: number | |
32de5a57 | 33 | } |
89b7a234 | 34 | |
a9ed42b2 JB |
35 | export interface BroadcastChannelResponsePayload |
36 | extends Omit<ResponsePayload, 'hashIdsSucceeded' | 'hashIdsFailed' | 'responsesFailed'> { | |
66a7748d | 37 | hashId: string |
10d244c0 | 38 | } |
6c8f5d90 | 39 | |
e1d9a0f4 | 40 | export interface MessageEvent { |
66a7748d | 41 | data: BroadcastChannelRequest | BroadcastChannelResponse |
e1d9a0f4 | 42 | } |