use crate::{
config::Config, error::OpenAIError, types::admin::audit_logs::ListAuditLogsResponse, Client,
RequestOptions,
};
pub struct AuditLogs<'c, C: Config> {
client: &'c Client<C>,
pub(crate) request_options: RequestOptions,
}
impl<'c, C: Config> AuditLogs<'c, C> {
pub fn new(client: &'c Client<C>) -> Self {
Self {
client,
request_options: RequestOptions::new(),
}
}
#[crate::byot(R = serde::de::DeserializeOwned)]
pub async fn get(&self) -> Result<ListAuditLogsResponse, OpenAIError> {
self.client
.get("/organization/audit_logs", &self.request_options)
.await
}
}