# capacitor-moengage-core

MoEngage is a mobile marketing automation company. This capacitor SDK helps you track events, trigger smart notifications.

## Install

```bash
npm install capacitor-moengage-core
npx cap sync
```

## API

<docgen-index>

* [`initialize(...)`](#initialize)
* [`trackEvent(...)`](#trackevent)
* [`setUniqueId(...)`](#setuniqueid)
* [`setAlias(...)`](#setalias)
* [`setUserName(...)`](#setusername)
* [`setFirstName(...)`](#setfirstname)
* [`setLastName(...)`](#setlastname)
* [`setEmailId(...)`](#setemailid)
* [`setMobileNumber(...)`](#setmobilenumber)
* [`setBirthDate(...)`](#setbirthdate)
* [`setGender(...)`](#setgender)
* [`setUserLocation(...)`](#setuserlocation)
* [`setUserAttribute(...)`](#setuserattribute)
* [`setUserAttributeDate(...)`](#setuserattributedate)
* [`setUserAttributeLocation(...)`](#setuserattributelocation)
* [`setAppStatus(...)`](#setappstatus)
* [`logoutUser(...)`](#logoutuser)
* [`enableSdk(...)`](#enablesdk)
* [`disableSdk(...)`](#disablesdk)
* [`showInApp(...)`](#showinapp)
* [`getSelfHandledInApp(...)`](#getselfhandledinapp)
* [`selfHandledShown(...)`](#selfhandledshown)
* [`selfHandledClicked(...)`](#selfhandledclicked)
* [`selfHandledDismissed(...)`](#selfhandleddismissed)
* [`setInAppContext(...)`](#setinappcontext)
* [`resetInAppContext(...)`](#resetinappcontext)
* [`enableDataTracking(...)`](#enabledatatracking)
* [`disableDataTracking(...)`](#disabledatatracking)
* [`passFcmPushToken(...)`](#passfcmpushtoken)
* [`passFcmPushPayload(...)`](#passfcmpushpayload)
* [`registerForPush()`](#registerforpush)
* [`onOrientationChanged()`](#onorientationchanged)
* [`passAuthenticationDetails(...)`](#passauthenticationdetails)
* [`addListener('pushTokenGenerated', ...)`](#addlistenerpushtokengenerated-)
* [`addListener('pushClicked', ...)`](#addlistenerpushclicked-)
* [`addListener('inAppCampaignShown', ...)`](#addlistenerinappcampaignshown-)
* [`addListener('inAppCampaignClicked', ...)`](#addlistenerinappcampaignclicked-)
* [`addListener('inAppCampaignDismissed', ...)`](#addlistenerinappcampaigndismissed-)
* [`addListener('inAppCampaignCustomAction', ...)`](#addlistenerinappcampaigncustomaction-)
* [`addListener('inAppCampaignSelfHandled', ...)`](#addlistenerinappcampaignselfhandled-)
* [`addListener('logoutCompleted', ...)`](#addlistenerlogoutcompleted-)
* [`addListener('authenticationError', ...)`](#addlistenerauthenticationerror-)
* [`enableAdIdTracking(...)`](#enableadidtracking)
* [`disableAdIdTracking(...)`](#disableadidtracking)
* [`enableAndroidIdTracking(...)`](#enableandroididtracking)
* [`disableAndroidIdTracking(...)`](#disableandroididtracking)
* [`setupNotificationChannelsAndroid()`](#setupnotificationchannelsandroid)
* [`pushPermissionResponseAndroid(...)`](#pushpermissionresponseandroid)
* [`navigateToSettingsAndroid()`](#navigatetosettingsandroid)
* [`requestPushPermissionAndroid()`](#requestpushpermissionandroid)
* [`addListener('onPermissionResult', ...)`](#addlisteneronpermissionresult-)
* [`enableDeviceIdTracking(...)`](#enabledeviceidtracking)
* [`disableDeviceIdTracking(...)`](#disabledeviceidtracking)
* [`updatePushPermissionRequestCountAndroid(...)`](#updatepushpermissionrequestcountandroid)
* [`deleteUser(...)`](#deleteuser)
* [`showNudge(...)`](#shownudge)
* [`identifyUser(...)`](#identifyuser)
* [`getUserIdentities(...)`](#getuseridentities)
* [`getSelfHandledInApps(...)`](#getselfhandledinapps)
* [`registerForProvisionalPush()`](#registerforprovisionalpush)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
* [Enums](#enums)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### initialize(...)

```typescript
initialize(options: { appId: string; initConfig: MoEInitConfig; lifecycleAwareCallbackEnabled?: boolean; }) => Promise<void>
```

Initialise MoEngage Capacitor Plugin

| Param         | Type                                                                                                                             |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ appId: string; initConfig: <a href="#moeinitconfig">MoEInitConfig</a>; lifecycleAwareCallbackEnabled?: boolean; }</code> |

**Since:** 2.0.0

--------------------


### trackEvent(...)

```typescript
trackEvent(options: { eventName: string; eventAttributes?: MoEProperties; appId: string; }) => Promise<void>
```

Track user behaviour as events with properties

| Param         | Type                                                                                                             |
| ------------- | ---------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ eventName: string; eventAttributes?: <a href="#moeproperties">MoEProperties</a>; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setUniqueId(...)

```typescript
setUniqueId(options: { uniqueId: string; appId: string; }) => Promise<void>
```

Set a Unique Identifier for the user.

| Param         | Type                                              |
| ------------- | ------------------------------------------------- |
| **`options`** | <code>{ uniqueId: string; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setAlias(...)

```typescript
setAlias(options: { alias: string; appId: string; }) => Promise<void>
```

Set an Alias to update the existing Unique Id

| Param         | Type                                           |
| ------------- | ---------------------------------------------- |
| **`options`** | <code>{ alias: string; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setUserName(...)

```typescript
setUserName(options: { userName: string; appId: string; }) => Promise<void>
```

Set user's full name

| Param         | Type                                              |
| ------------- | ------------------------------------------------- |
| **`options`** | <code>{ userName: string; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setFirstName(...)

```typescript
setFirstName(options: { firstName: string; appId: string; }) => Promise<void>
```

Set user's first name

| Param         | Type                                               |
| ------------- | -------------------------------------------------- |
| **`options`** | <code>{ firstName: string; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setLastName(...)

```typescript
setLastName(options: { lastName: string; appId: string; }) => Promise<void>
```

Set user's last name

| Param         | Type                                              |
| ------------- | ------------------------------------------------- |
| **`options`** | <code>{ lastName: string; appId: string; }</code> |

--------------------


### setEmailId(...)

```typescript
setEmailId(options: { emailId: string; appId: string; }) => Promise<void>
```

Set user's email id

| Param         | Type                                             |
| ------------- | ------------------------------------------------ |
| **`options`** | <code>{ emailId: string; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setMobileNumber(...)

```typescript
setMobileNumber(options: { mobileNumber: string; appId: string; }) => Promise<void>
```

Set user's mobile number

| Param         | Type                                                  |
| ------------- | ----------------------------------------------------- |
| **`options`** | <code>{ mobileNumber: string; appId: string; }</code> |

--------------------


### setBirthDate(...)

```typescript
setBirthDate(options: { birthdate: string; appId: string; }) => Promise<void>
```

Set user's birthdate.

| Param         | Type                                               |
| ------------- | -------------------------------------------------- |
| **`options`** | <code>{ birthdate: string; appId: string; }</code> |

**Since:** 1.0.0

--------------------


### setGender(...)

```typescript
setGender(options: { gender: MoEUserGender; appId: string; }) => Promise<void>
```

Set user's gender.

| Param         | Type                                                                                |
| ------------- | ----------------------------------------------------------------------------------- |
| **`options`** | <code>{ gender: <a href="#moeusergender">MoEUserGender</a>; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setUserLocation(...)

```typescript
setUserLocation(options: { location: MoEGeoLocation; appId: string; }) => Promise<void>
```

Set user's location

| Param         | Type                                                                                    |
| ------------- | --------------------------------------------------------------------------------------- |
| **`options`** | <code>{ location: <a href="#moegeolocation">MoEGeoLocation</a>; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setUserAttribute(...)

```typescript
setUserAttribute(options: { name: string; value: string | number | boolean | Array<string> | Array<number>; appId: string; }) => Promise<void>
```

Set the user defined attribute with value.

| Param         | Type                                                                                                      |
| ------------- | --------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ name: string; value: string \| number \| boolean \| string[] \| number[]; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setUserAttributeDate(...)

```typescript
setUserAttributeDate(options: { name: string; value: string; appId: string; }) => Promise<void>
```

Set a user attribute timestamp for the current user

| Param         | Type                                                         |
| ------------- | ------------------------------------------------------------ |
| **`options`** | <code>{ name: string; value: string; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setUserAttributeLocation(...)

```typescript
setUserAttributeLocation(options: { name: string; location: MoEGeoLocation; appId: string; }) => Promise<void>
```

Set the user attribute location

| Param         | Type                                                                                                  |
| ------------- | ----------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ name: string; location: <a href="#moegeolocation">MoEGeoLocation</a>; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setAppStatus(...)

```typescript
setAppStatus(options: { appStatus: MoEAppStatus; appId: string; }) => Promise<void>
```

This API tells the SDK whether it is a fresh install or an existing application was updated.

| Param         | Type                                                                                 |
| ------------- | ------------------------------------------------------------------------------------ |
| **`options`** | <code>{ appStatus: <a href="#moeappstatus">MoEAppStatus</a>; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### logoutUser(...)

```typescript
logoutUser(options: { appId: string; }) => Promise<void>
```

Notify the SDK that the user has logged out of the application

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### enableSdk(...)

```typescript
enableSdk(options: { appId: string; }) => Promise<void>
```

API to enable SDK usage.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### disableSdk(...)

```typescript
disableSdk(options: { appId: string; }) => Promise<void>
```

API to disable all features of the SDK.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### showInApp(...)

```typescript
showInApp(options: { appId: string; }) => Promise<void>
```

Call this method wherever InApp message has to be shown, if available.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### getSelfHandledInApp(...)

```typescript
getSelfHandledInApp(options: { appId: string; }) => Promise<void>
```

Triggers fetching self handled in-app, the result is returned in the `inAppCampaignSelfHandled` listener

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### selfHandledShown(...)

```typescript
selfHandledShown(campaignData: MoEInAppSelfHandledCampaignData) => Promise<void>
```

API to track self handled in-app shown event.

| Param              | Type                                                                                        | Description     |
| ------------------ | ------------------------------------------------------------------------------------------- | --------------- |
| **`campaignData`** | <code><a href="#moeinappselfhandledcampaigndata">MoEInAppSelfHandledCampaignData</a></code> | in-app campaign |

**Since:** 2.0.0

--------------------


### selfHandledClicked(...)

```typescript
selfHandledClicked(campaignData: MoEInAppSelfHandledCampaignData) => Promise<void>
```

API to track click event of any other widget apart from primary widget in the self handled in-app.

| Param              | Type                                                                                        | Description     |
| ------------------ | ------------------------------------------------------------------------------------------- | --------------- |
| **`campaignData`** | <code><a href="#moeinappselfhandledcampaigndata">MoEInAppSelfHandledCampaignData</a></code> | in-app campaign |

**Since:** 2.0.0

--------------------


### selfHandledDismissed(...)

```typescript
selfHandledDismissed(campaignData: MoEInAppSelfHandledCampaignData) => Promise<void>
```

API to track self handled in-app's dismiss event.

| Param              | Type                                                                                        | Description     |
| ------------------ | ------------------------------------------------------------------------------------------- | --------------- |
| **`campaignData`** | <code><a href="#moeinappselfhandledcampaigndata">MoEInAppSelfHandledCampaignData</a></code> | in-app campaign |

**Since:** 2.0.0

--------------------


### setInAppContext(...)

```typescript
setInAppContext(options: { contexts: Array<string>; appId: string; }) => Promise<void>
```

Set current context for in-app module.

| Param         | Type                                                |
| ------------- | --------------------------------------------------- |
| **`options`** | <code>{ contexts: string[]; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### resetInAppContext(...)

```typescript
resetInAppContext(options: { appId: string; }) => Promise<void>
```

Resets/Clears the previously set context for in-app module.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### enableDataTracking(...)

```typescript
enableDataTracking(options: { appId: string; }) => Promise<void>
```

Optionally opt-in data tracking.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### disableDataTracking(...)

```typescript
disableDataTracking(options: { appId: string; }) => Promise<void>
```

Optionally opt-out of data tracking. When data tracking is opted no event or user
attribute is tracked on MoEngage Platform.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### passFcmPushToken(...)

```typescript
passFcmPushToken(options: { token: string; appId: string; }) => Promise<void>
```

Pass FCM Push Token to the MoEngage SDK

| Param         | Type                                           |
| ------------- | ---------------------------------------------- |
| **`options`** | <code>{ token: string; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### passFcmPushPayload(...)

```typescript
passFcmPushPayload(options: { payload: object; appId: string; }) => Promise<void>
```

Pass FCM payload to MoEngage SDK

| Param         | Type                                             |
| ------------- | ------------------------------------------------ |
| **`options`** | <code>{ payload: object; appId: string; }</code> |

**Since:** 2.0.0

--------------------


### registerForPush()

```typescript
registerForPush() => Promise<void>
```

Register For Push Notification for iOS

**Since:** 2.0.0

--------------------


### onOrientationChanged()

```typescript
onOrientationChanged() => Promise<void>
```

Notifies MoEngage SDK of device orientation change

**Since:** 2.0.0

--------------------


### passAuthenticationDetails(...)

```typescript
passAuthenticationDetails(options: { authenticationData: MoEAuthenticationData; appId: string; }) => Promise<void>
```

Pass JWT authentication details to the native SDK (after login / token refresh).

| Param         | Type                                                                                                            |
| ------------- | --------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ authenticationData: <a href="#moeauthenticationdata">MoEAuthenticationData</a>; appId: string; }</code> |

**Since:** 7.1.0

--------------------


### addListener('pushTokenGenerated', ...)

```typescript
addListener(eventName: 'pushTokenGenerated', listenerFunc: MoEPushTokenListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for push token generated event

| Param              | Type                                                                  |
| ------------------ | --------------------------------------------------------------------- |
| **`eventName`**    | <code>'pushTokenGenerated'</code>                                     |
| **`listenerFunc`** | <code><a href="#moepushtokenlistener">MoEPushTokenListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 2.0.0

--------------------


### addListener('pushClicked', ...)

```typescript
addListener(eventName: 'pushClicked', listenerFunc: MoEPushClickListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for push clicked event

| Param              | Type                                                                  |
| ------------------ | --------------------------------------------------------------------- |
| **`eventName`**    | <code>'pushClicked'</code>                                            |
| **`listenerFunc`** | <code><a href="#moepushclicklistener">MoEPushClickListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 1.0.0

--------------------


### addListener('inAppCampaignShown', ...)

```typescript
addListener(eventName: 'inAppCampaignShown', listenerFunc: MoEInAppShownListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for in-app campaign shown event

| Param              | Type                                                                    |
| ------------------ | ----------------------------------------------------------------------- |
| **`eventName`**    | <code>'inAppCampaignShown'</code>                                       |
| **`listenerFunc`** | <code><a href="#moeinappshownlistener">MoEInAppShownListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 1.0.0

--------------------


### addListener('inAppCampaignClicked', ...)

```typescript
addListener(eventName: 'inAppCampaignClicked', listenerFunc: MoEInAppClickedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for in-app campaign clicked event

| Param              | Type                                                                        |
| ------------------ | --------------------------------------------------------------------------- |
| **`eventName`**    | <code>'inAppCampaignClicked'</code>                                         |
| **`listenerFunc`** | <code><a href="#moeinappclickedlistener">MoEInAppClickedListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 1.0.0

--------------------


### addListener('inAppCampaignDismissed', ...)

```typescript
addListener(eventName: 'inAppCampaignDismissed', listenerFunc: MoEInAppDismissedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

| Param              | Type                                                                            |
| ------------------ | ------------------------------------------------------------------------------- |
| **`eventName`**    | <code>'inAppCampaignDismissed'</code>                                           |
| **`listenerFunc`** | <code><a href="#moeinappdismissedlistener">MoEInAppDismissedListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

--------------------


### addListener('inAppCampaignCustomAction', ...)

```typescript
addListener(eventName: 'inAppCampaignCustomAction', listenerFunc: MoEInAppCustomActionListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for in-app campaign custom action event

| Param              | Type                                                                                  |
| ------------------ | ------------------------------------------------------------------------------------- |
| **`eventName`**    | <code>'inAppCampaignCustomAction'</code>                                              |
| **`listenerFunc`** | <code><a href="#moeinappcustomactionlistener">MoEInAppCustomActionListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 1.0.0

--------------------


### addListener('inAppCampaignSelfHandled', ...)

```typescript
addListener(eventName: 'inAppCampaignSelfHandled', listenerFunc: MoEInAppSelfHandledListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for in-app campaign self handled available event

`getSelfHandledInApp()` api call returns the available self handled in-app via this listener.

| Param              | Type                                                                                |
| ------------------ | ----------------------------------------------------------------------------------- |
| **`eventName`**    | <code>'inAppCampaignSelfHandled'</code>                                             |
| **`listenerFunc`** | <code><a href="#moeinappselfhandledlistener">MoEInAppSelfHandledListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 1.0.0

--------------------


### addListener('logoutCompleted', ...)

```typescript
addListener(eventName: 'logoutCompleted', listenerFunc: MoELogoutCompleteListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for logout complete event

| Param              | Type                                                                            |
| ------------------ | ------------------------------------------------------------------------------- |
| **`eventName`**    | <code>'logoutCompleted'</code>                                                  |
| **`listenerFunc`** | <code><a href="#moelogoutcompletelistener">MoELogoutCompleteListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 7.0.0

--------------------


### addListener('authenticationError', ...)

```typescript
addListener(eventName: 'authenticationError', listenerFunc: MoEAuthenticationErrorListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for authentication errors from the MoEngage SDK (e.g. JWT validation failures).

| Param              | Type                                                                                      |
| ------------------ | ----------------------------------------------------------------------------------------- |
| **`eventName`**    | <code>'authenticationError'</code>                                                        |
| **`listenerFunc`** | <code><a href="#moeauthenticationerrorlistener">MoEAuthenticationErrorListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 7.1.0

--------------------


### enableAdIdTracking(...)

```typescript
enableAdIdTracking(options: { appId: string; }) => Promise<void>
```

Enables GAID tracking, by default GAID tracking is disabled.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### disableAdIdTracking(...)

```typescript
disableAdIdTracking(options: { appId: string; }) => Promise<void>
```

Disables GAID tracking.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### enableAndroidIdTracking(...)

```typescript
enableAndroidIdTracking(options: { appId: string; }) => Promise<void>
```

Enables Android ID tracking, by default ANdroid ID tracking is disabled.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### disableAndroidIdTracking(...)

```typescript
disableAndroidIdTracking(options: { appId: string; }) => Promise<void>
```

Disables Android ID tracking.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Since:** 2.0.0

--------------------


### setupNotificationChannelsAndroid()

```typescript
setupNotificationChannelsAndroid() => Promise<void>
```

API to create notification channels on Android.

**Since:** 2.0.0

--------------------


### pushPermissionResponseAndroid(...)

```typescript
pushPermissionResponseAndroid(options: { isGranted: boolean; }) => Promise<void>
```

Notify the SDK on notification permission granted to the application.

| Param         | Type                                 |
| ------------- | ------------------------------------ |
| **`options`** | <code>{ isGranted: boolean; }</code> |

**Since:** 2.0.0

--------------------


### navigateToSettingsAndroid()

```typescript
navigateToSettingsAndroid() => Promise<void>
```

Navigates the user to the Notification settings on Android 8 or above,
on older versions the user is navigated the application settings or
application info screen.

--------------------


### requestPushPermissionAndroid()

```typescript
requestPushPermissionAndroid() => Promise<void>
```

Requests the push permission on Android 13 and above.

--------------------


### addListener('onPermissionResult', ...)

```typescript
addListener(eventName: 'onPermissionResult', listenerFunc: MoEPermissionListener) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Listen for permission response

| Param              | Type                                                                    |
| ------------------ | ----------------------------------------------------------------------- |
| **`eventName`**    | <code>'onPermissionResult'</code>                                       |
| **`listenerFunc`** | <code><a href="#moepermissionlistener">MoEPermissionListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 2.0.0

--------------------


### enableDeviceIdTracking(...)

```typescript
enableDeviceIdTracking(options: { appId: string; }) => Promise<void>
```

Enable Device-id tracking. It is enabled by default and should be called only if tracking is disabled at some point.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

--------------------


### disableDeviceIdTracking(...)

```typescript
disableDeviceIdTracking(options: { appId: string; }) => Promise<void>
```

Disables Device-id tracking.

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

--------------------


### updatePushPermissionRequestCountAndroid(...)

```typescript
updatePushPermissionRequestCountAndroid(options: { appId: string; count: number; }) => Promise<void>
```

Updates the Notification request attempt count, the request attempt count will be
incremented by the passed fresh count.

NOTE: Call this API only when the Application is handling the Notification request
permission.

| Param         | Type                                           |
| ------------- | ---------------------------------------------- |
| **`options`** | <code>{ appId: string; count: number; }</code> |

--------------------


### deleteUser(...)

```typescript
deleteUser(options: { appId: string; }, callback: MoEUserDeleteCallback) => Promise<void>
```

Delete Current User Data From MoEngage Server

| Param          | Type                                                                    | Description                                                                                            |
| -------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **`options`**  | <code>{ appId: string; }</code>                                         |                                                                                                        |
| **`callback`** | <code><a href="#moeuserdeletecallback">MoEUserDeleteCallback</a></code> | instance of {@link <a href="#moeuserdeletecallback">MoEUserDeleteCallback</a>} to get the API response |

--------------------


### showNudge(...)

```typescript
showNudge(options: { position: MoENudgePosition; appId: string; }) => Promise<void>
```

Show Nudge

| Param         | Type                                                                                        |
| ------------- | ------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ position: <a href="#moenudgeposition">MoENudgePosition</a>; appId: string; }</code> |

--------------------


### identifyUser(...)

```typescript
identifyUser(options: { identity: string | { [key: string]: string; }; appId: string; }) => Promise<void>
```

Identify User

| Param         | Type                                                                            |
| ------------- | ------------------------------------------------------------------------------- |
| **`options`** | <code>{ identity: string \| { [key: string]: string; }; appId: string; }</code> |

**Since:** 7.0.0

--------------------


### getUserIdentities(...)

```typescript
getUserIdentities(options: { appId: string; }) => Promise<Map<String, String> | null>
```

Get User Identities

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Returns:** <code>Promise&lt;<a href="#map">Map</a>&lt;<a href="#string">String</a>, <a href="#string">String</a>&gt; | null&gt;</code>

**Since:** 7.0.0

--------------------


### getSelfHandledInApps(...)

```typescript
getSelfHandledInApps(options: { appId: string; }) => Promise<MoEInAppSelfHandledCampaignsData>
```

Get Multiple self handled in-app campaigns

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ appId: string; }</code> |

**Returns:** <code>Promise&lt;<a href="#moeinappselfhandledcampaignsdata">MoEInAppSelfHandledCampaignsData</a>&gt;</code>

**Since:** 7.0.0

--------------------


### registerForProvisionalPush()

```typescript
registerForProvisionalPush() => Promise<void>
```

Register For Provisional Push Notifications for iOS

**Since:** 7.0.0

--------------------


### Interfaces


#### MoEInitConfig

| Prop                  | Type                                                              | Description           |
| --------------------- | ----------------------------------------------------------------- | --------------------- |
| **`analyticsConfig`** | <code><a href="#moeanalyticsconfig">MoEAnalyticsConfig</a></code> | Analytics Config data |
| **`pushConfig`**      | <code><a href="#moepushconfig">MoEPushConfig</a></code>           | Push Config data      |


#### MoEAnalyticsConfig

| Prop                                          | Type                 | Description                                                                  |
| --------------------------------------------- | -------------------- | ---------------------------------------------------------------------------- |
| **`shouldTrackUserAttributeBooleanAsNumber`** | <code>boolean</code> | Status of whether boolean user attribute should be tracked as number or not. |


#### MoEPushConfig

| Prop                                         | Type                 | Description                                                                 |
| -------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| **`shouldDeliverCallbackOnForegroundClick`** | <code>boolean</code> | Whether to deliver callback when push notification is clicked in foreground |


#### MoEProperties

User attributes object

| Prop                     | Type                                                                                                      | Description                  |
| ------------------------ | --------------------------------------------------------------------------------------------------------- | ---------------------------- |
| **`generalAttributes`**  | <code><a href="#array">Array</a>&lt;<a href="#moegeneralattributes">MoEGeneralAttributes</a>&gt;</code>   | General Attributes           |
| **`dateTimeAttributes`** | <code><a href="#array">Array</a>&lt;<a href="#moedatetimeattributes">MoEDateTimeAttributes</a>&gt;</code> | Location Attributes          |
| **`locationAttributes`** | <code><a href="#array">Array</a>&lt;<a href="#moelocationattributes">MoELocationAttributes</a>&gt;</code> | Date time Attributes         |
| **`isNonInteractive`**   | <code>boolean</code>                                                                                      | Is the event non-interactive |


#### Array

| Prop         | Type                | Description                                                                                            |
| ------------ | ------------------- | ------------------------------------------------------------------------------------------------------ |
| **`length`** | <code>number</code> | Gets or sets the length of the array. This is a number one higher than the highest index in the array. |

| Method             | Signature                                                                                                                     | Description                                                                                                                                                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **toString**       | () =&gt; string                                                                                                               | Returns a string representation of an array.                                                                                                                                                                                                |
| **toLocaleString** | () =&gt; string                                                                                                               | Returns a string representation of an array. The elements are converted to string using their toLocalString methods.                                                                                                                        |
| **pop**            | () =&gt; T \| undefined                                                                                                       | Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.                                                                                                          |
| **push**           | (...items: T[]) =&gt; number                                                                                                  | Appends new elements to the end of an array, and returns the new length of the array.                                                                                                                                                       |
| **concat**         | (...items: <a href="#concatarray">ConcatArray</a>&lt;T&gt;[]) =&gt; T[]                                                       | Combines two or more arrays. This method returns a new array without modifying any existing arrays.                                                                                                                                         |
| **concat**         | (...items: (T \| <a href="#concatarray">ConcatArray</a>&lt;T&gt;)[]) =&gt; T[]                                                | Combines two or more arrays. This method returns a new array without modifying any existing arrays.                                                                                                                                         |
| **join**           | (separator?: string \| undefined) =&gt; string                                                                                | Adds all the elements of an array into a string, separated by the specified separator string.                                                                                                                                               |
| **reverse**        | () =&gt; T[]                                                                                                                  | Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array.                                                                                                                        |
| **shift**          | () =&gt; T \| undefined                                                                                                       | Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.                                                                                                         |
| **slice**          | (start?: number \| undefined, end?: number \| undefined) =&gt; T[]                                                            | Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array.                           |
| **sort**           | (compareFn?: ((a: T, b: T) =&gt; number) \| undefined) =&gt; this                                                             | Sorts an array in place. This method mutates the array and returns a reference to the same array.                                                                                                                                           |
| **splice**         | (start: number, deleteCount?: number \| undefined) =&gt; T[]                                                                  | Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.                                                                                                                      |
| **splice**         | (start: number, deleteCount: number, ...items: T[]) =&gt; T[]                                                                 | Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.                                                                                                                      |
| **unshift**        | (...items: T[]) =&gt; number                                                                                                  | Inserts new elements at the start of an array, and returns the new length of the array.                                                                                                                                                     |
| **indexOf**        | (searchElement: T, fromIndex?: number \| undefined) =&gt; number                                                              | Returns the index of the first occurrence of a value in an array, or -1 if it is not present.                                                                                                                                               |
| **lastIndexOf**    | (searchElement: T, fromIndex?: number \| undefined) =&gt; number                                                              | Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.                                                                                                                                      |
| **every**          | &lt;S extends T&gt;(predicate: (value: T, index: number, array: T[]) =&gt; value is S, thisArg?: any) =&gt; this is S[]       | Determines whether all the members of an array satisfy the specified test.                                                                                                                                                                  |
| **every**          | (predicate: (value: T, index: number, array: T[]) =&gt; unknown, thisArg?: any) =&gt; boolean                                 | Determines whether all the members of an array satisfy the specified test.                                                                                                                                                                  |
| **some**           | (predicate: (value: T, index: number, array: T[]) =&gt; unknown, thisArg?: any) =&gt; boolean                                 | Determines whether the specified callback function returns true for any element of an array.                                                                                                                                                |
| **forEach**        | (callbackfn: (value: T, index: number, array: T[]) =&gt; void, thisArg?: any) =&gt; void                                      | Performs the specified action for each element in an array.                                                                                                                                                                                 |
| **map**            | &lt;U&gt;(callbackfn: (value: T, index: number, array: T[]) =&gt; U, thisArg?: any) =&gt; U[]                                 | Calls a defined callback function on each element of an array, and returns an array that contains the results.                                                                                                                              |
| **filter**         | &lt;S extends T&gt;(predicate: (value: T, index: number, array: T[]) =&gt; value is S, thisArg?: any) =&gt; S[]               | Returns the elements of an array that meet the condition specified in a callback function.                                                                                                                                                  |
| **filter**         | (predicate: (value: T, index: number, array: T[]) =&gt; unknown, thisArg?: any) =&gt; T[]                                     | Returns the elements of an array that meet the condition specified in a callback function.                                                                                                                                                  |
| **reduce**         | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) =&gt; T) =&gt; T                           | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.                      |
| **reduce**         | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) =&gt; T, initialValue: T) =&gt; T          |                                                                                                                                                                                                                                             |
| **reduce**         | &lt;U&gt;(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) =&gt; U, initialValue: U) =&gt; U | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.                      |
| **reduceRight**    | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) =&gt; T) =&gt; T                           | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
| **reduceRight**    | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) =&gt; T, initialValue: T) =&gt; T          |                                                                                                                                                                                                                                             |
| **reduceRight**    | &lt;U&gt;(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) =&gt; U, initialValue: U) =&gt; U | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |


#### ConcatArray

| Prop         | Type                |
| ------------ | ------------------- |
| **`length`** | <code>number</code> |

| Method    | Signature                                                          |
| --------- | ------------------------------------------------------------------ |
| **join**  | (separator?: string \| undefined) =&gt; string                     |
| **slice** | (start?: number \| undefined, end?: number \| undefined) =&gt; T[] |


#### MoEGeneralAttributes

General Attributes for tracking events

| Prop        | Type                                                             |
| ----------- | ---------------------------------------------------------------- |
| **`name`**  | <code>string</code>                                              |
| **`value`** | <code>string \| number \| boolean \| string[] \| number[]</code> |


#### MoEDateTimeAttributes

Date and time attribute object

| Prop        | Type                | Description                                                   |
| ----------- | ------------------- | ------------------------------------------------------------- |
| **`name`**  | <code>string</code> | Date and time attribute name                                  |
| **`value`** | <code>string</code> | Attribute value in ISO8601 format [yyyy-MM-dd'T'HH:mm:ss'Z']. |


#### MoELocationAttributes

Location attribute object

| Prop        | Type                                                      | Description               |
| ----------- | --------------------------------------------------------- | ------------------------- |
| **`name`**  | <code>string</code>                                       | Location Attribute name   |
| **`value`** | <code><a href="#moegeolocation">MoEGeoLocation</a></code> | Location attribute value. |


#### MoEGeoLocation

Location object

| Prop            | Type                |
| --------------- | ------------------- |
| **`latitude`**  | <code>number</code> |
| **`longitude`** | <code>number</code> |


#### MoEInAppSelfHandledCampaignData

Data for self handled campaign.

| Prop               | Type                                                                                | Description          |
| ------------------ | ----------------------------------------------------------------------------------- | -------------------- |
| **`accountMeta`**  | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code>                           | Account information  |
| **`campaignData`** | <code><a href="#moeinappcampaigndata">MoEInAppCampaignData</a></code>               | In-App Campaign data |
| **`selfHandled`**  | <code><a href="#moeinappselfhandledcampaign">MoEInAppSelfHandledCampaign</a></code> | SelfHandled data     |
| **`platform`**     | <code><a href="#moeplatform">MoEPlatform</a></code>                                 | Platform information |


#### MoEAccountMeta

Account <a href="#object">Object</a>

| Prop        | Type                | Description        |
| ----------- | ------------------- | ------------------ |
| **`appId`** | <code>string</code> | Account identifier |


#### MoEInAppCampaignData

Campaign data.

| Prop                  | Type                                                                        | Description                                                          |
| --------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| **`campaignId`**      | <code>string</code>                                                         | Unique Identifier for the campaign                                   |
| **`campaignName`**    | <code>string</code>                                                         | Name given to the campaign while creation on the MoEngage Dashboard. |
| **`campaignContext`** | <code><a href="#moeinappcampaigncontext">MoEInAppCampaignContext</a></code> | Additional Meta data related to the campaign.                        |


#### MoEInAppCampaignContext

Additional Meta data related to the campaign.

| Prop                      | Type                                                      | Description                                   |
| ------------------------- | --------------------------------------------------------- | --------------------------------------------- |
| **`formattedCampaignId`** | <code>string</code>                                       | Formatted Campaign Id                         |
| **`attributes`**          | <code><a href="#map">Map</a>&lt;string, object&gt;</code> | Additional Meta data related to the campaign. |


#### Map

| Prop       | Type                |
| ---------- | ------------------- |
| **`size`** | <code>number</code> |

| Method      | Signature                                                                                                      |
| ----------- | -------------------------------------------------------------------------------------------------------------- |
| **clear**   | () =&gt; void                                                                                                  |
| **delete**  | (key: K) =&gt; boolean                                                                                         |
| **forEach** | (callbackfn: (value: V, key: K, map: <a href="#map">Map</a>&lt;K, V&gt;) =&gt; void, thisArg?: any) =&gt; void |
| **get**     | (key: K) =&gt; V \| undefined                                                                                  |
| **has**     | (key: K) =&gt; boolean                                                                                         |
| **set**     | (key: K, value: V) =&gt; this                                                                                  |


#### MoEInAppSelfHandledCampaign

Self Handled campaign object

| Prop                  | Type                                                                  | Description                                                     |
| --------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------- |
| **`payload`**         | <code>string</code>                                                   | Self handled campaign payload.                                  |
| **`dismissInterval`** | <code>number</code>                                                   | Interval after which in-app should be dismissed, unit - Seconds |
| **`displayRules`**    | <code><a href="#moeinappdisplayrules">MoEInAppDisplayRules</a></code> | Display rules for the campaign                                  |


#### MoEInAppDisplayRules

Display rules for self handled campaign

| Prop              | Type                                                  | Description                                    |
| ----------------- | ----------------------------------------------------- | ---------------------------------------------- |
| **`screenName`**  | <code>string</code>                                   | Screen name where campaign should be displayed |
| **`contexts`**    | <code><a href="#array">Array</a>&lt;string&gt;</code> | List of contexts                               |
| **`screenNames`** | <code><a href="#array">Array</a>&lt;string&gt;</code> | List of screen names                           |


#### MoEAuthenticationData

Authentication details payload.

| Prop                     | Type                                                                          |
| ------------------------ | ----------------------------------------------------------------------------- |
| **`authenticationType`** | <code><a href="#moeauthenticationtype">MoEAuthenticationType</a></code>       |
| **`data`**               | <code><a href="#moeauthenticationdetails">MoEAuthenticationDetails</a></code> |


#### MoEAuthenticationDetails

Base interface for authentication data.


#### PluginListenerHandle

| Prop         | Type                                      |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |


#### MoEPushTokenData

Push token object

| Prop              | Type                                                      | Description          |
| ----------------- | --------------------------------------------------------- | -------------------- |
| **`platform`**    | <code><a href="#moeplatform">MoEPlatform</a></code>       | Platform type        |
| **`pushService`** | <code><a href="#moepushservice">MoEPushService</a></code> | Type of push service |
| **`token`**       | <code><a href="#string">String</a></code>                 | Push Token           |


#### String

Allows manipulation and formatting of text strings and determination and location of substrings within strings.

| Prop         | Type                | Description                                                  |
| ------------ | ------------------- | ------------------------------------------------------------ |
| **`length`** | <code>number</code> | Returns the length of a <a href="#string">String</a> object. |

| Method                | Signature                                                                                                                      | Description                                                                                                                                   |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **toString**          | () =&gt; string                                                                                                                | Returns a string representation of a string.                                                                                                  |
| **charAt**            | (pos: number) =&gt; string                                                                                                     | Returns the character at the specified index.                                                                                                 |
| **charCodeAt**        | (index: number) =&gt; number                                                                                                   | Returns the Unicode value of the character at the specified location.                                                                         |
| **concat**            | (...strings: string[]) =&gt; string                                                                                            | Returns a string that contains the concatenation of two or more strings.                                                                      |
| **indexOf**           | (searchString: string, position?: number \| undefined) =&gt; number                                                            | Returns the position of the first occurrence of a substring.                                                                                  |
| **lastIndexOf**       | (searchString: string, position?: number \| undefined) =&gt; number                                                            | Returns the last occurrence of a substring in the string.                                                                                     |
| **localeCompare**     | (that: string) =&gt; number                                                                                                    | Determines whether two strings are equivalent in the current locale.                                                                          |
| **match**             | (regexp: string \| <a href="#regexp">RegExp</a>) =&gt; <a href="#regexpmatcharray">RegExpMatchArray</a> \| null                | Matches a string with a regular expression, and returns an array containing the results of that search.                                       |
| **replace**           | (searchValue: string \| <a href="#regexp">RegExp</a>, replaceValue: string) =&gt; string                                       | Replaces text in a string, using a regular expression or search string.                                                                       |
| **replace**           | (searchValue: string \| <a href="#regexp">RegExp</a>, replacer: (substring: string, ...args: any[]) =&gt; string) =&gt; string | Replaces text in a string, using a regular expression or search string.                                                                       |
| **search**            | (regexp: string \| <a href="#regexp">RegExp</a>) =&gt; number                                                                  | Finds the first substring match in a regular expression search.                                                                               |
| **slice**             | (start?: number \| undefined, end?: number \| undefined) =&gt; string                                                          | Returns a section of a string.                                                                                                                |
| **split**             | (separator: string \| <a href="#regexp">RegExp</a>, limit?: number \| undefined) =&gt; string[]                                | Split a string into substrings using the specified separator and return them as an array.                                                     |
| **substring**         | (start: number, end?: number \| undefined) =&gt; string                                                                        | Returns the substring at the specified location within a <a href="#string">String</a> object.                                                 |
| **toLowerCase**       | () =&gt; string                                                                                                                | Converts all the alphabetic characters in a string to lowercase.                                                                              |
| **toLocaleLowerCase** | (locales?: string \| string[] \| undefined) =&gt; string                                                                       | Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.                                   |
| **toUpperCase**       | () =&gt; string                                                                                                                | Converts all the alphabetic characters in a string to uppercase.                                                                              |
| **toLocaleUpperCase** | (locales?: string \| string[] \| undefined) =&gt; string                                                                       | Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. |
| **trim**              | () =&gt; string                                                                                                                | Removes the leading and trailing white space and line terminator characters from a string.                                                    |
| **substr**            | (from: number, length?: number \| undefined) =&gt; string                                                                      | Gets a substring beginning at the specified location and having the specified length.                                                         |
| **valueOf**           | () =&gt; string                                                                                                                | Returns the primitive value of the specified object.                                                                                          |


#### RegExpMatchArray

| Prop        | Type                |
| ----------- | ------------------- |
| **`index`** | <code>number</code> |
| **`input`** | <code>string</code> |


#### RegExp

| Prop             | Type                 | Description                                                                                                                                                          |
| ---------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`source`**     | <code>string</code>  | Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. |
| **`global`**     | <code>boolean</code> | Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only.                                     |
| **`ignoreCase`** | <code>boolean</code> | Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only.                                 |
| **`multiline`**  | <code>boolean</code> | Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only.                                  |
| **`lastIndex`**  | <code>number</code>  |                                                                                                                                                                      |

| Method      | Signature                                                                     | Description                                                                                                                   |
| ----------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **exec**    | (string: string) =&gt; <a href="#regexpexecarray">RegExpExecArray</a> \| null | Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. |
| **test**    | (string: string) =&gt; boolean                                                | Returns a Boolean value that indicates whether or not a pattern exists in a searched string.                                  |
| **compile** | () =&gt; this                                                                 |                                                                                                                               |


#### RegExpExecArray

| Prop        | Type                |
| ----------- | ------------------- |
| **`index`** | <code>number</code> |
| **`input`** | <code>string</code> |


#### MoEPushCampaignData

Push event data

| Prop               | Type                                                        | Description          |
| ------------------ | ----------------------------------------------------------- | -------------------- |
| **`accountMeta`**  | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code>   | Account information  |
| **`pushCampaign`** | <code><a href="#moepushcampaign">MoEPushCampaign</a></code> | Push campaign object |
| **`platform`**     | <code><a href="#moeplatform">MoEPlatform</a></code>         | Platform data        |


#### MoEPushCampaign

Push campaign object

| Prop                  | Type                                                                            | Description                                                               |
| --------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **`isDefaultAction`** | <code>boolean</code>                                                            | Is the click action a defualt action                                      |
| **`clickedAction`**   | <code><a href="#map">Map</a>&lt;<a href="#string">String</a>, object&gt;</code> | Clicked Action data                                                       |
| **`payload`**         | <code><a href="#map">Map</a>&lt;<a href="#string">String</a>, object&gt;</code> | Key-Value Pair entered on the MoEngage Platform during campaign creation. |


#### MoEInAppLifecycleData

In-App lifecycle event camapaign data

| Prop               | Type                                                                  | Description          |
| ------------------ | --------------------------------------------------------------------- | -------------------- |
| **`accountMeta`**  | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code>             | Account information  |
| **`campaignData`** | <code><a href="#moeinappcampaigndata">MoEInAppCampaignData</a></code> | In-App Campaign data |
| **`platform`**     | <code><a href="#moeplatform">MoEPlatform</a></code>                   | Platform information |


#### MoEInAppNavigationData

In-App navigation event campaign data

| Prop               | Type                                                                  | Description            |
| ------------------ | --------------------------------------------------------------------- | ---------------------- |
| **`accountMeta`**  | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code>             | Account information    |
| **`campaignData`** | <code><a href="#moeinappcampaigndata">MoEInAppCampaignData</a></code> | In-App Campaign data   |
| **`navigation`**   | <code><a href="#moeinappnavigation">MoEInAppNavigation</a></code>     | Navigation action data |
| **`platform`**     | <code><a href="#moeplatform">MoEPlatform</a></code>                   | Platform Data          |


#### MoEInAppNavigation

In-App navigation action data

| Prop                 | Type                                                                            | Description                                                               |
| -------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **`actionType`**     | <code><a href="#moeinappactiontype">MoEInAppActionType</a></code>               | InApp Action type                                                         |
| **`navigationType`** | <code>string</code>                                                             | Type of Navigation.                                                       |
| **`navigationUrl`**  | <code>string</code>                                                             | Navigation URL                                                            |
| **`kvPair`**         | <code><a href="#map">Map</a>&lt;string, <a href="#object">Object</a>&gt;</code> | Key-Value Pair entered on the MoEngage Platform during campaign creation. |


#### Object

Provides functionality common to all JavaScript objects.

| Prop              | Type                                          | Description                                                                                                                                |
| ----------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **`constructor`** | <code><a href="#function">Function</a></code> | The initial value of <a href="#object">Object</a>.prototype.constructor is the standard built-in <a href="#object">Object</a> constructor. |

| Method                   | Signature                                                 | Description                                                              |
| ------------------------ | --------------------------------------------------------- | ------------------------------------------------------------------------ |
| **toString**             | () =&gt; string                                           | Returns a string representation of an object.                            |
| **toLocaleString**       | () =&gt; string                                           | Returns a date converted to a string using the current locale.           |
| **valueOf**              | () =&gt; <a href="#object">Object</a>                     | Returns the primitive value of the specified object.                     |
| **hasOwnProperty**       | (v: <a href="#propertykey">PropertyKey</a>) =&gt; boolean | Determines whether an object has a property with the specified name.     |
| **isPrototypeOf**        | (v: <a href="#object">Object</a>) =&gt; boolean           | Determines whether an object exists in another object's prototype chain. |
| **propertyIsEnumerable** | (v: <a href="#propertykey">PropertyKey</a>) =&gt; boolean | Determines whether a specified property is enumerable.                   |


#### Function

Creates a new function.

| Prop            | Type                                          |
| --------------- | --------------------------------------------- |
| **`prototype`** | <code>any</code>                              |
| **`length`**    | <code>number</code>                           |
| **`arguments`** | <code>any</code>                              |
| **`caller`**    | <code><a href="#function">Function</a></code> |

| Method       | Signature                                                                            | Description                                                                                                                                                                                                              |
| ------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **apply**    | (this: <a href="#function">Function</a>, thisArg: any, argArray?: any) =&gt; any     | Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.                                                                     |
| **call**     | (this: <a href="#function">Function</a>, thisArg: any, ...argArray: any[]) =&gt; any | Calls a method of an object, substituting another object for the current object.                                                                                                                                         |
| **bind**     | (this: <a href="#function">Function</a>, thisArg: any, ...argArray: any[]) =&gt; any | For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters. |
| **toString** | () =&gt; string                                                                      | Returns a string representation of a function.                                                                                                                                                                           |


#### MoEInAppCustomActionData

In-App custom event campaign data

| Prop               | Type                                                                  | Description          |
| ------------------ | --------------------------------------------------------------------- | -------------------- |
| **`accountMeta`**  | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code>             | Account information  |
| **`campaignData`** | <code><a href="#moeinappcampaigndata">MoEInAppCampaignData</a></code> | In-App Campaign data |
| **`customAction`** | <code><a href="#moeinappcustomaction">MoEInAppCustomAction</a></code> | Custom Action data   |
| **`platform`**     | <code><a href="#moeplatform">MoEPlatform</a></code>                   | Platform information |


#### MoEInAppCustomAction

In-App custom action data

| Prop             | Type                                                              | Description                                                               |
| ---------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **`actionType`** | <code><a href="#moeinappactiontype">MoEInAppActionType</a></code> | InApp Action type                                                         |
| **`kvPair`**     | <code><a href="#map">Map</a>&lt;string, object&gt;</code>         | Key-Value Pair entered on the MoEngage Platform during campaign creation. |


#### MoELogoutCompleteData

Data returned when a logout operation is successfully completed.

| Prop              | Type                                                      | Description         |
| ----------------- | --------------------------------------------------------- | ------------------- |
| **`accountMeta`** | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code> | Account information |
| **`platform`**    | <code><a href="#moeplatform">MoEPlatform</a></code>       | Platform type       |


#### MoEAuthenticationErrorData

Authentication error data.

| Prop                     | Type                                                                                    |
| ------------------------ | --------------------------------------------------------------------------------------- |
| **`accountMeta`**        | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code>                               |
| **`platform`**           | <code><a href="#moeplatform">MoEPlatform</a></code>                                     |
| **`authenticationType`** | <code><a href="#moeauthenticationtype">MoEAuthenticationType</a></code>                 |
| **`data`**               | <code><a href="#moeauthenticationerrordetails">MoEAuthenticationErrorDetails</a></code> |


#### MoEAuthenticationErrorDetails

Base interface for error data.


#### MoEPermissionResultData

Permission Response Data

| Prop            | Type                                                            | Description         |
| --------------- | --------------------------------------------------------------- | ------------------- |
| **`platform`**  | <code><a href="#moeplatform">MoEPlatform</a></code>             | Platform type       |
| **`isGranted`** | <code>boolean</code>                                            | State of permission |
| **`type`**      | <code><a href="#moepermissiontype">MoEPermissionType</a></code> | Type of permission  |


#### MoEUserDeleteData

User Delete Response Data

| Prop              | Type                                                      | Description             |
| ----------------- | --------------------------------------------------------- | ----------------------- |
| **`accountMeta`** | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code> | Account information     |
| **`isSuccess`**   | <code>boolean</code>                                      | Status of user deletion |


#### MoEInAppSelfHandledCampaignsData

Data for multiple self handled campaigns.

| Prop              | Type                                                                                                                          | Description                                          |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| **`accountMeta`** | <code><a href="#moeaccountmeta">MoEAccountMeta</a></code>                                                                     | Account information                                  |
| **`campaigns`**   | <code><a href="#array">Array</a>&lt;<a href="#moeinappselfhandledcampaigndata">MoEInAppSelfHandledCampaignData</a>&gt;</code> | <a href="#array">Array</a> of self handled campaigns |


### Type Aliases


#### MoEPushTokenListener

<code>(event: <a href="#moepushtokendata">MoEPushTokenData</a>): void</code>


#### MoEPushClickListener

<code>(event: <a href="#moepushcampaigndata">MoEPushCampaignData</a>): void</code>


#### MoEInAppShownListener

<code>(event: <a href="#moeinapplifecycledata">MoEInAppLifecycleData</a>): void</code>


#### MoEInAppClickedListener

<code>(event: <a href="#moeinappnavigationdata">MoEInAppNavigationData</a>): void</code>


#### PropertyKey

<code>string | number | symbol</code>


#### MoEInAppDismissedListener

<code>(event: <a href="#moeinapplifecycledata">MoEInAppLifecycleData</a>): void</code>


#### MoEInAppCustomActionListener

<code>(event: <a href="#moeinappcustomactiondata">MoEInAppCustomActionData</a>): void</code>


#### MoEInAppSelfHandledListener

<code>(event: <a href="#moeinappselfhandledcampaigndata">MoEInAppSelfHandledCampaignData</a>): void</code>


#### MoELogoutCompleteListener

<code>(event: <a href="#moelogoutcompletedata">MoELogoutCompleteData</a>): void</code>


#### MoEAuthenticationErrorListener

<code>(event: <a href="#moeauthenticationerrordata">MoEAuthenticationErrorData</a>): void</code>


#### MoEPermissionListener

<code>(event: <a href="#moepermissionresultdata">MoEPermissionResultData</a>): void</code>


#### MoEUserDeleteCallback

<code>(userDeleteData: <a href="#moeuserdeletedata">MoEUserDeleteData</a>): void</code>


### Enums


#### MoEUserGender

| Members      | Value                 |
| ------------ | --------------------- |
| **`MALE`**   | <code>"male"</code>   |
| **`FEMALE`** | <code>"female"</code> |
| **`OTHER`**  | <code>"other"</code>  |


#### MoEAppStatus

| Members       | Value                  | Description                                           |
| ------------- | ---------------------- | ----------------------------------------------------- |
| **`INSTALL`** | <code>"install"</code> | Fresh installation of the app instance.               |
| **`UPDATE`**  | <code>"update"</code>  | App was already present and user has updated the app. |


#### MoEPlatform

| Members       | Value                  |
| ------------- | ---------------------- |
| **`iOS`**     | <code>"iOS"</code>     |
| **`ANDROID`** | <code>"android"</code> |


#### MoEAuthenticationType

| Members   | Value              |
| --------- | ------------------ |
| **`JWT`** | <code>'JWT'</code> |


#### MoEPushService

| Members        |
| -------------- |
| **`APNS`**     |
| **`FCM`**      |
| **`MI_PUSH`**  |
| **`PUSH_KIT`** |


#### MoEInAppActionType

| Members          | Value                     |
| ---------------- | ------------------------- |
| **`NAVIGATION`** | <code>"navigation"</code> |
| **`CUSTOM`**     | <code>"custom"</code>     |


#### MoEPermissionType

| Members    | Value               |
| ---------- | ------------------- |
| **`PUSH`** | <code>"push"</code> |


#### MoENudgePosition

| Members           | Value                      |
| ----------------- | -------------------------- |
| **`Top`**         | <code>"top"</code>         |
| **`Bottom`**      | <code>"bottom"</code>      |
| **`BottomLeft`**  | <code>"bottomLeft"</code>  |
| **`BottomRight`** | <code>"bottomRight"</code> |
| **`Any`**         | <code>"any"</code>         |

</docgen-api>
