FastComments.com

FastComments JavaScript/TypeScript SDK

Dies ist das offizielle JavaScript/TypeScript-SDK für FastComments.

Offizielles JavaScript/TypeScript-SDK für die FastComments-API

Repository

Auf GitHub ansehen


Installation Internal Link

npm install fastcomments-sdk

API-Dokumentation Internal Link


Vollständige API-Referenz: docs/api/README.md

Browser- vs. Server-Kompatibilität Internal Link


Dieses SDK verwendet zwei Einstiegspunkte, um optimale Kompatibilität sicherzustellen und Laufzeitfehler zu vermeiden:

  • fastcomments-sdk/browser - Browser-sichere Version mit nativer fetch-Unterstützung
  • fastcomments-sdk/server - Vollständige Node.js-Version mit SSO-Unterstützung
  • fastcomments-sdk (Standard) - Nur Typen, sicher überall zu importieren

Öffentliche vs. geschützte APIs Internal Link


Das SDK stellt drei Haupt-API-Klassen bereit:

  • DefaultApi - Gesicherte Endpunkte, die deinen API-Schlüssel zur Authentifizierung erfordern. Verwende diese für serverseitige Operationen.
  • PublicApi - Öffentliche Endpunkte, die ohne API-Schlüssel zugänglich sind. Diese können direkt aus Browsern/Mobilgeräten/etc. aufgerufen werden.
  • HiddenApi - Interne/Admin-Endpunkte für fortgeschrittene Anwendungsfälle.

Beispiel: Verwendung der Public API (browser-sicher)

import { PublicApi } from 'fastcomments-sdk/browser';

const publicApi = new PublicApi();

// Kommentare für eine Seite abrufen (kein API-Schlüssel erforderlich)
const response = await publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id'
});

Beispiel: Verwendung der Default API (nur serverseitig)

import { DefaultApi, Configuration } from 'fastcomments-sdk/server';

const config = new Configuration({
  apiKey: 'your-api-key' // Dies geheim halten!
});
const defaultApi = new DefaultApi(config);

// Kommentare mit vollem Admin-Zugriff abrufen
const response = await defaultApi.getComments({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id'
});

SSO (Single Sign-On)-Integration Internal Link

FastComments unterstützt SSO, um sich in Ihr bestehendes Benutzerauthentifizierungssystem zu integrieren. Die SSO-Funktionalität ist nur im Server-Export verfügbar, da sie Node.js-Crypto-Funktionen benötigt.

Einfache SSO (nur serverseitig)

Einfache SSO sollte serverseitig erzeugt und an den Client gesendet werden:

// Server-seitiger Code (Node.js/Backend)
import { FastCommentsSSO, PublicApi } from 'fastcomments-sdk/server';

// Erstelle einfache SSO mit dem eingebauten Helfer  
const userData = {
  username: 'john_doe',
  email: 'john@example.com',
  displayName: 'John Doe',
  avatar: 'https://example.com/avatar.jpg'
};

const sso = FastCommentsSSO.createSimple(userData, {
  loginURL: '/login',
  logoutURL: '/logout'
});

const ssoToken = sso.createToken();

// Sende ssoToken an Ihren Client-Code
// Der Client-Code kann dieses Token dann mit dem Browser-SDK verwenden

Sichere SSO (serverseitig, empfohlen)

Sichere SSO sollte serverseitig implementiert werden und bietet bessere Sicherheit:

// Server-seitiger Code (Node.js/Backend)
import { FastCommentsSSO, PublicApi } from 'fastcomments-sdk/server';

// Erstelle sichere SSO mit dem eingebauten Helfer
const userData = {
  id: 'user-123',
  email: 'john@example.com',
  username: 'john_doe',
  displayName: 'John Doe',
  avatar: 'https://example.com/avatar.jpg',
  isAdmin: false,
  isModerator: false
};

const sso = FastCommentsSSO.createSecure('your-api-key', userData, {
  loginURL: '/login',
  logoutURL: '/logout'
});

const ssoConfig = sso.prepareToSend();

// Mit API-Aufrufen auf dem Server verwenden
const publicApi = new PublicApi();
const response = await publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id',
  sso: JSON.stringify(ssoConfig)
});

// Oder sende ssoConfig an den Client zur Browser-Verwendung

Verwendung von SSO im Browser (mit servergeneriertem Token)

// Client-seitiger Code (Browser)
import { PublicApi } from 'fastcomments-sdk/browser';

// Hole SSO-Token von Ihrem Server-Endpunkt
const ssoToken = await fetch('/api/sso-token').then(r => r.json());

const publicApi = new PublicApi();
const response = await publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id',
  sso: ssoToken // Use the server-generated SSO token
});

SSO mit Kommentar-Erstellung

// Server-seitig: SSO und Kommentar erstellen
import { FastCommentsSSO, PublicApi } from 'fastcomments-sdk/server';

const sso = FastCommentsSSO.createSecure('your-api-key', userData);
const ssoConfig = sso.prepareToSend();

const response = await publicApi.createCommentPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id',
  broadcastId: 'unique-broadcast-id',
  commentData: {
    comment: 'This is my comment',
    date: Date.now(),
    commenterName: 'John Doe',
    url: 'https://example.com/page',
    urlId: 'page-url-id'
  },
  sso: JSON.stringify(ssoConfig)
});

Gängige Anwendungsfälle Internal Link

Kommentare für eine Seite abrufen

const comments = await sdk.publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'article-123'
});

Einen Kommentar erstellen

const newComment = await sdk.publicApi.createCommentPublic({
  createCommentParams: {
    tenantId: 'your-tenant-id',
    urlId: 'article-123',
    comment: 'Great article!',
    commenterName: 'John Doe',
    commenterEmail: 'john@example.com'
  }
});

Für einen Kommentar abstimmen

const voteResponse = await sdk.publicApi.voteComment({
  voteBodyParams: {
    commentId: 'comment-id',
    direction: 1 // 1 für Upvote, -1 für Downvote
  }
});

Benutzerverwaltung (erfordert API-Schlüssel)

// Benutzer suchen (erfordert DefaultApi)
const users = await sdk.defaultApi.searchUsers({
  tenantId: 'your-tenant-id',
  urlId: 'page-id',
  usernameStartsWith: 'john'
});

Live-Ereignisse (Echtzeit-Aktualisierungen) Internal Link

Abonnieren Sie Live-Ereignisse, um Echtzeit-Updates für Kommentare, Abstimmungen und andere Aktivitäten zu erhalten.

Ereignisse auf Seitenebene

Abonnieren Sie Live-Ereignisse für eine bestimmte Seite (Kommentare, Abstimmungen usw.):

import { subscribeToChanges, LiveEvent, LiveEventType } from 'fastcomments-sdk/browser';

const config = {
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id',
};

// Subscribe to live events for a page
const subscription = subscribeToChanges(
  config,
  'your-tenant-id', // tenantIdWS
  'page-url-id',    // urlIdWS  
  'user-session-id', // userIdWS (get this from getComments response)
  (event: LiveEvent) => {
    console.log('Live event received:', event);

    switch (event.type) {
      case LiveEventType.new_comment:
        console.log('New comment:', event.comment);
        // Aktualisieren Sie Ihre UI mit dem neuen Kommentar
        break;
      case LiveEventType.new_vote:
        console.log('New vote:', event.vote);
        // Aktualisieren Sie die Abstimmungszahlen in Ihrer UI
        break;
      case LiveEventType.updated_comment:
        console.log('Comment updated:', event.comment);
        break;
      default:
        console.log('Other event type:', event.type);
    }

    return true; // Geben Sie true zurück, wenn das Ereignis verarbeitet wurde
  },
  (isConnected: boolean) => {
    console.log('Connection status:', isConnected ? 'Connected' : 'Disconnected');
  }
);

// Close the subscription when done
subscription.close();

Benutzerbezogene Ereignisse abonnieren

Abonnieren Sie benutzerspezifische Ereignisse (Benachrichtigungen, Erwähnungen usw.):

import { subscribeToUserFeed, LiveEvent, LiveEventType } from 'fastcomments-sdk/browser';

const userConfig = {
  userIdWS: 'user-session-id', // Get this from getComments response
};

// Subscribe to user's personal feed
const userSubscription = subscribeToUserFeed(
  userConfig,
  (event: LiveEvent) => {
    console.log('User event received:', event);

    switch (event.type) {
      case LiveEventType.notification:
        console.log('New notification:', event.notification);
        // Benachrichtigung in Ihrer UI anzeigen
        break;
      case LiveEventType.notification_update:
        console.log('Notification updated:', event.notification);
        break;
      default:
        console.log('Other user event:', event.type);
    }

    return true;
  },
  (isConnected: boolean) => {
    console.log('User feed connection:', isConnected ? 'Connected' : 'Disconnected');
  }
);

// Close when done
userSubscription.close();

Abrufen von userIdWS

Der userIdWS Parameter wird für Live-Ereignisse benötigt und kann aus API-Antworten abgerufen werden:

const response = await sdk.publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-id'
});

// Extract userIdWS from the response
const userIdWS = response.data?.userSessionInfo?.userIdWS;

if (userIdWS) {
  // Now you can subscribe to live events
  const subscription = subscribeToChanges(config, tenantIdWS, urlIdWS, userIdWS, handleEvent);
}

Broadcast-IDs Internal Link

Sie werden sehen, dass Sie in einigen API-Aufrufen eine broadcastId übergeben sollen. Wenn Sie Ereignisse erhalten, bekommen Sie diese ID zurück, sodass Sie das Ereignis ignorieren können, falls Sie Änderungen auf dem Client optimistisch anwenden möchten (was Sie wahrscheinlich tun sollten, da es die beste Erfahrung bietet). Geben Sie hier eine UUID an. Die ID sollte so eindeutig sein, dass sie in einer Browsersitzung nicht zweimal vorkommt.

import { v4 as uuidv4 } from 'uuid';

const response = await sdk.publicApi.createCommentPublic({
  createCommentParams: {
    tenantId: 'your-tenant-id',
    urlId: 'page-id',
    comment: 'My comment',
    broadcastId: uuidv4() // Eindeutige ID für diese Operation
  }
});

Fehlerbehandlung Internal Link

try {
  const comments = await sdk.publicApi.getCommentsPublic({
    tenantId: 'your-tenant-id',
    urlId: 'page-id'
  });
} catch (error) {
  if (error.response?.status === 404) {
    console.log('Page not found');
  } else {
    console.error('API Error:', error.message);
  }
}

aggregieren Internal Link


Fasst Dokumente zusammen, indem sie gruppiert werden (falls groupBy angegeben ist) und mehrere Operationen angewendet werden. Verschiedene Operationen (z. B. sum, countDistinct, avg usw.) werden unterstützt.

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
aggregationRequest AggregationRequest Ja
parentTenantId string Nein
includeStats boolean Nein

Antwort

Gibt zurück: AggregationResponse


Audit-Protokolle abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
limit number Nein
skip number Nein
order SORTDIR Nein
after number Nein
before number Nein

Antwort

Gibt zurück: GetAuditLogs200Response


Vom Kommentar sperren (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
publicBlockFromCommentParams PublicBlockFromCommentParams Ja
sso string Nein

Antwort

Gibt zurück: BlockFromCommentPublic200Response

Kommentar entsperren (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
publicBlockFromCommentParams PublicBlockFromCommentParams Ja
sso string Nein

Antwort

Gibt zurück: UnBlockCommentPublic200Response


Kommentare auf Sperrstatus prüfen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentIds string Ja
sso string Nein

Antwort

Gibt zurück: CheckedCommentsForBlocked200Response


Benutzer vom Kommentar sperren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
blockFromCommentParams BlockFromCommentParams Ja
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: BlockFromCommentPublic200Response


Öffentlichen Kommentar erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
broadcastId string Ja
commentData CommentData Ja
sessionId string Nein
sso string Nein

Antwort

Gibt zurück: CreateCommentPublic200Response


Kommentar löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
contextUserId string Nein
isLive boolean Nein

Antwort

Gibt zurück: DeleteComment200Response


Öffentlichen Kommentar löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Ja
editKey string Nein
sso string Nein

Antwort

Gibt zurück: DeleteCommentPublic200Response


Kommentar-Stimme löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
voteId string Ja
urlId string Ja
broadcastId string Ja
editKey string Nein
sso string Nein

Antwort

Gibt zurück: DeleteCommentVote200Response


Kommentar melden Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: FlagComment200Response


Kommentar abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetComment200Response


Kommentare abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
page number Nein
limit number Nein
skip number Nein
asTree boolean Nein
skipChildren number Nein
limitChildren number Nein
maxTreeDepth number Nein
urlId string Nein
userId string Nein
anonUserId string Nein
contextUserId string Nein
hashTag string Nein
parentId string Nein
direction SortDirections Nein

Antwort

Gibt zurück: GetComments200Response


Öffentliche Kommentare abrufen Internal Link

req tenantId urlId

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
page number Nein
direction SortDirections Nein
sso string Nein
skip number Nein
skipChildren number Nein
limit number Nein
limitChildren number Nein
countChildren boolean Nein
fetchPageForCommentId string Nein
includeConfig boolean Nein
countAll boolean Nein
includei10n boolean Nein
locale string Nein
modules string Nein
isCrawler boolean Nein
includeNotificationCount boolean Nein
asTree boolean Nein
maxTreeDepth number Nein
useFullTranslationIds boolean Nein
parentId string Nein
searchText string Nein
hashTags Array Nein
userId string Nein
customConfigStr string Nein
afterCommentId string Nein
beforeCommentId string Nein

Antwort

Gibt zurück: GetCommentsPublic200Response

Kommentartext abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
editKey string Nein
sso string Nein

Antwort

Gibt zurück: GetCommentText200Response


Benutzernamen der Kommentar-Stimmen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
dir number Ja
sso string Nein

Antwort

Gibt zurück: GetCommentVoteUserNames200Response


Kommentar sperren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Ja
sso string Nein

Antwort

Gibt zurück: LockComment200Response


Kommentar anpinnen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Ja
sso string Nein

Antwort

Gibt zurück: PinComment200Response


Kommentar speichern Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createCommentParams CreateCommentParams Ja
isLive boolean Nein
doSpamCheck boolean Nein
sendEmails boolean Nein
populateNotifications boolean Nein

Antwort

Gibt zurück: SaveComment200Response


Kommentare massenhaft speichern Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createCommentParams Array Ja
isLive boolean Nein
doSpamCheck boolean Nein
sendEmails boolean Nein
populateNotifications boolean Nein

Antwort

Gibt zurück: Array<SaveComment200Response


Kommentartext setzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Ja
commentTextUpdateRequest CommentTextUpdateRequest Ja
editKey string Nein
sso string Nein

Antwort

Gibt zurück: SetCommentText200Response


Benutzer vom Kommentar entsperren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
unBlockFromCommentParams UnBlockFromCommentParams Ja
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: UnBlockCommentPublic200Response


Kommentarmeldung aufheben Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: FlagComment200Response


Kommentar entsperren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Ja
sso string Nein

Antwort

Gibt zurück: LockComment200Response


Kommentar entpinnen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Ja
sso string Nein

Antwort

Gibt zurück: PinComment200Response


Kommentar aktualisieren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
body PickAPICommentUpdatableCommentFields Ja
contextUserId string Nein
doSpamCheck boolean Nein
isLive boolean Nein

Antwort

Gibt zurück: FlagCommentPublic200Response


Kommentar bewerten Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
urlId string Ja
broadcastId string Ja
voteBodyParams VoteBodyParams Ja
sessionId string Nein
sso string Nein

Antwort

Gibt zurück: VoteComment200Response


Domain-Konfiguration hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
addDomainConfigParams AddDomainConfigParams Ja

Antwort

Gibt zurück: AddDomainConfig200Response


Domain-Konfiguration löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
domain string Ja

Antwort

Gibt zurück: DeleteDomainConfig200Response


Domain-Konfiguration abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
domain string Ja

Antwort

Gibt zurück: GetDomainConfig200Response


Domain-Konfigurationen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja

Antwort

Gibt zurück: GetDomainConfigs200Response


Domain-Konfiguration teilweise aktualisieren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
domainToUpdate string Ja
patchDomainConfigParams PatchDomainConfigParams Ja

Antwort

Gibt zurück: GetDomainConfig200Response


Domain-Konfiguration ersetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
domainToUpdate string Ja
updateDomainConfigParams UpdateDomainConfigParams Ja

Antwort

Gibt zurück: GetDomainConfig200Response


E-Mail-Vorlage erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createEmailTemplateBody CreateEmailTemplateBody Ja

Antwort

Gibt zurück: CreateEmailTemplate200Response

Beispiel

createEmailTemplate Beispiel
Copy Copy
1
2const tenantId: string = "tenant_7a9f2b3d";
3
4const createEmailTemplateBody: CreateEmailTemplateBody = {
5 name: "Comment Notification",
6 subject: "New comment on your article: ",
7 htmlBody: "<p> left a comment:</p><blockquote></blockquote>",
8 enabled: true,
9 defaultLocale: "en-US",
10 metadata: { createdBy: "admin@example.com", purpose: "notify_comment" } // optionale zusätzliche Daten
11};
12
13const result: CreateEmailTemplate200Response = await createEmailTemplate(tenantId, createEmailTemplateBody);
14

E-Mail-Vorlage löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für deleteEmailTemplate
Copy Copy
1
2const tenantId: string = "tenant_4b2f6a-4b2f6a2d";
3const templateId: string = "email_template_9f8b7c3e";
4const result: FlagCommentPublic200Response = await deleteEmailTemplate(tenantId, templateId);
5const status: APIStatus | undefined = result?.status
6

Renderfehler der E-Mail-Vorlage löschen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
id string Ja
errorId string Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für deleteEmailTemplateRenderError
Copy Copy
1
2const tenantId: string = "tenant_8f3b2a9c";
3const id: string = "template_4a1c9f7e";
4const errorId: string = "err_20260112_abc123";
5const result: FlagCommentPublic200Response = await deleteEmailTemplateRenderError(tenantId, id, errorId);
6

E-Mail-Vorlage abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetEmailTemplate200Response

Beispiel

getEmailTemplate Beispiel
Copy Copy
1
2(async () => {
3 const tenantId: string = 'acme-enterprises-123';
4 const id: string = 'welcome-email-template-v2';
5 const locale: string | undefined = 'en-US'; // Beispiel für einen optionalen Parameter
6 const template: GetEmailTemplate200Response = await getEmailTemplate(tenantId, id);
7 console.log(template, locale);
8})();
9

Definitionen der E-Mail-Vorlagen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja

Antwort

Gibt zurück: GetEmailTemplateDefinitions200Response

Beispiel

Beispiel für getEmailTemplateDefinitions
Copy Copy
1
2const tenantId: string = 'acme-enterprises-78f2';
3const emailTemplates: GetEmailTemplateDefinitions200Response = await getEmailTemplateDefinitions(tenantId);
4

Renderfehler der E-Mail-Vorlagen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
skip number Nein

Antwort

Gibt zurück: GetEmailTemplateRenderErrors200Response

Beispiel

getEmailTemplateRenderErrors Beispiel
Copy Copy
1
2const tenantId: string = "tenant_7b3f2a9c";
3const id: string = "tmpl_4f1b2c9e";
4const skip: number = 25;
5const result: GetEmailTemplateRenderErrors200Response = await getEmailTemplateRenderErrors(tenantId, id, skip);
6

E-Mail-Vorlagen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip number Nein

Antwort

Gibt zurück: GetEmailTemplates200Response

Beispiel

getEmailTemplates Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_8f4d2b7c';
3const responseWithoutSkip: GetEmailTemplates200Response = await getEmailTemplates(tenantId);
4const skip: number = 20;
5const responseWithSkip: GetEmailTemplates200Response = await getEmailTemplates(tenantId, skip);
6

E-Mail-Vorlage rendern Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
renderEmailTemplateBody RenderEmailTemplateBody Ja
locale string Nein

Antwort

Gibt zurück: RenderEmailTemplate200Response

Beispiel

renderEmailTemplate Beispiel
Copy Copy
1
2const tenantId: string = 'acme-corp-7f3';
3const renderEmailTemplateBody: RenderEmailTemplateBody = {
4 templateId: 'new-comment-notification',
5 recipientEmail: 'jane.doe@acme.com',
6 variables: {
7 commenterName: 'Samir Patel',
8 commentText: 'I found this article really helpful — thanks for sharing!',
9 threadUrl: 'https://acme.com/blog/123#comments'
10 },
11 includeUnsubscribeLink: true
12};
13const locale: string = 'en-US';
14const response: RenderEmailTemplate200Response = await renderEmailTemplate(tenantId, renderEmailTemplateBody, locale);
15

E-Mail-Vorlage aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateEmailTemplateBody UpdateEmailTemplateBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

updateEmailTemplate Beispiel
Copy Copy
1
2const tenantId: string = 'acme-corp-tenant-01';
3const id: string = 'email_tpl_42b7a9';
4const updateEmailTemplateBody: UpdateEmailTemplateBody = {
5 name: 'Comment Flag Notification',
6 subject: 'A comment was flagged on acme.com',
7 html: '<p>A comment by was flagged. Review at </p>',
8 replyTo: 'noreply@acme.com', // optionales Feld zur Demonstration
9 enabled: true,
10 customConfig: { priority: 'high' } // optionale benutzerdefinierte Parameter
11};
12const response: FlagCommentPublic200Response = await updateEmailTemplate(tenantId, id, updateEmailTemplateBody);
13

Ereignisprotokoll abrufen Internal Link

req tenantId urlId userIdWS

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
userIdWS string Ja
startTime number Ja
endTime number Ja

Antwort

Gibt zurück: GetEventLog200Response


Globales Ereignisprotokoll abrufen Internal Link

req tenantId urlId userIdWS

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
userIdWS string Ja
startTime number Ja
endTime number Ja

Antwort

Gibt zurück: GetEventLog200Response


Feed-Beitrag erstellen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createFeedPostParams CreateFeedPostParams Ja
broadcastId string Nein
isLive boolean Nein
doSpamCheck boolean Nein
skipDupCheck boolean Nein

Antwort

Gibt zurück: CreateFeedPost200Response


Öffentlichen Feed-Beitrag erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createFeedPostParams CreateFeedPostParams Ja
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: CreateFeedPostPublic200Response


Öffentlichen Feed-Beitrag löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postId string Ja
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: DeleteFeedPostPublic200Response


Feed-Beiträge abrufen Internal Link

req tenantId afterId

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
afterId string Nein
limit number Nein
tags Array Nein

Antwort

Gibt zurück: GetFeedPosts200Response

Öffentliche Feed-Beiträge abrufen Internal Link


req tenantId afterId

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
afterId string Nein
limit number Nein
tags Array Nein
sso string Nein
isCrawler boolean Nein
includeUserInfo boolean Nein

Antwort

Gibt zurück: GetFeedPostsPublic200Response


Feed-Beitragsstatistiken abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postIds Array Ja
sso string Nein

Antwort

Gibt zurück: GetFeedPostsStats200Response


Öffentliche Nutzerreaktionen abrufen Internal Link


Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
postIds Array Nein
sso string Nein

Antwort

Gibt zurück: GetUserReactsPublic200Response


Auf öffentlichen Feed-Beitrag reagieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postId string Ja
reactBodyParams ReactBodyParams Ja
isUndo boolean Nein
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: ReactFeedPostPublic200Response

Feed-Beitrag aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
feedPost FeedPost Ja

Antwort

Gibt zurück: FlagCommentPublic200Response


Öffentlichen Feed-Beitrag aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postId string Ja
updateFeedPostParams UpdateFeedPostParams Ja
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: CreateFeedPostPublic200Response


Öffentlichen Kommentar melden Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
isFlagged boolean Ja
sso string Nein

Antwort

Gibt zurück: FlagCommentPublic200Response


Hashtag hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string No
createHashTagBody CreateHashTagBody No

Antwort

Gibt zurück: AddHashTag200Response

Beispiel

addHashTag Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_7b2f6c2b';
3const createBody: CreateHashTagBody = {
4 tag: 'feature-request',
5 label: 'Feature Request',
6 description: 'Requests for new functionality in the web client',
7 isActive: true,
8 visibility: 'public',
9 allowedDomains: ['example.com', 'internal.example.com']
10};
11const result: AddHashTag200Response = await addHashTag(tenantId, createBody);
12const resultWithoutTenant: AddHashTag200Response = await addHashTag(undefined, {
13 tag: 'bug',
14 label: 'Bug',
15 description: 'Use for reproducible bugs reported by users',
16 isActive: true,
17 visibility: 'public'
18});
19

Hashtags massenhaft hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Nein
bulkCreateHashTagsBody BulkCreateHashTagsBody Nein

Antwort

Gibt zurück: AddHashTagsBulk200Response

Beispiel

addHashTagsBulk Beispiel
Copy Copy
1
2(async () => {
3 const tenantId: string = 'tenant_3f2b9a';
4 const bulkCreateHashTagsBody: BulkCreateHashTagsBody = {
5 tags: [
6 { name: 'performance', description: 'Comments about site performance', visibleToModeratorsOnly: false },
7 { name: 'feature-request', description: 'Requests for new features', visibleToModeratorsOnly: true }
8 ]
9 };
10 const result: AddHashTagsBulk200Response = await addHashTagsBulk(tenantId, bulkCreateHashTagsBody);
11 const resultWithNoTenant: AddHashTagsBulk200Response = await addHashTagsBulk(undefined, bulkCreateHashTagsBody);
12 console.log(result, resultWithNoTenant);
13})();
14

Hashtag löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tag string Ja
tenantId string Nein
deleteHashTagRequest DeleteHashTagRequest Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

deleteHashTag Beispiel
Copy Copy
1
2const tag: string = 'breaking-news';
3const tenantId: string = 'tenant_42';
4const deleteReq: DeleteHashTagRequest = { removedBy: 'moderator_jane', reason: 'off-topic for this community', deleteAssociatedComments: true } as DeleteHashTagRequest;
5const result: FlagCommentPublic200Response = await deleteHashTag(tag, tenantId, deleteReq);
6

Hashtags abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
page number Nein

Antwort

Gibt zurück: GetHashTags200Response

Beispiel

getHashTags Beispiel
Copy Copy
1
2(async () => {
3 const tenantId: string = "acme-corp-7a9f";
4 const tagsPage1: GetHashTags200Response = await getHashTags(tenantId);
5 const tagsPage2: GetHashTags200Response = await getHashTags(tenantId, 2);
6 console.log(tagsPage1, tagsPage2);
7})();
8

Hashtag teilweise aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tag string Ja
tenantId string Nein
updateHashTagBody UpdateHashTagBody Nein

Antwort

Gibt zurück: PatchHashTag200Response

Beispiel

patchHashTag Beispiel
Copy Copy
1
2const tag: string = 'release-2026';
3const tenantId: string = 'tenant_42';
4const updateHashTagBody: UpdateHashTagBody = {
5 displayName: 'Release 2026',
6 description: 'Discussions and notes for the 2026 product release',
7 isActive: true
8};
9const result: PatchHashTag200Response = await patchHashTag(tag, tenantId, updateHashTagBody);
10

Moderator erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createModeratorBody CreateModeratorBody Ja

Rückgabe

Gibt zurück: CreateModerator200Response

Beispiel

createModerator Beispiel
Copy Copy
1
2const tenantId: string = "tenant_prod_us-east_01";
3const createModeratorBody: CreateModeratorBody = {
4 email: "maria.lopez+mod@fastcompany.com",
5 username: "mlopez_mod",
6 displayName: "Maria Lopez",
7 roles: ["content_moderator"],
8 notifyOnReports: true,
9 metadata: { region: "us-east", team: "community" }
10};
11const result: CreateModerator200Response = await createModerator(tenantId, createModeratorBody);
12

Moderator löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
sendEmail string Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

deleteModerator Beispiel
Copy Copy
1
2const tenantId: string = 'acme-tenant-987';
3const moderatorId: string = 'mod-78b2c9a4-3f1e-4d6a';
4const sendEmail: string = 'true';
5const result: FlagCommentPublic200Response = await deleteModerator(tenantId, moderatorId, sendEmail);
6

Moderator abrufen Internal Link

Parameter

Name Type Required Description
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetModerator200Response

Beispiel

getModerator Beispiel
Copy Copy
1
2const tenantId: string = "tenant_eu_4f8d2b9e";
3const maybeModeratorId: string | undefined = "mod_91c3b7a2"; // optionale Quelle (kann undefined sein)
4const moderator: GetModerator200Response = await getModerator(tenantId, maybeModeratorId!);
5

Moderatoren abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip number Nein

Antwort

Gibt zurück: GetModerators200Response

Beispiel

Beispiel für getModerators
Copy Copy
1
2const tenantId: string = "tenant_corp_7f9b2a";
3const moderatorsPage1: GetModerators200Response = await getModerators(tenantId);
4const skip: number = 50;
5const moderatorsPage2: GetModerators200Response = await getModerators(tenantId, skip);
6

Einladung senden Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
fromName string Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

sendInvite Beispiel
Copy Copy
1
2const tenantId: string = 'acme-tenant-004';
3const id: string = 'comment_9b7f3a2c';
4const fromName: string = 'María Hernández';
5const response: FlagCommentPublic200Response = await sendInvite(tenantId, id, fromName);
6

Moderator aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateModeratorBody UpdateModeratorBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

updateModerator Beispiel
Copy Copy
1
2const tenantId: string = '4f8a9c2e-3b6d-4d9e-8c2f-1a2b3c4d5e6f';
3const id: string = 'mod_92a7c4';
4const updateModeratorBodyMinimal: UpdateModeratorBody = { displayName: 'Sophia Patel' };
5const updateModeratorBodyWithOptional: UpdateModeratorBody = {
6 displayName: 'Sophia Patel',
7 email: 'sophia.patel@newsroom.example',
8 permissions: ['remove_comments', 'ban_user'],
9 notifyOnFlag: true // optionaler Parameter demonstriert
10};
11const result: FlagCommentPublic200Response = await updateModerator(tenantId, id, updateModeratorBodyWithOptional);
12

Benachrichtigungsanzahl löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

deleteNotificationCount Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_7f3a1b2c4d9e';
3const notificationId: string = 'notif_8c9d0a1b2f3e4b7';
4const result: FlagCommentPublic200Response = await deleteNotificationCount(tenantId, notificationId);
5

Zwischengespeicherte Benachrichtigungsanzahl abrufen Internal Link

Parameter

Name Type Required Description
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetCachedNotificationCount200Response

Beispiel

getCachedNotificationCount Beispiel
Copy Copy
1
2const tenantId: string = 'acme-tenant-01';
3const baseNotificationId: string = 'notif-000123';
4const idSuffix: string | undefined = undefined; // Beispiel für optionalen Parameter
5const notificationId: string = idSuffix ? `${baseNotificationId}-${idSuffix}` : baseNotificationId;
6const result: GetCachedNotificationCount200Response = await getCachedNotificationCount(tenantId, notificationId);
7console.log(result);
8

Benachrichtigungsanzahl abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein
urlId string Nein
fromCommentId string Nein
viewed boolean Nein
type string Nein

Antwort

Gibt zurück: GetNotificationCount200Response

Beispiel

getNotificationCount Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_8a9b7c';
3const userId: string = 'user_42b3c';
4const urlId: string = 'https://blog.example.com/posts/introducing-new-editor';
5const fromCommentId: string | undefined = undefined;
6const viewed: boolean = false;
7const type: string = 'mention';
8const result: GetNotificationCount200Response = await getNotificationCount(tenantId, userId, urlId, fromCommentId, viewed, type);
9

Benachrichtigungen abrufen Internal Link


Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
userId string Nein
urlId string Nein
fromCommentId string Nein
viewed boolean Nein
type string Nein
skip number Nein

Antwort

Gibt zurück: GetNotifications200Response

Beispiel

getNotifications Beispiel
Copy Copy
1
2(async () => {
3 const tenantId: string = 'tenant_8f3b1a2c';
4 const userId: string = 'user_42';
5 const urlId: string = 'https://news.example.com/articles/2026/01/11/comment-thread';
6 const fromCommentId: string = 'cmt_9a7b';
7 const viewed: boolean = false;
8 const type: string = 'mention';
9 const skip: number = 0;
10 const response: GetNotifications200Response = await getNotifications(tenantId, userId, urlId, fromCommentId, viewed, type, skip);
11 console.log(response);
12})();
13

Benachrichtigung aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateNotificationBody UpdateNotificationBody Ja
userId string Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

updateNotification Beispiel
Copy Copy
1
2const tenantId: string = "tenant_86a7b3";
3const id: string = "notif_20260112_01";
4const userId: string = "moderator_42";
5const updateNotificationBody: UpdateNotificationBody = {
6 name: "Flagged comment alert",
7 enabled: true,
8 channels: ["email"],
9 recipients: ["mod-team@news-site.com"],
10 threshold: 1
11};
12
13(async () => {
14 const result: FlagCommentPublic200Response = await updateNotification(tenantId, id, updateNotificationBody, userId);
15 console.log(result);
16})();
17

Seite hinzufügen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createAPIPageData CreateAPIPageData Ja

Antwort

Gibt zurück: AddPageAPIResponse


Seite löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: DeletePageAPIResponse


Seite nach URL-ID abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja

Antwort

Gibt zurück: GetPageByURLIdAPIResponse


Seiten abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja

Antwort

Gibt zurück: GetPagesAPIResponse


Seite teilweise aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateAPIPageData UpdateAPIPageData Ja

Antwort

Gibt zurück: PatchPageAPIResponse


Ausstehendes Webhook-Ereignis löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für deletePendingWebhookEvent
Copy Copy
1
2const tenantId: string = 'tenant_7f4e2b';
3const pendingEventId: string = '9f7b6a8c-3b2a-4c0d-a8e5-1234567890ab';
4const result: FlagCommentPublic200Response = await deletePendingWebhookEvent(tenantId, pendingEventId);
5console.log(result);
6

Anzahl ausstehender Webhook-Ereignisse abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Nein
externalId string Nein
eventType string Nein
type string Nein
domain string Nein
attemptCountGT number Nein

Antwort

Gibt zurück: GetPendingWebhookEventCount200Response

Beispiel

getPendingWebhookEventCount Beispiel
Copy Copy
1
2(async () => {
3 const tenantId: string = 'tenant_9c3b2b';
4 const commentId: string = 'cmt_f4a1b2';
5 const externalId: string = 'ext-789';
6 const eventType: string = 'comment.created';
7 const type: string = 'delivery';
8 const domain: string = 'app.example.com';
9 const attemptCountGT: number = 2;
10
11 const result: GetPendingWebhookEventCount200Response = await getPendingWebhookEventCount(
12 tenantId,
13 commentId,
14 externalId,
15 eventType,
16 type,
17 domain,
18 attemptCountGT
19 );
20
21 console.log(result);
22})();
23

Ausstehende Webhook-Ereignisse abrufen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
commentId string Nein
externalId string Nein
eventType string Nein
type string Nein
domain string Nein
attemptCountGT number Nein
skip number Nein

Antwort

Gibt zurück: GetPendingWebhookEvents200Response

Beispiel

getPendingWebhookEvents Beispiel
Copy Copy
1
2const tenantId: string = "tenant_78b2f1";
3const commentId: string = "cmt_0042";
4const eventType: string = "comment.created";
5const domain: string = "blog.example.com";
6const attemptCountGT: number = 1;
7const skip: number = 0;
8
9const pending: GetPendingWebhookEvents200Response = await getPendingWebhookEvents(
10 tenantId,
11 commentId,
12 undefined, // externalId
13 eventType,
14 undefined, // type
15 domain,
16 attemptCountGT,
17 skip
18);
19

Frage-Konfiguration erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createQuestionConfigBody CreateQuestionConfigBody Ja

Antwort

Gibt zurück: CreateQuestionConfig200Response

Beispiel

Beispiel für createQuestionConfig
Copy Copy
1
2const tenantId: string = "tenant_live_7f8b3c2a";
3const customOptions: QuestionConfigCustomOptionsInner[] = [
4 { value: "under18", label: "Under 18" },
5 { value: "18-24", label: "18-24" },
6 { value: "25-34", label: "25-34", defaultSelected: true }
7];
8const createQuestionConfigBody: CreateQuestionConfigBody = {
9 key: "age_range",
10 label: "What is your age range?",
11 required: false, // optional: demonstriert ausgelassene vs. eingeschlossene optionale Felder
12 renderingType: QuestionRenderingType.Dropdown,
13 options: customOptions,
14 whenSave: QuestionWhenSave.Always
15};
16const result: CreateQuestionConfig200Response = await createQuestionConfig(tenantId, createQuestionConfigBody);
17

Frage-Konfiguration löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für deleteQuestionConfig
Copy Copy
1
2async function deleteIfPresent(tenantId: string, id?: string): Promise<FlagCommentPublic200Response | null> {
3 if (!id) return null;
4 const result: FlagCommentPublic200Response = await deleteQuestionConfig(tenantId, id);
5 return result;
6}
7const tenantId: string = 'tenant_acme_001';
8const optionalConfigId: string | undefined = 'qcfg_20260112_01';
9(async (): Promise<void> => {
10 const deleted: FlagCommentPublic200Response | null = await deleteIfPresent(tenantId, optionalConfigId);
11 void deleted;
12})();
13

Frage-Konfiguration abrufen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetQuestionConfig200Response

Beispiel

getQuestionConfig-Beispiel
Copy Copy
1
2const tenantId: string = 'acme-corp-47';
3const questionId: string = 'q-2026-01-12-01';
4const result: GetQuestionConfig200Response = await getQuestionConfig(tenantId, questionId);
5function summarizeConfig(cfg: GetQuestionConfig200Response, includeMetadata?: boolean): QuestionConfig | undefined {
6 // includeMetadata ist optional; Implementierung der Kürze halber weggelassen
7 return undefined;
8}
9const summarizedWithMeta: QuestionConfig | undefined = summarizeConfig(result, true);
10const summarizedDefault: QuestionConfig | undefined = summarizeConfig(result);
11

Frage-Konfigurationen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip number Nein

Antwort

Gibt zurück: GetQuestionConfigs200Response

Beispiel

getQuestionConfigs Beispiel
Copy Copy
1
2const tenantId: string = 'tenant-42a7b9';
3const firstPage: GetQuestionConfigs200Response = await getQuestionConfigs(tenantId);
4const secondPage: GetQuestionConfigs200Response = await getQuestionConfigs(tenantId, 50);
5

Frage-Konfiguration aktualisieren Internal Link

Parameter

Name Type Required Description
tenantId string Ja
id string Ja
updateQuestionConfigBody UpdateQuestionConfigBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

updateQuestionConfig Beispiel
Copy Copy
1
2const tenantId: string = 'tenant-82b3a';
3const id: string = 'qst-20260112';
4const updateQuestionConfigBody: UpdateQuestionConfigBody = { label: 'Age verification', required: true, renderingType: 'singleChoice', customOptions: [{ value: '18-24', label: '18–24' }] } as UpdateQuestionConfigBody;
5const result: FlagCommentPublic200Response = await updateQuestionConfig(tenantId, id, updateQuestionConfigBody);
6

Frageergebnis erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createQuestionResultBody CreateQuestionResultBody Ja

Antwort

Gibt zurück: CreateQuestionResult200Response

Beispiel

createQuestionResult Beispiel
Copy Copy
1
2const tenantId: string = "fc_tenant_7a3c_us-east-1";
3const metaItem: MetaItem = { key: "referrer", value: "/blog/how-to-comment" };
4const createQuestionResultBody: CreateQuestionResultBody = {
5 questionId: "q_42",
6 commenterId: "user_1984",
7 answer: "yes",
8 score: 4,
9 meta: [metaItem] // optionale Metadaten demonstriert
10} as CreateQuestionResultBody;
11const result: CreateQuestionResult200Response = await createQuestionResult(tenantId, createQuestionResultBody);
12

Frageergebnis löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für deleteQuestionResult
Copy Copy
1
2const tenantId: string = 'acme-tenant-01';
3const questionResultId: string = '6f1a2b3c-4d5e-6789-abcd-ef0123456789';
4const deletedResult: FlagCommentPublic200Response = await deleteQuestionResult(tenantId, questionResultId);
5console.log(deletedResult);
6

Frageergebnis abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetQuestionResult200Response

Beispiel

getQuestionResult Beispiel
Copy Copy
1
2const tenantId: string = "3fa85f64-5717-4562-b3fc-2c963f66afa6";
3const questionId: string = "question_72f1b9c3a4";
4const result: GetQuestionResult200Response = await getQuestionResult(tenantId, questionId);
5console.log(result);
6

Frageergebnisse abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Nein
userId string Nein
startDate string Nein
questionId string Nein
questionIds string Nein
skip number Nein

Antwort

Gibt zurück: GetQuestionResults200Response

Beispiel

getQuestionResults Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_42';
3const urlId: string = 'news/2025/fastcomments-release';
4const userId: string = 'user_8b7f3c';
5const startDate: string = '2025-01-01T00:00:00Z';
6const questionIds: string = 'q123,q124';
7const skip: number = 20;
8const result: GetQuestionResults200Response = await getQuestionResults(tenantId, urlId, userId, startDate, undefined, questionIds, skip);
9

Frageergebnis aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateQuestionResultBody UpdateQuestionResultBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

updateQuestionResult Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_84f2b9';
3const id: string = 'question_3a7c1d';
4const updateQuestionResultBody: UpdateQuestionResultBody = {
5 result: { verdict: 'helpful', confidence: 0.92 },
6 reviewer: { id: 'mod_102', name: 'Aisha Rahman' },
7 notifyUser: true // optionaler Parameter enthalten
8};
9const response: FlagCommentPublic200Response = await updateQuestionResult(tenantId, id, updateQuestionResultBody);
10

Frageergebnisse aggregieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
questionId string Nein
questionIds Array Nein
urlId string Nein
timeBucket AggregateTimeBucket Nein
startDate Date Nein
forceRecalculate boolean Nein

Antwort

Gibt zurück: AggregateQuestionResults200Response


Frageergebnisse massenhaft aggregieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
bulkAggregateQuestionResultsRequest BulkAggregateQuestionResultsRequest Ja
forceRecalculate boolean Nein

Antwort

Gibt zurück: BulkAggregateQuestionResults200Response


Kommentare mit Frageergebnissen kombinieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
questionId string Nein
questionIds Array Nein
urlId string Nein
startDate Date Nein
forceRecalculate boolean Nein
minValue number Nein
maxValue number Nein
limit number Nein

Antwort

Gibt zurück: CombineCommentsWithQuestionResults200Response


SSO-Benutzer hinzufügen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createAPISSOUserData CreateAPISSOUserData Ja

Antwort

Gibt zurück: AddSSOUserAPIResponse


SSO-Benutzer löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
deleteComments boolean Nein
commentDeleteMode string Nein

Antwort

Gibt zurück: DeleteSSOUserAPIResponse


SSO-Benutzer per E-Mail abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
email string Ja

Antwort

Gibt zurück: GetSSOUserByEmailAPIResponse


SSO-Benutzer per ID abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetSSOUserByIdAPIResponse


SSO-Benutzer abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip number Nein

Antwort

Gibt zurück: GetSSOUsers200Response


SSO-Benutzer teilweise aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateAPISSOUserData UpdateAPISSOUserData Ja
updateComments boolean Nein

Antwort

Gibt zurück: PatchSSOUserAPIResponse


SSO-Benutzer ersetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateAPISSOUserData UpdateAPISSOUserData Ja
updateComments boolean Nein

Antwort

Gibt zurück: PutSSOUserAPIResponse


Abonnement erstellen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createAPIUserSubscriptionData CreateAPIUserSubscriptionData Ja

Antwort

Gibt zurück: CreateSubscriptionAPIResponse


Abonnement löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
userId string Nein

Antwort

Gibt zurück: DeleteSubscriptionAPIResponse


Abonnements abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein

Antwort

Gibt zurück: GetSubscriptionsAPIResponse


Tägliche Nutzungen des Mandanten abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
yearNumber number Nein
monthNumber number Nein
dayNumber number Nein
skip number Nein

Antwort

Gibt zurück: GetTenantDailyUsages200Response

Beispiel

getTenantDailyUsages Beispiel
Copy Copy
1
2const tenantId: string = "tenant_89f3c2-prod";
3const yearNumber: number = 2026;
4const monthNumber: number = 1;
5const skip: number = 0;
6const usages: GetTenantDailyUsages200Response = await getTenantDailyUsages(tenantId, yearNumber, monthNumber, undefined, skip);
7

Mandantenpaket erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createTenantPackageBody CreateTenantPackageBody Ja

Antwort

Gibt zurück: CreateTenantPackage200Response

Beispiel

createTenantPackage Beispiel
Copy Copy
1
2const tenantId: string = "tenant_7f3b1a9c";
3const tenantPackage: TenantPackage = { id: "pkg_001", name: "Premium Plan", seats: 100 };
4const customConfig: CustomConfigParameters = { enableImages: true, maxImageSizeMb: 10 };
5const createTenantPackageBody: CreateTenantPackageBody = {
6 packageName: "Premium Plus",
7 tenantPackage,
8 customConfig,
9 notes: "Enable advanced moderation and image uploads" // optionaler Parameter demonstriert
10};
11const result: CreateTenantPackage200Response = await createTenantPackage(tenantId, createTenantPackageBody);
12

Mandantenpaket löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für deleteTenantPackage
Copy Copy
1
2const tenantId: string = 'fc-tenant-8a9c2b';
3const packageId: string = 'pkg-47f3c9';
4const result: FlagCommentPublic200Response = await deleteTenantPackage(tenantId, packageId);
5

Mandantenpaket abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
id string Yes

Antwort

Gibt zurück: GetTenantPackage200Response

Beispiel

getTenantPackage Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_westus_01';
3const packageId: string = 'pkg_premium_annual_2026';
4interface FetchOptions { includeArchived?: boolean }
5const options: FetchOptions = { includeArchived: false };
6const result: GetTenantPackage200Response = await getTenantPackage(tenantId, packageId);
7

Mandantenpakete abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
skip number No

Antwort

Gibt zurück: GetTenantPackages200Response

Beispiel

getTenantPackages Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_4f3a9c2d';
3const skip: number = 25;
4const packagesResponse: GetTenantPackages200Response = await getTenantPackages(tenantId);
5const pagedPackagesResponse: GetTenantPackages200Response = await getTenantPackages(tenantId, skip);
6

Mandantenpaket ersetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
replaceTenantPackageBody ReplaceTenantPackageBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

replaceTenantPackage Beispiel
Copy Copy
1
2const tenantId: string = 'tenant-9b72f2';
3const packageId: string = 'pkg-prod-v2';
4const replaceTenantPackageBody: ReplaceTenantPackageBody = {
5 name: 'Premium Moderation Bundle',
6 enabled: true,
7 maxModerators: 4,
8 // optionale Felder wie "notes" oder "trialExpiry" sind hier absichtlich weggelassen
9} as ReplaceTenantPackageBody;
10const result: FlagCommentPublic200Response = await replaceTenantPackage(
11 tenantId,
12 packageId,
13 replaceTenantPackageBody
14);
15

Mandantenpaket aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateTenantPackageBody UpdateTenantPackageBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für updateTenantPackage
Copy Copy
1
2const tenantId: string = 'tenant_8a4f1c9b';
3const packageId: string = 'pkg_premium_v2';
4const customConfig: CustomConfigParameters = { enableRichText: true, maxImagesPerComment: 5 };
5const updateTenantPackageBody: UpdateTenantPackageBody = {
6 name: 'Premium Moderation Package',
7 enabled: true,
8 description: 'Adds advanced spam rules, image moderation and priority support',
9 customConfigParameters: customConfig
10};
11const result: FlagCommentPublic200Response = await updateTenantPackage(tenantId, packageId, updateTenantPackageBody);
12

Mandantenbenutzer erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createTenantUserBody CreateTenantUserBody Ja

Antwort

Gibt zurück: CreateTenantUser200Response

Beispiel

createTenantUser Beispiel
Copy Copy
1
2const tenantId: string = "tenant_9a8c7e4b";
3const createTenantUserBody: CreateTenantUserBody = {
4 email: "julia.smith@acme-corp.com",
5 displayName: "Julia Smith",
6 role: "moderator",
7 password: "Str0ngP@ssword!23",
8 sendInviteEmail: true, // optionaler Parameter zur Demonstration
9 locale: "en-US",
10 metadata: { department: "Customer Success" }
11};
12const result: CreateTenantUser200Response = await createTenantUser(tenantId, createTenantUserBody);
13

Mandantenbenutzer löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
deleteComments string Nein
commentDeleteMode string Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

deleteTenantUser Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_8f3b2a9c';
3const id: string = 'user_4e5f6a7b';
4const deleteComments: string = 'true';
5const commentDeleteMode: string = 'hard';
6
7const result: FlagCommentPublic200Response = await deleteTenantUser(tenantId, id, deleteComments, commentDeleteMode);
8

Mandantenbenutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetTenantUser200Response

Beispiel

getTenantUser Beispiel
Copy Copy
1
2const tenantId: string = "tenant_9f7d4b2a-1c3e";
3const id: string = "user_6a12b3c4d5";
4const includeProfile: boolean | undefined = true; // Beispiel für optionalen Parameter
5const response: GetTenantUser200Response = await getTenantUser(tenantId, id);
6console.log("Tenant user fetched", response);
7

Mandantenbenutzer abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip number Nein

Antwort

Gibt zurück: GetTenantUsers200Response

Beispiel

getTenantUsers Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_8f3b2c1a';
3const skip: number = 50;
4const firstPage: GetTenantUsers200Response = await getTenantUsers(tenantId);
5const nextPage: GetTenantUsers200Response = await getTenantUsers(tenantId, skip);
6

Mandantenbenutzer ersetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
replaceTenantUserBody ReplaceTenantUserBody Ja
updateComments string Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für replaceTenantUser
Copy Copy
1
2const tenantId: string = "tenant_5f8b9a";
3const id: string = "user_92bf21";
4const replaceTenantUserBody: ReplaceTenantUserBody = {
5 email: "jane.doe@acme-corp.com",
6 displayName: "Jane Doe",
7 externalId: "acme|12345",
8 roles: ["commenter", "moderator"],
9 isActive: true,
10 metadata: { team: "product", location: "NYC" }
11};
12const updateComments: string = "Update historical comments to reflect new display name";
13const result: FlagCommentPublic200Response = await replaceTenantUser(tenantId, id, replaceTenantUserBody, updateComments);
14

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
redirectURL string Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für sendLoginLink
Copy Copy
1
2const tenantId: string = 'tenant_acme_01';
3const id: string = 'user_9f3b2a';
4const redirectURL: string = 'https://app.example.com/onboard?source=login-email';
5const result: FlagCommentPublic200Response = await sendLoginLink(tenantId, id, redirectURL);
6

Mandantenbenutzer aktualisieren Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateTenantUserBody UpdateTenantUserBody Ja
updateComments string Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

updateTenantUser Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_84f3b2';
3const id: string = 'user_7a9d1c';
4const updateComments: string = 'Promoted to moderator and updated contact email';
5const updateTenantUserBody: UpdateTenantUserBody = {
6 email: 'jane.doe+mod@example.com',
7 displayName: 'Jane D.',
8 roles: ['moderator'],
9 isBanned: false,
10 metadata: { department: 'community' }
11};
12const result: FlagCommentPublic200Response = await updateTenantUser(tenantId, id, updateTenantUserBody, updateComments);
13

Mandanten erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createTenantBody CreateTenantBody Ja

Antwort

Gibt zurück: CreateTenant200Response

Beispiel

createTenant Beispiel
Copy Copy
1
2const tenantId: string = "acme-corporation";
3const billing: BillingInfo = { planId: "pro", billingContactEmail: "finance@acme-corp.com", currency: "USD" };
4const domainConfig: APIDomainConfiguration = { primaryDomain: "comments.acme-corp.com", allowedDomains: ["acme-corp.com", "www.acme-corp.com"], enforceHttps: true };
5const importedSites: ImportedSiteType[] = [{ siteId: "site-001", url: "https://blog.acme-corp.com", name: "Acme Blog" }]; // optional
6const createBody: CreateTenantBody = { tenantName: "Acme Corporation", adminEmail: "admin@acme-corp.com", billingInfo: billing, domainConfiguration: domainConfig, importedSites, enableModeration: true };
7const response: CreateTenant200Response = await createTenant(tenantId, createBody);
8

Mandanten löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
sure string Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

deleteTenant Beispiel
Copy Copy
1
2const tenantId: string = "tenant_7b3f1a9e";
3const id: string = "flag_9c4d2b1a";
4const sure: string = "yes_confirm_delete";
5
6const result: FlagCommentPublic200Response = await deleteTenant(tenantId, id, sure);
7console.log(result);
8

Mandant abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetTenant200Response

Beispiel

getTenant Beispiel
Copy Copy
1
2const tenantId: string = "tenant_acme_corp";
3const id: string = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
4interface GetOptions { includeDeleted?: boolean; locale?: string; }
5const options: GetOptions = { locale: "en-US" };
6const result: GetTenant200Response = await getTenant(tenantId, id);
7

Mandanten abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
meta string Nein
skip number Nein

Antwort

Gibt zurück: GetTenants200Response

Beispiel

getTenants Beispiel
Copy Copy
1
2(async () => {
3 const tenantId: string = 'tenant_9f2d1b7c';
4 const meta: string = 'include=domains,billing,customConfig';
5 const skip: number = 20;
6 const response: GetTenants200Response = await getTenants(tenantId, meta, skip);
7 console.log(response);
8})();
9

Mandant aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateTenantBody UpdateTenantBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

updateTenant Beispiel
Copy Copy
1
2const tenantId: string = "tenant_01H4ZQ7KABCD";
3const id: string = "site_9f8e7d6c";
4const apiDomainConfiguration: APIDomainConfiguration = {
5 primaryDomain: "comments.acme.com",
6 allowSubdomains: true
7};
8const billingInfo: BillingInfo = {
9 planName: "Business",
10 billingContactEmail: "billing@acme.com",
11 seats: 25
12};
13const updateTenantBody: UpdateTenantBody = {
14 displayName: "Acme Corporation Comments",
15 apiDomainConfiguration,
16 billingInfo, // optionaler Parameter zur Demonstration
17 enableModeration: true
18};
19const result: FlagCommentPublic200Response = await updateTenant(tenantId, id, updateTenantBody);
20

Bild hochladen Internal Link

Bild hochladen und skalieren

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
file Blob Ja
sizePreset SizePreset Nein
urlId string Nein

Antwort

Gibt zurück: UploadImageResponse

Fortschritt des Benutzerabzeichens nach ID abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetUserBadgeProgressById200Response


Fortschritt des Benutzerabzeichens nach Benutzer-ID abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Ja

Antwort

Gibt zurück: GetUserBadgeProgressById200Response


Fortschrittsliste der Benutzerabzeichen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein
limit number Nein
skip number Nein

Antwort

Gibt zurück: GetUserBadgeProgressList200Response


Benutzerabzeichen erstellen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createUserBadgeParams CreateUserBadgeParams Ja

Antwort

Gibt zurück: CreateUserBadge200Response


Benutzerabzeichen löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: UpdateUserBadge200Response


Benutzerabzeichen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetUserBadge200Response


Benutzerabzeichen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein
badgeId string Nein
type number Nein
displayedOnComments boolean Nein
limit number Nein
skip number Nein

Antwort

Gibt zurück: GetUserBadges200Response


Benutzerabzeichen aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
updateUserBadgeParams UpdateUserBadgeParams Ja

Antwort

Gibt zurück: UpdateUserBadge200Response


Benutzer-Benachrichtigungsanzahl abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
sso string Nein

Antwort

Gibt zurück: GetUserNotificationCount200Response


Benutzerbenachrichtigungen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
pageSize number Nein
afterId string Nein
includeContext boolean Nein
afterCreatedAt number Nein
unreadOnly boolean Nein
dmOnly boolean Nein
noDm boolean Nein
includeTranslations boolean Nein
sso string Nein

Antwort

Gibt zurück: GetUserNotifications200Response


Benutzer-Benachrichtigungsanzahl zurücksetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
sso string Nein

Antwort

Gibt zurück: ResetUserNotifications200Response


Benutzerbenachrichtigungen zurücksetzen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
afterId string Nein
afterCreatedAt number Nein
unreadOnly boolean Nein
dmOnly boolean Nein
noDm boolean Nein
sso string Nein

Antwort

Gibt zurück: ResetUserNotifications200Response


Status des Kommentarabonnements der Benutzerbenachrichtigung aktualisieren Internal Link

Benachrichtigungen für einen bestimmten Kommentar aktivieren oder deaktivieren.

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
notificationId string Ja
optedInOrOut UpdateUserNotificationCommentSubscriptionStatusOptedInOrOutEnum Ja
commentId string Ja
sso string Nein

Antwort

Gibt zurück: UpdateUserNotificationStatus200Response


Status des Seitenabonnements der Benutzerbenachrichtigung aktualisieren Internal Link

Aktivieren oder Deaktivieren von Benachrichtigungen für eine Seite. Wenn Nutzer eine Seite abonniert haben, werden Benachrichtigungen erstellt für neue Root-Kommentare, und auch

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
url string Ja
pageTitle string Ja
subscribedOrUnsubscribed UpdateUserNotificationPageSubscriptionStatusSubscribedOrUnsubscribedEnum Ja
sso string Nein

Antwort

Gibt zurück: UpdateUserNotificationStatus200Response

Status der Benutzerbenachrichtigung aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
notificationId string Ja
newStatus UpdateUserNotificationStatusNewStatusEnum Ja
sso string Nein

Antwort

Gibt zurück: UpdateUserNotificationStatus200Response

Präsenzstatus der Benutzer abrufen Internal Link

Parameter

Name Type Required Description
tenantId string Ja
urlIdWS string Ja
userIds string Ja

Antwort

Gibt zurück: GetUserPresenceStatuses200Response


Benutzer suchen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
usernameStartsWith string Ja
mentionGroupIds Array Nein
sso string Nein

Antwort

Gibt zurück: SearchUsers200Response


Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja

Antwort

Gibt zurück: GetUser200Response

Beispiel

getUser-Beispiel
Copy Copy
1
2const tenantId: string = "acme-publishing-42";
3const userIdOptional: string | undefined = "user_9d7b4c"; // kann in einigen Abläufen undefiniert sein (optional)
4const id: string = userIdOptional ?? "user_default_0001";
5const result: GetUser200Response = await getUser(tenantId, id);
6console.log(result);
7

Abstimmung erstellen Internal Link


Parameter

Name Type Required Description
tenantId string Ja
commentId string Ja
direction CreateVoteDirectionEnum Ja
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: VoteComment200Response

Beispiel

createVote Beispiel
Copy Copy
1
2(async () => {
3 const tenantId: string = 'acme-tenant-812';
4 const commentId: string = '5e8f8b7a-3d4b-4f1b-9a2e-1c9f2d6a7b8c';
5 const direction: CreateVoteDirectionEnum = CreateVoteDirectionEnum.UP;
6 const anonUserId: string = 'anon-84b9c2d';
7 const voteResult: VoteComment200Response = await createVote(tenantId, commentId, direction, undefined, anonUserId);
8 console.log(voteResult);
9})();
10

Abstimmung löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Ja
editKey string Nein

Antwort

Gibt zurück: DeleteCommentVote200Response

Beispiel

deleteVote Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_7f3b21c9';
3const id: string = 'vote_4a2d9f1b';
4const editKey: string = 'edit_92b7c6a1';
5
6const resultWithoutEditKey: DeleteCommentVote200Response = await deleteVote(tenantId, id);
7const resultWithEditKey: DeleteCommentVote200Response = await deleteVote(tenantId, id, editKey);
8

Abstimmungen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja

Antwort

Gibt zurück: GetVotes200Response

Beispiel

getVotes Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_9f8b3c_prod';
3const urlId: string = '/news/2026/typescript-ecosystem-update';
4const votes: GetVotes200Response = await getVotes(tenantId, urlId);
5// Wenn ein optionaler Parameter existierte, z. B. includeHidden, könnte er so verwendet werden:
6// const votesWithHidden: GetVotes200Response = await getVotes(tenantId, urlId, { includeHidden: true });
7

Abstimmungen für Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: GetVotesForUser200Response

Beispiel

getVotesForUser Beispiel
Copy Copy
1
2const tenantId: string = 'tenant_acme_01';
3const urlId: string = 'news/2026/01/12/product-launch';
4const userId: string = 'user_9c3f2b';
5const anonUserId: string = 'anon_d4e7a1';
6
7const votesForUser: GetVotesForUser200Response = await getVotesForUser(tenantId, urlId, userId);
8const votesForAnon: GetVotesForUser200Response = await getVotesForUser(tenantId, urlId, undefined, anonUserId);
9

Benötigen Sie Hilfe?

Wenn Sie auf Probleme stoßen oder Fragen zum JavaScript-/TypeScript-SDK haben, bitte:

Mitwirken

Beiträge sind willkommen! Bitte besuchen Sie das GitHub-Repository für Richtlinien zur Mitarbeit.