import { DenormalizedAttachmentResource } from './denormalized_attachment_resource' import { DenormalizedAttachmentResourceForCreate } from './denormalized_attachment_resource_for_create' import type { PersonResource } from './person' import type { ReactionCountResource } from './reaction' export type SystemTextFormat = 'people' | 'actor' export interface MessageResource { type: 'Message' id: string text: string | null html: string createdAt: string deletedAt: string | null textEditedAt: string | null mine: boolean attachments: DenormalizedAttachmentResource[] author: PersonResource reactionCounts: ReactionCountResource[] replyCount: number replyRootId?: string | null replyRoot?: MessageResource | null idempotentKey?: string | null messageType: string personIdsForSystemEvent?: number[] | null systemTextParts?: { names: string[]; overflowCount: number; action: string } | null systemTextFormat?: SystemTextFormat | null // Custom Local Properties we set for rendering renderAuthor?: boolean renderTime?: boolean myLatestInConversation?: boolean lastInGroup?: boolean threadPosition?: 'first' | 'center' | 'last' | null prevIsMyReply?: boolean nextIsMyReply?: boolean nextRendersAuthor?: boolean isReplyShadowMessage?: boolean nextIsReplyShadowMessage?: boolean // Properties for mutation state pending?: boolean // Indicates if the message is optimistically created and pending server response error?: string // Error message if the message failed to send attachmentsForCreate?: DenormalizedAttachmentResourceForCreate[] }