use salvo::prelude::*;
use serde::{Deserialize, Serialize};
use crate::serde::RawJsonValue;
use crate::{OwnedEventId, OwnedRoomId};
#[derive(ToParameters, Deserialize, Debug)]
pub struct EventAuthorizationReqArgs {
#[salvo(parameter(parameter_in = Path))]
pub room_id: OwnedRoomId,
#[salvo(parameter(parameter_in = Path))]
pub event_id: OwnedEventId,
}
#[derive(ToSchema, Serialize, Debug)]
pub struct EventAuthorizationResBody {
#[salvo(schema(value_type = Vec<Object>))]
pub auth_chain: Vec<Box<RawJsonValue>>,
}
impl EventAuthorizationResBody {
pub fn new(auth_chain: Vec<Box<RawJsonValue>>) -> Self {
Self { auth_chain }
}
}