Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
method to return a more specific type.
- [changed] Admin SDK can now read the Firebase/GCP project ID from both
`GCLOUD_PROJECT` and `GOOGLE_CLOUD_PROJECT` environment variables.
- [changed] Updated the `WebpushNotification` typings to match
[the current API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushconfig).

# v5.12.1

Expand Down
20 changes: 19 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,26 @@ declare namespace admin.messaging {
notification?: WebpushNotification;
};

interface WebpushNotification extends NotificationOptions {
interface WebpushNotification {
title?: string;
actions?: Array<{
action: string;
icon?: string;
title: string;
}>;
badge?: string;
body?: string;
data?: any;
dir?: 'auto' | 'ltr' | 'rtl';
icon?: string;
image?: string;
lang?: string;
renotify?: boolean;
requireInteraction?: boolean;
silent?: boolean;
tag?: string;
timestamp?: number;
vibrate?: number | number[];
[key: string]: any;
}

Expand Down
20 changes: 19 additions & 1 deletion src/messaging/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,26 @@ export interface WebpushConfig {
notification?: WebpushNotification;
}

export interface WebpushNotification extends NotificationOptions {
export interface WebpushNotification {
title?: string;
actions?: Array<{
action: string;
icon?: string;
title: string;
}>;
badge?: string;
body?: string;
data?: any;
dir?: 'auto' | 'ltr' | 'rtl';
icon?: string;
image?: string;
lang?: string;
renotify?: boolean;
requireInteraction?: boolean;
silent?: boolean;
tag?: string;
timestamp?: number;
vibrate?: number | number[];
[key: string]: any;
}

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"lib": ["es5", "es2015.promise", "es2015", "dom"],
"lib": ["es2015"],
"outDir": "lib",
// We manually craft typings in src/index.d.ts instead of auto-generating them.
// "declaration": true,
Expand Down