Skip to content

Commit

Permalink
feat(clevertap): support clevertap-cordova 2.7.0 (#4617) [skip ci]
Browse files Browse the repository at this point in the history
* feat(clevertap): add CleverTap plugin

* style(clevertap): cleanup stray lint error

* refactor

* feat(clevertap): update for latest CleverTap Cordova plugin

* chore: Update Repo from Ionic Native Repo

* fix: Code Changes for parity SDK-155

* fix: Indentation fixes for SDK-155

* fix: Code Repo fix while updating fork branch

* fix: Remove unnecessary adder .scripts Folder

* fix: Remove unwanted added folder .circleci

* fix: Remove unwanted added File .npmrc

* fix: Revert .Github Folder Changes to as per Ionic-Native master

* fix: Update changes as per ionic-native master

* fix: Code Repo fix while updating fork branch

fix: Remove unnecessary adder .scripts Folder

fix: Remove unwanted added folder .circleci

fix: Remove unwanted added File .npmrc

fix: Revert .Github Folder Changes to as per Ionic-Native master

fix: Update changes as per ionic-native master

* fix(CleverTap): Fix for missing methods issue #3491

* refactor(profile): remove setProfile methods for fb and google

* refactor(dynamic variables): remove Product A/B Testing (Dynamic Variables) code

* fix(product config): add key param to product config getters

* feat(identity): add a new public method getCleverTapID and deprecate existing CleverTapID methods

* feat(profile): add public methods to increment/decrement values set via User properties

* feat(profile): add public methods to increment/decrement values set via User properties

* feat(inapp): add public methods for suspending/discarding & resuming InApp Notifications

* feat(inbox): add new api for iOS to delete bulk inbox messages for given message ids

* refactor(xiaomi-push): add region as an extra mandatory parameter to setPushXiaomiToken

* Update index.ts to support cordova 2.7.0

* Update index.ts

---------

Co-authored-by: Peter Wilkniss <peter@clevertap.com>
Co-authored-by: Daniel Sogl <mytechde@outlook.com>
Co-authored-by: Darshan Pania <darshan@clevertap.com>
Co-authored-by: Surya <suryanarayan@clevertap.com>
Co-authored-by: SuryaClevertap <63039490+SuryaClevertap@users.noreply.github.com>
Co-authored-by: Piyush Kukadiya <piyush.kukadiya@clevertap.com>
Co-authored-by: piyush-kukadiya <61137760+piyush-kukadiya@users.noreply.github.com>
  • Loading branch information
8 people authored Aug 11, 2023
1 parent a536f36 commit 6d42ef5
Showing 1 changed file with 153 additions and 0 deletions.
153 changes: 153 additions & 0 deletions src/@awesome-cordova-plugins/plugins/clevertap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,28 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
markReadInboxMessageForId(messageId: string): Promise<any> {
return;
}

/**
* Call this to Mark Read Inbox Messages For Ids in bulk
*
* @param messageIds {any} array of strings
* @returns {Promise<any>}
*/
@Cordova()
markReadInboxMessagesForIds(messageIds: any): Promise<any> {
return;
}

/**
* Call this to dismiss Inbox
*
* @returns {Promise<any>}
*/
@Cordova()
dismissInbox(): Promise<any> {
return;
}

/**
* Call this to Mark Push Inbox Notification Viewed Event for Id
*
Expand Down Expand Up @@ -893,6 +914,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to Get Feature Flag for key
*
* @param key {string}
Expand All @@ -905,6 +927,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to Set Defaults for Product Config
*
* @param defaults {any}
Expand All @@ -916,6 +939,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this for Product Config Fetch
*
* @param defaults {any}
Expand All @@ -927,6 +951,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this for Product Config Fetch with Min Interval
*
* @param timeInterval {number}
Expand All @@ -938,6 +963,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this for Product Config Activate
*
* @returns {Promise<any>}
Expand All @@ -948,6 +974,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this for Product Config Fetch and Activate
*
* @returns {Promise<any>}
Expand All @@ -958,6 +985,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to set Product Config Fetch with Min Interval
*
* @param timeInterval {number}
Expand All @@ -969,6 +997,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to Get Last Fetch Time Interval
*
* @returns {Promise<any>}
Expand All @@ -979,6 +1008,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to Get String
*
* @param key {string}
Expand All @@ -990,6 +1020,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to Get Boolean
*
* @param key {string}
Expand All @@ -1001,6 +1032,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to Get Long
*
* @param key {string}
Expand All @@ -1012,6 +1044,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to Get Double
*
* @param key {string}
Expand All @@ -1023,6 +1056,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
}

/**
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
* Call this to Reset Product Config
*
* @returns {Promise<any>}
Expand All @@ -1032,6 +1066,125 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
return;
}

/****************************
* Product Experiences methods
****************************/

/**
*
* Uploads variables to the server. Requires Development/Debug build/configuration.
* @returns {Promise<any>}
*/
@Cordova()
syncVariables(): Promise<any> {
return;
}

/**
* Uploads variables to the server.
* @param {boolean} isProduction Provide `true` if variables must be sync in Productuon build/configuration.
* @returns {Promise<any>}
*
*
* Note: This is NO-OP in Android
*/
@Cordova()
syncVariablesinProd(isProduction: boolean): Promise<any> {
return;
}

/**
* Forces variables to update from the server.
* @returns {Promise<any>}
*/
@Cordova()
fetchVariables(): Promise<any> {
return;
}

/**
* Create variables.
* @returns {Promise<any>}
* @param {object} variables The JSON Object specifying the varibles to be created.
*/
@Cordova()
defineVariables(variables: any): Promise<any> {
return;
}

/**
* Get a variable or a group for the specified name.
* @param {string} name - name.
* @returns {Promise<any>}
*/
@Cordova()
getVariable(name: string): Promise<any> {
return;
}

/**
* Get all variables via a JSON object.
* @returns {Promise<any>}
*/
@Cordova()
getVariables(): 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>}
*/
@Cordova()
onVariablesChanged(): Promise<any> {
return;
}

/**
* Called when the value of the variable changes.
* @param {name} string the name of the variable
* @returns {Promise<any>}
*/
@Cordova()
onValueChanged(name: string): Promise<any> {
return;
}

/****************************
* Android 13 Push Primer
****************************/

/**
* Method to prompt the push primer for android 13 onwards.
* @param {object} value - key-value belongs to the localInApp properties. Refer documentation for details.
* @returns {Promise<any>}
*/
@Cordova()
promptPushPrimer(localInAppObject: any): Promise<any> {
return;
}

/**
* Method to prompt the hard permission dialog directly, if the push primer is not required.
* @param {string} showFallbackSettings - If the value is true then SDK shows an alert dialog which routes to app's notification settings page.
* @returns {Promise<any>}
*/
@Cordova()
promptForPushPermission(showFallbackSettings: boolean): Promise<any> {
return;
}

/**
* Returns true/false based on whether push permission is granted or denied.
*
* @returns {Promise<any>}
*/
@Cordova()
isPushPermissionGranted(): Promise<any> {
return;
}


/*******************
* Developer Options
******************/
Expand Down

0 comments on commit 6d42ef5

Please sign in to comment.