2024-04-21 15:14:16 -07:00
|
|
|
use async_trait::async_trait;
|
|
|
|
|
pub use crate::model::Conversation;
|
2024-04-20 18:17:55 -07:00
|
|
|
|
2024-04-21 15:14:16 -07:00
|
|
|
#[async_trait]
|
2024-04-20 18:17:55 -07:00
|
|
|
pub trait APIInterface {
|
2024-04-21 15:14:16 -07:00
|
|
|
type Error;
|
2024-04-20 18:17:55 -07:00
|
|
|
|
2024-04-21 15:14:16 -07:00
|
|
|
// (GET) /version
|
|
|
|
|
async fn get_version(&self) -> Result<String, Self::Error>;
|
|
|
|
|
|
|
|
|
|
// (GET) /conversations
|
|
|
|
|
async fn get_conversations(&self) -> Result<Vec<Conversation>, Self::Error>;
|
2024-04-20 18:17:55 -07:00
|
|
|
}
|
2024-04-21 15:14:16 -07:00
|
|
|
|