Getting Started
このプラグインのインストールステップと完全なマークダウンガイドを含むセットアップの質問をコピーする。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-intercom`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/intercom/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
Section titled “Install”CapgoのAI-Assisted Setupを使用してプラグインをインストールできます。次のコマンドを使用して、CapgoスキルをAIツールに追加してください。
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-intercombunx cap syncImport
Section titled “Import”import { CapgoIntercom } from '@capgo/capacitor-intercom';API Overview
API OverviewloadWithKeys
loadWithKeysAPIキーをcapacitor起動時に設定します。 capacitor.configにキーを設定せずに設定したい場合はこちらを使用してください。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);registerIdentifiedUser
registerIdentifiedUserクリップボードにコピー
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);registerUnidentifiedUser
クリップボードにコピーupdateUser
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();updateUser
__CAPGO_KEEP_0__Intercomユーザー属性を更新します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);logout
セクション「ログアウト」Intercomからユーザーをログアウトします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logout();logEvent
セクション「ログイベント」Intercomにカスタムイベントをログします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logEvent({} as IntercomLogEventOptions);displayMessenger
セクション「ダイアログメッセンジャー表示」Intercomダイアログメッセンジャーを開きます。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessenger();displayMessageComposer
セクション「メッセージコンポーザー表示」メッセージコンポーザーを開き、事前に埋め込まれたメッセージで開きます。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessageComposer({} as IntercomMessageComposerOptions);displayHelpCenter
「表示ヘルプセンター」のセクションインターコムヘルプセンターを開きます。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayHelpCenter();hideMessenger
「メッセンジャーハイド」インターコムメッセンジャーを非表示にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();displayLauncher
「表示ランチャー」インターコムランチャーボタンを表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();hideLauncher
「ランチャーハイド」Intercom ランチャーボタンを非表示にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();displayInAppMessages
「displayInAppMessages」セクションIntercom からインアプリメッセージを有効にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();hideInAppMessages
「hideInAppMessages」セクションIntercom からインアプリメッセージを無効にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();displayCarousel
「displayCarousel」セクション特定の Intercom カーレルを表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);displayArticle
「displayArticle」セクション特定のIntercom記事を表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayArticle({} as IntercomArticleOptions);displaySurvey
セクション「表示調査」特定のIntercom調査を表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displaySurvey({} as IntercomSurveyOptions);setUserHash
セクション「ユーザーハッシュを設定」ユーザー認証のためのHMACを設定します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserHash({} as IntercomUserHashOptions);setUserJwt
セクション「セキュアメッセンジャーのJWTを設定」セキュアメッセンジャーの認証のためのJWTを設定します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserJwt({} as IntercomUserJwtOptions);setBottomPadding
セクション「下部パディングを設定」Intercom メッセンジャー UI の下部パディングを設定します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setBottomPadding({} as IntercomBottomPaddingOptions);sendPushTokenToIntercom
セクション「sendPushTokenToIntercom」Intercom へのプッシュ トークンを送信します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);receivePush
セクション「receivePush」受信した Intercom プッシュ通知を処理します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);getUnreadConversationCount
セクション「getUnreadConversationCount」現在のユーザーの未読会話の数を取得します。
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;}IntercomCarouselOptions
「IntercomCarouselOptions」セクションexport interface IntercomCarouselOptions { carouselId: string;}IntercomArticleOptions
「IntercomArticleOptions」のセクションexport interface IntercomArticleOptions { articleId: string;}IntercomSurveyOptions
「IntercomSurveyOptions」のセクションexport interface IntercomSurveyOptions { surveyId: string;}IntercomUserHashOptions
「IntercomUserHashOptions」のセクションexport interface IntercomUserHashOptions { hmac: string;}IntercomUserJwtOptions
「IntercomUserJwtOptions」のセクションexport interface IntercomUserJwtOptions { jwt: string;}IntercomBottomPaddingOptions
「IntercomBottomPaddingOptions」のセクションexport interface IntercomBottomPaddingOptions { value: number;}IntercomPushTokenOptions
「IntercomPushTokenOptions」のセクションexport interface IntercomPushTokenOptions { value: string;}真実の源
「真実の源」このページはプラグインの src/definitions.tsAPIがアップストリームで変更された場合に、再度同期を実行してください。
Getting Startedから続けてください
「Getting Startedから続けてください」Capacitorを使用している場合 Getting Started ダッシュボードとAPIの作業を計画するためにCapacitorを使用している場合、Capacitorを Using @capgo/capacitor-intercom for the native capability in Using @capgo/capacitor-intercom, API オーバービュー API オーバービューの実装詳細について イントロダクション イントロダクションの実装詳細について API キー API キーの実装詳細について、 デバイス デバイスの実装詳細について。