use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct Webhook {
#[serde(rename = "webhookID")]
pub webhook_id: String,
#[serde(rename = "webhookURL")]
pub webhook_url: String,
pub account_addresses: Vec<String>,
#[serde(default)]
pub transaction_types: Vec<String>,
#[serde(default)]
pub txn_status: Option<String>,
#[serde(default)]
pub webhook_type: Option<String>,
#[serde(default)]
pub auth_header: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct WebhookInput {
#[serde(rename = "webhookURL")]
pub webhook_url: Option<String>,
pub account_addresses: Option<Vec<String>>,
#[serde(default)]
pub transaction_types: Vec<String>,
#[serde(default)]
pub txn_status: Option<String>,
#[serde(default)]
pub webhook_type: Option<String>,
#[serde(default)]
pub auth_header: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct WebhookEvent {
pub signature: String,
pub slot: u64,
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub err: Option<serde_json::Value>,
pub account_addresses: Vec<String>,
}