mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
move arguments and notification interfaces to notification repository file
This commit is contained in:
33
src/repositories/NotificationRepository.ts
Normal file
33
src/repositories/NotificationRepository.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
export interface NotificationLookupArguments {
|
||||
deviceId: string;
|
||||
shuttleId: string;
|
||||
stopId: string;
|
||||
}
|
||||
|
||||
export interface ScheduledNotification extends NotificationLookupArguments {
|
||||
/**
|
||||
* Value which specifies the ETA of the shuttle for when
|
||||
* the notification should fire.
|
||||
* For example, a secondsThreshold of 180 would mean that the notification
|
||||
* fires when the ETA drops below 3 minutes.
|
||||
*/
|
||||
secondsThreshold: number;
|
||||
}
|
||||
|
||||
export class NotificationRepository {
|
||||
public async getAllNotificationsForShuttleAndStopId(shuttleId: string, stopId: string) {
|
||||
|
||||
}
|
||||
|
||||
public async getSecondsThresholdForNotificationIfExists(lookupArguments: NotificationLookupArguments) {
|
||||
|
||||
}
|
||||
|
||||
public async addNotification(notification: ScheduledNotification) {
|
||||
|
||||
}
|
||||
|
||||
public async deleteNotification(lookupArguments: NotificationLookupArguments) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user