rive_models/
webhook.rs

1use serde::{Deserialize, Serialize};
2
3use crate::attachment::Attachment;
4
5/// Webhook information
6#[derive(Deserialize, Debug, Clone)]
7pub struct Webhook {
8    /// Webhook ID
9    pub id: String,
10
11    /// The name of the webhook
12    pub name: String,
13
14    /// The avatar of the webhook
15    pub avatar: Option<Attachment>,
16
17    /// The channel this webhook belongs to
18    pub channel_id: String,
19
20    /// The private token for the webhook
21    pub token: Option<String>,
22}
23
24/// Partial webhook data
25#[derive(Deserialize, Debug, Clone)]
26pub struct PartialWebhook {
27    /// The name of the webhook
28    pub name: Option<String>,
29
30    /// The avatar of the webhook
31    pub avatar: Option<Attachment>,
32
33    /// The channel this webhook belongs to
34    pub channel_id: Option<String>,
35
36    /// The private token for the webhook
37    pub token: Option<String>,
38}
39
40/// Optional fields on webhook object
41#[derive(Serialize, Deserialize, Debug, Clone)]
42pub enum FieldsWebhook {
43    Avatar,
44}