내용으로 건너뛰기

시작하기

터미널 창
bun add @capgo/capacitor-intercom
bunx cap sync
import { CapgoIntercom } from '@capgo/capacitor-intercom';

API 키를 런타임에 초기화하여 Intercom을 초기화합니다. capacitor.config에서 키를 구성하지 않아도 됩니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);

registerIdentifiedUser

__CAPGO_KEEP_0__ 사용자 등록

__CAPGO_KEEP_0__ 사용자 ID 또는 이메일 중 하나 이상을 제공해야 합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);

클립보드 복사

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();

Intercom에서 사용자 속성을 업데이트합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);

Intercom에서 사용자를 로그아웃합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logout();

Intercom에서 사용자 정의 이벤트를 로깅합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logEvent({} as IntercomLogEventOptions);

Intercom 메신저를 열어주세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessenger();

displayMessageComposer

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessageComposer({} as IntercomMessageComposerOptions);

displayHelpCenter

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayHelpCenter();

hideMessenger

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();

displayLauncher

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();

hideLauncher

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();

displayInAppMessages

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();

hideInAppMessages

__CAPGO_KEEP_6__

__CAPGO_KEEP_7__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();

displayCarousel

__CAPGO_KEEP_9__

__CAPGO_KEEP_10__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);

displayArticle

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayArticle({} as IntercomArticleOptions);

displaySurvey

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displaySurvey({} as IntercomSurveyOptions);

setUserHash

__CAPGO_KEEP_6__

__CAPGO_KEEP_7__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserHash({} as IntercomUserHashOptions);

__CAPGO_KEEP_10__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserJwt({} as IntercomUserJwtOptions);

setBottomPadding

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setBottomPadding({} as IntercomBottomPaddingOptions);

sendPushTokenToIntercom

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);

receivePush

__CAPGO_KEEP_6__

__CAPGO_KEEP_7__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);

getUnreadConversationCount

__CAPGO_KEEP_9__

__CAPGO_KEEP_10__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();

IntercomLoadOptions

IntercomLoadOptions
export interface IntercomLoadOptions {
appId?: string;
apiKeyIOS?: string;
apiKeyAndroid?: string;
}

IntercomIdentifiedUserOptions

IntercomIdentifiedUserOptions
export interface IntercomIdentifiedUserOptions {
userId?: string;
email?: string;
}

IntercomUserUpdateOptions

IntercomUserUpdateOptions
export interface IntercomUserUpdateOptions {
userId?: string;
email?: string;
name?: string;
phone?: string;
languageOverride?: string;
customAttributes?: { [key: string]: any };
companies?: IntercomCompany[];
}

IntercomLogEventOptions

IntercomLogEventOptions
export interface IntercomLogEventOptions {
name: string;
data?: { [key: string]: any };
}

IntercomMessageComposerOptions

IntercomMessageComposerOptions
export interface IntercomMessageComposerOptions {
message: string;
}
export interface IntercomCarouselOptions {
carouselId: string;
}
export interface IntercomArticleOptions {
articleId: string;
}
export interface IntercomSurveyOptions {
surveyId: string;
}
export interface IntercomUserHashOptions {
hmac: string;
}
export interface IntercomUserJwtOptions {
jwt: string;
}

IntercomBottomPaddingOptions

IntercomBottomPaddingOptions 섹션 제목
export interface IntercomBottomPaddingOptions {
value: number;
}

IntercomPushTokenOptions

IntercomPushTokenOptions 섹션
export interface IntercomPushTokenOptions {
value: string;
}

실질적인 출처

실질적인 출처 섹션

이 페이지는 플러그인의 src/definitions.ts공개 API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.