feat: update yrs doc using ipc from yjs doc
This commit is contained in:
@@ -2,7 +2,23 @@ use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct YDocumentUpdate<'a> {
|
||||
update: Vec<u8>,
|
||||
room: &'a str,
|
||||
pub struct YDocumentUpdate {
|
||||
pub update: Vec<u8>,
|
||||
pub id: i64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct GetDocumentParameter {
|
||||
pub id: i64,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct GetDocumentResponse {
|
||||
pub update: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
pub enum IDocumentParameters {
|
||||
YDocumentUpdate(YDocumentUpdate),
|
||||
GetDocumentParameter(GetDocumentParameter),
|
||||
GetDocumentResponse(GetDocumentResponse),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user