Interface GridItem<TUserDefinedType>

The basic class for items returned from a back-end as part of a message response. These are the items contained in the MessageOutput.generic array.

interface GridItem<TUserDefinedType = Record<string, unknown>> {
    agent_message_type?: AgentMessageType;
    columns: { width: string }[];
    horizontal_alignment?: HorizontalCellAlignment;
    max_width?: WidthOptions;
    message_options?: GenericItemMessageOptions;
    response_type: MessageResponseTypes;
    rows: {
        cells: {
            horizontal_alignment?: HorizontalCellAlignment;
            items: GenericItem<Record<string, unknown>>[];
            vertical_alignment?: VerticalCellAlignment;
        }[];
    }[];
    streaming_metadata?: ItemStreamingMetadata;
    user_defined?: TUserDefinedType;
    vertical_alignment?: VerticalCellAlignment;
}

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.

columns: { width: string }[]

The list of columns specifications. This will determine the maximum number of columns that can be rendered.

horizontal_alignment?: HorizontalCellAlignment

Determines the horizontal alignment of all items in the grid.

max_width?: WidthOptions

Sets an optional max width of the component. Options are small, medium and large. By default, the component will be 100% width of the container.

message_options?: GenericItemMessageOptions

Options that control additional features available for a message item.

response_type: MessageResponseTypes

The response type of this message item.

rows: {
    cells: {
        horizontal_alignment?: HorizontalCellAlignment;
        items: GenericItem<Record<string, unknown>>[];
        vertical_alignment?: VerticalCellAlignment;
    }[];
}[]

A list of rows to render.

Type declaration

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.

user_defined?: TUserDefinedType

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

vertical_alignment?: VerticalCellAlignment

Determines the vertical alignment of all items in the grid.

MMNEPVFCICPMFPCPTTAAATR