feat: allow to provision number of stations by template
[e-mobility-charging-stations-simulator.git] / src / types / Statistics.ts
index 9bb614ee2654509daec9b1a90551a5e52650b9bd..4c03dd9d73c62c06f35d432bbc18cf9be62ec082 100644 (file)
@@ -1,6 +1,6 @@
-import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests.js'
 import type { CircularArray } from '../utils/index.js'
 import type { WorkerData } from '../worker/index.js'
+import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests.js'
 
 export interface TimestampedData {
   timestamp: number
@@ -23,11 +23,19 @@ export type StatisticsData = Partial<{
   stdDevTimeMeasurement: number
 }>
 
-export type Statistics = {
+export interface Statistics extends WorkerData {
   id: string
   name: string
   uri: string
   createdAt: Date
   updatedAt?: Date
   statisticsData: Map<string | RequestCommand | IncomingRequestCommand, StatisticsData>
-} & WorkerData
+}
+
+export interface TemplateStatistics {
+  configured: number
+  provisioned: number
+  added: number
+  started: number
+  indexes: Set<number>
+}