pub struct Note {Show 14 fields
pub id: String,
pub provider: Option<String>,
pub account_id: Option<String>,
pub owner_user_id: Option<String>,
pub title: String,
pub content: String,
pub icon: Option<String>,
pub cover_image: Option<String>,
pub parent_id: Option<Option<String>>,
pub properties: Option<HashMap<String, Value>>,
pub archived: bool,
pub created_at: DateTime<FixedOffset>,
pub updated_at: DateTime<FixedOffset>,
pub last_edited_by: Option<String>,
}Expand description
Note : A markdown note. Notes belong to exactly one connected account (accountId + provider). The native provider stores notes in the Spatio database; external providers (Notion, Google Keep, etc.) store them upstream and round-trip through Spatio.
Fields§
§id: StringStable provider id for the note.
provider: Option<String>Registered provider id (e.g. native-notes).
account_id: Option<String>Connected-account row this note belongs to.
owner_user_id: Option<String>User id of the note’s owner. Surfaced so the renderer can show "Shared with you" when ownerUserId differs from the viewer’s id. Empty for non-native providers.
title: String§content: StringMarkdown body. The block tree at /v1/notes/{id}/blocks is the canonical structured representation; content is a flattened markdown view kept for clients that don’t render blocks.
icon: Option<String>Emoji or short string used as the note’s icon.
cover_image: Option<String>URL of the note’s cover image.
parent_id: Option<Option<String>>Parent note id when notes are nested.
properties: Option<HashMap<String, Value>>Free-form provider-specific properties (tags, etc.).
archived: bool§created_at: DateTime<FixedOffset>§updated_at: DateTime<FixedOffset>§last_edited_by: Option<String>User id of the most recent editor.
Implementations§
Source§impl Note
impl Note
Sourcepub fn new(
id: String,
title: String,
content: String,
archived: bool,
created_at: DateTime<FixedOffset>,
updated_at: DateTime<FixedOffset>,
) -> Note
pub fn new( id: String, title: String, content: String, archived: bool, created_at: DateTime<FixedOffset>, updated_at: DateTime<FixedOffset>, ) -> Note
A markdown note. Notes belong to exactly one connected account (accountId + provider). The native provider stores notes in the Spatio database; external providers (Notion, Google Keep, etc.) store them upstream and round-trip through Spatio.