Zum Inhalt springen

Getting Started

GitHub

Sie können unser AI-gestütztes Setup verwenden, um das Plugin zu installieren. Fügen Sie den Capgo-Fähigkeiten Ihrer AI-Anwendung mit folgendem Befehl hinzu:

Terminalfenster
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

Verwenden Sie dann folgende Anweisung:

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

Wenn Sie eine manuelle Einrichtung bevorzugen, installieren Sie das Plugin, indem Sie die folgenden Befehle ausführen und die unten aufgeführten plattform-spezifischen Anweisungen befolgen:

Terminalfenster
bun add @capgo/capacitor-intercom
bunx cap sync
import { CapgoIntercom } from '@capgo/capacitor-intercom';

Initialisiere Intercom mit API-Schlüsseln während der Ausführung. Verwende diese Option, wenn du die Schlüssel in capacitor.config nicht konfigurieren möchtest.

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

Ein bekannter Benutzer bei Intercom registrieren. Zumindest einer der Schlüssel userId oder email muss bereitgestellt werden.

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

Ein anonymer Benutzer bei Intercom registrieren.

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

Benutzerattribute in Intercom aktualisieren.

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

Der Benutzer aus Intercom ausloggen.

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

Ein benutzerdefiniertes Ereignis in Intercom protokollieren.

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

Den Intercom-Messenger öffnen.

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

Den Nachrichtenkomponisten mit einem vorab eingegebenen Nachrichten öffnen.

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

Öffnen Sie das Intercom-Hilfzentrum.

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

Der Intercom-Messenger verbergen.

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

Der Intercom-Launcher-Button anzeigen.

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

Der Intercom-Launcher-Button verbergen.

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

In-App-Nachrichten von Intercom aktivieren.

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

In-App-Nachrichten von Intercom deaktivieren.

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

Ein bestimmtes Intercom-Carousel anzeigen.

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

Ein bestimmtes Intercom-Artikel anzeigen.

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

Ein bestimmtes Intercom-Umfrage anzeigen.

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

Setze den HMAC für die Identitätsprüfung.

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

Setze JWT für die sichere Messengerauthentifizierung.

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

Setze die untere Abstandseinstellung für die Intercom-Messenger-UI.

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

Senden Sie einen Push-Benachrichtigungstoken an Intercom.

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

Ein empfangenes Intercom-Push-Benachrichtigung bearbeiten.

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

Ermitteln Sie die Anzahl der ungelesenen Gespräche für den aktuellen Benutzer.

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;
}

Diese Seite wurde aus dem Plugin generiert. src/definitions.ts. Wenn sich die öffentliche API im Hintergrund ändert, führen Sie die Synchronisierung erneut durch.

Wenn Sie " Getting Started " zum Planen von Dashboard und API-Operationen verwenden, verbinden Sie es mit Mit @capgo/capacitor-intercom für die native Fähigkeit in Mit @capgo/capacitor-intercom, API-Übersicht für die Implementierungsdetails in API-Übersicht, Einführung für die Implementierungsdetails in Einführung, API Schlüssel für die Implementierungsdetails in API Schlüssel und Geräte für die Implementierungsdetails in Geräte.