From ca9a70280845ae533e4bce32280bc185f2d0eef2 Mon Sep 17 00:00:00 2001 From: Ashwin Dinesh Date: Fri, 17 Aug 2018 01:31:54 +0530 Subject: [PATCH] feat(webengage): add optional config with initialization (#2637) * feat(webengage): add optional config with initialization * Update index.ts --- src/@ionic-native/plugins/webengage/index.ts | 40 +++++++++----------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/src/@ionic-native/plugins/webengage/index.ts b/src/@ionic-native/plugins/webengage/index.ts index 3ff3da34c..d9d09f0ed 100644 --- a/src/@ionic-native/plugins/webengage/index.ts +++ b/src/@ionic-native/plugins/webengage/index.ts @@ -23,18 +23,17 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; plugin: 'cordova-plugin-webengage', pluginRef: 'webengage', repo: 'https://github.com/WebEngage/cordova-plugin', - install: '', - installVariables: [], platforms: ['Android', 'iOS'] }) @Injectable() export class Webengage extends IonicNativePlugin { /** * Initializes WebEngage SDK + * @param {any} [config] * @return {Promise} */ @Cordova() - engage(): Promise { + engage(config?: any): Promise { return; } @@ -52,34 +51,33 @@ export class Webengage extends IonicNativePlugin { /** * Tracks event * @param {string} eventName - * @param {any} attributes + * @param {any} [attributes] * @return {Promise} */ @Cordova() - track(eventName: string, attributes: any): Promise { + track(eventName: string, attributes?: any): Promise { return; } /** * Tracks screen * @param {string} eventName - * @param {any} screenData + * @param {any} [screenData] * @return {Promise} */ @Cordova() - screen(screenName: string, screenData: any): Promise { + screen(screenName: string, screenData?: any): Promise { return; } } +/** + * @hidden + */ @Plugin({ pluginName: 'Webengage', plugin: 'cordova-plugin-webengage', - pluginRef: 'webengage.user', - repo: 'https://github.com/WebEngage/cordova-plugin', - install: '', - installVariables: [], - platforms: ['Android', 'iOS'] + pluginRef: 'webengage.user' }) @Injectable() export class WebengageUser extends IonicNativePlugin { @@ -114,14 +112,13 @@ export class WebengageUser extends IonicNativePlugin { } } +/** + * @hidden + */ @Plugin({ pluginName: 'Webengage', plugin: 'cordova-plugin-webengage', - pluginRef: 'webengage.push', - repo: 'https://github.com/WebEngage/cordova-plugin', - install: '', - installVariables: [], - platforms: ['Android', 'iOS'] + pluginRef: 'webengage.push' }) @Injectable() export class WebengagePush extends IonicNativePlugin { @@ -147,14 +144,13 @@ export class WebengagePush extends IonicNativePlugin { } } +/** + * @hidden + */ @Plugin({ pluginName: 'Webengage', plugin: 'cordova-plugin-webengage', - pluginRef: 'webengage.notification', - repo: 'https://github.com/WebEngage/cordova-plugin', - install: '', - installVariables: [], - platforms: ['Android', 'iOS'] + pluginRef: 'webengage.notification' }) @Injectable() export class WebengageNotification extends IonicNativePlugin {