@firebase/messaging-types
- Version 0.6.1
- Published
- 4.65 kB
- No dependencies
- Apache-2.0 license
Install
npm i @firebase/messaging-types
yarn add @firebase/messaging-types
pnpm add @firebase/messaging-types
Overview
@firebase/messaging Types
Index
Interfaces
Type Aliases
Interfaces
interface FcmOptions
interface FcmOptions {}
property analyticsLabel
analyticsLabel?: string;
property link
link?: string;
interface FirebaseMessaging
interface FirebaseMessaging {}
method deleteToken
deleteToken: { (): Promise<boolean>; (token: string): Promise<boolean> };
window controller
Deprecated
method getToken
getToken: (options?: { vapidKey?: string; serviceWorkerRegistration?: ServiceWorkerRegistration;}) => Promise<string>;
method onBackgroundMessage
onBackgroundMessage: ( nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>, error?: ErrorFn, completed?: CompleteFn) => Unsubscribe;
service worker controller
method onMessage
onMessage: ( nextOrObserver: NextFn<any> | Observer<any>, error?: ErrorFn, completed?: CompleteFn) => Unsubscribe;
method onTokenRefresh
onTokenRefresh: ( nextOrObserver: NextFn<any> | Observer<any>, error?: ErrorFn, completed?: CompleteFn) => Unsubscribe;
method requestPermission
requestPermission: () => Promise<void>;
Deprecated
Use Notification.requestPermission() instead. https://developer.mozilla.org/en-US/docs/Web/API/Notification/requestPermission
method setBackgroundMessageHandler
setBackgroundMessageHandler: ( callback: (payload: any) => Promise<any> | void) => void;
method usePublicVapidKey
usePublicVapidKey: (b64PublicKey: string) => void;
method useServiceWorker
useServiceWorker: (registration: ServiceWorkerRegistration) => void;
interface MessagePayload
interface MessagePayload {}
property collapseKey
collapseKey: string;
property data
data?: { [key: string]: string };
property fcmOptions
fcmOptions?: FcmOptions;
property from
from: string;
property messageId
messageId: string;
property notification
notification?: NotificationPayload;
interface NotificationPayload
interface NotificationPayload {}
Type Aliases
type FirebaseMessagingName
type FirebaseMessagingName = 'messaging-compat';
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (1)
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@firebase/messaging-types
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@firebase/messaging-types)
- HTML<a href="https://www.jsdocs.io/package/@firebase/messaging-types"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 5382 ms. - Missing or incorrect documentation? Open an issue for this package.