mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +08:00
parent
8bab32173a
commit
51006a76a0
@ -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<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* If your app implements logout functionality, you can call logoutEmail to dissociate the email from the device
|
||||
*/
|
||||
@Cordova()
|
||||
logoutEmail(): Promise<any> {
|
||||
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<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
addEmailSubscriptionObserver(): Observable<any> {
|
||||
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 {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user