diff --git a/_schema/tdapi.tl b/_schema/tdapi.tl index 79e781d33a..8c9a2cd09d 100644 --- a/_schema/tdapi.tl +++ b/_schema/tdapi.tl @@ -1,7 +1,7 @@ // Code generated by ./cmd/dltl, DO NOT EDIT. // // Source: https://raw.githubusercontent.com/tdlib/td/master/td/generate/scheme/td_api.tl -// SHA256: 4b0196025410db18882f1f8fcffccc7b9dec1307198c007e3224d61633d39eee +// SHA256: 2e0b1f9bc3d5fe4f9c2d32eccf35f10262d8a05f4a6ccc37c4910f5944b2942b double#2210c154 ? = Double; @@ -559,7 +559,7 @@ userTypeDeleted#94403d24 = UserType; //@is_inline True, if the bot supports inline queries //@inline_query_placeholder Placeholder for inline queries (displayed on the application input field) //@need_location True, if the location of the user is expected to be sent with every inline query to this bot -//@can_be_added_to_attachment_menu True, if the bot can be added to attachment menu +//@can_be_added_to_attachment_menu True, if the bot can be added to attachment or side menu userTypeBot#f979e790 can_be_edited:Bool can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool can_be_added_to_attachment_menu:Bool = UserType; //@description No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type @@ -918,10 +918,21 @@ chatInviteLinkMember#1bce5bb user_id:int53 joined_chat_date:int32 via_chat_folde //@members List of chat members, joined a chat via an invite link chatInviteLinkMembers#c2ca3a61 total_count:int32 members:vector = ChatInviteLinkMembers; +//@class InviteLinkChatType @description Describes the type of a chat to which points an invite link + +//@description The link is an invite link for a basic group +inviteLinkChatTypeBasicGroup#4d43c5ee = InviteLinkChatType; + +//@description The link is an invite link for a supergroup +inviteLinkChatTypeSupergroup#3de86758 = InviteLinkChatType; + +//@description The link is an invite link for a channel +inviteLinkChatTypeChannel#3012ef0b = InviteLinkChatType; + //@description Contains information about a chat invite link //@chat_id Chat identifier of the invite link; 0 if the user has no access to the chat before joining //@accessible_for If non-zero, the amount of time for which read access to the chat will remain available, in seconds -//@type Type of the chat; basic_group_id or supergroup_id can be 0 if the user has no access to the chat before joining +//@type Type of the chat //@title Title of the chat //@photo Chat photo; may be null //@param_description Chat description @@ -932,7 +943,7 @@ chatInviteLinkMembers#c2ca3a61 total_count:int32 members:vector creates_join_request:Bool is_public:Bool is_verified:Bool is_scam:Bool is_fake:Bool = ChatInviteLinkInfo; +chatInviteLinkInfo#c8c16a57 chat_id:int53 accessible_for:int32 type:InviteLinkChatType title:string photo:chatPhotoInfo description:string member_count:int32 member_user_ids:vector creates_join_request:Bool is_public:Bool is_verified:Bool is_scam:Bool is_fake:Bool = ChatInviteLinkInfo; //@description Describes a user that sent a join request and waits for administrator approval //@user_id User identifier @@ -1197,16 +1208,16 @@ messageReplyToStory#708ca939 story_sender_chat_id:int53 story_id:int32 = Message //@unread_reactions Information about unread reactions added to the message //@reply_to Information about the message or the story this message is replying to; may be null if none //@message_thread_id If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs -//@self_destruct_time The message's self-destruct time, in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the time expires -//@self_destruct_in Time left before the message self-destruct timer expires, in seconds. If the self-destruct timer isn't started yet, equals to the value of the self_destruct_time field -//@auto_delete_in Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never. TDLib will send updateDeleteMessages or updateMessageContent once the time expires +//@self_destruct_type The message's self-destruct type; may be null if none +//@self_destruct_in Time left before the message self-destruct timer expires, in seconds; 0 if self-desctruction isn't scheduled yet +//@auto_delete_in Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never //@via_bot_user_id If non-zero, the user identifier of the bot through which this message was sent //@author_signature For channel posts and anonymous group messages, optional author signature //@media_album_id Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums //@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted //@content Content of the message //@reply_markup Reply markup for the message; may be null if none -message#e285e28a id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo interaction_info:messageInteractionInfo unread_reactions:vector reply_to:MessageReplyTo message_thread_id:int53 self_destruct_time:int32 self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message; +message#a516cc02 id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo interaction_info:messageInteractionInfo unread_reactions:vector reply_to:MessageReplyTo message_thread_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message; //@description Contains a list of messages //@total_count Approximate total number of messages found @@ -1733,9 +1744,10 @@ loginUrlInfoRequestConfirmation#7edb242f url:string domain:string bot_user_id:in //@description Contains information about a Web App found by its short name //@web_app The Web App +//@supports_settings True, if the app supports "settings_button_pressed" event //@request_write_access True, if the user must be asked for the permission to the bot to send them messages //@skip_confirmation True, if there is no need to show an ordinary open URL confirmation before opening the Web App. The field must be ignored and confirmation must be shown anyway if the Web App link was hidden -foundWebApp#eea8d01e web_app:webApp request_write_access:Bool skip_confirmation:Bool = FoundWebApp; +foundWebApp#2b8136d4 web_app:webApp supports_settings:Bool request_write_access:Bool skip_confirmation:Bool = FoundWebApp; //@description Contains information about a Web App //@launch_id Unique identifier for the Web App launch @@ -3042,6 +3054,15 @@ messageSchedulingStateSendAtDate#a773ffe7 send_date:int32 = MessageSchedulingSta //@description The message will be sent when the peer will be online. Applicable to private chats only and when the exact online status of the peer is known messageSchedulingStateSendWhenOnline#7cbfd808 = MessageSchedulingState; +//@class MessageSelfDestructType @description Describes when a message will be self-destructed + +//@description The message will be self-destructed in the specified time after its content was opened +//@self_destruct_time The message's self-destruct time, in seconds; must be between 0 and 60 in private chats +messageSelfDestructTypeTimer#508d57cd self_destruct_time:int32 = MessageSelfDestructType; + +//@description The message can be opened only once and will be self-destructed once closed +messageSelfDestructTypeImmediately#c23c9005 = MessageSelfDestructType; + //@description Options to be used when a message is sent //@disable_notification Pass true to disable notification for the message //@from_background Pass true if the message is sent from the background @@ -3099,9 +3120,9 @@ inputMessageDocument#615b72b9 document:InputFile thumbnail:inputThumbnail disabl //@width Photo width //@height Photo height //@caption Photo caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters -//@self_destruct_time Photo self-destruct time, in seconds (0-60). A non-zero self-destruct time can be specified only in private chats +//@self_destruct_type Photo self-destruct type; pass null if none; private chats only //@has_spoiler True, if the photo preview must be covered by a spoiler animation; not supported in secret chats -inputMessagePhoto#600db6e photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector width:int32 height:int32 caption:formattedText self_destruct_time:int32 has_spoiler:Bool = InputMessageContent; +inputMessagePhoto#83234a22 photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector width:int32 height:int32 caption:formattedText self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent; //@description A sticker message //@sticker Sticker to be sent @@ -3120,9 +3141,9 @@ inputMessageSticker#3ff1b6f9 sticker:InputFile thumbnail:inputThumbnail width:in //@height Video height //@supports_streaming True, if the video is supposed to be streamed //@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters -//@self_destruct_time Video self-destruct time, in seconds (0-60). A non-zero self-destruct time can be specified only in private chats +//@self_destruct_type Video self-destruct type; pass null if none; private chats only //@has_spoiler True, if the video preview must be covered by a spoiler animation; not supported in secret chats -inputMessageVideo#a2d4e2b2 video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText self_destruct_time:int32 has_spoiler:Bool = InputMessageContent; +inputMessageVideo#f17014da video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent; //@description A video note message //@video_note Video note to be sent @@ -3866,25 +3887,32 @@ speechRecognitionResultError#9d243fc error:error = SpeechRecognitionResult; //@dark_color Color in the RGB24 format for dark themes attachmentMenuBotColor#64235ebc light_color:int32 dark_color:int32 = AttachmentMenuBotColor; -//@description Represents a bot, which can be added to attachment menu -//@bot_user_id User identifier of the bot added to attachment menu +//@description Represents a bot, which can be added to attachment or side menu +//@bot_user_id User identifier of the bot //@supports_self_chat True, if the bot supports opening from attachment menu in the chat with the bot //@supports_user_chats True, if the bot supports opening from attachment menu in private chats with ordinary users //@supports_bot_chats True, if the bot supports opening from attachment menu in private chats with other bots //@supports_group_chats True, if the bot supports opening from attachment menu in basic group and supergroup chats //@supports_channel_chats True, if the bot supports opening from attachment menu in channel chats //@supports_settings True, if the bot supports "settings_button_pressed" event -//@request_write_access True, if the user must be asked for the permission to the bot to send them messages +//@request_write_access True, if the user must be asked for the permission to send messages to the bot +//@is_added True, if the bot was explicitly added by the user. If the bot isn't added, then on the first bot launch toggleBotIsAddedToAttachmentMenu must be called and the bot must be added or removed +//@show_in_attachment_menu True, if the bot must be shown in the attachment menu +//@show_in_side_menu True, if the bot must be shown in the side menu +//@show_disclaimer_in_side_menu True, if a disclaimer, why the bot is shown in the side menu, is needed //@name Name for the bot in attachment menu //@name_color Color to highlight selected name of the bot if appropriate; may be null -//@default_icon Default attachment menu icon for the bot in SVG format; may be null -//@ios_static_icon Attachment menu icon for the bot in SVG format for the official iOS app; may be null -//@ios_animated_icon Attachment menu icon for the bot in TGS format for the official iOS app; may be null -//@android_icon Attachment menu icon for the bot in TGS format for the official Android app; may be null -//@macos_icon Attachment menu icon for the bot in TGS format for the official native macOS app; may be null +//@default_icon Default icon for the bot in SVG format; may be null +//@ios_static_icon Icon for the bot in SVG format for the official iOS app; may be null +//@ios_animated_icon Icon for the bot in TGS format for the official iOS app; may be null +//@ios_side_menu_icon Icon for the bot in PNG format for the official iOS app side menu; may be null +//@android_icon Icon for the bot in TGS format for the official Android app; may be null +//@android_side_menu_icon Icon for the bot in SVG format for the official Android app side menu; may be null +//@macos_icon Icon for the bot in TGS format for the official native macOS app; may be null +//@macos_side_menu_icon Icon for the bot in PNG format for the official macOS app side menu; may be null //@icon_color Color to highlight selected icon of the bot if appropriate; may be null //@web_app_placeholder Default placeholder for opened Web Apps in SVG format; may be null -attachmentMenuBot#5920a05d bot_user_id:int53 supports_self_chat:Bool supports_user_chats:Bool supports_bot_chats:Bool supports_group_chats:Bool supports_channel_chats:Bool supports_settings:Bool request_write_access:Bool name:string name_color:attachmentMenuBotColor default_icon:file ios_static_icon:file ios_animated_icon:file android_icon:file macos_icon:file icon_color:attachmentMenuBotColor web_app_placeholder:file = AttachmentMenuBot; +attachmentMenuBot#2176d831 bot_user_id:int53 supports_self_chat:Bool supports_user_chats:Bool supports_bot_chats:Bool supports_group_chats:Bool supports_channel_chats:Bool supports_settings:Bool request_write_access:Bool is_added:Bool show_in_attachment_menu:Bool show_in_side_menu:Bool show_disclaimer_in_side_menu:Bool name:string name_color:attachmentMenuBotColor default_icon:file ios_static_icon:file ios_animated_icon:file ios_side_menu_icon:file android_icon:file android_side_menu_icon:file macos_icon:file macos_side_menu_icon:file icon_color:attachmentMenuBotColor web_app_placeholder:file = AttachmentMenuBot; //@description Information about the message sent by answerWebAppQuery //@inline_message_id Identifier of the sent inline message, if known @@ -5121,7 +5149,7 @@ storyPrivacySettingsCloseFriends#7cff8b60 = StoryPrivacySettings; //@description The story can be viewed by certain specified users //@user_ids Identifiers of the users; always unknown and empty for non-owned stories -storyPrivacySettingsSelectedContacts#25401fc7 user_ids:vector = StoryPrivacySettings; +storyPrivacySettingsSelectedUsers#84d7d27b user_ids:vector = StoryPrivacySettings; //@class UserPrivacySettingRule @description Represents a single rule for managing user privacy settings @@ -5254,6 +5282,7 @@ sessionTypeXbox#6ea39dac = SessionType; //@id Session identifier //@is_current True, if this session is the current session //@is_password_pending True, if a 2-step verification password is needed to complete authorization of the session +//@is_unconfirmed True, if the session wasn't confirmed from another session //@can_accept_secret_chats True, if incoming secret chats can be accepted by the session //@can_accept_calls True, if incoming calls can be accepted by the session //@type Session type based on the system and application version, which can be used to display a corresponding icon @@ -5266,16 +5295,22 @@ sessionTypeXbox#6ea39dac = SessionType; //@system_version Version of the operating system the application has been run or is running on, as provided by the application //@log_in_date Point in time (Unix timestamp) when the user has logged in //@last_active_date Point in time (Unix timestamp) when the session was last used -//@ip IP address from which the session was created, in human-readable format -//@country A two-letter country code for the country from which the session was created, based on the IP address -//@region Region code from which the session was created, based on the IP address -session#8b189386 id:int64 is_current:Bool is_password_pending:Bool can_accept_secret_chats:Bool can_accept_calls:Bool type:SessionType api_id:int32 application_name:string application_version:string is_official_application:Bool device_model:string platform:string system_version:string log_in_date:int32 last_active_date:int32 ip:string country:string region:string = Session; +//@ip_address IP address from which the session was created, in human-readable format +//@location A human-readable description of the location from which the session was created, based on the IP address +session#9759a3c id:int64 is_current:Bool is_password_pending:Bool is_unconfirmed:Bool can_accept_secret_chats:Bool can_accept_calls:Bool type:SessionType api_id:int32 application_name:string application_version:string is_official_application:Bool device_model:string platform:string system_version:string log_in_date:int32 last_active_date:int32 ip_address:string location:string = Session; //@description Contains a list of sessions //@sessions List of sessions //@inactive_session_ttl_days Number of days of inactivity before sessions will automatically be terminated; 1-366 days sessions#997833aa sessions:vector inactive_session_ttl_days:int32 = Sessions; +//@description Contains information about an unconfirmed session +//@id Session identifier +//@log_in_date Point in time (Unix timestamp) when the user has logged in +//@device_model Model of the device that was used for the session creation, as provided by the application +//@location A human-readable description of the location from which the session was created, based on the IP address +unconfirmedSession#850d49f9 id:int64 log_in_date:int32 device_model:string location:string = UnconfirmedSession; + //@description Contains information about one website the current user is logged in with Telegram //@id Website identifier //@domain_name The domain name of the website @@ -5284,9 +5319,9 @@ sessions#997833aa sessions:vector inactive_session_ttl_days:int32 = Ses //@platform Operating system the browser is running on //@log_in_date Point in time (Unix timestamp) when the user was logged in //@last_active_date Point in time (Unix timestamp) when obtained authorization was last used -//@ip IP address from which the user was logged in, in human-readable format +//@ip_address IP address from which the user was logged in, in human-readable format //@location Human-readable description of a country and a region from which the user was logged in, based on the IP address -connectedWebsite#324ea36d id:int64 domain_name:string bot_user_id:int53 browser:string platform:string log_in_date:int32 last_active_date:int32 ip:string location:string = ConnectedWebsite; +connectedWebsite#75e7a78a id:int64 domain_name:string bot_user_id:int53 browser:string platform:string log_in_date:int32 last_active_date:int32 ip_address:string location:string = ConnectedWebsite; //@description Contains a list of websites the current user is logged in with Telegram //@websites List of connected websites @@ -5447,7 +5482,7 @@ internalLinkTypePremiumFeatures#48884f49 referrer:string = InternalLinkType; internalLinkTypePrivacyAndSecuritySettings#ad5f6acf = InternalLinkType; //@description The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy -//@server Proxy server IP address +//@server Proxy server domain or IP address //@port Proxy server port //@type Type of the proxy internalLinkTypeProxy#b1b12cea server:string port:int32 type:ProxyType = InternalLinkType; @@ -5465,6 +5500,11 @@ internalLinkTypeRestorePurchases#24203483 = InternalLinkType; //@description The link is a link to application settings internalLinkTypeSettings#177545b4 = InternalLinkType; +//@description The link is a link to a bot, which can be installed to the side menu. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. +//@bot_username Username of the bot +//@url URL to be passed to getWebAppUrl +internalLinkTypeSideMenuBot#a260e77d bot_username:string url:string = InternalLinkType; + //@description The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set //@sticker_set_name Name of the sticker set //@expect_custom_emoji True, if the sticker set is expected to contain custom emoji @@ -5866,7 +5906,7 @@ proxyTypeMtproto#8ae31ffd secret:string = ProxyType; //@description Contains information about a proxy server //@id Unique identifier of the proxy -//@server Proxy server IP address +//@server Proxy server domain or IP address //@port Proxy server port //@last_used_date Point in time (Unix timestamp) when the proxy was last used; 0 if never //@is_enabled True, if the proxy is enabled now @@ -6508,8 +6548,12 @@ updateTermsOfService#b23cc55e terms_of_service_id:string terms_of_service:termsO //@users_nearby The new list of users nearby updateUsersNearby#97c8ab5 users_nearby:vector = Update; -//@description The list of bots added to attachment menu has changed -//@bots The new list of bots added to attachment menu. The bots must not be shown on scheduled messages screen +//@description The first unconfirmed session has changed +//@session The unconfirmed session; may be null if none +updateUnconfirmedSession#fea6088c session:unconfirmedSession = Update; + +//@description The list of bots added to attachment or side menu has changed +//@bots The new list of bots. The bots must not be shown on scheduled messages screen updateAttachmentMenuBots#b6b910c bots:vector = Update; //@description A message was sent by an opened Web App, so the Web App needs to be closed @@ -7621,9 +7665,9 @@ searchWebApp#b5fc8a35 bot_user_id:int53 web_app_short_name:string = FoundWebApp; //@allow_write_access Pass true if the current user allowed the bot to send them messages getWebAppLinkUrl#4f0ef3cc chat_id:int53 bot_user_id:int53 web_app_short_name:string start_parameter:string theme:themeParameters application_name:string allow_write_access:Bool = HttpUrl; -//@description Returns an HTTPS URL of a Web App to open after keyboardButtonTypeWebApp or inlineQueryResultsButtonTypeWebApp button is pressed +//@description Returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, an inlineQueryResultsButtonTypeWebApp button, or an internalLinkTypeSideMenuBot link //@bot_user_id Identifier of the target bot -//@url The URL from the keyboardButtonTypeWebApp or inlineQueryResultsButtonTypeWebApp button +//@url The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp button, an internalLinkTypeSideMenuBot link, or an empty when the bot is opened from the side menu //@theme Preferred Web App theme; pass null to use the default theme //@application_name Short name of the application; 0-64 English letters, digits, and underscores getWebAppUrl#64c42cbe bot_user_id:int53 url:string theme:themeParameters application_name:string = HttpUrl; @@ -7634,10 +7678,10 @@ getWebAppUrl#64c42cbe bot_user_id:int53 url:string theme:themeParameters applica //@data The data sendWebAppData#ab1fce0c bot_user_id:int53 button_text:string data:string = Ok; -//@description Informs TDLib that a Web App is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. +//@description Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. //@chat_id Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats //@bot_user_id Identifier of the bot, providing the Web App -//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise +//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise //@theme Preferred Web App theme; pass null to use the default theme //@application_name Short name of the application; 0-64 English letters, digits, and underscores //@message_thread_id If not 0, a message thread identifier in which the message will be sent @@ -8248,11 +8292,11 @@ reportStory#9b5f709b story_sender_chat_id:int53 story_id:int32 reason:ReportReas //@description Activates stealth mode for stories, which hides all views of stories from the current user in the last "story_stealth_mode_past_period" seconds activateStoryStealthMode#c3db8491 = Ok; -//@description Returns information about a bot that can be added to attachment menu +//@description Returns information about a bot that can be added to attachment or side menu //@bot_user_id Bot's user identifier getAttachmentMenuBot#3da561fb bot_user_id:int53 = AttachmentMenuBot; -//@description Adds or removes a bot to attachment menu. Bot can be added to attachment menu, only if userTypeBot.can_be_added_to_attachment_menu == true +//@description Adds or removes a bot to attachment and side menu. Bot can be added to the menu, only if userTypeBot.can_be_added_to_attachment_menu == true //@bot_user_id Bot's user identifier //@is_added Pass true to add the bot to attachment menu; pass false to remove the bot from attachment menu //@allow_write_access Pass true if the current user allowed the bot to send them messages. Ignored if is_added is false @@ -9079,6 +9123,10 @@ terminateSession#e7b7c92c session_id:int64 = Ok; //@description Terminates all other sessions of the current user terminateAllOtherSessions#6fba6113 = Ok; +//@description Confirms an unconfirmed session of the current user from another device +//@session_id Session identifier +confirmSession#d7c9b41f session_id:int64 = Ok; + //@description Toggles whether a session can accept incoming calls //@session_id Session identifier //@can_accept_calls Pass true to allow accepting incoming calls by the session; pass false otherwise @@ -9725,7 +9773,7 @@ saveApplicationLogEvent#cfa6c20e type:string chat_id:int53 data:JsonValue = Ok; getApplicationDownloadLink#6ad2fc4 = HttpUrl; //@description Adds a proxy server for network requests. Can be called before authorization -//@server Proxy server IP address +//@server Proxy server domain or IP address //@port Proxy server port //@enable Pass true to immediately enable the proxy //@type Proxy type @@ -9733,7 +9781,7 @@ addProxy#13c2bcd8 server:string port:int32 enable:Bool type:ProxyType = Proxy; //@description Edits an existing proxy server for network requests. Can be called before authorization //@proxy_id Proxy identifier -//@server Proxy server IP address +//@server Proxy server domain or IP address //@port Proxy server port //@enable Pass true to immediately enable the proxy //@type Proxy type @@ -9839,7 +9887,7 @@ testSquareInt#fc6a6990 x:int32 = TestInt; testNetwork#afe4344b = Ok; //@description Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization -//@server Proxy server IP address +//@server Proxy server domain or IP address //@port Proxy server port //@type Proxy type //@dc_id Identifier of a datacenter with which to test connection diff --git a/tdapi/tl_add_proxy_gen.go b/tdapi/tl_add_proxy_gen.go index cb0ac8df9e..5a048fb605 100644 --- a/tdapi/tl_add_proxy_gen.go +++ b/tdapi/tl_add_proxy_gen.go @@ -33,7 +33,7 @@ var ( // AddProxyRequest represents TL type `addProxy#13c2bcd8`. type AddProxyRequest struct { - // Proxy server IP address + // Proxy server domain or IP address Server string // Proxy server port Port int32 diff --git a/tdapi/tl_attachment_menu_bot_gen.go b/tdapi/tl_attachment_menu_bot_gen.go index 216c384995..9bc8fe2cc3 100644 --- a/tdapi/tl_attachment_menu_bot_gen.go +++ b/tdapi/tl_attachment_menu_bot_gen.go @@ -31,9 +31,9 @@ var ( _ = tdjson.Encoder{} ) -// AttachmentMenuBot represents TL type `attachmentMenuBot#5920a05d`. +// AttachmentMenuBot represents TL type `attachmentMenuBot#2176d831`. type AttachmentMenuBot struct { - // User identifier of the bot added to attachment menu + // User identifier of the bot BotUserID int64 // True, if the bot supports opening from attachment menu in the chat with the bot SupportsSelfChat bool @@ -50,24 +50,38 @@ type AttachmentMenuBot struct { SupportsChannelChats bool // True, if the bot supports "settings_button_pressed" event SupportsSettings bool - // True, if the user must be asked for the permission to the bot to send them messages + // True, if the user must be asked for the permission to send messages to the bot RequestWriteAccess bool + // True, if the bot was explicitly added by the user. If the bot isn't added, then on the + // first bot launch toggleBotIsAddedToAttachmentMenu must be called and the bot must be + // added or removed + IsAdded bool + // True, if the bot must be shown in the attachment menu + ShowInAttachmentMenu bool + // True, if the bot must be shown in the side menu + ShowInSideMenu bool + // True, if a disclaimer, why the bot is shown in the side menu, is needed + ShowDisclaimerInSideMenu bool // Name for the bot in attachment menu Name string // Color to highlight selected name of the bot if appropriate; may be null NameColor AttachmentMenuBotColor - // Default attachment menu icon for the bot in SVG format; may be null + // Default icon for the bot in SVG format; may be null DefaultIcon File - // Attachment menu icon for the bot in SVG format for the official iOS app; may be null + // Icon for the bot in SVG format for the official iOS app; may be null IosStaticIcon File - // Attachment menu icon for the bot in TGS format for the official iOS app; may be null + // Icon for the bot in TGS format for the official iOS app; may be null IosAnimatedIcon File - // Attachment menu icon for the bot in TGS format for the official Android app; may be - // null + // Icon for the bot in PNG format for the official iOS app side menu; may be null + IosSideMenuIcon File + // Icon for the bot in TGS format for the official Android app; may be null AndroidIcon File - // Attachment menu icon for the bot in TGS format for the official native macOS app; may - // be null + // Icon for the bot in SVG format for the official Android app side menu; may be null + AndroidSideMenuIcon File + // Icon for the bot in TGS format for the official native macOS app; may be null MacosIcon File + // Icon for the bot in PNG format for the official macOS app side menu; may be null + MacosSideMenuIcon File // Color to highlight selected icon of the bot if appropriate; may be null IconColor AttachmentMenuBotColor // Default placeholder for opened Web Apps in SVG format; may be null @@ -75,7 +89,7 @@ type AttachmentMenuBot struct { } // AttachmentMenuBotTypeID is TL type id of AttachmentMenuBot. -const AttachmentMenuBotTypeID = 0x5920a05d +const AttachmentMenuBotTypeID = 0x2176d831 // Ensuring interfaces in compile-time for AttachmentMenuBot. var ( @@ -113,6 +127,18 @@ func (a *AttachmentMenuBot) Zero() bool { if !(a.RequestWriteAccess == false) { return false } + if !(a.IsAdded == false) { + return false + } + if !(a.ShowInAttachmentMenu == false) { + return false + } + if !(a.ShowInSideMenu == false) { + return false + } + if !(a.ShowDisclaimerInSideMenu == false) { + return false + } if !(a.Name == "") { return false } @@ -128,12 +154,21 @@ func (a *AttachmentMenuBot) Zero() bool { if !(a.IosAnimatedIcon.Zero()) { return false } + if !(a.IosSideMenuIcon.Zero()) { + return false + } if !(a.AndroidIcon.Zero()) { return false } + if !(a.AndroidSideMenuIcon.Zero()) { + return false + } if !(a.MacosIcon.Zero()) { return false } + if !(a.MacosSideMenuIcon.Zero()) { + return false + } if !(a.IconColor.Zero()) { return false } @@ -208,6 +243,22 @@ func (a *AttachmentMenuBot) TypeInfo() tdp.Type { Name: "RequestWriteAccess", SchemaName: "request_write_access", }, + { + Name: "IsAdded", + SchemaName: "is_added", + }, + { + Name: "ShowInAttachmentMenu", + SchemaName: "show_in_attachment_menu", + }, + { + Name: "ShowInSideMenu", + SchemaName: "show_in_side_menu", + }, + { + Name: "ShowDisclaimerInSideMenu", + SchemaName: "show_disclaimer_in_side_menu", + }, { Name: "Name", SchemaName: "name", @@ -228,14 +279,26 @@ func (a *AttachmentMenuBot) TypeInfo() tdp.Type { Name: "IosAnimatedIcon", SchemaName: "ios_animated_icon", }, + { + Name: "IosSideMenuIcon", + SchemaName: "ios_side_menu_icon", + }, { Name: "AndroidIcon", SchemaName: "android_icon", }, + { + Name: "AndroidSideMenuIcon", + SchemaName: "android_side_menu_icon", + }, { Name: "MacosIcon", SchemaName: "macos_icon", }, + { + Name: "MacosSideMenuIcon", + SchemaName: "macos_side_menu_icon", + }, { Name: "IconColor", SchemaName: "icon_color", @@ -251,7 +314,7 @@ func (a *AttachmentMenuBot) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (a *AttachmentMenuBot) Encode(b *bin.Buffer) error { if a == nil { - return fmt.Errorf("can't encode attachmentMenuBot#5920a05d as nil") + return fmt.Errorf("can't encode attachmentMenuBot#2176d831 as nil") } b.PutID(AttachmentMenuBotTypeID) return a.EncodeBare(b) @@ -260,7 +323,7 @@ func (a *AttachmentMenuBot) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (a *AttachmentMenuBot) EncodeBare(b *bin.Buffer) error { if a == nil { - return fmt.Errorf("can't encode attachmentMenuBot#5920a05d as nil") + return fmt.Errorf("can't encode attachmentMenuBot#2176d831 as nil") } b.PutInt53(a.BotUserID) b.PutBool(a.SupportsSelfChat) @@ -270,30 +333,43 @@ func (a *AttachmentMenuBot) EncodeBare(b *bin.Buffer) error { b.PutBool(a.SupportsChannelChats) b.PutBool(a.SupportsSettings) b.PutBool(a.RequestWriteAccess) + b.PutBool(a.IsAdded) + b.PutBool(a.ShowInAttachmentMenu) + b.PutBool(a.ShowInSideMenu) + b.PutBool(a.ShowDisclaimerInSideMenu) b.PutString(a.Name) if err := a.NameColor.Encode(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field name_color: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field name_color: %w", err) } if err := a.DefaultIcon.Encode(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field default_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field default_icon: %w", err) } if err := a.IosStaticIcon.Encode(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field ios_static_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field ios_static_icon: %w", err) } if err := a.IosAnimatedIcon.Encode(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field ios_animated_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field ios_animated_icon: %w", err) + } + if err := a.IosSideMenuIcon.Encode(b); err != nil { + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field ios_side_menu_icon: %w", err) } if err := a.AndroidIcon.Encode(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field android_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field android_icon: %w", err) + } + if err := a.AndroidSideMenuIcon.Encode(b); err != nil { + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field android_side_menu_icon: %w", err) } if err := a.MacosIcon.Encode(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field macos_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field macos_icon: %w", err) + } + if err := a.MacosSideMenuIcon.Encode(b); err != nil { + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field macos_side_menu_icon: %w", err) } if err := a.IconColor.Encode(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field icon_color: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field icon_color: %w", err) } if err := a.WebAppPlaceholder.Encode(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field web_app_placeholder: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field web_app_placeholder: %w", err) } return nil } @@ -301,10 +377,10 @@ func (a *AttachmentMenuBot) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (a *AttachmentMenuBot) Decode(b *bin.Buffer) error { if a == nil { - return fmt.Errorf("can't decode attachmentMenuBot#5920a05d to nil") + return fmt.Errorf("can't decode attachmentMenuBot#2176d831 to nil") } if err := b.ConsumeID(AttachmentMenuBotTypeID); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: %w", err) } return a.DecodeBare(b) } @@ -312,109 +388,152 @@ func (a *AttachmentMenuBot) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (a *AttachmentMenuBot) DecodeBare(b *bin.Buffer) error { if a == nil { - return fmt.Errorf("can't decode attachmentMenuBot#5920a05d to nil") + return fmt.Errorf("can't decode attachmentMenuBot#2176d831 to nil") } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field bot_user_id: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field bot_user_id: %w", err) } a.BotUserID = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_self_chat: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_self_chat: %w", err) } a.SupportsSelfChat = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_user_chats: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_user_chats: %w", err) } a.SupportsUserChats = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_bot_chats: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_bot_chats: %w", err) } a.SupportsBotChats = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_group_chats: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_group_chats: %w", err) } a.SupportsGroupChats = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_channel_chats: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_channel_chats: %w", err) } a.SupportsChannelChats = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_settings: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_settings: %w", err) } a.SupportsSettings = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field request_write_access: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field request_write_access: %w", err) } a.RequestWriteAccess = value } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field is_added: %w", err) + } + a.IsAdded = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field show_in_attachment_menu: %w", err) + } + a.ShowInAttachmentMenu = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field show_in_side_menu: %w", err) + } + a.ShowInSideMenu = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field show_disclaimer_in_side_menu: %w", err) + } + a.ShowDisclaimerInSideMenu = value + } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field name: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field name: %w", err) } a.Name = value } { if err := a.NameColor.Decode(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field name_color: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field name_color: %w", err) } } { if err := a.DefaultIcon.Decode(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field default_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field default_icon: %w", err) } } { if err := a.IosStaticIcon.Decode(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field ios_static_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field ios_static_icon: %w", err) } } { if err := a.IosAnimatedIcon.Decode(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field ios_animated_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field ios_animated_icon: %w", err) + } + } + { + if err := a.IosSideMenuIcon.Decode(b); err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field ios_side_menu_icon: %w", err) } } { if err := a.AndroidIcon.Decode(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field android_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field android_icon: %w", err) + } + } + { + if err := a.AndroidSideMenuIcon.Decode(b); err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field android_side_menu_icon: %w", err) } } { if err := a.MacosIcon.Decode(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field macos_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field macos_icon: %w", err) + } + } + { + if err := a.MacosSideMenuIcon.Decode(b); err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field macos_side_menu_icon: %w", err) } } { if err := a.IconColor.Decode(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field icon_color: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field icon_color: %w", err) } } { if err := a.WebAppPlaceholder.Decode(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field web_app_placeholder: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field web_app_placeholder: %w", err) } } return nil @@ -423,7 +542,7 @@ func (a *AttachmentMenuBot) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (a *AttachmentMenuBot) EncodeTDLibJSON(b tdjson.Encoder) error { if a == nil { - return fmt.Errorf("can't encode attachmentMenuBot#5920a05d as nil") + return fmt.Errorf("can't encode attachmentMenuBot#2176d831 as nil") } b.ObjStart() b.PutID("attachmentMenuBot") @@ -452,47 +571,74 @@ func (a *AttachmentMenuBot) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("request_write_access") b.PutBool(a.RequestWriteAccess) b.Comma() + b.FieldStart("is_added") + b.PutBool(a.IsAdded) + b.Comma() + b.FieldStart("show_in_attachment_menu") + b.PutBool(a.ShowInAttachmentMenu) + b.Comma() + b.FieldStart("show_in_side_menu") + b.PutBool(a.ShowInSideMenu) + b.Comma() + b.FieldStart("show_disclaimer_in_side_menu") + b.PutBool(a.ShowDisclaimerInSideMenu) + b.Comma() b.FieldStart("name") b.PutString(a.Name) b.Comma() b.FieldStart("name_color") if err := a.NameColor.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field name_color: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field name_color: %w", err) } b.Comma() b.FieldStart("default_icon") if err := a.DefaultIcon.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field default_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field default_icon: %w", err) } b.Comma() b.FieldStart("ios_static_icon") if err := a.IosStaticIcon.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field ios_static_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field ios_static_icon: %w", err) } b.Comma() b.FieldStart("ios_animated_icon") if err := a.IosAnimatedIcon.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field ios_animated_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field ios_animated_icon: %w", err) + } + b.Comma() + b.FieldStart("ios_side_menu_icon") + if err := a.IosSideMenuIcon.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field ios_side_menu_icon: %w", err) } b.Comma() b.FieldStart("android_icon") if err := a.AndroidIcon.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field android_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field android_icon: %w", err) + } + b.Comma() + b.FieldStart("android_side_menu_icon") + if err := a.AndroidSideMenuIcon.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field android_side_menu_icon: %w", err) } b.Comma() b.FieldStart("macos_icon") if err := a.MacosIcon.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field macos_icon: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field macos_icon: %w", err) + } + b.Comma() + b.FieldStart("macos_side_menu_icon") + if err := a.MacosSideMenuIcon.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field macos_side_menu_icon: %w", err) } b.Comma() b.FieldStart("icon_color") if err := a.IconColor.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field icon_color: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field icon_color: %w", err) } b.Comma() b.FieldStart("web_app_placeholder") if err := a.WebAppPlaceholder.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode attachmentMenuBot#5920a05d: field web_app_placeholder: %w", err) + return fmt.Errorf("unable to encode attachmentMenuBot#2176d831: field web_app_placeholder: %w", err) } b.Comma() b.StripComma() @@ -503,100 +649,136 @@ func (a *AttachmentMenuBot) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (a *AttachmentMenuBot) DecodeTDLibJSON(b tdjson.Decoder) error { if a == nil { - return fmt.Errorf("can't decode attachmentMenuBot#5920a05d to nil") + return fmt.Errorf("can't decode attachmentMenuBot#2176d831 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("attachmentMenuBot"); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: %w", err) } case "bot_user_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field bot_user_id: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field bot_user_id: %w", err) } a.BotUserID = value case "supports_self_chat": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_self_chat: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_self_chat: %w", err) } a.SupportsSelfChat = value case "supports_user_chats": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_user_chats: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_user_chats: %w", err) } a.SupportsUserChats = value case "supports_bot_chats": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_bot_chats: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_bot_chats: %w", err) } a.SupportsBotChats = value case "supports_group_chats": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_group_chats: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_group_chats: %w", err) } a.SupportsGroupChats = value case "supports_channel_chats": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_channel_chats: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_channel_chats: %w", err) } a.SupportsChannelChats = value case "supports_settings": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field supports_settings: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field supports_settings: %w", err) } a.SupportsSettings = value case "request_write_access": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field request_write_access: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field request_write_access: %w", err) } a.RequestWriteAccess = value + case "is_added": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field is_added: %w", err) + } + a.IsAdded = value + case "show_in_attachment_menu": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field show_in_attachment_menu: %w", err) + } + a.ShowInAttachmentMenu = value + case "show_in_side_menu": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field show_in_side_menu: %w", err) + } + a.ShowInSideMenu = value + case "show_disclaimer_in_side_menu": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field show_disclaimer_in_side_menu: %w", err) + } + a.ShowDisclaimerInSideMenu = value case "name": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field name: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field name: %w", err) } a.Name = value case "name_color": if err := a.NameColor.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field name_color: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field name_color: %w", err) } case "default_icon": if err := a.DefaultIcon.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field default_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field default_icon: %w", err) } case "ios_static_icon": if err := a.IosStaticIcon.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field ios_static_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field ios_static_icon: %w", err) } case "ios_animated_icon": if err := a.IosAnimatedIcon.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field ios_animated_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field ios_animated_icon: %w", err) + } + case "ios_side_menu_icon": + if err := a.IosSideMenuIcon.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field ios_side_menu_icon: %w", err) } case "android_icon": if err := a.AndroidIcon.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field android_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field android_icon: %w", err) + } + case "android_side_menu_icon": + if err := a.AndroidSideMenuIcon.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field android_side_menu_icon: %w", err) } case "macos_icon": if err := a.MacosIcon.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field macos_icon: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field macos_icon: %w", err) + } + case "macos_side_menu_icon": + if err := a.MacosSideMenuIcon.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field macos_side_menu_icon: %w", err) } case "icon_color": if err := a.IconColor.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field icon_color: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field icon_color: %w", err) } case "web_app_placeholder": if err := a.WebAppPlaceholder.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode attachmentMenuBot#5920a05d: field web_app_placeholder: %w", err) + return fmt.Errorf("unable to decode attachmentMenuBot#2176d831: field web_app_placeholder: %w", err) } default: return b.Skip() @@ -669,6 +851,38 @@ func (a *AttachmentMenuBot) GetRequestWriteAccess() (value bool) { return a.RequestWriteAccess } +// GetIsAdded returns value of IsAdded field. +func (a *AttachmentMenuBot) GetIsAdded() (value bool) { + if a == nil { + return + } + return a.IsAdded +} + +// GetShowInAttachmentMenu returns value of ShowInAttachmentMenu field. +func (a *AttachmentMenuBot) GetShowInAttachmentMenu() (value bool) { + if a == nil { + return + } + return a.ShowInAttachmentMenu +} + +// GetShowInSideMenu returns value of ShowInSideMenu field. +func (a *AttachmentMenuBot) GetShowInSideMenu() (value bool) { + if a == nil { + return + } + return a.ShowInSideMenu +} + +// GetShowDisclaimerInSideMenu returns value of ShowDisclaimerInSideMenu field. +func (a *AttachmentMenuBot) GetShowDisclaimerInSideMenu() (value bool) { + if a == nil { + return + } + return a.ShowDisclaimerInSideMenu +} + // GetName returns value of Name field. func (a *AttachmentMenuBot) GetName() (value string) { if a == nil { @@ -709,6 +923,14 @@ func (a *AttachmentMenuBot) GetIosAnimatedIcon() (value File) { return a.IosAnimatedIcon } +// GetIosSideMenuIcon returns value of IosSideMenuIcon field. +func (a *AttachmentMenuBot) GetIosSideMenuIcon() (value File) { + if a == nil { + return + } + return a.IosSideMenuIcon +} + // GetAndroidIcon returns value of AndroidIcon field. func (a *AttachmentMenuBot) GetAndroidIcon() (value File) { if a == nil { @@ -717,6 +939,14 @@ func (a *AttachmentMenuBot) GetAndroidIcon() (value File) { return a.AndroidIcon } +// GetAndroidSideMenuIcon returns value of AndroidSideMenuIcon field. +func (a *AttachmentMenuBot) GetAndroidSideMenuIcon() (value File) { + if a == nil { + return + } + return a.AndroidSideMenuIcon +} + // GetMacosIcon returns value of MacosIcon field. func (a *AttachmentMenuBot) GetMacosIcon() (value File) { if a == nil { @@ -725,6 +955,14 @@ func (a *AttachmentMenuBot) GetMacosIcon() (value File) { return a.MacosIcon } +// GetMacosSideMenuIcon returns value of MacosSideMenuIcon field. +func (a *AttachmentMenuBot) GetMacosSideMenuIcon() (value File) { + if a == nil { + return + } + return a.MacosSideMenuIcon +} + // GetIconColor returns value of IconColor field. func (a *AttachmentMenuBot) GetIconColor() (value AttachmentMenuBotColor) { if a == nil { diff --git a/tdapi/tl_chat_invite_link_info_gen.go b/tdapi/tl_chat_invite_link_info_gen.go index b5b69a26d3..663b08521a 100644 --- a/tdapi/tl_chat_invite_link_info_gen.go +++ b/tdapi/tl_chat_invite_link_info_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// ChatInviteLinkInfo represents TL type `chatInviteLinkInfo#9afe0cd0`. +// ChatInviteLinkInfo represents TL type `chatInviteLinkInfo#c8c16a57`. type ChatInviteLinkInfo struct { // Chat identifier of the invite link; 0 if the user has no access to the chat before // joining @@ -39,9 +39,8 @@ type ChatInviteLinkInfo struct { // If non-zero, the amount of time for which read access to the chat will remain // available, in seconds AccessibleFor int32 - // Type of the chat; basic_group_id or supergroup_id can be 0 if the user has no access - // to the chat before joining - Type ChatTypeClass + // Type of the chat + Type InviteLinkChatTypeClass // Title of the chat Title string // Chat photo; may be null @@ -66,7 +65,7 @@ type ChatInviteLinkInfo struct { } // ChatInviteLinkInfoTypeID is TL type id of ChatInviteLinkInfo. -const ChatInviteLinkInfoTypeID = 0x9afe0cd0 +const ChatInviteLinkInfoTypeID = 0xc8c16a57 // Ensuring interfaces in compile-time for ChatInviteLinkInfo. var ( @@ -214,7 +213,7 @@ func (c *ChatInviteLinkInfo) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (c *ChatInviteLinkInfo) Encode(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't encode chatInviteLinkInfo#9afe0cd0 as nil") + return fmt.Errorf("can't encode chatInviteLinkInfo#c8c16a57 as nil") } b.PutID(ChatInviteLinkInfoTypeID) return c.EncodeBare(b) @@ -223,19 +222,19 @@ func (c *ChatInviteLinkInfo) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (c *ChatInviteLinkInfo) EncodeBare(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't encode chatInviteLinkInfo#9afe0cd0 as nil") + return fmt.Errorf("can't encode chatInviteLinkInfo#c8c16a57 as nil") } b.PutInt53(c.ChatID) b.PutInt32(c.AccessibleFor) if c.Type == nil { - return fmt.Errorf("unable to encode chatInviteLinkInfo#9afe0cd0: field type is nil") + return fmt.Errorf("unable to encode chatInviteLinkInfo#c8c16a57: field type is nil") } if err := c.Type.Encode(b); err != nil { - return fmt.Errorf("unable to encode chatInviteLinkInfo#9afe0cd0: field type: %w", err) + return fmt.Errorf("unable to encode chatInviteLinkInfo#c8c16a57: field type: %w", err) } b.PutString(c.Title) if err := c.Photo.Encode(b); err != nil { - return fmt.Errorf("unable to encode chatInviteLinkInfo#9afe0cd0: field photo: %w", err) + return fmt.Errorf("unable to encode chatInviteLinkInfo#c8c16a57: field photo: %w", err) } b.PutString(c.Description) b.PutInt32(c.MemberCount) @@ -254,10 +253,10 @@ func (c *ChatInviteLinkInfo) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (c *ChatInviteLinkInfo) Decode(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't decode chatInviteLinkInfo#9afe0cd0 to nil") + return fmt.Errorf("can't decode chatInviteLinkInfo#c8c16a57 to nil") } if err := b.ConsumeID(ChatInviteLinkInfoTypeID); err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: %w", err) } return c.DecodeBare(b) } @@ -265,59 +264,59 @@ func (c *ChatInviteLinkInfo) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (c *ChatInviteLinkInfo) DecodeBare(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't decode chatInviteLinkInfo#9afe0cd0 to nil") + return fmt.Errorf("can't decode chatInviteLinkInfo#c8c16a57 to nil") } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field chat_id: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field chat_id: %w", err) } c.ChatID = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field accessible_for: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field accessible_for: %w", err) } c.AccessibleFor = value } { - value, err := DecodeChatType(b) + value, err := DecodeInviteLinkChatType(b) if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field type: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field type: %w", err) } c.Type = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field title: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field title: %w", err) } c.Title = value } { if err := c.Photo.Decode(b); err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field photo: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field photo: %w", err) } } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field description: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field description: %w", err) } c.Description = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field member_count: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field member_count: %w", err) } c.MemberCount = value } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field member_user_ids: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field member_user_ids: %w", err) } if headerLen > 0 { @@ -326,7 +325,7 @@ func (c *ChatInviteLinkInfo) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field member_user_ids: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field member_user_ids: %w", err) } c.MemberUserIDs = append(c.MemberUserIDs, value) } @@ -334,35 +333,35 @@ func (c *ChatInviteLinkInfo) DecodeBare(b *bin.Buffer) error { { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field creates_join_request: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field creates_join_request: %w", err) } c.CreatesJoinRequest = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field is_public: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field is_public: %w", err) } c.IsPublic = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field is_verified: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field is_verified: %w", err) } c.IsVerified = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field is_scam: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field is_scam: %w", err) } c.IsScam = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field is_fake: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field is_fake: %w", err) } c.IsFake = value } @@ -372,7 +371,7 @@ func (c *ChatInviteLinkInfo) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (c *ChatInviteLinkInfo) EncodeTDLibJSON(b tdjson.Encoder) error { if c == nil { - return fmt.Errorf("can't encode chatInviteLinkInfo#9afe0cd0 as nil") + return fmt.Errorf("can't encode chatInviteLinkInfo#c8c16a57 as nil") } b.ObjStart() b.PutID("chatInviteLinkInfo") @@ -385,10 +384,10 @@ func (c *ChatInviteLinkInfo) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("type") if c.Type == nil { - return fmt.Errorf("unable to encode chatInviteLinkInfo#9afe0cd0: field type is nil") + return fmt.Errorf("unable to encode chatInviteLinkInfo#c8c16a57: field type is nil") } if err := c.Type.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode chatInviteLinkInfo#9afe0cd0: field type: %w", err) + return fmt.Errorf("unable to encode chatInviteLinkInfo#c8c16a57: field type: %w", err) } b.Comma() b.FieldStart("title") @@ -396,7 +395,7 @@ func (c *ChatInviteLinkInfo) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("photo") if err := c.Photo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode chatInviteLinkInfo#9afe0cd0: field photo: %w", err) + return fmt.Errorf("unable to encode chatInviteLinkInfo#c8c16a57: field photo: %w", err) } b.Comma() b.FieldStart("description") @@ -437,94 +436,94 @@ func (c *ChatInviteLinkInfo) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (c *ChatInviteLinkInfo) DecodeTDLibJSON(b tdjson.Decoder) error { if c == nil { - return fmt.Errorf("can't decode chatInviteLinkInfo#9afe0cd0 to nil") + return fmt.Errorf("can't decode chatInviteLinkInfo#c8c16a57 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("chatInviteLinkInfo"); err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: %w", err) } case "chat_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field chat_id: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field chat_id: %w", err) } c.ChatID = value case "accessible_for": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field accessible_for: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field accessible_for: %w", err) } c.AccessibleFor = value case "type": - value, err := DecodeTDLibJSONChatType(b) + value, err := DecodeTDLibJSONInviteLinkChatType(b) if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field type: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field type: %w", err) } c.Type = value case "title": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field title: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field title: %w", err) } c.Title = value case "photo": if err := c.Photo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field photo: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field photo: %w", err) } case "description": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field description: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field description: %w", err) } c.Description = value case "member_count": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field member_count: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field member_count: %w", err) } c.MemberCount = value case "member_user_ids": if err := b.Arr(func(b tdjson.Decoder) error { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field member_user_ids: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field member_user_ids: %w", err) } c.MemberUserIDs = append(c.MemberUserIDs, value) return nil }); err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field member_user_ids: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field member_user_ids: %w", err) } case "creates_join_request": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field creates_join_request: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field creates_join_request: %w", err) } c.CreatesJoinRequest = value case "is_public": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field is_public: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field is_public: %w", err) } c.IsPublic = value case "is_verified": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field is_verified: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field is_verified: %w", err) } c.IsVerified = value case "is_scam": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field is_scam: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field is_scam: %w", err) } c.IsScam = value case "is_fake": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode chatInviteLinkInfo#9afe0cd0: field is_fake: %w", err) + return fmt.Errorf("unable to decode chatInviteLinkInfo#c8c16a57: field is_fake: %w", err) } c.IsFake = value default: @@ -551,7 +550,7 @@ func (c *ChatInviteLinkInfo) GetAccessibleFor() (value int32) { } // GetType returns value of Type field. -func (c *ChatInviteLinkInfo) GetType() (value ChatTypeClass) { +func (c *ChatInviteLinkInfo) GetType() (value InviteLinkChatTypeClass) { if c == nil { return } diff --git a/tdapi/tl_confirm_session_gen.go b/tdapi/tl_confirm_session_gen.go new file mode 100644 index 0000000000..85c06d49f8 --- /dev/null +++ b/tdapi/tl_confirm_session_gen.go @@ -0,0 +1,206 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// ConfirmSessionRequest represents TL type `confirmSession#d7c9b41f`. +type ConfirmSessionRequest struct { + // Session identifier + SessionID int64 +} + +// ConfirmSessionRequestTypeID is TL type id of ConfirmSessionRequest. +const ConfirmSessionRequestTypeID = 0xd7c9b41f + +// Ensuring interfaces in compile-time for ConfirmSessionRequest. +var ( + _ bin.Encoder = &ConfirmSessionRequest{} + _ bin.Decoder = &ConfirmSessionRequest{} + _ bin.BareEncoder = &ConfirmSessionRequest{} + _ bin.BareDecoder = &ConfirmSessionRequest{} +) + +func (c *ConfirmSessionRequest) Zero() bool { + if c == nil { + return true + } + if !(c.SessionID == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (c *ConfirmSessionRequest) String() string { + if c == nil { + return "ConfirmSessionRequest(nil)" + } + type Alias ConfirmSessionRequest + return fmt.Sprintf("ConfirmSessionRequest%+v", Alias(*c)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ConfirmSessionRequest) TypeID() uint32 { + return ConfirmSessionRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*ConfirmSessionRequest) TypeName() string { + return "confirmSession" +} + +// TypeInfo returns info about TL type. +func (c *ConfirmSessionRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "confirmSession", + ID: ConfirmSessionRequestTypeID, + } + if c == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "SessionID", + SchemaName: "session_id", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (c *ConfirmSessionRequest) Encode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode confirmSession#d7c9b41f as nil") + } + b.PutID(ConfirmSessionRequestTypeID) + return c.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (c *ConfirmSessionRequest) EncodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode confirmSession#d7c9b41f as nil") + } + b.PutLong(c.SessionID) + return nil +} + +// Decode implements bin.Decoder. +func (c *ConfirmSessionRequest) Decode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode confirmSession#d7c9b41f to nil") + } + if err := b.ConsumeID(ConfirmSessionRequestTypeID); err != nil { + return fmt.Errorf("unable to decode confirmSession#d7c9b41f: %w", err) + } + return c.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (c *ConfirmSessionRequest) DecodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode confirmSession#d7c9b41f to nil") + } + { + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode confirmSession#d7c9b41f: field session_id: %w", err) + } + c.SessionID = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (c *ConfirmSessionRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if c == nil { + return fmt.Errorf("can't encode confirmSession#d7c9b41f as nil") + } + b.ObjStart() + b.PutID("confirmSession") + b.Comma() + b.FieldStart("session_id") + b.PutLong(c.SessionID) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (c *ConfirmSessionRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if c == nil { + return fmt.Errorf("can't decode confirmSession#d7c9b41f to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("confirmSession"); err != nil { + return fmt.Errorf("unable to decode confirmSession#d7c9b41f: %w", err) + } + case "session_id": + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode confirmSession#d7c9b41f: field session_id: %w", err) + } + c.SessionID = value + default: + return b.Skip() + } + return nil + }) +} + +// GetSessionID returns value of SessionID field. +func (c *ConfirmSessionRequest) GetSessionID() (value int64) { + if c == nil { + return + } + return c.SessionID +} + +// ConfirmSession invokes method confirmSession#d7c9b41f returning error if any. +func (c *Client) ConfirmSession(ctx context.Context, sessionid int64) error { + var ok Ok + + request := &ConfirmSessionRequest{ + SessionID: sessionid, + } + if err := c.rpc.Invoke(ctx, request, &ok); err != nil { + return err + } + return nil +} diff --git a/tdapi/tl_connected_website_gen.go b/tdapi/tl_connected_website_gen.go index 04c69c3008..5f8207c409 100644 --- a/tdapi/tl_connected_website_gen.go +++ b/tdapi/tl_connected_website_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// ConnectedWebsite represents TL type `connectedWebsite#324ea36d`. +// ConnectedWebsite represents TL type `connectedWebsite#75e7a78a`. type ConnectedWebsite struct { // Website identifier ID int64 @@ -48,14 +48,14 @@ type ConnectedWebsite struct { // Point in time (Unix timestamp) when obtained authorization was last used LastActiveDate int32 // IP address from which the user was logged in, in human-readable format - IP string + IPAddress string // Human-readable description of a country and a region from which the user was logged in // based on the IP address Location string } // ConnectedWebsiteTypeID is TL type id of ConnectedWebsite. -const ConnectedWebsiteTypeID = 0x324ea36d +const ConnectedWebsiteTypeID = 0x75e7a78a // Ensuring interfaces in compile-time for ConnectedWebsite. var ( @@ -90,7 +90,7 @@ func (c *ConnectedWebsite) Zero() bool { if !(c.LastActiveDate == 0) { return false } - if !(c.IP == "") { + if !(c.IPAddress == "") { return false } if !(c.Location == "") { @@ -161,8 +161,8 @@ func (c *ConnectedWebsite) TypeInfo() tdp.Type { SchemaName: "last_active_date", }, { - Name: "IP", - SchemaName: "ip", + Name: "IPAddress", + SchemaName: "ip_address", }, { Name: "Location", @@ -175,7 +175,7 @@ func (c *ConnectedWebsite) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (c *ConnectedWebsite) Encode(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't encode connectedWebsite#324ea36d as nil") + return fmt.Errorf("can't encode connectedWebsite#75e7a78a as nil") } b.PutID(ConnectedWebsiteTypeID) return c.EncodeBare(b) @@ -184,7 +184,7 @@ func (c *ConnectedWebsite) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (c *ConnectedWebsite) EncodeBare(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't encode connectedWebsite#324ea36d as nil") + return fmt.Errorf("can't encode connectedWebsite#75e7a78a as nil") } b.PutLong(c.ID) b.PutString(c.DomainName) @@ -193,7 +193,7 @@ func (c *ConnectedWebsite) EncodeBare(b *bin.Buffer) error { b.PutString(c.Platform) b.PutInt32(c.LogInDate) b.PutInt32(c.LastActiveDate) - b.PutString(c.IP) + b.PutString(c.IPAddress) b.PutString(c.Location) return nil } @@ -201,10 +201,10 @@ func (c *ConnectedWebsite) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (c *ConnectedWebsite) Decode(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't decode connectedWebsite#324ea36d to nil") + return fmt.Errorf("can't decode connectedWebsite#75e7a78a to nil") } if err := b.ConsumeID(ConnectedWebsiteTypeID); err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: %w", err) } return c.DecodeBare(b) } @@ -212,68 +212,68 @@ func (c *ConnectedWebsite) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (c *ConnectedWebsite) DecodeBare(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't decode connectedWebsite#324ea36d to nil") + return fmt.Errorf("can't decode connectedWebsite#75e7a78a to nil") } { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field id: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field id: %w", err) } c.ID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field domain_name: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field domain_name: %w", err) } c.DomainName = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field bot_user_id: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field bot_user_id: %w", err) } c.BotUserID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field browser: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field browser: %w", err) } c.Browser = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field platform: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field platform: %w", err) } c.Platform = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field log_in_date: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field log_in_date: %w", err) } c.LogInDate = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field last_active_date: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field last_active_date: %w", err) } c.LastActiveDate = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field ip: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field ip_address: %w", err) } - c.IP = value + c.IPAddress = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field location: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field location: %w", err) } c.Location = value } @@ -283,7 +283,7 @@ func (c *ConnectedWebsite) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (c *ConnectedWebsite) EncodeTDLibJSON(b tdjson.Encoder) error { if c == nil { - return fmt.Errorf("can't encode connectedWebsite#324ea36d as nil") + return fmt.Errorf("can't encode connectedWebsite#75e7a78a as nil") } b.ObjStart() b.PutID("connectedWebsite") @@ -309,8 +309,8 @@ func (c *ConnectedWebsite) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("last_active_date") b.PutInt32(c.LastActiveDate) b.Comma() - b.FieldStart("ip") - b.PutString(c.IP) + b.FieldStart("ip_address") + b.PutString(c.IPAddress) b.Comma() b.FieldStart("location") b.PutString(c.Location) @@ -323,67 +323,67 @@ func (c *ConnectedWebsite) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (c *ConnectedWebsite) DecodeTDLibJSON(b tdjson.Decoder) error { if c == nil { - return fmt.Errorf("can't decode connectedWebsite#324ea36d to nil") + return fmt.Errorf("can't decode connectedWebsite#75e7a78a to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("connectedWebsite"); err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: %w", err) } case "id": value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field id: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field id: %w", err) } c.ID = value case "domain_name": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field domain_name: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field domain_name: %w", err) } c.DomainName = value case "bot_user_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field bot_user_id: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field bot_user_id: %w", err) } c.BotUserID = value case "browser": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field browser: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field browser: %w", err) } c.Browser = value case "platform": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field platform: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field platform: %w", err) } c.Platform = value case "log_in_date": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field log_in_date: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field log_in_date: %w", err) } c.LogInDate = value case "last_active_date": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field last_active_date: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field last_active_date: %w", err) } c.LastActiveDate = value - case "ip": + case "ip_address": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field ip: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field ip_address: %w", err) } - c.IP = value + c.IPAddress = value case "location": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode connectedWebsite#324ea36d: field location: %w", err) + return fmt.Errorf("unable to decode connectedWebsite#75e7a78a: field location: %w", err) } c.Location = value default: @@ -449,12 +449,12 @@ func (c *ConnectedWebsite) GetLastActiveDate() (value int32) { return c.LastActiveDate } -// GetIP returns value of IP field. -func (c *ConnectedWebsite) GetIP() (value string) { +// GetIPAddress returns value of IPAddress field. +func (c *ConnectedWebsite) GetIPAddress() (value string) { if c == nil { return } - return c.IP + return c.IPAddress } // GetLocation returns value of Location field. diff --git a/tdapi/tl_edit_proxy_gen.go b/tdapi/tl_edit_proxy_gen.go index 5c2aecd24a..7624536d57 100644 --- a/tdapi/tl_edit_proxy_gen.go +++ b/tdapi/tl_edit_proxy_gen.go @@ -35,7 +35,7 @@ var ( type EditProxyRequest struct { // Proxy identifier ProxyID int32 - // Proxy server IP address + // Proxy server domain or IP address Server string // Proxy server port Port int32 diff --git a/tdapi/tl_found_web_app_gen.go b/tdapi/tl_found_web_app_gen.go index e2e5f8dd44..49644c2158 100644 --- a/tdapi/tl_found_web_app_gen.go +++ b/tdapi/tl_found_web_app_gen.go @@ -31,10 +31,12 @@ var ( _ = tdjson.Encoder{} ) -// FoundWebApp represents TL type `foundWebApp#eea8d01e`. +// FoundWebApp represents TL type `foundWebApp#2b8136d4`. type FoundWebApp struct { // The Web App WebApp WebApp + // True, if the app supports "settings_button_pressed" event + SupportsSettings bool // True, if the user must be asked for the permission to the bot to send them messages RequestWriteAccess bool // True, if there is no need to show an ordinary open URL confirmation before opening the @@ -44,7 +46,7 @@ type FoundWebApp struct { } // FoundWebAppTypeID is TL type id of FoundWebApp. -const FoundWebAppTypeID = 0xeea8d01e +const FoundWebAppTypeID = 0x2b8136d4 // Ensuring interfaces in compile-time for FoundWebApp. var ( @@ -61,6 +63,9 @@ func (f *FoundWebApp) Zero() bool { if !(f.WebApp.Zero()) { return false } + if !(f.SupportsSettings == false) { + return false + } if !(f.RequestWriteAccess == false) { return false } @@ -107,6 +112,10 @@ func (f *FoundWebApp) TypeInfo() tdp.Type { Name: "WebApp", SchemaName: "web_app", }, + { + Name: "SupportsSettings", + SchemaName: "supports_settings", + }, { Name: "RequestWriteAccess", SchemaName: "request_write_access", @@ -122,7 +131,7 @@ func (f *FoundWebApp) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (f *FoundWebApp) Encode(b *bin.Buffer) error { if f == nil { - return fmt.Errorf("can't encode foundWebApp#eea8d01e as nil") + return fmt.Errorf("can't encode foundWebApp#2b8136d4 as nil") } b.PutID(FoundWebAppTypeID) return f.EncodeBare(b) @@ -131,11 +140,12 @@ func (f *FoundWebApp) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (f *FoundWebApp) EncodeBare(b *bin.Buffer) error { if f == nil { - return fmt.Errorf("can't encode foundWebApp#eea8d01e as nil") + return fmt.Errorf("can't encode foundWebApp#2b8136d4 as nil") } if err := f.WebApp.Encode(b); err != nil { - return fmt.Errorf("unable to encode foundWebApp#eea8d01e: field web_app: %w", err) + return fmt.Errorf("unable to encode foundWebApp#2b8136d4: field web_app: %w", err) } + b.PutBool(f.SupportsSettings) b.PutBool(f.RequestWriteAccess) b.PutBool(f.SkipConfirmation) return nil @@ -144,10 +154,10 @@ func (f *FoundWebApp) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (f *FoundWebApp) Decode(b *bin.Buffer) error { if f == nil { - return fmt.Errorf("can't decode foundWebApp#eea8d01e to nil") + return fmt.Errorf("can't decode foundWebApp#2b8136d4 to nil") } if err := b.ConsumeID(FoundWebAppTypeID); err != nil { - return fmt.Errorf("unable to decode foundWebApp#eea8d01e: %w", err) + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: %w", err) } return f.DecodeBare(b) } @@ -155,24 +165,31 @@ func (f *FoundWebApp) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (f *FoundWebApp) DecodeBare(b *bin.Buffer) error { if f == nil { - return fmt.Errorf("can't decode foundWebApp#eea8d01e to nil") + return fmt.Errorf("can't decode foundWebApp#2b8136d4 to nil") } { if err := f.WebApp.Decode(b); err != nil { - return fmt.Errorf("unable to decode foundWebApp#eea8d01e: field web_app: %w", err) + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: field web_app: %w", err) + } + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: field supports_settings: %w", err) } + f.SupportsSettings = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode foundWebApp#eea8d01e: field request_write_access: %w", err) + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: field request_write_access: %w", err) } f.RequestWriteAccess = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode foundWebApp#eea8d01e: field skip_confirmation: %w", err) + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: field skip_confirmation: %w", err) } f.SkipConfirmation = value } @@ -182,16 +199,19 @@ func (f *FoundWebApp) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (f *FoundWebApp) EncodeTDLibJSON(b tdjson.Encoder) error { if f == nil { - return fmt.Errorf("can't encode foundWebApp#eea8d01e as nil") + return fmt.Errorf("can't encode foundWebApp#2b8136d4 as nil") } b.ObjStart() b.PutID("foundWebApp") b.Comma() b.FieldStart("web_app") if err := f.WebApp.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode foundWebApp#eea8d01e: field web_app: %w", err) + return fmt.Errorf("unable to encode foundWebApp#2b8136d4: field web_app: %w", err) } b.Comma() + b.FieldStart("supports_settings") + b.PutBool(f.SupportsSettings) + b.Comma() b.FieldStart("request_write_access") b.PutBool(f.RequestWriteAccess) b.Comma() @@ -206,29 +226,35 @@ func (f *FoundWebApp) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (f *FoundWebApp) DecodeTDLibJSON(b tdjson.Decoder) error { if f == nil { - return fmt.Errorf("can't decode foundWebApp#eea8d01e to nil") + return fmt.Errorf("can't decode foundWebApp#2b8136d4 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("foundWebApp"); err != nil { - return fmt.Errorf("unable to decode foundWebApp#eea8d01e: %w", err) + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: %w", err) } case "web_app": if err := f.WebApp.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode foundWebApp#eea8d01e: field web_app: %w", err) + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: field web_app: %w", err) } + case "supports_settings": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: field supports_settings: %w", err) + } + f.SupportsSettings = value case "request_write_access": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode foundWebApp#eea8d01e: field request_write_access: %w", err) + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: field request_write_access: %w", err) } f.RequestWriteAccess = value case "skip_confirmation": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode foundWebApp#eea8d01e: field skip_confirmation: %w", err) + return fmt.Errorf("unable to decode foundWebApp#2b8136d4: field skip_confirmation: %w", err) } f.SkipConfirmation = value default: @@ -246,6 +272,14 @@ func (f *FoundWebApp) GetWebApp() (value WebApp) { return f.WebApp } +// GetSupportsSettings returns value of SupportsSettings field. +func (f *FoundWebApp) GetSupportsSettings() (value bool) { + if f == nil { + return + } + return f.SupportsSettings +} + // GetRequestWriteAccess returns value of RequestWriteAccess field. func (f *FoundWebApp) GetRequestWriteAccess() (value bool) { if f == nil { diff --git a/tdapi/tl_get_web_app_url_gen.go b/tdapi/tl_get_web_app_url_gen.go index 315a0e57a3..4471b40ed9 100644 --- a/tdapi/tl_get_web_app_url_gen.go +++ b/tdapi/tl_get_web_app_url_gen.go @@ -35,7 +35,9 @@ var ( type GetWebAppURLRequest struct { // Identifier of the target bot BotUserID int64 - // The URL from the keyboardButtonTypeWebApp or inlineQueryResultsButtonTypeWebApp button + // The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp + // button, an internalLinkTypeSideMenuBot link, or an empty when the bot is opened from + // the side menu URL string // Preferred Web App theme; pass null to use the default theme Theme ThemeParameters diff --git a/tdapi/tl_input_message_content_gen.go b/tdapi/tl_input_message_content_gen.go index e5d114f24a..0f47dd75bb 100644 --- a/tdapi/tl_input_message_content_gen.go +++ b/tdapi/tl_input_message_content_gen.go @@ -1334,7 +1334,7 @@ func (i *InputMessageDocument) GetCaption() (value FormattedText) { return i.Caption } -// InputMessagePhoto represents TL type `inputMessagePhoto#600db6e`. +// InputMessagePhoto represents TL type `inputMessagePhoto#83234a22`. type InputMessagePhoto struct { // Photo to send. The photo must be at most 10 MB in size. The photo's width and height // must not exceed 10000 in total. Width and height ratio must be at most 20 @@ -1351,16 +1351,15 @@ type InputMessagePhoto struct { // Photo caption; pass null to use an empty caption; // 0-getOption("message_caption_length_max") characters Caption FormattedText - // Photo self-destruct time, in seconds (0-60). A non-zero self-destruct time can be - // specified only in private chats - SelfDestructTime int32 + // Photo self-destruct type; pass null if none; private chats only + SelfDestructType MessageSelfDestructTypeClass // True, if the photo preview must be covered by a spoiler animation; not supported in // secret chats HasSpoiler bool } // InputMessagePhotoTypeID is TL type id of InputMessagePhoto. -const InputMessagePhotoTypeID = 0x600db6e +const InputMessagePhotoTypeID = 0x83234a22 // construct implements constructor of InputMessageContentClass. func (i InputMessagePhoto) construct() InputMessageContentClass { return &i } @@ -1397,7 +1396,7 @@ func (i *InputMessagePhoto) Zero() bool { if !(i.Caption.Zero()) { return false } - if !(i.SelfDestructTime == 0) { + if !(i.SelfDestructType == nil) { return false } if !(i.HasSpoiler == false) { @@ -1464,8 +1463,8 @@ func (i *InputMessagePhoto) TypeInfo() tdp.Type { SchemaName: "caption", }, { - Name: "SelfDestructTime", - SchemaName: "self_destruct_time", + Name: "SelfDestructType", + SchemaName: "self_destruct_type", }, { Name: "HasSpoiler", @@ -1478,7 +1477,7 @@ func (i *InputMessagePhoto) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (i *InputMessagePhoto) Encode(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't encode inputMessagePhoto#600db6e as nil") + return fmt.Errorf("can't encode inputMessagePhoto#83234a22 as nil") } b.PutID(InputMessagePhotoTypeID) return i.EncodeBare(b) @@ -1487,16 +1486,16 @@ func (i *InputMessagePhoto) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (i *InputMessagePhoto) EncodeBare(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't encode inputMessagePhoto#600db6e as nil") + return fmt.Errorf("can't encode inputMessagePhoto#83234a22 as nil") } if i.Photo == nil { - return fmt.Errorf("unable to encode inputMessagePhoto#600db6e: field photo is nil") + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field photo is nil") } if err := i.Photo.Encode(b); err != nil { - return fmt.Errorf("unable to encode inputMessagePhoto#600db6e: field photo: %w", err) + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field photo: %w", err) } if err := i.Thumbnail.Encode(b); err != nil { - return fmt.Errorf("unable to encode inputMessagePhoto#600db6e: field thumbnail: %w", err) + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field thumbnail: %w", err) } b.PutInt(len(i.AddedStickerFileIDs)) for _, v := range i.AddedStickerFileIDs { @@ -1505,9 +1504,14 @@ func (i *InputMessagePhoto) EncodeBare(b *bin.Buffer) error { b.PutInt32(i.Width) b.PutInt32(i.Height) if err := i.Caption.Encode(b); err != nil { - return fmt.Errorf("unable to encode inputMessagePhoto#600db6e: field caption: %w", err) + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field caption: %w", err) + } + if i.SelfDestructType == nil { + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field self_destruct_type is nil") + } + if err := i.SelfDestructType.Encode(b); err != nil { + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field self_destruct_type: %w", err) } - b.PutInt32(i.SelfDestructTime) b.PutBool(i.HasSpoiler) return nil } @@ -1515,10 +1519,10 @@ func (i *InputMessagePhoto) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (i *InputMessagePhoto) Decode(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't decode inputMessagePhoto#600db6e to nil") + return fmt.Errorf("can't decode inputMessagePhoto#83234a22 to nil") } if err := b.ConsumeID(InputMessagePhotoTypeID); err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: %w", err) } return i.DecodeBare(b) } @@ -1526,24 +1530,24 @@ func (i *InputMessagePhoto) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (i *InputMessagePhoto) DecodeBare(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't decode inputMessagePhoto#600db6e to nil") + return fmt.Errorf("can't decode inputMessagePhoto#83234a22 to nil") } { value, err := DecodeInputFile(b) if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field photo: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field photo: %w", err) } i.Photo = value } { if err := i.Thumbnail.Decode(b); err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field thumbnail: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field thumbnail: %w", err) } } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field added_sticker_file_ids: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field added_sticker_file_ids: %w", err) } if headerLen > 0 { @@ -1552,7 +1556,7 @@ func (i *InputMessagePhoto) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field added_sticker_file_ids: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field added_sticker_file_ids: %w", err) } i.AddedStickerFileIDs = append(i.AddedStickerFileIDs, value) } @@ -1560,33 +1564,33 @@ func (i *InputMessagePhoto) DecodeBare(b *bin.Buffer) error { { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field width: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field width: %w", err) } i.Width = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field height: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field height: %w", err) } i.Height = value } { if err := i.Caption.Decode(b); err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field caption: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field caption: %w", err) } } { - value, err := b.Int32() + value, err := DecodeMessageSelfDestructType(b) if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field self_destruct_time: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field self_destruct_type: %w", err) } - i.SelfDestructTime = value + i.SelfDestructType = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field has_spoiler: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field has_spoiler: %w", err) } i.HasSpoiler = value } @@ -1596,22 +1600,22 @@ func (i *InputMessagePhoto) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (i *InputMessagePhoto) EncodeTDLibJSON(b tdjson.Encoder) error { if i == nil { - return fmt.Errorf("can't encode inputMessagePhoto#600db6e as nil") + return fmt.Errorf("can't encode inputMessagePhoto#83234a22 as nil") } b.ObjStart() b.PutID("inputMessagePhoto") b.Comma() b.FieldStart("photo") if i.Photo == nil { - return fmt.Errorf("unable to encode inputMessagePhoto#600db6e: field photo is nil") + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field photo is nil") } if err := i.Photo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode inputMessagePhoto#600db6e: field photo: %w", err) + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field photo: %w", err) } b.Comma() b.FieldStart("thumbnail") if err := i.Thumbnail.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode inputMessagePhoto#600db6e: field thumbnail: %w", err) + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field thumbnail: %w", err) } b.Comma() b.FieldStart("added_sticker_file_ids") @@ -1631,11 +1635,16 @@ func (i *InputMessagePhoto) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("caption") if err := i.Caption.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode inputMessagePhoto#600db6e: field caption: %w", err) + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field caption: %w", err) } b.Comma() - b.FieldStart("self_destruct_time") - b.PutInt32(i.SelfDestructTime) + b.FieldStart("self_destruct_type") + if i.SelfDestructType == nil { + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field self_destruct_type is nil") + } + if err := i.SelfDestructType.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode inputMessagePhoto#83234a22: field self_destruct_type: %w", err) + } b.Comma() b.FieldStart("has_spoiler") b.PutBool(i.HasSpoiler) @@ -1648,62 +1657,62 @@ func (i *InputMessagePhoto) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (i *InputMessagePhoto) DecodeTDLibJSON(b tdjson.Decoder) error { if i == nil { - return fmt.Errorf("can't decode inputMessagePhoto#600db6e to nil") + return fmt.Errorf("can't decode inputMessagePhoto#83234a22 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("inputMessagePhoto"); err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: %w", err) } case "photo": value, err := DecodeTDLibJSONInputFile(b) if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field photo: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field photo: %w", err) } i.Photo = value case "thumbnail": if err := i.Thumbnail.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field thumbnail: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field thumbnail: %w", err) } case "added_sticker_file_ids": if err := b.Arr(func(b tdjson.Decoder) error { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field added_sticker_file_ids: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field added_sticker_file_ids: %w", err) } i.AddedStickerFileIDs = append(i.AddedStickerFileIDs, value) return nil }); err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field added_sticker_file_ids: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field added_sticker_file_ids: %w", err) } case "width": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field width: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field width: %w", err) } i.Width = value case "height": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field height: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field height: %w", err) } i.Height = value case "caption": if err := i.Caption.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field caption: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field caption: %w", err) } - case "self_destruct_time": - value, err := b.Int32() + case "self_destruct_type": + value, err := DecodeTDLibJSONMessageSelfDestructType(b) if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field self_destruct_time: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field self_destruct_type: %w", err) } - i.SelfDestructTime = value + i.SelfDestructType = value case "has_spoiler": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode inputMessagePhoto#600db6e: field has_spoiler: %w", err) + return fmt.Errorf("unable to decode inputMessagePhoto#83234a22: field has_spoiler: %w", err) } i.HasSpoiler = value default: @@ -1761,12 +1770,12 @@ func (i *InputMessagePhoto) GetCaption() (value FormattedText) { return i.Caption } -// GetSelfDestructTime returns value of SelfDestructTime field. -func (i *InputMessagePhoto) GetSelfDestructTime() (value int32) { +// GetSelfDestructType returns value of SelfDestructType field. +func (i *InputMessagePhoto) GetSelfDestructType() (value MessageSelfDestructTypeClass) { if i == nil { return } - return i.SelfDestructTime + return i.SelfDestructType } // GetHasSpoiler returns value of HasSpoiler field. @@ -2089,7 +2098,7 @@ func (i *InputMessageSticker) GetEmoji() (value string) { return i.Emoji } -// InputMessageVideo represents TL type `inputMessageVideo#a2d4e2b2`. +// InputMessageVideo represents TL type `inputMessageVideo#f17014da`. type InputMessageVideo struct { // Video to be sent Video InputFileClass @@ -2108,16 +2117,15 @@ type InputMessageVideo struct { // Video caption; pass null to use an empty caption; // 0-getOption("message_caption_length_max") characters Caption FormattedText - // Video self-destruct time, in seconds (0-60). A non-zero self-destruct time can be - // specified only in private chats - SelfDestructTime int32 + // Video self-destruct type; pass null if none; private chats only + SelfDestructType MessageSelfDestructTypeClass // True, if the video preview must be covered by a spoiler animation; not supported in // secret chats HasSpoiler bool } // InputMessageVideoTypeID is TL type id of InputMessageVideo. -const InputMessageVideoTypeID = 0xa2d4e2b2 +const InputMessageVideoTypeID = 0xf17014da // construct implements constructor of InputMessageContentClass. func (i InputMessageVideo) construct() InputMessageContentClass { return &i } @@ -2160,7 +2168,7 @@ func (i *InputMessageVideo) Zero() bool { if !(i.Caption.Zero()) { return false } - if !(i.SelfDestructTime == 0) { + if !(i.SelfDestructType == nil) { return false } if !(i.HasSpoiler == false) { @@ -2235,8 +2243,8 @@ func (i *InputMessageVideo) TypeInfo() tdp.Type { SchemaName: "caption", }, { - Name: "SelfDestructTime", - SchemaName: "self_destruct_time", + Name: "SelfDestructType", + SchemaName: "self_destruct_type", }, { Name: "HasSpoiler", @@ -2249,7 +2257,7 @@ func (i *InputMessageVideo) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (i *InputMessageVideo) Encode(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't encode inputMessageVideo#a2d4e2b2 as nil") + return fmt.Errorf("can't encode inputMessageVideo#f17014da as nil") } b.PutID(InputMessageVideoTypeID) return i.EncodeBare(b) @@ -2258,16 +2266,16 @@ func (i *InputMessageVideo) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (i *InputMessageVideo) EncodeBare(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't encode inputMessageVideo#a2d4e2b2 as nil") + return fmt.Errorf("can't encode inputMessageVideo#f17014da as nil") } if i.Video == nil { - return fmt.Errorf("unable to encode inputMessageVideo#a2d4e2b2: field video is nil") + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field video is nil") } if err := i.Video.Encode(b); err != nil { - return fmt.Errorf("unable to encode inputMessageVideo#a2d4e2b2: field video: %w", err) + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field video: %w", err) } if err := i.Thumbnail.Encode(b); err != nil { - return fmt.Errorf("unable to encode inputMessageVideo#a2d4e2b2: field thumbnail: %w", err) + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field thumbnail: %w", err) } b.PutInt(len(i.AddedStickerFileIDs)) for _, v := range i.AddedStickerFileIDs { @@ -2278,9 +2286,14 @@ func (i *InputMessageVideo) EncodeBare(b *bin.Buffer) error { b.PutInt32(i.Height) b.PutBool(i.SupportsStreaming) if err := i.Caption.Encode(b); err != nil { - return fmt.Errorf("unable to encode inputMessageVideo#a2d4e2b2: field caption: %w", err) + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field caption: %w", err) + } + if i.SelfDestructType == nil { + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field self_destruct_type is nil") + } + if err := i.SelfDestructType.Encode(b); err != nil { + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field self_destruct_type: %w", err) } - b.PutInt32(i.SelfDestructTime) b.PutBool(i.HasSpoiler) return nil } @@ -2288,10 +2301,10 @@ func (i *InputMessageVideo) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (i *InputMessageVideo) Decode(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't decode inputMessageVideo#a2d4e2b2 to nil") + return fmt.Errorf("can't decode inputMessageVideo#f17014da to nil") } if err := b.ConsumeID(InputMessageVideoTypeID); err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: %w", err) } return i.DecodeBare(b) } @@ -2299,24 +2312,24 @@ func (i *InputMessageVideo) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (i *InputMessageVideo) DecodeBare(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't decode inputMessageVideo#a2d4e2b2 to nil") + return fmt.Errorf("can't decode inputMessageVideo#f17014da to nil") } { value, err := DecodeInputFile(b) if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field video: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field video: %w", err) } i.Video = value } { if err := i.Thumbnail.Decode(b); err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field thumbnail: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field thumbnail: %w", err) } } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field added_sticker_file_ids: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field added_sticker_file_ids: %w", err) } if headerLen > 0 { @@ -2325,7 +2338,7 @@ func (i *InputMessageVideo) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field added_sticker_file_ids: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field added_sticker_file_ids: %w", err) } i.AddedStickerFileIDs = append(i.AddedStickerFileIDs, value) } @@ -2333,47 +2346,47 @@ func (i *InputMessageVideo) DecodeBare(b *bin.Buffer) error { { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field duration: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field duration: %w", err) } i.Duration = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field width: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field width: %w", err) } i.Width = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field height: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field height: %w", err) } i.Height = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field supports_streaming: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field supports_streaming: %w", err) } i.SupportsStreaming = value } { if err := i.Caption.Decode(b); err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field caption: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field caption: %w", err) } } { - value, err := b.Int32() + value, err := DecodeMessageSelfDestructType(b) if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field self_destruct_time: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field self_destruct_type: %w", err) } - i.SelfDestructTime = value + i.SelfDestructType = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field has_spoiler: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field has_spoiler: %w", err) } i.HasSpoiler = value } @@ -2383,22 +2396,22 @@ func (i *InputMessageVideo) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (i *InputMessageVideo) EncodeTDLibJSON(b tdjson.Encoder) error { if i == nil { - return fmt.Errorf("can't encode inputMessageVideo#a2d4e2b2 as nil") + return fmt.Errorf("can't encode inputMessageVideo#f17014da as nil") } b.ObjStart() b.PutID("inputMessageVideo") b.Comma() b.FieldStart("video") if i.Video == nil { - return fmt.Errorf("unable to encode inputMessageVideo#a2d4e2b2: field video is nil") + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field video is nil") } if err := i.Video.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode inputMessageVideo#a2d4e2b2: field video: %w", err) + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field video: %w", err) } b.Comma() b.FieldStart("thumbnail") if err := i.Thumbnail.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode inputMessageVideo#a2d4e2b2: field thumbnail: %w", err) + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field thumbnail: %w", err) } b.Comma() b.FieldStart("added_sticker_file_ids") @@ -2424,11 +2437,16 @@ func (i *InputMessageVideo) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("caption") if err := i.Caption.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode inputMessageVideo#a2d4e2b2: field caption: %w", err) + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field caption: %w", err) } b.Comma() - b.FieldStart("self_destruct_time") - b.PutInt32(i.SelfDestructTime) + b.FieldStart("self_destruct_type") + if i.SelfDestructType == nil { + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field self_destruct_type is nil") + } + if err := i.SelfDestructType.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode inputMessageVideo#f17014da: field self_destruct_type: %w", err) + } b.Comma() b.FieldStart("has_spoiler") b.PutBool(i.HasSpoiler) @@ -2441,74 +2459,74 @@ func (i *InputMessageVideo) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (i *InputMessageVideo) DecodeTDLibJSON(b tdjson.Decoder) error { if i == nil { - return fmt.Errorf("can't decode inputMessageVideo#a2d4e2b2 to nil") + return fmt.Errorf("can't decode inputMessageVideo#f17014da to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("inputMessageVideo"); err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: %w", err) } case "video": value, err := DecodeTDLibJSONInputFile(b) if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field video: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field video: %w", err) } i.Video = value case "thumbnail": if err := i.Thumbnail.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field thumbnail: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field thumbnail: %w", err) } case "added_sticker_file_ids": if err := b.Arr(func(b tdjson.Decoder) error { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field added_sticker_file_ids: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field added_sticker_file_ids: %w", err) } i.AddedStickerFileIDs = append(i.AddedStickerFileIDs, value) return nil }); err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field added_sticker_file_ids: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field added_sticker_file_ids: %w", err) } case "duration": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field duration: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field duration: %w", err) } i.Duration = value case "width": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field width: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field width: %w", err) } i.Width = value case "height": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field height: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field height: %w", err) } i.Height = value case "supports_streaming": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field supports_streaming: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field supports_streaming: %w", err) } i.SupportsStreaming = value case "caption": if err := i.Caption.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field caption: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field caption: %w", err) } - case "self_destruct_time": - value, err := b.Int32() + case "self_destruct_type": + value, err := DecodeTDLibJSONMessageSelfDestructType(b) if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field self_destruct_time: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field self_destruct_type: %w", err) } - i.SelfDestructTime = value + i.SelfDestructType = value case "has_spoiler": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode inputMessageVideo#a2d4e2b2: field has_spoiler: %w", err) + return fmt.Errorf("unable to decode inputMessageVideo#f17014da: field has_spoiler: %w", err) } i.HasSpoiler = value default: @@ -2582,12 +2600,12 @@ func (i *InputMessageVideo) GetCaption() (value FormattedText) { return i.Caption } -// GetSelfDestructTime returns value of SelfDestructTime field. -func (i *InputMessageVideo) GetSelfDestructTime() (value int32) { +// GetSelfDestructType returns value of SelfDestructType field. +func (i *InputMessageVideo) GetSelfDestructType() (value MessageSelfDestructTypeClass) { if i == nil { return } - return i.SelfDestructTime + return i.SelfDestructType } // GetHasSpoiler returns value of HasSpoiler field. @@ -5603,9 +5621,9 @@ const InputMessageContentClassName = "InputMessageContent" // case *tdapi.InputMessageAnimation: // inputMessageAnimation#cd68f5fe // case *tdapi.InputMessageAudio: // inputMessageAudio#daa400b2 // case *tdapi.InputMessageDocument: // inputMessageDocument#615b72b9 -// case *tdapi.InputMessagePhoto: // inputMessagePhoto#600db6e +// case *tdapi.InputMessagePhoto: // inputMessagePhoto#83234a22 // case *tdapi.InputMessageSticker: // inputMessageSticker#3ff1b6f9 -// case *tdapi.InputMessageVideo: // inputMessageVideo#a2d4e2b2 +// case *tdapi.InputMessageVideo: // inputMessageVideo#f17014da // case *tdapi.InputMessageVideoNote: // inputMessageVideoNote#10a2dcfb // case *tdapi.InputMessageVoiceNote: // inputMessageVoiceNote#7f58b3e9 // case *tdapi.InputMessageLocation: // inputMessageLocation#26aae970 @@ -5677,7 +5695,7 @@ func DecodeInputMessageContent(buf *bin.Buffer) (InputMessageContentClass, error } return &v, nil case InputMessagePhotoTypeID: - // Decoding inputMessagePhoto#600db6e. + // Decoding inputMessagePhoto#83234a22. v := InputMessagePhoto{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode InputMessageContentClass: %w", err) @@ -5691,7 +5709,7 @@ func DecodeInputMessageContent(buf *bin.Buffer) (InputMessageContentClass, error } return &v, nil case InputMessageVideoTypeID: - // Decoding inputMessageVideo#a2d4e2b2. + // Decoding inputMessageVideo#f17014da. v := InputMessageVideo{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode InputMessageContentClass: %w", err) @@ -5815,7 +5833,7 @@ func DecodeTDLibJSONInputMessageContent(buf tdjson.Decoder) (InputMessageContent } return &v, nil case "inputMessagePhoto": - // Decoding inputMessagePhoto#600db6e. + // Decoding inputMessagePhoto#83234a22. v := InputMessagePhoto{} if err := v.DecodeTDLibJSON(buf); err != nil { return nil, fmt.Errorf("unable to decode InputMessageContentClass: %w", err) @@ -5829,7 +5847,7 @@ func DecodeTDLibJSONInputMessageContent(buf tdjson.Decoder) (InputMessageContent } return &v, nil case "inputMessageVideo": - // Decoding inputMessageVideo#a2d4e2b2. + // Decoding inputMessageVideo#f17014da. v := InputMessageVideo{} if err := v.DecodeTDLibJSON(buf); err != nil { return nil, fmt.Errorf("unable to decode InputMessageContentClass: %w", err) diff --git a/tdapi/tl_internal_link_type_gen.go b/tdapi/tl_internal_link_type_gen.go index 6d3f06ea75..0163191eaa 100644 --- a/tdapi/tl_internal_link_type_gen.go +++ b/tdapi/tl_internal_link_type_gen.go @@ -4298,7 +4298,7 @@ func (i *InternalLinkTypePrivacyAndSecuritySettings) DecodeTDLibJSON(b tdjson.De // InternalLinkTypeProxy represents TL type `internalLinkTypeProxy#b1b12cea`. type InternalLinkTypeProxy struct { - // Proxy server IP address + // Proxy server domain or IP address Server string // Proxy server port Port int32 @@ -5099,6 +5099,206 @@ func (i *InternalLinkTypeSettings) DecodeTDLibJSON(b tdjson.Decoder) error { }) } +// InternalLinkTypeSideMenuBot represents TL type `internalLinkTypeSideMenuBot#a260e77d`. +type InternalLinkTypeSideMenuBot struct { + // Username of the bot + BotUsername string + // URL to be passed to getWebAppUrl + URL string +} + +// InternalLinkTypeSideMenuBotTypeID is TL type id of InternalLinkTypeSideMenuBot. +const InternalLinkTypeSideMenuBotTypeID = 0xa260e77d + +// construct implements constructor of InternalLinkTypeClass. +func (i InternalLinkTypeSideMenuBot) construct() InternalLinkTypeClass { return &i } + +// Ensuring interfaces in compile-time for InternalLinkTypeSideMenuBot. +var ( + _ bin.Encoder = &InternalLinkTypeSideMenuBot{} + _ bin.Decoder = &InternalLinkTypeSideMenuBot{} + _ bin.BareEncoder = &InternalLinkTypeSideMenuBot{} + _ bin.BareDecoder = &InternalLinkTypeSideMenuBot{} + + _ InternalLinkTypeClass = &InternalLinkTypeSideMenuBot{} +) + +func (i *InternalLinkTypeSideMenuBot) Zero() bool { + if i == nil { + return true + } + if !(i.BotUsername == "") { + return false + } + if !(i.URL == "") { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (i *InternalLinkTypeSideMenuBot) String() string { + if i == nil { + return "InternalLinkTypeSideMenuBot(nil)" + } + type Alias InternalLinkTypeSideMenuBot + return fmt.Sprintf("InternalLinkTypeSideMenuBot%+v", Alias(*i)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*InternalLinkTypeSideMenuBot) TypeID() uint32 { + return InternalLinkTypeSideMenuBotTypeID +} + +// TypeName returns name of type in TL schema. +func (*InternalLinkTypeSideMenuBot) TypeName() string { + return "internalLinkTypeSideMenuBot" +} + +// TypeInfo returns info about TL type. +func (i *InternalLinkTypeSideMenuBot) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "internalLinkTypeSideMenuBot", + ID: InternalLinkTypeSideMenuBotTypeID, + } + if i == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "BotUsername", + SchemaName: "bot_username", + }, + { + Name: "URL", + SchemaName: "url", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (i *InternalLinkTypeSideMenuBot) Encode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode internalLinkTypeSideMenuBot#a260e77d as nil") + } + b.PutID(InternalLinkTypeSideMenuBotTypeID) + return i.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (i *InternalLinkTypeSideMenuBot) EncodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode internalLinkTypeSideMenuBot#a260e77d as nil") + } + b.PutString(i.BotUsername) + b.PutString(i.URL) + return nil +} + +// Decode implements bin.Decoder. +func (i *InternalLinkTypeSideMenuBot) Decode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode internalLinkTypeSideMenuBot#a260e77d to nil") + } + if err := b.ConsumeID(InternalLinkTypeSideMenuBotTypeID); err != nil { + return fmt.Errorf("unable to decode internalLinkTypeSideMenuBot#a260e77d: %w", err) + } + return i.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (i *InternalLinkTypeSideMenuBot) DecodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode internalLinkTypeSideMenuBot#a260e77d to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode internalLinkTypeSideMenuBot#a260e77d: field bot_username: %w", err) + } + i.BotUsername = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode internalLinkTypeSideMenuBot#a260e77d: field url: %w", err) + } + i.URL = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (i *InternalLinkTypeSideMenuBot) EncodeTDLibJSON(b tdjson.Encoder) error { + if i == nil { + return fmt.Errorf("can't encode internalLinkTypeSideMenuBot#a260e77d as nil") + } + b.ObjStart() + b.PutID("internalLinkTypeSideMenuBot") + b.Comma() + b.FieldStart("bot_username") + b.PutString(i.BotUsername) + b.Comma() + b.FieldStart("url") + b.PutString(i.URL) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (i *InternalLinkTypeSideMenuBot) DecodeTDLibJSON(b tdjson.Decoder) error { + if i == nil { + return fmt.Errorf("can't decode internalLinkTypeSideMenuBot#a260e77d to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("internalLinkTypeSideMenuBot"); err != nil { + return fmt.Errorf("unable to decode internalLinkTypeSideMenuBot#a260e77d: %w", err) + } + case "bot_username": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode internalLinkTypeSideMenuBot#a260e77d: field bot_username: %w", err) + } + i.BotUsername = value + case "url": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode internalLinkTypeSideMenuBot#a260e77d: field url: %w", err) + } + i.URL = value + default: + return b.Skip() + } + return nil + }) +} + +// GetBotUsername returns value of BotUsername field. +func (i *InternalLinkTypeSideMenuBot) GetBotUsername() (value string) { + if i == nil { + return + } + return i.BotUsername +} + +// GetURL returns value of URL field. +func (i *InternalLinkTypeSideMenuBot) GetURL() (value string) { + if i == nil { + return + } + return i.URL +} + // InternalLinkTypeStickerSet represents TL type `internalLinkTypeStickerSet#a1464fa2`. type InternalLinkTypeStickerSet struct { // Name of the sticker set @@ -6936,6 +7136,7 @@ const InternalLinkTypeClassName = "InternalLinkType" // case *tdapi.InternalLinkTypeQrCodeAuthentication: // internalLinkTypeQrCodeAuthentication#bf121924 // case *tdapi.InternalLinkTypeRestorePurchases: // internalLinkTypeRestorePurchases#24203483 // case *tdapi.InternalLinkTypeSettings: // internalLinkTypeSettings#177545b4 +// case *tdapi.InternalLinkTypeSideMenuBot: // internalLinkTypeSideMenuBot#a260e77d // case *tdapi.InternalLinkTypeStickerSet: // internalLinkTypeStickerSet#a1464fa2 // case *tdapi.InternalLinkTypeStory: // internalLinkTypeStory#57bce647 // case *tdapi.InternalLinkTypeTheme: // internalLinkTypeTheme#f405f807 @@ -7180,6 +7381,13 @@ func DecodeInternalLinkType(buf *bin.Buffer) (InternalLinkTypeClass, error) { return nil, fmt.Errorf("unable to decode InternalLinkTypeClass: %w", err) } return &v, nil + case InternalLinkTypeSideMenuBotTypeID: + // Decoding internalLinkTypeSideMenuBot#a260e77d. + v := InternalLinkTypeSideMenuBot{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode InternalLinkTypeClass: %w", err) + } + return &v, nil case InternalLinkTypeStickerSetTypeID: // Decoding internalLinkTypeStickerSet#a1464fa2. v := InternalLinkTypeStickerSet{} @@ -7465,6 +7673,13 @@ func DecodeTDLibJSONInternalLinkType(buf tdjson.Decoder) (InternalLinkTypeClass, return nil, fmt.Errorf("unable to decode InternalLinkTypeClass: %w", err) } return &v, nil + case "internalLinkTypeSideMenuBot": + // Decoding internalLinkTypeSideMenuBot#a260e77d. + v := InternalLinkTypeSideMenuBot{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode InternalLinkTypeClass: %w", err) + } + return &v, nil case "internalLinkTypeStickerSet": // Decoding internalLinkTypeStickerSet#a1464fa2. v := InternalLinkTypeStickerSet{} diff --git a/tdapi/tl_invite_link_chat_type_gen.go b/tdapi/tl_invite_link_chat_type_gen.go new file mode 100644 index 0000000000..ae5583ea82 --- /dev/null +++ b/tdapi/tl_invite_link_chat_type_gen.go @@ -0,0 +1,577 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// InviteLinkChatTypeBasicGroup represents TL type `inviteLinkChatTypeBasicGroup#4d43c5ee`. +type InviteLinkChatTypeBasicGroup struct { +} + +// InviteLinkChatTypeBasicGroupTypeID is TL type id of InviteLinkChatTypeBasicGroup. +const InviteLinkChatTypeBasicGroupTypeID = 0x4d43c5ee + +// construct implements constructor of InviteLinkChatTypeClass. +func (i InviteLinkChatTypeBasicGroup) construct() InviteLinkChatTypeClass { return &i } + +// Ensuring interfaces in compile-time for InviteLinkChatTypeBasicGroup. +var ( + _ bin.Encoder = &InviteLinkChatTypeBasicGroup{} + _ bin.Decoder = &InviteLinkChatTypeBasicGroup{} + _ bin.BareEncoder = &InviteLinkChatTypeBasicGroup{} + _ bin.BareDecoder = &InviteLinkChatTypeBasicGroup{} + + _ InviteLinkChatTypeClass = &InviteLinkChatTypeBasicGroup{} +) + +func (i *InviteLinkChatTypeBasicGroup) Zero() bool { + if i == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (i *InviteLinkChatTypeBasicGroup) String() string { + if i == nil { + return "InviteLinkChatTypeBasicGroup(nil)" + } + type Alias InviteLinkChatTypeBasicGroup + return fmt.Sprintf("InviteLinkChatTypeBasicGroup%+v", Alias(*i)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*InviteLinkChatTypeBasicGroup) TypeID() uint32 { + return InviteLinkChatTypeBasicGroupTypeID +} + +// TypeName returns name of type in TL schema. +func (*InviteLinkChatTypeBasicGroup) TypeName() string { + return "inviteLinkChatTypeBasicGroup" +} + +// TypeInfo returns info about TL type. +func (i *InviteLinkChatTypeBasicGroup) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "inviteLinkChatTypeBasicGroup", + ID: InviteLinkChatTypeBasicGroupTypeID, + } + if i == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (i *InviteLinkChatTypeBasicGroup) Encode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeBasicGroup#4d43c5ee as nil") + } + b.PutID(InviteLinkChatTypeBasicGroupTypeID) + return i.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (i *InviteLinkChatTypeBasicGroup) EncodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeBasicGroup#4d43c5ee as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (i *InviteLinkChatTypeBasicGroup) Decode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeBasicGroup#4d43c5ee to nil") + } + if err := b.ConsumeID(InviteLinkChatTypeBasicGroupTypeID); err != nil { + return fmt.Errorf("unable to decode inviteLinkChatTypeBasicGroup#4d43c5ee: %w", err) + } + return i.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (i *InviteLinkChatTypeBasicGroup) DecodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeBasicGroup#4d43c5ee to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (i *InviteLinkChatTypeBasicGroup) EncodeTDLibJSON(b tdjson.Encoder) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeBasicGroup#4d43c5ee as nil") + } + b.ObjStart() + b.PutID("inviteLinkChatTypeBasicGroup") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (i *InviteLinkChatTypeBasicGroup) DecodeTDLibJSON(b tdjson.Decoder) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeBasicGroup#4d43c5ee to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("inviteLinkChatTypeBasicGroup"); err != nil { + return fmt.Errorf("unable to decode inviteLinkChatTypeBasicGroup#4d43c5ee: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// InviteLinkChatTypeSupergroup represents TL type `inviteLinkChatTypeSupergroup#3de86758`. +type InviteLinkChatTypeSupergroup struct { +} + +// InviteLinkChatTypeSupergroupTypeID is TL type id of InviteLinkChatTypeSupergroup. +const InviteLinkChatTypeSupergroupTypeID = 0x3de86758 + +// construct implements constructor of InviteLinkChatTypeClass. +func (i InviteLinkChatTypeSupergroup) construct() InviteLinkChatTypeClass { return &i } + +// Ensuring interfaces in compile-time for InviteLinkChatTypeSupergroup. +var ( + _ bin.Encoder = &InviteLinkChatTypeSupergroup{} + _ bin.Decoder = &InviteLinkChatTypeSupergroup{} + _ bin.BareEncoder = &InviteLinkChatTypeSupergroup{} + _ bin.BareDecoder = &InviteLinkChatTypeSupergroup{} + + _ InviteLinkChatTypeClass = &InviteLinkChatTypeSupergroup{} +) + +func (i *InviteLinkChatTypeSupergroup) Zero() bool { + if i == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (i *InviteLinkChatTypeSupergroup) String() string { + if i == nil { + return "InviteLinkChatTypeSupergroup(nil)" + } + type Alias InviteLinkChatTypeSupergroup + return fmt.Sprintf("InviteLinkChatTypeSupergroup%+v", Alias(*i)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*InviteLinkChatTypeSupergroup) TypeID() uint32 { + return InviteLinkChatTypeSupergroupTypeID +} + +// TypeName returns name of type in TL schema. +func (*InviteLinkChatTypeSupergroup) TypeName() string { + return "inviteLinkChatTypeSupergroup" +} + +// TypeInfo returns info about TL type. +func (i *InviteLinkChatTypeSupergroup) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "inviteLinkChatTypeSupergroup", + ID: InviteLinkChatTypeSupergroupTypeID, + } + if i == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (i *InviteLinkChatTypeSupergroup) Encode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeSupergroup#3de86758 as nil") + } + b.PutID(InviteLinkChatTypeSupergroupTypeID) + return i.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (i *InviteLinkChatTypeSupergroup) EncodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeSupergroup#3de86758 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (i *InviteLinkChatTypeSupergroup) Decode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeSupergroup#3de86758 to nil") + } + if err := b.ConsumeID(InviteLinkChatTypeSupergroupTypeID); err != nil { + return fmt.Errorf("unable to decode inviteLinkChatTypeSupergroup#3de86758: %w", err) + } + return i.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (i *InviteLinkChatTypeSupergroup) DecodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeSupergroup#3de86758 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (i *InviteLinkChatTypeSupergroup) EncodeTDLibJSON(b tdjson.Encoder) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeSupergroup#3de86758 as nil") + } + b.ObjStart() + b.PutID("inviteLinkChatTypeSupergroup") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (i *InviteLinkChatTypeSupergroup) DecodeTDLibJSON(b tdjson.Decoder) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeSupergroup#3de86758 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("inviteLinkChatTypeSupergroup"); err != nil { + return fmt.Errorf("unable to decode inviteLinkChatTypeSupergroup#3de86758: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// InviteLinkChatTypeChannel represents TL type `inviteLinkChatTypeChannel#3012ef0b`. +type InviteLinkChatTypeChannel struct { +} + +// InviteLinkChatTypeChannelTypeID is TL type id of InviteLinkChatTypeChannel. +const InviteLinkChatTypeChannelTypeID = 0x3012ef0b + +// construct implements constructor of InviteLinkChatTypeClass. +func (i InviteLinkChatTypeChannel) construct() InviteLinkChatTypeClass { return &i } + +// Ensuring interfaces in compile-time for InviteLinkChatTypeChannel. +var ( + _ bin.Encoder = &InviteLinkChatTypeChannel{} + _ bin.Decoder = &InviteLinkChatTypeChannel{} + _ bin.BareEncoder = &InviteLinkChatTypeChannel{} + _ bin.BareDecoder = &InviteLinkChatTypeChannel{} + + _ InviteLinkChatTypeClass = &InviteLinkChatTypeChannel{} +) + +func (i *InviteLinkChatTypeChannel) Zero() bool { + if i == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (i *InviteLinkChatTypeChannel) String() string { + if i == nil { + return "InviteLinkChatTypeChannel(nil)" + } + type Alias InviteLinkChatTypeChannel + return fmt.Sprintf("InviteLinkChatTypeChannel%+v", Alias(*i)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*InviteLinkChatTypeChannel) TypeID() uint32 { + return InviteLinkChatTypeChannelTypeID +} + +// TypeName returns name of type in TL schema. +func (*InviteLinkChatTypeChannel) TypeName() string { + return "inviteLinkChatTypeChannel" +} + +// TypeInfo returns info about TL type. +func (i *InviteLinkChatTypeChannel) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "inviteLinkChatTypeChannel", + ID: InviteLinkChatTypeChannelTypeID, + } + if i == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (i *InviteLinkChatTypeChannel) Encode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeChannel#3012ef0b as nil") + } + b.PutID(InviteLinkChatTypeChannelTypeID) + return i.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (i *InviteLinkChatTypeChannel) EncodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeChannel#3012ef0b as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (i *InviteLinkChatTypeChannel) Decode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeChannel#3012ef0b to nil") + } + if err := b.ConsumeID(InviteLinkChatTypeChannelTypeID); err != nil { + return fmt.Errorf("unable to decode inviteLinkChatTypeChannel#3012ef0b: %w", err) + } + return i.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (i *InviteLinkChatTypeChannel) DecodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeChannel#3012ef0b to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (i *InviteLinkChatTypeChannel) EncodeTDLibJSON(b tdjson.Encoder) error { + if i == nil { + return fmt.Errorf("can't encode inviteLinkChatTypeChannel#3012ef0b as nil") + } + b.ObjStart() + b.PutID("inviteLinkChatTypeChannel") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (i *InviteLinkChatTypeChannel) DecodeTDLibJSON(b tdjson.Decoder) error { + if i == nil { + return fmt.Errorf("can't decode inviteLinkChatTypeChannel#3012ef0b to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("inviteLinkChatTypeChannel"); err != nil { + return fmt.Errorf("unable to decode inviteLinkChatTypeChannel#3012ef0b: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// InviteLinkChatTypeClassName is schema name of InviteLinkChatTypeClass. +const InviteLinkChatTypeClassName = "InviteLinkChatType" + +// InviteLinkChatTypeClass represents InviteLinkChatType generic type. +// +// Example: +// +// g, err := tdapi.DecodeInviteLinkChatType(buf) +// if err != nil { +// panic(err) +// } +// switch v := g.(type) { +// case *tdapi.InviteLinkChatTypeBasicGroup: // inviteLinkChatTypeBasicGroup#4d43c5ee +// case *tdapi.InviteLinkChatTypeSupergroup: // inviteLinkChatTypeSupergroup#3de86758 +// case *tdapi.InviteLinkChatTypeChannel: // inviteLinkChatTypeChannel#3012ef0b +// default: panic(v) +// } +type InviteLinkChatTypeClass interface { + bin.Encoder + bin.Decoder + bin.BareEncoder + bin.BareDecoder + construct() InviteLinkChatTypeClass + + // TypeID returns type id in TL schema. + // + // See https://core.telegram.org/mtproto/TL-tl#remarks. + TypeID() uint32 + // TypeName returns name of type in TL schema. + TypeName() string + // String implements fmt.Stringer. + String() string + // Zero returns true if current object has a zero value. + Zero() bool + + EncodeTDLibJSON(b tdjson.Encoder) error + DecodeTDLibJSON(b tdjson.Decoder) error +} + +// DecodeInviteLinkChatType implements binary de-serialization for InviteLinkChatTypeClass. +func DecodeInviteLinkChatType(buf *bin.Buffer) (InviteLinkChatTypeClass, error) { + id, err := buf.PeekID() + if err != nil { + return nil, err + } + switch id { + case InviteLinkChatTypeBasicGroupTypeID: + // Decoding inviteLinkChatTypeBasicGroup#4d43c5ee. + v := InviteLinkChatTypeBasicGroup{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode InviteLinkChatTypeClass: %w", err) + } + return &v, nil + case InviteLinkChatTypeSupergroupTypeID: + // Decoding inviteLinkChatTypeSupergroup#3de86758. + v := InviteLinkChatTypeSupergroup{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode InviteLinkChatTypeClass: %w", err) + } + return &v, nil + case InviteLinkChatTypeChannelTypeID: + // Decoding inviteLinkChatTypeChannel#3012ef0b. + v := InviteLinkChatTypeChannel{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode InviteLinkChatTypeClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode InviteLinkChatTypeClass: %w", bin.NewUnexpectedID(id)) + } +} + +// DecodeTDLibJSONInviteLinkChatType implements binary de-serialization for InviteLinkChatTypeClass. +func DecodeTDLibJSONInviteLinkChatType(buf tdjson.Decoder) (InviteLinkChatTypeClass, error) { + id, err := buf.FindTypeID() + if err != nil { + return nil, err + } + switch id { + case "inviteLinkChatTypeBasicGroup": + // Decoding inviteLinkChatTypeBasicGroup#4d43c5ee. + v := InviteLinkChatTypeBasicGroup{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode InviteLinkChatTypeClass: %w", err) + } + return &v, nil + case "inviteLinkChatTypeSupergroup": + // Decoding inviteLinkChatTypeSupergroup#3de86758. + v := InviteLinkChatTypeSupergroup{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode InviteLinkChatTypeClass: %w", err) + } + return &v, nil + case "inviteLinkChatTypeChannel": + // Decoding inviteLinkChatTypeChannel#3012ef0b. + v := InviteLinkChatTypeChannel{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode InviteLinkChatTypeClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode InviteLinkChatTypeClass: %w", tdjson.NewUnexpectedID(id)) + } +} + +// InviteLinkChatType boxes the InviteLinkChatTypeClass providing a helper. +type InviteLinkChatTypeBox struct { + InviteLinkChatType InviteLinkChatTypeClass +} + +// Decode implements bin.Decoder for InviteLinkChatTypeBox. +func (b *InviteLinkChatTypeBox) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("unable to decode InviteLinkChatTypeBox to nil") + } + v, err := DecodeInviteLinkChatType(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.InviteLinkChatType = v + return nil +} + +// Encode implements bin.Encode for InviteLinkChatTypeBox. +func (b *InviteLinkChatTypeBox) Encode(buf *bin.Buffer) error { + if b == nil || b.InviteLinkChatType == nil { + return fmt.Errorf("unable to encode InviteLinkChatTypeClass as nil") + } + return b.InviteLinkChatType.Encode(buf) +} + +// DecodeTDLibJSON implements bin.Decoder for InviteLinkChatTypeBox. +func (b *InviteLinkChatTypeBox) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("unable to decode InviteLinkChatTypeBox to nil") + } + v, err := DecodeTDLibJSONInviteLinkChatType(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.InviteLinkChatType = v + return nil +} + +// EncodeTDLibJSON implements bin.Encode for InviteLinkChatTypeBox. +func (b *InviteLinkChatTypeBox) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil || b.InviteLinkChatType == nil { + return fmt.Errorf("unable to encode InviteLinkChatTypeClass as nil") + } + return b.InviteLinkChatType.EncodeTDLibJSON(buf) +} diff --git a/tdapi/tl_message_gen.go b/tdapi/tl_message_gen.go index 33259ccb61..374d21726b 100644 --- a/tdapi/tl_message_gen.go +++ b/tdapi/tl_message_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// Message represents TL type `message#e285e28a`. +// Message represents TL type `message#a516cc02`. type Message struct { // Message identifier; unique for the chat to which the message belongs ID int64 @@ -102,16 +102,13 @@ type Message struct { // If non-zero, the identifier of the message thread the message belongs to; unique // within the chat to which the message belongs MessageThreadID int64 - // The message's self-destruct time, in seconds; 0 if none. TDLib will send - // updateDeleteMessages or updateMessageContent once the time expires - SelfDestructTime int32 - // Time left before the message self-destruct timer expires, in seconds. If the - // self-destruct timer isn't started yet, equals to the value of the self_destruct_time - // field + // The message's self-destruct type; may be null if none + SelfDestructType MessageSelfDestructTypeClass + // Time left before the message self-destruct timer expires, in seconds; 0 if + // self-desctruction isn't scheduled yet SelfDestructIn float64 // Time left before the message will be automatically deleted by message_auto_delete_time - // setting of the chat, in seconds; 0 if never. TDLib will send updateDeleteMessages or - // updateMessageContent once the time expires + // setting of the chat, in seconds; 0 if never AutoDeleteIn float64 // If non-zero, the user identifier of the bot through which this message was sent ViaBotUserID int64 @@ -130,7 +127,7 @@ type Message struct { } // MessageTypeID is TL type id of Message. -const MessageTypeID = 0xe285e28a +const MessageTypeID = 0xa516cc02 // Ensuring interfaces in compile-time for Message. var ( @@ -231,7 +228,7 @@ func (m *Message) Zero() bool { if !(m.MessageThreadID == 0) { return false } - if !(m.SelfDestructTime == 0) { + if !(m.SelfDestructType == nil) { return false } if !(m.SelfDestructIn == 0) { @@ -411,8 +408,8 @@ func (m *Message) TypeInfo() tdp.Type { SchemaName: "message_thread_id", }, { - Name: "SelfDestructTime", - SchemaName: "self_destruct_time", + Name: "SelfDestructType", + SchemaName: "self_destruct_type", }, { Name: "SelfDestructIn", @@ -453,7 +450,7 @@ func (m *Message) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (m *Message) Encode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode message#e285e28a as nil") + return fmt.Errorf("can't encode message#a516cc02 as nil") } b.PutID(MessageTypeID) return m.EncodeBare(b) @@ -462,27 +459,27 @@ func (m *Message) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (m *Message) EncodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode message#e285e28a as nil") + return fmt.Errorf("can't encode message#a516cc02 as nil") } b.PutInt53(m.ID) if m.SenderID == nil { - return fmt.Errorf("unable to encode message#e285e28a: field sender_id is nil") + return fmt.Errorf("unable to encode message#a516cc02: field sender_id is nil") } if err := m.SenderID.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field sender_id: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field sender_id: %w", err) } b.PutInt53(m.ChatID) if m.SendingState == nil { - return fmt.Errorf("unable to encode message#e285e28a: field sending_state is nil") + return fmt.Errorf("unable to encode message#a516cc02: field sending_state is nil") } if err := m.SendingState.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field sending_state: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field sending_state: %w", err) } if m.SchedulingState == nil { - return fmt.Errorf("unable to encode message#e285e28a: field scheduling_state is nil") + return fmt.Errorf("unable to encode message#a516cc02: field scheduling_state is nil") } if err := m.SchedulingState.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field scheduling_state: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field scheduling_state: %w", err) } b.PutBool(m.IsOutgoing) b.PutBool(m.IsPinned) @@ -504,25 +501,30 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { b.PutInt32(m.Date) b.PutInt32(m.EditDate) if err := m.ForwardInfo.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field forward_info: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field forward_info: %w", err) } if err := m.InteractionInfo.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field interaction_info: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field interaction_info: %w", err) } b.PutInt(len(m.UnreadReactions)) for idx, v := range m.UnreadReactions { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare message#e285e28a: field unread_reactions element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare message#a516cc02: field unread_reactions element with index %d: %w", idx, err) } } if m.ReplyTo == nil { - return fmt.Errorf("unable to encode message#e285e28a: field reply_to is nil") + return fmt.Errorf("unable to encode message#a516cc02: field reply_to is nil") } if err := m.ReplyTo.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field reply_to: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field reply_to: %w", err) } b.PutInt53(m.MessageThreadID) - b.PutInt32(m.SelfDestructTime) + if m.SelfDestructType == nil { + return fmt.Errorf("unable to encode message#a516cc02: field self_destruct_type is nil") + } + if err := m.SelfDestructType.Encode(b); err != nil { + return fmt.Errorf("unable to encode message#a516cc02: field self_destruct_type: %w", err) + } b.PutDouble(m.SelfDestructIn) b.PutDouble(m.AutoDeleteIn) b.PutInt53(m.ViaBotUserID) @@ -530,16 +532,16 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { b.PutLong(m.MediaAlbumID) b.PutString(m.RestrictionReason) if m.Content == nil { - return fmt.Errorf("unable to encode message#e285e28a: field content is nil") + return fmt.Errorf("unable to encode message#a516cc02: field content is nil") } if err := m.Content.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field content: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field content: %w", err) } if m.ReplyMarkup == nil { - return fmt.Errorf("unable to encode message#e285e28a: field reply_markup is nil") + return fmt.Errorf("unable to encode message#a516cc02: field reply_markup is nil") } if err := m.ReplyMarkup.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field reply_markup: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field reply_markup: %w", err) } return nil } @@ -547,10 +549,10 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (m *Message) Decode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode message#e285e28a to nil") + return fmt.Errorf("can't decode message#a516cc02 to nil") } if err := b.ConsumeID(MessageTypeID); err != nil { - return fmt.Errorf("unable to decode message#e285e28a: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: %w", err) } return m.DecodeBare(b) } @@ -558,190 +560,190 @@ func (m *Message) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (m *Message) DecodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode message#e285e28a to nil") + return fmt.Errorf("can't decode message#a516cc02 to nil") } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field id: %w", err) } m.ID = value } { value, err := DecodeMessageSender(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field sender_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field sender_id: %w", err) } m.SenderID = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field chat_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field chat_id: %w", err) } m.ChatID = value } { value, err := DecodeMessageSendingState(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field sending_state: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field sending_state: %w", err) } m.SendingState = value } { value, err := DecodeMessageSchedulingState(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field scheduling_state: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field scheduling_state: %w", err) } m.SchedulingState = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field is_outgoing: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field is_outgoing: %w", err) } m.IsOutgoing = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field is_pinned: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field is_pinned: %w", err) } m.IsPinned = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_edited: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_edited: %w", err) } m.CanBeEdited = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_forwarded: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_forwarded: %w", err) } m.CanBeForwarded = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_saved: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_saved: %w", err) } m.CanBeSaved = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_deleted_only_for_self: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_deleted_only_for_self: %w", err) } m.CanBeDeletedOnlyForSelf = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_deleted_for_all_users: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_deleted_for_all_users: %w", err) } m.CanBeDeletedForAllUsers = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_added_reactions: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_added_reactions: %w", err) } m.CanGetAddedReactions = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_statistics: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_statistics: %w", err) } m.CanGetStatistics = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_message_thread: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_message_thread: %w", err) } m.CanGetMessageThread = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_viewers: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_viewers: %w", err) } m.CanGetViewers = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_media_timestamp_links: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_media_timestamp_links: %w", err) } m.CanGetMediaTimestampLinks = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_report_reactions: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_report_reactions: %w", err) } m.CanReportReactions = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field has_timestamped_media: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field has_timestamped_media: %w", err) } m.HasTimestampedMedia = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field is_channel_post: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field is_channel_post: %w", err) } m.IsChannelPost = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field is_topic_message: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field is_topic_message: %w", err) } m.IsTopicMessage = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field contains_unread_mention: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field contains_unread_mention: %w", err) } m.ContainsUnreadMention = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field date: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field date: %w", err) } m.Date = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field edit_date: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field edit_date: %w", err) } m.EditDate = value } { if err := m.ForwardInfo.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field forward_info: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field forward_info: %w", err) } } { if err := m.InteractionInfo.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field interaction_info: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field interaction_info: %w", err) } } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field unread_reactions: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field unread_reactions: %w", err) } if headerLen > 0 { @@ -750,7 +752,7 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value UnreadReaction if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare message#e285e28a: field unread_reactions: %w", err) + return fmt.Errorf("unable to decode bare message#a516cc02: field unread_reactions: %w", err) } m.UnreadReactions = append(m.UnreadReactions, value) } @@ -758,77 +760,77 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { { value, err := DecodeMessageReplyTo(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field reply_to: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field reply_to: %w", err) } m.ReplyTo = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field message_thread_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field message_thread_id: %w", err) } m.MessageThreadID = value } { - value, err := b.Int32() + value, err := DecodeMessageSelfDestructType(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field self_destruct_time: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field self_destruct_type: %w", err) } - m.SelfDestructTime = value + m.SelfDestructType = value } { value, err := b.Double() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field self_destruct_in: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field self_destruct_in: %w", err) } m.SelfDestructIn = value } { value, err := b.Double() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field auto_delete_in: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field auto_delete_in: %w", err) } m.AutoDeleteIn = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field via_bot_user_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field via_bot_user_id: %w", err) } m.ViaBotUserID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field author_signature: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field author_signature: %w", err) } m.AuthorSignature = value } { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field media_album_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field media_album_id: %w", err) } m.MediaAlbumID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field restriction_reason: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field restriction_reason: %w", err) } m.RestrictionReason = value } { value, err := DecodeMessageContent(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field content: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field content: %w", err) } m.Content = value } { value, err := DecodeReplyMarkup(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field reply_markup: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field reply_markup: %w", err) } m.ReplyMarkup = value } @@ -838,7 +840,7 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { if m == nil { - return fmt.Errorf("can't encode message#e285e28a as nil") + return fmt.Errorf("can't encode message#a516cc02 as nil") } b.ObjStart() b.PutID("message") @@ -848,10 +850,10 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("sender_id") if m.SenderID == nil { - return fmt.Errorf("unable to encode message#e285e28a: field sender_id is nil") + return fmt.Errorf("unable to encode message#a516cc02: field sender_id is nil") } if err := m.SenderID.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field sender_id: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field sender_id: %w", err) } b.Comma() b.FieldStart("chat_id") @@ -859,18 +861,18 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("sending_state") if m.SendingState == nil { - return fmt.Errorf("unable to encode message#e285e28a: field sending_state is nil") + return fmt.Errorf("unable to encode message#a516cc02: field sending_state is nil") } if err := m.SendingState.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field sending_state: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field sending_state: %w", err) } b.Comma() b.FieldStart("scheduling_state") if m.SchedulingState == nil { - return fmt.Errorf("unable to encode message#e285e28a: field scheduling_state is nil") + return fmt.Errorf("unable to encode message#a516cc02: field scheduling_state is nil") } if err := m.SchedulingState.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field scheduling_state: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field scheduling_state: %w", err) } b.Comma() b.FieldStart("is_outgoing") @@ -932,19 +934,19 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("forward_info") if err := m.ForwardInfo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field forward_info: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field forward_info: %w", err) } b.Comma() b.FieldStart("interaction_info") if err := m.InteractionInfo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field interaction_info: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field interaction_info: %w", err) } b.Comma() b.FieldStart("unread_reactions") b.ArrStart() for idx, v := range m.UnreadReactions { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field unread_reactions element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode message#a516cc02: field unread_reactions element with index %d: %w", idx, err) } b.Comma() } @@ -953,17 +955,22 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("reply_to") if m.ReplyTo == nil { - return fmt.Errorf("unable to encode message#e285e28a: field reply_to is nil") + return fmt.Errorf("unable to encode message#a516cc02: field reply_to is nil") } if err := m.ReplyTo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field reply_to: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field reply_to: %w", err) } b.Comma() b.FieldStart("message_thread_id") b.PutInt53(m.MessageThreadID) b.Comma() - b.FieldStart("self_destruct_time") - b.PutInt32(m.SelfDestructTime) + b.FieldStart("self_destruct_type") + if m.SelfDestructType == nil { + return fmt.Errorf("unable to encode message#a516cc02: field self_destruct_type is nil") + } + if err := m.SelfDestructType.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode message#a516cc02: field self_destruct_type: %w", err) + } b.Comma() b.FieldStart("self_destruct_in") b.PutDouble(m.SelfDestructIn) @@ -985,18 +992,18 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("content") if m.Content == nil { - return fmt.Errorf("unable to encode message#e285e28a: field content is nil") + return fmt.Errorf("unable to encode message#a516cc02: field content is nil") } if err := m.Content.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field content: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field content: %w", err) } b.Comma() b.FieldStart("reply_markup") if m.ReplyMarkup == nil { - return fmt.Errorf("unable to encode message#e285e28a: field reply_markup is nil") + return fmt.Errorf("unable to encode message#a516cc02: field reply_markup is nil") } if err := m.ReplyMarkup.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#e285e28a: field reply_markup: %w", err) + return fmt.Errorf("unable to encode message#a516cc02: field reply_markup: %w", err) } b.Comma() b.StripComma() @@ -1007,242 +1014,242 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (m *Message) DecodeTDLibJSON(b tdjson.Decoder) error { if m == nil { - return fmt.Errorf("can't decode message#e285e28a to nil") + return fmt.Errorf("can't decode message#a516cc02 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("message"); err != nil { - return fmt.Errorf("unable to decode message#e285e28a: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: %w", err) } case "id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field id: %w", err) } m.ID = value case "sender_id": value, err := DecodeTDLibJSONMessageSender(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field sender_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field sender_id: %w", err) } m.SenderID = value case "chat_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field chat_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field chat_id: %w", err) } m.ChatID = value case "sending_state": value, err := DecodeTDLibJSONMessageSendingState(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field sending_state: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field sending_state: %w", err) } m.SendingState = value case "scheduling_state": value, err := DecodeTDLibJSONMessageSchedulingState(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field scheduling_state: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field scheduling_state: %w", err) } m.SchedulingState = value case "is_outgoing": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field is_outgoing: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field is_outgoing: %w", err) } m.IsOutgoing = value case "is_pinned": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field is_pinned: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field is_pinned: %w", err) } m.IsPinned = value case "can_be_edited": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_edited: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_edited: %w", err) } m.CanBeEdited = value case "can_be_forwarded": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_forwarded: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_forwarded: %w", err) } m.CanBeForwarded = value case "can_be_saved": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_saved: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_saved: %w", err) } m.CanBeSaved = value case "can_be_deleted_only_for_self": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_deleted_only_for_self: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_deleted_only_for_self: %w", err) } m.CanBeDeletedOnlyForSelf = value case "can_be_deleted_for_all_users": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_be_deleted_for_all_users: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_be_deleted_for_all_users: %w", err) } m.CanBeDeletedForAllUsers = value case "can_get_added_reactions": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_added_reactions: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_added_reactions: %w", err) } m.CanGetAddedReactions = value case "can_get_statistics": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_statistics: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_statistics: %w", err) } m.CanGetStatistics = value case "can_get_message_thread": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_message_thread: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_message_thread: %w", err) } m.CanGetMessageThread = value case "can_get_viewers": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_viewers: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_viewers: %w", err) } m.CanGetViewers = value case "can_get_media_timestamp_links": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_get_media_timestamp_links: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_get_media_timestamp_links: %w", err) } m.CanGetMediaTimestampLinks = value case "can_report_reactions": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field can_report_reactions: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field can_report_reactions: %w", err) } m.CanReportReactions = value case "has_timestamped_media": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field has_timestamped_media: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field has_timestamped_media: %w", err) } m.HasTimestampedMedia = value case "is_channel_post": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field is_channel_post: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field is_channel_post: %w", err) } m.IsChannelPost = value case "is_topic_message": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field is_topic_message: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field is_topic_message: %w", err) } m.IsTopicMessage = value case "contains_unread_mention": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field contains_unread_mention: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field contains_unread_mention: %w", err) } m.ContainsUnreadMention = value case "date": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field date: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field date: %w", err) } m.Date = value case "edit_date": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field edit_date: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field edit_date: %w", err) } m.EditDate = value case "forward_info": if err := m.ForwardInfo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field forward_info: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field forward_info: %w", err) } case "interaction_info": if err := m.InteractionInfo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field interaction_info: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field interaction_info: %w", err) } case "unread_reactions": if err := b.Arr(func(b tdjson.Decoder) error { var value UnreadReaction if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field unread_reactions: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field unread_reactions: %w", err) } m.UnreadReactions = append(m.UnreadReactions, value) return nil }); err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field unread_reactions: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field unread_reactions: %w", err) } case "reply_to": value, err := DecodeTDLibJSONMessageReplyTo(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field reply_to: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field reply_to: %w", err) } m.ReplyTo = value case "message_thread_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field message_thread_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field message_thread_id: %w", err) } m.MessageThreadID = value - case "self_destruct_time": - value, err := b.Int32() + case "self_destruct_type": + value, err := DecodeTDLibJSONMessageSelfDestructType(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field self_destruct_time: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field self_destruct_type: %w", err) } - m.SelfDestructTime = value + m.SelfDestructType = value case "self_destruct_in": value, err := b.Double() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field self_destruct_in: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field self_destruct_in: %w", err) } m.SelfDestructIn = value case "auto_delete_in": value, err := b.Double() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field auto_delete_in: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field auto_delete_in: %w", err) } m.AutoDeleteIn = value case "via_bot_user_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field via_bot_user_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field via_bot_user_id: %w", err) } m.ViaBotUserID = value case "author_signature": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field author_signature: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field author_signature: %w", err) } m.AuthorSignature = value case "media_album_id": value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field media_album_id: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field media_album_id: %w", err) } m.MediaAlbumID = value case "restriction_reason": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field restriction_reason: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field restriction_reason: %w", err) } m.RestrictionReason = value case "content": value, err := DecodeTDLibJSONMessageContent(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field content: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field content: %w", err) } m.Content = value case "reply_markup": value, err := DecodeTDLibJSONReplyMarkup(b) if err != nil { - return fmt.Errorf("unable to decode message#e285e28a: field reply_markup: %w", err) + return fmt.Errorf("unable to decode message#a516cc02: field reply_markup: %w", err) } m.ReplyMarkup = value default: @@ -1484,12 +1491,12 @@ func (m *Message) GetMessageThreadID() (value int64) { return m.MessageThreadID } -// GetSelfDestructTime returns value of SelfDestructTime field. -func (m *Message) GetSelfDestructTime() (value int32) { +// GetSelfDestructType returns value of SelfDestructType field. +func (m *Message) GetSelfDestructType() (value MessageSelfDestructTypeClass) { if m == nil { return } - return m.SelfDestructTime + return m.SelfDestructType } // GetSelfDestructIn returns value of SelfDestructIn field. diff --git a/tdapi/tl_message_self_destruct_type_gen.go b/tdapi/tl_message_self_destruct_type_gen.go new file mode 100644 index 0000000000..4fe53a5ff0 --- /dev/null +++ b/tdapi/tl_message_self_destruct_type_gen.go @@ -0,0 +1,467 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// MessageSelfDestructTypeTimer represents TL type `messageSelfDestructTypeTimer#508d57cd`. +type MessageSelfDestructTypeTimer struct { + // The message's self-destruct time, in seconds; must be between 0 and 60 in private + // chats + SelfDestructTime int32 +} + +// MessageSelfDestructTypeTimerTypeID is TL type id of MessageSelfDestructTypeTimer. +const MessageSelfDestructTypeTimerTypeID = 0x508d57cd + +// construct implements constructor of MessageSelfDestructTypeClass. +func (m MessageSelfDestructTypeTimer) construct() MessageSelfDestructTypeClass { return &m } + +// Ensuring interfaces in compile-time for MessageSelfDestructTypeTimer. +var ( + _ bin.Encoder = &MessageSelfDestructTypeTimer{} + _ bin.Decoder = &MessageSelfDestructTypeTimer{} + _ bin.BareEncoder = &MessageSelfDestructTypeTimer{} + _ bin.BareDecoder = &MessageSelfDestructTypeTimer{} + + _ MessageSelfDestructTypeClass = &MessageSelfDestructTypeTimer{} +) + +func (m *MessageSelfDestructTypeTimer) Zero() bool { + if m == nil { + return true + } + if !(m.SelfDestructTime == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (m *MessageSelfDestructTypeTimer) String() string { + if m == nil { + return "MessageSelfDestructTypeTimer(nil)" + } + type Alias MessageSelfDestructTypeTimer + return fmt.Sprintf("MessageSelfDestructTypeTimer%+v", Alias(*m)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessageSelfDestructTypeTimer) TypeID() uint32 { + return MessageSelfDestructTypeTimerTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessageSelfDestructTypeTimer) TypeName() string { + return "messageSelfDestructTypeTimer" +} + +// TypeInfo returns info about TL type. +func (m *MessageSelfDestructTypeTimer) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messageSelfDestructTypeTimer", + ID: MessageSelfDestructTypeTimerTypeID, + } + if m == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "SelfDestructTime", + SchemaName: "self_destruct_time", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (m *MessageSelfDestructTypeTimer) Encode(b *bin.Buffer) error { + if m == nil { + return fmt.Errorf("can't encode messageSelfDestructTypeTimer#508d57cd as nil") + } + b.PutID(MessageSelfDestructTypeTimerTypeID) + return m.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (m *MessageSelfDestructTypeTimer) EncodeBare(b *bin.Buffer) error { + if m == nil { + return fmt.Errorf("can't encode messageSelfDestructTypeTimer#508d57cd as nil") + } + b.PutInt32(m.SelfDestructTime) + return nil +} + +// Decode implements bin.Decoder. +func (m *MessageSelfDestructTypeTimer) Decode(b *bin.Buffer) error { + if m == nil { + return fmt.Errorf("can't decode messageSelfDestructTypeTimer#508d57cd to nil") + } + if err := b.ConsumeID(MessageSelfDestructTypeTimerTypeID); err != nil { + return fmt.Errorf("unable to decode messageSelfDestructTypeTimer#508d57cd: %w", err) + } + return m.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (m *MessageSelfDestructTypeTimer) DecodeBare(b *bin.Buffer) error { + if m == nil { + return fmt.Errorf("can't decode messageSelfDestructTypeTimer#508d57cd to nil") + } + { + value, err := b.Int32() + if err != nil { + return fmt.Errorf("unable to decode messageSelfDestructTypeTimer#508d57cd: field self_destruct_time: %w", err) + } + m.SelfDestructTime = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (m *MessageSelfDestructTypeTimer) EncodeTDLibJSON(b tdjson.Encoder) error { + if m == nil { + return fmt.Errorf("can't encode messageSelfDestructTypeTimer#508d57cd as nil") + } + b.ObjStart() + b.PutID("messageSelfDestructTypeTimer") + b.Comma() + b.FieldStart("self_destruct_time") + b.PutInt32(m.SelfDestructTime) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (m *MessageSelfDestructTypeTimer) DecodeTDLibJSON(b tdjson.Decoder) error { + if m == nil { + return fmt.Errorf("can't decode messageSelfDestructTypeTimer#508d57cd to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("messageSelfDestructTypeTimer"); err != nil { + return fmt.Errorf("unable to decode messageSelfDestructTypeTimer#508d57cd: %w", err) + } + case "self_destruct_time": + value, err := b.Int32() + if err != nil { + return fmt.Errorf("unable to decode messageSelfDestructTypeTimer#508d57cd: field self_destruct_time: %w", err) + } + m.SelfDestructTime = value + default: + return b.Skip() + } + return nil + }) +} + +// GetSelfDestructTime returns value of SelfDestructTime field. +func (m *MessageSelfDestructTypeTimer) GetSelfDestructTime() (value int32) { + if m == nil { + return + } + return m.SelfDestructTime +} + +// MessageSelfDestructTypeImmediately represents TL type `messageSelfDestructTypeImmediately#c23c9005`. +type MessageSelfDestructTypeImmediately struct { +} + +// MessageSelfDestructTypeImmediatelyTypeID is TL type id of MessageSelfDestructTypeImmediately. +const MessageSelfDestructTypeImmediatelyTypeID = 0xc23c9005 + +// construct implements constructor of MessageSelfDestructTypeClass. +func (m MessageSelfDestructTypeImmediately) construct() MessageSelfDestructTypeClass { return &m } + +// Ensuring interfaces in compile-time for MessageSelfDestructTypeImmediately. +var ( + _ bin.Encoder = &MessageSelfDestructTypeImmediately{} + _ bin.Decoder = &MessageSelfDestructTypeImmediately{} + _ bin.BareEncoder = &MessageSelfDestructTypeImmediately{} + _ bin.BareDecoder = &MessageSelfDestructTypeImmediately{} + + _ MessageSelfDestructTypeClass = &MessageSelfDestructTypeImmediately{} +) + +func (m *MessageSelfDestructTypeImmediately) Zero() bool { + if m == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (m *MessageSelfDestructTypeImmediately) String() string { + if m == nil { + return "MessageSelfDestructTypeImmediately(nil)" + } + type Alias MessageSelfDestructTypeImmediately + return fmt.Sprintf("MessageSelfDestructTypeImmediately%+v", Alias(*m)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*MessageSelfDestructTypeImmediately) TypeID() uint32 { + return MessageSelfDestructTypeImmediatelyTypeID +} + +// TypeName returns name of type in TL schema. +func (*MessageSelfDestructTypeImmediately) TypeName() string { + return "messageSelfDestructTypeImmediately" +} + +// TypeInfo returns info about TL type. +func (m *MessageSelfDestructTypeImmediately) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "messageSelfDestructTypeImmediately", + ID: MessageSelfDestructTypeImmediatelyTypeID, + } + if m == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (m *MessageSelfDestructTypeImmediately) Encode(b *bin.Buffer) error { + if m == nil { + return fmt.Errorf("can't encode messageSelfDestructTypeImmediately#c23c9005 as nil") + } + b.PutID(MessageSelfDestructTypeImmediatelyTypeID) + return m.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (m *MessageSelfDestructTypeImmediately) EncodeBare(b *bin.Buffer) error { + if m == nil { + return fmt.Errorf("can't encode messageSelfDestructTypeImmediately#c23c9005 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (m *MessageSelfDestructTypeImmediately) Decode(b *bin.Buffer) error { + if m == nil { + return fmt.Errorf("can't decode messageSelfDestructTypeImmediately#c23c9005 to nil") + } + if err := b.ConsumeID(MessageSelfDestructTypeImmediatelyTypeID); err != nil { + return fmt.Errorf("unable to decode messageSelfDestructTypeImmediately#c23c9005: %w", err) + } + return m.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (m *MessageSelfDestructTypeImmediately) DecodeBare(b *bin.Buffer) error { + if m == nil { + return fmt.Errorf("can't decode messageSelfDestructTypeImmediately#c23c9005 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (m *MessageSelfDestructTypeImmediately) EncodeTDLibJSON(b tdjson.Encoder) error { + if m == nil { + return fmt.Errorf("can't encode messageSelfDestructTypeImmediately#c23c9005 as nil") + } + b.ObjStart() + b.PutID("messageSelfDestructTypeImmediately") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (m *MessageSelfDestructTypeImmediately) DecodeTDLibJSON(b tdjson.Decoder) error { + if m == nil { + return fmt.Errorf("can't decode messageSelfDestructTypeImmediately#c23c9005 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("messageSelfDestructTypeImmediately"); err != nil { + return fmt.Errorf("unable to decode messageSelfDestructTypeImmediately#c23c9005: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// MessageSelfDestructTypeClassName is schema name of MessageSelfDestructTypeClass. +const MessageSelfDestructTypeClassName = "MessageSelfDestructType" + +// MessageSelfDestructTypeClass represents MessageSelfDestructType generic type. +// +// Example: +// +// g, err := tdapi.DecodeMessageSelfDestructType(buf) +// if err != nil { +// panic(err) +// } +// switch v := g.(type) { +// case *tdapi.MessageSelfDestructTypeTimer: // messageSelfDestructTypeTimer#508d57cd +// case *tdapi.MessageSelfDestructTypeImmediately: // messageSelfDestructTypeImmediately#c23c9005 +// default: panic(v) +// } +type MessageSelfDestructTypeClass interface { + bin.Encoder + bin.Decoder + bin.BareEncoder + bin.BareDecoder + construct() MessageSelfDestructTypeClass + + // TypeID returns type id in TL schema. + // + // See https://core.telegram.org/mtproto/TL-tl#remarks. + TypeID() uint32 + // TypeName returns name of type in TL schema. + TypeName() string + // String implements fmt.Stringer. + String() string + // Zero returns true if current object has a zero value. + Zero() bool + + EncodeTDLibJSON(b tdjson.Encoder) error + DecodeTDLibJSON(b tdjson.Decoder) error +} + +// DecodeMessageSelfDestructType implements binary de-serialization for MessageSelfDestructTypeClass. +func DecodeMessageSelfDestructType(buf *bin.Buffer) (MessageSelfDestructTypeClass, error) { + id, err := buf.PeekID() + if err != nil { + return nil, err + } + switch id { + case MessageSelfDestructTypeTimerTypeID: + // Decoding messageSelfDestructTypeTimer#508d57cd. + v := MessageSelfDestructTypeTimer{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode MessageSelfDestructTypeClass: %w", err) + } + return &v, nil + case MessageSelfDestructTypeImmediatelyTypeID: + // Decoding messageSelfDestructTypeImmediately#c23c9005. + v := MessageSelfDestructTypeImmediately{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode MessageSelfDestructTypeClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode MessageSelfDestructTypeClass: %w", bin.NewUnexpectedID(id)) + } +} + +// DecodeTDLibJSONMessageSelfDestructType implements binary de-serialization for MessageSelfDestructTypeClass. +func DecodeTDLibJSONMessageSelfDestructType(buf tdjson.Decoder) (MessageSelfDestructTypeClass, error) { + id, err := buf.FindTypeID() + if err != nil { + return nil, err + } + switch id { + case "messageSelfDestructTypeTimer": + // Decoding messageSelfDestructTypeTimer#508d57cd. + v := MessageSelfDestructTypeTimer{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode MessageSelfDestructTypeClass: %w", err) + } + return &v, nil + case "messageSelfDestructTypeImmediately": + // Decoding messageSelfDestructTypeImmediately#c23c9005. + v := MessageSelfDestructTypeImmediately{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode MessageSelfDestructTypeClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode MessageSelfDestructTypeClass: %w", tdjson.NewUnexpectedID(id)) + } +} + +// MessageSelfDestructType boxes the MessageSelfDestructTypeClass providing a helper. +type MessageSelfDestructTypeBox struct { + MessageSelfDestructType MessageSelfDestructTypeClass +} + +// Decode implements bin.Decoder for MessageSelfDestructTypeBox. +func (b *MessageSelfDestructTypeBox) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("unable to decode MessageSelfDestructTypeBox to nil") + } + v, err := DecodeMessageSelfDestructType(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.MessageSelfDestructType = v + return nil +} + +// Encode implements bin.Encode for MessageSelfDestructTypeBox. +func (b *MessageSelfDestructTypeBox) Encode(buf *bin.Buffer) error { + if b == nil || b.MessageSelfDestructType == nil { + return fmt.Errorf("unable to encode MessageSelfDestructTypeClass as nil") + } + return b.MessageSelfDestructType.Encode(buf) +} + +// DecodeTDLibJSON implements bin.Decoder for MessageSelfDestructTypeBox. +func (b *MessageSelfDestructTypeBox) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("unable to decode MessageSelfDestructTypeBox to nil") + } + v, err := DecodeTDLibJSONMessageSelfDestructType(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.MessageSelfDestructType = v + return nil +} + +// EncodeTDLibJSON implements bin.Encode for MessageSelfDestructTypeBox. +func (b *MessageSelfDestructTypeBox) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil || b.MessageSelfDestructType == nil { + return fmt.Errorf("unable to encode MessageSelfDestructTypeClass as nil") + } + return b.MessageSelfDestructType.EncodeTDLibJSON(buf) +} diff --git a/tdapi/tl_open_web_app_gen.go b/tdapi/tl_open_web_app_gen.go index e3b7be9e7b..85b5b55ebb 100644 --- a/tdapi/tl_open_web_app_gen.go +++ b/tdapi/tl_open_web_app_gen.go @@ -38,7 +38,7 @@ type OpenWebAppRequest struct { ChatID int64 // Identifier of the bot, providing the Web App BotUserID int64 - // The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an + // The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an // internalLinkTypeAttachmentMenuBot link, or an empty string otherwise URL string // Preferred Web App theme; pass null to use the default theme diff --git a/tdapi/tl_proxy_gen.go b/tdapi/tl_proxy_gen.go index a318aeee8a..31963ff4e1 100644 --- a/tdapi/tl_proxy_gen.go +++ b/tdapi/tl_proxy_gen.go @@ -35,7 +35,7 @@ var ( type Proxy struct { // Unique identifier of the proxy ID int32 - // Proxy server IP address + // Proxy server domain or IP address Server string // Proxy server port Port int32 diff --git a/tdapi/tl_registry_gen.go b/tdapi/tl_registry_gen.go index 85a053ca86..2c231b87c2 100644 --- a/tdapi/tl_registry_gen.go +++ b/tdapi/tl_registry_gen.go @@ -193,7 +193,10 @@ func TypesMap() map[uint32]string { ChatInviteLinkCountsTypeID: "chatInviteLinkCounts#c953d7f8", ChatInviteLinkMemberTypeID: "chatInviteLinkMember#1bce5bb", ChatInviteLinkMembersTypeID: "chatInviteLinkMembers#c2ca3a61", - ChatInviteLinkInfoTypeID: "chatInviteLinkInfo#9afe0cd0", + InviteLinkChatTypeBasicGroupTypeID: "inviteLinkChatTypeBasicGroup#4d43c5ee", + InviteLinkChatTypeSupergroupTypeID: "inviteLinkChatTypeSupergroup#3de86758", + InviteLinkChatTypeChannelTypeID: "inviteLinkChatTypeChannel#3012ef0b", + ChatInviteLinkInfoTypeID: "chatInviteLinkInfo#c8c16a57", ChatJoinRequestTypeID: "chatJoinRequest#3897a68", ChatJoinRequestsTypeID: "chatJoinRequests#b2c5fd31", ChatJoinRequestsInfoTypeID: "chatJoinRequestsInfo#6aff5df5", @@ -228,7 +231,7 @@ func TypesMap() map[uint32]string { MessageSendingStateFailedTypeID: "messageSendingStateFailed#982ce904", MessageReplyToMessageTypeID: "messageReplyToMessage#deb02f02", MessageReplyToStoryTypeID: "messageReplyToStory#708ca939", - MessageTypeID: "message#e285e28a", + MessageTypeID: "message#a516cc02", MessagesTypeID: "messages#b34c8c60", FoundMessagesTypeID: "foundMessages#2515f708", FoundChatMessagesTypeID: "foundChatMessages#4a25270c", @@ -322,7 +325,7 @@ func TypesMap() map[uint32]string { ReplyMarkupInlineKeyboardTypeID: "replyMarkupInlineKeyboard#92ac0efb", LoginURLInfoOpenTypeID: "loginUrlInfoOpen#31e7ea02", LoginURLInfoRequestConfirmationTypeID: "loginUrlInfoRequestConfirmation#7edb242f", - FoundWebAppTypeID: "foundWebApp#eea8d01e", + FoundWebAppTypeID: "foundWebApp#2b8136d4", WebAppInfoTypeID: "webAppInfo#2efdb2e8", MessageThreadInfoTypeID: "messageThreadInfo#683fd5ad", ForumTopicIconTypeID: "forumTopicIcon#cf32a193", @@ -575,15 +578,17 @@ func TypesMap() map[uint32]string { InputThumbnailTypeID: "inputThumbnail#5e515024", MessageSchedulingStateSendAtDateTypeID: "messageSchedulingStateSendAtDate#a773ffe7", MessageSchedulingStateSendWhenOnlineTypeID: "messageSchedulingStateSendWhenOnline#7cbfd808", + MessageSelfDestructTypeTimerTypeID: "messageSelfDestructTypeTimer#508d57cd", + MessageSelfDestructTypeImmediatelyTypeID: "messageSelfDestructTypeImmediately#c23c9005", MessageSendOptionsTypeID: "messageSendOptions#1f60b9e", MessageCopyOptionsTypeID: "messageCopyOptions#48076039", InputMessageTextTypeID: "inputMessageText#eb9b098", InputMessageAnimationTypeID: "inputMessageAnimation#cd68f5fe", InputMessageAudioTypeID: "inputMessageAudio#daa400b2", InputMessageDocumentTypeID: "inputMessageDocument#615b72b9", - InputMessagePhotoTypeID: "inputMessagePhoto#600db6e", + InputMessagePhotoTypeID: "inputMessagePhoto#83234a22", InputMessageStickerTypeID: "inputMessageSticker#3ff1b6f9", - InputMessageVideoTypeID: "inputMessageVideo#a2d4e2b2", + InputMessageVideoTypeID: "inputMessageVideo#f17014da", InputMessageVideoNoteTypeID: "inputMessageVideoNote#10a2dcfb", InputMessageVoiceNoteTypeID: "inputMessageVoiceNote#7f58b3e9", InputMessageLocationTypeID: "inputMessageLocation#26aae970", @@ -722,7 +727,7 @@ func TypesMap() map[uint32]string { SpeechRecognitionResultTextTypeID: "speechRecognitionResultText#80e681dd", SpeechRecognitionResultErrorTypeID: "speechRecognitionResultError#9d243fc", AttachmentMenuBotColorTypeID: "attachmentMenuBotColor#64235ebc", - AttachmentMenuBotTypeID: "attachmentMenuBot#5920a05d", + AttachmentMenuBotTypeID: "attachmentMenuBot#2176d831", SentWebAppMessageTypeID: "sentWebAppMessage#4a24eec0", HTTPURLTypeID: "httpUrl#87b775a6", UserLinkTypeID: "userLink#1db0fef8", @@ -971,7 +976,7 @@ func TypesMap() map[uint32]string { StoryPrivacySettingsEveryoneTypeID: "storyPrivacySettingsEveryone#22d1053a", StoryPrivacySettingsContactsTypeID: "storyPrivacySettingsContacts#35515d71", StoryPrivacySettingsCloseFriendsTypeID: "storyPrivacySettingsCloseFriends#7cff8b60", - StoryPrivacySettingsSelectedContactsTypeID: "storyPrivacySettingsSelectedContacts#25401fc7", + StoryPrivacySettingsSelectedUsersTypeID: "storyPrivacySettingsSelectedUsers#84d7d27b", UserPrivacySettingRuleAllowAllTypeID: "userPrivacySettingRuleAllowAll#8abf1c3f", UserPrivacySettingRuleAllowContactsTypeID: "userPrivacySettingRuleAllowContacts#8f2f2d10", UserPrivacySettingRuleAllowUsersTypeID: "userPrivacySettingRuleAllowUsers#d1570b70", @@ -1010,9 +1015,10 @@ func TypesMap() map[uint32]string { SessionTypeVivaldiTypeID: "sessionTypeVivaldi#42c985ef", SessionTypeWindowsTypeID: "sessionTypeWindows#9c1272a8", SessionTypeXboxTypeID: "sessionTypeXbox#6ea39dac", - SessionTypeID: "session#8b189386", + SessionTypeID: "session#9759a3c", SessionsTypeID: "sessions#997833aa", - ConnectedWebsiteTypeID: "connectedWebsite#324ea36d", + UnconfirmedSessionTypeID: "unconfirmedSession#850d49f9", + ConnectedWebsiteTypeID: "connectedWebsite#75e7a78a", ConnectedWebsitesTypeID: "connectedWebsites#f0c8b5ea", ReportReasonSpamTypeID: "reportReasonSpam#b80e23bf", ReportReasonViolenceTypeID: "reportReasonViolence#7983c739", @@ -1056,6 +1062,7 @@ func TypesMap() map[uint32]string { InternalLinkTypeQrCodeAuthenticationTypeID: "internalLinkTypeQrCodeAuthentication#bf121924", InternalLinkTypeRestorePurchasesTypeID: "internalLinkTypeRestorePurchases#24203483", InternalLinkTypeSettingsTypeID: "internalLinkTypeSettings#177545b4", + InternalLinkTypeSideMenuBotTypeID: "internalLinkTypeSideMenuBot#a260e77d", InternalLinkTypeStickerSetTypeID: "internalLinkTypeStickerSet#a1464fa2", InternalLinkTypeStoryTypeID: "internalLinkTypeStory#57bce647", InternalLinkTypeThemeTypeID: "internalLinkTypeTheme#f405f807", @@ -1269,6 +1276,7 @@ func TypesMap() map[uint32]string { UpdateConnectionStateTypeID: "updateConnectionState#57939e2e", UpdateTermsOfServiceTypeID: "updateTermsOfService#b23cc55e", UpdateUsersNearbyTypeID: "updateUsersNearby#97c8ab5", + UpdateUnconfirmedSessionTypeID: "updateUnconfirmedSession#fea6088c", UpdateAttachmentMenuBotsTypeID: "updateAttachmentMenuBots#b6b910c", UpdateWebAppMessageSentTypeID: "updateWebAppMessageSent#58431229", UpdateActiveEmojiReactionsTypeID: "updateActiveEmojiReactions#691ffcb7", @@ -1771,6 +1779,7 @@ func TypesMap() map[uint32]string { GetActiveSessionsRequestTypeID: "getActiveSessions#42bd6d3e", TerminateSessionRequestTypeID: "terminateSession#e7b7c92c", TerminateAllOtherSessionsRequestTypeID: "terminateAllOtherSessions#6fba6113", + ConfirmSessionRequestTypeID: "confirmSession#d7c9b41f", ToggleSessionCanAcceptCallsRequestTypeID: "toggleSessionCanAcceptCalls#6c6c2708", ToggleSessionCanAcceptSecretChatsRequestTypeID: "toggleSessionCanAcceptSecretChats#3ba7a87e", SetInactiveSessionTTLRequestTypeID: "setInactiveSessionTtl#5d9ca950", @@ -1948,1112 +1957,1119 @@ func TypesMap() map[uint32]string { // NamesMap returns mapping from type names to TL type ids. func NamesMap() map[string]uint32 { return map[string]uint32{ - "double": DoubleTypeID, - "string": StringTypeID, - "int32": Int32TypeID, - "int53": Int53TypeID, - "int64": Int64TypeID, - "bytes": BytesTypeID, - "boolFalse": BoolFalseTypeID, - "boolTrue": BoolTrueTypeID, - "error": ErrorTypeID, - "ok": OkTypeID, - "authenticationCodeTypeTelegramMessage": AuthenticationCodeTypeTelegramMessageTypeID, - "authenticationCodeTypeSms": AuthenticationCodeTypeSMSTypeID, - "authenticationCodeTypeCall": AuthenticationCodeTypeCallTypeID, - "authenticationCodeTypeFlashCall": AuthenticationCodeTypeFlashCallTypeID, - "authenticationCodeTypeMissedCall": AuthenticationCodeTypeMissedCallTypeID, - "authenticationCodeTypeFragment": AuthenticationCodeTypeFragmentTypeID, - "authenticationCodeTypeFirebaseAndroid": AuthenticationCodeTypeFirebaseAndroidTypeID, - "authenticationCodeTypeFirebaseIos": AuthenticationCodeTypeFirebaseIosTypeID, - "authenticationCodeInfo": AuthenticationCodeInfoTypeID, - "emailAddressAuthenticationCodeInfo": EmailAddressAuthenticationCodeInfoTypeID, - "emailAddressAuthenticationCode": EmailAddressAuthenticationCodeTypeID, - "emailAddressAuthenticationAppleId": EmailAddressAuthenticationAppleIDTypeID, - "emailAddressAuthenticationGoogleId": EmailAddressAuthenticationGoogleIDTypeID, - "emailAddressResetStateAvailable": EmailAddressResetStateAvailableTypeID, - "emailAddressResetStatePending": EmailAddressResetStatePendingTypeID, - "textEntity": TextEntityTypeID, - "textEntities": TextEntitiesTypeID, - "formattedText": FormattedTextTypeID, - "termsOfService": TermsOfServiceTypeID, - "authorizationStateWaitTdlibParameters": AuthorizationStateWaitTdlibParametersTypeID, - "authorizationStateWaitPhoneNumber": AuthorizationStateWaitPhoneNumberTypeID, - "authorizationStateWaitEmailAddress": AuthorizationStateWaitEmailAddressTypeID, - "authorizationStateWaitEmailCode": AuthorizationStateWaitEmailCodeTypeID, - "authorizationStateWaitCode": AuthorizationStateWaitCodeTypeID, - "authorizationStateWaitOtherDeviceConfirmation": AuthorizationStateWaitOtherDeviceConfirmationTypeID, - "authorizationStateWaitRegistration": AuthorizationStateWaitRegistrationTypeID, - "authorizationStateWaitPassword": AuthorizationStateWaitPasswordTypeID, - "authorizationStateReady": AuthorizationStateReadyTypeID, - "authorizationStateLoggingOut": AuthorizationStateLoggingOutTypeID, - "authorizationStateClosing": AuthorizationStateClosingTypeID, - "authorizationStateClosed": AuthorizationStateClosedTypeID, - "passwordState": PasswordStateTypeID, - "recoveryEmailAddress": RecoveryEmailAddressTypeID, - "temporaryPasswordState": TemporaryPasswordStateTypeID, - "localFile": LocalFileTypeID, - "remoteFile": RemoteFileTypeID, - "file": FileTypeID, - "inputFileId": InputFileIDTypeID, - "inputFileRemote": InputFileRemoteTypeID, - "inputFileLocal": InputFileLocalTypeID, - "inputFileGenerated": InputFileGeneratedTypeID, - "photoSize": PhotoSizeTypeID, - "minithumbnail": MinithumbnailTypeID, - "thumbnailFormatJpeg": ThumbnailFormatJpegTypeID, - "thumbnailFormatGif": ThumbnailFormatGifTypeID, - "thumbnailFormatMpeg4": ThumbnailFormatMpeg4TypeID, - "thumbnailFormatPng": ThumbnailFormatPngTypeID, - "thumbnailFormatTgs": ThumbnailFormatTgsTypeID, - "thumbnailFormatWebm": ThumbnailFormatWebmTypeID, - "thumbnailFormatWebp": ThumbnailFormatWebpTypeID, - "thumbnail": ThumbnailTypeID, - "maskPointForehead": MaskPointForeheadTypeID, - "maskPointEyes": MaskPointEyesTypeID, - "maskPointMouth": MaskPointMouthTypeID, - "maskPointChin": MaskPointChinTypeID, - "maskPosition": MaskPositionTypeID, - "stickerFormatWebp": StickerFormatWebpTypeID, - "stickerFormatTgs": StickerFormatTgsTypeID, - "stickerFormatWebm": StickerFormatWebmTypeID, - "stickerTypeRegular": StickerTypeRegularTypeID, - "stickerTypeMask": StickerTypeMaskTypeID, - "stickerTypeCustomEmoji": StickerTypeCustomEmojiTypeID, - "stickerFullTypeRegular": StickerFullTypeRegularTypeID, - "stickerFullTypeMask": StickerFullTypeMaskTypeID, - "stickerFullTypeCustomEmoji": StickerFullTypeCustomEmojiTypeID, - "closedVectorPath": ClosedVectorPathTypeID, - "pollOption": PollOptionTypeID, - "pollTypeRegular": PollTypeRegularTypeID, - "pollTypeQuiz": PollTypeQuizTypeID, - "animation": AnimationTypeID, - "audio": AudioTypeID, - "document": DocumentTypeID, - "photo": PhotoTypeID, - "sticker": StickerTypeID, - "video": VideoTypeID, - "videoNote": VideoNoteTypeID, - "voiceNote": VoiceNoteTypeID, - "animatedEmoji": AnimatedEmojiTypeID, - "contact": ContactTypeID, - "location": LocationTypeID, - "venue": VenueTypeID, - "game": GameTypeID, - "webApp": WebAppTypeID, - "poll": PollTypeID, - "background": BackgroundTypeID, - "backgrounds": BackgroundsTypeID, - "chatBackground": ChatBackgroundTypeID, - "profilePhoto": ProfilePhotoTypeID, - "chatPhotoInfo": ChatPhotoInfoTypeID, - "userTypeRegular": UserTypeRegularTypeID, - "userTypeDeleted": UserTypeDeletedTypeID, - "userTypeBot": UserTypeBotTypeID, - "userTypeUnknown": UserTypeUnknownTypeID, - "botCommand": BotCommandTypeID, - "botCommands": BotCommandsTypeID, - "botMenuButton": BotMenuButtonTypeID, - "chatLocation": ChatLocationTypeID, - "chatPhotoStickerTypeRegularOrMask": ChatPhotoStickerTypeRegularOrMaskTypeID, - "chatPhotoStickerTypeCustomEmoji": ChatPhotoStickerTypeCustomEmojiTypeID, - "chatPhotoSticker": ChatPhotoStickerTypeID, - "animatedChatPhoto": AnimatedChatPhotoTypeID, - "chatPhoto": ChatPhotoTypeID, - "chatPhotos": ChatPhotosTypeID, - "inputChatPhotoPrevious": InputChatPhotoPreviousTypeID, - "inputChatPhotoStatic": InputChatPhotoStaticTypeID, - "inputChatPhotoAnimation": InputChatPhotoAnimationTypeID, - "inputChatPhotoSticker": InputChatPhotoStickerTypeID, - "chatPermissions": ChatPermissionsTypeID, - "chatAdministratorRights": ChatAdministratorRightsTypeID, - "premiumPaymentOption": PremiumPaymentOptionTypeID, - "premiumStatePaymentOption": PremiumStatePaymentOptionTypeID, - "emojiStatus": EmojiStatusTypeID, - "emojiStatuses": EmojiStatusesTypeID, - "usernames": UsernamesTypeID, - "user": UserTypeID, - "botInfo": BotInfoTypeID, - "userFullInfo": UserFullInfoTypeID, - "users": UsersTypeID, - "chatAdministrator": ChatAdministratorTypeID, - "chatAdministrators": ChatAdministratorsTypeID, - "chatMemberStatusCreator": ChatMemberStatusCreatorTypeID, - "chatMemberStatusAdministrator": ChatMemberStatusAdministratorTypeID, - "chatMemberStatusMember": ChatMemberStatusMemberTypeID, - "chatMemberStatusRestricted": ChatMemberStatusRestrictedTypeID, - "chatMemberStatusLeft": ChatMemberStatusLeftTypeID, - "chatMemberStatusBanned": ChatMemberStatusBannedTypeID, - "chatMember": ChatMemberTypeID, - "chatMembers": ChatMembersTypeID, - "chatMembersFilterContacts": ChatMembersFilterContactsTypeID, - "chatMembersFilterAdministrators": ChatMembersFilterAdministratorsTypeID, - "chatMembersFilterMembers": ChatMembersFilterMembersTypeID, - "chatMembersFilterMention": ChatMembersFilterMentionTypeID, - "chatMembersFilterRestricted": ChatMembersFilterRestrictedTypeID, - "chatMembersFilterBanned": ChatMembersFilterBannedTypeID, - "chatMembersFilterBots": ChatMembersFilterBotsTypeID, - "supergroupMembersFilterRecent": SupergroupMembersFilterRecentTypeID, - "supergroupMembersFilterContacts": SupergroupMembersFilterContactsTypeID, - "supergroupMembersFilterAdministrators": SupergroupMembersFilterAdministratorsTypeID, - "supergroupMembersFilterSearch": SupergroupMembersFilterSearchTypeID, - "supergroupMembersFilterRestricted": SupergroupMembersFilterRestrictedTypeID, - "supergroupMembersFilterBanned": SupergroupMembersFilterBannedTypeID, - "supergroupMembersFilterMention": SupergroupMembersFilterMentionTypeID, - "supergroupMembersFilterBots": SupergroupMembersFilterBotsTypeID, - "chatInviteLink": ChatInviteLinkTypeID, - "chatInviteLinks": ChatInviteLinksTypeID, - "chatInviteLinkCount": ChatInviteLinkCountTypeID, - "chatInviteLinkCounts": ChatInviteLinkCountsTypeID, - "chatInviteLinkMember": ChatInviteLinkMemberTypeID, - "chatInviteLinkMembers": ChatInviteLinkMembersTypeID, - "chatInviteLinkInfo": ChatInviteLinkInfoTypeID, - "chatJoinRequest": ChatJoinRequestTypeID, - "chatJoinRequests": ChatJoinRequestsTypeID, - "chatJoinRequestsInfo": ChatJoinRequestsInfoTypeID, - "basicGroup": BasicGroupTypeID, - "basicGroupFullInfo": BasicGroupFullInfoTypeID, - "supergroup": SupergroupTypeID, - "supergroupFullInfo": SupergroupFullInfoTypeID, - "secretChatStatePending": SecretChatStatePendingTypeID, - "secretChatStateReady": SecretChatStateReadyTypeID, - "secretChatStateClosed": SecretChatStateClosedTypeID, - "secretChat": SecretChatTypeID, - "messageSenderUser": MessageSenderUserTypeID, - "messageSenderChat": MessageSenderChatTypeID, - "messageSenders": MessageSendersTypeID, - "chatMessageSender": ChatMessageSenderTypeID, - "chatMessageSenders": ChatMessageSendersTypeID, - "messageViewer": MessageViewerTypeID, - "messageViewers": MessageViewersTypeID, - "messageForwardOriginUser": MessageForwardOriginUserTypeID, - "messageForwardOriginChat": MessageForwardOriginChatTypeID, - "messageForwardOriginHiddenUser": MessageForwardOriginHiddenUserTypeID, - "messageForwardOriginChannel": MessageForwardOriginChannelTypeID, - "messageForwardOriginMessageImport": MessageForwardOriginMessageImportTypeID, - "reactionTypeEmoji": ReactionTypeEmojiTypeID, - "reactionTypeCustomEmoji": ReactionTypeCustomEmojiTypeID, - "messageForwardInfo": MessageForwardInfoTypeID, - "messageReplyInfo": MessageReplyInfoTypeID, - "messageReaction": MessageReactionTypeID, - "messageInteractionInfo": MessageInteractionInfoTypeID, - "unreadReaction": UnreadReactionTypeID, - "messageSendingStatePending": MessageSendingStatePendingTypeID, - "messageSendingStateFailed": MessageSendingStateFailedTypeID, - "messageReplyToMessage": MessageReplyToMessageTypeID, - "messageReplyToStory": MessageReplyToStoryTypeID, - "message": MessageTypeID, - "messages": MessagesTypeID, - "foundMessages": FoundMessagesTypeID, - "foundChatMessages": FoundChatMessagesTypeID, - "messagePosition": MessagePositionTypeID, - "messagePositions": MessagePositionsTypeID, - "messageCalendarDay": MessageCalendarDayTypeID, - "messageCalendar": MessageCalendarTypeID, - "messageSourceChatHistory": MessageSourceChatHistoryTypeID, - "messageSourceMessageThreadHistory": MessageSourceMessageThreadHistoryTypeID, - "messageSourceForumTopicHistory": MessageSourceForumTopicHistoryTypeID, - "messageSourceHistoryPreview": MessageSourceHistoryPreviewTypeID, - "messageSourceChatList": MessageSourceChatListTypeID, - "messageSourceSearch": MessageSourceSearchTypeID, - "messageSourceChatEventLog": MessageSourceChatEventLogTypeID, - "messageSourceNotification": MessageSourceNotificationTypeID, - "messageSourceScreenshot": MessageSourceScreenshotTypeID, - "messageSourceOther": MessageSourceOtherTypeID, - "messageSponsorTypeBot": MessageSponsorTypeBotTypeID, - "messageSponsorTypePublicChannel": MessageSponsorTypePublicChannelTypeID, - "messageSponsorTypePrivateChannel": MessageSponsorTypePrivateChannelTypeID, - "messageSponsorTypeWebsite": MessageSponsorTypeWebsiteTypeID, - "messageSponsor": MessageSponsorTypeID, - "sponsoredMessage": SponsoredMessageTypeID, - "sponsoredMessages": SponsoredMessagesTypeID, - "fileDownload": FileDownloadTypeID, - "downloadedFileCounts": DownloadedFileCountsTypeID, - "foundFileDownloads": FoundFileDownloadsTypeID, - "notificationSettingsScopePrivateChats": NotificationSettingsScopePrivateChatsTypeID, - "notificationSettingsScopeGroupChats": NotificationSettingsScopeGroupChatsTypeID, - "notificationSettingsScopeChannelChats": NotificationSettingsScopeChannelChatsTypeID, - "chatNotificationSettings": ChatNotificationSettingsTypeID, - "scopeNotificationSettings": ScopeNotificationSettingsTypeID, - "draftMessage": DraftMessageTypeID, - "chatTypePrivate": ChatTypePrivateTypeID, - "chatTypeBasicGroup": ChatTypeBasicGroupTypeID, - "chatTypeSupergroup": ChatTypeSupergroupTypeID, - "chatTypeSecret": ChatTypeSecretTypeID, - "chatFolderIcon": ChatFolderIconTypeID, - "chatFolder": ChatFolderTypeID, - "chatFolderInfo": ChatFolderInfoTypeID, - "chatFolderInviteLink": ChatFolderInviteLinkTypeID, - "chatFolderInviteLinks": ChatFolderInviteLinksTypeID, - "chatFolderInviteLinkInfo": ChatFolderInviteLinkInfoTypeID, - "recommendedChatFolder": RecommendedChatFolderTypeID, - "recommendedChatFolders": RecommendedChatFoldersTypeID, - "archiveChatListSettings": ArchiveChatListSettingsTypeID, - "chatListMain": ChatListMainTypeID, - "chatListArchive": ChatListArchiveTypeID, - "chatListFolder": ChatListFolderTypeID, - "chatLists": ChatListsTypeID, - "chatSourceMtprotoProxy": ChatSourceMtprotoProxyTypeID, - "chatSourcePublicServiceAnnouncement": ChatSourcePublicServiceAnnouncementTypeID, - "chatPosition": ChatPositionTypeID, - "chatAvailableReactionsAll": ChatAvailableReactionsAllTypeID, - "chatAvailableReactionsSome": ChatAvailableReactionsSomeTypeID, - "videoChat": VideoChatTypeID, - "chat": ChatTypeID, - "chats": ChatsTypeID, - "chatNearby": ChatNearbyTypeID, - "chatsNearby": ChatsNearbyTypeID, - "publicChatTypeHasUsername": PublicChatTypeHasUsernameTypeID, - "publicChatTypeIsLocationBased": PublicChatTypeIsLocationBasedTypeID, - "chatActionBarReportSpam": ChatActionBarReportSpamTypeID, - "chatActionBarReportUnrelatedLocation": ChatActionBarReportUnrelatedLocationTypeID, - "chatActionBarInviteMembers": ChatActionBarInviteMembersTypeID, - "chatActionBarReportAddBlock": ChatActionBarReportAddBlockTypeID, - "chatActionBarAddContact": ChatActionBarAddContactTypeID, - "chatActionBarSharePhoneNumber": ChatActionBarSharePhoneNumberTypeID, - "chatActionBarJoinRequest": ChatActionBarJoinRequestTypeID, - "keyboardButtonTypeText": KeyboardButtonTypeTextTypeID, - "keyboardButtonTypeRequestPhoneNumber": KeyboardButtonTypeRequestPhoneNumberTypeID, - "keyboardButtonTypeRequestLocation": KeyboardButtonTypeRequestLocationTypeID, - "keyboardButtonTypeRequestPoll": KeyboardButtonTypeRequestPollTypeID, - "keyboardButtonTypeRequestUser": KeyboardButtonTypeRequestUserTypeID, - "keyboardButtonTypeRequestChat": KeyboardButtonTypeRequestChatTypeID, - "keyboardButtonTypeWebApp": KeyboardButtonTypeWebAppTypeID, - "keyboardButton": KeyboardButtonTypeID, - "inlineKeyboardButtonTypeUrl": InlineKeyboardButtonTypeURLTypeID, - "inlineKeyboardButtonTypeLoginUrl": InlineKeyboardButtonTypeLoginURLTypeID, - "inlineKeyboardButtonTypeWebApp": InlineKeyboardButtonTypeWebAppTypeID, - "inlineKeyboardButtonTypeCallback": InlineKeyboardButtonTypeCallbackTypeID, - "inlineKeyboardButtonTypeCallbackWithPassword": InlineKeyboardButtonTypeCallbackWithPasswordTypeID, - "inlineKeyboardButtonTypeCallbackGame": InlineKeyboardButtonTypeCallbackGameTypeID, - "inlineKeyboardButtonTypeSwitchInline": InlineKeyboardButtonTypeSwitchInlineTypeID, - "inlineKeyboardButtonTypeBuy": InlineKeyboardButtonTypeBuyTypeID, - "inlineKeyboardButtonTypeUser": InlineKeyboardButtonTypeUserTypeID, - "inlineKeyboardButton": InlineKeyboardButtonTypeID, - "replyMarkupRemoveKeyboard": ReplyMarkupRemoveKeyboardTypeID, - "replyMarkupForceReply": ReplyMarkupForceReplyTypeID, - "replyMarkupShowKeyboard": ReplyMarkupShowKeyboardTypeID, - "replyMarkupInlineKeyboard": ReplyMarkupInlineKeyboardTypeID, - "loginUrlInfoOpen": LoginURLInfoOpenTypeID, - "loginUrlInfoRequestConfirmation": LoginURLInfoRequestConfirmationTypeID, - "foundWebApp": FoundWebAppTypeID, - "webAppInfo": WebAppInfoTypeID, - "messageThreadInfo": MessageThreadInfoTypeID, - "forumTopicIcon": ForumTopicIconTypeID, - "forumTopicInfo": ForumTopicInfoTypeID, - "forumTopic": ForumTopicTypeID, - "forumTopics": ForumTopicsTypeID, - "richTextPlain": RichTextPlainTypeID, - "richTextBold": RichTextBoldTypeID, - "richTextItalic": RichTextItalicTypeID, - "richTextUnderline": RichTextUnderlineTypeID, - "richTextStrikethrough": RichTextStrikethroughTypeID, - "richTextFixed": RichTextFixedTypeID, - "richTextUrl": RichTextURLTypeID, - "richTextEmailAddress": RichTextEmailAddressTypeID, - "richTextSubscript": RichTextSubscriptTypeID, - "richTextSuperscript": RichTextSuperscriptTypeID, - "richTextMarked": RichTextMarkedTypeID, - "richTextPhoneNumber": RichTextPhoneNumberTypeID, - "richTextIcon": RichTextIconTypeID, - "richTextReference": RichTextReferenceTypeID, - "richTextAnchor": RichTextAnchorTypeID, - "richTextAnchorLink": RichTextAnchorLinkTypeID, - "richTexts": RichTextsTypeID, - "pageBlockCaption": PageBlockCaptionTypeID, - "pageBlockListItem": PageBlockListItemTypeID, - "pageBlockHorizontalAlignmentLeft": PageBlockHorizontalAlignmentLeftTypeID, - "pageBlockHorizontalAlignmentCenter": PageBlockHorizontalAlignmentCenterTypeID, - "pageBlockHorizontalAlignmentRight": PageBlockHorizontalAlignmentRightTypeID, - "pageBlockVerticalAlignmentTop": PageBlockVerticalAlignmentTopTypeID, - "pageBlockVerticalAlignmentMiddle": PageBlockVerticalAlignmentMiddleTypeID, - "pageBlockVerticalAlignmentBottom": PageBlockVerticalAlignmentBottomTypeID, - "pageBlockTableCell": PageBlockTableCellTypeID, - "pageBlockRelatedArticle": PageBlockRelatedArticleTypeID, - "pageBlockTitle": PageBlockTitleTypeID, - "pageBlockSubtitle": PageBlockSubtitleTypeID, - "pageBlockAuthorDate": PageBlockAuthorDateTypeID, - "pageBlockHeader": PageBlockHeaderTypeID, - "pageBlockSubheader": PageBlockSubheaderTypeID, - "pageBlockKicker": PageBlockKickerTypeID, - "pageBlockParagraph": PageBlockParagraphTypeID, - "pageBlockPreformatted": PageBlockPreformattedTypeID, - "pageBlockFooter": PageBlockFooterTypeID, - "pageBlockDivider": PageBlockDividerTypeID, - "pageBlockAnchor": PageBlockAnchorTypeID, - "pageBlockList": PageBlockListTypeID, - "pageBlockBlockQuote": PageBlockBlockQuoteTypeID, - "pageBlockPullQuote": PageBlockPullQuoteTypeID, - "pageBlockAnimation": PageBlockAnimationTypeID, - "pageBlockAudio": PageBlockAudioTypeID, - "pageBlockPhoto": PageBlockPhotoTypeID, - "pageBlockVideo": PageBlockVideoTypeID, - "pageBlockVoiceNote": PageBlockVoiceNoteTypeID, - "pageBlockCover": PageBlockCoverTypeID, - "pageBlockEmbedded": PageBlockEmbeddedTypeID, - "pageBlockEmbeddedPost": PageBlockEmbeddedPostTypeID, - "pageBlockCollage": PageBlockCollageTypeID, - "pageBlockSlideshow": PageBlockSlideshowTypeID, - "pageBlockChatLink": PageBlockChatLinkTypeID, - "pageBlockTable": PageBlockTableTypeID, - "pageBlockDetails": PageBlockDetailsTypeID, - "pageBlockRelatedArticles": PageBlockRelatedArticlesTypeID, - "pageBlockMap": PageBlockMapTypeID, - "webPageInstantView": WebPageInstantViewTypeID, - "webPage": WebPageTypeID, - "countryInfo": CountryInfoTypeID, - "countries": CountriesTypeID, - "phoneNumberInfo": PhoneNumberInfoTypeID, - "bankCardActionOpenUrl": BankCardActionOpenURLTypeID, - "bankCardInfo": BankCardInfoTypeID, - "address": AddressTypeID, - "themeParameters": ThemeParametersTypeID, - "labeledPricePart": LabeledPricePartTypeID, - "invoice": InvoiceTypeID, - "orderInfo": OrderInfoTypeID, - "shippingOption": ShippingOptionTypeID, - "savedCredentials": SavedCredentialsTypeID, - "inputCredentialsSaved": InputCredentialsSavedTypeID, - "inputCredentialsNew": InputCredentialsNewTypeID, - "inputCredentialsApplePay": InputCredentialsApplePayTypeID, - "inputCredentialsGooglePay": InputCredentialsGooglePayTypeID, - "paymentProviderSmartGlocal": PaymentProviderSmartGlocalTypeID, - "paymentProviderStripe": PaymentProviderStripeTypeID, - "paymentProviderOther": PaymentProviderOtherTypeID, - "paymentOption": PaymentOptionTypeID, - "paymentForm": PaymentFormTypeID, - "validatedOrderInfo": ValidatedOrderInfoTypeID, - "paymentResult": PaymentResultTypeID, - "paymentReceipt": PaymentReceiptTypeID, - "inputInvoiceMessage": InputInvoiceMessageTypeID, - "inputInvoiceName": InputInvoiceNameTypeID, - "messageExtendedMediaPreview": MessageExtendedMediaPreviewTypeID, - "messageExtendedMediaPhoto": MessageExtendedMediaPhotoTypeID, - "messageExtendedMediaVideo": MessageExtendedMediaVideoTypeID, - "messageExtendedMediaUnsupported": MessageExtendedMediaUnsupportedTypeID, - "datedFile": DatedFileTypeID, - "passportElementTypePersonalDetails": PassportElementTypePersonalDetailsTypeID, - "passportElementTypePassport": PassportElementTypePassportTypeID, - "passportElementTypeDriverLicense": PassportElementTypeDriverLicenseTypeID, - "passportElementTypeIdentityCard": PassportElementTypeIdentityCardTypeID, - "passportElementTypeInternalPassport": PassportElementTypeInternalPassportTypeID, - "passportElementTypeAddress": PassportElementTypeAddressTypeID, - "passportElementTypeUtilityBill": PassportElementTypeUtilityBillTypeID, - "passportElementTypeBankStatement": PassportElementTypeBankStatementTypeID, - "passportElementTypeRentalAgreement": PassportElementTypeRentalAgreementTypeID, - "passportElementTypePassportRegistration": PassportElementTypePassportRegistrationTypeID, - "passportElementTypeTemporaryRegistration": PassportElementTypeTemporaryRegistrationTypeID, - "passportElementTypePhoneNumber": PassportElementTypePhoneNumberTypeID, - "passportElementTypeEmailAddress": PassportElementTypeEmailAddressTypeID, - "date": DateTypeID, - "personalDetails": PersonalDetailsTypeID, - "identityDocument": IdentityDocumentTypeID, - "inputIdentityDocument": InputIdentityDocumentTypeID, - "personalDocument": PersonalDocumentTypeID, - "inputPersonalDocument": InputPersonalDocumentTypeID, - "passportElementPersonalDetails": PassportElementPersonalDetailsTypeID, - "passportElementPassport": PassportElementPassportTypeID, - "passportElementDriverLicense": PassportElementDriverLicenseTypeID, - "passportElementIdentityCard": PassportElementIdentityCardTypeID, - "passportElementInternalPassport": PassportElementInternalPassportTypeID, - "passportElementAddress": PassportElementAddressTypeID, - "passportElementUtilityBill": PassportElementUtilityBillTypeID, - "passportElementBankStatement": PassportElementBankStatementTypeID, - "passportElementRentalAgreement": PassportElementRentalAgreementTypeID, - "passportElementPassportRegistration": PassportElementPassportRegistrationTypeID, - "passportElementTemporaryRegistration": PassportElementTemporaryRegistrationTypeID, - "passportElementPhoneNumber": PassportElementPhoneNumberTypeID, - "passportElementEmailAddress": PassportElementEmailAddressTypeID, - "inputPassportElementPersonalDetails": InputPassportElementPersonalDetailsTypeID, - "inputPassportElementPassport": InputPassportElementPassportTypeID, - "inputPassportElementDriverLicense": InputPassportElementDriverLicenseTypeID, - "inputPassportElementIdentityCard": InputPassportElementIdentityCardTypeID, - "inputPassportElementInternalPassport": InputPassportElementInternalPassportTypeID, - "inputPassportElementAddress": InputPassportElementAddressTypeID, - "inputPassportElementUtilityBill": InputPassportElementUtilityBillTypeID, - "inputPassportElementBankStatement": InputPassportElementBankStatementTypeID, - "inputPassportElementRentalAgreement": InputPassportElementRentalAgreementTypeID, - "inputPassportElementPassportRegistration": InputPassportElementPassportRegistrationTypeID, - "inputPassportElementTemporaryRegistration": InputPassportElementTemporaryRegistrationTypeID, - "inputPassportElementPhoneNumber": InputPassportElementPhoneNumberTypeID, - "inputPassportElementEmailAddress": InputPassportElementEmailAddressTypeID, - "passportElements": PassportElementsTypeID, - "passportElementErrorSourceUnspecified": PassportElementErrorSourceUnspecifiedTypeID, - "passportElementErrorSourceDataField": PassportElementErrorSourceDataFieldTypeID, - "passportElementErrorSourceFrontSide": PassportElementErrorSourceFrontSideTypeID, - "passportElementErrorSourceReverseSide": PassportElementErrorSourceReverseSideTypeID, - "passportElementErrorSourceSelfie": PassportElementErrorSourceSelfieTypeID, - "passportElementErrorSourceTranslationFile": PassportElementErrorSourceTranslationFileTypeID, - "passportElementErrorSourceTranslationFiles": PassportElementErrorSourceTranslationFilesTypeID, - "passportElementErrorSourceFile": PassportElementErrorSourceFileTypeID, - "passportElementErrorSourceFiles": PassportElementErrorSourceFilesTypeID, - "passportElementError": PassportElementErrorTypeID, - "passportSuitableElement": PassportSuitableElementTypeID, - "passportRequiredElement": PassportRequiredElementTypeID, - "passportAuthorizationForm": PassportAuthorizationFormTypeID, - "passportElementsWithErrors": PassportElementsWithErrorsTypeID, - "encryptedCredentials": EncryptedCredentialsTypeID, - "encryptedPassportElement": EncryptedPassportElementTypeID, - "inputPassportElementErrorSourceUnspecified": InputPassportElementErrorSourceUnspecifiedTypeID, - "inputPassportElementErrorSourceDataField": InputPassportElementErrorSourceDataFieldTypeID, - "inputPassportElementErrorSourceFrontSide": InputPassportElementErrorSourceFrontSideTypeID, - "inputPassportElementErrorSourceReverseSide": InputPassportElementErrorSourceReverseSideTypeID, - "inputPassportElementErrorSourceSelfie": InputPassportElementErrorSourceSelfieTypeID, - "inputPassportElementErrorSourceTranslationFile": InputPassportElementErrorSourceTranslationFileTypeID, - "inputPassportElementErrorSourceTranslationFiles": InputPassportElementErrorSourceTranslationFilesTypeID, - "inputPassportElementErrorSourceFile": InputPassportElementErrorSourceFileTypeID, - "inputPassportElementErrorSourceFiles": InputPassportElementErrorSourceFilesTypeID, - "inputPassportElementError": InputPassportElementErrorTypeID, - "messageText": MessageTextTypeID, - "messageAnimation": MessageAnimationTypeID, - "messageAudio": MessageAudioTypeID, - "messageDocument": MessageDocumentTypeID, - "messagePhoto": MessagePhotoTypeID, - "messageExpiredPhoto": MessageExpiredPhotoTypeID, - "messageSticker": MessageStickerTypeID, - "messageVideo": MessageVideoTypeID, - "messageExpiredVideo": MessageExpiredVideoTypeID, - "messageVideoNote": MessageVideoNoteTypeID, - "messageVoiceNote": MessageVoiceNoteTypeID, - "messageLocation": MessageLocationTypeID, - "messageVenue": MessageVenueTypeID, - "messageContact": MessageContactTypeID, - "messageAnimatedEmoji": MessageAnimatedEmojiTypeID, - "messageDice": MessageDiceTypeID, - "messageGame": MessageGameTypeID, - "messagePoll": MessagePollTypeID, - "messageStory": MessageStoryTypeID, - "messageInvoice": MessageInvoiceTypeID, - "messageCall": MessageCallTypeID, - "messageVideoChatScheduled": MessageVideoChatScheduledTypeID, - "messageVideoChatStarted": MessageVideoChatStartedTypeID, - "messageVideoChatEnded": MessageVideoChatEndedTypeID, - "messageInviteVideoChatParticipants": MessageInviteVideoChatParticipantsTypeID, - "messageBasicGroupChatCreate": MessageBasicGroupChatCreateTypeID, - "messageSupergroupChatCreate": MessageSupergroupChatCreateTypeID, - "messageChatChangeTitle": MessageChatChangeTitleTypeID, - "messageChatChangePhoto": MessageChatChangePhotoTypeID, - "messageChatDeletePhoto": MessageChatDeletePhotoTypeID, - "messageChatAddMembers": MessageChatAddMembersTypeID, - "messageChatJoinByLink": MessageChatJoinByLinkTypeID, - "messageChatJoinByRequest": MessageChatJoinByRequestTypeID, - "messageChatDeleteMember": MessageChatDeleteMemberTypeID, - "messageChatUpgradeTo": MessageChatUpgradeToTypeID, - "messageChatUpgradeFrom": MessageChatUpgradeFromTypeID, - "messagePinMessage": MessagePinMessageTypeID, - "messageScreenshotTaken": MessageScreenshotTakenTypeID, - "messageChatSetBackground": MessageChatSetBackgroundTypeID, - "messageChatSetTheme": MessageChatSetThemeTypeID, - "messageChatSetMessageAutoDeleteTime": MessageChatSetMessageAutoDeleteTimeTypeID, - "messageForumTopicCreated": MessageForumTopicCreatedTypeID, - "messageForumTopicEdited": MessageForumTopicEditedTypeID, - "messageForumTopicIsClosedToggled": MessageForumTopicIsClosedToggledTypeID, - "messageForumTopicIsHiddenToggled": MessageForumTopicIsHiddenToggledTypeID, - "messageSuggestProfilePhoto": MessageSuggestProfilePhotoTypeID, - "messageCustomServiceAction": MessageCustomServiceActionTypeID, - "messageGameScore": MessageGameScoreTypeID, - "messagePaymentSuccessful": MessagePaymentSuccessfulTypeID, - "messagePaymentSuccessfulBot": MessagePaymentSuccessfulBotTypeID, - "messageGiftedPremium": MessageGiftedPremiumTypeID, - "messageContactRegistered": MessageContactRegisteredTypeID, - "messageUserShared": MessageUserSharedTypeID, - "messageChatShared": MessageChatSharedTypeID, - "messageWebsiteConnected": MessageWebsiteConnectedTypeID, - "messageBotWriteAccessAllowed": MessageBotWriteAccessAllowedTypeID, - "messageWebAppDataSent": MessageWebAppDataSentTypeID, - "messageWebAppDataReceived": MessageWebAppDataReceivedTypeID, - "messagePassportDataSent": MessagePassportDataSentTypeID, - "messagePassportDataReceived": MessagePassportDataReceivedTypeID, - "messageProximityAlertTriggered": MessageProximityAlertTriggeredTypeID, - "messageUnsupported": MessageUnsupportedTypeID, - "textEntityTypeMention": TextEntityTypeMentionTypeID, - "textEntityTypeHashtag": TextEntityTypeHashtagTypeID, - "textEntityTypeCashtag": TextEntityTypeCashtagTypeID, - "textEntityTypeBotCommand": TextEntityTypeBotCommandTypeID, - "textEntityTypeUrl": TextEntityTypeURLTypeID, - "textEntityTypeEmailAddress": TextEntityTypeEmailAddressTypeID, - "textEntityTypePhoneNumber": TextEntityTypePhoneNumberTypeID, - "textEntityTypeBankCardNumber": TextEntityTypeBankCardNumberTypeID, - "textEntityTypeBold": TextEntityTypeBoldTypeID, - "textEntityTypeItalic": TextEntityTypeItalicTypeID, - "textEntityTypeUnderline": TextEntityTypeUnderlineTypeID, - "textEntityTypeStrikethrough": TextEntityTypeStrikethroughTypeID, - "textEntityTypeSpoiler": TextEntityTypeSpoilerTypeID, - "textEntityTypeCode": TextEntityTypeCodeTypeID, - "textEntityTypePre": TextEntityTypePreTypeID, - "textEntityTypePreCode": TextEntityTypePreCodeTypeID, - "textEntityTypeTextUrl": TextEntityTypeTextURLTypeID, - "textEntityTypeMentionName": TextEntityTypeMentionNameTypeID, - "textEntityTypeCustomEmoji": TextEntityTypeCustomEmojiTypeID, - "textEntityTypeMediaTimestamp": TextEntityTypeMediaTimestampTypeID, - "inputThumbnail": InputThumbnailTypeID, - "messageSchedulingStateSendAtDate": MessageSchedulingStateSendAtDateTypeID, - "messageSchedulingStateSendWhenOnline": MessageSchedulingStateSendWhenOnlineTypeID, - "messageSendOptions": MessageSendOptionsTypeID, - "messageCopyOptions": MessageCopyOptionsTypeID, - "inputMessageText": InputMessageTextTypeID, - "inputMessageAnimation": InputMessageAnimationTypeID, - "inputMessageAudio": InputMessageAudioTypeID, - "inputMessageDocument": InputMessageDocumentTypeID, - "inputMessagePhoto": InputMessagePhotoTypeID, - "inputMessageSticker": InputMessageStickerTypeID, - "inputMessageVideo": InputMessageVideoTypeID, - "inputMessageVideoNote": InputMessageVideoNoteTypeID, - "inputMessageVoiceNote": InputMessageVoiceNoteTypeID, - "inputMessageLocation": InputMessageLocationTypeID, - "inputMessageVenue": InputMessageVenueTypeID, - "inputMessageContact": InputMessageContactTypeID, - "inputMessageDice": InputMessageDiceTypeID, - "inputMessageGame": InputMessageGameTypeID, - "inputMessageInvoice": InputMessageInvoiceTypeID, - "inputMessagePoll": InputMessagePollTypeID, - "inputMessageStory": InputMessageStoryTypeID, - "inputMessageForwarded": InputMessageForwardedTypeID, - "searchMessagesFilterEmpty": SearchMessagesFilterEmptyTypeID, - "searchMessagesFilterAnimation": SearchMessagesFilterAnimationTypeID, - "searchMessagesFilterAudio": SearchMessagesFilterAudioTypeID, - "searchMessagesFilterDocument": SearchMessagesFilterDocumentTypeID, - "searchMessagesFilterPhoto": SearchMessagesFilterPhotoTypeID, - "searchMessagesFilterVideo": SearchMessagesFilterVideoTypeID, - "searchMessagesFilterVoiceNote": SearchMessagesFilterVoiceNoteTypeID, - "searchMessagesFilterPhotoAndVideo": SearchMessagesFilterPhotoAndVideoTypeID, - "searchMessagesFilterUrl": SearchMessagesFilterURLTypeID, - "searchMessagesFilterChatPhoto": SearchMessagesFilterChatPhotoTypeID, - "searchMessagesFilterVideoNote": SearchMessagesFilterVideoNoteTypeID, - "searchMessagesFilterVoiceAndVideoNote": SearchMessagesFilterVoiceAndVideoNoteTypeID, - "searchMessagesFilterMention": SearchMessagesFilterMentionTypeID, - "searchMessagesFilterUnreadMention": SearchMessagesFilterUnreadMentionTypeID, - "searchMessagesFilterUnreadReaction": SearchMessagesFilterUnreadReactionTypeID, - "searchMessagesFilterFailedToSend": SearchMessagesFilterFailedToSendTypeID, - "searchMessagesFilterPinned": SearchMessagesFilterPinnedTypeID, - "chatActionTyping": ChatActionTypingTypeID, - "chatActionRecordingVideo": ChatActionRecordingVideoTypeID, - "chatActionUploadingVideo": ChatActionUploadingVideoTypeID, - "chatActionRecordingVoiceNote": ChatActionRecordingVoiceNoteTypeID, - "chatActionUploadingVoiceNote": ChatActionUploadingVoiceNoteTypeID, - "chatActionUploadingPhoto": ChatActionUploadingPhotoTypeID, - "chatActionUploadingDocument": ChatActionUploadingDocumentTypeID, - "chatActionChoosingSticker": ChatActionChoosingStickerTypeID, - "chatActionChoosingLocation": ChatActionChoosingLocationTypeID, - "chatActionChoosingContact": ChatActionChoosingContactTypeID, - "chatActionStartPlayingGame": ChatActionStartPlayingGameTypeID, - "chatActionRecordingVideoNote": ChatActionRecordingVideoNoteTypeID, - "chatActionUploadingVideoNote": ChatActionUploadingVideoNoteTypeID, - "chatActionWatchingAnimations": ChatActionWatchingAnimationsTypeID, - "chatActionCancel": ChatActionCancelTypeID, - "userStatusEmpty": UserStatusEmptyTypeID, - "userStatusOnline": UserStatusOnlineTypeID, - "userStatusOffline": UserStatusOfflineTypeID, - "userStatusRecently": UserStatusRecentlyTypeID, - "userStatusLastWeek": UserStatusLastWeekTypeID, - "userStatusLastMonth": UserStatusLastMonthTypeID, - "stickers": StickersTypeID, - "emojis": EmojisTypeID, - "stickerSet": StickerSetTypeID, - "stickerSetInfo": StickerSetInfoTypeID, - "stickerSets": StickerSetsTypeID, - "trendingStickerSets": TrendingStickerSetsTypeID, - "emojiCategory": EmojiCategoryTypeID, - "emojiCategories": EmojiCategoriesTypeID, - "emojiCategoryTypeDefault": EmojiCategoryTypeDefaultTypeID, - "emojiCategoryTypeEmojiStatus": EmojiCategoryTypeEmojiStatusTypeID, - "emojiCategoryTypeChatPhoto": EmojiCategoryTypeChatPhotoTypeID, - "storyViewer": StoryViewerTypeID, - "storyViewers": StoryViewersTypeID, - "storyAreaPosition": StoryAreaPositionTypeID, - "storyAreaTypeLocation": StoryAreaTypeLocationTypeID, - "storyAreaTypeVenue": StoryAreaTypeVenueTypeID, - "storyArea": StoryAreaTypeID, - "inputStoryAreaTypeLocation": InputStoryAreaTypeLocationTypeID, - "inputStoryAreaTypeFoundVenue": InputStoryAreaTypeFoundVenueTypeID, - "inputStoryAreaTypePreviousVenue": InputStoryAreaTypePreviousVenueTypeID, - "inputStoryArea": InputStoryAreaTypeID, - "inputStoryAreas": InputStoryAreasTypeID, - "storyVideo": StoryVideoTypeID, - "storyContentPhoto": StoryContentPhotoTypeID, - "storyContentVideo": StoryContentVideoTypeID, - "storyContentUnsupported": StoryContentUnsupportedTypeID, - "inputStoryContentPhoto": InputStoryContentPhotoTypeID, - "inputStoryContentVideo": InputStoryContentVideoTypeID, - "storyListMain": StoryListMainTypeID, - "storyListArchive": StoryListArchiveTypeID, - "storyInteractionInfo": StoryInteractionInfoTypeID, - "story": StoryTypeID, - "stories": StoriesTypeID, - "storyInfo": StoryInfoTypeID, - "chatActiveStories": ChatActiveStoriesTypeID, - "callDiscardReasonEmpty": CallDiscardReasonEmptyTypeID, - "callDiscardReasonMissed": CallDiscardReasonMissedTypeID, - "callDiscardReasonDeclined": CallDiscardReasonDeclinedTypeID, - "callDiscardReasonDisconnected": CallDiscardReasonDisconnectedTypeID, - "callDiscardReasonHungUp": CallDiscardReasonHungUpTypeID, - "callProtocol": CallProtocolTypeID, - "callServerTypeTelegramReflector": CallServerTypeTelegramReflectorTypeID, - "callServerTypeWebrtc": CallServerTypeWebrtcTypeID, - "callServer": CallServerTypeID, - "callId": CallIDTypeID, - "groupCallId": GroupCallIDTypeID, - "callStatePending": CallStatePendingTypeID, - "callStateExchangingKeys": CallStateExchangingKeysTypeID, - "callStateReady": CallStateReadyTypeID, - "callStateHangingUp": CallStateHangingUpTypeID, - "callStateDiscarded": CallStateDiscardedTypeID, - "callStateError": CallStateErrorTypeID, - "groupCallVideoQualityThumbnail": GroupCallVideoQualityThumbnailTypeID, - "groupCallVideoQualityMedium": GroupCallVideoQualityMediumTypeID, - "groupCallVideoQualityFull": GroupCallVideoQualityFullTypeID, - "groupCallStream": GroupCallStreamTypeID, - "groupCallStreams": GroupCallStreamsTypeID, - "rtmpUrl": RtmpURLTypeID, - "groupCallRecentSpeaker": GroupCallRecentSpeakerTypeID, - "groupCall": GroupCallTypeID, - "groupCallVideoSourceGroup": GroupCallVideoSourceGroupTypeID, - "groupCallParticipantVideoInfo": GroupCallParticipantVideoInfoTypeID, - "groupCallParticipant": GroupCallParticipantTypeID, - "callProblemEcho": CallProblemEchoTypeID, - "callProblemNoise": CallProblemNoiseTypeID, - "callProblemInterruptions": CallProblemInterruptionsTypeID, - "callProblemDistortedSpeech": CallProblemDistortedSpeechTypeID, - "callProblemSilentLocal": CallProblemSilentLocalTypeID, - "callProblemSilentRemote": CallProblemSilentRemoteTypeID, - "callProblemDropped": CallProblemDroppedTypeID, - "callProblemDistortedVideo": CallProblemDistortedVideoTypeID, - "callProblemPixelatedVideo": CallProblemPixelatedVideoTypeID, - "call": CallTypeID, - "firebaseAuthenticationSettingsAndroid": FirebaseAuthenticationSettingsAndroidTypeID, - "firebaseAuthenticationSettingsIos": FirebaseAuthenticationSettingsIosTypeID, - "phoneNumberAuthenticationSettings": PhoneNumberAuthenticationSettingsTypeID, - "addedReaction": AddedReactionTypeID, - "addedReactions": AddedReactionsTypeID, - "availableReaction": AvailableReactionTypeID, - "availableReactions": AvailableReactionsTypeID, - "emojiReaction": EmojiReactionTypeID, - "animations": AnimationsTypeID, - "diceStickersRegular": DiceStickersRegularTypeID, - "diceStickersSlotMachine": DiceStickersSlotMachineTypeID, - "importedContacts": ImportedContactsTypeID, - "speechRecognitionResultPending": SpeechRecognitionResultPendingTypeID, - "speechRecognitionResultText": SpeechRecognitionResultTextTypeID, - "speechRecognitionResultError": SpeechRecognitionResultErrorTypeID, - "attachmentMenuBotColor": AttachmentMenuBotColorTypeID, - "attachmentMenuBot": AttachmentMenuBotTypeID, - "sentWebAppMessage": SentWebAppMessageTypeID, - "httpUrl": HTTPURLTypeID, - "userLink": UserLinkTypeID, - "inputInlineQueryResultAnimation": InputInlineQueryResultAnimationTypeID, - "inputInlineQueryResultArticle": InputInlineQueryResultArticleTypeID, - "inputInlineQueryResultAudio": InputInlineQueryResultAudioTypeID, - "inputInlineQueryResultContact": InputInlineQueryResultContactTypeID, - "inputInlineQueryResultDocument": InputInlineQueryResultDocumentTypeID, - "inputInlineQueryResultGame": InputInlineQueryResultGameTypeID, - "inputInlineQueryResultLocation": InputInlineQueryResultLocationTypeID, - "inputInlineQueryResultPhoto": InputInlineQueryResultPhotoTypeID, - "inputInlineQueryResultSticker": InputInlineQueryResultStickerTypeID, - "inputInlineQueryResultVenue": InputInlineQueryResultVenueTypeID, - "inputInlineQueryResultVideo": InputInlineQueryResultVideoTypeID, - "inputInlineQueryResultVoiceNote": InputInlineQueryResultVoiceNoteTypeID, - "inlineQueryResultArticle": InlineQueryResultArticleTypeID, - "inlineQueryResultContact": InlineQueryResultContactTypeID, - "inlineQueryResultLocation": InlineQueryResultLocationTypeID, - "inlineQueryResultVenue": InlineQueryResultVenueTypeID, - "inlineQueryResultGame": InlineQueryResultGameTypeID, - "inlineQueryResultAnimation": InlineQueryResultAnimationTypeID, - "inlineQueryResultAudio": InlineQueryResultAudioTypeID, - "inlineQueryResultDocument": InlineQueryResultDocumentTypeID, - "inlineQueryResultPhoto": InlineQueryResultPhotoTypeID, - "inlineQueryResultSticker": InlineQueryResultStickerTypeID, - "inlineQueryResultVideo": InlineQueryResultVideoTypeID, - "inlineQueryResultVoiceNote": InlineQueryResultVoiceNoteTypeID, - "inlineQueryResultsButtonTypeStartBot": InlineQueryResultsButtonTypeStartBotTypeID, - "inlineQueryResultsButtonTypeWebApp": InlineQueryResultsButtonTypeWebAppTypeID, - "inlineQueryResultsButton": InlineQueryResultsButtonTypeID, - "inlineQueryResults": InlineQueryResultsTypeID, - "callbackQueryPayloadData": CallbackQueryPayloadDataTypeID, - "callbackQueryPayloadDataWithPassword": CallbackQueryPayloadDataWithPasswordTypeID, - "callbackQueryPayloadGame": CallbackQueryPayloadGameTypeID, - "callbackQueryAnswer": CallbackQueryAnswerTypeID, - "customRequestResult": CustomRequestResultTypeID, - "gameHighScore": GameHighScoreTypeID, - "gameHighScores": GameHighScoresTypeID, - "chatEventMessageEdited": ChatEventMessageEditedTypeID, - "chatEventMessageDeleted": ChatEventMessageDeletedTypeID, - "chatEventMessagePinned": ChatEventMessagePinnedTypeID, - "chatEventMessageUnpinned": ChatEventMessageUnpinnedTypeID, - "chatEventPollStopped": ChatEventPollStoppedTypeID, - "chatEventMemberJoined": ChatEventMemberJoinedTypeID, - "chatEventMemberJoinedByInviteLink": ChatEventMemberJoinedByInviteLinkTypeID, - "chatEventMemberJoinedByRequest": ChatEventMemberJoinedByRequestTypeID, - "chatEventMemberInvited": ChatEventMemberInvitedTypeID, - "chatEventMemberLeft": ChatEventMemberLeftTypeID, - "chatEventMemberPromoted": ChatEventMemberPromotedTypeID, - "chatEventMemberRestricted": ChatEventMemberRestrictedTypeID, - "chatEventAvailableReactionsChanged": ChatEventAvailableReactionsChangedTypeID, - "chatEventDescriptionChanged": ChatEventDescriptionChangedTypeID, - "chatEventLinkedChatChanged": ChatEventLinkedChatChangedTypeID, - "chatEventLocationChanged": ChatEventLocationChangedTypeID, - "chatEventMessageAutoDeleteTimeChanged": ChatEventMessageAutoDeleteTimeChangedTypeID, - "chatEventPermissionsChanged": ChatEventPermissionsChangedTypeID, - "chatEventPhotoChanged": ChatEventPhotoChangedTypeID, - "chatEventSlowModeDelayChanged": ChatEventSlowModeDelayChangedTypeID, - "chatEventStickerSetChanged": ChatEventStickerSetChangedTypeID, - "chatEventTitleChanged": ChatEventTitleChangedTypeID, - "chatEventUsernameChanged": ChatEventUsernameChangedTypeID, - "chatEventActiveUsernamesChanged": ChatEventActiveUsernamesChangedTypeID, - "chatEventHasProtectedContentToggled": ChatEventHasProtectedContentToggledTypeID, - "chatEventInvitesToggled": ChatEventInvitesToggledTypeID, - "chatEventIsAllHistoryAvailableToggled": ChatEventIsAllHistoryAvailableToggledTypeID, - "chatEventHasAggressiveAntiSpamEnabledToggled": ChatEventHasAggressiveAntiSpamEnabledToggledTypeID, - "chatEventSignMessagesToggled": ChatEventSignMessagesToggledTypeID, - "chatEventInviteLinkEdited": ChatEventInviteLinkEditedTypeID, - "chatEventInviteLinkRevoked": ChatEventInviteLinkRevokedTypeID, - "chatEventInviteLinkDeleted": ChatEventInviteLinkDeletedTypeID, - "chatEventVideoChatCreated": ChatEventVideoChatCreatedTypeID, - "chatEventVideoChatEnded": ChatEventVideoChatEndedTypeID, - "chatEventVideoChatMuteNewParticipantsToggled": ChatEventVideoChatMuteNewParticipantsToggledTypeID, - "chatEventVideoChatParticipantIsMutedToggled": ChatEventVideoChatParticipantIsMutedToggledTypeID, - "chatEventVideoChatParticipantVolumeLevelChanged": ChatEventVideoChatParticipantVolumeLevelChangedTypeID, - "chatEventIsForumToggled": ChatEventIsForumToggledTypeID, - "chatEventForumTopicCreated": ChatEventForumTopicCreatedTypeID, - "chatEventForumTopicEdited": ChatEventForumTopicEditedTypeID, - "chatEventForumTopicToggleIsClosed": ChatEventForumTopicToggleIsClosedTypeID, - "chatEventForumTopicToggleIsHidden": ChatEventForumTopicToggleIsHiddenTypeID, - "chatEventForumTopicDeleted": ChatEventForumTopicDeletedTypeID, - "chatEventForumTopicPinned": ChatEventForumTopicPinnedTypeID, - "chatEvent": ChatEventTypeID, - "chatEvents": ChatEventsTypeID, - "chatEventLogFilters": ChatEventLogFiltersTypeID, - "languagePackStringValueOrdinary": LanguagePackStringValueOrdinaryTypeID, - "languagePackStringValuePluralized": LanguagePackStringValuePluralizedTypeID, - "languagePackStringValueDeleted": LanguagePackStringValueDeletedTypeID, - "languagePackString": LanguagePackStringTypeID, - "languagePackStrings": LanguagePackStringsTypeID, - "languagePackInfo": LanguagePackInfoTypeID, - "localizationTargetInfo": LocalizationTargetInfoTypeID, - "premiumLimitTypeSupergroupCount": PremiumLimitTypeSupergroupCountTypeID, - "premiumLimitTypePinnedChatCount": PremiumLimitTypePinnedChatCountTypeID, - "premiumLimitTypeCreatedPublicChatCount": PremiumLimitTypeCreatedPublicChatCountTypeID, - "premiumLimitTypeSavedAnimationCount": PremiumLimitTypeSavedAnimationCountTypeID, - "premiumLimitTypeFavoriteStickerCount": PremiumLimitTypeFavoriteStickerCountTypeID, - "premiumLimitTypeChatFolderCount": PremiumLimitTypeChatFolderCountTypeID, - "premiumLimitTypeChatFolderChosenChatCount": PremiumLimitTypeChatFolderChosenChatCountTypeID, - "premiumLimitTypePinnedArchivedChatCount": PremiumLimitTypePinnedArchivedChatCountTypeID, - "premiumLimitTypeCaptionLength": PremiumLimitTypeCaptionLengthTypeID, - "premiumLimitTypeBioLength": PremiumLimitTypeBioLengthTypeID, - "premiumLimitTypeChatFolderInviteLinkCount": PremiumLimitTypeChatFolderInviteLinkCountTypeID, - "premiumLimitTypeShareableChatFolderCount": PremiumLimitTypeShareableChatFolderCountTypeID, - "premiumLimitTypeActiveStoryCount": PremiumLimitTypeActiveStoryCountTypeID, - "premiumLimitTypeWeeklySentStoryCount": PremiumLimitTypeWeeklySentStoryCountTypeID, - "premiumLimitTypeMonthlySentStoryCount": PremiumLimitTypeMonthlySentStoryCountTypeID, - "premiumLimitTypeStoryCaptionLength": PremiumLimitTypeStoryCaptionLengthTypeID, - "premiumFeatureIncreasedLimits": PremiumFeatureIncreasedLimitsTypeID, - "premiumFeatureIncreasedUploadFileSize": PremiumFeatureIncreasedUploadFileSizeTypeID, - "premiumFeatureImprovedDownloadSpeed": PremiumFeatureImprovedDownloadSpeedTypeID, - "premiumFeatureVoiceRecognition": PremiumFeatureVoiceRecognitionTypeID, - "premiumFeatureDisabledAds": PremiumFeatureDisabledAdsTypeID, - "premiumFeatureUniqueReactions": PremiumFeatureUniqueReactionsTypeID, - "premiumFeatureUniqueStickers": PremiumFeatureUniqueStickersTypeID, - "premiumFeatureCustomEmoji": PremiumFeatureCustomEmojiTypeID, - "premiumFeatureAdvancedChatManagement": PremiumFeatureAdvancedChatManagementTypeID, - "premiumFeatureProfileBadge": PremiumFeatureProfileBadgeTypeID, - "premiumFeatureEmojiStatus": PremiumFeatureEmojiStatusTypeID, - "premiumFeatureAnimatedProfilePhoto": PremiumFeatureAnimatedProfilePhotoTypeID, - "premiumFeatureForumTopicIcon": PremiumFeatureForumTopicIconTypeID, - "premiumFeatureAppIcons": PremiumFeatureAppIconsTypeID, - "premiumFeatureRealTimeChatTranslation": PremiumFeatureRealTimeChatTranslationTypeID, - "premiumFeatureUpgradedStories": PremiumFeatureUpgradedStoriesTypeID, - "premiumStoryFeaturePriorityOrder": PremiumStoryFeaturePriorityOrderTypeID, - "premiumStoryFeatureStealthMode": PremiumStoryFeatureStealthModeTypeID, - "premiumStoryFeaturePermanentViewsHistory": PremiumStoryFeaturePermanentViewsHistoryTypeID, - "premiumStoryFeatureCustomExpirationDuration": PremiumStoryFeatureCustomExpirationDurationTypeID, - "premiumStoryFeatureSaveStories": PremiumStoryFeatureSaveStoriesTypeID, - "premiumStoryFeatureLinksAndFormatting": PremiumStoryFeatureLinksAndFormattingTypeID, - "premiumLimit": PremiumLimitTypeID, - "premiumFeatures": PremiumFeaturesTypeID, - "premiumSourceLimitExceeded": PremiumSourceLimitExceededTypeID, - "premiumSourceFeature": PremiumSourceFeatureTypeID, - "premiumSourceStoryFeature": PremiumSourceStoryFeatureTypeID, - "premiumSourceLink": PremiumSourceLinkTypeID, - "premiumSourceSettings": PremiumSourceSettingsTypeID, - "premiumFeaturePromotionAnimation": PremiumFeaturePromotionAnimationTypeID, - "premiumState": PremiumStateTypeID, - "storePaymentPurposePremiumSubscription": StorePaymentPurposePremiumSubscriptionTypeID, - "storePaymentPurposeGiftedPremium": StorePaymentPurposeGiftedPremiumTypeID, - "deviceTokenFirebaseCloudMessaging": DeviceTokenFirebaseCloudMessagingTypeID, - "deviceTokenApplePush": DeviceTokenApplePushTypeID, - "deviceTokenApplePushVoIP": DeviceTokenApplePushVoIPTypeID, - "deviceTokenWindowsPush": DeviceTokenWindowsPushTypeID, - "deviceTokenMicrosoftPush": DeviceTokenMicrosoftPushTypeID, - "deviceTokenMicrosoftPushVoIP": DeviceTokenMicrosoftPushVoIPTypeID, - "deviceTokenWebPush": DeviceTokenWebPushTypeID, - "deviceTokenSimplePush": DeviceTokenSimplePushTypeID, - "deviceTokenUbuntuPush": DeviceTokenUbuntuPushTypeID, - "deviceTokenBlackBerryPush": DeviceTokenBlackBerryPushTypeID, - "deviceTokenTizenPush": DeviceTokenTizenPushTypeID, - "deviceTokenHuaweiPush": DeviceTokenHuaweiPushTypeID, - "pushReceiverId": PushReceiverIDTypeID, - "backgroundFillSolid": BackgroundFillSolidTypeID, - "backgroundFillGradient": BackgroundFillGradientTypeID, - "backgroundFillFreeformGradient": BackgroundFillFreeformGradientTypeID, - "backgroundTypeWallpaper": BackgroundTypeWallpaperTypeID, - "backgroundTypePattern": BackgroundTypePatternTypeID, - "backgroundTypeFill": BackgroundTypeFillTypeID, - "inputBackgroundLocal": InputBackgroundLocalTypeID, - "inputBackgroundRemote": InputBackgroundRemoteTypeID, - "inputBackgroundPrevious": InputBackgroundPreviousTypeID, - "themeSettings": ThemeSettingsTypeID, - "chatTheme": ChatThemeTypeID, - "hashtags": HashtagsTypeID, - "canSendStoryResultOk": CanSendStoryResultOkTypeID, - "canSendStoryResultPremiumNeeded": CanSendStoryResultPremiumNeededTypeID, - "canSendStoryResultActiveStoryLimitExceeded": CanSendStoryResultActiveStoryLimitExceededTypeID, - "canSendStoryResultWeeklyLimitExceeded": CanSendStoryResultWeeklyLimitExceededTypeID, - "canSendStoryResultMonthlyLimitExceeded": CanSendStoryResultMonthlyLimitExceededTypeID, - "canTransferOwnershipResultOk": CanTransferOwnershipResultOkTypeID, - "canTransferOwnershipResultPasswordNeeded": CanTransferOwnershipResultPasswordNeededTypeID, - "canTransferOwnershipResultPasswordTooFresh": CanTransferOwnershipResultPasswordTooFreshTypeID, - "canTransferOwnershipResultSessionTooFresh": CanTransferOwnershipResultSessionTooFreshTypeID, - "checkChatUsernameResultOk": CheckChatUsernameResultOkTypeID, - "checkChatUsernameResultUsernameInvalid": CheckChatUsernameResultUsernameInvalidTypeID, - "checkChatUsernameResultUsernameOccupied": CheckChatUsernameResultUsernameOccupiedTypeID, - "checkChatUsernameResultUsernamePurchasable": CheckChatUsernameResultUsernamePurchasableTypeID, - "checkChatUsernameResultPublicChatsTooMany": CheckChatUsernameResultPublicChatsTooManyTypeID, - "checkChatUsernameResultPublicGroupsUnavailable": CheckChatUsernameResultPublicGroupsUnavailableTypeID, - "checkStickerSetNameResultOk": CheckStickerSetNameResultOkTypeID, - "checkStickerSetNameResultNameInvalid": CheckStickerSetNameResultNameInvalidTypeID, - "checkStickerSetNameResultNameOccupied": CheckStickerSetNameResultNameOccupiedTypeID, - "resetPasswordResultOk": ResetPasswordResultOkTypeID, - "resetPasswordResultPending": ResetPasswordResultPendingTypeID, - "resetPasswordResultDeclined": ResetPasswordResultDeclinedTypeID, - "messageFileTypePrivate": MessageFileTypePrivateTypeID, - "messageFileTypeGroup": MessageFileTypeGroupTypeID, - "messageFileTypeUnknown": MessageFileTypeUnknownTypeID, - "pushMessageContentHidden": PushMessageContentHiddenTypeID, - "pushMessageContentAnimation": PushMessageContentAnimationTypeID, - "pushMessageContentAudio": PushMessageContentAudioTypeID, - "pushMessageContentContact": PushMessageContentContactTypeID, - "pushMessageContentContactRegistered": PushMessageContentContactRegisteredTypeID, - "pushMessageContentDocument": PushMessageContentDocumentTypeID, - "pushMessageContentGame": PushMessageContentGameTypeID, - "pushMessageContentGameScore": PushMessageContentGameScoreTypeID, - "pushMessageContentInvoice": PushMessageContentInvoiceTypeID, - "pushMessageContentLocation": PushMessageContentLocationTypeID, - "pushMessageContentPhoto": PushMessageContentPhotoTypeID, - "pushMessageContentPoll": PushMessageContentPollTypeID, - "pushMessageContentScreenshotTaken": PushMessageContentScreenshotTakenTypeID, - "pushMessageContentSticker": PushMessageContentStickerTypeID, - "pushMessageContentStory": PushMessageContentStoryTypeID, - "pushMessageContentText": PushMessageContentTextTypeID, - "pushMessageContentVideo": PushMessageContentVideoTypeID, - "pushMessageContentVideoNote": PushMessageContentVideoNoteTypeID, - "pushMessageContentVoiceNote": PushMessageContentVoiceNoteTypeID, - "pushMessageContentBasicGroupChatCreate": PushMessageContentBasicGroupChatCreateTypeID, - "pushMessageContentChatAddMembers": PushMessageContentChatAddMembersTypeID, - "pushMessageContentChatChangePhoto": PushMessageContentChatChangePhotoTypeID, - "pushMessageContentChatChangeTitle": PushMessageContentChatChangeTitleTypeID, - "pushMessageContentChatSetBackground": PushMessageContentChatSetBackgroundTypeID, - "pushMessageContentChatSetTheme": PushMessageContentChatSetThemeTypeID, - "pushMessageContentChatDeleteMember": PushMessageContentChatDeleteMemberTypeID, - "pushMessageContentChatJoinByLink": PushMessageContentChatJoinByLinkTypeID, - "pushMessageContentChatJoinByRequest": PushMessageContentChatJoinByRequestTypeID, - "pushMessageContentRecurringPayment": PushMessageContentRecurringPaymentTypeID, - "pushMessageContentSuggestProfilePhoto": PushMessageContentSuggestProfilePhotoTypeID, - "pushMessageContentMessageForwards": PushMessageContentMessageForwardsTypeID, - "pushMessageContentMediaAlbum": PushMessageContentMediaAlbumTypeID, - "notificationTypeNewMessage": NotificationTypeNewMessageTypeID, - "notificationTypeNewSecretChat": NotificationTypeNewSecretChatTypeID, - "notificationTypeNewCall": NotificationTypeNewCallTypeID, - "notificationTypeNewPushMessage": NotificationTypeNewPushMessageTypeID, - "notificationGroupTypeMessages": NotificationGroupTypeMessagesTypeID, - "notificationGroupTypeMentions": NotificationGroupTypeMentionsTypeID, - "notificationGroupTypeSecretChat": NotificationGroupTypeSecretChatTypeID, - "notificationGroupTypeCalls": NotificationGroupTypeCallsTypeID, - "notificationSound": NotificationSoundTypeID, - "notificationSounds": NotificationSoundsTypeID, - "notification": NotificationTypeID, - "notificationGroup": NotificationGroupTypeID, - "optionValueBoolean": OptionValueBooleanTypeID, - "optionValueEmpty": OptionValueEmptyTypeID, - "optionValueInteger": OptionValueIntegerTypeID, - "optionValueString": OptionValueStringTypeID, - "jsonObjectMember": JSONObjectMemberTypeID, - "jsonValueNull": JSONValueNullTypeID, - "jsonValueBoolean": JSONValueBooleanTypeID, - "jsonValueNumber": JSONValueNumberTypeID, - "jsonValueString": JSONValueStringTypeID, - "jsonValueArray": JSONValueArrayTypeID, - "jsonValueObject": JSONValueObjectTypeID, - "storyPrivacySettingsEveryone": StoryPrivacySettingsEveryoneTypeID, - "storyPrivacySettingsContacts": StoryPrivacySettingsContactsTypeID, - "storyPrivacySettingsCloseFriends": StoryPrivacySettingsCloseFriendsTypeID, - "storyPrivacySettingsSelectedContacts": StoryPrivacySettingsSelectedContactsTypeID, - "userPrivacySettingRuleAllowAll": UserPrivacySettingRuleAllowAllTypeID, - "userPrivacySettingRuleAllowContacts": UserPrivacySettingRuleAllowContactsTypeID, - "userPrivacySettingRuleAllowUsers": UserPrivacySettingRuleAllowUsersTypeID, - "userPrivacySettingRuleAllowChatMembers": UserPrivacySettingRuleAllowChatMembersTypeID, - "userPrivacySettingRuleRestrictAll": UserPrivacySettingRuleRestrictAllTypeID, - "userPrivacySettingRuleRestrictContacts": UserPrivacySettingRuleRestrictContactsTypeID, - "userPrivacySettingRuleRestrictUsers": UserPrivacySettingRuleRestrictUsersTypeID, - "userPrivacySettingRuleRestrictChatMembers": UserPrivacySettingRuleRestrictChatMembersTypeID, - "userPrivacySettingRules": UserPrivacySettingRulesTypeID, - "userPrivacySettingShowStatus": UserPrivacySettingShowStatusTypeID, - "userPrivacySettingShowProfilePhoto": UserPrivacySettingShowProfilePhotoTypeID, - "userPrivacySettingShowLinkInForwardedMessages": UserPrivacySettingShowLinkInForwardedMessagesTypeID, - "userPrivacySettingShowPhoneNumber": UserPrivacySettingShowPhoneNumberTypeID, - "userPrivacySettingShowBio": UserPrivacySettingShowBioTypeID, - "userPrivacySettingAllowChatInvites": UserPrivacySettingAllowChatInvitesTypeID, - "userPrivacySettingAllowCalls": UserPrivacySettingAllowCallsTypeID, - "userPrivacySettingAllowPeerToPeerCalls": UserPrivacySettingAllowPeerToPeerCallsTypeID, - "userPrivacySettingAllowFindingByPhoneNumber": UserPrivacySettingAllowFindingByPhoneNumberTypeID, + "double": DoubleTypeID, + "string": StringTypeID, + "int32": Int32TypeID, + "int53": Int53TypeID, + "int64": Int64TypeID, + "bytes": BytesTypeID, + "boolFalse": BoolFalseTypeID, + "boolTrue": BoolTrueTypeID, + "error": ErrorTypeID, + "ok": OkTypeID, + "authenticationCodeTypeTelegramMessage": AuthenticationCodeTypeTelegramMessageTypeID, + "authenticationCodeTypeSms": AuthenticationCodeTypeSMSTypeID, + "authenticationCodeTypeCall": AuthenticationCodeTypeCallTypeID, + "authenticationCodeTypeFlashCall": AuthenticationCodeTypeFlashCallTypeID, + "authenticationCodeTypeMissedCall": AuthenticationCodeTypeMissedCallTypeID, + "authenticationCodeTypeFragment": AuthenticationCodeTypeFragmentTypeID, + "authenticationCodeTypeFirebaseAndroid": AuthenticationCodeTypeFirebaseAndroidTypeID, + "authenticationCodeTypeFirebaseIos": AuthenticationCodeTypeFirebaseIosTypeID, + "authenticationCodeInfo": AuthenticationCodeInfoTypeID, + "emailAddressAuthenticationCodeInfo": EmailAddressAuthenticationCodeInfoTypeID, + "emailAddressAuthenticationCode": EmailAddressAuthenticationCodeTypeID, + "emailAddressAuthenticationAppleId": EmailAddressAuthenticationAppleIDTypeID, + "emailAddressAuthenticationGoogleId": EmailAddressAuthenticationGoogleIDTypeID, + "emailAddressResetStateAvailable": EmailAddressResetStateAvailableTypeID, + "emailAddressResetStatePending": EmailAddressResetStatePendingTypeID, + "textEntity": TextEntityTypeID, + "textEntities": TextEntitiesTypeID, + "formattedText": FormattedTextTypeID, + "termsOfService": TermsOfServiceTypeID, + "authorizationStateWaitTdlibParameters": AuthorizationStateWaitTdlibParametersTypeID, + "authorizationStateWaitPhoneNumber": AuthorizationStateWaitPhoneNumberTypeID, + "authorizationStateWaitEmailAddress": AuthorizationStateWaitEmailAddressTypeID, + "authorizationStateWaitEmailCode": AuthorizationStateWaitEmailCodeTypeID, + "authorizationStateWaitCode": AuthorizationStateWaitCodeTypeID, + "authorizationStateWaitOtherDeviceConfirmation": AuthorizationStateWaitOtherDeviceConfirmationTypeID, + "authorizationStateWaitRegistration": AuthorizationStateWaitRegistrationTypeID, + "authorizationStateWaitPassword": AuthorizationStateWaitPasswordTypeID, + "authorizationStateReady": AuthorizationStateReadyTypeID, + "authorizationStateLoggingOut": AuthorizationStateLoggingOutTypeID, + "authorizationStateClosing": AuthorizationStateClosingTypeID, + "authorizationStateClosed": AuthorizationStateClosedTypeID, + "passwordState": PasswordStateTypeID, + "recoveryEmailAddress": RecoveryEmailAddressTypeID, + "temporaryPasswordState": TemporaryPasswordStateTypeID, + "localFile": LocalFileTypeID, + "remoteFile": RemoteFileTypeID, + "file": FileTypeID, + "inputFileId": InputFileIDTypeID, + "inputFileRemote": InputFileRemoteTypeID, + "inputFileLocal": InputFileLocalTypeID, + "inputFileGenerated": InputFileGeneratedTypeID, + "photoSize": PhotoSizeTypeID, + "minithumbnail": MinithumbnailTypeID, + "thumbnailFormatJpeg": ThumbnailFormatJpegTypeID, + "thumbnailFormatGif": ThumbnailFormatGifTypeID, + "thumbnailFormatMpeg4": ThumbnailFormatMpeg4TypeID, + "thumbnailFormatPng": ThumbnailFormatPngTypeID, + "thumbnailFormatTgs": ThumbnailFormatTgsTypeID, + "thumbnailFormatWebm": ThumbnailFormatWebmTypeID, + "thumbnailFormatWebp": ThumbnailFormatWebpTypeID, + "thumbnail": ThumbnailTypeID, + "maskPointForehead": MaskPointForeheadTypeID, + "maskPointEyes": MaskPointEyesTypeID, + "maskPointMouth": MaskPointMouthTypeID, + "maskPointChin": MaskPointChinTypeID, + "maskPosition": MaskPositionTypeID, + "stickerFormatWebp": StickerFormatWebpTypeID, + "stickerFormatTgs": StickerFormatTgsTypeID, + "stickerFormatWebm": StickerFormatWebmTypeID, + "stickerTypeRegular": StickerTypeRegularTypeID, + "stickerTypeMask": StickerTypeMaskTypeID, + "stickerTypeCustomEmoji": StickerTypeCustomEmojiTypeID, + "stickerFullTypeRegular": StickerFullTypeRegularTypeID, + "stickerFullTypeMask": StickerFullTypeMaskTypeID, + "stickerFullTypeCustomEmoji": StickerFullTypeCustomEmojiTypeID, + "closedVectorPath": ClosedVectorPathTypeID, + "pollOption": PollOptionTypeID, + "pollTypeRegular": PollTypeRegularTypeID, + "pollTypeQuiz": PollTypeQuizTypeID, + "animation": AnimationTypeID, + "audio": AudioTypeID, + "document": DocumentTypeID, + "photo": PhotoTypeID, + "sticker": StickerTypeID, + "video": VideoTypeID, + "videoNote": VideoNoteTypeID, + "voiceNote": VoiceNoteTypeID, + "animatedEmoji": AnimatedEmojiTypeID, + "contact": ContactTypeID, + "location": LocationTypeID, + "venue": VenueTypeID, + "game": GameTypeID, + "webApp": WebAppTypeID, + "poll": PollTypeID, + "background": BackgroundTypeID, + "backgrounds": BackgroundsTypeID, + "chatBackground": ChatBackgroundTypeID, + "profilePhoto": ProfilePhotoTypeID, + "chatPhotoInfo": ChatPhotoInfoTypeID, + "userTypeRegular": UserTypeRegularTypeID, + "userTypeDeleted": UserTypeDeletedTypeID, + "userTypeBot": UserTypeBotTypeID, + "userTypeUnknown": UserTypeUnknownTypeID, + "botCommand": BotCommandTypeID, + "botCommands": BotCommandsTypeID, + "botMenuButton": BotMenuButtonTypeID, + "chatLocation": ChatLocationTypeID, + "chatPhotoStickerTypeRegularOrMask": ChatPhotoStickerTypeRegularOrMaskTypeID, + "chatPhotoStickerTypeCustomEmoji": ChatPhotoStickerTypeCustomEmojiTypeID, + "chatPhotoSticker": ChatPhotoStickerTypeID, + "animatedChatPhoto": AnimatedChatPhotoTypeID, + "chatPhoto": ChatPhotoTypeID, + "chatPhotos": ChatPhotosTypeID, + "inputChatPhotoPrevious": InputChatPhotoPreviousTypeID, + "inputChatPhotoStatic": InputChatPhotoStaticTypeID, + "inputChatPhotoAnimation": InputChatPhotoAnimationTypeID, + "inputChatPhotoSticker": InputChatPhotoStickerTypeID, + "chatPermissions": ChatPermissionsTypeID, + "chatAdministratorRights": ChatAdministratorRightsTypeID, + "premiumPaymentOption": PremiumPaymentOptionTypeID, + "premiumStatePaymentOption": PremiumStatePaymentOptionTypeID, + "emojiStatus": EmojiStatusTypeID, + "emojiStatuses": EmojiStatusesTypeID, + "usernames": UsernamesTypeID, + "user": UserTypeID, + "botInfo": BotInfoTypeID, + "userFullInfo": UserFullInfoTypeID, + "users": UsersTypeID, + "chatAdministrator": ChatAdministratorTypeID, + "chatAdministrators": ChatAdministratorsTypeID, + "chatMemberStatusCreator": ChatMemberStatusCreatorTypeID, + "chatMemberStatusAdministrator": ChatMemberStatusAdministratorTypeID, + "chatMemberStatusMember": ChatMemberStatusMemberTypeID, + "chatMemberStatusRestricted": ChatMemberStatusRestrictedTypeID, + "chatMemberStatusLeft": ChatMemberStatusLeftTypeID, + "chatMemberStatusBanned": ChatMemberStatusBannedTypeID, + "chatMember": ChatMemberTypeID, + "chatMembers": ChatMembersTypeID, + "chatMembersFilterContacts": ChatMembersFilterContactsTypeID, + "chatMembersFilterAdministrators": ChatMembersFilterAdministratorsTypeID, + "chatMembersFilterMembers": ChatMembersFilterMembersTypeID, + "chatMembersFilterMention": ChatMembersFilterMentionTypeID, + "chatMembersFilterRestricted": ChatMembersFilterRestrictedTypeID, + "chatMembersFilterBanned": ChatMembersFilterBannedTypeID, + "chatMembersFilterBots": ChatMembersFilterBotsTypeID, + "supergroupMembersFilterRecent": SupergroupMembersFilterRecentTypeID, + "supergroupMembersFilterContacts": SupergroupMembersFilterContactsTypeID, + "supergroupMembersFilterAdministrators": SupergroupMembersFilterAdministratorsTypeID, + "supergroupMembersFilterSearch": SupergroupMembersFilterSearchTypeID, + "supergroupMembersFilterRestricted": SupergroupMembersFilterRestrictedTypeID, + "supergroupMembersFilterBanned": SupergroupMembersFilterBannedTypeID, + "supergroupMembersFilterMention": SupergroupMembersFilterMentionTypeID, + "supergroupMembersFilterBots": SupergroupMembersFilterBotsTypeID, + "chatInviteLink": ChatInviteLinkTypeID, + "chatInviteLinks": ChatInviteLinksTypeID, + "chatInviteLinkCount": ChatInviteLinkCountTypeID, + "chatInviteLinkCounts": ChatInviteLinkCountsTypeID, + "chatInviteLinkMember": ChatInviteLinkMemberTypeID, + "chatInviteLinkMembers": ChatInviteLinkMembersTypeID, + "inviteLinkChatTypeBasicGroup": InviteLinkChatTypeBasicGroupTypeID, + "inviteLinkChatTypeSupergroup": InviteLinkChatTypeSupergroupTypeID, + "inviteLinkChatTypeChannel": InviteLinkChatTypeChannelTypeID, + "chatInviteLinkInfo": ChatInviteLinkInfoTypeID, + "chatJoinRequest": ChatJoinRequestTypeID, + "chatJoinRequests": ChatJoinRequestsTypeID, + "chatJoinRequestsInfo": ChatJoinRequestsInfoTypeID, + "basicGroup": BasicGroupTypeID, + "basicGroupFullInfo": BasicGroupFullInfoTypeID, + "supergroup": SupergroupTypeID, + "supergroupFullInfo": SupergroupFullInfoTypeID, + "secretChatStatePending": SecretChatStatePendingTypeID, + "secretChatStateReady": SecretChatStateReadyTypeID, + "secretChatStateClosed": SecretChatStateClosedTypeID, + "secretChat": SecretChatTypeID, + "messageSenderUser": MessageSenderUserTypeID, + "messageSenderChat": MessageSenderChatTypeID, + "messageSenders": MessageSendersTypeID, + "chatMessageSender": ChatMessageSenderTypeID, + "chatMessageSenders": ChatMessageSendersTypeID, + "messageViewer": MessageViewerTypeID, + "messageViewers": MessageViewersTypeID, + "messageForwardOriginUser": MessageForwardOriginUserTypeID, + "messageForwardOriginChat": MessageForwardOriginChatTypeID, + "messageForwardOriginHiddenUser": MessageForwardOriginHiddenUserTypeID, + "messageForwardOriginChannel": MessageForwardOriginChannelTypeID, + "messageForwardOriginMessageImport": MessageForwardOriginMessageImportTypeID, + "reactionTypeEmoji": ReactionTypeEmojiTypeID, + "reactionTypeCustomEmoji": ReactionTypeCustomEmojiTypeID, + "messageForwardInfo": MessageForwardInfoTypeID, + "messageReplyInfo": MessageReplyInfoTypeID, + "messageReaction": MessageReactionTypeID, + "messageInteractionInfo": MessageInteractionInfoTypeID, + "unreadReaction": UnreadReactionTypeID, + "messageSendingStatePending": MessageSendingStatePendingTypeID, + "messageSendingStateFailed": MessageSendingStateFailedTypeID, + "messageReplyToMessage": MessageReplyToMessageTypeID, + "messageReplyToStory": MessageReplyToStoryTypeID, + "message": MessageTypeID, + "messages": MessagesTypeID, + "foundMessages": FoundMessagesTypeID, + "foundChatMessages": FoundChatMessagesTypeID, + "messagePosition": MessagePositionTypeID, + "messagePositions": MessagePositionsTypeID, + "messageCalendarDay": MessageCalendarDayTypeID, + "messageCalendar": MessageCalendarTypeID, + "messageSourceChatHistory": MessageSourceChatHistoryTypeID, + "messageSourceMessageThreadHistory": MessageSourceMessageThreadHistoryTypeID, + "messageSourceForumTopicHistory": MessageSourceForumTopicHistoryTypeID, + "messageSourceHistoryPreview": MessageSourceHistoryPreviewTypeID, + "messageSourceChatList": MessageSourceChatListTypeID, + "messageSourceSearch": MessageSourceSearchTypeID, + "messageSourceChatEventLog": MessageSourceChatEventLogTypeID, + "messageSourceNotification": MessageSourceNotificationTypeID, + "messageSourceScreenshot": MessageSourceScreenshotTypeID, + "messageSourceOther": MessageSourceOtherTypeID, + "messageSponsorTypeBot": MessageSponsorTypeBotTypeID, + "messageSponsorTypePublicChannel": MessageSponsorTypePublicChannelTypeID, + "messageSponsorTypePrivateChannel": MessageSponsorTypePrivateChannelTypeID, + "messageSponsorTypeWebsite": MessageSponsorTypeWebsiteTypeID, + "messageSponsor": MessageSponsorTypeID, + "sponsoredMessage": SponsoredMessageTypeID, + "sponsoredMessages": SponsoredMessagesTypeID, + "fileDownload": FileDownloadTypeID, + "downloadedFileCounts": DownloadedFileCountsTypeID, + "foundFileDownloads": FoundFileDownloadsTypeID, + "notificationSettingsScopePrivateChats": NotificationSettingsScopePrivateChatsTypeID, + "notificationSettingsScopeGroupChats": NotificationSettingsScopeGroupChatsTypeID, + "notificationSettingsScopeChannelChats": NotificationSettingsScopeChannelChatsTypeID, + "chatNotificationSettings": ChatNotificationSettingsTypeID, + "scopeNotificationSettings": ScopeNotificationSettingsTypeID, + "draftMessage": DraftMessageTypeID, + "chatTypePrivate": ChatTypePrivateTypeID, + "chatTypeBasicGroup": ChatTypeBasicGroupTypeID, + "chatTypeSupergroup": ChatTypeSupergroupTypeID, + "chatTypeSecret": ChatTypeSecretTypeID, + "chatFolderIcon": ChatFolderIconTypeID, + "chatFolder": ChatFolderTypeID, + "chatFolderInfo": ChatFolderInfoTypeID, + "chatFolderInviteLink": ChatFolderInviteLinkTypeID, + "chatFolderInviteLinks": ChatFolderInviteLinksTypeID, + "chatFolderInviteLinkInfo": ChatFolderInviteLinkInfoTypeID, + "recommendedChatFolder": RecommendedChatFolderTypeID, + "recommendedChatFolders": RecommendedChatFoldersTypeID, + "archiveChatListSettings": ArchiveChatListSettingsTypeID, + "chatListMain": ChatListMainTypeID, + "chatListArchive": ChatListArchiveTypeID, + "chatListFolder": ChatListFolderTypeID, + "chatLists": ChatListsTypeID, + "chatSourceMtprotoProxy": ChatSourceMtprotoProxyTypeID, + "chatSourcePublicServiceAnnouncement": ChatSourcePublicServiceAnnouncementTypeID, + "chatPosition": ChatPositionTypeID, + "chatAvailableReactionsAll": ChatAvailableReactionsAllTypeID, + "chatAvailableReactionsSome": ChatAvailableReactionsSomeTypeID, + "videoChat": VideoChatTypeID, + "chat": ChatTypeID, + "chats": ChatsTypeID, + "chatNearby": ChatNearbyTypeID, + "chatsNearby": ChatsNearbyTypeID, + "publicChatTypeHasUsername": PublicChatTypeHasUsernameTypeID, + "publicChatTypeIsLocationBased": PublicChatTypeIsLocationBasedTypeID, + "chatActionBarReportSpam": ChatActionBarReportSpamTypeID, + "chatActionBarReportUnrelatedLocation": ChatActionBarReportUnrelatedLocationTypeID, + "chatActionBarInviteMembers": ChatActionBarInviteMembersTypeID, + "chatActionBarReportAddBlock": ChatActionBarReportAddBlockTypeID, + "chatActionBarAddContact": ChatActionBarAddContactTypeID, + "chatActionBarSharePhoneNumber": ChatActionBarSharePhoneNumberTypeID, + "chatActionBarJoinRequest": ChatActionBarJoinRequestTypeID, + "keyboardButtonTypeText": KeyboardButtonTypeTextTypeID, + "keyboardButtonTypeRequestPhoneNumber": KeyboardButtonTypeRequestPhoneNumberTypeID, + "keyboardButtonTypeRequestLocation": KeyboardButtonTypeRequestLocationTypeID, + "keyboardButtonTypeRequestPoll": KeyboardButtonTypeRequestPollTypeID, + "keyboardButtonTypeRequestUser": KeyboardButtonTypeRequestUserTypeID, + "keyboardButtonTypeRequestChat": KeyboardButtonTypeRequestChatTypeID, + "keyboardButtonTypeWebApp": KeyboardButtonTypeWebAppTypeID, + "keyboardButton": KeyboardButtonTypeID, + "inlineKeyboardButtonTypeUrl": InlineKeyboardButtonTypeURLTypeID, + "inlineKeyboardButtonTypeLoginUrl": InlineKeyboardButtonTypeLoginURLTypeID, + "inlineKeyboardButtonTypeWebApp": InlineKeyboardButtonTypeWebAppTypeID, + "inlineKeyboardButtonTypeCallback": InlineKeyboardButtonTypeCallbackTypeID, + "inlineKeyboardButtonTypeCallbackWithPassword": InlineKeyboardButtonTypeCallbackWithPasswordTypeID, + "inlineKeyboardButtonTypeCallbackGame": InlineKeyboardButtonTypeCallbackGameTypeID, + "inlineKeyboardButtonTypeSwitchInline": InlineKeyboardButtonTypeSwitchInlineTypeID, + "inlineKeyboardButtonTypeBuy": InlineKeyboardButtonTypeBuyTypeID, + "inlineKeyboardButtonTypeUser": InlineKeyboardButtonTypeUserTypeID, + "inlineKeyboardButton": InlineKeyboardButtonTypeID, + "replyMarkupRemoveKeyboard": ReplyMarkupRemoveKeyboardTypeID, + "replyMarkupForceReply": ReplyMarkupForceReplyTypeID, + "replyMarkupShowKeyboard": ReplyMarkupShowKeyboardTypeID, + "replyMarkupInlineKeyboard": ReplyMarkupInlineKeyboardTypeID, + "loginUrlInfoOpen": LoginURLInfoOpenTypeID, + "loginUrlInfoRequestConfirmation": LoginURLInfoRequestConfirmationTypeID, + "foundWebApp": FoundWebAppTypeID, + "webAppInfo": WebAppInfoTypeID, + "messageThreadInfo": MessageThreadInfoTypeID, + "forumTopicIcon": ForumTopicIconTypeID, + "forumTopicInfo": ForumTopicInfoTypeID, + "forumTopic": ForumTopicTypeID, + "forumTopics": ForumTopicsTypeID, + "richTextPlain": RichTextPlainTypeID, + "richTextBold": RichTextBoldTypeID, + "richTextItalic": RichTextItalicTypeID, + "richTextUnderline": RichTextUnderlineTypeID, + "richTextStrikethrough": RichTextStrikethroughTypeID, + "richTextFixed": RichTextFixedTypeID, + "richTextUrl": RichTextURLTypeID, + "richTextEmailAddress": RichTextEmailAddressTypeID, + "richTextSubscript": RichTextSubscriptTypeID, + "richTextSuperscript": RichTextSuperscriptTypeID, + "richTextMarked": RichTextMarkedTypeID, + "richTextPhoneNumber": RichTextPhoneNumberTypeID, + "richTextIcon": RichTextIconTypeID, + "richTextReference": RichTextReferenceTypeID, + "richTextAnchor": RichTextAnchorTypeID, + "richTextAnchorLink": RichTextAnchorLinkTypeID, + "richTexts": RichTextsTypeID, + "pageBlockCaption": PageBlockCaptionTypeID, + "pageBlockListItem": PageBlockListItemTypeID, + "pageBlockHorizontalAlignmentLeft": PageBlockHorizontalAlignmentLeftTypeID, + "pageBlockHorizontalAlignmentCenter": PageBlockHorizontalAlignmentCenterTypeID, + "pageBlockHorizontalAlignmentRight": PageBlockHorizontalAlignmentRightTypeID, + "pageBlockVerticalAlignmentTop": PageBlockVerticalAlignmentTopTypeID, + "pageBlockVerticalAlignmentMiddle": PageBlockVerticalAlignmentMiddleTypeID, + "pageBlockVerticalAlignmentBottom": PageBlockVerticalAlignmentBottomTypeID, + "pageBlockTableCell": PageBlockTableCellTypeID, + "pageBlockRelatedArticle": PageBlockRelatedArticleTypeID, + "pageBlockTitle": PageBlockTitleTypeID, + "pageBlockSubtitle": PageBlockSubtitleTypeID, + "pageBlockAuthorDate": PageBlockAuthorDateTypeID, + "pageBlockHeader": PageBlockHeaderTypeID, + "pageBlockSubheader": PageBlockSubheaderTypeID, + "pageBlockKicker": PageBlockKickerTypeID, + "pageBlockParagraph": PageBlockParagraphTypeID, + "pageBlockPreformatted": PageBlockPreformattedTypeID, + "pageBlockFooter": PageBlockFooterTypeID, + "pageBlockDivider": PageBlockDividerTypeID, + "pageBlockAnchor": PageBlockAnchorTypeID, + "pageBlockList": PageBlockListTypeID, + "pageBlockBlockQuote": PageBlockBlockQuoteTypeID, + "pageBlockPullQuote": PageBlockPullQuoteTypeID, + "pageBlockAnimation": PageBlockAnimationTypeID, + "pageBlockAudio": PageBlockAudioTypeID, + "pageBlockPhoto": PageBlockPhotoTypeID, + "pageBlockVideo": PageBlockVideoTypeID, + "pageBlockVoiceNote": PageBlockVoiceNoteTypeID, + "pageBlockCover": PageBlockCoverTypeID, + "pageBlockEmbedded": PageBlockEmbeddedTypeID, + "pageBlockEmbeddedPost": PageBlockEmbeddedPostTypeID, + "pageBlockCollage": PageBlockCollageTypeID, + "pageBlockSlideshow": PageBlockSlideshowTypeID, + "pageBlockChatLink": PageBlockChatLinkTypeID, + "pageBlockTable": PageBlockTableTypeID, + "pageBlockDetails": PageBlockDetailsTypeID, + "pageBlockRelatedArticles": PageBlockRelatedArticlesTypeID, + "pageBlockMap": PageBlockMapTypeID, + "webPageInstantView": WebPageInstantViewTypeID, + "webPage": WebPageTypeID, + "countryInfo": CountryInfoTypeID, + "countries": CountriesTypeID, + "phoneNumberInfo": PhoneNumberInfoTypeID, + "bankCardActionOpenUrl": BankCardActionOpenURLTypeID, + "bankCardInfo": BankCardInfoTypeID, + "address": AddressTypeID, + "themeParameters": ThemeParametersTypeID, + "labeledPricePart": LabeledPricePartTypeID, + "invoice": InvoiceTypeID, + "orderInfo": OrderInfoTypeID, + "shippingOption": ShippingOptionTypeID, + "savedCredentials": SavedCredentialsTypeID, + "inputCredentialsSaved": InputCredentialsSavedTypeID, + "inputCredentialsNew": InputCredentialsNewTypeID, + "inputCredentialsApplePay": InputCredentialsApplePayTypeID, + "inputCredentialsGooglePay": InputCredentialsGooglePayTypeID, + "paymentProviderSmartGlocal": PaymentProviderSmartGlocalTypeID, + "paymentProviderStripe": PaymentProviderStripeTypeID, + "paymentProviderOther": PaymentProviderOtherTypeID, + "paymentOption": PaymentOptionTypeID, + "paymentForm": PaymentFormTypeID, + "validatedOrderInfo": ValidatedOrderInfoTypeID, + "paymentResult": PaymentResultTypeID, + "paymentReceipt": PaymentReceiptTypeID, + "inputInvoiceMessage": InputInvoiceMessageTypeID, + "inputInvoiceName": InputInvoiceNameTypeID, + "messageExtendedMediaPreview": MessageExtendedMediaPreviewTypeID, + "messageExtendedMediaPhoto": MessageExtendedMediaPhotoTypeID, + "messageExtendedMediaVideo": MessageExtendedMediaVideoTypeID, + "messageExtendedMediaUnsupported": MessageExtendedMediaUnsupportedTypeID, + "datedFile": DatedFileTypeID, + "passportElementTypePersonalDetails": PassportElementTypePersonalDetailsTypeID, + "passportElementTypePassport": PassportElementTypePassportTypeID, + "passportElementTypeDriverLicense": PassportElementTypeDriverLicenseTypeID, + "passportElementTypeIdentityCard": PassportElementTypeIdentityCardTypeID, + "passportElementTypeInternalPassport": PassportElementTypeInternalPassportTypeID, + "passportElementTypeAddress": PassportElementTypeAddressTypeID, + "passportElementTypeUtilityBill": PassportElementTypeUtilityBillTypeID, + "passportElementTypeBankStatement": PassportElementTypeBankStatementTypeID, + "passportElementTypeRentalAgreement": PassportElementTypeRentalAgreementTypeID, + "passportElementTypePassportRegistration": PassportElementTypePassportRegistrationTypeID, + "passportElementTypeTemporaryRegistration": PassportElementTypeTemporaryRegistrationTypeID, + "passportElementTypePhoneNumber": PassportElementTypePhoneNumberTypeID, + "passportElementTypeEmailAddress": PassportElementTypeEmailAddressTypeID, + "date": DateTypeID, + "personalDetails": PersonalDetailsTypeID, + "identityDocument": IdentityDocumentTypeID, + "inputIdentityDocument": InputIdentityDocumentTypeID, + "personalDocument": PersonalDocumentTypeID, + "inputPersonalDocument": InputPersonalDocumentTypeID, + "passportElementPersonalDetails": PassportElementPersonalDetailsTypeID, + "passportElementPassport": PassportElementPassportTypeID, + "passportElementDriverLicense": PassportElementDriverLicenseTypeID, + "passportElementIdentityCard": PassportElementIdentityCardTypeID, + "passportElementInternalPassport": PassportElementInternalPassportTypeID, + "passportElementAddress": PassportElementAddressTypeID, + "passportElementUtilityBill": PassportElementUtilityBillTypeID, + "passportElementBankStatement": PassportElementBankStatementTypeID, + "passportElementRentalAgreement": PassportElementRentalAgreementTypeID, + "passportElementPassportRegistration": PassportElementPassportRegistrationTypeID, + "passportElementTemporaryRegistration": PassportElementTemporaryRegistrationTypeID, + "passportElementPhoneNumber": PassportElementPhoneNumberTypeID, + "passportElementEmailAddress": PassportElementEmailAddressTypeID, + "inputPassportElementPersonalDetails": InputPassportElementPersonalDetailsTypeID, + "inputPassportElementPassport": InputPassportElementPassportTypeID, + "inputPassportElementDriverLicense": InputPassportElementDriverLicenseTypeID, + "inputPassportElementIdentityCard": InputPassportElementIdentityCardTypeID, + "inputPassportElementInternalPassport": InputPassportElementInternalPassportTypeID, + "inputPassportElementAddress": InputPassportElementAddressTypeID, + "inputPassportElementUtilityBill": InputPassportElementUtilityBillTypeID, + "inputPassportElementBankStatement": InputPassportElementBankStatementTypeID, + "inputPassportElementRentalAgreement": InputPassportElementRentalAgreementTypeID, + "inputPassportElementPassportRegistration": InputPassportElementPassportRegistrationTypeID, + "inputPassportElementTemporaryRegistration": InputPassportElementTemporaryRegistrationTypeID, + "inputPassportElementPhoneNumber": InputPassportElementPhoneNumberTypeID, + "inputPassportElementEmailAddress": InputPassportElementEmailAddressTypeID, + "passportElements": PassportElementsTypeID, + "passportElementErrorSourceUnspecified": PassportElementErrorSourceUnspecifiedTypeID, + "passportElementErrorSourceDataField": PassportElementErrorSourceDataFieldTypeID, + "passportElementErrorSourceFrontSide": PassportElementErrorSourceFrontSideTypeID, + "passportElementErrorSourceReverseSide": PassportElementErrorSourceReverseSideTypeID, + "passportElementErrorSourceSelfie": PassportElementErrorSourceSelfieTypeID, + "passportElementErrorSourceTranslationFile": PassportElementErrorSourceTranslationFileTypeID, + "passportElementErrorSourceTranslationFiles": PassportElementErrorSourceTranslationFilesTypeID, + "passportElementErrorSourceFile": PassportElementErrorSourceFileTypeID, + "passportElementErrorSourceFiles": PassportElementErrorSourceFilesTypeID, + "passportElementError": PassportElementErrorTypeID, + "passportSuitableElement": PassportSuitableElementTypeID, + "passportRequiredElement": PassportRequiredElementTypeID, + "passportAuthorizationForm": PassportAuthorizationFormTypeID, + "passportElementsWithErrors": PassportElementsWithErrorsTypeID, + "encryptedCredentials": EncryptedCredentialsTypeID, + "encryptedPassportElement": EncryptedPassportElementTypeID, + "inputPassportElementErrorSourceUnspecified": InputPassportElementErrorSourceUnspecifiedTypeID, + "inputPassportElementErrorSourceDataField": InputPassportElementErrorSourceDataFieldTypeID, + "inputPassportElementErrorSourceFrontSide": InputPassportElementErrorSourceFrontSideTypeID, + "inputPassportElementErrorSourceReverseSide": InputPassportElementErrorSourceReverseSideTypeID, + "inputPassportElementErrorSourceSelfie": InputPassportElementErrorSourceSelfieTypeID, + "inputPassportElementErrorSourceTranslationFile": InputPassportElementErrorSourceTranslationFileTypeID, + "inputPassportElementErrorSourceTranslationFiles": InputPassportElementErrorSourceTranslationFilesTypeID, + "inputPassportElementErrorSourceFile": InputPassportElementErrorSourceFileTypeID, + "inputPassportElementErrorSourceFiles": InputPassportElementErrorSourceFilesTypeID, + "inputPassportElementError": InputPassportElementErrorTypeID, + "messageText": MessageTextTypeID, + "messageAnimation": MessageAnimationTypeID, + "messageAudio": MessageAudioTypeID, + "messageDocument": MessageDocumentTypeID, + "messagePhoto": MessagePhotoTypeID, + "messageExpiredPhoto": MessageExpiredPhotoTypeID, + "messageSticker": MessageStickerTypeID, + "messageVideo": MessageVideoTypeID, + "messageExpiredVideo": MessageExpiredVideoTypeID, + "messageVideoNote": MessageVideoNoteTypeID, + "messageVoiceNote": MessageVoiceNoteTypeID, + "messageLocation": MessageLocationTypeID, + "messageVenue": MessageVenueTypeID, + "messageContact": MessageContactTypeID, + "messageAnimatedEmoji": MessageAnimatedEmojiTypeID, + "messageDice": MessageDiceTypeID, + "messageGame": MessageGameTypeID, + "messagePoll": MessagePollTypeID, + "messageStory": MessageStoryTypeID, + "messageInvoice": MessageInvoiceTypeID, + "messageCall": MessageCallTypeID, + "messageVideoChatScheduled": MessageVideoChatScheduledTypeID, + "messageVideoChatStarted": MessageVideoChatStartedTypeID, + "messageVideoChatEnded": MessageVideoChatEndedTypeID, + "messageInviteVideoChatParticipants": MessageInviteVideoChatParticipantsTypeID, + "messageBasicGroupChatCreate": MessageBasicGroupChatCreateTypeID, + "messageSupergroupChatCreate": MessageSupergroupChatCreateTypeID, + "messageChatChangeTitle": MessageChatChangeTitleTypeID, + "messageChatChangePhoto": MessageChatChangePhotoTypeID, + "messageChatDeletePhoto": MessageChatDeletePhotoTypeID, + "messageChatAddMembers": MessageChatAddMembersTypeID, + "messageChatJoinByLink": MessageChatJoinByLinkTypeID, + "messageChatJoinByRequest": MessageChatJoinByRequestTypeID, + "messageChatDeleteMember": MessageChatDeleteMemberTypeID, + "messageChatUpgradeTo": MessageChatUpgradeToTypeID, + "messageChatUpgradeFrom": MessageChatUpgradeFromTypeID, + "messagePinMessage": MessagePinMessageTypeID, + "messageScreenshotTaken": MessageScreenshotTakenTypeID, + "messageChatSetBackground": MessageChatSetBackgroundTypeID, + "messageChatSetTheme": MessageChatSetThemeTypeID, + "messageChatSetMessageAutoDeleteTime": MessageChatSetMessageAutoDeleteTimeTypeID, + "messageForumTopicCreated": MessageForumTopicCreatedTypeID, + "messageForumTopicEdited": MessageForumTopicEditedTypeID, + "messageForumTopicIsClosedToggled": MessageForumTopicIsClosedToggledTypeID, + "messageForumTopicIsHiddenToggled": MessageForumTopicIsHiddenToggledTypeID, + "messageSuggestProfilePhoto": MessageSuggestProfilePhotoTypeID, + "messageCustomServiceAction": MessageCustomServiceActionTypeID, + "messageGameScore": MessageGameScoreTypeID, + "messagePaymentSuccessful": MessagePaymentSuccessfulTypeID, + "messagePaymentSuccessfulBot": MessagePaymentSuccessfulBotTypeID, + "messageGiftedPremium": MessageGiftedPremiumTypeID, + "messageContactRegistered": MessageContactRegisteredTypeID, + "messageUserShared": MessageUserSharedTypeID, + "messageChatShared": MessageChatSharedTypeID, + "messageWebsiteConnected": MessageWebsiteConnectedTypeID, + "messageBotWriteAccessAllowed": MessageBotWriteAccessAllowedTypeID, + "messageWebAppDataSent": MessageWebAppDataSentTypeID, + "messageWebAppDataReceived": MessageWebAppDataReceivedTypeID, + "messagePassportDataSent": MessagePassportDataSentTypeID, + "messagePassportDataReceived": MessagePassportDataReceivedTypeID, + "messageProximityAlertTriggered": MessageProximityAlertTriggeredTypeID, + "messageUnsupported": MessageUnsupportedTypeID, + "textEntityTypeMention": TextEntityTypeMentionTypeID, + "textEntityTypeHashtag": TextEntityTypeHashtagTypeID, + "textEntityTypeCashtag": TextEntityTypeCashtagTypeID, + "textEntityTypeBotCommand": TextEntityTypeBotCommandTypeID, + "textEntityTypeUrl": TextEntityTypeURLTypeID, + "textEntityTypeEmailAddress": TextEntityTypeEmailAddressTypeID, + "textEntityTypePhoneNumber": TextEntityTypePhoneNumberTypeID, + "textEntityTypeBankCardNumber": TextEntityTypeBankCardNumberTypeID, + "textEntityTypeBold": TextEntityTypeBoldTypeID, + "textEntityTypeItalic": TextEntityTypeItalicTypeID, + "textEntityTypeUnderline": TextEntityTypeUnderlineTypeID, + "textEntityTypeStrikethrough": TextEntityTypeStrikethroughTypeID, + "textEntityTypeSpoiler": TextEntityTypeSpoilerTypeID, + "textEntityTypeCode": TextEntityTypeCodeTypeID, + "textEntityTypePre": TextEntityTypePreTypeID, + "textEntityTypePreCode": TextEntityTypePreCodeTypeID, + "textEntityTypeTextUrl": TextEntityTypeTextURLTypeID, + "textEntityTypeMentionName": TextEntityTypeMentionNameTypeID, + "textEntityTypeCustomEmoji": TextEntityTypeCustomEmojiTypeID, + "textEntityTypeMediaTimestamp": TextEntityTypeMediaTimestampTypeID, + "inputThumbnail": InputThumbnailTypeID, + "messageSchedulingStateSendAtDate": MessageSchedulingStateSendAtDateTypeID, + "messageSchedulingStateSendWhenOnline": MessageSchedulingStateSendWhenOnlineTypeID, + "messageSelfDestructTypeTimer": MessageSelfDestructTypeTimerTypeID, + "messageSelfDestructTypeImmediately": MessageSelfDestructTypeImmediatelyTypeID, + "messageSendOptions": MessageSendOptionsTypeID, + "messageCopyOptions": MessageCopyOptionsTypeID, + "inputMessageText": InputMessageTextTypeID, + "inputMessageAnimation": InputMessageAnimationTypeID, + "inputMessageAudio": InputMessageAudioTypeID, + "inputMessageDocument": InputMessageDocumentTypeID, + "inputMessagePhoto": InputMessagePhotoTypeID, + "inputMessageSticker": InputMessageStickerTypeID, + "inputMessageVideo": InputMessageVideoTypeID, + "inputMessageVideoNote": InputMessageVideoNoteTypeID, + "inputMessageVoiceNote": InputMessageVoiceNoteTypeID, + "inputMessageLocation": InputMessageLocationTypeID, + "inputMessageVenue": InputMessageVenueTypeID, + "inputMessageContact": InputMessageContactTypeID, + "inputMessageDice": InputMessageDiceTypeID, + "inputMessageGame": InputMessageGameTypeID, + "inputMessageInvoice": InputMessageInvoiceTypeID, + "inputMessagePoll": InputMessagePollTypeID, + "inputMessageStory": InputMessageStoryTypeID, + "inputMessageForwarded": InputMessageForwardedTypeID, + "searchMessagesFilterEmpty": SearchMessagesFilterEmptyTypeID, + "searchMessagesFilterAnimation": SearchMessagesFilterAnimationTypeID, + "searchMessagesFilterAudio": SearchMessagesFilterAudioTypeID, + "searchMessagesFilterDocument": SearchMessagesFilterDocumentTypeID, + "searchMessagesFilterPhoto": SearchMessagesFilterPhotoTypeID, + "searchMessagesFilterVideo": SearchMessagesFilterVideoTypeID, + "searchMessagesFilterVoiceNote": SearchMessagesFilterVoiceNoteTypeID, + "searchMessagesFilterPhotoAndVideo": SearchMessagesFilterPhotoAndVideoTypeID, + "searchMessagesFilterUrl": SearchMessagesFilterURLTypeID, + "searchMessagesFilterChatPhoto": SearchMessagesFilterChatPhotoTypeID, + "searchMessagesFilterVideoNote": SearchMessagesFilterVideoNoteTypeID, + "searchMessagesFilterVoiceAndVideoNote": SearchMessagesFilterVoiceAndVideoNoteTypeID, + "searchMessagesFilterMention": SearchMessagesFilterMentionTypeID, + "searchMessagesFilterUnreadMention": SearchMessagesFilterUnreadMentionTypeID, + "searchMessagesFilterUnreadReaction": SearchMessagesFilterUnreadReactionTypeID, + "searchMessagesFilterFailedToSend": SearchMessagesFilterFailedToSendTypeID, + "searchMessagesFilterPinned": SearchMessagesFilterPinnedTypeID, + "chatActionTyping": ChatActionTypingTypeID, + "chatActionRecordingVideo": ChatActionRecordingVideoTypeID, + "chatActionUploadingVideo": ChatActionUploadingVideoTypeID, + "chatActionRecordingVoiceNote": ChatActionRecordingVoiceNoteTypeID, + "chatActionUploadingVoiceNote": ChatActionUploadingVoiceNoteTypeID, + "chatActionUploadingPhoto": ChatActionUploadingPhotoTypeID, + "chatActionUploadingDocument": ChatActionUploadingDocumentTypeID, + "chatActionChoosingSticker": ChatActionChoosingStickerTypeID, + "chatActionChoosingLocation": ChatActionChoosingLocationTypeID, + "chatActionChoosingContact": ChatActionChoosingContactTypeID, + "chatActionStartPlayingGame": ChatActionStartPlayingGameTypeID, + "chatActionRecordingVideoNote": ChatActionRecordingVideoNoteTypeID, + "chatActionUploadingVideoNote": ChatActionUploadingVideoNoteTypeID, + "chatActionWatchingAnimations": ChatActionWatchingAnimationsTypeID, + "chatActionCancel": ChatActionCancelTypeID, + "userStatusEmpty": UserStatusEmptyTypeID, + "userStatusOnline": UserStatusOnlineTypeID, + "userStatusOffline": UserStatusOfflineTypeID, + "userStatusRecently": UserStatusRecentlyTypeID, + "userStatusLastWeek": UserStatusLastWeekTypeID, + "userStatusLastMonth": UserStatusLastMonthTypeID, + "stickers": StickersTypeID, + "emojis": EmojisTypeID, + "stickerSet": StickerSetTypeID, + "stickerSetInfo": StickerSetInfoTypeID, + "stickerSets": StickerSetsTypeID, + "trendingStickerSets": TrendingStickerSetsTypeID, + "emojiCategory": EmojiCategoryTypeID, + "emojiCategories": EmojiCategoriesTypeID, + "emojiCategoryTypeDefault": EmojiCategoryTypeDefaultTypeID, + "emojiCategoryTypeEmojiStatus": EmojiCategoryTypeEmojiStatusTypeID, + "emojiCategoryTypeChatPhoto": EmojiCategoryTypeChatPhotoTypeID, + "storyViewer": StoryViewerTypeID, + "storyViewers": StoryViewersTypeID, + "storyAreaPosition": StoryAreaPositionTypeID, + "storyAreaTypeLocation": StoryAreaTypeLocationTypeID, + "storyAreaTypeVenue": StoryAreaTypeVenueTypeID, + "storyArea": StoryAreaTypeID, + "inputStoryAreaTypeLocation": InputStoryAreaTypeLocationTypeID, + "inputStoryAreaTypeFoundVenue": InputStoryAreaTypeFoundVenueTypeID, + "inputStoryAreaTypePreviousVenue": InputStoryAreaTypePreviousVenueTypeID, + "inputStoryArea": InputStoryAreaTypeID, + "inputStoryAreas": InputStoryAreasTypeID, + "storyVideo": StoryVideoTypeID, + "storyContentPhoto": StoryContentPhotoTypeID, + "storyContentVideo": StoryContentVideoTypeID, + "storyContentUnsupported": StoryContentUnsupportedTypeID, + "inputStoryContentPhoto": InputStoryContentPhotoTypeID, + "inputStoryContentVideo": InputStoryContentVideoTypeID, + "storyListMain": StoryListMainTypeID, + "storyListArchive": StoryListArchiveTypeID, + "storyInteractionInfo": StoryInteractionInfoTypeID, + "story": StoryTypeID, + "stories": StoriesTypeID, + "storyInfo": StoryInfoTypeID, + "chatActiveStories": ChatActiveStoriesTypeID, + "callDiscardReasonEmpty": CallDiscardReasonEmptyTypeID, + "callDiscardReasonMissed": CallDiscardReasonMissedTypeID, + "callDiscardReasonDeclined": CallDiscardReasonDeclinedTypeID, + "callDiscardReasonDisconnected": CallDiscardReasonDisconnectedTypeID, + "callDiscardReasonHungUp": CallDiscardReasonHungUpTypeID, + "callProtocol": CallProtocolTypeID, + "callServerTypeTelegramReflector": CallServerTypeTelegramReflectorTypeID, + "callServerTypeWebrtc": CallServerTypeWebrtcTypeID, + "callServer": CallServerTypeID, + "callId": CallIDTypeID, + "groupCallId": GroupCallIDTypeID, + "callStatePending": CallStatePendingTypeID, + "callStateExchangingKeys": CallStateExchangingKeysTypeID, + "callStateReady": CallStateReadyTypeID, + "callStateHangingUp": CallStateHangingUpTypeID, + "callStateDiscarded": CallStateDiscardedTypeID, + "callStateError": CallStateErrorTypeID, + "groupCallVideoQualityThumbnail": GroupCallVideoQualityThumbnailTypeID, + "groupCallVideoQualityMedium": GroupCallVideoQualityMediumTypeID, + "groupCallVideoQualityFull": GroupCallVideoQualityFullTypeID, + "groupCallStream": GroupCallStreamTypeID, + "groupCallStreams": GroupCallStreamsTypeID, + "rtmpUrl": RtmpURLTypeID, + "groupCallRecentSpeaker": GroupCallRecentSpeakerTypeID, + "groupCall": GroupCallTypeID, + "groupCallVideoSourceGroup": GroupCallVideoSourceGroupTypeID, + "groupCallParticipantVideoInfo": GroupCallParticipantVideoInfoTypeID, + "groupCallParticipant": GroupCallParticipantTypeID, + "callProblemEcho": CallProblemEchoTypeID, + "callProblemNoise": CallProblemNoiseTypeID, + "callProblemInterruptions": CallProblemInterruptionsTypeID, + "callProblemDistortedSpeech": CallProblemDistortedSpeechTypeID, + "callProblemSilentLocal": CallProblemSilentLocalTypeID, + "callProblemSilentRemote": CallProblemSilentRemoteTypeID, + "callProblemDropped": CallProblemDroppedTypeID, + "callProblemDistortedVideo": CallProblemDistortedVideoTypeID, + "callProblemPixelatedVideo": CallProblemPixelatedVideoTypeID, + "call": CallTypeID, + "firebaseAuthenticationSettingsAndroid": FirebaseAuthenticationSettingsAndroidTypeID, + "firebaseAuthenticationSettingsIos": FirebaseAuthenticationSettingsIosTypeID, + "phoneNumberAuthenticationSettings": PhoneNumberAuthenticationSettingsTypeID, + "addedReaction": AddedReactionTypeID, + "addedReactions": AddedReactionsTypeID, + "availableReaction": AvailableReactionTypeID, + "availableReactions": AvailableReactionsTypeID, + "emojiReaction": EmojiReactionTypeID, + "animations": AnimationsTypeID, + "diceStickersRegular": DiceStickersRegularTypeID, + "diceStickersSlotMachine": DiceStickersSlotMachineTypeID, + "importedContacts": ImportedContactsTypeID, + "speechRecognitionResultPending": SpeechRecognitionResultPendingTypeID, + "speechRecognitionResultText": SpeechRecognitionResultTextTypeID, + "speechRecognitionResultError": SpeechRecognitionResultErrorTypeID, + "attachmentMenuBotColor": AttachmentMenuBotColorTypeID, + "attachmentMenuBot": AttachmentMenuBotTypeID, + "sentWebAppMessage": SentWebAppMessageTypeID, + "httpUrl": HTTPURLTypeID, + "userLink": UserLinkTypeID, + "inputInlineQueryResultAnimation": InputInlineQueryResultAnimationTypeID, + "inputInlineQueryResultArticle": InputInlineQueryResultArticleTypeID, + "inputInlineQueryResultAudio": InputInlineQueryResultAudioTypeID, + "inputInlineQueryResultContact": InputInlineQueryResultContactTypeID, + "inputInlineQueryResultDocument": InputInlineQueryResultDocumentTypeID, + "inputInlineQueryResultGame": InputInlineQueryResultGameTypeID, + "inputInlineQueryResultLocation": InputInlineQueryResultLocationTypeID, + "inputInlineQueryResultPhoto": InputInlineQueryResultPhotoTypeID, + "inputInlineQueryResultSticker": InputInlineQueryResultStickerTypeID, + "inputInlineQueryResultVenue": InputInlineQueryResultVenueTypeID, + "inputInlineQueryResultVideo": InputInlineQueryResultVideoTypeID, + "inputInlineQueryResultVoiceNote": InputInlineQueryResultVoiceNoteTypeID, + "inlineQueryResultArticle": InlineQueryResultArticleTypeID, + "inlineQueryResultContact": InlineQueryResultContactTypeID, + "inlineQueryResultLocation": InlineQueryResultLocationTypeID, + "inlineQueryResultVenue": InlineQueryResultVenueTypeID, + "inlineQueryResultGame": InlineQueryResultGameTypeID, + "inlineQueryResultAnimation": InlineQueryResultAnimationTypeID, + "inlineQueryResultAudio": InlineQueryResultAudioTypeID, + "inlineQueryResultDocument": InlineQueryResultDocumentTypeID, + "inlineQueryResultPhoto": InlineQueryResultPhotoTypeID, + "inlineQueryResultSticker": InlineQueryResultStickerTypeID, + "inlineQueryResultVideo": InlineQueryResultVideoTypeID, + "inlineQueryResultVoiceNote": InlineQueryResultVoiceNoteTypeID, + "inlineQueryResultsButtonTypeStartBot": InlineQueryResultsButtonTypeStartBotTypeID, + "inlineQueryResultsButtonTypeWebApp": InlineQueryResultsButtonTypeWebAppTypeID, + "inlineQueryResultsButton": InlineQueryResultsButtonTypeID, + "inlineQueryResults": InlineQueryResultsTypeID, + "callbackQueryPayloadData": CallbackQueryPayloadDataTypeID, + "callbackQueryPayloadDataWithPassword": CallbackQueryPayloadDataWithPasswordTypeID, + "callbackQueryPayloadGame": CallbackQueryPayloadGameTypeID, + "callbackQueryAnswer": CallbackQueryAnswerTypeID, + "customRequestResult": CustomRequestResultTypeID, + "gameHighScore": GameHighScoreTypeID, + "gameHighScores": GameHighScoresTypeID, + "chatEventMessageEdited": ChatEventMessageEditedTypeID, + "chatEventMessageDeleted": ChatEventMessageDeletedTypeID, + "chatEventMessagePinned": ChatEventMessagePinnedTypeID, + "chatEventMessageUnpinned": ChatEventMessageUnpinnedTypeID, + "chatEventPollStopped": ChatEventPollStoppedTypeID, + "chatEventMemberJoined": ChatEventMemberJoinedTypeID, + "chatEventMemberJoinedByInviteLink": ChatEventMemberJoinedByInviteLinkTypeID, + "chatEventMemberJoinedByRequest": ChatEventMemberJoinedByRequestTypeID, + "chatEventMemberInvited": ChatEventMemberInvitedTypeID, + "chatEventMemberLeft": ChatEventMemberLeftTypeID, + "chatEventMemberPromoted": ChatEventMemberPromotedTypeID, + "chatEventMemberRestricted": ChatEventMemberRestrictedTypeID, + "chatEventAvailableReactionsChanged": ChatEventAvailableReactionsChangedTypeID, + "chatEventDescriptionChanged": ChatEventDescriptionChangedTypeID, + "chatEventLinkedChatChanged": ChatEventLinkedChatChangedTypeID, + "chatEventLocationChanged": ChatEventLocationChangedTypeID, + "chatEventMessageAutoDeleteTimeChanged": ChatEventMessageAutoDeleteTimeChangedTypeID, + "chatEventPermissionsChanged": ChatEventPermissionsChangedTypeID, + "chatEventPhotoChanged": ChatEventPhotoChangedTypeID, + "chatEventSlowModeDelayChanged": ChatEventSlowModeDelayChangedTypeID, + "chatEventStickerSetChanged": ChatEventStickerSetChangedTypeID, + "chatEventTitleChanged": ChatEventTitleChangedTypeID, + "chatEventUsernameChanged": ChatEventUsernameChangedTypeID, + "chatEventActiveUsernamesChanged": ChatEventActiveUsernamesChangedTypeID, + "chatEventHasProtectedContentToggled": ChatEventHasProtectedContentToggledTypeID, + "chatEventInvitesToggled": ChatEventInvitesToggledTypeID, + "chatEventIsAllHistoryAvailableToggled": ChatEventIsAllHistoryAvailableToggledTypeID, + "chatEventHasAggressiveAntiSpamEnabledToggled": ChatEventHasAggressiveAntiSpamEnabledToggledTypeID, + "chatEventSignMessagesToggled": ChatEventSignMessagesToggledTypeID, + "chatEventInviteLinkEdited": ChatEventInviteLinkEditedTypeID, + "chatEventInviteLinkRevoked": ChatEventInviteLinkRevokedTypeID, + "chatEventInviteLinkDeleted": ChatEventInviteLinkDeletedTypeID, + "chatEventVideoChatCreated": ChatEventVideoChatCreatedTypeID, + "chatEventVideoChatEnded": ChatEventVideoChatEndedTypeID, + "chatEventVideoChatMuteNewParticipantsToggled": ChatEventVideoChatMuteNewParticipantsToggledTypeID, + "chatEventVideoChatParticipantIsMutedToggled": ChatEventVideoChatParticipantIsMutedToggledTypeID, + "chatEventVideoChatParticipantVolumeLevelChanged": ChatEventVideoChatParticipantVolumeLevelChangedTypeID, + "chatEventIsForumToggled": ChatEventIsForumToggledTypeID, + "chatEventForumTopicCreated": ChatEventForumTopicCreatedTypeID, + "chatEventForumTopicEdited": ChatEventForumTopicEditedTypeID, + "chatEventForumTopicToggleIsClosed": ChatEventForumTopicToggleIsClosedTypeID, + "chatEventForumTopicToggleIsHidden": ChatEventForumTopicToggleIsHiddenTypeID, + "chatEventForumTopicDeleted": ChatEventForumTopicDeletedTypeID, + "chatEventForumTopicPinned": ChatEventForumTopicPinnedTypeID, + "chatEvent": ChatEventTypeID, + "chatEvents": ChatEventsTypeID, + "chatEventLogFilters": ChatEventLogFiltersTypeID, + "languagePackStringValueOrdinary": LanguagePackStringValueOrdinaryTypeID, + "languagePackStringValuePluralized": LanguagePackStringValuePluralizedTypeID, + "languagePackStringValueDeleted": LanguagePackStringValueDeletedTypeID, + "languagePackString": LanguagePackStringTypeID, + "languagePackStrings": LanguagePackStringsTypeID, + "languagePackInfo": LanguagePackInfoTypeID, + "localizationTargetInfo": LocalizationTargetInfoTypeID, + "premiumLimitTypeSupergroupCount": PremiumLimitTypeSupergroupCountTypeID, + "premiumLimitTypePinnedChatCount": PremiumLimitTypePinnedChatCountTypeID, + "premiumLimitTypeCreatedPublicChatCount": PremiumLimitTypeCreatedPublicChatCountTypeID, + "premiumLimitTypeSavedAnimationCount": PremiumLimitTypeSavedAnimationCountTypeID, + "premiumLimitTypeFavoriteStickerCount": PremiumLimitTypeFavoriteStickerCountTypeID, + "premiumLimitTypeChatFolderCount": PremiumLimitTypeChatFolderCountTypeID, + "premiumLimitTypeChatFolderChosenChatCount": PremiumLimitTypeChatFolderChosenChatCountTypeID, + "premiumLimitTypePinnedArchivedChatCount": PremiumLimitTypePinnedArchivedChatCountTypeID, + "premiumLimitTypeCaptionLength": PremiumLimitTypeCaptionLengthTypeID, + "premiumLimitTypeBioLength": PremiumLimitTypeBioLengthTypeID, + "premiumLimitTypeChatFolderInviteLinkCount": PremiumLimitTypeChatFolderInviteLinkCountTypeID, + "premiumLimitTypeShareableChatFolderCount": PremiumLimitTypeShareableChatFolderCountTypeID, + "premiumLimitTypeActiveStoryCount": PremiumLimitTypeActiveStoryCountTypeID, + "premiumLimitTypeWeeklySentStoryCount": PremiumLimitTypeWeeklySentStoryCountTypeID, + "premiumLimitTypeMonthlySentStoryCount": PremiumLimitTypeMonthlySentStoryCountTypeID, + "premiumLimitTypeStoryCaptionLength": PremiumLimitTypeStoryCaptionLengthTypeID, + "premiumFeatureIncreasedLimits": PremiumFeatureIncreasedLimitsTypeID, + "premiumFeatureIncreasedUploadFileSize": PremiumFeatureIncreasedUploadFileSizeTypeID, + "premiumFeatureImprovedDownloadSpeed": PremiumFeatureImprovedDownloadSpeedTypeID, + "premiumFeatureVoiceRecognition": PremiumFeatureVoiceRecognitionTypeID, + "premiumFeatureDisabledAds": PremiumFeatureDisabledAdsTypeID, + "premiumFeatureUniqueReactions": PremiumFeatureUniqueReactionsTypeID, + "premiumFeatureUniqueStickers": PremiumFeatureUniqueStickersTypeID, + "premiumFeatureCustomEmoji": PremiumFeatureCustomEmojiTypeID, + "premiumFeatureAdvancedChatManagement": PremiumFeatureAdvancedChatManagementTypeID, + "premiumFeatureProfileBadge": PremiumFeatureProfileBadgeTypeID, + "premiumFeatureEmojiStatus": PremiumFeatureEmojiStatusTypeID, + "premiumFeatureAnimatedProfilePhoto": PremiumFeatureAnimatedProfilePhotoTypeID, + "premiumFeatureForumTopicIcon": PremiumFeatureForumTopicIconTypeID, + "premiumFeatureAppIcons": PremiumFeatureAppIconsTypeID, + "premiumFeatureRealTimeChatTranslation": PremiumFeatureRealTimeChatTranslationTypeID, + "premiumFeatureUpgradedStories": PremiumFeatureUpgradedStoriesTypeID, + "premiumStoryFeaturePriorityOrder": PremiumStoryFeaturePriorityOrderTypeID, + "premiumStoryFeatureStealthMode": PremiumStoryFeatureStealthModeTypeID, + "premiumStoryFeaturePermanentViewsHistory": PremiumStoryFeaturePermanentViewsHistoryTypeID, + "premiumStoryFeatureCustomExpirationDuration": PremiumStoryFeatureCustomExpirationDurationTypeID, + "premiumStoryFeatureSaveStories": PremiumStoryFeatureSaveStoriesTypeID, + "premiumStoryFeatureLinksAndFormatting": PremiumStoryFeatureLinksAndFormattingTypeID, + "premiumLimit": PremiumLimitTypeID, + "premiumFeatures": PremiumFeaturesTypeID, + "premiumSourceLimitExceeded": PremiumSourceLimitExceededTypeID, + "premiumSourceFeature": PremiumSourceFeatureTypeID, + "premiumSourceStoryFeature": PremiumSourceStoryFeatureTypeID, + "premiumSourceLink": PremiumSourceLinkTypeID, + "premiumSourceSettings": PremiumSourceSettingsTypeID, + "premiumFeaturePromotionAnimation": PremiumFeaturePromotionAnimationTypeID, + "premiumState": PremiumStateTypeID, + "storePaymentPurposePremiumSubscription": StorePaymentPurposePremiumSubscriptionTypeID, + "storePaymentPurposeGiftedPremium": StorePaymentPurposeGiftedPremiumTypeID, + "deviceTokenFirebaseCloudMessaging": DeviceTokenFirebaseCloudMessagingTypeID, + "deviceTokenApplePush": DeviceTokenApplePushTypeID, + "deviceTokenApplePushVoIP": DeviceTokenApplePushVoIPTypeID, + "deviceTokenWindowsPush": DeviceTokenWindowsPushTypeID, + "deviceTokenMicrosoftPush": DeviceTokenMicrosoftPushTypeID, + "deviceTokenMicrosoftPushVoIP": DeviceTokenMicrosoftPushVoIPTypeID, + "deviceTokenWebPush": DeviceTokenWebPushTypeID, + "deviceTokenSimplePush": DeviceTokenSimplePushTypeID, + "deviceTokenUbuntuPush": DeviceTokenUbuntuPushTypeID, + "deviceTokenBlackBerryPush": DeviceTokenBlackBerryPushTypeID, + "deviceTokenTizenPush": DeviceTokenTizenPushTypeID, + "deviceTokenHuaweiPush": DeviceTokenHuaweiPushTypeID, + "pushReceiverId": PushReceiverIDTypeID, + "backgroundFillSolid": BackgroundFillSolidTypeID, + "backgroundFillGradient": BackgroundFillGradientTypeID, + "backgroundFillFreeformGradient": BackgroundFillFreeformGradientTypeID, + "backgroundTypeWallpaper": BackgroundTypeWallpaperTypeID, + "backgroundTypePattern": BackgroundTypePatternTypeID, + "backgroundTypeFill": BackgroundTypeFillTypeID, + "inputBackgroundLocal": InputBackgroundLocalTypeID, + "inputBackgroundRemote": InputBackgroundRemoteTypeID, + "inputBackgroundPrevious": InputBackgroundPreviousTypeID, + "themeSettings": ThemeSettingsTypeID, + "chatTheme": ChatThemeTypeID, + "hashtags": HashtagsTypeID, + "canSendStoryResultOk": CanSendStoryResultOkTypeID, + "canSendStoryResultPremiumNeeded": CanSendStoryResultPremiumNeededTypeID, + "canSendStoryResultActiveStoryLimitExceeded": CanSendStoryResultActiveStoryLimitExceededTypeID, + "canSendStoryResultWeeklyLimitExceeded": CanSendStoryResultWeeklyLimitExceededTypeID, + "canSendStoryResultMonthlyLimitExceeded": CanSendStoryResultMonthlyLimitExceededTypeID, + "canTransferOwnershipResultOk": CanTransferOwnershipResultOkTypeID, + "canTransferOwnershipResultPasswordNeeded": CanTransferOwnershipResultPasswordNeededTypeID, + "canTransferOwnershipResultPasswordTooFresh": CanTransferOwnershipResultPasswordTooFreshTypeID, + "canTransferOwnershipResultSessionTooFresh": CanTransferOwnershipResultSessionTooFreshTypeID, + "checkChatUsernameResultOk": CheckChatUsernameResultOkTypeID, + "checkChatUsernameResultUsernameInvalid": CheckChatUsernameResultUsernameInvalidTypeID, + "checkChatUsernameResultUsernameOccupied": CheckChatUsernameResultUsernameOccupiedTypeID, + "checkChatUsernameResultUsernamePurchasable": CheckChatUsernameResultUsernamePurchasableTypeID, + "checkChatUsernameResultPublicChatsTooMany": CheckChatUsernameResultPublicChatsTooManyTypeID, + "checkChatUsernameResultPublicGroupsUnavailable": CheckChatUsernameResultPublicGroupsUnavailableTypeID, + "checkStickerSetNameResultOk": CheckStickerSetNameResultOkTypeID, + "checkStickerSetNameResultNameInvalid": CheckStickerSetNameResultNameInvalidTypeID, + "checkStickerSetNameResultNameOccupied": CheckStickerSetNameResultNameOccupiedTypeID, + "resetPasswordResultOk": ResetPasswordResultOkTypeID, + "resetPasswordResultPending": ResetPasswordResultPendingTypeID, + "resetPasswordResultDeclined": ResetPasswordResultDeclinedTypeID, + "messageFileTypePrivate": MessageFileTypePrivateTypeID, + "messageFileTypeGroup": MessageFileTypeGroupTypeID, + "messageFileTypeUnknown": MessageFileTypeUnknownTypeID, + "pushMessageContentHidden": PushMessageContentHiddenTypeID, + "pushMessageContentAnimation": PushMessageContentAnimationTypeID, + "pushMessageContentAudio": PushMessageContentAudioTypeID, + "pushMessageContentContact": PushMessageContentContactTypeID, + "pushMessageContentContactRegistered": PushMessageContentContactRegisteredTypeID, + "pushMessageContentDocument": PushMessageContentDocumentTypeID, + "pushMessageContentGame": PushMessageContentGameTypeID, + "pushMessageContentGameScore": PushMessageContentGameScoreTypeID, + "pushMessageContentInvoice": PushMessageContentInvoiceTypeID, + "pushMessageContentLocation": PushMessageContentLocationTypeID, + "pushMessageContentPhoto": PushMessageContentPhotoTypeID, + "pushMessageContentPoll": PushMessageContentPollTypeID, + "pushMessageContentScreenshotTaken": PushMessageContentScreenshotTakenTypeID, + "pushMessageContentSticker": PushMessageContentStickerTypeID, + "pushMessageContentStory": PushMessageContentStoryTypeID, + "pushMessageContentText": PushMessageContentTextTypeID, + "pushMessageContentVideo": PushMessageContentVideoTypeID, + "pushMessageContentVideoNote": PushMessageContentVideoNoteTypeID, + "pushMessageContentVoiceNote": PushMessageContentVoiceNoteTypeID, + "pushMessageContentBasicGroupChatCreate": PushMessageContentBasicGroupChatCreateTypeID, + "pushMessageContentChatAddMembers": PushMessageContentChatAddMembersTypeID, + "pushMessageContentChatChangePhoto": PushMessageContentChatChangePhotoTypeID, + "pushMessageContentChatChangeTitle": PushMessageContentChatChangeTitleTypeID, + "pushMessageContentChatSetBackground": PushMessageContentChatSetBackgroundTypeID, + "pushMessageContentChatSetTheme": PushMessageContentChatSetThemeTypeID, + "pushMessageContentChatDeleteMember": PushMessageContentChatDeleteMemberTypeID, + "pushMessageContentChatJoinByLink": PushMessageContentChatJoinByLinkTypeID, + "pushMessageContentChatJoinByRequest": PushMessageContentChatJoinByRequestTypeID, + "pushMessageContentRecurringPayment": PushMessageContentRecurringPaymentTypeID, + "pushMessageContentSuggestProfilePhoto": PushMessageContentSuggestProfilePhotoTypeID, + "pushMessageContentMessageForwards": PushMessageContentMessageForwardsTypeID, + "pushMessageContentMediaAlbum": PushMessageContentMediaAlbumTypeID, + "notificationTypeNewMessage": NotificationTypeNewMessageTypeID, + "notificationTypeNewSecretChat": NotificationTypeNewSecretChatTypeID, + "notificationTypeNewCall": NotificationTypeNewCallTypeID, + "notificationTypeNewPushMessage": NotificationTypeNewPushMessageTypeID, + "notificationGroupTypeMessages": NotificationGroupTypeMessagesTypeID, + "notificationGroupTypeMentions": NotificationGroupTypeMentionsTypeID, + "notificationGroupTypeSecretChat": NotificationGroupTypeSecretChatTypeID, + "notificationGroupTypeCalls": NotificationGroupTypeCallsTypeID, + "notificationSound": NotificationSoundTypeID, + "notificationSounds": NotificationSoundsTypeID, + "notification": NotificationTypeID, + "notificationGroup": NotificationGroupTypeID, + "optionValueBoolean": OptionValueBooleanTypeID, + "optionValueEmpty": OptionValueEmptyTypeID, + "optionValueInteger": OptionValueIntegerTypeID, + "optionValueString": OptionValueStringTypeID, + "jsonObjectMember": JSONObjectMemberTypeID, + "jsonValueNull": JSONValueNullTypeID, + "jsonValueBoolean": JSONValueBooleanTypeID, + "jsonValueNumber": JSONValueNumberTypeID, + "jsonValueString": JSONValueStringTypeID, + "jsonValueArray": JSONValueArrayTypeID, + "jsonValueObject": JSONValueObjectTypeID, + "storyPrivacySettingsEveryone": StoryPrivacySettingsEveryoneTypeID, + "storyPrivacySettingsContacts": StoryPrivacySettingsContactsTypeID, + "storyPrivacySettingsCloseFriends": StoryPrivacySettingsCloseFriendsTypeID, + "storyPrivacySettingsSelectedUsers": StoryPrivacySettingsSelectedUsersTypeID, + "userPrivacySettingRuleAllowAll": UserPrivacySettingRuleAllowAllTypeID, + "userPrivacySettingRuleAllowContacts": UserPrivacySettingRuleAllowContactsTypeID, + "userPrivacySettingRuleAllowUsers": UserPrivacySettingRuleAllowUsersTypeID, + "userPrivacySettingRuleAllowChatMembers": UserPrivacySettingRuleAllowChatMembersTypeID, + "userPrivacySettingRuleRestrictAll": UserPrivacySettingRuleRestrictAllTypeID, + "userPrivacySettingRuleRestrictContacts": UserPrivacySettingRuleRestrictContactsTypeID, + "userPrivacySettingRuleRestrictUsers": UserPrivacySettingRuleRestrictUsersTypeID, + "userPrivacySettingRuleRestrictChatMembers": UserPrivacySettingRuleRestrictChatMembersTypeID, + "userPrivacySettingRules": UserPrivacySettingRulesTypeID, + "userPrivacySettingShowStatus": UserPrivacySettingShowStatusTypeID, + "userPrivacySettingShowProfilePhoto": UserPrivacySettingShowProfilePhotoTypeID, + "userPrivacySettingShowLinkInForwardedMessages": UserPrivacySettingShowLinkInForwardedMessagesTypeID, + "userPrivacySettingShowPhoneNumber": UserPrivacySettingShowPhoneNumberTypeID, + "userPrivacySettingShowBio": UserPrivacySettingShowBioTypeID, + "userPrivacySettingAllowChatInvites": UserPrivacySettingAllowChatInvitesTypeID, + "userPrivacySettingAllowCalls": UserPrivacySettingAllowCallsTypeID, + "userPrivacySettingAllowPeerToPeerCalls": UserPrivacySettingAllowPeerToPeerCallsTypeID, + "userPrivacySettingAllowFindingByPhoneNumber": UserPrivacySettingAllowFindingByPhoneNumberTypeID, "userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages": UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessagesTypeID, - "accountTtl": AccountTTLTypeID, - "messageAutoDeleteTime": MessageAutoDeleteTimeTypeID, - "sessionTypeAndroid": SessionTypeAndroidTypeID, - "sessionTypeApple": SessionTypeAppleTypeID, - "sessionTypeBrave": SessionTypeBraveTypeID, - "sessionTypeChrome": SessionTypeChromeTypeID, - "sessionTypeEdge": SessionTypeEdgeTypeID, - "sessionTypeFirefox": SessionTypeFirefoxTypeID, - "sessionTypeIpad": SessionTypeIpadTypeID, - "sessionTypeIphone": SessionTypeIphoneTypeID, - "sessionTypeLinux": SessionTypeLinuxTypeID, - "sessionTypeMac": SessionTypeMACTypeID, - "sessionTypeOpera": SessionTypeOperaTypeID, - "sessionTypeSafari": SessionTypeSafariTypeID, - "sessionTypeUbuntu": SessionTypeUbuntuTypeID, - "sessionTypeUnknown": SessionTypeUnknownTypeID, - "sessionTypeVivaldi": SessionTypeVivaldiTypeID, - "sessionTypeWindows": SessionTypeWindowsTypeID, - "sessionTypeXbox": SessionTypeXboxTypeID, - "session": SessionTypeID, - "sessions": SessionsTypeID, - "connectedWebsite": ConnectedWebsiteTypeID, - "connectedWebsites": ConnectedWebsitesTypeID, - "reportReasonSpam": ReportReasonSpamTypeID, - "reportReasonViolence": ReportReasonViolenceTypeID, - "reportReasonPornography": ReportReasonPornographyTypeID, - "reportReasonChildAbuse": ReportReasonChildAbuseTypeID, - "reportReasonCopyright": ReportReasonCopyrightTypeID, - "reportReasonUnrelatedLocation": ReportReasonUnrelatedLocationTypeID, - "reportReasonFake": ReportReasonFakeTypeID, - "reportReasonIllegalDrugs": ReportReasonIllegalDrugsTypeID, - "reportReasonPersonalDetails": ReportReasonPersonalDetailsTypeID, - "reportReasonCustom": ReportReasonCustomTypeID, - "targetChatCurrent": TargetChatCurrentTypeID, - "targetChatChosen": TargetChatChosenTypeID, - "targetChatInternalLink": TargetChatInternalLinkTypeID, - "internalLinkTypeActiveSessions": InternalLinkTypeActiveSessionsTypeID, - "internalLinkTypeAttachmentMenuBot": InternalLinkTypeAttachmentMenuBotTypeID, - "internalLinkTypeAuthenticationCode": InternalLinkTypeAuthenticationCodeTypeID, - "internalLinkTypeBackground": InternalLinkTypeBackgroundTypeID, - "internalLinkTypeBotAddToChannel": InternalLinkTypeBotAddToChannelTypeID, - "internalLinkTypeBotStart": InternalLinkTypeBotStartTypeID, - "internalLinkTypeBotStartInGroup": InternalLinkTypeBotStartInGroupTypeID, - "internalLinkTypeChangePhoneNumber": InternalLinkTypeChangePhoneNumberTypeID, - "internalLinkTypeChatFolderInvite": InternalLinkTypeChatFolderInviteTypeID, - "internalLinkTypeChatFolderSettings": InternalLinkTypeChatFolderSettingsTypeID, - "internalLinkTypeChatInvite": InternalLinkTypeChatInviteTypeID, - "internalLinkTypeDefaultMessageAutoDeleteTimerSettings": InternalLinkTypeDefaultMessageAutoDeleteTimerSettingsTypeID, - "internalLinkTypeEditProfileSettings": InternalLinkTypeEditProfileSettingsTypeID, - "internalLinkTypeGame": InternalLinkTypeGameTypeID, - "internalLinkTypeInstantView": InternalLinkTypeInstantViewTypeID, - "internalLinkTypeInvoice": InternalLinkTypeInvoiceTypeID, - "internalLinkTypeLanguagePack": InternalLinkTypeLanguagePackTypeID, - "internalLinkTypeLanguageSettings": InternalLinkTypeLanguageSettingsTypeID, - "internalLinkTypeMessage": InternalLinkTypeMessageTypeID, - "internalLinkTypeMessageDraft": InternalLinkTypeMessageDraftTypeID, - "internalLinkTypePassportDataRequest": InternalLinkTypePassportDataRequestTypeID, - "internalLinkTypePhoneNumberConfirmation": InternalLinkTypePhoneNumberConfirmationTypeID, - "internalLinkTypePremiumFeatures": InternalLinkTypePremiumFeaturesTypeID, - "internalLinkTypePrivacyAndSecuritySettings": InternalLinkTypePrivacyAndSecuritySettingsTypeID, - "internalLinkTypeProxy": InternalLinkTypeProxyTypeID, - "internalLinkTypePublicChat": InternalLinkTypePublicChatTypeID, - "internalLinkTypeQrCodeAuthentication": InternalLinkTypeQrCodeAuthenticationTypeID, - "internalLinkTypeRestorePurchases": InternalLinkTypeRestorePurchasesTypeID, - "internalLinkTypeSettings": InternalLinkTypeSettingsTypeID, - "internalLinkTypeStickerSet": InternalLinkTypeStickerSetTypeID, - "internalLinkTypeStory": InternalLinkTypeStoryTypeID, - "internalLinkTypeTheme": InternalLinkTypeThemeTypeID, - "internalLinkTypeThemeSettings": InternalLinkTypeThemeSettingsTypeID, - "internalLinkTypeUnknownDeepLink": InternalLinkTypeUnknownDeepLinkTypeID, - "internalLinkTypeUnsupportedProxy": InternalLinkTypeUnsupportedProxyTypeID, - "internalLinkTypeUserPhoneNumber": InternalLinkTypeUserPhoneNumberTypeID, - "internalLinkTypeUserToken": InternalLinkTypeUserTokenTypeID, - "internalLinkTypeVideoChat": InternalLinkTypeVideoChatTypeID, - "internalLinkTypeWebApp": InternalLinkTypeWebAppTypeID, - "messageLink": MessageLinkTypeID, - "messageLinkInfo": MessageLinkInfoTypeID, - "blockListMain": BlockListMainTypeID, - "blockListStories": BlockListStoriesTypeID, - "filePart": FilePartTypeID, - "fileTypeNone": FileTypeNoneTypeID, - "fileTypeAnimation": FileTypeAnimationTypeID, - "fileTypeAudio": FileTypeAudioTypeID, - "fileTypeDocument": FileTypeDocumentTypeID, - "fileTypeNotificationSound": FileTypeNotificationSoundTypeID, - "fileTypePhoto": FileTypePhotoTypeID, - "fileTypePhotoStory": FileTypePhotoStoryTypeID, - "fileTypeProfilePhoto": FileTypeProfilePhotoTypeID, - "fileTypeSecret": FileTypeSecretTypeID, - "fileTypeSecretThumbnail": FileTypeSecretThumbnailTypeID, - "fileTypeSecure": FileTypeSecureTypeID, - "fileTypeSticker": FileTypeStickerTypeID, - "fileTypeThumbnail": FileTypeThumbnailTypeID, - "fileTypeUnknown": FileTypeUnknownTypeID, - "fileTypeVideo": FileTypeVideoTypeID, - "fileTypeVideoNote": FileTypeVideoNoteTypeID, - "fileTypeVideoStory": FileTypeVideoStoryTypeID, - "fileTypeVoiceNote": FileTypeVoiceNoteTypeID, - "fileTypeWallpaper": FileTypeWallpaperTypeID, - "storageStatisticsByFileType": StorageStatisticsByFileTypeTypeID, - "storageStatisticsByChat": StorageStatisticsByChatTypeID, - "storageStatistics": StorageStatisticsTypeID, - "storageStatisticsFast": StorageStatisticsFastTypeID, - "databaseStatistics": DatabaseStatisticsTypeID, - "networkTypeNone": NetworkTypeNoneTypeID, - "networkTypeMobile": NetworkTypeMobileTypeID, - "networkTypeMobileRoaming": NetworkTypeMobileRoamingTypeID, - "networkTypeWiFi": NetworkTypeWiFiTypeID, - "networkTypeOther": NetworkTypeOtherTypeID, - "networkStatisticsEntryFile": NetworkStatisticsEntryFileTypeID, - "networkStatisticsEntryCall": NetworkStatisticsEntryCallTypeID, - "networkStatistics": NetworkStatisticsTypeID, - "autoDownloadSettings": AutoDownloadSettingsTypeID, - "autoDownloadSettingsPresets": AutoDownloadSettingsPresetsTypeID, - "autosaveSettingsScopePrivateChats": AutosaveSettingsScopePrivateChatsTypeID, - "autosaveSettingsScopeGroupChats": AutosaveSettingsScopeGroupChatsTypeID, - "autosaveSettingsScopeChannelChats": AutosaveSettingsScopeChannelChatsTypeID, - "autosaveSettingsScopeChat": AutosaveSettingsScopeChatTypeID, - "scopeAutosaveSettings": ScopeAutosaveSettingsTypeID, - "autosaveSettingsException": AutosaveSettingsExceptionTypeID, - "autosaveSettings": AutosaveSettingsTypeID, - "connectionStateWaitingForNetwork": ConnectionStateWaitingForNetworkTypeID, - "connectionStateConnectingToProxy": ConnectionStateConnectingToProxyTypeID, - "connectionStateConnecting": ConnectionStateConnectingTypeID, - "connectionStateUpdating": ConnectionStateUpdatingTypeID, - "connectionStateReady": ConnectionStateReadyTypeID, - "topChatCategoryUsers": TopChatCategoryUsersTypeID, - "topChatCategoryBots": TopChatCategoryBotsTypeID, - "topChatCategoryGroups": TopChatCategoryGroupsTypeID, - "topChatCategoryChannels": TopChatCategoryChannelsTypeID, - "topChatCategoryInlineBots": TopChatCategoryInlineBotsTypeID, - "topChatCategoryCalls": TopChatCategoryCallsTypeID, - "topChatCategoryForwardChats": TopChatCategoryForwardChatsTypeID, - "foundPositions": FoundPositionsTypeID, - "tMeUrlTypeUser": TMeURLTypeUserTypeID, - "tMeUrlTypeSupergroup": TMeURLTypeSupergroupTypeID, - "tMeUrlTypeChatInvite": TMeURLTypeChatInviteTypeID, - "tMeUrlTypeStickerSet": TMeURLTypeStickerSetTypeID, - "tMeUrl": TMeURLTypeID, - "tMeUrls": TMeURLsTypeID, - "suggestedActionEnableArchiveAndMuteNewChats": SuggestedActionEnableArchiveAndMuteNewChatsTypeID, - "suggestedActionCheckPassword": SuggestedActionCheckPasswordTypeID, - "suggestedActionCheckPhoneNumber": SuggestedActionCheckPhoneNumberTypeID, - "suggestedActionViewChecksHint": SuggestedActionViewChecksHintTypeID, - "suggestedActionConvertToBroadcastGroup": SuggestedActionConvertToBroadcastGroupTypeID, - "suggestedActionSetPassword": SuggestedActionSetPasswordTypeID, - "suggestedActionUpgradePremium": SuggestedActionUpgradePremiumTypeID, - "suggestedActionRestorePremium": SuggestedActionRestorePremiumTypeID, - "suggestedActionSubscribeToAnnualPremium": SuggestedActionSubscribeToAnnualPremiumTypeID, + "accountTtl": AccountTTLTypeID, + "messageAutoDeleteTime": MessageAutoDeleteTimeTypeID, + "sessionTypeAndroid": SessionTypeAndroidTypeID, + "sessionTypeApple": SessionTypeAppleTypeID, + "sessionTypeBrave": SessionTypeBraveTypeID, + "sessionTypeChrome": SessionTypeChromeTypeID, + "sessionTypeEdge": SessionTypeEdgeTypeID, + "sessionTypeFirefox": SessionTypeFirefoxTypeID, + "sessionTypeIpad": SessionTypeIpadTypeID, + "sessionTypeIphone": SessionTypeIphoneTypeID, + "sessionTypeLinux": SessionTypeLinuxTypeID, + "sessionTypeMac": SessionTypeMACTypeID, + "sessionTypeOpera": SessionTypeOperaTypeID, + "sessionTypeSafari": SessionTypeSafariTypeID, + "sessionTypeUbuntu": SessionTypeUbuntuTypeID, + "sessionTypeUnknown": SessionTypeUnknownTypeID, + "sessionTypeVivaldi": SessionTypeVivaldiTypeID, + "sessionTypeWindows": SessionTypeWindowsTypeID, + "sessionTypeXbox": SessionTypeXboxTypeID, + "session": SessionTypeID, + "sessions": SessionsTypeID, + "unconfirmedSession": UnconfirmedSessionTypeID, + "connectedWebsite": ConnectedWebsiteTypeID, + "connectedWebsites": ConnectedWebsitesTypeID, + "reportReasonSpam": ReportReasonSpamTypeID, + "reportReasonViolence": ReportReasonViolenceTypeID, + "reportReasonPornography": ReportReasonPornographyTypeID, + "reportReasonChildAbuse": ReportReasonChildAbuseTypeID, + "reportReasonCopyright": ReportReasonCopyrightTypeID, + "reportReasonUnrelatedLocation": ReportReasonUnrelatedLocationTypeID, + "reportReasonFake": ReportReasonFakeTypeID, + "reportReasonIllegalDrugs": ReportReasonIllegalDrugsTypeID, + "reportReasonPersonalDetails": ReportReasonPersonalDetailsTypeID, + "reportReasonCustom": ReportReasonCustomTypeID, + "targetChatCurrent": TargetChatCurrentTypeID, + "targetChatChosen": TargetChatChosenTypeID, + "targetChatInternalLink": TargetChatInternalLinkTypeID, + "internalLinkTypeActiveSessions": InternalLinkTypeActiveSessionsTypeID, + "internalLinkTypeAttachmentMenuBot": InternalLinkTypeAttachmentMenuBotTypeID, + "internalLinkTypeAuthenticationCode": InternalLinkTypeAuthenticationCodeTypeID, + "internalLinkTypeBackground": InternalLinkTypeBackgroundTypeID, + "internalLinkTypeBotAddToChannel": InternalLinkTypeBotAddToChannelTypeID, + "internalLinkTypeBotStart": InternalLinkTypeBotStartTypeID, + "internalLinkTypeBotStartInGroup": InternalLinkTypeBotStartInGroupTypeID, + "internalLinkTypeChangePhoneNumber": InternalLinkTypeChangePhoneNumberTypeID, + "internalLinkTypeChatFolderInvite": InternalLinkTypeChatFolderInviteTypeID, + "internalLinkTypeChatFolderSettings": InternalLinkTypeChatFolderSettingsTypeID, + "internalLinkTypeChatInvite": InternalLinkTypeChatInviteTypeID, + "internalLinkTypeDefaultMessageAutoDeleteTimerSettings": InternalLinkTypeDefaultMessageAutoDeleteTimerSettingsTypeID, + "internalLinkTypeEditProfileSettings": InternalLinkTypeEditProfileSettingsTypeID, + "internalLinkTypeGame": InternalLinkTypeGameTypeID, + "internalLinkTypeInstantView": InternalLinkTypeInstantViewTypeID, + "internalLinkTypeInvoice": InternalLinkTypeInvoiceTypeID, + "internalLinkTypeLanguagePack": InternalLinkTypeLanguagePackTypeID, + "internalLinkTypeLanguageSettings": InternalLinkTypeLanguageSettingsTypeID, + "internalLinkTypeMessage": InternalLinkTypeMessageTypeID, + "internalLinkTypeMessageDraft": InternalLinkTypeMessageDraftTypeID, + "internalLinkTypePassportDataRequest": InternalLinkTypePassportDataRequestTypeID, + "internalLinkTypePhoneNumberConfirmation": InternalLinkTypePhoneNumberConfirmationTypeID, + "internalLinkTypePremiumFeatures": InternalLinkTypePremiumFeaturesTypeID, + "internalLinkTypePrivacyAndSecuritySettings": InternalLinkTypePrivacyAndSecuritySettingsTypeID, + "internalLinkTypeProxy": InternalLinkTypeProxyTypeID, + "internalLinkTypePublicChat": InternalLinkTypePublicChatTypeID, + "internalLinkTypeQrCodeAuthentication": InternalLinkTypeQrCodeAuthenticationTypeID, + "internalLinkTypeRestorePurchases": InternalLinkTypeRestorePurchasesTypeID, + "internalLinkTypeSettings": InternalLinkTypeSettingsTypeID, + "internalLinkTypeSideMenuBot": InternalLinkTypeSideMenuBotTypeID, + "internalLinkTypeStickerSet": InternalLinkTypeStickerSetTypeID, + "internalLinkTypeStory": InternalLinkTypeStoryTypeID, + "internalLinkTypeTheme": InternalLinkTypeThemeTypeID, + "internalLinkTypeThemeSettings": InternalLinkTypeThemeSettingsTypeID, + "internalLinkTypeUnknownDeepLink": InternalLinkTypeUnknownDeepLinkTypeID, + "internalLinkTypeUnsupportedProxy": InternalLinkTypeUnsupportedProxyTypeID, + "internalLinkTypeUserPhoneNumber": InternalLinkTypeUserPhoneNumberTypeID, + "internalLinkTypeUserToken": InternalLinkTypeUserTokenTypeID, + "internalLinkTypeVideoChat": InternalLinkTypeVideoChatTypeID, + "internalLinkTypeWebApp": InternalLinkTypeWebAppTypeID, + "messageLink": MessageLinkTypeID, + "messageLinkInfo": MessageLinkInfoTypeID, + "blockListMain": BlockListMainTypeID, + "blockListStories": BlockListStoriesTypeID, + "filePart": FilePartTypeID, + "fileTypeNone": FileTypeNoneTypeID, + "fileTypeAnimation": FileTypeAnimationTypeID, + "fileTypeAudio": FileTypeAudioTypeID, + "fileTypeDocument": FileTypeDocumentTypeID, + "fileTypeNotificationSound": FileTypeNotificationSoundTypeID, + "fileTypePhoto": FileTypePhotoTypeID, + "fileTypePhotoStory": FileTypePhotoStoryTypeID, + "fileTypeProfilePhoto": FileTypeProfilePhotoTypeID, + "fileTypeSecret": FileTypeSecretTypeID, + "fileTypeSecretThumbnail": FileTypeSecretThumbnailTypeID, + "fileTypeSecure": FileTypeSecureTypeID, + "fileTypeSticker": FileTypeStickerTypeID, + "fileTypeThumbnail": FileTypeThumbnailTypeID, + "fileTypeUnknown": FileTypeUnknownTypeID, + "fileTypeVideo": FileTypeVideoTypeID, + "fileTypeVideoNote": FileTypeVideoNoteTypeID, + "fileTypeVideoStory": FileTypeVideoStoryTypeID, + "fileTypeVoiceNote": FileTypeVoiceNoteTypeID, + "fileTypeWallpaper": FileTypeWallpaperTypeID, + "storageStatisticsByFileType": StorageStatisticsByFileTypeTypeID, + "storageStatisticsByChat": StorageStatisticsByChatTypeID, + "storageStatistics": StorageStatisticsTypeID, + "storageStatisticsFast": StorageStatisticsFastTypeID, + "databaseStatistics": DatabaseStatisticsTypeID, + "networkTypeNone": NetworkTypeNoneTypeID, + "networkTypeMobile": NetworkTypeMobileTypeID, + "networkTypeMobileRoaming": NetworkTypeMobileRoamingTypeID, + "networkTypeWiFi": NetworkTypeWiFiTypeID, + "networkTypeOther": NetworkTypeOtherTypeID, + "networkStatisticsEntryFile": NetworkStatisticsEntryFileTypeID, + "networkStatisticsEntryCall": NetworkStatisticsEntryCallTypeID, + "networkStatistics": NetworkStatisticsTypeID, + "autoDownloadSettings": AutoDownloadSettingsTypeID, + "autoDownloadSettingsPresets": AutoDownloadSettingsPresetsTypeID, + "autosaveSettingsScopePrivateChats": AutosaveSettingsScopePrivateChatsTypeID, + "autosaveSettingsScopeGroupChats": AutosaveSettingsScopeGroupChatsTypeID, + "autosaveSettingsScopeChannelChats": AutosaveSettingsScopeChannelChatsTypeID, + "autosaveSettingsScopeChat": AutosaveSettingsScopeChatTypeID, + "scopeAutosaveSettings": ScopeAutosaveSettingsTypeID, + "autosaveSettingsException": AutosaveSettingsExceptionTypeID, + "autosaveSettings": AutosaveSettingsTypeID, + "connectionStateWaitingForNetwork": ConnectionStateWaitingForNetworkTypeID, + "connectionStateConnectingToProxy": ConnectionStateConnectingToProxyTypeID, + "connectionStateConnecting": ConnectionStateConnectingTypeID, + "connectionStateUpdating": ConnectionStateUpdatingTypeID, + "connectionStateReady": ConnectionStateReadyTypeID, + "topChatCategoryUsers": TopChatCategoryUsersTypeID, + "topChatCategoryBots": TopChatCategoryBotsTypeID, + "topChatCategoryGroups": TopChatCategoryGroupsTypeID, + "topChatCategoryChannels": TopChatCategoryChannelsTypeID, + "topChatCategoryInlineBots": TopChatCategoryInlineBotsTypeID, + "topChatCategoryCalls": TopChatCategoryCallsTypeID, + "topChatCategoryForwardChats": TopChatCategoryForwardChatsTypeID, + "foundPositions": FoundPositionsTypeID, + "tMeUrlTypeUser": TMeURLTypeUserTypeID, + "tMeUrlTypeSupergroup": TMeURLTypeSupergroupTypeID, + "tMeUrlTypeChatInvite": TMeURLTypeChatInviteTypeID, + "tMeUrlTypeStickerSet": TMeURLTypeStickerSetTypeID, + "tMeUrl": TMeURLTypeID, + "tMeUrls": TMeURLsTypeID, + "suggestedActionEnableArchiveAndMuteNewChats": SuggestedActionEnableArchiveAndMuteNewChatsTypeID, + "suggestedActionCheckPassword": SuggestedActionCheckPasswordTypeID, + "suggestedActionCheckPhoneNumber": SuggestedActionCheckPhoneNumberTypeID, + "suggestedActionViewChecksHint": SuggestedActionViewChecksHintTypeID, + "suggestedActionConvertToBroadcastGroup": SuggestedActionConvertToBroadcastGroupTypeID, + "suggestedActionSetPassword": SuggestedActionSetPasswordTypeID, + "suggestedActionUpgradePremium": SuggestedActionUpgradePremiumTypeID, + "suggestedActionRestorePremium": SuggestedActionRestorePremiumTypeID, + "suggestedActionSubscribeToAnnualPremium": SuggestedActionSubscribeToAnnualPremiumTypeID, "count": CountTypeID, "text": TextTypeID, "seconds": SecondsTypeID, @@ -3183,6 +3199,7 @@ func NamesMap() map[string]uint32 { "updateConnectionState": UpdateConnectionStateTypeID, "updateTermsOfService": UpdateTermsOfServiceTypeID, "updateUsersNearby": UpdateUsersNearbyTypeID, + "updateUnconfirmedSession": UpdateUnconfirmedSessionTypeID, "updateAttachmentMenuBots": UpdateAttachmentMenuBotsTypeID, "updateWebAppMessageSent": UpdateWebAppMessageSentTypeID, "updateActiveEmojiReactions": UpdateActiveEmojiReactionsTypeID, @@ -3685,6 +3702,7 @@ func NamesMap() map[string]uint32 { "getActiveSessions": GetActiveSessionsRequestTypeID, "terminateSession": TerminateSessionRequestTypeID, "terminateAllOtherSessions": TerminateAllOtherSessionsRequestTypeID, + "confirmSession": ConfirmSessionRequestTypeID, "toggleSessionCanAcceptCalls": ToggleSessionCanAcceptCallsRequestTypeID, "toggleSessionCanAcceptSecretChats": ToggleSessionCanAcceptSecretChatsRequestTypeID, "setInactiveSessionTtl": SetInactiveSessionTTLRequestTypeID, @@ -4021,6 +4039,9 @@ func TypesConstructorMap() map[uint32]func() bin.Object { ChatInviteLinkCountsTypeID: func() bin.Object { return &ChatInviteLinkCounts{} }, ChatInviteLinkMemberTypeID: func() bin.Object { return &ChatInviteLinkMember{} }, ChatInviteLinkMembersTypeID: func() bin.Object { return &ChatInviteLinkMembers{} }, + InviteLinkChatTypeBasicGroupTypeID: func() bin.Object { return &InviteLinkChatTypeBasicGroup{} }, + InviteLinkChatTypeSupergroupTypeID: func() bin.Object { return &InviteLinkChatTypeSupergroup{} }, + InviteLinkChatTypeChannelTypeID: func() bin.Object { return &InviteLinkChatTypeChannel{} }, ChatInviteLinkInfoTypeID: func() bin.Object { return &ChatInviteLinkInfo{} }, ChatJoinRequestTypeID: func() bin.Object { return &ChatJoinRequest{} }, ChatJoinRequestsTypeID: func() bin.Object { return &ChatJoinRequests{} }, @@ -4403,6 +4424,8 @@ func TypesConstructorMap() map[uint32]func() bin.Object { InputThumbnailTypeID: func() bin.Object { return &InputThumbnail{} }, MessageSchedulingStateSendAtDateTypeID: func() bin.Object { return &MessageSchedulingStateSendAtDate{} }, MessageSchedulingStateSendWhenOnlineTypeID: func() bin.Object { return &MessageSchedulingStateSendWhenOnline{} }, + MessageSelfDestructTypeTimerTypeID: func() bin.Object { return &MessageSelfDestructTypeTimer{} }, + MessageSelfDestructTypeImmediatelyTypeID: func() bin.Object { return &MessageSelfDestructTypeImmediately{} }, MessageSendOptionsTypeID: func() bin.Object { return &MessageSendOptions{} }, MessageCopyOptionsTypeID: func() bin.Object { return &MessageCopyOptions{} }, InputMessageTextTypeID: func() bin.Object { return &InputMessageText{} }, @@ -4799,7 +4822,7 @@ func TypesConstructorMap() map[uint32]func() bin.Object { StoryPrivacySettingsEveryoneTypeID: func() bin.Object { return &StoryPrivacySettingsEveryone{} }, StoryPrivacySettingsContactsTypeID: func() bin.Object { return &StoryPrivacySettingsContacts{} }, StoryPrivacySettingsCloseFriendsTypeID: func() bin.Object { return &StoryPrivacySettingsCloseFriends{} }, - StoryPrivacySettingsSelectedContactsTypeID: func() bin.Object { return &StoryPrivacySettingsSelectedContacts{} }, + StoryPrivacySettingsSelectedUsersTypeID: func() bin.Object { return &StoryPrivacySettingsSelectedUsers{} }, UserPrivacySettingRuleAllowAllTypeID: func() bin.Object { return &UserPrivacySettingRuleAllowAll{} }, UserPrivacySettingRuleAllowContactsTypeID: func() bin.Object { return &UserPrivacySettingRuleAllowContacts{} }, UserPrivacySettingRuleAllowUsersTypeID: func() bin.Object { return &UserPrivacySettingRuleAllowUsers{} }, @@ -4840,6 +4863,7 @@ func TypesConstructorMap() map[uint32]func() bin.Object { SessionTypeXboxTypeID: func() bin.Object { return &SessionTypeXbox{} }, SessionTypeID: func() bin.Object { return &Session{} }, SessionsTypeID: func() bin.Object { return &Sessions{} }, + UnconfirmedSessionTypeID: func() bin.Object { return &UnconfirmedSession{} }, ConnectedWebsiteTypeID: func() bin.Object { return &ConnectedWebsite{} }, ConnectedWebsitesTypeID: func() bin.Object { return &ConnectedWebsites{} }, ReportReasonSpamTypeID: func() bin.Object { return &ReportReasonSpam{} }, @@ -4884,6 +4908,7 @@ func TypesConstructorMap() map[uint32]func() bin.Object { InternalLinkTypeQrCodeAuthenticationTypeID: func() bin.Object { return &InternalLinkTypeQrCodeAuthentication{} }, InternalLinkTypeRestorePurchasesTypeID: func() bin.Object { return &InternalLinkTypeRestorePurchases{} }, InternalLinkTypeSettingsTypeID: func() bin.Object { return &InternalLinkTypeSettings{} }, + InternalLinkTypeSideMenuBotTypeID: func() bin.Object { return &InternalLinkTypeSideMenuBot{} }, InternalLinkTypeStickerSetTypeID: func() bin.Object { return &InternalLinkTypeStickerSet{} }, InternalLinkTypeStoryTypeID: func() bin.Object { return &InternalLinkTypeStory{} }, InternalLinkTypeThemeTypeID: func() bin.Object { return &InternalLinkTypeTheme{} }, @@ -5097,6 +5122,7 @@ func TypesConstructorMap() map[uint32]func() bin.Object { UpdateConnectionStateTypeID: func() bin.Object { return &UpdateConnectionState{} }, UpdateTermsOfServiceTypeID: func() bin.Object { return &UpdateTermsOfService{} }, UpdateUsersNearbyTypeID: func() bin.Object { return &UpdateUsersNearby{} }, + UpdateUnconfirmedSessionTypeID: func() bin.Object { return &UpdateUnconfirmedSession{} }, UpdateAttachmentMenuBotsTypeID: func() bin.Object { return &UpdateAttachmentMenuBots{} }, UpdateWebAppMessageSentTypeID: func() bin.Object { return &UpdateWebAppMessageSent{} }, UpdateActiveEmojiReactionsTypeID: func() bin.Object { return &UpdateActiveEmojiReactions{} }, @@ -5599,6 +5625,7 @@ func TypesConstructorMap() map[uint32]func() bin.Object { GetActiveSessionsRequestTypeID: func() bin.Object { return &GetActiveSessionsRequest{} }, TerminateSessionRequestTypeID: func() bin.Object { return &TerminateSessionRequest{} }, TerminateAllOtherSessionsRequestTypeID: func() bin.Object { return &TerminateAllOtherSessionsRequest{} }, + ConfirmSessionRequestTypeID: func() bin.Object { return &ConfirmSessionRequest{} }, ToggleSessionCanAcceptCallsRequestTypeID: func() bin.Object { return &ToggleSessionCanAcceptCallsRequest{} }, ToggleSessionCanAcceptSecretChatsRequestTypeID: func() bin.Object { return &ToggleSessionCanAcceptSecretChatsRequest{} }, SetInactiveSessionTTLRequestTypeID: func() bin.Object { return &SetInactiveSessionTTLRequest{} }, @@ -6234,6 +6261,7 @@ func ClassConstructorsMap() map[string][]uint32 { InternalLinkTypeQrCodeAuthenticationTypeID, InternalLinkTypeRestorePurchasesTypeID, InternalLinkTypeSettingsTypeID, + InternalLinkTypeSideMenuBotTypeID, InternalLinkTypeStickerSetTypeID, InternalLinkTypeStoryTypeID, InternalLinkTypeThemeTypeID, @@ -6245,6 +6273,11 @@ func ClassConstructorsMap() map[string][]uint32 { InternalLinkTypeVideoChatTypeID, InternalLinkTypeWebAppTypeID, }, + InviteLinkChatTypeClassName: { + InviteLinkChatTypeBasicGroupTypeID, + InviteLinkChatTypeSupergroupTypeID, + InviteLinkChatTypeChannelTypeID, + }, JSONValueClassName: { JSONValueNullTypeID, JSONValueBooleanTypeID, @@ -6372,6 +6405,10 @@ func ClassConstructorsMap() map[string][]uint32 { MessageSchedulingStateSendAtDateTypeID, MessageSchedulingStateSendWhenOnlineTypeID, }, + MessageSelfDestructTypeClassName: { + MessageSelfDestructTypeTimerTypeID, + MessageSelfDestructTypeImmediatelyTypeID, + }, MessageSenderClassName: { MessageSenderUserTypeID, MessageSenderChatTypeID, @@ -6752,7 +6789,7 @@ func ClassConstructorsMap() map[string][]uint32 { StoryPrivacySettingsEveryoneTypeID, StoryPrivacySettingsContactsTypeID, StoryPrivacySettingsCloseFriendsTypeID, - StoryPrivacySettingsSelectedContactsTypeID, + StoryPrivacySettingsSelectedUsersTypeID, }, SuggestedActionClassName: { SuggestedActionEnableArchiveAndMuteNewChatsTypeID, @@ -6925,6 +6962,7 @@ func ClassConstructorsMap() map[string][]uint32 { UpdateConnectionStateTypeID, UpdateTermsOfServiceTypeID, UpdateUsersNearbyTypeID, + UpdateUnconfirmedSessionTypeID, UpdateAttachmentMenuBotsTypeID, UpdateWebAppMessageSentTypeID, UpdateActiveEmojiReactionsTypeID, diff --git a/tdapi/tl_session_gen.go b/tdapi/tl_session_gen.go index c4a25b737a..6e4891b981 100644 --- a/tdapi/tl_session_gen.go +++ b/tdapi/tl_session_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// Session represents TL type `session#8b189386`. +// Session represents TL type `session#9759a3c`. type Session struct { // Session identifier ID int64 @@ -40,6 +40,8 @@ type Session struct { // True, if a 2-step verification password is needed to complete authorization of the // session IsPasswordPending bool + // True, if the session wasn't confirmed from another session + IsUnconfirmed bool // True, if incoming secret chats can be accepted by the session CanAcceptSecretChats bool // True, if incoming calls can be accepted by the session @@ -70,16 +72,14 @@ type Session struct { // Point in time (Unix timestamp) when the session was last used LastActiveDate int32 // IP address from which the session was created, in human-readable format - IP string - // A two-letter country code for the country from which the session was created, based on - // the IP address - Country string - // Region code from which the session was created, based on the IP address - Region string + IPAddress string + // A human-readable description of the location from which the session was created, based + // on the IP address + Location string } // SessionTypeID is TL type id of Session. -const SessionTypeID = 0x8b189386 +const SessionTypeID = 0x9759a3c // Ensuring interfaces in compile-time for Session. var ( @@ -102,6 +102,9 @@ func (s *Session) Zero() bool { if !(s.IsPasswordPending == false) { return false } + if !(s.IsUnconfirmed == false) { + return false + } if !(s.CanAcceptSecretChats == false) { return false } @@ -138,13 +141,10 @@ func (s *Session) Zero() bool { if !(s.LastActiveDate == 0) { return false } - if !(s.IP == "") { + if !(s.IPAddress == "") { return false } - if !(s.Country == "") { - return false - } - if !(s.Region == "") { + if !(s.Location == "") { return false } @@ -195,6 +195,10 @@ func (s *Session) TypeInfo() tdp.Type { Name: "IsPasswordPending", SchemaName: "is_password_pending", }, + { + Name: "IsUnconfirmed", + SchemaName: "is_unconfirmed", + }, { Name: "CanAcceptSecretChats", SchemaName: "can_accept_secret_chats", @@ -244,16 +248,12 @@ func (s *Session) TypeInfo() tdp.Type { SchemaName: "last_active_date", }, { - Name: "IP", - SchemaName: "ip", - }, - { - Name: "Country", - SchemaName: "country", + Name: "IPAddress", + SchemaName: "ip_address", }, { - Name: "Region", - SchemaName: "region", + Name: "Location", + SchemaName: "location", }, } return typ @@ -262,7 +262,7 @@ func (s *Session) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (s *Session) Encode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode session#8b189386 as nil") + return fmt.Errorf("can't encode session#9759a3c as nil") } b.PutID(SessionTypeID) return s.EncodeBare(b) @@ -271,18 +271,19 @@ func (s *Session) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (s *Session) EncodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode session#8b189386 as nil") + return fmt.Errorf("can't encode session#9759a3c as nil") } b.PutLong(s.ID) b.PutBool(s.IsCurrent) b.PutBool(s.IsPasswordPending) + b.PutBool(s.IsUnconfirmed) b.PutBool(s.CanAcceptSecretChats) b.PutBool(s.CanAcceptCalls) if s.Type == nil { - return fmt.Errorf("unable to encode session#8b189386: field type is nil") + return fmt.Errorf("unable to encode session#9759a3c: field type is nil") } if err := s.Type.Encode(b); err != nil { - return fmt.Errorf("unable to encode session#8b189386: field type: %w", err) + return fmt.Errorf("unable to encode session#9759a3c: field type: %w", err) } b.PutInt32(s.APIID) b.PutString(s.ApplicationName) @@ -293,19 +294,18 @@ func (s *Session) EncodeBare(b *bin.Buffer) error { b.PutString(s.SystemVersion) b.PutInt32(s.LogInDate) b.PutInt32(s.LastActiveDate) - b.PutString(s.IP) - b.PutString(s.Country) - b.PutString(s.Region) + b.PutString(s.IPAddress) + b.PutString(s.Location) return nil } // Decode implements bin.Decoder. func (s *Session) Decode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode session#8b189386 to nil") + return fmt.Errorf("can't decode session#9759a3c to nil") } if err := b.ConsumeID(SessionTypeID); err != nil { - return fmt.Errorf("unable to decode session#8b189386: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: %w", err) } return s.DecodeBare(b) } @@ -313,133 +313,133 @@ func (s *Session) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (s *Session) DecodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode session#8b189386 to nil") + return fmt.Errorf("can't decode session#9759a3c to nil") } { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field id: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field id: %w", err) } s.ID = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field is_current: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field is_current: %w", err) } s.IsCurrent = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field is_password_pending: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field is_password_pending: %w", err) } s.IsPasswordPending = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field can_accept_secret_chats: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field is_unconfirmed: %w", err) + } + s.IsUnconfirmed = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode session#9759a3c: field can_accept_secret_chats: %w", err) } s.CanAcceptSecretChats = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field can_accept_calls: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field can_accept_calls: %w", err) } s.CanAcceptCalls = value } { value, err := DecodeSessionType(b) if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field type: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field type: %w", err) } s.Type = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field api_id: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field api_id: %w", err) } s.APIID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field application_name: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field application_name: %w", err) } s.ApplicationName = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field application_version: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field application_version: %w", err) } s.ApplicationVersion = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field is_official_application: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field is_official_application: %w", err) } s.IsOfficialApplication = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field device_model: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field device_model: %w", err) } s.DeviceModel = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field platform: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field platform: %w", err) } s.Platform = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field system_version: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field system_version: %w", err) } s.SystemVersion = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field log_in_date: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field log_in_date: %w", err) } s.LogInDate = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field last_active_date: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field last_active_date: %w", err) } s.LastActiveDate = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field ip: %w", err) - } - s.IP = value - } - { - value, err := b.String() - if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field country: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field ip_address: %w", err) } - s.Country = value + s.IPAddress = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field region: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field location: %w", err) } - s.Region = value + s.Location = value } return nil } @@ -447,7 +447,7 @@ func (s *Session) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (s *Session) EncodeTDLibJSON(b tdjson.Encoder) error { if s == nil { - return fmt.Errorf("can't encode session#8b189386 as nil") + return fmt.Errorf("can't encode session#9759a3c as nil") } b.ObjStart() b.PutID("session") @@ -461,6 +461,9 @@ func (s *Session) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("is_password_pending") b.PutBool(s.IsPasswordPending) b.Comma() + b.FieldStart("is_unconfirmed") + b.PutBool(s.IsUnconfirmed) + b.Comma() b.FieldStart("can_accept_secret_chats") b.PutBool(s.CanAcceptSecretChats) b.Comma() @@ -469,10 +472,10 @@ func (s *Session) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("type") if s.Type == nil { - return fmt.Errorf("unable to encode session#8b189386: field type is nil") + return fmt.Errorf("unable to encode session#9759a3c: field type is nil") } if err := s.Type.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode session#8b189386: field type: %w", err) + return fmt.Errorf("unable to encode session#9759a3c: field type: %w", err) } b.Comma() b.FieldStart("api_id") @@ -502,14 +505,11 @@ func (s *Session) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("last_active_date") b.PutInt32(s.LastActiveDate) b.Comma() - b.FieldStart("ip") - b.PutString(s.IP) - b.Comma() - b.FieldStart("country") - b.PutString(s.Country) + b.FieldStart("ip_address") + b.PutString(s.IPAddress) b.Comma() - b.FieldStart("region") - b.PutString(s.Region) + b.FieldStart("location") + b.PutString(s.Location) b.Comma() b.StripComma() b.ObjEnd() @@ -519,123 +519,123 @@ func (s *Session) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (s *Session) DecodeTDLibJSON(b tdjson.Decoder) error { if s == nil { - return fmt.Errorf("can't decode session#8b189386 to nil") + return fmt.Errorf("can't decode session#9759a3c to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("session"); err != nil { - return fmt.Errorf("unable to decode session#8b189386: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: %w", err) } case "id": value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field id: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field id: %w", err) } s.ID = value case "is_current": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field is_current: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field is_current: %w", err) } s.IsCurrent = value case "is_password_pending": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field is_password_pending: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field is_password_pending: %w", err) } s.IsPasswordPending = value + case "is_unconfirmed": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode session#9759a3c: field is_unconfirmed: %w", err) + } + s.IsUnconfirmed = value case "can_accept_secret_chats": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field can_accept_secret_chats: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field can_accept_secret_chats: %w", err) } s.CanAcceptSecretChats = value case "can_accept_calls": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field can_accept_calls: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field can_accept_calls: %w", err) } s.CanAcceptCalls = value case "type": value, err := DecodeTDLibJSONSessionType(b) if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field type: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field type: %w", err) } s.Type = value case "api_id": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field api_id: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field api_id: %w", err) } s.APIID = value case "application_name": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field application_name: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field application_name: %w", err) } s.ApplicationName = value case "application_version": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field application_version: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field application_version: %w", err) } s.ApplicationVersion = value case "is_official_application": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field is_official_application: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field is_official_application: %w", err) } s.IsOfficialApplication = value case "device_model": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field device_model: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field device_model: %w", err) } s.DeviceModel = value case "platform": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field platform: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field platform: %w", err) } s.Platform = value case "system_version": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field system_version: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field system_version: %w", err) } s.SystemVersion = value case "log_in_date": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field log_in_date: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field log_in_date: %w", err) } s.LogInDate = value case "last_active_date": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field last_active_date: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field last_active_date: %w", err) } s.LastActiveDate = value - case "ip": + case "ip_address": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field ip: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field ip_address: %w", err) } - s.IP = value - case "country": + s.IPAddress = value + case "location": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field country: %w", err) + return fmt.Errorf("unable to decode session#9759a3c: field location: %w", err) } - s.Country = value - case "region": - value, err := b.String() - if err != nil { - return fmt.Errorf("unable to decode session#8b189386: field region: %w", err) - } - s.Region = value + s.Location = value default: return b.Skip() } @@ -667,6 +667,14 @@ func (s *Session) GetIsPasswordPending() (value bool) { return s.IsPasswordPending } +// GetIsUnconfirmed returns value of IsUnconfirmed field. +func (s *Session) GetIsUnconfirmed() (value bool) { + if s == nil { + return + } + return s.IsUnconfirmed +} + // GetCanAcceptSecretChats returns value of CanAcceptSecretChats field. func (s *Session) GetCanAcceptSecretChats() (value bool) { if s == nil { @@ -763,26 +771,18 @@ func (s *Session) GetLastActiveDate() (value int32) { return s.LastActiveDate } -// GetIP returns value of IP field. -func (s *Session) GetIP() (value string) { - if s == nil { - return - } - return s.IP -} - -// GetCountry returns value of Country field. -func (s *Session) GetCountry() (value string) { +// GetIPAddress returns value of IPAddress field. +func (s *Session) GetIPAddress() (value string) { if s == nil { return } - return s.Country + return s.IPAddress } -// GetRegion returns value of Region field. -func (s *Session) GetRegion() (value string) { +// GetLocation returns value of Location field. +func (s *Session) GetLocation() (value string) { if s == nil { return } - return s.Region + return s.Location } diff --git a/tdapi/tl_story_privacy_settings_gen.go b/tdapi/tl_story_privacy_settings_gen.go index a0e397d1a9..83cefa78c0 100644 --- a/tdapi/tl_story_privacy_settings_gen.go +++ b/tdapi/tl_story_privacy_settings_gen.go @@ -544,29 +544,29 @@ func (s *StoryPrivacySettingsCloseFriends) DecodeTDLibJSON(b tdjson.Decoder) err }) } -// StoryPrivacySettingsSelectedContacts represents TL type `storyPrivacySettingsSelectedContacts#25401fc7`. -type StoryPrivacySettingsSelectedContacts struct { +// StoryPrivacySettingsSelectedUsers represents TL type `storyPrivacySettingsSelectedUsers#84d7d27b`. +type StoryPrivacySettingsSelectedUsers struct { // Identifiers of the users; always unknown and empty for non-owned stories UserIDs []int64 } -// StoryPrivacySettingsSelectedContactsTypeID is TL type id of StoryPrivacySettingsSelectedContacts. -const StoryPrivacySettingsSelectedContactsTypeID = 0x25401fc7 +// StoryPrivacySettingsSelectedUsersTypeID is TL type id of StoryPrivacySettingsSelectedUsers. +const StoryPrivacySettingsSelectedUsersTypeID = 0x84d7d27b // construct implements constructor of StoryPrivacySettingsClass. -func (s StoryPrivacySettingsSelectedContacts) construct() StoryPrivacySettingsClass { return &s } +func (s StoryPrivacySettingsSelectedUsers) construct() StoryPrivacySettingsClass { return &s } -// Ensuring interfaces in compile-time for StoryPrivacySettingsSelectedContacts. +// Ensuring interfaces in compile-time for StoryPrivacySettingsSelectedUsers. var ( - _ bin.Encoder = &StoryPrivacySettingsSelectedContacts{} - _ bin.Decoder = &StoryPrivacySettingsSelectedContacts{} - _ bin.BareEncoder = &StoryPrivacySettingsSelectedContacts{} - _ bin.BareDecoder = &StoryPrivacySettingsSelectedContacts{} + _ bin.Encoder = &StoryPrivacySettingsSelectedUsers{} + _ bin.Decoder = &StoryPrivacySettingsSelectedUsers{} + _ bin.BareEncoder = &StoryPrivacySettingsSelectedUsers{} + _ bin.BareDecoder = &StoryPrivacySettingsSelectedUsers{} - _ StoryPrivacySettingsClass = &StoryPrivacySettingsSelectedContacts{} + _ StoryPrivacySettingsClass = &StoryPrivacySettingsSelectedUsers{} ) -func (s *StoryPrivacySettingsSelectedContacts) Zero() bool { +func (s *StoryPrivacySettingsSelectedUsers) Zero() bool { if s == nil { return true } @@ -578,31 +578,31 @@ func (s *StoryPrivacySettingsSelectedContacts) Zero() bool { } // String implements fmt.Stringer. -func (s *StoryPrivacySettingsSelectedContacts) String() string { +func (s *StoryPrivacySettingsSelectedUsers) String() string { if s == nil { - return "StoryPrivacySettingsSelectedContacts(nil)" + return "StoryPrivacySettingsSelectedUsers(nil)" } - type Alias StoryPrivacySettingsSelectedContacts - return fmt.Sprintf("StoryPrivacySettingsSelectedContacts%+v", Alias(*s)) + type Alias StoryPrivacySettingsSelectedUsers + return fmt.Sprintf("StoryPrivacySettingsSelectedUsers%+v", Alias(*s)) } // TypeID returns type id in TL schema. // // See https://core.telegram.org/mtproto/TL-tl#remarks. -func (*StoryPrivacySettingsSelectedContacts) TypeID() uint32 { - return StoryPrivacySettingsSelectedContactsTypeID +func (*StoryPrivacySettingsSelectedUsers) TypeID() uint32 { + return StoryPrivacySettingsSelectedUsersTypeID } // TypeName returns name of type in TL schema. -func (*StoryPrivacySettingsSelectedContacts) TypeName() string { - return "storyPrivacySettingsSelectedContacts" +func (*StoryPrivacySettingsSelectedUsers) TypeName() string { + return "storyPrivacySettingsSelectedUsers" } // TypeInfo returns info about TL type. -func (s *StoryPrivacySettingsSelectedContacts) TypeInfo() tdp.Type { +func (s *StoryPrivacySettingsSelectedUsers) TypeInfo() tdp.Type { typ := tdp.Type{ - Name: "storyPrivacySettingsSelectedContacts", - ID: StoryPrivacySettingsSelectedContactsTypeID, + Name: "storyPrivacySettingsSelectedUsers", + ID: StoryPrivacySettingsSelectedUsersTypeID, } if s == nil { typ.Null = true @@ -618,18 +618,18 @@ func (s *StoryPrivacySettingsSelectedContacts) TypeInfo() tdp.Type { } // Encode implements bin.Encoder. -func (s *StoryPrivacySettingsSelectedContacts) Encode(b *bin.Buffer) error { +func (s *StoryPrivacySettingsSelectedUsers) Encode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode storyPrivacySettingsSelectedContacts#25401fc7 as nil") + return fmt.Errorf("can't encode storyPrivacySettingsSelectedUsers#84d7d27b as nil") } - b.PutID(StoryPrivacySettingsSelectedContactsTypeID) + b.PutID(StoryPrivacySettingsSelectedUsersTypeID) return s.EncodeBare(b) } // EncodeBare implements bin.BareEncoder. -func (s *StoryPrivacySettingsSelectedContacts) EncodeBare(b *bin.Buffer) error { +func (s *StoryPrivacySettingsSelectedUsers) EncodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode storyPrivacySettingsSelectedContacts#25401fc7 as nil") + return fmt.Errorf("can't encode storyPrivacySettingsSelectedUsers#84d7d27b as nil") } b.PutInt(len(s.UserIDs)) for _, v := range s.UserIDs { @@ -639,25 +639,25 @@ func (s *StoryPrivacySettingsSelectedContacts) EncodeBare(b *bin.Buffer) error { } // Decode implements bin.Decoder. -func (s *StoryPrivacySettingsSelectedContacts) Decode(b *bin.Buffer) error { +func (s *StoryPrivacySettingsSelectedUsers) Decode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode storyPrivacySettingsSelectedContacts#25401fc7 to nil") + return fmt.Errorf("can't decode storyPrivacySettingsSelectedUsers#84d7d27b to nil") } - if err := b.ConsumeID(StoryPrivacySettingsSelectedContactsTypeID); err != nil { - return fmt.Errorf("unable to decode storyPrivacySettingsSelectedContacts#25401fc7: %w", err) + if err := b.ConsumeID(StoryPrivacySettingsSelectedUsersTypeID); err != nil { + return fmt.Errorf("unable to decode storyPrivacySettingsSelectedUsers#84d7d27b: %w", err) } return s.DecodeBare(b) } // DecodeBare implements bin.BareDecoder. -func (s *StoryPrivacySettingsSelectedContacts) DecodeBare(b *bin.Buffer) error { +func (s *StoryPrivacySettingsSelectedUsers) DecodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode storyPrivacySettingsSelectedContacts#25401fc7 to nil") + return fmt.Errorf("can't decode storyPrivacySettingsSelectedUsers#84d7d27b to nil") } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode storyPrivacySettingsSelectedContacts#25401fc7: field user_ids: %w", err) + return fmt.Errorf("unable to decode storyPrivacySettingsSelectedUsers#84d7d27b: field user_ids: %w", err) } if headerLen > 0 { @@ -666,7 +666,7 @@ func (s *StoryPrivacySettingsSelectedContacts) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode storyPrivacySettingsSelectedContacts#25401fc7: field user_ids: %w", err) + return fmt.Errorf("unable to decode storyPrivacySettingsSelectedUsers#84d7d27b: field user_ids: %w", err) } s.UserIDs = append(s.UserIDs, value) } @@ -675,12 +675,12 @@ func (s *StoryPrivacySettingsSelectedContacts) DecodeBare(b *bin.Buffer) error { } // EncodeTDLibJSON implements tdjson.TDLibEncoder. -func (s *StoryPrivacySettingsSelectedContacts) EncodeTDLibJSON(b tdjson.Encoder) error { +func (s *StoryPrivacySettingsSelectedUsers) EncodeTDLibJSON(b tdjson.Encoder) error { if s == nil { - return fmt.Errorf("can't encode storyPrivacySettingsSelectedContacts#25401fc7 as nil") + return fmt.Errorf("can't encode storyPrivacySettingsSelectedUsers#84d7d27b as nil") } b.ObjStart() - b.PutID("storyPrivacySettingsSelectedContacts") + b.PutID("storyPrivacySettingsSelectedUsers") b.Comma() b.FieldStart("user_ids") b.ArrStart() @@ -697,27 +697,27 @@ func (s *StoryPrivacySettingsSelectedContacts) EncodeTDLibJSON(b tdjson.Encoder) } // DecodeTDLibJSON implements tdjson.TDLibDecoder. -func (s *StoryPrivacySettingsSelectedContacts) DecodeTDLibJSON(b tdjson.Decoder) error { +func (s *StoryPrivacySettingsSelectedUsers) DecodeTDLibJSON(b tdjson.Decoder) error { if s == nil { - return fmt.Errorf("can't decode storyPrivacySettingsSelectedContacts#25401fc7 to nil") + return fmt.Errorf("can't decode storyPrivacySettingsSelectedUsers#84d7d27b to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: - if err := b.ConsumeID("storyPrivacySettingsSelectedContacts"); err != nil { - return fmt.Errorf("unable to decode storyPrivacySettingsSelectedContacts#25401fc7: %w", err) + if err := b.ConsumeID("storyPrivacySettingsSelectedUsers"); err != nil { + return fmt.Errorf("unable to decode storyPrivacySettingsSelectedUsers#84d7d27b: %w", err) } case "user_ids": if err := b.Arr(func(b tdjson.Decoder) error { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode storyPrivacySettingsSelectedContacts#25401fc7: field user_ids: %w", err) + return fmt.Errorf("unable to decode storyPrivacySettingsSelectedUsers#84d7d27b: field user_ids: %w", err) } s.UserIDs = append(s.UserIDs, value) return nil }); err != nil { - return fmt.Errorf("unable to decode storyPrivacySettingsSelectedContacts#25401fc7: field user_ids: %w", err) + return fmt.Errorf("unable to decode storyPrivacySettingsSelectedUsers#84d7d27b: field user_ids: %w", err) } default: return b.Skip() @@ -727,7 +727,7 @@ func (s *StoryPrivacySettingsSelectedContacts) DecodeTDLibJSON(b tdjson.Decoder) } // GetUserIDs returns value of UserIDs field. -func (s *StoryPrivacySettingsSelectedContacts) GetUserIDs() (value []int64) { +func (s *StoryPrivacySettingsSelectedUsers) GetUserIDs() (value []int64) { if s == nil { return } @@ -749,7 +749,7 @@ const StoryPrivacySettingsClassName = "StoryPrivacySettings" // case *tdapi.StoryPrivacySettingsEveryone: // storyPrivacySettingsEveryone#22d1053a // case *tdapi.StoryPrivacySettingsContacts: // storyPrivacySettingsContacts#35515d71 // case *tdapi.StoryPrivacySettingsCloseFriends: // storyPrivacySettingsCloseFriends#7cff8b60 -// case *tdapi.StoryPrivacySettingsSelectedContacts: // storyPrivacySettingsSelectedContacts#25401fc7 +// case *tdapi.StoryPrivacySettingsSelectedUsers: // storyPrivacySettingsSelectedUsers#84d7d27b // default: panic(v) // } type StoryPrivacySettingsClass interface { @@ -802,9 +802,9 @@ func DecodeStoryPrivacySettings(buf *bin.Buffer) (StoryPrivacySettingsClass, err return nil, fmt.Errorf("unable to decode StoryPrivacySettingsClass: %w", err) } return &v, nil - case StoryPrivacySettingsSelectedContactsTypeID: - // Decoding storyPrivacySettingsSelectedContacts#25401fc7. - v := StoryPrivacySettingsSelectedContacts{} + case StoryPrivacySettingsSelectedUsersTypeID: + // Decoding storyPrivacySettingsSelectedUsers#84d7d27b. + v := StoryPrivacySettingsSelectedUsers{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode StoryPrivacySettingsClass: %w", err) } @@ -842,9 +842,9 @@ func DecodeTDLibJSONStoryPrivacySettings(buf tdjson.Decoder) (StoryPrivacySettin return nil, fmt.Errorf("unable to decode StoryPrivacySettingsClass: %w", err) } return &v, nil - case "storyPrivacySettingsSelectedContacts": - // Decoding storyPrivacySettingsSelectedContacts#25401fc7. - v := StoryPrivacySettingsSelectedContacts{} + case "storyPrivacySettingsSelectedUsers": + // Decoding storyPrivacySettingsSelectedUsers#84d7d27b. + v := StoryPrivacySettingsSelectedUsers{} if err := v.DecodeTDLibJSON(buf); err != nil { return nil, fmt.Errorf("unable to decode StoryPrivacySettingsClass: %w", err) } diff --git a/tdapi/tl_test_proxy_gen.go b/tdapi/tl_test_proxy_gen.go index fcdbe1321b..13bbecf0f3 100644 --- a/tdapi/tl_test_proxy_gen.go +++ b/tdapi/tl_test_proxy_gen.go @@ -33,7 +33,7 @@ var ( // TestProxyRequest represents TL type `testProxy#b8a1a29e`. type TestProxyRequest struct { - // Proxy server IP address + // Proxy server domain or IP address Server string // Proxy server port Port int32 diff --git a/tdapi/tl_unconfirmed_session_gen.go b/tdapi/tl_unconfirmed_session_gen.go new file mode 100644 index 0000000000..0c54cee5af --- /dev/null +++ b/tdapi/tl_unconfirmed_session_gen.go @@ -0,0 +1,297 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// UnconfirmedSession represents TL type `unconfirmedSession#850d49f9`. +type UnconfirmedSession struct { + // Session identifier + ID int64 + // Point in time (Unix timestamp) when the user has logged in + LogInDate int32 + // Model of the device that was used for the session creation, as provided by the + // application + DeviceModel string + // A human-readable description of the location from which the session was created, based + // on the IP address + Location string +} + +// UnconfirmedSessionTypeID is TL type id of UnconfirmedSession. +const UnconfirmedSessionTypeID = 0x850d49f9 + +// Ensuring interfaces in compile-time for UnconfirmedSession. +var ( + _ bin.Encoder = &UnconfirmedSession{} + _ bin.Decoder = &UnconfirmedSession{} + _ bin.BareEncoder = &UnconfirmedSession{} + _ bin.BareDecoder = &UnconfirmedSession{} +) + +func (u *UnconfirmedSession) Zero() bool { + if u == nil { + return true + } + if !(u.ID == 0) { + return false + } + if !(u.LogInDate == 0) { + return false + } + if !(u.DeviceModel == "") { + return false + } + if !(u.Location == "") { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UnconfirmedSession) String() string { + if u == nil { + return "UnconfirmedSession(nil)" + } + type Alias UnconfirmedSession + return fmt.Sprintf("UnconfirmedSession%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UnconfirmedSession) TypeID() uint32 { + return UnconfirmedSessionTypeID +} + +// TypeName returns name of type in TL schema. +func (*UnconfirmedSession) TypeName() string { + return "unconfirmedSession" +} + +// TypeInfo returns info about TL type. +func (u *UnconfirmedSession) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "unconfirmedSession", + ID: UnconfirmedSessionTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ID", + SchemaName: "id", + }, + { + Name: "LogInDate", + SchemaName: "log_in_date", + }, + { + Name: "DeviceModel", + SchemaName: "device_model", + }, + { + Name: "Location", + SchemaName: "location", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (u *UnconfirmedSession) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode unconfirmedSession#850d49f9 as nil") + } + b.PutID(UnconfirmedSessionTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UnconfirmedSession) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode unconfirmedSession#850d49f9 as nil") + } + b.PutLong(u.ID) + b.PutInt32(u.LogInDate) + b.PutString(u.DeviceModel) + b.PutString(u.Location) + return nil +} + +// Decode implements bin.Decoder. +func (u *UnconfirmedSession) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode unconfirmedSession#850d49f9 to nil") + } + if err := b.ConsumeID(UnconfirmedSessionTypeID); err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UnconfirmedSession) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode unconfirmedSession#850d49f9 to nil") + } + { + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: field id: %w", err) + } + u.ID = value + } + { + value, err := b.Int32() + if err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: field log_in_date: %w", err) + } + u.LogInDate = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: field device_model: %w", err) + } + u.DeviceModel = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: field location: %w", err) + } + u.Location = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UnconfirmedSession) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode unconfirmedSession#850d49f9 as nil") + } + b.ObjStart() + b.PutID("unconfirmedSession") + b.Comma() + b.FieldStart("id") + b.PutLong(u.ID) + b.Comma() + b.FieldStart("log_in_date") + b.PutInt32(u.LogInDate) + b.Comma() + b.FieldStart("device_model") + b.PutString(u.DeviceModel) + b.Comma() + b.FieldStart("location") + b.PutString(u.Location) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UnconfirmedSession) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode unconfirmedSession#850d49f9 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("unconfirmedSession"); err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: %w", err) + } + case "id": + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: field id: %w", err) + } + u.ID = value + case "log_in_date": + value, err := b.Int32() + if err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: field log_in_date: %w", err) + } + u.LogInDate = value + case "device_model": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: field device_model: %w", err) + } + u.DeviceModel = value + case "location": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode unconfirmedSession#850d49f9: field location: %w", err) + } + u.Location = value + default: + return b.Skip() + } + return nil + }) +} + +// GetID returns value of ID field. +func (u *UnconfirmedSession) GetID() (value int64) { + if u == nil { + return + } + return u.ID +} + +// GetLogInDate returns value of LogInDate field. +func (u *UnconfirmedSession) GetLogInDate() (value int32) { + if u == nil { + return + } + return u.LogInDate +} + +// GetDeviceModel returns value of DeviceModel field. +func (u *UnconfirmedSession) GetDeviceModel() (value string) { + if u == nil { + return + } + return u.DeviceModel +} + +// GetLocation returns value of Location field. +func (u *UnconfirmedSession) GetLocation() (value string) { + if u == nil { + return + } + return u.Location +} diff --git a/tdapi/tl_update_gen.go b/tdapi/tl_update_gen.go index b91b978a44..7834526a45 100644 --- a/tdapi/tl_update_gen.go +++ b/tdapi/tl_update_gen.go @@ -19995,10 +19995,175 @@ func (u *UpdateUsersNearby) GetUsersNearby() (value []ChatNearby) { return u.UsersNearby } +// UpdateUnconfirmedSession represents TL type `updateUnconfirmedSession#fea6088c`. +type UpdateUnconfirmedSession struct { + // The unconfirmed session; may be null if none + Session UnconfirmedSession +} + +// UpdateUnconfirmedSessionTypeID is TL type id of UpdateUnconfirmedSession. +const UpdateUnconfirmedSessionTypeID = 0xfea6088c + +// construct implements constructor of UpdateClass. +func (u UpdateUnconfirmedSession) construct() UpdateClass { return &u } + +// Ensuring interfaces in compile-time for UpdateUnconfirmedSession. +var ( + _ bin.Encoder = &UpdateUnconfirmedSession{} + _ bin.Decoder = &UpdateUnconfirmedSession{} + _ bin.BareEncoder = &UpdateUnconfirmedSession{} + _ bin.BareDecoder = &UpdateUnconfirmedSession{} + + _ UpdateClass = &UpdateUnconfirmedSession{} +) + +func (u *UpdateUnconfirmedSession) Zero() bool { + if u == nil { + return true + } + if !(u.Session.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UpdateUnconfirmedSession) String() string { + if u == nil { + return "UpdateUnconfirmedSession(nil)" + } + type Alias UpdateUnconfirmedSession + return fmt.Sprintf("UpdateUnconfirmedSession%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UpdateUnconfirmedSession) TypeID() uint32 { + return UpdateUnconfirmedSessionTypeID +} + +// TypeName returns name of type in TL schema. +func (*UpdateUnconfirmedSession) TypeName() string { + return "updateUnconfirmedSession" +} + +// TypeInfo returns info about TL type. +func (u *UpdateUnconfirmedSession) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "updateUnconfirmedSession", + ID: UpdateUnconfirmedSessionTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Session", + SchemaName: "session", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (u *UpdateUnconfirmedSession) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateUnconfirmedSession#fea6088c as nil") + } + b.PutID(UpdateUnconfirmedSessionTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UpdateUnconfirmedSession) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateUnconfirmedSession#fea6088c as nil") + } + if err := u.Session.Encode(b); err != nil { + return fmt.Errorf("unable to encode updateUnconfirmedSession#fea6088c: field session: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UpdateUnconfirmedSession) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateUnconfirmedSession#fea6088c to nil") + } + if err := b.ConsumeID(UpdateUnconfirmedSessionTypeID); err != nil { + return fmt.Errorf("unable to decode updateUnconfirmedSession#fea6088c: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UpdateUnconfirmedSession) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateUnconfirmedSession#fea6088c to nil") + } + { + if err := u.Session.Decode(b); err != nil { + return fmt.Errorf("unable to decode updateUnconfirmedSession#fea6088c: field session: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UpdateUnconfirmedSession) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode updateUnconfirmedSession#fea6088c as nil") + } + b.ObjStart() + b.PutID("updateUnconfirmedSession") + b.Comma() + b.FieldStart("session") + if err := u.Session.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode updateUnconfirmedSession#fea6088c: field session: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UpdateUnconfirmedSession) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode updateUnconfirmedSession#fea6088c to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("updateUnconfirmedSession"); err != nil { + return fmt.Errorf("unable to decode updateUnconfirmedSession#fea6088c: %w", err) + } + case "session": + if err := u.Session.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode updateUnconfirmedSession#fea6088c: field session: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetSession returns value of Session field. +func (u *UpdateUnconfirmedSession) GetSession() (value UnconfirmedSession) { + if u == nil { + return + } + return u.Session +} + // UpdateAttachmentMenuBots represents TL type `updateAttachmentMenuBots#b6b910c`. type UpdateAttachmentMenuBots struct { - // The new list of bots added to attachment menu. The bots must not be shown on scheduled - // messages screen + // The new list of bots. The bots must not be shown on scheduled messages screen Bots []AttachmentMenuBot } @@ -25594,6 +25759,7 @@ const UpdateClassName = "Update" // case *tdapi.UpdateConnectionState: // updateConnectionState#57939e2e // case *tdapi.UpdateTermsOfService: // updateTermsOfService#b23cc55e // case *tdapi.UpdateUsersNearby: // updateUsersNearby#97c8ab5 +// case *tdapi.UpdateUnconfirmedSession: // updateUnconfirmedSession#fea6088c // case *tdapi.UpdateAttachmentMenuBots: // updateAttachmentMenuBots#b6b910c // case *tdapi.UpdateWebAppMessageSent: // updateWebAppMessageSent#58431229 // case *tdapi.UpdateActiveEmojiReactions: // updateActiveEmojiReactions#691ffcb7 @@ -26305,6 +26471,13 @@ func DecodeUpdate(buf *bin.Buffer) (UpdateClass, error) { return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) } return &v, nil + case UpdateUnconfirmedSessionTypeID: + // Decoding updateUnconfirmedSession#fea6088c. + v := UpdateUnconfirmedSession{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil case UpdateAttachmentMenuBotsTypeID: // Decoding updateAttachmentMenuBots#b6b910c. v := UpdateAttachmentMenuBots{} @@ -27129,6 +27302,13 @@ func DecodeTDLibJSONUpdate(buf tdjson.Decoder) (UpdateClass, error) { return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) } return &v, nil + case "updateUnconfirmedSession": + // Decoding updateUnconfirmedSession#fea6088c. + v := UpdateUnconfirmedSession{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil case "updateAttachmentMenuBots": // Decoding updateAttachmentMenuBots#b6b910c. v := UpdateAttachmentMenuBots{} diff --git a/tdapi/tl_user_type_gen.go b/tdapi/tl_user_type_gen.go index bda7ee9639..40a316ee27 100644 --- a/tdapi/tl_user_type_gen.go +++ b/tdapi/tl_user_type_gen.go @@ -312,7 +312,7 @@ type UserTypeBot struct { // True, if the location of the user is expected to be sent with every inline query to // this bot NeedLocation bool - // True, if the bot can be added to attachment menu + // True, if the bot can be added to attachment or side menu CanBeAddedToAttachmentMenu bool }