diff --git a/src/@awesome-cordova-plugins/plugins/clevertap/index.ts b/src/@awesome-cordova-plugins/plugins/clevertap/index.ts index 76a005c20..e1d97899d 100644 --- a/src/@awesome-cordova-plugins/plugins/clevertap/index.ts +++ b/src/@awesome-cordova-plugins/plugins/clevertap/index.ts @@ -662,6 +662,17 @@ export class CleverTap extends AwesomeCordovaNativePlugin { return; } + /** + * Deletes all types of files which are preloaded for SDK features like custom in-app templates, app functions and variables etc. + * + * @param expiredOnly {boolean} - to clear only assets which will not be needed further for inapps + * @returns {Promise} + */ + @Cordova() + clearFileResources(expiredOnly: boolean): Promise { + return; + } + /** * Fetches In Apps from server. * @@ -1132,6 +1143,16 @@ export class CleverTap extends AwesomeCordovaNativePlugin { return; } + /** + * Create File Variable + * @returns {Promise} + * @param {string} variable The String specifying the name of file varible to be created. + */ + @Cordova() + defineFileVariable(variable: string): Promise { + return; + } + /** * Get a variable or a group for the specified name. * @param {string} name - name. @@ -1170,6 +1191,177 @@ 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 + * @returns {Promise} + */ + @Cordova() + onFileValueChanged(name: string): Promise { + return; + } + + /** + * Adds a callback to be invoked when variables are initialised with server values. Will be called only once on app start, or when added if server values are already received + * @returns {Promise} + */ + @Cordova() + onOneTimeVariablesChanged(): Promise { + return; + } + + /** + * Adds a callback to be invoked when no files need to be downloaded or all downloads have been completed. It is called each time new values are fetched and downloads are completed. + * @returns {Promise} + */ + @Cordova() + onVariablesChangedAndNoDownloadsPending(): Promise { + return; + } + + /** + * Adds a callback to be invoked only once for when new values are fetched and downloaded + * @returns {Promise} + */ + @Cordova() + onceVariablesChangedAndNoDownloadsPending(): Promise { + return; + } + + + /**************************** + * Custom Templates methods + ****************************/ + + /** + * + * Uploads Custom in-app templates and app functions to the server. Requires Development/Debug build/configuration. + * @returns {Promise} + */ + @Cordova() + syncCustomTemplates(): Promise { + return; + } + + /** + * Uploads Custom in-app templates and app functions to the server. + * @param {boolean} isProduction Provide `true` if templates must be sync in Productuon build/configuration. + * @returns {Promise} + * + * + * Note: This is NO-OP in Android + */ + @Cordova() + syncCustomTemplatesInProd(isProduction: boolean): Promise { + return; + } + + /** + * 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} + */ + @Cordova() + customTemplateSetDismissed(templateName: string): Promise { + 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} + */ + @Cordova() + customTemplateSetPresented(templateName: string): Promise { + 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} + */ + @Cordova() + customTemplateRunAction(templateName: string, argName: string): Promise { + 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} + */ + @Cordova() + customTemplateGetStringArg(templateName: string, argName: string): Promise { + 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} + */ + @Cordova() + customTemplateGetNumberArg(templateName: string, argName: string): Promise { + 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} + */ + @Cordova() + customTemplateGetBooleanArg(templateName: string, argName: string): Promise { + 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} + */ + @Cordova() + customTemplateGetFileArg(templateName: string, argName: string): Promise { + 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} + */ + @Cordova() + customTemplateGetObjectArg(templateName: string, argName: string): Promise { + 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} + */ + @Cordova() + customTemplateContextToString(templateName: string): Promise { + return; + } + /**************************** * Android 13 Push Primer ****************************/