mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +08:00
feat(webengage): add optional config with initialization (#2637)
* feat(webengage): add optional config with initialization * Update index.ts
This commit is contained in:
parent
3f415f9bef
commit
ca9a702808
@ -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<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
engage(): Promise<any> {
|
||||
engage(config?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -52,34 +51,33 @@ export class Webengage extends IonicNativePlugin {
|
||||
/**
|
||||
* Tracks event
|
||||
* @param {string} eventName
|
||||
* @param {any} attributes
|
||||
* @param {any} [attributes]
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
track(eventName: string, attributes: any): Promise<any> {
|
||||
track(eventName: string, attributes?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tracks screen
|
||||
* @param {string} eventName
|
||||
* @param {any} screenData
|
||||
* @param {any} [screenData]
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
screen(screenName: string, screenData: any): Promise<any> {
|
||||
screen(screenName: string, screenData?: any): Promise<any> {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user