Class PushMessage

PushMessages are used to send a push notification to a set of devices

Hierarchy

Constructors

  • Push message will be used to send a push notification to a set of devices

    Parameters

    • Optional devices: Device | Set<Device> | Iterable<Device>

      The Set of device references which will receive this push notification.

    • Optional message: string

      The message of the push notification.

    • Optional subject: string

      The subject of the push notification.

    • Optional options: string | PushMessageOptions

      The options object which can contain additional information and data

    • Optional badge: string | number

      The badge for iOS or Web Push devices

    • Optional data: Json

      The data object which can contain additional information.

    Returns PushMessage

Properties

actions?: JsonMap

Actions that the user can invoke and interact with (web push only)

badge?: string | number

The badge for iOS or Web Push devices

data?: Json

The data object which can contain additional information.

devices: Set<Device>

Set of devices

dir?: string

Defines which direction the text should be displayed (web push only)

icon?: string

The icon of the push message

image?: string

An image of the push message (web push only)

message?: string

Push notification message

nativeBadge?: number

The number for iOS and Android devices which will occur on the top right of the icon

renotify?: boolean

The renotify option makes new notifications vibrate and play a sound (web push only)

requireInteraction?: boolean

The requireInteraction option lets stay the push message until the user interacts with it (web push only)

silent?: boolean

The silent option shows a new notification but prevents default behavior (web push only)

sound?: string

The sound of an incoming push message (web push only)

subject?: string

Push notification subject

tag?: string

The tag of the push message where messages are going to be collected (web push only)

vibrate?: number[]

The vibrate property specifies a vibration pattern for the device's vibration

webBadge?: string

The web badge is the small monochrome icon which will occur on small devices (web push only)

Methods

  • Adds a new object to the set of devices

    Returns

    Parameters

    • device: Device

      will be added to the device set to receive the push notification

    Returns void

  • Converts the push message to JSON

    Returns

    Returns JsonMap

  • Instantiates a set of devices from the given parameter

    Returns

    Parameters

    Returns Set<Device>

Generated using TypeDoc