use revolt_result::Result;
use crate::{FieldsWebhook, PartialWebhook, Webhook};
mod mongodb;
mod reference;
#[async_trait]
pub trait AbstractWebhooks: Sync + Send {
async fn insert_webhook(&self, webhook: &Webhook) -> Result<()>;
async fn fetch_webhook(&self, webhook_id: &str) -> Result<Webhook>;
async fn fetch_webhooks_for_channel(&self, channel_id: &str) -> Result<Vec<Webhook>>;
async fn update_webhook(
&self,
webhook_id: &str,
partial: &PartialWebhook,
remove: &[FieldsWebhook],
) -> Result<()>;
async fn delete_webhook(&self, webhook_id: &str) -> Result<()>;
}