Custom Capacitor Plugin To have communication with Emarsys SDK
npm install capacitor-emarsys-sdk-plugin
npx cap sync
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; }>
Returns: Promise<{ value: string; }>
requestPermissions() => Promise<PermissionStatus>
Returns: Promise<any>
checkPermissions() => Promise<PermissionStatus>
Returns: Promise<any>
setContact(options: SetContactOptions) => Promise<void>
getPushToken() => Promise<TokenResult>
Returns: Promise<TokenResult>
register() => Promise<TokenResult>
Returns: Promise<TokenResult>
checkPermissions() => Promise<PermissionStatus>
Returns: Promise<any>
clearContact(options: SetContactOptions) => Promise<void>
setPushTokenFirebase(data: { value: string; }) => Promise<ITokenInitializationStatus>
Param |
Type |
data |
{ value: string; } |
Returns: Promise<ITokenInitializationStatus>
setPushMessage(data: PushMessageDTO) => Promise<{ value: PushMessageDTO; }>
Returns: Promise<{ value: PushMessageDTO; }>
getUserInfo(data: UserInformationDTO) => Promise<{ value: unknown; }>
Returns: Promise<{ value: unknown; }>
setUser(data: { value: string; }) => Promise<void>
Param |
Type |
data |
{ value: string; } |
clearUser() => Promise<void>
getDeviceInformation(options?: { value?: string | undefined; } | undefined) => Promise<{ value: string; }>
Param |
Type |
options |
{ value?: string; } |
Returns: Promise<{ value: string; }>
trackEvent(options?: { eventName: string; eventAttributes: any; } | undefined) => Promise<{ value: string; }>
Param |
Type |
options |
{ eventName: string; eventAttributes: any; } |
Returns: Promise<{ value: string; }>
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(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(eventName: 'EmarsysPushApplicationEvent', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param |
Type |
eventName |
'EmarsysPushApplicationEvent' |
listenerFunc |
(event: PushMessageEvent) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: 'EmarsysPushNotificationReceived', listenerFunc: (event: PushMessageEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param |
Type |
eventName |
'EmarsysPushNotificationReceived' |
listenerFunc |
(event: PushMessageEvent) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Prop |
Type |
remove |
() => Promise<void> |
Prop |
Type |
Since |
eventName |
string |
1.0.0 |
data |
{ key: string; value: string; }[] |
1.0.0 |
Prop |
Type |
Since |
contactFieldValue |
string |
1.0.0 |
Prop |
Type |
Since |
token |
string |
1.0.0 |
Prop |
Type |
status |
string |
isError |
boolean |
Prop |
Type |
title |
string |
text |
string |
image |
string |
Prop |
Type |
firebaseToken |
string |
userId |
string |
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'