Aigens Order.Place aigens-sdk-appboy Plugin
npm install @aigens/aigens-sdk-appboyAigens Order.Place Core Plugin
``bash`
npm install @aigens/aigens-sdk-appboy
npx cap sync
* checkPermissions()
* requestPermissions()
* registerForRemoteNotifications()
* setRegisteredPushToken(...)
* changeUser(...)
* logCustomEvent(...)
* logPurchase(...)
* disableSdk()
* enableSdk()
* wipeData()
* requestImmediateDataFlush()
* setAppboyMember(...)
* setFirstName(...)
* setLastName(...)
* setEmail(...)
* setGender(...)
* setDateOfBirth(...)
* setCountry(...)
* setHomeCity(...)
* setPhoneNumber(...)
* setPushNotificationSubscriptionType(...)
* setEmailNotificationSubscriptionType(...)
* setUserAttributionData(...)
* setBoolCustomUserAttribute(...)
* setStringCustomUserAttribute(...)
* setDoubleCustomUserAttribute(...)
* setDateCustomUserAttribute(...)
* setIntCustomUserAttribute(...)
* setCustomUserAttributeArray(...)
* unsetCustomUserAttribute(...)
* incrementCustomUserAttribute(...)
* addToCustomAttributeArray(...)
* removeFromCustomAttributeArray(...)
* addAlias(...)
* setLanguage(...)
* addToSubscriptionGroup(...)
* removeFromSubscriptionGroup(...)
* getDeviceId()
* addListener('afterInAppMessageViewClosed', ...)
* addListener('afterInAppMessageViewOpened', ...)
* addListener('beforeInAppMessageViewClosed', ...)
* addListener('beforeInAppMessageViewOpened', ...)
* addListener('onInAppMessageButtonClicked', ...)
* addListener('onInAppMessageClicked', ...)
* addListener('onInAppMessageDismissed', ...)
* Interfaces
* Type Aliases
`typescript`
checkPermissions() => Promise
Returns: Promise<PermissionStatus>
--------------------
`typescript`
requestPermissions() => Promise
Returns: Promise<PermissionStatus>
--------------------
`typescript`
registerForRemoteNotifications() => Promise
Returns: Promise<any>
--------------------
`typescript`
setRegisteredPushToken(options: { token: string; }) => Promise
| Param | Type |
| ------------- | ------------------------------- |
| options | { token: string; } |
Returns: Promise<any>
--------------------
`typescript`
changeUser(options: { userId: string; }) => Promise
| Param | Type |
| ------------- | -------------------------------- |
| options | { userId: string; } |
Returns: Promise<any>
--------------------
`typescript`
logCustomEvent(options: { eventName: string; properties?: object; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------------------- |
| options | { eventName: string; properties?: object; } |
Returns: Promise<any>
--------------------
`typescript`
logPurchase(options: { productId: string; price: string; quantity: number; currency: string; properties?: object; }) => Promise
| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------------------------- |
| options | { productId: string; price: string; quantity: number; currency: string; properties?: object; } |
Returns: Promise<any>
--------------------
`typescript`
disableSdk() => Promise
Returns: Promise<any>
--------------------
`typescript`
enableSdk() => Promise
Returns: Promise<any>
--------------------
`typescript`
wipeData() => Promise
Returns: Promise<any>
--------------------
`typescript`
requestImmediateDataFlush() => Promise
Returns: Promise<any>
--------------------
`typescript`
setAppboyMember(options: AppboyMember) => Promise
| Param | Type |
| ------------- | ----------------------------------------------------- |
| options | AppboyMember |
Returns: Promise<any>
--------------------
`typescript`
setFirstName(options: { firstName: string; }) => Promise
| Param | Type |
| ------------- | ----------------------------------- |
| options | { firstName: string; } |
Returns: Promise<any>
--------------------
`typescript`
setLastName(options: { lastName: string; }) => Promise
| Param | Type |
| ------------- | ---------------------------------- |
| options | { lastName: string; } |
Returns: Promise<any>
--------------------
`typescript`
setEmail(options: { email: string; }) => Promise
| Param | Type |
| ------------- | ------------------------------- |
| options | { email: string; } |
Returns: Promise<any>
--------------------
`typescript`
setGender(options: { gender: 'f' | 'm' | 'o' | 'u'; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------------- |
| options | { gender: 'f' \| 'm' \| 'o' \| 'u'; } |
Returns: Promise<any>
--------------------
`typescript`
setDateOfBirth(options: { year: number; month: number; day: number; }) => Promise
| Param | Type |
| ------------- | ---------------------------------------------------------- |
| options | { year: number; month: number; day: number; } |
Returns: Promise<any>
--------------------
`typescript`
setCountry(options: { country: string; }) => Promise
| Param | Type |
| ------------- | --------------------------------- |
| options | { country: string; } |
Returns: Promise<any>
--------------------
`typescript`
setHomeCity(options: { homeCity: string; }) => Promise
| Param | Type |
| ------------- | ---------------------------------- |
| options | { homeCity: string; } |
Returns: Promise<any>
--------------------
`typescript`
setPhoneNumber(options: { phoneNumber: string; }) => Promise
| Param | Type |
| ------------- | ------------------------------------- |
| options | { phoneNumber: string; } |
Returns: Promise<any>
--------------------
`typescript`
setPushNotificationSubscriptionType(options: { subscriptionState: 'optedIn' | 'subscribed' | 'unsubscribed'; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------------------------------------------- |
| options | { subscriptionState: 'optedIn' \| 'subscribed' \| 'unsubscribed'; } |
Returns: Promise<any>
--------------------
`typescript`
setEmailNotificationSubscriptionType(options: { subscriptionState: 'optedIn' | 'subscribed' | 'unsubscribed'; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------------------------------------------- |
| options | { subscriptionState: 'optedIn' \| 'subscribed' \| 'unsubscribed'; } |
Returns: Promise<any>
--------------------
`typescript`
setUserAttributionData(options: { network: string; campaign: string; adGroup: string; creative: string; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------------------------------------------------- |
| options | { network: string; campaign: string; adGroup: string; creative: string; } |
Returns: Promise<any>
--------------------
`typescript`
setBoolCustomUserAttribute(options: { key: string; value: boolean; }) => Promise
| Param | Type |
| ------------- | --------------------------------------------- |
| options | { key: string; value: boolean; } |
Returns: Promise<any>
--------------------
`typescript`
setStringCustomUserAttribute(options: { key: string; value: string; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------- |
| options | { key: string; value: string; } |
Returns: Promise<any>
--------------------
`typescript`
setDoubleCustomUserAttribute(options: { key: string; value: number; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------- |
| options | { key: string; value: number; } |
Returns: Promise<any>
--------------------
`typescript`
setDateCustomUserAttribute(options: { key: string; value: number; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------- |
| options | { key: string; value: number; } |
Returns: Promise<any>
--------------------
`typescript`
setIntCustomUserAttribute(options: { key: string; value: number; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------- |
| options | { key: string; value: number; } |
Returns: Promise<any>
--------------------
`typescript`
setCustomUserAttributeArray(options: { key: string; value: string[]; }) => Promise
| Param | Type |
| ------------- | ---------------------------------------------- |
| options | { key: string; value: string[]; } |
Returns: Promise<any>
--------------------
`typescript`
unsetCustomUserAttribute(options: { key: string; }) => Promise
| Param | Type |
| ------------- | ----------------------------- |
| options | { key: string; } |
Returns: Promise<any>
--------------------
`typescript`
incrementCustomUserAttribute(options: { key: string; value: number; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------- |
| options | { key: string; value: number; } |
Returns: Promise<any>
--------------------
`typescript`
addToCustomAttributeArray(options: { key: string; value: string; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------- |
| options | { key: string; value: string; } |
Returns: Promise<any>
--------------------
`typescript`
removeFromCustomAttributeArray(options: { key: string; value: string; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------- |
| options | { key: string; value: string; } |
Returns: Promise<any>
--------------------
`typescript`
addAlias(options: { aliasName: string; aliasLabel: string; }) => Promise
| Param | Type |
| ------------- | ------------------------------------------------------- |
| options | { aliasName: string; aliasLabel: string; } |
Returns: Promise<any>
--------------------
`typescript`
setLanguage(options: { language: string; }) => Promise
| Param | Type |
| ------------- | ---------------------------------- |
| options | { language: string; } |
Returns: Promise<any>
--------------------
`typescript`
addToSubscriptionGroup(options: { groupId: string; }) => Promise
| Param | Type |
| ------------- | --------------------------------- |
| options | { groupId: string; } |
Returns: Promise<any>
--------------------
`typescript`
removeFromSubscriptionGroup(options: { groupId: string; }) => Promise
| Param | Type |
| ------------- | --------------------------------- |
| options | { groupId: string; } |
Returns: Promise<any>
--------------------
`typescript`
getDeviceId() => Promise
Returns: Promise<any>
--------------------
`typescript`
addListener(eventName: 'afterInAppMessageViewClosed', listenerFunc: (res: any) => void) => Promise
| Param | Type |
| ------------------ | ------------------------------------------ |
| eventName | 'afterInAppMessageViewClosed' |
| listenerFunc | (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
`typescript`
addListener(eventName: 'afterInAppMessageViewOpened', listenerFunc: (res: any) => void) => Promise
| Param | Type |
| ------------------ | ------------------------------------------ |
| eventName | 'afterInAppMessageViewOpened' |
| listenerFunc | (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
`typescript`
addListener(eventName: 'beforeInAppMessageViewClosed', listenerFunc: (res: any) => void) => Promise
| Param | Type |
| ------------------ | ------------------------------------------- |
| eventName | 'beforeInAppMessageViewClosed' |
| listenerFunc | (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
`typescript`
addListener(eventName: 'beforeInAppMessageViewOpened', listenerFunc: (res: any) => void) => Promise
| Param | Type |
| ------------------ | ------------------------------------------- |
| eventName | 'beforeInAppMessageViewOpened' |
| listenerFunc | (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
`typescript`
addListener(eventName: 'onInAppMessageButtonClicked', listenerFunc: (res: any) => void) => Promise
| Param | Type |
| ------------------ | ------------------------------------------ |
| eventName | 'onInAppMessageButtonClicked' |
| listenerFunc | (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
`typescript`
addListener(eventName: 'onInAppMessageClicked', listenerFunc: (res: any) => void) => Promise
| Param | Type |
| ------------------ | ------------------------------------ |
| eventName | 'onInAppMessageClicked' |
| listenerFunc | (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
`typescript`
addListener(eventName: 'onInAppMessageDismissed', listenerFunc: (res: any) => void) => Promise
| Param | Type |
| ------------------ | -------------------------------------- |
| eventName | 'onInAppMessageDismissed' |
| listenerFunc | (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
#### PermissionStatus
| Prop | Type | Description | Since |
| ------------- | ----------------------------------------------------------- | -------------------------------------------- | ----- |
| receive | PermissionState | Permission state of receiving notifications. | 1.0.0 |
#### AppboyMember
| Prop | Type |
| ----------------- | ---------------------------------------------------------- |
| firstName | string |
| lastName | string |
| email | string |
| gender | 'f' \| 'm' \| 'o' \| 'u' |
| dateOfBirth | { year: number; month: number; day: number; } |
| country | string |
| homeCity | string |
| phoneNumber | string |
#### PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove` | () => Promise<void> |
#### PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'