mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
update documentation and return types for repository
This commit is contained in:
@@ -55,24 +55,37 @@ export interface Repository {
|
|||||||
// Getter methods
|
// Getter methods
|
||||||
|
|
||||||
getSystems(): Promise<ISystem[]>;
|
getSystems(): Promise<ISystem[]>;
|
||||||
getSystemById(systemId: string): Promise<ISystem>;
|
getSystemById(systemId: string): Promise<ISystem | null>;
|
||||||
|
|
||||||
getStopsBySystemId(systemId: string): Promise<IStop[]>;
|
getStopsBySystemId(systemId: string): Promise<IStop[]>;
|
||||||
getStopById(stopId: string): Promise<IStop[]>;
|
getStopById(stopId: string): Promise<IStop | null>;
|
||||||
|
|
||||||
getRoutesBySystemId(systemId: string): Promise<IRoute[]>;
|
getRoutesBySystemId(systemId: string): Promise<IRoute[]>;
|
||||||
getRouteById(routeId: string): Promise<IRoute>;
|
getRouteById(routeId: string): Promise<IRoute | null>;
|
||||||
|
|
||||||
getShuttlesBySystemId(systemId: string): Promise<IShuttle[]>;
|
getShuttlesBySystemId(systemId: string): Promise<IShuttle[]>;
|
||||||
getShuttleById(shuttleId: string): Promise<IShuttle[]>;
|
getShuttleById(shuttleId: string): Promise<IShuttle | null>;
|
||||||
|
|
||||||
getEtasForShuttleId(shuttleId: string): Promise<IEta[]>;
|
getEtasForShuttleId(shuttleId: string): Promise<IEta[]>;
|
||||||
getEtasForStopId(stopId: string): Promise<IEta[]>;
|
getEtasForStopId(stopId: string): Promise<IEta[]>;
|
||||||
getEtaForShuttleAndStopId(shuttleId: string, stopId: string): Promise<IEta[]>;
|
getEtaForShuttleAndStopId(shuttleId: string, stopId: string): Promise<IEta | null>;
|
||||||
|
|
||||||
getOrderedStopByRouteAndStopId(routeId: string, stopId: string): Promise<IOrderedStop[]>;
|
getOrderedStopByRouteAndStopId(routeId: string, stopId: string): Promise<IOrderedStop | null>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get ordered stops with the given stop ID.
|
||||||
|
* Returns an empty array if no ordered stops found.
|
||||||
|
* @param stopId
|
||||||
|
*/
|
||||||
getOrderedStopsByStopId(stopId: string): Promise<IOrderedStop[]>;
|
getOrderedStopsByStopId(stopId: string): Promise<IOrderedStop[]>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get ordered stops with the given route ID.
|
||||||
|
* Returns an empty array if no ordered stops found.
|
||||||
|
* @param routeId
|
||||||
|
*/
|
||||||
getOrderedStopsByRouteId(routeId: string): Promise<IOrderedStop[]>;
|
getOrderedStopsByRouteId(routeId: string): Promise<IOrderedStop[]>;
|
||||||
|
|
||||||
getNextOrderedStopFromOrderedStopId(stopId: string): Promise<IOrderedStop | null>;
|
getNextOrderedStopFromOrderedStopId(stopId: string): Promise<IOrderedStop | null>;
|
||||||
getPreviousOrderedStopFromOrderedStopId(stopId: string): Promise<IOrderedStop | null>;
|
getPreviousOrderedStopFromOrderedStopId(stopId: string): Promise<IOrderedStop | null>;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user