File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
types/node-pushnotifications Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 11/// <reference types="node" />
22
3+ import { Credential , ServiceAccount } from "firebase-admin/app" ;
34import * as webPush from "web-push" ;
4-
55export = PushNotifications ;
66
77declare class PushNotifications {
@@ -34,8 +34,10 @@ declare namespace PushNotifications {
3434 } | undefined ;
3535 /** Firebase Cloud Messaging */
3636 fcm ?: {
37- /** FCM token */
38- id ?: string | undefined ;
37+ /** Firebase settings */
38+ appName : string ;
39+ serviceAccountKey : ServiceAccount ;
40+ credential : Credential | null ;
3941 } | undefined ;
4042 /** Apple Push Notifications */
4143 apn ?: {
Original file line number Diff line number Diff line change 11import PushNotifications = require( "node-pushnotifications" ) ;
22import { supportedContentEncodings } from "web-push" ;
33
4- const settings = {
4+ const settings : PushNotifications . Settings = {
55 gcm : {
66 id : "null" ,
77 } ,
88 fcm : {
9- id : "null" ,
9+ appName : "null" ,
10+ serviceAccountKey : require ( "path/to/serviceAccountKey.json" ) ,
11+ credential : null ,
1012 } ,
1113 apn : {
1214 token : {
Original file line number Diff line number Diff line change 77 ],
88 "dependencies" : {
99 "@types/node" : " *" ,
10- "@types/web-push" : " *"
10+ "@types/web-push" : " *" ,
11+ "firebase-admin" : " ^11.5.0"
1112 },
1213 "devDependencies" : {
1314 "@types/node-pushnotifications" : " workspace:."
You can’t perform that action at this time.
0 commit comments