2025-10-06 10:30:17 -03:00
|
|
|
use std::sync::Arc;
|
|
|
|
|
|
|
|
|
|
use crate::{
|
|
|
|
|
bot::BotOrchestrator,
|
2025-10-06 19:12:13 -03:00
|
|
|
channels::{VoiceAdapter, WebChannelAdapter},
|
2025-10-06 10:30:17 -03:00
|
|
|
config::AppConfig,
|
|
|
|
|
tools::ToolApi,
|
2025-10-06 19:12:13 -03:00
|
|
|
web_automation::BrowserPool,
|
|
|
|
|
whatsapp::WhatsAppAdapter,
|
2025-10-06 10:30:17 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
|
pub struct AppState {
|
|
|
|
|
pub minio_client: Option<minio::s3::Client>,
|
|
|
|
|
pub config: Option<AppConfig>,
|
|
|
|
|
pub db: Option<sqlx::PgPool>,
|
|
|
|
|
pub db_custom: Option<sqlx::PgPool>,
|
|
|
|
|
pub browser_pool: Arc<BrowserPool>,
|
|
|
|
|
pub orchestrator: Arc<BotOrchestrator>,
|
|
|
|
|
pub web_adapter: Arc<WebChannelAdapter>,
|
|
|
|
|
pub voice_adapter: Arc<VoiceAdapter>,
|
|
|
|
|
pub whatsapp_adapter: Arc<WhatsAppAdapter>,
|
|
|
|
|
pub tool_api: Arc<ToolApi>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub struct BotState {
|
|
|
|
|
pub language: String,
|
|
|
|
|
pub work_folder: String,
|
|
|
|
|
}
|