Skip to content

Type Alias: WebchatStreamFrame

ts
type WebchatStreamFrame =
  | {
  sessionId: string;
  type: "connected";
}
  | {
  chunkIndex?: number;
  chunkTotal?: number;
  content: string;
  formActions?: FormAction[];
  offerCards?: WebchatOfferCard[];
  sessionId: string;
  timestamp: string;
  turnId?: number;
  type: "message";
};

The SSE frames the SDK reads from GET /messages/stream; the channel may emit a superset.

Union Members

Type Literal

ts
{
  sessionId: string;
  type: "connected";
}

Type Literal

ts
{
  chunkIndex?: number;
  chunkTotal?: number;
  content: string;
  formActions?: FormAction[];
  offerCards?: WebchatOfferCard[];
  sessionId: string;
  timestamp: string;
  turnId?: number;
  type: "message";
}
NameTypeDescription
chunkIndex?number-
chunkTotal?number-
contentstring-
formActions?FormAction[]Last chunk of a turn only.
offerCards?WebchatOfferCard[]Last chunk of a turn only.
sessionIdstring-
timestampstring-
turnId?number-
type"message"-

Proprietary. All rights reserved.