Interface OptionItem<TUserDefinedType>

An option item returned in a message response from a back-end. This response type is used when displaying a list of options to the user. How the options are displayed is up to the client but is often displayed in either a drop-down or as a list of buttons.

interface OptionItem<TUserDefinedType = Record<string, unknown>> {
    agent_message_type?: AgentMessageType;
    description?: string;
    message_options?: GenericItemMessageOptions;
    options: Option[];
    preference?: OptionItemPreference;
    response_type: MessageResponseTypes;
    streaming_metadata?: ItemStreamingMetadata;
    title?: 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.

description?: string

An optional description to be shown alongside the options.

message_options?: GenericItemMessageOptions

Options that control additional features available for a message item.

options: Option[]

An array of objects describing the options from which the user can choose.

The preferred type of control to display.

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.

title?: string

An optional title to be shown alongside the options.

user_defined?: TUserDefinedType

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

MMNEPVFCICPMFPCPTTAAATR