@progress/kendo-angular-conversational-ui
Version:
Kendo UI for Angular Conversational UI components
51 lines (50 loc) • 1.93 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Action } from './action.interface';
import { Attachment, AttachmentLayout } from './attachment.interface';
import { User } from './user.interface';
/**
* Represents a Chat message ([see example](slug:overview_convui)).
*
* > * You must provide the `author` field.
* > * [Local users](slug:api_conversational-ui_chatcomponent#user) appear on the right in left-to-right languages and on the left in right-to-left languages.
* > * If `typing` is `true`, the Chat shows a typing indicator instead of text.
*/
export interface Message {
/**
* Sets the author of the message.
*/
author: User;
/**
* Sets the layout for displaying message attachments.
*/
attachmentLayout?: AttachmentLayout;
/**
* Sets the message attachments.
*/
attachments?: Attachment[];
/**
* Sets the suggested quick actions to display below this message.
*
* > Suggested actions appear only for the last message in the conversation.
*/
suggestedActions?: Action[];
/**
* Sets the status string for the message. The status appears when the message is selected by clicking or through keyboard navigation.
*/
status?: string;
/**
* Sets the text for the message. Some messages may contain only attachments or quick actions.
*/
text?: string;
/**
* Sets the time when the message was composed.
*/
timestamp?: Date;
/**
* Indicates if the message is still being typed by the user. If `true`, the Chat shows a typing indicator.
*/
typing?: boolean;
}