Files
firebase-js-sdk/docs-devsite/messaging_sw.messagepayload.md
egilmorezandGitHub 97e146ba6d Adding some style, formatting, and link fixes. (#7432)
* Adding some style, formatting, and link fixes.

* Adding output files for reference doc edits.
2023-07-12 09:46:07 -07:00

3.3 KiB

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

MessagePayload interface

Message payload that contains the notification payload that is represented with NotificationPayload and the data payload that contains an arbitrary number of key-value pairs sent by developers through the Send API.

Signature:

export interface MessagePayload 

Properties

Property Type Description
collapseKey string The collapse key of the message. See Non-collapsible and collapsible messages
data { [key: string]: string; } Arbitrary key/value payload.
fcmOptions FcmOptions Options for features provided by the FCM SDK for Web. See WebpushFcmOptions.
from string The sender of this message.
messageId string The message ID of a message.
notification NotificationPayload Display notification details. Details are sent through the Send API.

MessagePayload.collapseKey

The collapse key of the message. See Non-collapsible and collapsible messages

Signature:

collapseKey: string;

MessagePayload.data

Arbitrary key/value payload.

Signature:

data?: {
        [key: string]: string;
    };

MessagePayload.fcmOptions

Options for features provided by the FCM SDK for Web. See WebpushFcmOptions.

Signature:

fcmOptions?: FcmOptions;

MessagePayload.from

The sender of this message.

Signature:

from: string;

MessagePayload.messageId

The message ID of a message.

Signature:

messageId: string;

MessagePayload.notification

Display notification details. Details are sent through the Send API.

Signature:

notification?: NotificationPayload;