/** * Web Push notification manager — VAPID key management, subscription storage, * and notification dispatch. * * Subscriptions stored in ~/.cumulus/push-subscriptions.json. * VAPID keys stored in gateway.config.json under "vapid". */ export interface VapidConfig { publicKey: string; privateKey: string; email: string; } export interface StoredSubscription { endpoint: string; keys: { p256dh: string; auth: string; }; /** When the subscription was registered */ createdAt: string; /** Optional label (e.g., "iPhone", "Desktop Chrome") */ label?: string; } /** * Generate a new VAPID key pair. Call once on first startup, * then store in gateway config. */ export declare function generateVapidKeys(): { publicKey: string; privateKey: string; }; /** * Configure web-push with VAPID details. Must be called before sending. */ export declare function configureVapid(vapid: VapidConfig): void; /** * Add a push subscription. Deduplicates by endpoint. */ export declare function subscribe(sub: StoredSubscription): void; /** * Remove a push subscription by endpoint. */ export declare function unsubscribe(endpoint: string): boolean; /** * Get all stored subscriptions. */ export declare function getSubscriptions(): StoredSubscription[]; export interface NotificationPayload { title: string; body: string; /** Thread name for deep linking */ threadName?: string; /** Notification priority: maps to push urgency header */ priority?: 'low' | 'normal' | 'high'; /** Optional icon URL */ icon?: string; /** Optional tag for collapsing (same tag = replace previous) */ tag?: string; } /** * Send a push notification to all stored subscriptions. * Automatically removes expired/invalid subscriptions (410 Gone). * Returns number of successful deliveries. */ export declare function sendNotification(payload: NotificationPayload): Promise; //# sourceMappingURL=push.d.ts.map