Skip to content

Commit

Permalink
[-]Add missing types for getUserId and email methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wfhm committed Feb 26, 2024
1 parent 62425f8 commit 39ff114
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ declare module 'pushwoosh-react-native-plugin' {
}

type PushwooshTags = Record<string, string | number | string[] | number[] | boolean>
type PushwooshEmails = Record<string, string | string[]>

type InboxNotification = {
code: string;
Expand All @@ -36,17 +35,6 @@ declare module 'pushwoosh-react-native-plugin' {
register(success?: (token: string) => void, fail?: (error: Error) => void): void;
unregister(success?: (token: string) => void, fail?: (error: Error) => void): void;
onPushOpen(callback: () => void, fail?: ()=> void): void;
setEmails(
emails: PushwooshEmails,
success?: () => void,
fail?: (error: Error) => void
): void;
setUserEmails(
userId: string,
emails: PushwooshEmails,
success?: () => void,
fail?: (error: Error) => void
): void;
setTags(
tags: PushwooshTags,
success?: () => void,
Expand All @@ -62,6 +50,9 @@ declare module 'pushwoosh-react-native-plugin' {
postEvent(event: string, attributes?: Record<string, string>): void;
enableHuaweiPushNotifications(): void;

//email methods
setUserEmails(userId: string, emails: (string | string[]), success?: () => void, fail?: (error: Error) => void): void;
setEmails(emails: (string | string[]), success?: () => void, fail?: (error: Error) => void): void;
//badge methods
setApplicationIconBadgeNumber(badgeNumber: number): void;
getApplicationIconBadgeNumber(callback: (badge: number) => void): void;
Expand Down

0 comments on commit 39ff114

Please sign in to comment.