Zum Inhalt springen

Getting Started

GitHub

Sie können unser AI-gestütztes Setup verwenden, um das Plugin zu installieren. Fügen Sie die Capgo-Fähigkeiten zu Ihrem AI-Tool hinzu, indem Sie folgenden Befehl verwenden:

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

Verwenden Sie dann die folgende Anweisung:

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

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

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

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

Zu Clipboard kopieren

Abschnitt mit dem Titel „registerIdentifiedUser“

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

registerUnidentifiedUser

Zu Clipboard kopieren

Abschnitt mit dem Titel „registerUnidentifiedUser“

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

Abschnitt mit dem Titel „updateUser“

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 vorgefertigten Nachrichtentext ö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 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-Benachrichtigungs-Token an Intercom.

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

Ein empfangener 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. Wiederholen Sie die Synchronisierung, wenn die öffentliche API upstream geändert wird.

Wenn Sie " Getting Started um das Dashboard und die API-Operationen zu planen, 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.