use common_utils::id_type; use masking::Secret; use time::PrimitiveDateTime; #[derive(Debug, serde::Deserialize, serde::Serialize, Clone)] pub struct ChatRequest { pub message: Secret, } #[derive(Debug, serde::Deserialize, serde::Serialize, Clone)] pub struct ChatResponse { pub response: Secret, pub merchant_id: id_type::MerchantId, pub status: String, #[serde(skip_serializing)] pub query_executed: Option>, #[serde(skip_serializing)] pub row_count: Option, } #[derive(Debug, serde::Deserialize, serde::Serialize)] pub struct ChatListRequest { pub merchant_id: Option, pub limit: Option, pub offset: Option, } #[derive(Debug, serde::Deserialize, serde::Serialize)] pub struct ChatConversation { pub id: String, pub session_id: Option, pub user_id: Option, pub merchant_id: Option, pub profile_id: Option, pub org_id: Option, pub role_id: Option, pub user_query: Secret, pub response: Secret, pub database_query: Option, pub interaction_status: Option, #[serde(with = "common_utils::custom_serde::iso8601")] pub created_at: PrimitiveDateTime, } #[derive(Debug, serde::Deserialize, serde::Serialize)] pub struct ChatListResponse { pub conversations: Vec, }