using System;
using System.Collections.Generic;
namespace FrameworkDAL.DTO.EIPConversation
{
public class EIPExecutionResultDTO
{
///
/// Tenant Identifier
///
public int TenantId { get; set; }
///
/// Channel Type (WhatsApp, Telegram, Slack, Web, etc.)
///
public EIPChannelType ChannelType { get; set; }
///
/// Unique user identifier (phone/email/userId/etc.)
///
public string UserIdentifier { get; set; } = string.Empty;
///
/// Flow that was executed
///
public string FlowCode { get; set; } = string.Empty;
///
/// Conversation Id for tracking
///
public int ConversationId { get; set; }
///
/// Current step executed
///
public string? CurrentStepCode { get; set; }
///
/// Next step determined by transition
///
public string? NextStepCode { get; set; }
///
/// Final response message generated
///
public string? ResponseMessage { get; set; }
///
/// Indicates if flow execution completed
///
public bool IsCompleted { get; set; }
///
/// Indicates if execution was successful
///
public bool IsSuccess { get; set; } = true;
///
/// Error message if execution failed
///
public string? ErrorMessage { get; set; }
///
/// Structured response (buttons, attachments, cards etc.)
/// Used by Response Engine
///
public object? ChannelResponse { get; set; }
///
/// Execution metadata (timings, risk score, OTP status etc.)
///
public Dictionary Metadata { get; set; } = new();
///
/// Execution Phase Trace (Normalizer, Routing, Flow, Capability, Action, Response)
/// Used for debugging and monitoring
///
public List PhaseTrace { get; set; } = new();
///
/// Populated when a CALL_API or PRESENT step has ResponseFormat configured.
/// AppChat renders TABLE/CARD/LIST natively; text channels receive a plain-text fallback.
///
public EIPStructuredDataDTO? StructuredData { get; set; }
public string? QrCodeData { get; set; }
public string? InputHint { get; set; }
public int? RatingMax { get; set; }
public bool RequestLocation { get; set; }
public string? VoiceHint { get; set; }
///
/// Interactive buttons from CHOICE or DYNAMIC_CHOICE steps.
/// AppChat renders these as clickable reply buttons.
///
public List? Buttons { get; set; }
}
public class EIPExecutionPhaseDTO
{
///
/// Phase Name (Normalizer, Routing, Flow, Capability, Action, Response)
///
public string PhaseName { get; set; } = string.Empty;
///
/// Status (SUCCESS, FAILED, SKIPPED)
///
public string Status { get; set; } = string.Empty;
///
/// Description of execution
///
public string? Description { get; set; }
///
/// Optional phase data
///
public object? Data { get; set; }
///
/// Execution time for phase
///
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
}
}