diff --git a/src/@awesome-cordova-plugins/plugins/wonderpush/index.ts b/src/@awesome-cordova-plugins/plugins/wonderpush/index.ts index a8c251c2d..ac78ca951 100644 --- a/src/@awesome-cordova-plugins/plugins/wonderpush/index.ts +++ b/src/@awesome-cordova-plugins/plugins/wonderpush/index.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { Plugin, Cordova, AwesomeCordovaNativePlugin, getPromise } from '@awesome-cordova-plugins/core'; export interface WonderPushDelegate { - urlForDeepLink(url: string, callback: (url?: string) => void): void; + urlForDeepLink?: (url: string, callback: (url?: string) => void) => void; + onNotificationOpened?: (notification: object, buttonIndex: number) => void; + onNotificationReceived?: (notification: object) => void; } export interface WonderPushChannel { @@ -226,6 +228,31 @@ export class UserPreferencesMethods extends NestedObject { }) @Injectable() export class WonderPush extends AwesomeCordovaNativePlugin { + + /** + * Initializes the WonderPush SDK + * @param clientId + * @param clientSecret + * @param onSuccess + * @param onFailure + * @returns {Promise} + */ + @Cordova() + initialize(clientId: string, clientSecret: string): Promise { + return; + } + + /** + * Whether the SDK has been initialized. + * + * The SDK is ready when it is initialized with its Client ID and Client Secret. + * @returns {Promise} + */ + @Cordova() + isInitialized(): Promise { + return; + } + /** * Sets the user id, used to identify a single identity across multiple devices, * and to correctly identify multiple users on a single device.