liboxen 0.53.0

Oxen is a fast data version control system, built with machine learning training data in mind. Designed to handle terabytes of data with ease, using a workflow similar to git. Version both structured and unstructured data of any modality: text, images, video, audio, CSV, Parquet, JSONL, model checkpoints, and more. liboxen is the embeddable core library behind the oxen CLI and server, which power fine tuning and inference pipelines for multimodal LLMs, image models, and video models on Oxen.ai.
use std::path::PathBuf;

use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

use super::StatusMessage;

#[derive(Deserialize, Serialize, Debug, ToSchema)]
pub struct FilePathsResponse {
    #[serde(flatten)]
    pub status: StatusMessage,
    #[schema(value_type = Vec<String>)]
    pub paths: Vec<PathBuf>,
}
#[derive(Deserialize, Serialize, Debug, ToSchema)]
pub struct ErrorFilesResponse {
    #[serde(flatten)]
    pub status: StatusMessage,
    #[serde(default)]
    pub err_files: Vec<ErrorFileInfo>,
}

#[derive(Serialize, Deserialize, Debug, Clone, ToSchema)]
pub struct ErrorFileInfo {
    pub hash: String,
    #[schema(value_type = Option<String>)]
    pub path: Option<PathBuf>,
    pub error: String,
}

#[derive(Serialize, Deserialize, Debug, Clone, ToSchema)]
pub struct FileWithHash {
    pub hash: String,
    #[schema(value_type = String)]
    pub path: PathBuf,
}