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

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

/**
 * Data related to AI Agent involvement in the conversation.
 */
export interface AiAgent {
    /** The type of the source that triggered AI Agent involvement in the conversation. */
    source_type?: AiAgent.SourceType;
    /** The title of the source that triggered AI Agent involvement in the conversation. If this is `essentials_plan_setup` then it will return `null`. */
    source_title?: string;
    /** The type of the last answer delivered by AI Agent. If no answer was delivered then this will return `null` */
    last_answer_type?: AiAgent.LastAnswerType;
    /** The resolution state of AI Agent. If no AI or custom answer has been delivered then this will return `null`. */
    resolution_state?: AiAgent.ResolutionState;
    /** The customer satisfaction rating given to AI Agent, from 1-5. */
    rating?: number;
    /** The customer satisfaction rating remark given to AI Agent. */
    rating_remark?: string;
    /** The time when the AI agent rating was created. */
    created_at?: number;
    /** The time when the AI agent rating was last updated. */
    updated_at?: number;
    content_sources?: Intercom.unstable.ContentSourcesList;
}

export namespace AiAgent {
    /** The type of the source that triggered AI Agent involvement in the conversation. */
    export const SourceType = {
        EssentialsPlanSetup: "essentials_plan_setup",
        Profile: "profile",
        Workflow: "workflow",
        WorkflowPreview: "workflow_preview",
        FinPreview: "fin_preview",
    } as const;
    export type SourceType = (typeof SourceType)[keyof typeof SourceType];
    /** The type of the last answer delivered by AI Agent. If no answer was delivered then this will return `null` */
    export const LastAnswerType = {
        AiAnswer: "ai_answer",
        CustomAnswer: "custom_answer",
    } as const;
    export type LastAnswerType = (typeof LastAnswerType)[keyof typeof LastAnswerType];
    /** The resolution state of AI Agent. If no AI or custom answer has been delivered then this will return `null`. */
    export const ResolutionState = {
        AssumedResolution: "assumed_resolution",
        ConfirmedResolution: "confirmed_resolution",
        Escalated: "escalated",
        NegativeFeedback: "negative_feedback",
        ProcedureHandoff: "procedure_handoff",
    } as const;
    export type ResolutionState = (typeof ResolutionState)[keyof typeof ResolutionState];
}
