repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: expose template stats to UI server simulatorState command
[e-mobility-charging-stations-simulator.git]
/
ui
/
web
/
src
/
types
/
UIProtocol.ts
diff --git
a/ui/web/src/types/UIProtocol.ts
b/ui/web/src/types/UIProtocol.ts
index 07eb52125599520cf59e8e81b4675d39bca85383..5b3efcdcef1efb81cccc8eeddc5525ccda0797f1 100644
(file)
--- a/
ui/web/src/types/UIProtocol.ts
+++ b/
ui/web/src/types/UIProtocol.ts
@@
-5,14
+5,18
@@
export enum Protocol {
}
export enum ApplicationProtocol {
}
export enum ApplicationProtocol {
-
HTTP = 'http
',
- WS
= 'w
s'
+
WS = 'ws
',
+ WS
S = 'ws
s'
}
export enum ProtocolVersion {
'0.0.1' = '0.0.1'
}
}
export enum ProtocolVersion {
'0.0.1' = '0.0.1'
}
+export enum AuthenticationType {
+ PROTOCOL_BASIC_AUTH = 'protocol-basic-auth'
+}
+
export type ProtocolRequest = [string, ProcedureName, RequestPayload]
export type ProtocolResponse = [string, ResponsePayload]
export type ProtocolRequest = [string, ProcedureName, RequestPayload]
export type ProtocolResponse = [string, ResponsePayload]
@@
-21,9
+25,14
@@
export type ProtocolRequestHandler = (
) => ResponsePayload | Promise<ResponsePayload>
export enum ProcedureName {
) => ResponsePayload | Promise<ResponsePayload>
export enum ProcedureName {
+ SIMULATOR_STATE = 'simulatorState',
START_SIMULATOR = 'startSimulator',
STOP_SIMULATOR = 'stopSimulator',
START_SIMULATOR = 'startSimulator',
STOP_SIMULATOR = 'stopSimulator',
+ LIST_TEMPLATES = 'listTemplates',
LIST_CHARGING_STATIONS = 'listChargingStations',
LIST_CHARGING_STATIONS = 'listChargingStations',
+ ADD_CHARGING_STATIONS = 'addChargingStations',
+ DELETE_CHARGING_STATIONS = 'deleteChargingStations',
+ SET_SUPERVISION_URL = 'setSupervisionUrl',
START_CHARGING_STATION = 'startChargingStation',
STOP_CHARGING_STATION = 'stopChargingStation',
OPEN_CONNECTION = 'openConnection',
START_CHARGING_STATION = 'startChargingStation',
STOP_CHARGING_STATION = 'stopChargingStation',
OPEN_CONNECTION = 'openConnection',
@@
-48,3
+57,16
@@
export interface ResponsePayload extends JsonObject {
status: ResponseStatus
hashIds?: string[]
}
status: ResponseStatus
hashIds?: string[]
}
+
+interface TemplateStatistics extends JsonObject {
+ configured: number
+ added: number
+ started: number
+ indexes: number[]
+}
+
+export interface SimulatorState extends JsonObject {
+ version: string
+ started: boolean
+ templateStatistics: Record<string, TemplateStatistics>
+}