use async_trait::async_trait;
use crate::{error::ShieldError, request::Request, response::Response};
#[async_trait]
pub trait ShieldHooks: Send + Sync {
async fn request(&self, action_id: &str, request: Request) -> Result<Request, ShieldError>;
async fn response(&self, action_id: &str, response: Response) -> Result<Response, ShieldError>;
async fn method_request(
&self,
action_id: &str,
method_id: &str,
provider_id: Option<&str>,
request: Request,
) -> Result<Request, ShieldError>;
async fn method_response(
&self,
action_id: &str,
method_id: &str,
provider_id: Option<&str>,
response: Response,
) -> Result<Response, ShieldError>;
}