Skip to content

Commit 14a4706

Browse files
authored
1 parent 2bc7a90 commit 14a4706

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,13 @@ declare namespace admin.messaging {
444444
headers?: {[key: string]: string};
445445
data?: {[key: string]: string};
446446
notification?: WebpushNotification;
447+
fcmOptions?: WebpushFcmOptions;
447448
};
448449

450+
interface WebpushFcmOptions {
451+
link?: string;
452+
}
453+
449454
interface WebpushNotification {
450455
title?: string;
451456
actions?: Array<{

src/messaging/messaging.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ export interface WebpushConfig {
127127
headers?: {[key: string]: string};
128128
data?: {[key: string]: string};
129129
notification?: WebpushNotification;
130+
fcmOptions?: WebpushFcmOptions;
131+
}
132+
133+
export interface WebpushFcmOptions {
134+
link?: string;
130135
}
131136

132137
export interface WebpushNotification {

test/unit/messaging/messaging.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,9 @@ describe('Messaging', () => {
22202220
image: 'test.image',
22212221
requireInteraction: true,
22222222
},
2223+
fcmOptions: {
2224+
link: 'https://example.com',
2225+
},
22232226
},
22242227
},
22252228
},

0 commit comments

Comments
 (0)