diff --git a/Cargo.toml b/Cargo.toml index c173be5..0f7e2b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ async-telegram-trait = ["async-trait"] [dependencies] thiserror = "1" -typed-builder = "0.14" +typed-builder = "0.16" [dependencies.async-trait] version = "0.1" diff --git a/src/api_params.rs b/src/api_params.rs index 4769160..4a7ffcf 100644 --- a/src/api_params.rs +++ b/src/api_params.rs @@ -1227,6 +1227,18 @@ pub struct PromoteChatMemberParams { #[builder(setter(into, strip_option), default)] pub can_delete_messages: Option, + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_post_stories: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_edit_stories: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_delete_stories: Option, + #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] pub can_manage_video_chats: Option, diff --git a/src/objects.rs b/src/objects.rs index 841f6d6..95676cc 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -195,14 +195,6 @@ pub struct ChatMemberAdministrator { pub can_manage_chat: bool, - #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] - pub can_post_messages: Option, - - #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] - pub can_edit_messages: Option, - pub can_delete_messages: bool, pub can_manage_video_chats: bool, @@ -215,10 +207,30 @@ pub struct ChatMemberAdministrator { pub can_invite_users: bool, + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_post_messages: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_edit_messages: Option, + #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] pub can_pin_messages: Option, + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_post_stories: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_edit_stories: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_delete_stories: Option, + #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] pub can_manage_topics: Option, @@ -1250,9 +1262,17 @@ pub struct ChatShared { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct WriteAccessAllowed { + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub from_request: Option, + #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] pub web_app_name: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub from_attachment_menu: Option, } #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] @@ -3190,6 +3210,18 @@ pub struct ChatAdministratorRights { #[builder(setter(into, strip_option), default)] pub can_pin_messages: Option, + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_post_stories: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_edit_stories: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub can_delete_stories: Option, + #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] pub can_manage_topics: Option,