Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update notification object in index.d.ts #116

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export interface MultiProviderOptions extends ProviderOptions {
clientCount?: number
}

export type ApsNotificationInterruptionLevel = 'passive' | 'active' | 'time-sensitive' | 'critical';

interface ApsAlert {
body?: string
"loc-key"?: string
Expand All @@ -97,6 +99,8 @@ interface Aps {
"mutable-content"?: undefined | 1
"url-args"?: string[]
category?: string
targetContentIdentifier?: string
interruptionLevel?: ApsNotificationInterruptionLevel
}

export interface ResponseSent {
Expand Down Expand Up @@ -209,6 +213,8 @@ export class Notification {
public collapseId: string;
public pushType: NotificationPushType;
public threadId: string;
public targetContentIdentifier: string;
public interruptionLevel: ApsNotificationInterruptionLevel;

/**
* This Object is JSON encoded and sent as the notification payload. When properties have been set on notification.aps (either directly or with convenience setters) these are added to the payload just before it is sent. If payload already contains an aps property it is replaced.
Expand All @@ -232,7 +238,7 @@ export class Notification {
/**
* The value to specify for `payload.aps.alert` can be either a `String` or an `Object` as outlined by the payload documentation.
*/
public alert: string|NotificationAlertOptions;
public alert: string | NotificationAlertOptions;
/**
* Setting this to true will specify "content-available" in the payload when it is compiled.
*/
Expand Down