mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 00:12:53 +08:00
feat(webengage): add new methods (#4784)
* setDevicePushOptIn Added for Android 13 * notificaiton-onPrepared, GAID, userOptIn Added * Refactoring
This commit is contained in:
parent
12b8046541
commit
9b950ebc46
@ -28,7 +28,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Initializes WebEngage SDK
|
||||
*
|
||||
* @param {any} [config]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@ -37,9 +36,17 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts Tracking Google Advertising ID
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
startGAIDTracking(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets WebEngage SDK configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @returns {Promise<any>}
|
||||
@ -51,7 +58,6 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Tracks event
|
||||
*
|
||||
* @param {string} eventName
|
||||
* @param {any} [attributes]
|
||||
* @returns {Promise<any>}
|
||||
@ -63,7 +69,6 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Tracks screen
|
||||
*
|
||||
* @param {string} eventName
|
||||
* @param screenName
|
||||
* @param {any} [screenData]
|
||||
@ -87,7 +92,6 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
||||
export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Logs user in
|
||||
*
|
||||
* @param {string} userId
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@ -98,7 +102,6 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Logs user out
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@ -108,7 +111,6 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets user attribute
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @returns {Promise<any>}
|
||||
@ -117,6 +119,27 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
setAttribute(key: string, value: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Device optIn
|
||||
* @param {boolean} optIn
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setDevicePushOptIn(optIn: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user attribute
|
||||
* @param {string} channel
|
||||
* @param {any} optIn
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setUserOptIn(channel: string, optIn: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -131,7 +154,6 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||
export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a push notification is clicked
|
||||
*
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@ -142,7 +164,6 @@ export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets push notification configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @returns {Promise<any>}
|
||||
@ -165,7 +186,6 @@ export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||
export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is shown
|
||||
*
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@ -174,9 +194,18 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function is invoked before a in-app notification is shown
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onPrepared(callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is clicked
|
||||
*
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@ -187,7 +216,6 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is dismissed
|
||||
*
|
||||
* @param {any} callback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@ -198,7 +226,6 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets in-app notification configuration
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @returns {Promise<any>}
|
||||
|
Loading…
Reference in New Issue
Block a user