onesignal-cordova-plugin
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
@@ -4,0 +4,0 @@ "name": "onesignal-cordova-plugin", |
@@ -10,3 +10,3 @@ <p align="center"> | ||
[OneSignal](https://onesignal.com/) is a free push notification service for mobile apps. This plugin makes it easy to integrate your [Cordova](http://cordova.apache.org/) based (e.g. [Ionic](http://ionicframework.com/), [PhoneGap](https://phonegap.com/), and PhoneGap Build app with OneSignal. | ||
[OneSignal](https://onesignal.com/) is a free email, sms, push notification, and in-app message service for mobile apps. This plugin makes it easy to integrate your [Cordova](http://cordova.apache.org/) based (e.g. [Ionic](http://ionicframework.com/), [PhoneGap](https://phonegap.com/), and PhoneGap Build app with OneSignal. | ||
@@ -13,0 +13,0 @@ <p align="center"><img src="https://app.onesignal.com/images/android_and_ios_notification_image.gif" width="500" alt="Cordova Notification"></p> |
@@ -38,2 +38,4 @@ // 0 = NotificationClicked, 1 = ButtonClicked | ||
contentAvailable ?: string; | ||
relevanceScore ?: number; | ||
interruptionLevel ?: string; | ||
} | ||
@@ -40,0 +42,0 @@ |
@@ -92,5 +92,6 @@ import { NotificationReceivedEvent, OpenedEvent, OpenedEventAction } from './Notification'; | ||
* True if the application has location share activated, false otherwise | ||
* @returns Promise<boolean> | ||
* @param {(response: boolean) => void} handler | ||
* @returns void | ||
*/ | ||
isLocationShared(): Promise<boolean>; | ||
isLocationShared(handler: (response: boolean) => void): void; | ||
@@ -112,5 +113,6 @@ /** | ||
* This method returns a "snapshot" of the device state for when it was called. | ||
* @returns Promise<DeviceState> | ||
* @param {(response: DeviceState) => void} handler | ||
* @returns void | ||
*/ | ||
getDeviceState(): Promise<DeviceState>; | ||
getDeviceState(handler: (response: DeviceState) => void): void; | ||
@@ -272,5 +274,6 @@ /** | ||
* @param {string} key | ||
* @param {(value: string) => void} handler | ||
* @returns void | ||
*/ | ||
getTriggerValueForKey(key: string): Promise<string>; | ||
getTriggerValueForKey(key: string, handler: (value: string) => void): void; | ||
@@ -320,11 +323,13 @@ /** | ||
* Did the user provide privacy consent for GDPR purposes. | ||
* @returns Promise<boolean> | ||
* @param {(response: boolean) => void} handler | ||
* @returns void | ||
*/ | ||
userProvidedPrivacyConsent(): Promise<boolean>; | ||
userProvidedPrivacyConsent(handler: (response: boolean) => void): void; | ||
/** | ||
* True if the application requires user privacy consent, false otherwise | ||
* @returns Promise<boolean> | ||
* @param {(response: boolean) => void} handler | ||
* @returns void | ||
*/ | ||
requiresUserPrivacyConsent(): Promise<boolean>; | ||
requiresUserPrivacyConsent(handler: (response: boolean) => void): void; | ||
@@ -331,0 +336,0 @@ /** |
@@ -135,3 +135,3 @@ function OSNotification (receivedEvent) { | ||
if (receivedEvent.groupedNotifications && receivedEvent.groupedNotifications.length) { | ||
this.groupedNotifications = receivedEvent.groupedNotificationss.map(function(num) { | ||
this.groupedNotifications = receivedEvent.groupedNotifications.map(function(item) { | ||
return new OSNotification(item); | ||
@@ -194,2 +194,14 @@ }); | ||
} | ||
/// (iOS Only) | ||
/// value between 0 and 1 for sorting notifications in a notification summary | ||
if (receivedEvent.relevanceScore) { | ||
this.relevanceScore = receivedEvent.relevanceScore; | ||
} | ||
/// (iOS Only) | ||
/// The interruption level for the notification. This controls how the | ||
/// notification will be displayed to the user if they are using focus modes | ||
/// or notification summaries | ||
if (receivedEvent.interruptionLevel) { | ||
this.interruptionLevel = receivedEvent.interruptionLevel; | ||
} | ||
} | ||
@@ -196,0 +208,0 @@ |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
623620
2257
2