0.0.11 • Published 9 months ago

capacitor-clevertap v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

capacitor-clevertap

This plugin partially implements CleverTapAnalytics SDK. It's still under development and has many missing functions.

Follow iOS and Android initial setup instructions.

Install

npm install capacitor-clevertap
npx cap sync

API

profileGetID()

profileGetID() => Promise<{ id: string; }>

Returns: Promise<{ id: string; }>


recordEvent(...)

recordEvent(props: { event: string; properties: any; }) => Promise<void>
ParamType
props{ event: string; properties: any; }

recordChargedEvent(...)

recordChargedEvent(props: { details: any; items: any[]; }) => Promise<void>
ParamType
props{ details: any; items: any[]; }

profileIncrementValue(...)

profileIncrementValue(props: { key: string; value: number; }) => Promise<void>
ParamType
props{ key: string; value: number; }

profilePush(...)

profilePush(props: { profileProperties: any; }) => Promise<void>
ParamType
props{ profileProperties: any; }

setLocation(...)

setLocation(props: { lat: number; lng: number; }) => Promise<void>
ParamType
props{ lat: number; lng: number; }

setPushTokenAs(...)

setPushTokenAs(props: { token: string; }) => Promise<void>
ParamType
props{ token: string; }

onUserLogin(...)

onUserLogin(props: { profileProperties: any; }) => Promise<void>
ParamType
props{ profileProperties: any; }

stopGeofence()

stopGeofence() => Promise<void>

initGeofence()

initGeofence() => Promise<void>

addListener('geofenceInitializedListener', ...)

addListener(eventName: 'geofenceInitializedListener', listenerFunc: (event: { status: string; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'geofenceInitializedListener'
listenerFunc(event: { status: string; }) => void

Returns: Promise<PluginListenerHandle>


addListener('locationUpdateListener', ...)

addListener(eventName: 'locationUpdateListener', listenerFunc: (event: { lat: number; lng: number; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'locationUpdateListener'
listenerFunc(event: { lat: number; lng: number; }) => void

Returns: Promise<PluginListenerHandle>


addListener('geofenceEnteredListener', ...)

addListener(eventName: 'geofenceEnteredListener', listenerFunc: (event: GeofenceStatusChange) => void) => Promise<PluginListenerHandle>
ParamType
eventName'geofenceEnteredListener'
listenerFunc(event: GeofenceStatusChange) => void

Returns: Promise<PluginListenerHandle>


addListener('geofenceExitedListener', ...)

addListener(eventName: 'geofenceExitedListener', listenerFunc: (event: GeofenceStatusChange) => void) => Promise<PluginListenerHandle>
ParamType
eventName'geofenceExitedListener'
listenerFunc(event: GeofenceStatusChange) => void

Returns: Promise<PluginListenerHandle>


checkPermissions()

checkPermissions() => Promise<{ location: PermissionState; backgroundUpdate: PermissionState; }>

Returns: Promise<{ location: PermissionState; backgroundUpdate: PermissionState; }>


requestPermissions()

requestPermissions() => Promise<void>

Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>

GeofenceStatusChange

PropType
idnumber
gcIdnumber
gcNamestring
latnumber
lngnumber
rnumber
triggered_latnumber
triggered_lngnumber

Type Aliases

PermissionState

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

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.1

10 months ago