botx_api/api/v3/chats/list/
models.rs1use std::collections::HashMap;
2
3use chrono::{DateTime, Utc};
4use serde::{Serialize, Deserialize};
5use uuid::Uuid;
6
7use crate::bot::models::ChatType;
8
9#[derive(Debug, Serialize, Deserialize, Clone)]
11pub struct ChatsListResponse {
12 pub result: Vec<ChatsListResult>,
14}
15
16#[derive(Debug, Serialize, Deserialize, Clone)]
18pub struct ChatsListResult {
19 pub group_chat_id: Uuid,
21
22 pub chat_type: ChatType,
24
25 pub name: String,
27
28 pub description: String,
30
31 pub members: Vec<Uuid>,
33
34 pub shared_history: bool,
36
37 pub inserted_at: DateTime<Utc>,
39
40 pub updated_at: DateTime<Utc>,
42}
43
44#[derive(Debug, Serialize, Deserialize, Clone)]
46pub struct ChatsListError {
47 #[serde(flatten)]
49 pub data: HashMap<String, String>,
50}