use actix_web::{HttpResponse, web}; use serde::Deserialize; use crate::api::response::{ApiErrorResponse, ApiListResponse}; use crate::error::AppError; use crate::service::AppService; use crate::session::Session; #[derive(Deserialize, utoipa::IntoParams)] pub struct BillingHistoryQuery { pub limit: Option, pub offset: Option, } #[utoipa::path( get, path = "/api/v1/workspaces/{workspace_name}/billing/history", tag = "Workspaces", operation_id = "workspaceBillingHistory", summary = "List billing history", description = "Return billing history for a workspace. Requires owner role.", params( ("workspace_name" = String, Path, description = "Workspace name."), BillingHistoryQuery ), responses( (status = 200, description = "List of billing history entries (currently empty).", body = ApiListResponse), (status = 401, description = "Unauthenticated or insufficient role.", body = ApiErrorResponse), (status = 500, description = "Internal server error.", body = ApiErrorResponse) ) )] pub async fn billing_history( _service: web::Data, _session: Session, _path: web::Path, _query: web::Query, ) -> Result { Ok(HttpResponse::Ok().json(ApiListResponse::::empty())) }