Commit | Line | Data |
---|---|---|
89b7a234 | 1 | import { JsonObject } from './JsonType'; |
4e3ff94d | 2 | import { RequestPayload, ResponsePayload } from './UIProtocol'; |
32de5a57 | 3 | |
4e3ff94d JB |
4 | export type BroadcastChannelRequest = [ |
5 | string, | |
6 | BroadcastChannelProcedureName, | |
7 | BroadcastChannelRequestPayload | |
8 | ]; | |
9 | export type BroadcastChannelResponse = [string, BroadcastChannelResponsePayload]; | |
89b7a234 JB |
10 | |
11 | export enum BroadcastChannelProcedureName { | |
12 | START_CHARGING_STATION = 'startChargingStation', | |
13 | STOP_CHARGING_STATION = 'stopChargingStation', | |
14 | START_TRANSACTION = 'startTransaction', | |
15 | STOP_TRANSACTION = 'stopTransaction', | |
16 | } | |
17 | ||
6c8f5d90 | 18 | export interface BroadcastChannelRequestPayload extends Omit<RequestPayload, 'hashId'> { |
89b7a234 | 19 | hashId: string; |
32de5a57 LM |
20 | connectorId?: number; |
21 | transactionId?: number; | |
22 | idTag?: string; | |
23 | } | |
89b7a234 | 24 | |
4e3ff94d | 25 | export type BroadcastChannelResponsePayload = ResponsePayload; |
6c8f5d90 JB |
26 | |
27 | export type MessageEvent = { data: BroadcastChannelRequest | BroadcastChannelResponse }; |