use async_trait::async_trait;
use crate::domain::file_type::FileType;
use crate::domain::topology_file::TopologyFile;
use crate::infra::error::InfraError;
#[async_trait]
pub trait TopologyFileStore: Send + Sync {
async fn upsert(&self, file: &TopologyFile) -> Result<(), InfraError>;
async fn get_by_id(&self, id: &str) -> Result<Option<TopologyFile>, InfraError>;
async fn get_by_path(&self, relative_path: &str) -> Result<Option<TopologyFile>, InfraError>;
async fn find_by_canonical_hash(&self, hash: &str) -> Result<Option<TopologyFile>, InfraError>;
async fn list_active(
&self,
file_type: Option<FileType>,
limit: Option<usize>,
) -> Result<Vec<TopologyFile>, InfraError>;
async fn list_deleted(&self) -> Result<Vec<TopologyFile>, InfraError>;
async fn hard_delete(&self, id: &str) -> Result<bool, InfraError>;
async fn count_active(&self) -> Result<usize, InfraError>;
async fn list_active_paths(&self) -> Result<Vec<String>, InfraError>;
}