Custom Capacitor Plugin To have communication with Emarsys SDK
npm install capacitor-emarsys-sdk-plugin
npx cap sync
echo(...)
addListener('pushMessageEvent', ...)
getUUID(...)
requestPermissions()
checkPermissions()
setContact(...)
getPushToken()
register()
checkPermissions()
clearContact(...)
- Interfaces
- Type Aliases
echo(options: { value: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options |
{ value: string; } |
Returns: Promise<{ value: string; }>
addListener(eventName: 'pushMessageEvent', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param | Type |
---|---|
eventName |
'pushMessageEvent' |
listenerFunc |
(event: PushMessageEvent) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
getUUID(value: string) => Promise<{ value: string; }>
Param | Type |
---|---|
value |
string |
Returns: Promise<{ value: string; }>
requestPermissions() => Promise<PermissionStatus>
Returns: Promise<any>
checkPermissions() => Promise<PermissionStatus>
Returns: Promise<any>
setContact(options: SetContactOptions) => Promise<void>
Param | Type |
---|---|
options |
SetContactOptions |
getPushToken() => Promise<TokenResult>
Returns: Promise<TokenResult>
register() => Promise<TokenResult>
Returns: Promise<TokenResult>
checkPermissions() => Promise<PermissionStatus>
Returns: Promise<any>
clearContact(options: SetContactOptions) => Promise<void>
Param | Type |
---|---|
options |
SetContactOptions |
Prop | Type |
---|---|
remove |
() => Promise<void> |
Prop | Type | Since |
---|---|---|
eventName |
string |
1.0.0 |
data |
{ key: string; value: string; }[] |
1.0.0 |
Prop | Type | Since |
---|---|---|
receive |
PermissionState |
1.0.0 |
Prop | Type | Since |
---|---|---|
contactFieldValue |
string |
1.0.0 |
Prop | Type | Since |
---|---|---|
token |
string |
1.0.0 |
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'