1use serde::{Deserialize, Serialize};
2
3use crate::attachment::Attachment;
4
5#[derive(Deserialize, Debug, Clone)]
7pub struct Webhook {
8 pub id: String,
10
11 pub name: String,
13
14 pub avatar: Option<Attachment>,
16
17 pub channel_id: String,
19
20 pub token: Option<String>,
22}
23
24#[derive(Deserialize, Debug, Clone)]
26pub struct PartialWebhook {
27 pub name: Option<String>,
29
30 pub avatar: Option<Attachment>,
32
33 pub channel_id: Option<String>,
35
36 pub token: Option<String>,
38}
39
40#[derive(Serialize, Deserialize, Debug, Clone)]
42pub enum FieldsWebhook {
43 Avatar,
44}