コンテンツにスキップ

Getting Started

GitHub

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

ターミナル画面
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

次に、以下のコマンドを使用してください:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intercom` plugin in my project.

Manual Setupを使用する場合は、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム固有の説明を参照してください:

ターミナル画面
bun add @capgo/capacitor-intercom
bunx cap sync
import { CapgoIntercom } from '@capgo/capacitor-intercom';

loadWithKeys

loadWithKeys

実行時にAPIキーの設定を使用してIntercomを初期化します。 capacitor.configにキーの設定を含めない場合はこちらを使用してください。

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

registerIdentifiedUser

ユーザーを登録

Section titled “registerIdentifiedUser”

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

registerUnidentifiedUser

Copy to clipboard

Section titled “registerUnidentifiedUser”

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

Copy to clipboard

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();

メッセージコンポーザーを開き、メッセージを事前に埋め込みます。

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

Open the Intercom help center.

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

Hide the Intercom messenger.

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

Show the Intercom launcher button.

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

Hide the Intercom launcher button.

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

Intercomからインアプリメッセージを有効にします。

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

Intercomからインアプリメッセージを無効にします。

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

特定のIntercomカーレルを表示します。

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

特定のIntercom記事を表示します。

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

Display a specific Intercom survey.

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

Set the HMAC for identity verification.

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

Set JWT for secure messenger authentication.

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

Set the bottom padding for the Intercom messenger UI.

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

Intercomにプッシュ通知トークンを送信します。

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

Intercomから受信したプッシュ通知を処理します。

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

現在のユーザーの未読会話の数を取得します。

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();
export interface IntercomLoadOptions {
appId?: string;
apiKeyIOS?: string;
apiKeyAndroid?: string;
}
export interface IntercomIdentifiedUserOptions {
userId?: string;
email?: string;
}
export interface IntercomUserUpdateOptions {
userId?: string;
email?: string;
name?: string;
phone?: string;
languageOverride?: string;
customAttributes?: { [key: string]: any };
companies?: IntercomCompany[];
}
export interface IntercomLogEventOptions {
name: string;
data?: { [key: string]: any };
}
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;
}
export interface IntercomBottomPaddingOptions {
value: number;
}
export interface IntercomPushTokenOptions {
value: string;
}

「ソース・オブ・トラース」

「ソース オブ トゥルース」

プラグインの生成元のページです。 src/definitions.tsパブリック API がアップストリームで変更された場合、再度同期を実行してください。

「Getting Started」から続けてください。

「Getting Started」から続けてください。

「Getting Started」を使用して、ダッシュボードと __CAPGO_KEEP_0__ の操作を計画する場合、__CAPGO_KEEP_0__ を接続してください。 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intercom を使用して、ネイティブ機能を実装してください。 @API/__CAPGO_KEEP_1__-intercom のネイティブ機能の実装については、@API/__CAPGO_KEEP_1__-intercom を参照してください。 Using @capgo/capacitor-intercom for the native capability in Using @capgo/capacitor-intercom, API Overview API イントロダクション イントロダクションの実装詳細について API キー API キーの実装詳細について、 デバイス デバイスの実装詳細について