mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
Define new method to get historical averages depending on timestamps and interval
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
import { IParkingStructure } from "../entities/ParkingRepositoryEntities";
|
||||
|
||||
export interface ParkingStructureCountOptions {
|
||||
startUnixEpochMs: number;
|
||||
endUnixEpochMs: number;
|
||||
intervalMs: number;
|
||||
}
|
||||
|
||||
export interface HistoricalParkingAverageQueryResult {
|
||||
fromUnixEpochMs: number;
|
||||
toUnixEpochMs: number;
|
||||
averageSpotsTaken: number;
|
||||
}
|
||||
|
||||
|
||||
export interface ParkingGetterRepository {
|
||||
getParkingStructures(): Promise<IParkingStructure[]>;
|
||||
getParkingStructureById(id: string): Promise<IParkingStructure | null>;
|
||||
|
||||
/**
|
||||
* Get historical averages of parking structure data using the filtering options.
|
||||
* @param id
|
||||
* @param options
|
||||
*/
|
||||
getHistoricalAveragesOfParkingStructureCounts(id: string, options: ParkingStructureCountOptions): Promise<HistoricalParkingAverageQueryResult[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user