Files
crowd-funder-for-time-pwa/src/plugins/NotificationInspectorPlugin.ts
T
Jose Olarte III fd0b8ce6d0 feat(dev): add notification debug panel and native pending inspector
Add a dev-only Notification Debug Panel at /dev/notifications for testing
predictive refresh and WAKEUP_PING without a backend.

- Gate route and Advanced Settings entry on import.meta.env.DEV
- NotificationDebugService drives mock refresh, flood test, clear, and
  wake simulation via existing handleCapacitorPushNotificationReceived and
  applyNotificationRefreshPayload (shared with refreshNotifications)
- Add NotificationInspector Capacitor plugin: iOS lists pending
  UNNotificationRequest identifiers and next trigger; Android stub returns
  empty pending for safe registration
2026-05-07 18:52:59 +08:00

15 lines
420 B
TypeScript

import { registerPlugin } from "@capacitor/core";
export type PendingNotificationInfo = {
identifier: string;
nextTriggerDate?: number | null;
triggerType?: string | null;
};
export interface NotificationInspectorPlugin {
getPendingNotifications(): Promise<{ pending: PendingNotificationInfo[] }>;
}
export const NotificationInspector =
registerPlugin<NotificationInspectorPlugin>("NotificationInspector");