| 1 | import type { RequestPayload, ResponsePayload } from './internal'; |
| 2 | |
| 3 | export type BroadcastChannelRequest = [ |
| 4 | string, |
| 5 | BroadcastChannelProcedureName, |
| 6 | BroadcastChannelRequestPayload |
| 7 | ]; |
| 8 | export type BroadcastChannelResponse = [string, BroadcastChannelResponsePayload]; |
| 9 | |
| 10 | export enum BroadcastChannelProcedureName { |
| 11 | START_CHARGING_STATION = 'startChargingStation', |
| 12 | STOP_CHARGING_STATION = 'stopChargingStation', |
| 13 | OPEN_CONNECTION = 'openConnection', |
| 14 | CLOSE_CONNECTION = 'closeConnection', |
| 15 | START_AUTOMATIC_TRANSACTION_GENERATOR = 'startAutomaticTransactionGenerator', |
| 16 | STOP_AUTOMATIC_TRANSACTION_GENERATOR = 'stopAutomaticTransactionGenerator', |
| 17 | START_TRANSACTION = 'startTransaction', |
| 18 | STOP_TRANSACTION = 'stopTransaction', |
| 19 | AUTHORIZE = 'authorize', |
| 20 | BOOT_NOTIFICATION = 'bootNotification', |
| 21 | STATUS_NOTIFICATION = 'statusNotification', |
| 22 | HEARTBEAT = 'heartbeat', |
| 23 | METER_VALUES = 'meterValues', |
| 24 | DATA_TRANSFER = 'dataTransfer', |
| 25 | DIAGNOSTICS_STATUS_NOTIFICATION = 'diagnosticsStatusNotification', |
| 26 | FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification', |
| 27 | } |
| 28 | |
| 29 | export interface BroadcastChannelRequestPayload extends RequestPayload { |
| 30 | connectorId?: number; |
| 31 | transactionId?: number; |
| 32 | } |
| 33 | |
| 34 | export interface BroadcastChannelResponsePayload |
| 35 | extends Omit<ResponsePayload, 'hashIdsSucceeded' | 'hashIdsFailed' | 'responsesFailed'> { |
| 36 | hashId: string; |
| 37 | } |
| 38 | |
| 39 | export type MessageEvent = { data: BroadcastChannelRequest | BroadcastChannelResponse }; |