// This file was auto-generated by Fern from our API Definition.

import type * as Intercom from "../../../../../index.js";

/**
 * Conversations are how you can communicate with users in Intercom. They are created when a contact replies to an outbound message, or when one admin directly sends a message to a single contact.
 */
export interface Conversation {
    /** Always conversation. */
    type?: string;
    /** The id representing the conversation. */
    id?: string;
    /** The title given to the conversation. */
    title?: string;
    /** The time the conversation was created. */
    created_at?: number;
    /** The last time the conversation was updated. */
    updated_at?: number;
    /** The last time a Contact responded to an Admin. In other words, the time a customer started waiting for a response. Set to null if last reply is from an Admin. */
    waiting_since?: number;
    /** If set this is the time in the future when this conversation will be marked as open. i.e. it will be in a snoozed state until this time. i.e. it will be in a snoozed state until this time. */
    snoozed_until?: number;
    /** Indicates whether a conversation is open (true) or closed (false). */
    open?: boolean;
    /** Can be set to "open", "closed" or "snoozed". */
    state?: Conversation.State;
    /** Indicates whether a conversation has been read. */
    read?: boolean;
    /** If marked as priority, it will return priority or else not_priority. */
    priority?: Conversation.Priority;
    /** The id of the admin assigned to the conversation. If it's not assigned to an admin it will return null. */
    admin_assignee_id?: number;
    /** The id of the team assigned to the conversation. If it's not assigned to a team it will return null. */
    team_assignee_id?: string;
    /** The ID of the company that the conversation is associated with. The unique identifier for the company which is given by Intercom. */
    company_id?: string;
    /** The company associated with the conversation. */
    company?: Intercom.unstable.Company;
    tags?: Intercom.unstable.Tags;
    conversation_rating?: Intercom.unstable.ConversationRating;
    source?: Intercom.unstable.ConversationSource;
    contacts?: Intercom.unstable.ConversationContacts;
    teammates?: Intercom.unstable.ConversationTeammates;
    custom_attributes?: Intercom.unstable.CustomAttributes;
    first_contact_reply?: Intercom.unstable.ConversationFirstContactReply;
    sla_applied?: Intercom.unstable.SlaApplied;
    statistics?: Intercom.unstable.ConversationStatistics;
    conversation_parts?: Intercom.unstable.ConversationParts;
    linked_objects?: Intercom.unstable.LinkedObjectList;
    /** Indicates whether the AI Agent participated in the conversation. */
    ai_agent_participated?: boolean;
    ai_agent?: Intercom.unstable.AiAgent;
}

export namespace Conversation {
    /** Can be set to "open", "closed" or "snoozed". */
    export const State = {
        Open: "open",
        Closed: "closed",
        Snoozed: "snoozed",
    } as const;
    export type State = (typeof State)[keyof typeof State];
    /** If marked as priority, it will return priority or else not_priority. */
    export const Priority = {
        Priority: "priority",
        NotPriority: "not_priority",
    } as const;
    export type Priority = (typeof Priority)[keyof typeof Priority];
}
