import type { AnalyticsMetadataResource } from './analytics_metadata' import { ConversationBadgeResource } from './conversation_badge' import { ConversationMembershipResource } from './conversation_membership' import { GroupResource } from './group_resource' import { MemberAbilityResource } from './member_ability' import { ReactionCountResource } from './reaction' export interface ConversationPreviewData { kind: 'reaction' | 'message' | 'system' authorName: string value: ReactionCountResource['value'] | null text: string createdAt: string } export interface ConversationResource { type: 'Conversation' id: number badges?: ConversationBadgeResource[] analyticsMetadata?: AnalyticsMetadataResource conversationMembership?: Partial conversationPreview: ConversationPreviewData | null createdAt: string deleted?: boolean directMessage?: boolean disabled?: boolean disabledReason?: string | null disabledMessage?: string | null genderOption?: string | null groups?: GroupResource[] previewAvatarUrls?: string[] customAvatarType?: 'image' | 'icon' | 'emoji' | null customAvatarKey?: string | null customAvatarColor?: string | null customAvatarImageUrl?: string | null lastMessageAuthorId?: string lastMessageAuthorName?: string lastMessageCreatedAt?: string lastMessageTextPreview?: string latestReadMessageSortKey?: string memberAbility?: MemberAbilityResource muted: boolean repliesDisabled: boolean title: string | null unreadCount: number unreadReaction: boolean updatedAt: string } export type ConversationAvatarData = Pick< ConversationResource, | 'customAvatarType' | 'customAvatarKey' | 'customAvatarColor' | 'customAvatarImageUrl' | 'previewAvatarUrls' >