@salurusrinivasarao/emarsys-sdk-wrapper-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

capacitor-emarsys-sdk-plugin

Custom Capacitor Plugin To have communication with Emarsys SDK

Install

npm install capacitor-emarsys-sdk-plugin
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
Param Type
options { value: string; }

Returns: Promise<{ value: string; }>


addListener('pushMessageEvent', ...)

addListener(eventName: 'pushMessageEvent', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
eventName 'pushMessageEvent'
listenerFunc (event: PushMessageEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


getUUID(...)

getUUID(value: string) => Promise<{ value: string; }>
Param Type
value string

Returns: Promise<{ value: string; }>


requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Returns: Promise<any>


checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<any>


setContact(...)

setContact(options: SetContactOptions) => Promise<void>
Param Type
options SetContactOptions

getPushToken()

getPushToken() => Promise<TokenResult>

Returns: Promise<TokenResult>


register()

register() => Promise<TokenResult>

Returns: Promise<TokenResult>


checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<any>


clearContact(...)

clearContact(options: SetContactOptions) => Promise<void>
Param Type
options SetContactOptions

setPushTokenFirebase(...)

setPushTokenFirebase(data: { value: string; }) => Promise<ITokenInitializationStatus>
Param Type
data { value: string; }

Returns: Promise<ITokenInitializationStatus>


setPushMessage(...)

setPushMessage(data: PushMessageDTO) => Promise<{ value: PushMessageDTO; }>
Param Type
data PushMessageDTO

Returns: Promise<{ value: PushMessageDTO; }>


getUserInfo(...)

getUserInfo(data: UserInformationDTO) => Promise<{ value: unknown; }>
Param Type
data UserInformationDTO

Returns: Promise<{ value: unknown; }>


setUser(...)

setUser(data: { value: string; }) => Promise<void>
Param Type
data { value: string; }

clearUser()

clearUser() => Promise<void>

getDeviceInformation(...)

getDeviceInformation(options?: { value?: string | undefined; } | undefined) => Promise<{ value: string; }>
Param Type
options { value?: string; }

Returns: Promise<{ value: string; }>


trackEvent(...)

trackEvent(options?: { eventName: string; eventAttributes: any; } | undefined) => Promise<{ value: string; }>
Param Type
options { eventName: string; eventAttributes: any; }

Returns: Promise<{ value: string; }>


loadInlineInapp(...)

loadInlineInapp(data: { inAppName: string; }) => Promise<void>
Param Type
data { inAppName: string; }

addListener(eventName: 'EmarsysInAppDeepLink', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
eventName 'EmarsysInAppDeepLink'
listenerFunc (event: PushMessageEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


addListener('EmarsysInAppApplicationEvent', ...)

addListener(eventName: 'EmarsysInAppApplicationEvent', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
eventName 'EmarsysInAppApplicationEvent'
listenerFunc (event: PushMessageEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


addListener(eventName: 'EmarsysPushDeepLink', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
eventName 'EmarsysPushDeepLink'
listenerFunc (event: PushMessageEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


addListener('EmarsysPushApplicationEvent', ...)

addListener(eventName: 'EmarsysPushApplicationEvent', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
eventName 'EmarsysPushApplicationEvent'
listenerFunc (event: PushMessageEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


addListener('EmarsysPushNotificationReceived', ...)

addListener(eventName: 'EmarsysPushNotificationReceived', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
eventName 'EmarsysPushNotificationReceived'
listenerFunc (event: PushMessageEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


Interfaces

PluginListenerHandle

Prop Type
remove () => Promise<void>

PushMessageEvent

Prop Type Since
eventName string 1.0.0
data { key: string; value: string; }[] 1.0.0

PermissionStatus

Prop Type Since
receive PermissionState 1.0.0

SetContactOptions

Prop Type Since
contactFieldValue string 1.0.0

TokenResult

Prop Type Since
token string 1.0.0

ITokenInitializationStatus

Prop Type
status string
isError boolean

PushMessageDTO

Prop Type
title string
text string
image string

UserInformationDTO

Prop Type
firebaseToken string
userId string

Type Aliases

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

Readme

Keywords

Package Sidebar

Install

npm i @salurusrinivasarao/emarsys-sdk-wrapper-plugin

Weekly Downloads

7

Version

1.0.5

License

MIT

Unpacked Size

111 kB

Total Files

44

Last publish

Collaborators

  • salurusrinivasarao