#![doc = "Transport-independent service interface for local and remote calls."]
use async_trait::async_trait;
use spiral_contract::auth::AuthHeader;
use spiral_contract::call::CallError;
use crate::api::project::objects::*;
#[async_trait]
pub trait ProjectApi: Send + Sync + 'static {
async fn create_project(
&self,
auth_header: AuthHeader,
request: CreateProjectRequest,
) -> Result<CreateProjectResponse, CallError<ProjectError>>;
async fn delete_project(
&self,
auth_header: AuthHeader,
project_id: String,
) -> Result<(), CallError<ProjectError>>;
async fn list_projects(
&self,
auth_header: AuthHeader,
request: ListProjectsRequest,
) -> Result<ProjectPage, CallError<ProjectError>>;
async fn read_presentation(
&self,
auth_header: AuthHeader,
project_id: String,
request: PresentationKey,
) -> Result<Presentation, CallError<ProjectError>>;
async fn read_project(
&self,
auth_header: AuthHeader,
project_id: String,
) -> Result<Project, CallError<ProjectError>>;
async fn save_presentation(
&self,
auth_header: AuthHeader,
project_id: String,
request: SavePresentation,
) -> Result<Presentation, CallError<ProjectError>>;
}