@sencrop/capacitor-intercom
Intercom Plugin for Capacitor
Install
npm install @sencrop/capacitor-intercom
npx cap sync
API
initialize(...)
initialize(config: IntercomSettings) => void
loginIdentifiedUser(...)
loginIdentifiedUser(identity: IntercomIdentity) => Promise<void>
loginUnidentifiedUser()
loginUnidentifiedUser() => Promise<void>
updateUser(...)
updateUser(user: IntercomUser) => Promise<void>
logout()
logout() => Promise<void>
logEvent(...)
logEvent(event: IntercomEvent) => Promise<void>
displayMessenger()
displayMessenger() => Promise<void>
displayMessageComposer(...)
displayMessageComposer(message: IntercomMessage) => Promise<void>
displayHelpCenter()
displayHelpCenter() => Promise<void>
displayArticle(...)
displayArticle(article: IntercomArticle) => Promise<void>
hideMessenger()
hideMessenger() => Promise<void>
displayLauncher()
displayLauncher() => Promise<void>
hideLauncher()
hideLauncher() => Promise<void>
setCustomAttributes(...)
setCustomAttributes(payload: IntercomCustomAttributes) => Promise<void>
displaySurvey(...)
displaySurvey(survey: IntercomSurvey) => Promise<void>
Interfaces
IntercomSettings
Prop | Type |
---|
app_id | string |
api_base | string |
alignment | string |
custom_launcher_selector | string |
hide_default_launcher | boolean |
horizontal_padding | number |
session_duration | number |
vertical_padding | number |
action_color | string |
background_color | string |
email | string |
phone | string |
created_at | number |
name | string |
user_id | string |
user_hash | string |
unsubscribed_from_emails | boolean |
language_override | string |
utm_campaign | string |
utm_content | string |
utm_medium | string |
utm_source | string |
utm_term | string |
company | IntercomCompany |
companies | IntercomCompany[] |
avatar | IntercomAvatar |
IntercomCompany
Prop | Type |
---|
name | string |
id | string | number |
company_id | string | number |
created_at | number |
remote_created_at | number |
plan | string |
monthly_spend | number |
user_count | number |
size | number |
website | string |
industry | string |
IntercomAvatar
Prop | Type |
---|
type | 'avatar' |
image_url | string |
IntercomIdentity
Prop | Type |
---|
userId | string |
email | string |
userHash | string |
IntercomUser
Prop | Type |
---|
email | string |
phone | string |
name | string |
language | string |
IntercomEvent
Prop | Type |
---|
name | string |
data | any |
IntercomMessage
IntercomArticle
IntercomCustomAttributes
Prop | Type |
---|
attributes | Record<string, number | string | boolean> |
IntercomSurvey
Type Aliases
Record
Construct a type with a set of properties K of type T
{
[P in K]: T;
}