use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[derive(Serialize)]
pub struct TriggerEventData {
pub name: String,
pub channels: Vec<String>,
pub data: String,
pub socket_id: Option<String>,
}
pub type QueryParameters = Vec<(String, String)>;
#[derive(Deserialize, Debug)]
pub struct TriggeredEvents {
pub event_ids: Option<HashMap<String, String>>,
}
#[derive(Deserialize, Debug)]
pub struct ChannelList {
pub channels: HashMap<String, Channel>, }
#[derive(Serialize)]
pub struct Member<'a> {
pub user_id: &'a str,
pub user_info: Option<HashMap<&'a str, &'a str>>,
}
#[derive(Deserialize, Debug)]
pub struct Webhook {
pub time_ms: i64,
pub events: Vec<HashMap<String, String>>,
}
#[derive(Deserialize, Debug)]
pub struct Channel {
pub occupied: Option<bool>,
pub user_count: Option<i32>,
pub subscription_count: Option<i32>,
}
#[derive(Deserialize, Debug)]
pub struct ChannelUserList {
pub users: Vec<ChannelUser>,
}
#[derive(Deserialize, Debug)]
pub struct ChannelUser {
pub id: String,
}