Merge branch 'master' into v5

This commit is contained in:
Daniel
2018-09-18 16:24:05 +02:00
parent 7cff234c26
commit 38a1dd1187
11 changed files with 376 additions and 161 deletions
@@ -418,6 +418,7 @@ export enum OSActionType {
export class OneSignal extends IonicNativePlugin {
/**
* constants to use in inFocusDisplaying()
* @hidden
*/
OSInFocusDisplayOption = {
None: 0,
@@ -671,6 +672,13 @@ export class OneSignal extends IonicNativePlugin {
@Cordova({ sync: true })
setLogLevel(logLevel: { logLevel: number; visualLevel: number }): void {}
/**
* Disable or enable location collection (Defaults to enabled) if your app has location permission.
* @param shared {boolean}
*/
@Cordova({ sync: true })
setLocationShared(shared: boolean): void {}
/**
* The passed in function will be fired when a notification permission setting changes.
* This includes the following events:
@@ -702,9 +710,64 @@ export class OneSignal extends IonicNativePlugin {
return;
}
/**
* Clears all OneSignal notifications
*/
@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 {}
}