import * as expo from './drivers/expo'; import * as fcm from './drivers/fcm'; import type { PushResult } from '@stacksjs/types'; export type { SendWebPushOptions, VapidKeys, WebPushResult, WebPushSubscription, } from './drivers/web-push'; /** * Send a push notification using the specified driver */ export declare function send(to: string | string[], notification: PushNotification, options?: SendOptions): Promise; /** * Configure FCM with credentials */ export declare function configureFCM(config: fcm.FCMConfig): void; export declare interface PushNotification { title?: string body: string data?: Record badge?: number sound?: 'default' | null priority?: 'high' | 'normal' | 'default' } export declare interface SendOptions { driver?: PushDriver } export type PushDriver = 'expo' | 'fcm'; export * from './drivers/index'; /* * Named rather than `export * from './drivers/index'`. * * The declaration build rewrites a star re-export into imports of whatever the * file happens to use, and everything else silently vanishes from the published * types - so `sendWebPush` worked at runtime and did not exist to TypeScript. * Naming them states the package's surface rather than inferring it, and it * survives the build. */ export { buildVapidHeaders, encryptPayload, generateVapidKeys, sendWebPush, } from './drivers/web-push'; export { expo, fcm };