From a0ec1252e0d843fafe4e1d245f79eb09234dbee8 Mon Sep 17 00:00:00 2001 From: Anup Sharma <37064591+onlyanup@users.noreply.github.com> Date: Mon, 3 Jun 2019 10:26:36 +0530 Subject: [PATCH] feat(onesignal): add missing "setExternalUserId" and "removeExternalUserId" functions (#3049) * Adding missing functions to index.ts file The functions were missing, Please refer to the issue #2909 https://github.com/ionic-team/ionic-native/issues/2909 * Updated comments Updated comments which were failing tslint test * removed trailing whitespace removed trailing whitespace --- src/@ionic-native/plugins/onesignal/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/@ionic-native/plugins/onesignal/index.ts b/src/@ionic-native/plugins/onesignal/index.ts index 249d04a23..c6e5e1369 100644 --- a/src/@ionic-native/plugins/onesignal/index.ts +++ b/src/@ionic-native/plugins/onesignal/index.ts @@ -770,4 +770,19 @@ export class OneSignal extends IonicNativePlugin { */ @Cordova() userProvidedPrivacyConsent(callback: Function): void {} + + /** + * Allows you to use your own system's user ID's to send push notifications to your users. + * To tie a user to a given user ID, you can use this method. + * @param {string} externalId + */ + @Cordova() + setExternalUserId(externalId: string): void {} + + /** + * Removes whatever was set as the current user's external user ID. + */ + @Cordova() + removeExternalUserId(): void {} + }