From 6172a044271dce1514dc851abdd30d0824eae742 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Sun, 2 Feb 2025 21:09:07 -0800 Subject: [PATCH] add documentation and change interface for cancelAllNotifications --- src/services/NotificationService.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/services/NotificationService.ts b/src/services/NotificationService.ts index 33533ba..2d9651f 100644 --- a/src/services/NotificationService.ts +++ b/src/services/NotificationService.ts @@ -56,15 +56,27 @@ export class NotificationService { return this._lastRefreshedTimeMs && Date.now() - this._lastRefreshedTimeMs < thirtyMinutesMs; } + /** + * Queue a notification to be sent. + * @param deviceId The device ID to send the notification to. + * @param shuttleId Shuttle ID of ETA object to check. + * @param stopId Stop ID of ETA object to check. + */ public async scheduleNotification({ deviceId, shuttleId, stopId }: ScheduledNotificationData) { } + /** + * Cancel a pending notification. + * @param deviceId The device ID of the notification. + * @param shuttleId Shuttle ID of the ETA object. + * @param stopId Stop ID of the ETA object. + */ public async cancelNotification({ deviceId, shuttleId, stopId }: ScheduledNotificationData) { } - public cancelAllNotifications() { + public cancelAllNotifications(deviceId: string) { } }