Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Cap-go/capacitor-crisp
Crisp native SDK for capacitor
https://github.com/Cap-go/capacitor-crisp
android capacitor capacitor-plugin crisp ionic ios
Last synced: 24 days ago
JSON representation
Crisp native SDK for capacitor
- Host: GitHub
- URL: https://github.com/Cap-go/capacitor-crisp
- Owner: Cap-go
- Created: 2021-11-20T00:08:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-12T21:40:57.000Z (10 months ago)
- Last Synced: 2024-04-13T23:10:40.565Z (8 months ago)
- Topics: android, capacitor, capacitor-plugin, crisp, ionic, ios
- Language: Swift
- Homepage: https://www.npmjs.com/package/capacitor-crisp
- Size: 610 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-capacitorjs - @capgo/capacitor-crisp - Crisp chat SDK for your app. (Plugins / Community Plugins)
- awesome-capacitor - Crisp - Crisp chat SDK for your app. ([Capgo plugins](https://capgo.app/))
README
➡️ Get Instant updates for your App with Capgo 🚀
Fix your annoying bug now, Hire a Capacitor expert 💪
Crisp native SDK for capacitor## Install
```bash
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: '******-****-****-****-********'})
```
### iOSTo 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* [`configure(...)`](#configure)
* [`openMessenger()`](#openmessenger)
* [`setTokenID(...)`](#settokenid)
* [`setUser(...)`](#setuser)
* [`pushEvent(...)`](#pushevent)
* [`setCompany(...)`](#setcompany)
* [`setInt(...)`](#setint)
* [`setString(...)`](#setstring)
* [`sendMessage(...)`](#sendmessage)
* [`setSegment(...)`](#setsegment)
* [`reset()`](#reset)
* [Type Aliases](#type-aliases)### configure(...)
```typescript
configure(data: { websiteID: string; }) => Promise
```| Param | Type |
| ---------- | ----------------------------------- |
| **`data`** |{ websiteID: string; }
|--------------------
### openMessenger()
```typescript
openMessenger() => Promise
```--------------------
### setTokenID(...)
```typescript
setTokenID(data: { tokenID: string; }) => Promise
```| Param | Type |
| ---------- | --------------------------------- |
| **`data`** |{ tokenID: string; }
|--------------------
### setUser(...)
```typescript
setUser(data: { nickname?: string; phone?: string; email?: string; avatar?: string; }) => Promise
```| Param | Type |
| ---------- | ------------------------------------------------------------------------------------ |
| **`data`** |{ nickname?: string; phone?: string; email?: string; avatar?: string; }
|--------------------
### pushEvent(...)
```typescript
pushEvent(data: { name: string; color: eventColor; }) => Promise
```| Param | Type |
| ---------- | --------------------------------------------------------------------------- |
| **`data`** |{ name: string; color: eventColor; }
|--------------------
### setCompany(...)
```typescript
setCompany(data: { name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; }) => Promise
```| Param | Type |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`data`** |{ name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; }
|--------------------
### setInt(...)
```typescript
setInt(data: { key: string; value: number; }) => Promise
```| Param | Type |
| ---------- | -------------------------------------------- |
| **`data`** |{ key: string; value: number; }
|--------------------
### setString(...)
```typescript
setString(data: { key: string; value: string; }) => Promise
```| Param | Type |
| ---------- | -------------------------------------------- |
| **`data`** |{ key: string; value: string; }
|--------------------
### sendMessage(...)
```typescript
sendMessage(data: { value: string; }) => Promise
```| Param | Type |
| ---------- | ------------------------------- |
| **`data`** |{ value: string; }
|--------------------
### setSegment(...)
```typescript
setSegment(data: { segment: string; }) => Promise
```| Param | Type |
| ---------- | --------------------------------- |
| **`data`** |{ segment: string; }
|--------------------
### reset()
```typescript
reset() => Promise
```--------------------
### Type Aliases
#### eventColor
"red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "brown" | "grey" | "black"