feat(sync): round trip cloud snapshots

This commit is contained in:
2026-05-16 00:01:28 -04:00
parent 06e947f43e
commit 40ab6b4874
22 changed files with 694 additions and 69 deletions
+26
View File
@@ -42,6 +42,32 @@ impl BookmarkEntry {
})
}
pub fn restore(
id: BookmarkId,
profile_id: ProfileId,
space_id: SpaceId,
collection_name: impl Into<String>,
title: impl Into<String>,
url: UrlText,
added_at: SystemTime,
) -> Result<Self, DomainError> {
let collection_name = non_empty_text("bookmark collection", collection_name.into())?;
let title = non_empty_text("bookmark title", title.into())?;
Ok(Self {
id,
profile_id,
space_id,
collection_name,
title,
url,
tags: Vec::new(),
note: None,
thumbnail_key: None,
added_at,
})
}
#[must_use]
pub fn id(&self) -> &BookmarkId {
&self.id