Interface TextItem<TUserDefinedType>

A text item returned in a message response from a back-end.

interface TextItem<TUserDefinedType = Record<string, unknown>> {
    agent_message_type?: AgentMessageType;
    format?: { use_padding?: boolean };
    message_options?: GenericItemMessageOptions;
    response_type: MessageResponseTypes;
    streaming_metadata?: ItemStreamingMetadata;
    text?: string;
    user_defined?: TUserDefinedType;
}

Type Parameters

  • TUserDefinedType = Record<string, unknown>

Hierarchy (View Summary, Expand)

Properties

agent_message_type?: AgentMessageType

For messages that are sent between the user and a human agent, we assign an agent type to the message to distinguish what type it is.

format?: { use_padding?: boolean }

The optional formatting for the text response.

Type declaration

  • Optionaluse_padding?: boolean

    If this is true, it means we are not going to get <br /> to manage spacing and should add margin/padding to elements as required with CSS.

message_options?: GenericItemMessageOptions

Options that control additional features available for a message item.

response_type: MessageResponseTypes

The response type of this message item.

streaming_metadata?: ItemStreamingMetadata

Metadata used identify a generic item within the context of a stream in order to correlate any updates meant for a specific item.

text?: string

The text of the response.

user_defined?: TUserDefinedType

An optional buckets of additional user defined properties for this item.

MMNEPVFCICPMFPCPTTAAATR