Début de démarrage
Copiez un prompt de configuration avec les étapes d'installation et la guide Markdown complet pour ce plugin.
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.
Installer
Section intitulée « Installer »Vous pouvez utiliser notre configuration assistée par l'IA pour installer le plugin. Ajoutez les Capgo compétences à votre outil IA à l'aide de la commande suivante :
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsUtilisez ensuite la prompt suivante :
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intercom` plugin in my project.Si vous préférez la configuration manuelle, installez le plugin en exécutant les commandes suivantes et suivez les instructions spécifiques à la plateforme ci-dessous :
bun add @capgo/capacitor-intercombunx cap syncImporter
Section intitulée « Importer »import { CapgoIntercom } from '@capgo/capacitor-intercom';API Vue d'ensemble
Section intitulée « API Vue d'ensemble »loadWithKeys
Section intitulée « charger avec les clés »Initialize Intercom with API keys at runtime. Use this if you prefer not to configure keys in capacitor.config.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);registerIdentifiedUser
Copier dans le presse-papierSous-section intitulée « registerIdentifiedUser »
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);registerUnidentifiedUser
Au moins l'un des identifiants utilisateur ou email doit être fourni.Copier dans le presse-papier
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();Copier dans le presse-papier
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);Déconnecter l'utilisateur d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logout();logEvent
Section intitulée “logEvent”Enregistrer un événement personnalisé dans Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logEvent({} as IntercomLogEventOptions);displayMessenger
Section intitulée “displayMessenger”Ouvrir le messager d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessenger();displayMessageComposer
Section intitulée “displayMessageComposer”Ouvrir le compositeur de message avec un message prérempli.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessageComposer({} as IntercomMessageComposerOptions);displayHelpCenter
Section intitulée “displayHelpCenter”Ouvrez le centre d'aide d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayHelpCenter();hideMessenger
Section intitulée “hideMessenger”Cacher le messager d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();displayLauncher
Section intitulée “displayLauncher”Afficher le bouton de lancement d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();hideLauncher
Section intitulée “hideLauncher”Cacher le bouton de lancement d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();displayInAppMessages
Section intitulée “displayInAppMessages”Activer les messages dans l'application à partir d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();hideInAppMessages
Section intitulée « hideInAppMessages »Désactiver les messages dans l'application à partir d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();displayCarousel
Section intitulée « displayCarousel »Afficher un carrousel spécifique d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);displayArticle
Section intitulée « displayArticle »Afficher un article spécifique d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayArticle({} as IntercomArticleOptions);displaySurvey
Section intitulée « displaySurvey »Afficher une enquête Intercom spécifique.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displaySurvey({} as IntercomSurveyOptions);setUserHash
Section intitulée “setUserHash”Définir la signature HMAC pour la vérification d'identité.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserHash({} as IntercomUserHashOptions);setUserJwt
Section intitulée “setUserJwt”Définir JWT pour l'authentification sécurisée du messager.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserJwt({} as IntercomUserJwtOptions);setBottomPadding
Section intitulée “setBottomPadding”Définir la marge inférieure pour l'interface utilisateur du messager Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setBottomPadding({} as IntercomBottomPaddingOptions);sendPushTokenToIntercom
Section intitulée “sendPushTokenToIntercom”Envoyer un jeton de notification push à Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);receivePush
Section intitulée « recevoirPush »Gérer une notification push reçue d'Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);getUnreadConversationCount
Section intitulée « obtenirLeCompteDeConversationsNonLues »Obtenir le nombre de conversations non lues pour l'utilisateur actuel.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();Référence de type
Section intitulée « Référence de type »IntercomLoadOptions
Section intitulée « Options de chargement Intercom »export interface IntercomLoadOptions { appId?: string; apiKeyIOS?: string; apiKeyAndroid?: string;}IntercomIdentifiedUserOptions
Section intitulée « Options d'utilisateur identifié par Intercom »export interface IntercomIdentifiedUserOptions { userId?: string; email?: string;}IntercomUserUpdateOptions
Section intitulée « Options d'actualisation de l'utilisateur par Intercom »export interface IntercomUserUpdateOptions { userId?: string; email?: string; name?: string; phone?: string; languageOverride?: string; customAttributes?: { [key: string]: any }; companies?: IntercomCompany[];}IntercomLogEventOptions
Section intitulée « Options d'événement de journalisation par Intercom »export interface IntercomLogEventOptions { name: string; data?: { [key: string]: any };}IntercomMessageComposerOptions
Section intitulée « Options de composition de message par Intercom »export interface IntercomMessageComposerOptions { message: string;}IntercomCarouselOptions
Section intitulée « Options de carrousel par Intercom »export interface IntercomCarouselOptions { carouselId: string;}IntercomArticleOptions
Section intitulée « Options d'article par Intercom »export interface IntercomArticleOptions { articleId: string;}IntercomSurveyOptions
Section intitulée « Options d'intercomSurvey »export interface IntercomSurveyOptions { surveyId: string;}IntercomUserHashOptions
Section intitulée « Options d'intercomUserHash »export interface IntercomUserHashOptions { hmac: string;}IntercomUserJwtOptions
Section intitulée « Options d'intercomUserJwt »export interface IntercomUserJwtOptions { jwt: string;}IntercomBottomPaddingOptions
Section intitulée « Options de padding inférieur d'intercom »export interface IntercomBottomPaddingOptions { value: number;}IntercomPushTokenOptions
Section intitulée « Options de jeton de push d'intercom »export interface IntercomPushTokenOptions { value: string;}Source de vérité
Section intitulée « Source de vérité »Cette page est générée à partir du plugin’s src/definitions.ts. Re-run la synchronisation lorsque le public API change en amont.
Continuez de l'étape de démarrage
Section intitulée “Continuez de l'étape de démarrage”Si vous utilisez Démarrage pour planifier le tableau de bord et les opérations API, connectez-le avec Utilisation de @capgo/capacitor-intercom pour la capacité native dans Utilisation de @capgo/capacitor-intercom, API Vue d'ensemble pour le détail d'implémentation dans API Vue d'ensemble, Introduction pour les détails d'implémentation dans Introduction, API Clés pour les détails d'implémentation dans API Clés, et Appareils pour les détails d'implémentation dans Appareils.