use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Clone)] pub struct User { pub id: String, pub email: String, pub username: String, pub display_name: String, pub avatar_url: Option, pub bio: Option, } #[derive(Serialize, Deserialize)] pub struct Workspace { pub id: String, pub name: String, pub slug: String, pub owner_id: String, } #[derive(Serialize, Deserialize)] pub struct Conversation { pub id: String, pub workspace_id: Option, pub kind: String, pub name: Option, pub is_public: bool, pub created_by: String, } #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Message { pub id: String, pub conversation_id: String, pub user_id: String, pub content: String, /// Sort key within the conversation. Display order follows this, never /// `created_at` — that is transaction start time on the server, so it is /// neither unique nor commit-ordered. pub seq: i64, pub created_at: String, } #[derive(Deserialize)] pub struct AuthTokenResponse { pub token: String, }