spiral-sdk 0.1.11

Rust SDK for Spiral resource and table APIs
Documentation
// Generated by tools/service-contracts/rust.py. Do not edit.
#![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::vector_indexes::objects::*;
/// Service implementations authenticate Authorization headers and enforce resource permissions.
#[async_trait]
pub trait VectorIndexesApi: Send + Sync + 'static {
    /// Begin an immutable build version for an exact source Table version.
    async fn begin_version(
        &self,
        auth_header: AuthHeader,
        vector_index_id: Uuid,
        request: BeginVersionRequest,
    ) -> Result<BeginVersionResponse, CallError<VectorIndexesError>>;
    /// Create a Vector Index and its initial definition-only version.
    async fn create_vector_index(
        &self,
        auth_header: AuthHeader,
        request: CreateVectorIndexRequest,
    ) -> Result<CreateVectorIndexResponse, CallError<VectorIndexesError>>;
    /// Read the definition and exact immutable version.
    async fn read_version(
        &self,
        auth_header: AuthHeader,
        vector_index_id: Uuid,
        version_id: Uuid,
    ) -> Result<ReadVersionResponse, CallError<VectorIndexesError>>;
    /// Create an immutable definition successor without inherited build state.
    async fn revise_definition(
        &self,
        auth_header: AuthHeader,
        vector_index_id: Uuid,
        request: ReviseDefinitionRequest,
    ) -> Result<ReadVersionResponse, CallError<VectorIndexesError>>;
    /// Seal a build with structurally validated codec-owned physical state.
    async fn seal_version(
        &self,
        auth_header: AuthHeader,
        vector_index_id: Uuid,
        version_id: Uuid,
        request: SealVersionRequest,
    ) -> Result<VersionResponse, CallError<VectorIndexesError>>;
    /// Obtain short-lived access to one version directory.
    async fn storage_access(
        &self,
        auth_header: AuthHeader,
        vector_index_id: Uuid,
        request: StorageAccessRequest,
    ) -> Result<StorageAccessResponse, CallError<VectorIndexesError>>;
    /// Obtain renewable typed storage access to one version directory.
    async fn storage_binding(
        &self,
        auth_header: AuthHeader,
        vector_index_id: Uuid,
        request: StorageAccessRequest,
    ) -> Result<StorageBinding, CallError<VectorIndexesError>>;
}