1.0.18 • Published 3 years ago
capacitor-crisp v1.0.18
capacitor-crisp
Crisp native SDK for capacitor
Install
npm install capacitor-crisp
npx cap sync
Init
Call configure in your code Before any other method :
import { CapacitorCrisp } from 'capacitor-crisp';
CapacitorCrisp.configure({websiteID: '******-****-****-****-********'})
iOS
To enable your users to take and upload photos to the chat as well as download photos to their photo library, add :
Privacy - Camera Usage Description (NSCameraUsageDescription)
Privacy - Photo Library Additions Usage Description (NSPhotoLibraryAddUsageDescription)
to your app's Info.plist.
Android Integration
Nothing special to do.
Open chatbox
import { CapacitorCrisp } from 'capacitor-crisp';
CapacitorCrisp.openMessenger()
API
configure(...)
openMessenger()
setTokenID(...)
setUser(...)
pushEvent(...)
setCompany(...)
setInt(...)
setString(...)
sendMessage(...)
setSegment(...)
reset()
- Type Aliases
configure(...)
configure(data: { websiteID: string; }) => Promise<void>
Param | Type |
---|---|
data | { websiteID: string; } |
openMessenger()
openMessenger() => Promise<void>
setTokenID(...)
setTokenID(data: { tokenID: string; }) => Promise<void>
Param | Type |
---|---|
data | { tokenID: string; } |
setUser(...)
setUser(data: { nickname?: string; phone?: string; email?: string; avatar?: string; }) => Promise<void>
Param | Type |
---|---|
data | { nickname?: string; phone?: string; email?: string; avatar?: string; } |
pushEvent(...)
pushEvent(data: { name: string; color: eventColor; }) => Promise<void>
Param | Type |
---|---|
data | { name: string; color: eventColor; } |
setCompany(...)
setCompany(data: { name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; }) => Promise<void>
Param | Type |
---|---|
data | { name: string; url?: string; description?: string; employment?: title: string, role: string; geolocation?: country: string, city: string; } |
setInt(...)
setInt(data: { key: string; value: number; }) => Promise<void>
Param | Type |
---|---|
data | { key: string; value: number; } |
setString(...)
setString(data: { key: string; value: string; }) => Promise<void>
Param | Type |
---|---|
data | { key: string; value: string; } |
sendMessage(...)
sendMessage(data: { value: string; }) => Promise<void>
Param | Type |
---|---|
data | { value: string; } |
setSegment(...)
setSegment(data: { segment: string; }) => Promise<void>
Param | Type |
---|---|
data | { segment: string; } |
reset()
reset() => Promise<void>
Type Aliases
eventColor
"red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "brown" | "grey" | "black"
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.0.1
3 years ago