mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
chore(build): switch to eslint
This commit is contained in:
@@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
* @name Webengage
|
||||
* @description
|
||||
* Awesome Cordova Plugins wrapper that wraps Webengage Cordova plugin for Android and iOS
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Webengage, WebengageUser, WebengagePush, WebengageNotification } from '@awesome-cordova-plugins/webengage/ngx';
|
||||
@@ -29,8 +28,9 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Initializes WebEngage SDK
|
||||
*
|
||||
* @param {any} [config]
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
engage(config?: any): Promise<any> {
|
||||
@@ -39,9 +39,10 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets WebEngage SDK configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
options(key: string, value: any): Promise<any> {
|
||||
@@ -50,9 +51,10 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Tracks event
|
||||
*
|
||||
* @param {string} eventName
|
||||
* @param {any} [attributes]
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
track(eventName: string, attributes?: any): Promise<any> {
|
||||
@@ -61,9 +63,11 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Tracks screen
|
||||
*
|
||||
* @param {string} eventName
|
||||
* @param screenName
|
||||
* @param {any} [screenData]
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
screen(screenName: string, screenData?: any): Promise<any> {
|
||||
@@ -83,8 +87,9 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Logs user in
|
||||
*
|
||||
* @param {string} userId
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
login(userId: string): Promise<any> {
|
||||
@@ -93,7 +98,8 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Logs user out
|
||||
* @return {Promise<any>}
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
logout(): Promise<any> {
|
||||
@@ -102,9 +108,10 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets user attribute
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setAttribute(key: string, value: any): Promise<any> {
|
||||
@@ -124,8 +131,9 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a push notification is clicked
|
||||
*
|
||||
* @param {any} callback
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onClick(callback: any): Promise<any> {
|
||||
@@ -134,9 +142,10 @@ export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets push notification configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
options(key: string, value: any): Promise<any> {
|
||||
@@ -156,8 +165,9 @@ export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is shown
|
||||
*
|
||||
* @param {any} callback
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onShown(callback: any): Promise<any> {
|
||||
@@ -166,8 +176,9 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is clicked
|
||||
*
|
||||
* @param {any} callback
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onClick(callback: any): Promise<any> {
|
||||
@@ -176,8 +187,9 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is dismissed
|
||||
*
|
||||
* @param {any} callback
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onDismiss(callback: any): Promise<any> {
|
||||
@@ -186,9 +198,10 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets in-app notification configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @return {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
options(key: string, value: any): Promise<any> {
|
||||
|
||||
Reference in New Issue
Block a user