メインコンテンツにジャンプ

Getting Started

GitHub

AI アシスト セットアップを使用してプラグインをインストールできます。AI ツールに Capgo スキルを追加するには、以下のコマンドを実行してください。

ターミナル画面
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.

手動設定を使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください:

ターミナル画面
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

registerIdentifiedUser

既知のユーザーをIntercomに登録します。 ユーザーIDまたはメールアドレスのいずれかを提供する必要があります。

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

registerUnidentifiedUser

registerUnidentifiedUser

匿名ユーザーをIntercomに登録します。

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

updateUser

updateUser

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

メッセージコンポーザーを開きます。

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_1__-intercom を使用して、ネイティブ機能を実装するには、 @API/__CAPGO_KEEP_1__-intercom のネイティブ機能の実装詳細については、 Using @capgo/capacitor-intercom for the native capability in Using @capgo/capacitor-intercom, API Overview for the implementation detail in API Overview, 概要 概要の実装詳細について API キー API キーの実装詳細について デバイス デバイスの実装詳細について