@braze/react-native-sdk
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "@braze/react-native-sdk", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Braze SDK for React Native.", | ||
@@ -14,3 +14,3 @@ "main": "src/index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/braze-inc/braze-react-sdk.git" | ||
"url": "git+https://github.com/braze-inc/braze-react-native-sdk.git" | ||
}, | ||
@@ -33,5 +33,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/braze-inc/braze-react-sdk/issues" | ||
"url": "https://github.com/braze-inc/braze-react-native-sdk/issues" | ||
}, | ||
"homepage": "https://github.com/braze-inc/braze-react-sdk#readme", | ||
"homepage": "https://github.com/braze-inc/braze-react-native-sdk#readme", | ||
"devDependencies": { | ||
@@ -64,2 +64,2 @@ "eslint": "8.17.0", | ||
} | ||
} | ||
} |
@@ -21,3 +21,3 @@ // Definitions by: ahanriat <https://github.com/ahanriat> | ||
*/ | ||
export function getInstallTrackingId(callback: Callback): void; | ||
export function getInstallTrackingId(callback: Callback<string>): void; | ||
@@ -109,3 +109,3 @@ /** | ||
gender: GenderTypes[keyof GenderTypes], | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -180,3 +180,3 @@ | ||
groupId: string, | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -191,3 +191,3 @@ | ||
groupId: string, | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -203,3 +203,3 @@ | ||
notificationSubscriptionType: NotificationSubscriptionType[keyof NotificationSubscriptionType], | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -215,3 +215,3 @@ | ||
notificationSubscriptionType: NotificationSubscriptionType[keyof NotificationSubscriptionType], | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -269,3 +269,3 @@ | ||
value: number | boolean | string | string[] | Date | null, | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -284,3 +284,3 @@ | ||
value: string, | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -299,3 +299,3 @@ | ||
value: string, | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -311,3 +311,3 @@ | ||
key: string, | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -328,3 +328,3 @@ | ||
value: number, | ||
callback?: Callback | ||
callback?: Callback<boolean> | ||
): void; | ||
@@ -486,25 +486,15 @@ | ||
/** | ||
* Returns the current number of News Feed cards for the given category. | ||
* @param {BrazeCardCategory} category - Card category. Use Braze.CardCategory.ALL to get the total card count. | ||
* @param {function(error, result)} callback - A callback that receives the export function call result. | ||
* Note that for Android, a successful result relies on a FeedUpdatedEvent being posted at least once. | ||
* There is also a slight race condition around calling changeUser, | ||
* which requests a feed refresh, so the counts may not always be accurate. | ||
* @deprecated This method is a no-op on iOS. | ||
*/ | ||
export function getCardCountForCategories( | ||
category: BrazeCardCategory[keyof BrazeCardCategory], | ||
callback: Callback | ||
callback: Callback<number> | ||
): void; | ||
/** | ||
* Returns the number of unread News Feed cards for the given category. | ||
* @param {BrazeCardCategory} category - Card category. Use Braze.CardCategory.ALL to get the total unread card count | ||
* @param {function(error, result)} callback - A callback that receives the export function call result. | ||
* Note that for Android, a successful result relies on a FeedUpdatedEvent being posted at least once. | ||
* There is also a slight race condition around calling changeUser, | ||
* which requests a feed refresh, so the counts may not always be accurate. | ||
* @deprecated This method is a no-op on iOS. | ||
*/ | ||
export function getUnreadCardCountForCategories( | ||
category: BrazeCardCategory[keyof BrazeCardCategory], | ||
callback: Callback | ||
callback: Callback<number> | ||
): void; | ||
@@ -566,3 +556,3 @@ | ||
longitude: number, | ||
callback?: Callback | ||
callback?: Callback<undefined> | ||
): void; | ||
@@ -703,2 +693,20 @@ | ||
export interface SDKAuthenticationErrorType { | ||
error_code: string; | ||
user_id: string; | ||
original_signature: string; | ||
reason: string; | ||
} | ||
export interface PushNotificationEvent { | ||
push_event_type: string; | ||
title: string; | ||
deeplink: string; | ||
context_text: string; | ||
summary_text: string; | ||
image_url: string; | ||
raw_android_push_data: string; | ||
kvp_data: { [key: string]: any }; | ||
} | ||
interface BrazeEvent { | ||
@@ -723,3 +731,3 @@ /** Callback passes a boolean that indicates whether content cards have changed in the latest refresh. */ | ||
type Callback = (error: object, result: object) => void; | ||
type Callback<T> = (error?: object, result?: T) => void; | ||
@@ -726,0 +734,0 @@ type BrazeCurrencyCode = |
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
182780
26
2272