mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +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 {
|
export class Webengage extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Initializes WebEngage SDK
|
* Initializes WebEngage SDK
|
||||||
*
|
|
||||||
* @param {any} [config]
|
* @param {any} [config]
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -37,9 +36,17 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts Tracking Google Advertising ID
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
startGAIDTracking(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets WebEngage SDK configuration
|
* Sets WebEngage SDK configuration
|
||||||
*
|
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @param {any} value
|
* @param {any} value
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -51,7 +58,6 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tracks event
|
* Tracks event
|
||||||
*
|
|
||||||
* @param {string} eventName
|
* @param {string} eventName
|
||||||
* @param {any} [attributes]
|
* @param {any} [attributes]
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -63,7 +69,6 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tracks screen
|
* Tracks screen
|
||||||
*
|
|
||||||
* @param {string} eventName
|
* @param {string} eventName
|
||||||
* @param screenName
|
* @param screenName
|
||||||
* @param {any} [screenData]
|
* @param {any} [screenData]
|
||||||
@ -87,7 +92,6 @@ export class Webengage extends AwesomeCordovaNativePlugin {
|
|||||||
export class WebengageUser extends AwesomeCordovaNativePlugin {
|
export class WebengageUser extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Logs user in
|
* Logs user in
|
||||||
*
|
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -98,7 +102,6 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs user out
|
* Logs user out
|
||||||
*
|
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -108,7 +111,6 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets user attribute
|
* Sets user attribute
|
||||||
*
|
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @param {any} value
|
* @param {any} value
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -117,6 +119,27 @@ export class WebengageUser extends AwesomeCordovaNativePlugin {
|
|||||||
setAttribute(key: string, value: any): Promise<any> {
|
setAttribute(key: string, value: any): Promise<any> {
|
||||||
return;
|
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 {
|
export class WebengagePush extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Callback function is invoked when a push notification is clicked
|
* Callback function is invoked when a push notification is clicked
|
||||||
*
|
|
||||||
* @param {any} callback
|
* @param {any} callback
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -142,7 +164,6 @@ export class WebengagePush extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets push notification configuration
|
* Sets push notification configuration
|
||||||
*
|
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @param {any} value
|
* @param {any} value
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -165,7 +186,6 @@ export class WebengagePush extends AwesomeCordovaNativePlugin {
|
|||||||
export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Callback function is invoked when a in-app notification is shown
|
* Callback function is invoked when a in-app notification is shown
|
||||||
*
|
|
||||||
* @param {any} callback
|
* @param {any} callback
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -174,9 +194,18 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
|||||||
return;
|
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
|
* Callback function is invoked when a in-app notification is clicked
|
||||||
*
|
|
||||||
* @param {any} callback
|
* @param {any} callback
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -187,7 +216,6 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback function is invoked when a in-app notification is dismissed
|
* Callback function is invoked when a in-app notification is dismissed
|
||||||
*
|
|
||||||
* @param {any} callback
|
* @param {any} callback
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -198,7 +226,6 @@ export class WebengageNotification extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets in-app notification configuration
|
* Sets in-app notification configuration
|
||||||
*
|
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @param {any} value
|
* @param {any} value
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
|
Loading…
Reference in New Issue
Block a user