.
This commit is contained in:
parent
1da17c462e
commit
8a1f27589e
19 changed files with 447 additions and 56 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use axum::body::Bytes;
|
||||
use axum_typed_multipart::{FieldData, TryFromMultipart};
|
||||
use reconcile_text::NumberOrString;
|
||||
use serde::{self, Deserialize};
|
||||
use ts_rs::TS;
|
||||
|
||||
|
|
@ -22,7 +23,7 @@ pub struct CreateDocumentVersion {
|
|||
|
||||
#[derive(TS, Debug, TryFromMultipart)]
|
||||
#[ts(export)]
|
||||
pub struct UpdateDocumentVersion {
|
||||
pub struct UpdateBinaryDocumentVersion {
|
||||
pub parent_version_id: VaultUpdateId,
|
||||
pub relative_path: String,
|
||||
|
||||
|
|
@ -31,6 +32,19 @@ pub struct UpdateDocumentVersion {
|
|||
pub content: FieldData<Bytes>,
|
||||
}
|
||||
|
||||
#[derive(TS, Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
pub struct UpdateTextDocumentVersion {
|
||||
#[ts(as = "i32")]
|
||||
pub parent_version_id: VaultUpdateId,
|
||||
|
||||
pub relative_path: String,
|
||||
|
||||
#[ts(type = "Array<number | string>")]
|
||||
pub content: Vec<NumberOrString>,
|
||||
}
|
||||
|
||||
#[derive(TS, Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue