mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
Remove ETA-related methods from ShuttleGetterSetterRepository
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// to convert from data repo to GraphQL schema
|
||||
|
||||
import { ShuttleGetterRepository, ShuttleTravelTimeDataIdentifier, ShuttleTravelTimeDateFilterArguments } from "./ShuttleGetterRepository";
|
||||
import { IEta, IOrderedStop, IRoute, IShuttle, IStop } from "../../entities/ShuttleRepositoryEntities";
|
||||
import { IOrderedStop, IRoute, IShuttle, IStop } from "../../entities/ShuttleRepositoryEntities";
|
||||
|
||||
/**
|
||||
* ShuttleGetterRepository interface for data derived from Passio API.
|
||||
@@ -17,24 +17,15 @@ export interface ShuttleGetterSetterRepository extends ShuttleGetterRepository {
|
||||
addOrUpdateStop(stop: IStop): Promise<void>;
|
||||
addOrUpdateOrderedStop(orderedStop: IOrderedStop): Promise<void>;
|
||||
|
||||
/**
|
||||
* Add or update an ETA from an external source (e.g., API or test data).
|
||||
* This bypasses the internal ETA calculation based on shuttle movements.
|
||||
* Use this for loading ETAs from external APIs or setting test data.
|
||||
*/
|
||||
addOrUpdateEtaFromExternalSource(eta: IEta): Promise<void>;
|
||||
|
||||
removeRouteIfExists(routeId: string): Promise<IRoute | null>;
|
||||
removeShuttleIfExists(shuttleId: string): Promise<IShuttle | null>;
|
||||
removeStopIfExists(stopId: string): Promise<IStop | null>;
|
||||
removeOrderedStopIfExists(stopId: string, routeId: string): Promise<IOrderedStop | null>;
|
||||
removeEtaIfExists(shuttleId: string, stopId: string): Promise<IEta | null>;
|
||||
|
||||
clearRouteData(): Promise<void>;
|
||||
clearShuttleData(): Promise<void>;
|
||||
clearStopData(): Promise<void>;
|
||||
clearOrderedStopData(): Promise<void>;
|
||||
clearEtaData(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Get average travel time between two stops based on historical data.
|
||||
|
||||
Reference in New Issue
Block a user