import type { Plugin } from '../../core/plugin'; export interface WebPushSubscriptionJSON { endpoint: string; expirationTime?: number | null; keys: { p256dh: string; auth: string; }; } export interface WebPushPluginSettings { vapidPublicKey: string; serviceWorkerUrl?: string; trackUrl?: string; /** * Where the service worker loads its self-updating runtime: an absolute URL * or a root-relative path (such as a first-party proxy). Defaults to the * Customer.io CDN for the track region. `false` keeps the worker's bundled * copy and makes no request. */ runtimeUrl?: string | false; enabled?: boolean; } export interface WebPushClickEvent { deliveryId: string; /** Empty string for a notification body click. */ action: string; customData?: Record; } export interface WebPushReceivedEvent { deliveryId: string; title: string; customData?: Record; } declare global { interface WindowEventMap { 'cio:webpush:click': CustomEvent; 'cio:webpush:received': CustomEvent; } } export interface WebPushAPI { /** Returns a function that removes this click listener. */ onClick(callback: (event: WebPushClickEvent) => void): () => void; requestPermission(): Promise; subscribe(opts?: { vapidPublicKey?: string; serviceWorkerUrl?: string; }): Promise; unsubscribe(): Promise; subscription(): Promise; } export declare function urlBase64ToUint8Array(value: string): Uint8Array; export declare function workerRuntimeUrl(worker: URL): string | undefined; export declare function WebPushPlugin(settings: WebPushPluginSettings): Plugin; //# sourceMappingURL=index.d.ts.map