Home

Awesome

capacitor-crisp

<a href="https://capgo.app/"><img src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/></a>

<div align="center"> <h2><a href="https://capgo.app/?ref=plugin"> ➡️ Get Instant updates for your App with Capgo 🚀</a></h2> <h2><a href="https://capgo.app/consulting/?ref=plugin"> Fix your annoying bug now, Hire a Capacitor expert 💪</a></h2> </div> Crisp native SDK for capacitor

Install

npm install @capgo/capacitor-crisp
npx cap sync

Init

Call configure in your code Before any other method :

import { CapacitorCrisp } from '@capgo/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 '@capgo/capacitor-crisp';

CapacitorCrisp.openMessenger()

API

<docgen-index> </docgen-index> <docgen-api> <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

configure(...)

configure(data: { websiteID: string; }) => Promise<void>
ParamType
data<code>{ websiteID: string; }</code>

openMessenger()

openMessenger() => Promise<void>

setTokenID(...)

setTokenID(data: { tokenID: string; }) => Promise<void>
ParamType
data<code>{ tokenID: string; }</code>

setUser(...)

setUser(data: { nickname?: string; phone?: string; email?: string; avatar?: string; }) => Promise<void>
ParamType
data<code>{ nickname?: string; phone?: string; email?: string; avatar?: string; }</code>

pushEvent(...)

pushEvent(data: { name: string; color: eventColor; }) => Promise<void>
ParamType
data<code>{ name: string; color: <a href="#eventcolor">eventColor</a>; }</code>

setCompany(...)

setCompany(data: { name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; }) => Promise<void>
ParamType
data<code>{ name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; }</code>

setInt(...)

setInt(data: { key: string; value: number; }) => Promise<void>
ParamType
data<code>{ key: string; value: number; }</code>

setString(...)

setString(data: { key: string; value: string; }) => Promise<void>
ParamType
data<code>{ key: string; value: string; }</code>

sendMessage(...)

sendMessage(data: { value: string; }) => Promise<void>
ParamType
data<code>{ value: string; }</code>

setSegment(...)

setSegment(data: { segment: string; }) => Promise<void>
ParamType
data<code>{ segment: string; }</code>

reset()

reset() => Promise<void>

Type Aliases

eventColor

<code>"red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "brown" | "grey" | "black"</code>

</docgen-api>