1- import  {  FCMPluginOnIonic  }  from  '../FCM' ; 
2- export  declare  class  FCM  extends  FCMPluginOnIonic  { 
1+ import  {  Observable  }  from  'rxjs' ; 
2+ import  type  {  IChannelConfiguration  }  from  '../../www/IChannelConfiguration' ; 
3+ import  type  {  INotificationPayload  }  from  '../../www/INotificationPayload' ; 
4+ import  type  {  IRequestPushPermissionOptions  }  from  '../../www/IRequestPushPermissionOptions' ; 
5+ /** 
6+  * @name  FCM 
7+  * @description  
8+  * Easy plug&play push notification for Google Firebase FCM. 
9+  * 
10+  * @interfaces  
11+  * INotificationPayload 
12+  * IChannelConfiguration 
13+  * IRequestPushPermissionOptions 
14+  */ 
15+ export  declare  class  FCM  { 
316    static  pluginName : string ; 
417    static  plugin : string ; 
518    static  pluginRef : string ; 
@@ -11,4 +24,90 @@ export declare class FCM extends FCMPluginOnIonic {
1124    static  getPluginRef : ( )  =>  string ; 
1225    static  getPluginInstallName : ( )  =>  string ; 
1326    static  getSupportedPlatforms : ( )  =>  string [ ] ; 
27+     /** 
28+      * Removes existing push notifications from the notifications center 
29+      * 
30+      * @returns  {Promise<void> } Async call to native implementation 
31+      */ 
32+     clearAllNotifications ( ) : Promise < void > ; 
33+     /** 
34+      * For Android, some notification properties are only defined programmatically. 
35+      * Channel can define the default behavior for notifications on Android 8.0+. 
36+      * Once a channel is created, it stays unchangeable until the user uninstalls the app. 
37+      * 
38+      * @param  {IChannelConfiguration } channelConfig The parmeters of the new channel 
39+      * 
40+      * @returns  {Promise<void> } Async call to native implementation 
41+      */ 
42+     createNotificationChannel ( channelConfig : IChannelConfiguration ) : Promise < void > ; 
43+     /** 
44+      * Gets ios device's current APNS token 
45+      * 
46+      * @returns  {Promise<string> } Returns a Promise that resolves with the APNS token 
47+      */ 
48+     getAPNSToken ( ) : Promise < string > ; 
49+     /** 
50+      * Retrieves the message that, on tap, opened the app 
51+      * 
52+      * @private  
53+      * 
54+      * @returns  {Promise<INotificationPayload | null> } Async call to native implementation 
55+      */ 
56+     getInitialPushPayload ( ) : Promise < INotificationPayload  |  null > ; 
57+     /** 
58+      * Gets device's current registration id 
59+      * 
60+      * @returns  {Promise<string> } Returns a Promise that resolves with the registration id token 
61+      */ 
62+     getToken ( ) : Promise < string > ; 
63+     /** 
64+      * Checking for permissions on iOS. On android, it always returns `true`. 
65+      * 
66+      * @returns  {Promise<boolean | null> } Returns a Promise of: 
67+      * - true: push was allowed (or platform is android) 
68+      * - false: push will not be available 
69+      * - null: still not answered, recommended checking again later. 
70+      */ 
71+     hasPermission ( ) : Promise < boolean > ; 
72+     /** 
73+      * Event firing when receiving new notifications 
74+      * 
75+      * @argument  {{ once?: boolean }} options once defines if the listener is only trigger once 
76+      * @returns  {Observable<INotificationPayload> } An object to listen for notification data 
77+      */ 
78+     onNotification ( options ?: { 
79+         once ?: boolean ; 
80+     } ) : Observable < INotificationPayload > ; 
81+     /** 
82+      * Event firing when receiving a new Firebase token 
83+      * 
84+      * @argument  {{ once?: boolean }} options once defines if the listener is only trigger once 
85+      * @returns  {Observable<string> } An object to listen for the token 
86+      */ 
87+     onTokenRefresh ( options ?: { 
88+         once ?: boolean ; 
89+     } ) : Observable < string > ; 
90+     /** 
91+      * Request push notification permission, alerting the user if it not have yet decided 
92+      * 
93+      * @param  {IRequestPushPermissionOptions } options Options for push request 
94+      * @returns  {Promise<boolean> } Returns a Promise that resolves with the permission status 
95+      */ 
96+     requestPushPermission ( options ?: IRequestPushPermissionOptions ) : Promise < boolean > ; 
97+     /** 
98+      * Subscribes you to a [topic](https://firebase.google.com/docs/notifications/android/console-topics) 
99+      * 
100+      * @param  {string } topic Topic to be subscribed to 
101+      * 
102+      * @returns  {Promise<void> } Async call to native implementation 
103+      */ 
104+     subscribeToTopic ( topic : string ) : Promise < void > ; 
105+     /** 
106+      * Unsubscribes you from a [topic](https://firebase.google.com/docs/notifications/android/console-topics) 
107+      * 
108+      * @param  {string } topic Topic to be unsubscribed from 
109+      * 
110+      * @returns  {Promise<void> } Async call to native implementation 
111+      */ 
112+     unsubscribeFromTopic ( topic : string ) : Promise < void > ; 
14113} 
0 commit comments