Appearance
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";
}| Name | Type | Description |
|---|---|---|
chunkIndex? | number | - |
chunkTotal? | number | - |
content | string | - |
formActions? | FormAction[] | Last chunk of a turn only. |
offerCards? | WebchatOfferCard[] | Last chunk of a turn only. |
sessionId | string | - |
timestamp | string | - |
turnId? | number | - |
type | "message" | - |