mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
feat(one-signal): add clearOneSignalNotifications function
feat(one-signal): add clearOneSignalNotifications function
This commit is contained in:
commit
91f66decab
@ -397,7 +397,6 @@ export enum OSActionType {
|
||||
})
|
||||
@Injectable()
|
||||
export class OneSignal extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* constants to use in inFocusDisplaying()
|
||||
*/
|
||||
@ -415,7 +414,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
* @returns {any}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
startInit(appId: string, googleProjectNumber?: string): any { return; }
|
||||
startInit(appId: string, googleProjectNumber?: string): any {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback to run when a notification is received, whether it was displayed or not.
|
||||
@ -425,7 +426,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
handleNotificationReceived(): Observable<OSNotification> { return; }
|
||||
handleNotificationReceived(): Observable<OSNotification> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback to run when a notification is tapped on from the notification shade (**ANDROID**) or notification
|
||||
@ -437,7 +440,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
handleNotificationOpened(): Observable<OSNotificationOpenedResult> { return; }
|
||||
handleNotificationOpened(): Observable<OSNotificationOpenedResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* **iOS** - Settings for iOS apps
|
||||
@ -457,7 +462,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
iOSSettings(settings: {
|
||||
kOSSettingsKeyAutoPrompt: boolean;
|
||||
kOSSettingsKeyInAppLaunchURL: boolean;
|
||||
}): any { return; }
|
||||
}): any {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Must be called after `startInit` to complete initialization of OneSignal.
|
||||
@ -465,7 +472,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
* @returns {any}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
endInit(): any { return; }
|
||||
endInit(): any {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prompt the user for notification permissions. Callback fires as soon as the user accepts or declines notifications.
|
||||
@ -474,7 +483,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
promptForPushNotificationsWithUserResponse(): Promise<boolean> { return; }
|
||||
promptForPushNotificationsWithUserResponse(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a list of tags that have been set on the user from the OneSignal server.
|
||||
@ -484,7 +495,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves when tags are recieved.
|
||||
*/
|
||||
@Cordova()
|
||||
getTags(): Promise<any> { return; }
|
||||
getTags(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets you retrieve the OneSignal user id and device token.
|
||||
@ -497,8 +510,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
* pushToken {string} A push token is a Google/Apple assigned identifier(unique per device per app).
|
||||
*/
|
||||
@Cordova()
|
||||
getIds(): Promise<{userId: string; pushToken: string}> { return; }
|
||||
|
||||
getIds(): Promise<{ userId: string; pushToken: string }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
|
||||
@ -574,7 +588,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
* @returns {any}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
inFocusDisplaying(displayOption: OSDisplayType): any { return; }
|
||||
inFocusDisplaying(displayOption: OSDisplayType): any {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* You can call this method with false to opt users out of receiving all notifications through OneSignal.
|
||||
@ -591,7 +607,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
* @returns {Promise<OSPermissionSubscriptionState>}
|
||||
*/
|
||||
@Cordova()
|
||||
getPermissionSubscriptionState(): Promise<OSPermissionSubscriptionState> { return; }
|
||||
getPermissionSubscriptionState(): Promise<OSPermissionSubscriptionState> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
@ -599,7 +617,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves if the notification was send successfully.
|
||||
*/
|
||||
@Cordova()
|
||||
postNotification(notificationObj: OSNotification): Promise<any> { return; }
|
||||
postNotification(notificationObj: OSNotification): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels a single OneSignal notification based on its Android notification integer id. Use instead of NotificationManager.cancel(id); otherwise the notification will be restored when your app is restarted.
|
||||
@ -630,10 +650,7 @@ export class OneSignal extends IonicNativePlugin {
|
||||
* @param {loglevel} contains two properties: logLevel (for console logging) and visualLevel (for dialog messages)
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setLogLevel(logLevel: {
|
||||
logLevel: number,
|
||||
visualLevel: number
|
||||
}): void { }
|
||||
setLogLevel(logLevel: { logLevel: number; visualLevel: number }): void {}
|
||||
|
||||
/**
|
||||
* The passed in function will be fired when a notification permission setting changes.
|
||||
@ -646,7 +663,9 @@ export class OneSignal extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
addPermissionObserver(): Observable<any> { return; }
|
||||
addPermissionObserver(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The passed in function will be fired when a notification subscription property changes.
|
||||
@ -660,6 +679,13 @@ export class OneSignal extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
addSubscriptionObserver(): Observable<any> { return; }
|
||||
|
||||
addSubscriptionObserver(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all OneSignla notifications
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
clearOneSignalNotifications(): void {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user