diff --git a/src/@awesome-cordova-plugins/plugins/unvired-cordova-sdk/index.ts b/src/@awesome-cordova-plugins/plugins/unvired-cordova-sdk/index.ts index b1bc3f146..ae2d739ad 100644 --- a/src/@awesome-cordova-plugins/plugins/unvired-cordova-sdk/index.ts +++ b/src/@awesome-cordova-plugins/plugins/unvired-cordova-sdk/index.ts @@ -1635,4 +1635,32 @@ export class UnviredCordovaSDK extends AwesomeCordovaNativePlugin { decrypt(stringToBeDecrypted: string): Promise { return; } + + /** + * Supported in browser platform only. + * You can make use of this api in order to receive push notifications. No input required. + * Upon succesful registration you will get a |evtSource| object on which various events are received. + * Usage: + * ``` + * this.unviredSDK.registerForPushNotification((evtSource) => { + * evtSource.onopen = function(event) { + * console.log(" onopen registerForPushNotification ==========") + * }; + * evtSource.onerror = function(err) { + * console.log(" onerror registerForPushNotification ==========") + * }; + * evtSource.onmessage = function(event) { + * console.log(" onmessage registerForPushNotification ==========") + * } + * }, + * (error) => { + * console.log(" error registerForPushNotification ==========") + * console.log(error) + * }); + * ``` + */ + @Cordova() + registerForPushNotification(): Promise { + return; + } }