react-native-onesignal
Advanced tools
Comparing version 5.0.3 to 5.0.4
@@ -118,2 +118,6 @@ import { NotificationEventName, NotificationEventTypeMap, NotificationClickEvent } from './models/NotificationEvents'; | ||
function removeTags(keys: string[]): void; | ||
/** Returns the local tags for the current user. */ | ||
function getTags(): Promise<{ | ||
[key: string]: string; | ||
}>; | ||
} | ||
@@ -120,0 +124,0 @@ namespace Notifications { |
@@ -403,2 +403,10 @@ 'use strict'; | ||
User.removeTags = removeTags; | ||
/** Returns the local tags for the current user. */ | ||
function getTags() { | ||
if (!helpers_1.isNativeModuleLoaded(RNOneSignal)) { | ||
return Promise.reject(new Error('OneSignal native module not loaded')); | ||
} | ||
return RNOneSignal.getTags(); | ||
} | ||
User.getTags = getTags; | ||
})(User = OneSignal.User || (OneSignal.User = {})); | ||
@@ -405,0 +413,0 @@ var Notifications; |
@@ -214,3 +214,3 @@ # React Native v5.0.0 Migration Guide | ||
| `OneSignal.User.removeTags(["KEY_01", "KEY_02"])` | _Remove multiple tags with the provided keys from the current user._ | | ||
| `OneSignal.User.getTags()` | _Returns the local tags for the current user._| | ||
## Push Subscription Namespace | ||
@@ -217,0 +217,0 @@ |
{ | ||
"name": "react-native-onesignal", | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"description": "React Native OneSignal SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -394,2 +394,11 @@ 'use strict'; | ||
} | ||
/** Returns the local tags for the current user. */ | ||
export function getTags(): Promise<{ [key: string]: string }> { | ||
if (!isNativeModuleLoaded(RNOneSignal)) { | ||
return Promise.reject(new Error('OneSignal native module not loaded')); | ||
} | ||
return RNOneSignal.getTags(); | ||
} | ||
} | ||
@@ -396,0 +405,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
308100
2402
72