#![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 uuid::Uuid;
use crate::api::enrichments::objects::*;
#[async_trait]
pub trait EnrichmentsApi: Send + Sync + 'static {
async fn create_enrichment(
&self,
auth_header: AuthHeader,
request: CreateEnrichmentRequest,
) -> Result<CreateEnrichmentResponse, CallError<EnrichmentsError>>;
async fn create_version(
&self,
auth_header: AuthHeader,
enrichment_id: Uuid,
request: CreateVersionRequest,
) -> Result<CreateVersionResponse, CallError<EnrichmentsError>>;
async fn read_version(
&self,
auth_header: AuthHeader,
enrichment_id: Uuid,
version_id: Uuid,
) -> Result<ReadVersionResponse, CallError<EnrichmentsError>>;
async fn storage_access(
&self,
auth_header: AuthHeader,
enrichment_id: Uuid,
request: StorageAccessRequest,
) -> Result<StorageAccessResponse, CallError<EnrichmentsError>>;
async fn storage_binding(
&self,
auth_header: AuthHeader,
enrichment_id: Uuid,
request: StorageAccessRequest,
) -> Result<StorageBinding, CallError<EnrichmentsError>>;
}