import { ApplicationChannel } from './channelTypesV2'; import { ApplicationCustomAttribute } from './contactTypesV2'; import { ApplicationConversationId, ApplicationDraftId } from './idTypesV2'; import { ApplicationInbox } from './inboxTypesV2'; import { ApplicationLink } from './linkTypesV2'; import { ApplicationRecipient } from './recipientTypesV2'; import { ApplicationTag } from './tagTypesV2'; import { ApplicationTeammate } from './teammateTypesV2'; import { ApplicationTopic } from './topicTypesV2'; export type ApplicationConversationType = 'email' | 'whatsapp' | 'frontChat' | 'internal' | 'phoneCall' | 'tweet' | 'twitterDm' | 'sms' | 'googlePlay' | 'intercom' | 'smooch' | 'facebook' | 'custom'; export type ApplicationConversationStatus = 'open' | 'archived' | 'trashed' | 'spam'; export type ApplicationConversationStatusCategory = 'open' | 'waiting' | 'resolved'; export interface ApplicationConversation { /** Unique ID of the conversation. */ id: ApplicationConversationId; /** Type of messages in the conversation. */ type: ApplicationConversationType; /** Status of the conversation for the current user. */ status: ApplicationConversationStatus; /** Subject. */ subject: string | undefined; /** Blurb of the latest message in the conversation. */ blurb: string | undefined; /** Teammate assigned to the conversation, if any. */ assignee: ApplicationTeammate | undefined; /** Main recipient of the conversation. */ recipient: ApplicationRecipient | undefined; /** Channels the conversation is in. */ channels: ReadonlyArray; /** Inboxes the conversation is in. */ inboxes: ReadonlyArray; /** Tags attached to the conversation. */ tags: ReadonlyArray; /** @deprecated Topics attached to the conversation. */ topics: ReadonlyArray; /** Links attached to the conversation. */ links: ReadonlyArray; /** The time when conversation was closed. */ closedAt: number | undefined; /** Unique ID of the conversation status category, only present if ticketing is enabled */ statusId: string | undefined; /** Status category of the conversation */ statusCategory: ApplicationConversationStatusCategory | undefined; /** List of ticket ids associated with the conversation */ ticketIds: ReadonlyArray; /** Custom field attributes associated with the conversation */ customFieldAttributes: ReadonlyArray; } export interface ApplicationSingleConversation extends ApplicationConversation { /** ID of the draft message on this conversation, if any. */ draftId: ApplicationDraftId | undefined; }