@firebase/messaging-types

  • Version 0.5.0
  • Published
  • 4.09 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

interface FcmOptions

interface FcmOptions {}

    property analyticsLabel

    analyticsLabel?: string;
      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?: any,
            completed?: any
            ) => any;
            • service worker controller

            method onMessage

            onMessage: (
            nextOrObserver: NextFn<any> | Observer<any>,
            error?: any,
            completed?: any
            ) => any;

              method onTokenRefresh

              onTokenRefresh: (
              nextOrObserver: NextFn<any> | Observer<any>,
              error?: any,
              completed?: any
              ) => any;

                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 notification

                                notification?: NotificationPayload;

                                  interface NotificationPayload

                                  interface NotificationPayload {}

                                    property body

                                    body?: string;

                                      property image

                                      image?: string;

                                        property title

                                        title?: string;

                                          Type Aliases

                                          type FirebaseMessagingName

                                          type FirebaseMessagingName = 'messaging';

                                            Package Files (1)

                                            Dependencies (0)

                                            No dependencies.

                                            Dev Dependencies (1)

                                            Peer Dependencies (1)

                                            Badge

                                            To add a badge like this onejsDocs.io badgeto 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>