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

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

Type Aliases

PermissionState

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