mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-08-04 00:00:08 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bab45a14d7 |
@@ -62,35 +62,35 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user's consent for event and profile tracking.
|
||||
*
|
||||
* You must call this method separately for each active user profile,
|
||||
* for example, when switching user profiles using `onUserLogin`.
|
||||
*
|
||||
* Consent Scenarios:
|
||||
*
|
||||
* 1. **Complete Opt-Out**
|
||||
* `userOptOut = true`, `allowSystemEvents = false`
|
||||
* → No events (custom or system) are saved locally or remotely. Maximum privacy.
|
||||
*
|
||||
* 2. **Full Opt-In**
|
||||
* `userOptOut = false`, `allowSystemEvents = true`
|
||||
* → All events (custom and system) are tracked. Default behavior.
|
||||
*
|
||||
* 3. **Partial Opt-In**
|
||||
* `userOptOut = true`, `allowSystemEvents = true`
|
||||
* → Only system events (e.g., app launch, notification viewed) are tracked. Custom events are ignored.
|
||||
*
|
||||
* ⚠️ The combination `userOptOut = false` and `allowSystemEvents = false` is invalid.
|
||||
* In such cases, the SDK defaults to **Full Opt-In**.
|
||||
*
|
||||
* To re-enable full tracking after opting out, call with:
|
||||
* `userOptOut = false`, `allowSystemEvents = true`.
|
||||
*
|
||||
* @param {boolean} userOptOut - Set to `true` to disable custom event tracking.
|
||||
* @param {boolean} allowSystemEvents - Set to `true` to allow system-level event tracking.
|
||||
*/
|
||||
/**
|
||||
* Sets the user's consent for event and profile tracking.
|
||||
*
|
||||
* You must call this method separately for each active user profile,
|
||||
* for example, when switching user profiles using `onUserLogin`.
|
||||
*
|
||||
* Consent Scenarios:
|
||||
*
|
||||
* 1. **Complete Opt-Out**
|
||||
* `userOptOut = true`, `allowSystemEvents = false`
|
||||
* → No events (custom or system) are saved locally or remotely. Maximum privacy.
|
||||
*
|
||||
* 2. **Full Opt-In**
|
||||
* `userOptOut = false`, `allowSystemEvents = true`
|
||||
* → All events (custom and system) are tracked. Default behavior.
|
||||
*
|
||||
* 3. **Partial Opt-In**
|
||||
* `userOptOut = true`, `allowSystemEvents = true`
|
||||
* → Only system events (e.g., app launch, notification viewed) are tracked. Custom events are ignored.
|
||||
*
|
||||
* ⚠️ The combination `userOptOut = false` and `allowSystemEvents = false` is invalid.
|
||||
* In such cases, the SDK defaults to **Full Opt-In**.
|
||||
*
|
||||
* To re-enable full tracking after opting out, call with:
|
||||
* `userOptOut = false`, `allowSystemEvents = true`.
|
||||
*
|
||||
* @param {boolean} userOptOut - Set to `true` to disable custom event tracking.
|
||||
* @param {boolean} allowSystemEvents - Set to `true` to allow system-level event tracking.
|
||||
*/
|
||||
@Cordova()
|
||||
setOptOut(optOut: boolean, allowSystemEvents?: boolean): Promise<any> {
|
||||
return;
|
||||
@@ -361,7 +361,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
@Cordova()
|
||||
getUserEventLog(eventName: string): Promise<any> {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -372,7 +372,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
@Cordova()
|
||||
getUserEventLogCount(eventName: string): Promise<any> {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -382,7 +382,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
@Cordova()
|
||||
getUserLastVisitTs(): Promise<any> {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -392,7 +392,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
@Cordova()
|
||||
getUserAppLaunchCount(): Promise<any> {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -402,9 +402,10 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
@Cordova()
|
||||
getUserEventLogHistory(): Promise<any> {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated - Use getUserEventLog() instead
|
||||
* Get Event First Time
|
||||
@@ -669,7 +670,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileIncrementValueBy(key: string, value: number): Promise<any> {
|
||||
profileIncrementValueBy(key: string,value: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -681,7 +682,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileDecrementValueBy(key: string, value: number): Promise<any> {
|
||||
profileDecrementValueBy(key: string,value: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -705,12 +706,9 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* Discards inApp notifications until 'resumeInAppNotifications' is called for current session.
|
||||
* Automatically resumes InApp notifications display on CleverTap shared instance creation.
|
||||
* Pending inApp notifications are not displayed.
|
||||
*
|
||||
* @param dismissInAppIfVisible {boolean} - Optional. If true, also dismisses the currently visible InApp notification.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
discardInAppNotifications(dismissInAppIfVisible?: boolean): Promise<any> {
|
||||
discardInAppNotifications(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -741,10 +739,10 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* @param expiredOnly {boolean} - to clear only assets which will not be needed further for inapps
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
clearFileResources(expiredOnly: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
@Cordova()
|
||||
clearFileResources(expiredOnly: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches In Apps from server.
|
||||
@@ -756,6 +754,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*******************
|
||||
* Session
|
||||
******************/
|
||||
@@ -1222,10 +1221,10 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
* @param {string} variable The String specifying the name of file varible to be created.
|
||||
*/
|
||||
@Cordova()
|
||||
defineFileVariable(variable: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
@Cordova()
|
||||
defineFileVariable(variable: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a variable or a group for the specified name.
|
||||
@@ -1246,28 +1245,6 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about the active A/B experiment variants for the current user.
|
||||
* Each variant object contains an "id" key mapping to the numeric ID of the variant.
|
||||
*
|
||||
* @returns {Promise<any>} - Returns an array of variant objects.
|
||||
*/
|
||||
@Cordova()
|
||||
variants(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears any active mute state set by the backend, allowing the SDK to resume
|
||||
* normal event tracking and network operations immediately.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
unmute(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a callback to be invoked when variables are initialised with server values. Will be called each time new values are fetched.
|
||||
* @returns {Promise<any>}
|
||||
@@ -1287,6 +1264,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called when the value of the file variable is downloaded and ready
|
||||
* @param {name} string the name of the variable
|
||||
@@ -1324,6 +1302,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/****************************
|
||||
* Custom Templates methods
|
||||
****************************/
|
||||
@@ -1352,104 +1331,105 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the SDK that an active custom template is dismissed. The active custom template is considered to be
|
||||
* visible to the user until this method is called. Since the SDK can show only one InApp message at a time, all
|
||||
* other messages will be queued until the current one is dismissed.
|
||||
* @param {string} templateName The name of the active template
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Notify the SDK that an active custom template is dismissed. The active custom template is considered to be
|
||||
* visible to the user until this method is called. Since the SDK can show only one InApp message at a time, all
|
||||
* other messages will be queued until the current one is dismissed.
|
||||
* @param {string} templateName The name of the active template
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateSetDismissed(templateName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Notify the SDK that an active custom template is presented to the user.
|
||||
* @param {string} templateName The name of the active template
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Notify the SDK that an active custom template is presented to the user.
|
||||
* @param {string} templateName The name of the active template
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateSetPresented(templateName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger a custom template action argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the action is defined
|
||||
* @param {string} argName The action argument na
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Trigger a custom template action argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the action is defined
|
||||
* @param {string} argName The action argument na
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateRunAction(templateName: string, argName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a string argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Retrieve a string argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateGetStringArg(templateName: string, argName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a number argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Retrieve a number argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateGetNumberArg(templateName: string, argName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a boolean argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Retrieve a boolean argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateGetBooleanArg(templateName: string, argName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a file argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Retrieve a file argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateGetFileArg(templateName: string, argName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve an object argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Retrieve an object argument by name.
|
||||
*
|
||||
* @param {string} templateName The name of an active template for which the argument is defined
|
||||
* @param {string} argName The action argument name
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateGetObjectArg(templateName: string, argName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a string representation of an active's template context with information about all arguments.
|
||||
* @param {string} templateName The name of an active template
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Get a string representation of an active's template context with information about all arguments.
|
||||
* @param {string} templateName The name of an active template
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
customTemplateContextToString(templateName: string): Promise<any> {
|
||||
return;
|
||||
@@ -1489,6 +1469,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*******************
|
||||
* Developer Options
|
||||
******************/
|
||||
|
||||
@@ -41,7 +41,10 @@ export interface TealiumDispatch {
|
||||
|
||||
export class TealiumView implements TealiumDispatch {
|
||||
public type = 'view';
|
||||
constructor(public viewName: string, public dataLayer: Map<string, any>) {}
|
||||
constructor(
|
||||
public viewName: string,
|
||||
public dataLayer: Map<string, any>
|
||||
) {}
|
||||
toJson() {
|
||||
const dictionary: any = {};
|
||||
dictionary['type'] = this.type;
|
||||
@@ -57,7 +60,10 @@ export class TealiumView implements TealiumDispatch {
|
||||
|
||||
export class TealiumEvent implements TealiumDispatch {
|
||||
public type = 'event';
|
||||
constructor(public eventName: string, public dataLayer: Map<string, any>) {}
|
||||
constructor(
|
||||
public eventName: string,
|
||||
public dataLayer: Map<string, any>
|
||||
) {}
|
||||
toJson() {
|
||||
const dictionary: any = {};
|
||||
dictionary['type'] = this.type;
|
||||
@@ -72,7 +78,21 @@ export class TealiumEvent implements TealiumDispatch {
|
||||
}
|
||||
|
||||
export class ConsentExpiry {
|
||||
constructor(public time: number, public unit: TimeUnit) {}
|
||||
constructor(
|
||||
public time: number,
|
||||
public unit: TimeUnit
|
||||
) {}
|
||||
}
|
||||
|
||||
export interface RemoteCommand {
|
||||
/** The ID used to invoke the remote command */
|
||||
id: string;
|
||||
/** Path to a local JSON file mapping, relative to the app bundle */
|
||||
path?: string;
|
||||
/** URL to a remote JSON file mapping */
|
||||
url?: string;
|
||||
/** Callback invoked when the remote command is triggered */
|
||||
callback?: Function;
|
||||
}
|
||||
|
||||
export enum TimeUnit {
|
||||
@@ -130,6 +150,7 @@ export interface TealiumConfig {
|
||||
memoryReportingEnabled?: boolean;
|
||||
overrideCollectURL?: string;
|
||||
overrideCollectBatchURL?: string;
|
||||
overrideCollectProfile?: string;
|
||||
overrideCollectDomain?: string;
|
||||
overrideLibrarySettingsURL?: string;
|
||||
overrideTagManagementURL?: string;
|
||||
@@ -143,6 +164,12 @@ export interface TealiumConfig {
|
||||
useRemoteLibrarySettings?: boolean;
|
||||
visitorServiceEnabled?: boolean;
|
||||
visitorServiceRefreshInterval?: string;
|
||||
/** Remote commands to register automatically on initialize */
|
||||
remoteCommands?: RemoteCommand[];
|
||||
/** Whether session counting is enabled */
|
||||
sessionCountingEnabled?: boolean;
|
||||
/** Whether dispatch batching is enabled */
|
||||
batchingEnabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,6 +278,16 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gathers the current track data (data layer merged with library data) without dispatching a track call
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
gatherTrackData(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the user's consent status
|
||||
* @param callback
|
||||
@@ -310,6 +347,16 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes a deep link URI to the Tealium library for tracking
|
||||
* @param uri The deep link URI
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
handleDeepLink(uri: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the Tealium Visitor ID
|
||||
* @param callback
|
||||
@@ -320,6 +367,24 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the Tealium Visitor ID, generating a new one
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
resetVisitorId(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all previously-stored visitor IDs
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
clearStoredVisitorIds(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to be called when the AudienceStream visitor profile is updated
|
||||
* @param callback
|
||||
@@ -330,6 +395,16 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to be called when the Visitor ID changes
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
setVisitorIdListener(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to be called when the consent has expired
|
||||
* @param callback
|
||||
@@ -344,10 +419,12 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
* Adds a remote command for later execution
|
||||
* @param id The ID used to invoke the remote command
|
||||
* @param callback
|
||||
* @param path Path to a local JSON file mapping, relative to the app bundle
|
||||
* @param url URL to a remote JSON file mapping
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addRemoteCommand(id: string, callback?: Function): Promise<any> {
|
||||
addRemoteCommand(id: string, callback?: Function, path?: string, url?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user