add stub methods for subscribe/unsubscribe

This commit is contained in:
2025-03-27 11:10:49 -07:00
parent b2fb430a38
commit b0f04a9256
2 changed files with 18 additions and 3 deletions

View File

@@ -1,4 +1,10 @@
import { NotificationLookupArguments, NotificationRepository, ScheduledNotification } from "./NotificationRepository";
import {
Listener,
NotificationEvent,
NotificationLookupArguments,
NotificationRepository,
ScheduledNotification
} from "./NotificationRepository";
import { TupleKey } from "../types/TupleKey";
type DeviceIdSecondsThresholdAssociation = { [key: string]: number };
@@ -13,6 +19,8 @@ export class InMemoryNotificationRepository implements NotificationRepository {
*/
private deviceIdsToDeliverTo: { [key: string]: DeviceIdSecondsThresholdAssociation } = {}
private subscribers: Listener[] = [];
async getAllNotificationsForShuttleAndStopId(shuttleId: string, stopId: string) {
const tuple = new TupleKey(shuttleId, stopId);
if (this.deviceIdsToDeliverTo[tuple.toString()] === undefined) {
@@ -76,4 +84,9 @@ export class InMemoryNotificationRepository implements NotificationRepository {
delete this.deviceIdsToDeliverTo[tupleKey.toString()][deviceId];
}
public subscribeToNotificationChanges(listener: Listener): void {
}
public unsubscribeFromNotificationChanges(listener: Listener): void {
}
}