diff --git a/src/lib.rs b/src/lib.rs index 346835b..e185e06 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -691,6 +691,9 @@ pub enum CodeLanguage { YAML, #[serde(rename = "java/c/c++/c#")] JavaCCppCSharp, + + #[serde(other)] + Unsupported, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] @@ -1200,10 +1203,21 @@ where #[serde(tag = "type")] #[serde(rename_all = "snake_case")] pub enum Formula { - Boolean { boolean: Option }, - Date { date: Option }, - Number { number: Option }, - String { string: Option }, + Boolean { + boolean: Option, + }, + Date { + date: Option, + }, + Number { + number: Option, + }, + String { + string: Option, + }, + + #[serde(other)] + Unsupported, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] @@ -1257,6 +1271,9 @@ pub enum RichText { href: Option, annotations: Annotations, }, + + #[serde(other)] + Unsupported, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] @@ -1269,11 +1286,24 @@ pub struct Text { #[serde(tag = "type")] #[serde(rename_all = "lowercase")] pub enum Mention { - Database { database: PartialDatabase }, - Date { date: Date }, - LinkPreview { link_preview: LinkPreview }, - Page { page: PartialPage }, - User { user: PartialUser }, + Database { + database: PartialDatabase, + }, + Date { + date: Date, + }, + LinkPreview { + link_preview: LinkPreview, + }, + Page { + page: PartialPage, + }, + User { + user: PartialUser, + }, + + #[serde(other)] + Unsupported, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] @@ -1399,33 +1429,60 @@ pub enum Color { PurpleBackground, PinkBackground, RedBackground, + + #[serde(other)] + Unsupported, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(tag = "type")] #[serde(rename_all = "snake_case")] pub enum Parent { - PageId { page_id: String }, - DatabaseId { database_id: String }, - BlockId { block_id: String }, + PageId { + page_id: String, + }, + DatabaseId { + database_id: String, + }, + BlockId { + block_id: String, + }, Workspace, + + #[serde(other)] + Unsupported, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(tag = "type")] #[serde(rename_all = "lowercase")] pub enum File { - File { file: NotionFile }, - External { external: ExternalFile }, + File { + file: NotionFile, + }, + External { + external: ExternalFile, + }, + + #[serde(other)] + Unsupported, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(tag = "type")] #[serde(rename_all = "lowercase")] pub enum Icon { - Emoji { emoji: String }, - File { file: NotionFile }, - External { external: ExternalFile }, + Emoji { + emoji: String, + }, + File { + file: NotionFile, + }, + External { + external: ExternalFile, + }, + #[serde(other)] + Unsupported, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] @@ -1446,4 +1503,7 @@ pub enum DatabaseFormulaType { Date, Number, String, + + #[serde(other)] + Unsupported, }