mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-23 16:22:29 +00:00
23 lines
590 B
Rust
23 lines
590 B
Rust
pub use client_api::entity::search_dto::{
|
|
SearchDocumentResponseItem, SearchResult, SearchSummaryResult,
|
|
};
|
|
use flowy_error::FlowyError;
|
|
use lib_infra::async_trait::async_trait;
|
|
use uuid::Uuid;
|
|
|
|
#[async_trait]
|
|
pub trait SearchCloudService: Send + Sync + 'static {
|
|
async fn document_search(
|
|
&self,
|
|
workspace_id: &Uuid,
|
|
query: String,
|
|
) -> Result<Vec<SearchDocumentResponseItem>, FlowyError>;
|
|
|
|
async fn generate_search_summary(
|
|
&self,
|
|
workspace_id: &Uuid,
|
|
query: String,
|
|
search_results: Vec<SearchResult>,
|
|
) -> Result<SearchSummaryResult, FlowyError>;
|
|
}
|