import type { FirebaseApp } from 'firebase/app'; import { type Firestore } from 'firebase/firestore'; import type { PushMessagingOptions, PushPermissionState } from './models.js'; /** * Service to manage Web Push, browser notification permissions, FCM device tokens, * silent re-registration, and shared-device cleanup. */ export declare class PushMessagingService { /** * Checks whether the current browser environment supports Web Push and Firebase Cloud Messaging. */ static isSupported(): Promise; /** * Retrieves the current device's FCM registration token. */ static getCurrentToken(app: FirebaseApp, options: PushMessagingOptions): Promise; /** * Checks whether *this specific device* is currently registered on the user's profile. * Compares the live token against Firestore rather than trusting stale local storage. */ static isDeviceTokenRegistered(app: FirebaseApp, registeredTokens: string[] | undefined, options: PushMessagingOptions): Promise; /** * Requests browser notification permission and, once granted, saves the device's FCM token * to the user's document in Firestore. */ static requestPermission(app: FirebaseApp, db: Firestore, uid: string, options: PushMessagingOptions): Promise; /** * If browser notification permission is already granted (e.g. pre-configured enterprise * policy or granted previously), ensures this device's token is registered on the user's profile. */ static ensureDeviceTokenRegistered(app: FirebaseApp, db: Firestore, uid: string, registeredTokens: string[] | undefined, options: PushMessagingOptions): Promise; /** * Removes this device's token from the user profile in Firestore and deletes the FCM token. */ static disablePush(app: FirebaseApp, db: Firestore, uid: string, options: PushMessagingOptions): Promise; /** * Best-effort cleanup for sign-out on a shared or borrowed workstation. * Removes this device's token without prompting for permission. */ static forgetOnSignOut(app: FirebaseApp, db: Firestore, uid: string, options: PushMessagingOptions): Promise; /** * Triggers a local browser/desktop notification. */ static showLocalNotification(title: string, options?: NotificationOptions): boolean; } //# sourceMappingURL=messaging.d.ts.map