diff --git a/src/@ionic-native/plugins/onesignal/index.ts b/src/@ionic-native/plugins/onesignal/index.ts index 4eab0a1a6..2ec3b354a 100644 --- a/src/@ionic-native/plugins/onesignal/index.ts +++ b/src/@ionic-native/plugins/onesignal/index.ts @@ -706,9 +706,66 @@ export class OneSignal extends IonicNativePlugin { return; } + /** + * Allows you to set the user's email address with the OneSignal SDK. + * @param {string} email Email address + * @param {string} [emailAuthToken] Email auth token + */ + @Cordova() + setEmail(email: string, emailAuthToken?: string): Promise { + return; + } + + /** + * If your app implements logout functionality, you can call logoutEmail to dissociate the email from the device + */ + @Cordova() + logoutEmail(): Promise { + return; + } + + /** + * The passed in function will be fired when a notification subscription property changes. + * This includes the following events: + * - Getting a push token from Apple / Google. + * - Getting a player / user id from OneSignal + * - OneSignal.setSubscription is called + * - User disables or enables notifications + * @return {Observable} + */ + @Cordova({ + observable: true + }) + addEmailSubscriptionObserver(): Observable { + return; + } + /** * Clears all OneSignal notifications */ @Cordova({ sync: true }) clearOneSignalNotifications(): void {} + + /** + * Allows you to delay the initialization of the SDK until the user provides privacy consent. + * The SDK will not be fully initialized until the provideUserConsent(true) method is called. + * @param {boolean} required + */ + @Cordova() + setRequiresUserPrivacyConsent(required: boolean): void {} + + /** + * If your application is set to require the user's privacy consent, you can provide this consent using this method. + * Until you call provideUserConsent(true), the SDK will not fully initialize and will not send any data to OneSignal. + * @param {boolean} granted + */ + @Cordova() + provideUserConsent(granted: boolean): void {} + + /** + * Accepts a callback, which returns a boolean variable indicating if the user has given privacy consent yet. + * @param {Function} callback + */ + @Cordova() + userProvidedPrivacyConsent(callback: Function): void {} }