#![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::locations::objects::*;
#[async_trait]
pub trait LocationsApi: Send + Sync + 'static {
async fn create_location(
&self,
auth_header: AuthHeader,
request: CreateLocationRequest,
) -> Result<CreateLocationResponse, CallError<LocationsError>>;
async fn create_version(
&self,
auth_header: AuthHeader,
location_id: Uuid,
request: CreateVersionRequest,
) -> Result<VersionResponse, CallError<LocationsError>>;
async fn read_version(
&self,
auth_header: AuthHeader,
location_id: Uuid,
version_id: Uuid,
) -> Result<VersionResponse, CallError<LocationsError>>;
async fn storage_binding(
&self,
auth_header: AuthHeader,
location_id: Uuid,
version_id: Uuid,
) -> Result<StorageBinding, CallError<LocationsError>>;
}