tdlib-types 0.3.0 → 0.4.0
raw patch · 8 files changed
+7239/−6856 lines, 8 filesdep ~tdlib-gen
Dependency ranges changed: tdlib-gen
Files
- CHANGELOG.md +6/−0
- data/td_api.tl +160/−59
- src/TDLib/Generated.hs +8/−0
- src/TDLib/Generated/FunArgs.hs +492/−425
- src/TDLib/Generated/Functions.hs +79/−21
- src/TDLib/Generated/Types.hs +6453/−6345
- src/TDLib/Types.hs +35/−1
- tdlib-types.cabal +6/−5
CHANGELOG.md view
@@ -7,3 +7,9 @@ ## 0.3.0 - update dependency tdlib-gen++## 0.4.0++- update dependency tdlib-gen+- use camel case instead of snake case+- handle optional fields
data/td_api.tl view
@@ -171,6 +171,31 @@ minithumbnail width:int32 height:int32 data:bytes = Minithumbnail; +//@class ThumbnailFormat @description Describes format of the thumbnail++//@description The thumbnail is in JPEG format+thumbnailFormatJpeg = ThumbnailFormat;++//@description The thumbnail is in PNG format. It will be used only for background patterns+thumbnailFormatPng = ThumbnailFormat;++//@description The thumbnail is in WEBP format. It will be used only for some stickers+thumbnailFormatWebp = ThumbnailFormat;++//@description The thumbnail is in static GIF format. It will be used only for some bot inline results+thumbnailFormatGif = ThumbnailFormat;++//@description The thumbnail is in TGS format. It will be used only for animated sticker sets+thumbnailFormatTgs = ThumbnailFormat;++//@description The thumbnail is in MPEG4 format. It will be used only for some animations and videos+thumbnailFormatMpeg4 = ThumbnailFormat;+++//@description Represents a thumbnail @format Thumbnail format @width Thumbnail width @height Thumbnail height @file The thumbnail+thumbnail format:ThumbnailFormat width:int32 height:int32 file:file = Thumbnail;++ //@class MaskPoint @description Part of the face, relative to which a mask should be placed //@description A mask should be placed relatively to the forehead@@ -210,31 +235,39 @@ //@description Describes an animation file. The animation must be encoded in GIF or MPEG4 format @duration Duration of the animation, in seconds; as defined by the sender @width Width of the animation @height Height of the animation //@file_name Original name of the file; as defined by the sender @mime_type MIME type of the file, usually "image/gif" or "video/mp4"-//@minithumbnail Animation minithumbnail; may be null @thumbnail Animation thumbnail; may be null @animation File containing the animation-animation duration:int32 width:int32 height:int32 file_name:string mime_type:string minithumbnail:minithumbnail thumbnail:photoSize animation:file = Animation;+//@has_stickers True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets+//@minithumbnail Animation minithumbnail; may be null @thumbnail Animation thumbnail in JPEG or MPEG4 format; may be null @animation File containing the animation+animation duration:int32 width:int32 height:int32 file_name:string mime_type:string has_stickers:Bool minithumbnail:minithumbnail thumbnail:thumbnail animation:file = Animation; //@description Describes an audio file. Audio is usually in MP3 or M4A format @duration Duration of the audio, in seconds; as defined by the sender @title Title of the audio; as defined by the sender @performer Performer of the audio; as defined by the sender-//@file_name Original name of the file; as defined by the sender @mime_type The MIME type of the file; as defined by the sender @album_cover_minithumbnail The minithumbnail of the album cover; may be null @album_cover_thumbnail The thumbnail of the album cover; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null @audio File containing the audio-audio duration:int32 title:string performer:string file_name:string mime_type:string album_cover_minithumbnail:minithumbnail album_cover_thumbnail:photoSize audio:file = Audio;+//@file_name Original name of the file; as defined by the sender @mime_type The MIME type of the file; as defined by the sender @album_cover_minithumbnail The minithumbnail of the album cover; may be null+//@album_cover_thumbnail The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null @audio File containing the audio+audio duration:int32 title:string performer:string file_name:string mime_type:string album_cover_minithumbnail:minithumbnail album_cover_thumbnail:thumbnail audio:file = Audio; //@description Describes a document of any type @file_name Original name of the file; as defined by the sender @mime_type MIME type of the file; as defined by the sender //@minithumbnail Document minithumbnail; may be null @thumbnail Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null @document File containing the document-document file_name:string mime_type:string minithumbnail:minithumbnail thumbnail:photoSize document:file = Document;+document file_name:string mime_type:string minithumbnail:minithumbnail thumbnail:thumbnail document:file = Document; -//@description Describes a photo @has_stickers True, if stickers were added to the photo @minithumbnail Photo minithumbnail; may be null @sizes Available variants of the photo, in different sizes+//@description Describes a photo @has_stickers True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets+//@minithumbnail Photo minithumbnail; may be null @sizes Available variants of the photo, in different sizes photo has_stickers:Bool minithumbnail:minithumbnail sizes:vector<photoSize> = Photo; //@description Describes a sticker @set_id The identifier of the sticker set to which the sticker belongs; 0 if none @width Sticker width; as defined by the sender @height Sticker height; as defined by the sender-//@emoji Emoji corresponding to the sticker @is_animated True, if the sticker is an animated sticker in TGS format @is_mask True, if the sticker is a mask @mask_position Position where the mask should be placed; may be null @thumbnail Sticker thumbnail in WEBP or JPEG format; may be null @sticker File containing the sticker-sticker set_id:int64 width:int32 height:int32 emoji:string is_animated:Bool is_mask:Bool mask_position:maskPosition thumbnail:photoSize sticker:file = Sticker;+//@emoji Emoji corresponding to the sticker @is_animated True, if the sticker is an animated sticker in TGS format @is_mask True, if the sticker is a mask @mask_position Position where the mask should be placed; may be null+//@thumbnail Sticker thumbnail in WEBP or JPEG format; may be null @sticker File containing the sticker+sticker set_id:int64 width:int32 height:int32 emoji:string is_animated:Bool is_mask:Bool mask_position:maskPosition thumbnail:thumbnail sticker:file = Sticker; //@description Describes a video file @duration Duration of the video, in seconds; as defined by the sender @width Video width; as defined by the sender @height Video height; as defined by the sender-//@file_name Original name of the file; as defined by the sender @mime_type MIME type of the file; as defined by the sender @has_stickers True, if stickers were added to the video-//@supports_streaming True, if the video should be tried to be streamed @minithumbnail Video minithumbnail; may be null @thumbnail Video thumbnail; as defined by the sender; may be null @video File containing the video-video duration:int32 width:int32 height:int32 file_name:string mime_type:string has_stickers:Bool supports_streaming:Bool minithumbnail:minithumbnail thumbnail:photoSize video:file = Video;+//@file_name Original name of the file; as defined by the sender @mime_type MIME type of the file; as defined by the sender+//@has_stickers True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets+//@supports_streaming True, if the video should be tried to be streamed @minithumbnail Video minithumbnail; may be null+//@thumbnail Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null @video File containing the video+video duration:int32 width:int32 height:int32 file_name:string mime_type:string has_stickers:Bool supports_streaming:Bool minithumbnail:minithumbnail thumbnail:thumbnail video:file = Video; -//@description Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format @duration Duration of the video, in seconds; as defined by the sender @length Video width and height; as defined by the sender @minithumbnail Video minithumbnail; may be null @thumbnail Video thumbnail; as defined by the sender; may be null @video File containing the video-videoNote duration:int32 length:int32 minithumbnail:minithumbnail thumbnail:photoSize video:file = VideoNote;+//@description Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format @duration Duration of the video, in seconds; as defined by the sender+//@length Video width and height; as defined by the sender @minithumbnail Video minithumbnail; may be null+//@thumbnail Video thumbnail in JPEG format; as defined by the sender; may be null @video File containing the video+videoNote duration:int32 length:int32 minithumbnail:minithumbnail thumbnail:thumbnail video:file = VideoNote; //@description Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel @duration Duration of the voice note, in seconds; as defined by the sender //@waveform A waveform representation of the voice note in 5-bit format @mime_type MIME type of the file; as defined by the sender @voice File containing the voice note@@ -627,6 +660,36 @@ chatTypeSecret secret_chat_id:int32 user_id:int32 = ChatType; +//@description Represents a filter of user chats+//@title The title of the filter; 1-12 characters without line feeds+//@icon_name The icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work".+//-If empty, use getChatFilterDefaultIconName to get default icon name for the filter+//@pinned_chat_ids The chat identifiers of pinned chats in the filtered chat list+//@included_chat_ids The chat identifiers of always included chats in the filtered chat list+//@excluded_chat_ids The chat identifiers of always excluded chats in the filtered chat list+//@exclude_muted True, if the muted chats need to be excluded+//@exclude_read True, if read chats need to be excluded+//@exclude_archived True, if archived chats need to be excluded+//@include_contacts True, if contacts need to be included+//@include_non_contacts True, if non-contact users need to be included+//@include_bots True, if bots need to be included+//@include_groups True, if basic groups and supergroups need to be included+//@include_channels True, if channels need to be included+chatFilter title:string icon_name:string pinned_chat_ids:vector<int53> included_chat_ids:vector<int53> excluded_chat_ids:vector<int53> exclude_muted:Bool exclude_read:Bool exclude_archived:Bool include_contacts:Bool include_non_contacts:Bool include_bots:Bool include_groups:Bool include_channels:Bool = ChatFilter;++//@description Contains basic information about a chat filter+//@id Unique chat filter identifier+//@title The title of the filter; 1-12 characters without line feeds+//@icon_name The icon name for short filter representation. One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work"+chatFilterInfo id:int32 title:string icon_name:string = ChatFilterInfo;++//@description Describes a recommended chat filter @filter The chat filter @param_description Chat filter description+recommendedChatFilter filter:chatFilter description:string = RecommendedChatFilter;++//@description Contains a list of recommended chat filters @chat_filters List of recommended chat filters+recommendedChatFilters chat_filters:vector<recommendedChatFilter> = RecommendedChatFilters;++ //@class ChatList @description Describes a list of chats //@description A main list of chats@@ -635,9 +698,15 @@ //@description A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives chatListArchive = ChatList; +//@description A list of chats belonging to a chat filter @chat_filter_id Chat filter identifier+chatListFilter chat_filter_id:int32 = ChatList; -//@class ChatSource @description Describes a reason why the chat is shown in a chat list+//@description Contains a list of chat lists @chat_lists List of chat lists+chatLists chat_lists:vector<ChatList> = ChatLists; ++//@class ChatSource @description Describes a reason why an external chat is shown in a chat list+ //@description The chat is sponsored by the user's MTProxy server chatSourceMtprotoProxy = ChatSource; @@ -645,17 +714,22 @@ chatSourcePublicServiceAnnouncement type:string text:string = ChatSource; +//@description Describes a position of a chat in a chat list+//@list The chat list+//@order A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order+//@is_pinned True, if the chat is pinned in the chat list+//@source Source of the chat in the chat list; may be null+chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPosition;++ //@description A chat. (Can be a private chat, basic group, supergroup, or secret chat) //@id Chat unique identifier //@type Type of the chat-//@chat_list A chat list to which the chat belongs; may be null //@title Chat title //@photo Chat photo; may be null //@permissions Actions that non-administrator chat members are allowed to take in the chat //@last_message Last message in the chat; may be null-//@order Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined-//@source Source of the chat in a chat list; may be null-//@is_pinned True, if the chat is pinned+//@positions Positions of the chat in chat lists //@is_marked_as_unread True, if the chat is marked as unread //@has_scheduled_messages True, if the chat has scheduled messages //@can_be_deleted_only_for_self True, if the chat messages can be deleted only for the current user while other users will continue to see the messages@@ -671,8 +745,8 @@ //@pinned_message_id Identifier of the pinned message in the chat; 0 if none //@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat //@draft_message A draft of a message in the chat; may be null-//@client_data Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if the message database is used-chat id:int53 type:ChatType chat_list:ChatList title:string photo:chatPhoto permissions:chatPermissions last_message:message order:int64 source:ChatSource is_pinned:Bool is_marked_as_unread:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar pinned_message_id:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;+//@client_data Contains client-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used+chat id:int53 type:ChatType title:string photo:chatPhoto permissions:chatPermissions last_message:message positions:vector<chatPosition> is_marked_as_unread:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar pinned_message_id:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat; //@description Represents a list of chats @chat_ids List of chat identifiers chats chat_ids:vector<int53> = Chats;@@ -1548,8 +1622,9 @@ //@disable_web_page_preview True, if rich web page previews for URLs in the message text should be disabled @clear_draft True, if a chat message draft should be deleted inputMessageText text:formattedText disable_web_page_preview:Bool clear_draft:Bool = InputMessageContent; -//@description An animation message (GIF-style). @animation Animation file to be sent @thumbnail Animation thumbnail, if available @duration Duration of the animation, in seconds @width Width of the animation; may be replaced by the server @height Height of the animation; may be replaced by the server @caption Animation caption; 0-GetOption("message_caption_length_max") characters-inputMessageAnimation animation:InputFile thumbnail:inputThumbnail duration:int32 width:int32 height:int32 caption:formattedText = InputMessageContent;+//@description An animation message (GIF-style). @animation Animation file to be sent @thumbnail Animation thumbnail, if available @added_sticker_file_ids File identifiers of the stickers added to the animation, if applicable+//@duration Duration of the animation, in seconds @width Width of the animation; may be replaced by the server @height Height of the animation; may be replaced by the server @caption Animation caption; 0-GetOption("message_caption_length_max") characters+inputMessageAnimation animation:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 caption:formattedText = InputMessageContent; //@description An audio message @audio Audio file to be sent @album_cover_thumbnail Thumbnail of the cover for the album, if available @duration Duration of the audio, in seconds; may be replaced by the server @title Title of the audio; 0-64 characters; may be replaced by the server //@performer Performer of the audio; 0-64 characters, may be replaced by the server @caption Audio caption; 0-GetOption("message_caption_length_max") characters@@ -1721,18 +1796,18 @@ emojis emojis:vector<string> = Emojis; //@description Represents a sticker set-//@id Identifier of the sticker set @title Title of the sticker set @name Name of the sticker set @thumbnail Sticker set thumbnail in WEBP format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed+//@id Identifier of the sticker set @title Title of the sticker set @name Name of the sticker set @thumbnail Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed //@is_installed True, if the sticker set has been installed by the current user @is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously //@is_official True, if the sticker set is official @is_animated True, is the stickers in the set are animated @is_masks True, if the stickers in the set are masks @is_viewed True for already viewed trending sticker sets //@stickers List of stickers in this set @emojis A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object-stickerSet id:int64 title:string name:string thumbnail:photoSize is_installed:Bool is_archived:Bool is_official:Bool is_animated:Bool is_masks:Bool is_viewed:Bool stickers:vector<sticker> emojis:vector<emojis> = StickerSet;+stickerSet id:int64 title:string name:string thumbnail:thumbnail is_installed:Bool is_archived:Bool is_official:Bool is_animated:Bool is_masks:Bool is_viewed:Bool stickers:vector<sticker> emojis:vector<emojis> = StickerSet; //@description Represents short information about a sticker set-//@id Identifier of the sticker set @title Title of the sticker set @name Name of the sticker set @thumbnail Sticker set thumbnail in WEBP format with width and height 100; may be null+//@id Identifier of the sticker set @title Title of the sticker set @name Name of the sticker set @thumbnail Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null //@is_installed True, if the sticker set has been installed by current user @is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously //@is_official True, if the sticker set is official @is_animated True, is the stickers in the set are animated @is_masks True, if the stickers in the set are masks @is_viewed True for already viewed trending sticker sets //@size Total number of stickers in the set @covers Contains up to the first 5 stickers from the set, depending on the context. If the client needs more stickers the full set should be requested-stickerSetInfo id:int64 title:string name:string thumbnail:photoSize is_installed:Bool is_archived:Bool is_official:Bool is_animated:Bool is_masks:Bool is_viewed:Bool size:int32 covers:vector<sticker> = StickerSetInfo;+stickerSetInfo id:int64 title:string name:string thumbnail:thumbnail is_installed:Bool is_archived:Bool is_official:Bool is_animated:Bool is_masks:Bool is_viewed:Bool size:int32 covers:vector<sticker> = StickerSetInfo; //@description Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets stickerSets total_count:int32 sets:vector<stickerSetInfo> = StickerSets;@@ -1917,17 +1992,17 @@ //@class InlineQueryResult @description Represents a single result of an inline query //@description Represents a link to an article or web page @id Unique identifier of the query result @url URL of the result, if it exists @hide_url True, if the URL must be not shown @title Title of the result-//@param_description A short description of the result @thumbnail Result thumbnail; may be null-inlineQueryResultArticle id:string url:string hide_url:Bool title:string description:string thumbnail:photoSize = InlineQueryResult;+//@param_description A short description of the result @thumbnail Result thumbnail in JPEG format; may be null+inlineQueryResultArticle id:string url:string hide_url:Bool title:string description:string thumbnail:thumbnail = InlineQueryResult; -//@description Represents a user contact @id Unique identifier of the query result @contact A user contact @thumbnail Result thumbnail; may be null-inlineQueryResultContact id:string contact:contact thumbnail:photoSize = InlineQueryResult;+//@description Represents a user contact @id Unique identifier of the query result @contact A user contact @thumbnail Result thumbnail in JPEG format; may be null+inlineQueryResultContact id:string contact:contact thumbnail:thumbnail = InlineQueryResult; -//@description Represents a point on the map @id Unique identifier of the query result @location Location result @title Title of the result @thumbnail Result thumbnail; may be null-inlineQueryResultLocation id:string location:location title:string thumbnail:photoSize = InlineQueryResult;+//@description Represents a point on the map @id Unique identifier of the query result @location Location result @title Title of the result @thumbnail Result thumbnail in JPEG format; may be null+inlineQueryResultLocation id:string location:location title:string thumbnail:thumbnail = InlineQueryResult; -//@description Represents information about a venue @id Unique identifier of the query result @venue Venue result @thumbnail Result thumbnail; may be null-inlineQueryResultVenue id:string venue:venue thumbnail:photoSize = InlineQueryResult;+//@description Represents information about a venue @id Unique identifier of the query result @venue Venue result @thumbnail Result thumbnail in JPEG format; may be null+inlineQueryResultVenue id:string venue:venue thumbnail:thumbnail = InlineQueryResult; //@description Represents information about a game @id Unique identifier of the query result @game Game result inlineQueryResultGame id:string game:game = InlineQueryResult;@@ -2856,9 +2931,6 @@ //@description A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates @chat The chat updateNewChat chat:chat = Update; -//@description The list to which the chat belongs was changed. This update is guaranteed to be sent only when chat.order == 0 and the current or the new chat list is null @chat_id Chat identifier @chat_list The new chat's chat list; may be null-updateChatChatList chat_id:int53 chat_list:ChatList = Update;- //@description The title of a chat was changed @chat_id Chat identifier @title The new chat title updateChatTitle chat_id:int53 title:string = Update; @@ -2868,21 +2940,15 @@ //@description Chat permissions was changed @chat_id Chat identifier @permissions The new chat permissions updateChatPermissions chat_id:int53 permissions:chatPermissions = Update; -//@description The last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case @chat_id Chat identifier @last_message The new last message in the chat; may be null @order New value of the chat order-updateChatLastMessage chat_id:int53 last_message:message order:int64 = Update;--//@description The order of the chat in the chat list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned, updateChatDraftMessage, or updateChatSource might be sent @chat_id Chat identifier @order New value of the order-updateChatOrder chat_id:int53 order:int64 = Update;+//@description The last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case @chat_id Chat identifier @last_message The new last message in the chat; may be null @positions The new chat positions in the chat lists+updateChatLastMessage chat_id:int53 last_message:message positions:vector<chatPosition> = Update; -//@description A chat was pinned or unpinned @chat_id Chat identifier @is_pinned New value of is_pinned @order New value of the chat order-updateChatIsPinned chat_id:int53 is_pinned:Bool order:int64 = Update;+//@description The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent @chat_id Chat identifier @position New chat position. If new order is 0, then the chat needs to be removed from the list+updateChatPosition chat_id:int53 position:chatPosition = Update; //@description A chat was marked as unread or was read @chat_id Chat identifier @is_marked_as_unread New value of is_marked_as_unread updateChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Update; -//@description A chat's source in the chat list has changed @chat_id Chat identifier @source New chat's source; may be null @order New value of chat order-updateChatSource chat_id:int53 source:ChatSource order:int64 = Update;- //@description A chat's has_scheduled_messages field has changed @chat_id Chat identifier @has_scheduled_messages New value of has_scheduled_messages updateChatHasScheduledMessages chat_id:int53 has_scheduled_messages:Bool = Update; @@ -2914,9 +2980,12 @@ //@chat_id Chat identifier @reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat updateChatReplyMarkup chat_id:int53 reply_markup_message_id:int53 = Update; -//@description A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied @chat_id Chat identifier @draft_message The new draft message; may be null @order New value of the chat order-updateChatDraftMessage chat_id:int53 draft_message:draftMessage order:int64 = Update;+//@description A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied @chat_id Chat identifier @draft_message The new draft message; may be null @positions The new chat positions in the chat lists+updateChatDraftMessage chat_id:int53 draft_message:draftMessage positions:vector<chatPosition> = Update; +//@description The list of chat filters or a chat filter has changed @chat_filters The new list of chat filters+updateChatFilters chat_filters:vector<chatFilterInfo> = Update;+ //@description The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed @chat_id Identifier of the chat @online_member_count New number of online members in the chat, or 0 if unknown updateChatOnlineMemberCount chat_id:int53 online_member_count:int32 = Update; @@ -3047,6 +3116,9 @@ //@description The list of supported dice emojis has changed @emojis The new list of supported dice emojis updateDiceEmojis emojis:vector<string> = Update; +//@description The parameters of animation search through GetOption("animation_search_bot_username") bot has changed @provider Name of the animation search provider @emojis The new list of emojis suggested for searching+updateAnimationSearchParameters provider:string emojis:vector<string> = Update;+ //@description A new incoming inline query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @user_location User location, provided by the client; may be null //@query Text of the query @offset Offset of the first entry to return updateNewInlineQuery id:int64 sender_user_id:int32 user_location:location query:string offset:string = Update;@@ -3145,7 +3217,9 @@ //@description Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode @code The verification code received via SMS, Telegram message, phone call, or flash call checkAuthenticationCode code:string = Ok; -//@description Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber @other_user_ids List of user identifiers of other users currently using the client+//@description Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber,+//-or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword+//@other_user_ids List of user identifiers of other users currently using the client requestQrCodeAuthentication other_user_ids:vector<int32> = Ok; //@description Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration@@ -3269,7 +3343,7 @@ //@remote_file_id Remote identifier of the file to get @file_type File type, if known getRemoteFile remote_file_id:string file_type:FileType = File; -//@description Returns an ordered list of chats in a chat list. Chats are sorted by the pair (order, chat_id) in decreasing order. (For example, to get a list of chats from the beginning, the offset_order should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1).+//@description Returns an ordered list of chats in a chat list. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. (For example, to get a list of chats from the beginning, the offset_order should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). //-For optimal performance the number of returned chats is chosen by the library //@chat_list The chat list in which to return chats //@offset_order Chat order to return chats from @offset_chat_id Chat identifier to return chats from@@ -3282,10 +3356,10 @@ //@description Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results @query Query to search for searchPublicChats query:string = Chats; -//@description Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the chat list @query Query to search for. If the query is empty, returns up to 20 recently found chats @limit The maximum number of chats to be returned+//@description Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list @query Query to search for. If the query is empty, returns up to 20 recently found chats @limit The maximum number of chats to be returned searchChats query:string limit:int32 = Chats; -//@description Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the chat list @query Query to search for @limit The maximum number of chats to be returned+//@description Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list @query Query to search for @limit The maximum number of chats to be returned searchChatsOnServer query:string limit:int32 = Chats; //@description Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats @location Current user location@@ -3655,9 +3729,35 @@ upgradeBasicGroupChatToSupergroupChat chat_id:int53 = Chat; -//@description Moves a chat to a different chat list. Current chat list of the chat must ne non-null @chat_id Chat identifier @chat_list New chat list of the chat. The chat with the current user (Saved Messages) and the chat 777000 (Telegram) can't be moved to the Archive chat list-setChatChatList chat_id:int53 chat_list:ChatList = Ok;+//@description Returns chat lists to which the chat can be added. This is an offline request @chat_id Chat identifier+getChatListsToAddChat chat_id:int53 = ChatLists; +//@description Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed+//@chat_id Chat identifier @chat_list The chat list. Use getChatListsToAddChat to get suitable chat lists+addChatToList chat_id:int53 chat_list:ChatList = Ok;++//@description Returns information about a chat filter by its identifier @chat_filter_id Chat filter identifier+getChatFilter chat_filter_id:int32 = ChatFilter;++//@description Creates new chat filter. Returns information about the created chat filter @filter Chat filter+createChatFilter filter:chatFilter = ChatFilterInfo;++//@description Edits existing chat filter. Returns information about the edited chat filter @chat_filter_id Chat filter identifier @filter The edited chat filter+editChatFilter chat_filter_id:int32 filter:chatFilter = ChatFilterInfo;++//@description Deletes existing chat filter @chat_filter_id Chat filter identifier+deleteChatFilter chat_filter_id:int32 = Ok;++//@description Changes the order of chat filters @chat_filter_ids Identifiers of chat filters in the new correct order+reorderChatFilters chat_filter_ids:vector<int32> = Ok;++//@description Returns recommended chat filters for the current user+getRecommendedChatFilters = RecommendedChatFilters;++//@description Returns default icon name for a filter. This is an offline method. Can be called before authorization. Can be called synchronously @filter Chat filter+getChatFilterDefaultIconName filter:chatFilter = Text;++ //@description Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info rights. The title will not be changed until the request to the server has been completed //@chat_id Chat identifier @title New title of the chat; 1-128 characters setChatTitle chat_id:int53 title:string = Ok;@@ -3677,9 +3777,6 @@ //@chat_id Chat identifier @notification_settings New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever setChatNotificationSettings chat_id:int53 notification_settings:chatNotificationSettings = Ok; -//@description Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/archive chat list @chat_id Chat identifier @is_pinned New value of is_pinned-toggleChatIsPinned chat_id:int53 is_pinned:Bool = Ok;- //@description Changes the marked as unread state of a chat @chat_id Chat identifier @is_marked_as_unread New value of is_marked_as_unread toggleChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Ok; @@ -3761,6 +3858,10 @@ resetAllNotificationSettings = Ok; +//@description Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/arhive chat list+//@chat_list Chat list in which to change the pinned state of the chat @chat_id Chat identifier @is_pinned True, if the chat is pinned+toggleChatIsPinned chat_list:ChatList chat_id:int53 is_pinned:Bool = Ok;+ //@description Changes the order of pinned chats @chat_list Chat list in which to change the order of pinned chats @chat_ids The new list of pinned chats setPinnedChats chat_list:ChatList chat_ids:vector<int53> = Ok; @@ -4369,7 +4470,7 @@ setAlarm seconds:double = Ok; -//@description Uses current user IP address to found their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization+//@description Uses current user IP address to find their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization getCountryCode = Text; //@description Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram
+ src/TDLib/Generated.hs view
@@ -0,0 +1,8 @@+module TDLib.Generated+ ( module X,+ )+where++import TDLib.Generated.FunArgs as X+import TDLib.Generated.Functions as X+import TDLib.Generated.Types as X
src/TDLib/Generated/FunArgs.hs view
@@ -34,7 +34,7 @@ = -- | Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey CheckDatabaseEncryptionKey { -- | Encryption key to check or set up- encryption_key :: ByteString64+ encryptionKey :: ByteString64 } deriving (Show, Eq, Generic) -- | Parameter of Function setAuthenticationPhoneNumber@@ -42,7 +42,7 @@ = -- | Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, SetAuthenticationPhoneNumber { -- | The phone number of the user, in international format - phone_number :: T,+ phoneNumber :: T, -- | Settings for the authentication of the user's phone number settings :: PhoneNumberAuthenticationSettings }@@ -64,10 +64,10 @@ deriving (Show, Eq, Generic) -- | Parameter of Function requestQrCodeAuthentication data RequestQrCodeAuthentication- = -- | Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber + = -- | Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, RequestQrCodeAuthentication { -- | List of user identifiers of other users currently using the client- other_user_ids :: [I32]+ otherUserIds :: [I32] } deriving (Show, Eq, Generic) -- | Parameter of Function registerUser@@ -75,9 +75,9 @@ = -- | Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration RegisterUser { -- | The first name of the user; 1-64 characters - first_name :: T,+ firstName :: T, -- | The last name of the user; 0-64 characters- last_name :: T+ lastName :: T } deriving (Show, Eq, Generic) -- | Parameter of Function checkAuthenticationPassword@@ -100,7 +100,7 @@ = -- | Recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword RecoverAuthenticationPassword { -- | Recovery code to check- recovery_code :: T+ recoveryCode :: T } deriving (Show, Eq, Generic) -- | Parameter of Function checkAuthenticationBotToken@@ -152,7 +152,7 @@ = -- | Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain SetDatabaseEncryptionKey { -- | New encryption key- new_encryption_key :: ByteString64+ newEncryptionKey :: ByteString64 } deriving (Show, Eq, Generic) -- | Parameter of Function getPasswordState@@ -167,15 +167,15 @@ = -- | Changes the password for the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed SetPassword { -- | Previous password of the user - old_password :: T,+ oldPassword :: T, -- | New password of the user; may be empty to remove the password - new_password :: T,+ newPassword :: T, -- | New password hint; may be empty - new_hint :: T,+ newHint :: T, -- | Pass true if the recovery email address should be changed - set_recovery_email_address :: Bool,+ setRecoveryEmailAddress :: Bool, -- | New recovery email address; may be empty- new_recovery_email_address :: T+ newRecoveryEmailAddress :: T } deriving (Show, Eq, Generic) -- | Parameter of Function getRecoveryEmailAddress@@ -191,7 +191,7 @@ = -- | Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. SetRecoveryEmailAddress { password :: T,- new_recovery_email_address :: T+ newRecoveryEmailAddress :: T } deriving (Show, Eq, Generic) -- | Parameter of Function checkRecoveryEmailAddressCode@@ -221,7 +221,7 @@ = -- | Recovers the password using a recovery code sent to an email address that was previously set up RecoverPassword { -- | Recovery code to check- recovery_code :: T+ recoveryCode :: T } deriving (Show, Eq, Generic) -- | Parameter of Function createTemporaryPassword@@ -231,7 +231,7 @@ { -- | Persistent user password password :: T, -- | Time during which the temporary password will be valid, in seconds; should be between 60 and 86400- valid_for :: I32+ validFor :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getTemporaryPasswordState@@ -253,7 +253,7 @@ = -- | Returns information about a user by their identifier. This is an offline request if the current user is not a bot GetUser { -- | User identifier- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getUserFullInfo@@ -261,7 +261,7 @@ = -- | Returns full information about a user by their identifier GetUserFullInfo { -- | User identifier- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getBasicGroup@@ -269,7 +269,7 @@ = -- | Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot GetBasicGroup { -- | Basic group identifier- basic_group_id :: I32+ basicGroupId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getBasicGroupFullInfo@@ -277,7 +277,7 @@ = -- | Returns full information about a basic group by its identifier GetBasicGroupFullInfo { -- | Basic group identifier- basic_group_id :: I32+ basicGroupId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getSupergroup@@ -285,7 +285,7 @@ = -- | Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot GetSupergroup { -- | Supergroup or channel identifier- supergroup_id :: I32+ supergroupId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getSupergroupFullInfo@@ -293,7 +293,7 @@ = -- | Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute GetSupergroupFullInfo { -- | Supergroup or channel identifier- supergroup_id :: I32+ supergroupId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getSecretChat@@ -301,7 +301,7 @@ = -- | Returns information about a secret chat by its identifier. This is an offline request GetSecretChat { -- | Secret chat identifier- secret_chat_id :: I32+ secretChatId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getChat@@ -309,7 +309,7 @@ = -- | Returns information about a chat by its identifier, this is an offline request if the current user is not a bot GetChat { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function getMessage@@ -317,9 +317,9 @@ = -- | Returns information about a message GetMessage { -- | Identifier of the chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message to get- message_id :: I53+ messageId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function getMessageLocally@@ -327,9 +327,9 @@ = -- | Returns information about a message, if it is available locally without sending network request. This is an offline request GetMessageLocally { -- | Identifier of the chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message to get- message_id :: I53+ messageId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function getRepliedMessage@@ -337,9 +337,9 @@ = -- | Returns information about a message that is replied by given message GetRepliedMessage { -- | Identifier of the chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message reply to which get- message_id :: I53+ messageId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function getChatPinnedMessage@@ -347,7 +347,7 @@ = -- | Returns information about a pinned chat message GetChatPinnedMessage { -- | Identifier of the chat the message belongs to- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function getMessages@@ -355,9 +355,9 @@ = -- | Returns information about messages. If a message is not found, returns null on the corresponding position of the result GetMessages { -- | Identifier of the chat the messages belong to - chat_id :: I53,+ chatId :: I53, -- | Identifiers of the messages to get- message_ids :: [I53]+ messageIds :: [I53] } deriving (Show, Eq, Generic) -- | Parameter of Function getFile@@ -365,7 +365,7 @@ = -- | Returns information about a file; this is an offline request GetFile { -- | Identifier of the file to get- file_id :: I32+ fileId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getRemoteFile@@ -373,21 +373,21 @@ = -- | Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. GetRemoteFile { -- | Remote identifier of the file to get - remote_file_id :: T,+ remoteFileId :: T, -- | File type, if known- file_type :: FileType+ fileType :: FileType } deriving (Show, Eq, Generic) -- | Parameter of Function getChats data GetChats- = -- | Returns an ordered list of chats in a chat list. Chats are sorted by the pair (order, chat_id) in decreasing order. (For example, to get a list of chats from the beginning, the offset_order should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1).+ = -- | Returns an ordered list of chats in a chat list. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. (For example, to get a list of chats from the beginning, the offset_order should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). GetChats { -- | The chat list in which to return chats- chat_list :: ChatList,+ chatList :: ChatList, -- | Chat order to return chats from - offset_order :: I64,+ offsetOrder :: I64, -- | Chat identifier to return chats from- offset_chat_id :: I53,+ offsetChatId :: I53, -- | The maximum number of chats to be returned. It is possible that fewer chats than the limit are returned even if the end of the list is not reached limit :: I32 }@@ -410,7 +410,7 @@ deriving (Show, Eq, Generic) -- | Parameter of Function searchChats data SearchChats- = -- | Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the chat list + = -- | Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list SearchChats { -- | Query to search for. If the query is empty, returns up to 20 recently found chats query :: T,@@ -420,7 +420,7 @@ deriving (Show, Eq, Generic) -- | Parameter of Function searchChatsOnServer data SearchChatsOnServer- = -- | Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the chat list + = -- | Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list SearchChatsOnServer { -- | Query to search for query :: T,@@ -453,7 +453,7 @@ { -- | Category of frequently used chats category :: TopChatCategory, -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function addRecentlyFoundChat@@ -461,7 +461,7 @@ = -- | Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first AddRecentlyFoundChat { -- | Identifier of the chat to add- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function removeRecentlyFoundChat@@ -469,7 +469,7 @@ = -- | Removes a chat from the list of recently found chats RemoveRecentlyFoundChat { -- | Identifier of the chat to be removed- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function clearRecentlyFoundChats@@ -484,7 +484,7 @@ = -- | Checks whether a username can be set for a chat CheckChatUsername { -- | Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if chat is being created - chat_id :: I53,+ chatId :: I53, -- | Username to be checked username :: T }@@ -524,9 +524,9 @@ = -- | Returns a list of common group chats with a given user. Chats are sorted by their type and creation date GetGroupsInCommon { -- | User identifier - user_id :: I32,+ userId :: I32, -- | Chat identifier starting from which to return chats; use 0 for the first request - offset_chat_id :: I53,+ offsetChatId :: I53, -- | The maximum number of chats to be returned; up to 100 limit :: I32 }@@ -536,15 +536,15 @@ = -- | Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). GetChatHistory { -- | Chat identifier- chat_id :: I53,+ chatId :: I53, -- | Identifier of the message starting from which history must be fetched; use 0 to get results from the last message- from_message_id :: I53,+ fromMessageId :: I53, -- | Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages offset :: I32, -- | The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater or equal to -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached limit :: I32, -- | If true, returns only messages that are available locally without sending network requests- only_local :: Bool+ onlyLocal :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function deleteChatHistory@@ -552,9 +552,9 @@ = -- | Deletes all messages in the chat. Use Chat.can_be_deleted_only_for_self and Chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat DeleteChatHistory { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Pass true if the chat should be removed from the chat list - remove_from_chat_list :: Bool,+ removeFromChatList :: Bool, -- | Pass true to try to delete chat history for all users revoke :: Bool }@@ -564,13 +564,13 @@ = -- | Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query SearchChatMessages { -- | Identifier of the chat in which to search messages- chat_id :: I53,+ chatId :: I53, -- | Query to search for query :: T, -- | If not 0, only messages sent by the specified user will be returned. Not supported in secret chats- sender_user_id :: I32,+ senderUserId :: I32, -- | Identifier of the message starting from which history must be fetched; use 0 to get results from the last message- from_message_id :: I53,+ fromMessageId :: I53, -- | Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages offset :: I32, -- | The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached@@ -584,15 +584,15 @@ = -- | Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). SearchMessages { -- | Chat list in which to search messages; pass null to search in all chats regardless of their chat list- chat_list :: ChatList,+ chatList :: ChatList, -- | Query to search for query :: T, -- | The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message- offset_date :: I32,+ offsetDate :: I32, -- | The chat identifier of the last found message, or 0 for the first request- offset_chat_id :: I53,+ offsetChatId :: I53, -- | The message identifier of the last found message, or 0 for the first request- offset_message_id :: I53,+ offsetMessageId :: I53, -- | The maximum number of messages to be returned, up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached limit :: I32 }@@ -602,11 +602,11 @@ = -- | Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library SearchSecretMessages { -- | Identifier of the chat in which to search. Specify 0 to search in all secret chats - chat_id :: I53,+ chatId :: I53, -- | Query to search for. If empty, searchChatMessages should be used instead query :: T, -- | The identifier from the result of a previous request, use 0 to get results from the last message- from_search_id :: I64,+ fromSearchId :: I64, -- | The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached limit :: I32, -- | A filter for the content of messages in the search results@@ -618,11 +618,11 @@ = -- | Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id). For optimal performance the number of returned messages is chosen by the library SearchCallMessages { -- | Identifier of the message from which to search; use 0 to get results from the last message- from_message_id :: I53,+ fromMessageId :: I53, -- | The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached limit :: I32, -- | If true, returns only messages with missed calls- only_missed :: Bool+ onlyMissed :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function searchChatRecentLocationMessages@@ -630,7 +630,7 @@ = -- | Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user SearchChatRecentLocationMessages { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | The maximum number of messages to be returned limit :: I32 }@@ -647,7 +647,7 @@ = -- | Returns the last message sent in a chat no later than the specified date GetChatMessageByDate { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Point in time (Unix timestamp) relative to which to search for messages date :: I32 }@@ -657,11 +657,11 @@ = -- | Returns approximate number of messages of the specified type in the chat GetChatMessageCount { -- | Identifier of the chat in which to count messages - chat_id :: I53,+ chatId :: I53, -- | Filter for message content; searchMessagesFilterEmpty is unsupported in this function filter :: SearchMessagesFilter, -- | If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown- return_local :: Bool+ returnLocal :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getChatScheduledMessages@@ -669,7 +669,7 @@ = -- | Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) GetChatScheduledMessages { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function removeNotification@@ -677,9 +677,9 @@ = -- | Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user RemoveNotification { -- | Identifier of notification group to which the notification belongs - notification_group_id :: I32,+ notificationGroupId :: I32, -- | Identifier of removed notification- notification_id :: I32+ notificationId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function removeNotificationGroup@@ -687,9 +687,9 @@ = -- | Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user RemoveNotificationGroup { -- | Notification group identifier - notification_group_id :: I32,+ notificationGroupId :: I32, -- | The maximum identifier of removed notifications- max_notification_id :: I32+ maxNotificationId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getPublicMessageLink@@ -697,11 +697,11 @@ = -- | Returns a public HTTPS link to a message. Available only for messages in supergroups and channels with a username GetPublicMessageLink { -- | Identifier of the chat to which the message belongs- chat_id :: I53,+ chatId :: I53, -- | Identifier of the message- message_id :: I53,+ messageId :: I53, -- | Pass true if a link for a whole media album should be returned- for_album :: Bool+ forAlbum :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getMessageLink@@ -709,9 +709,9 @@ = -- | Returns a private HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. The link will work only for members of the chat GetMessageLink { -- | Identifier of the chat to which the message belongs- chat_id :: I53,+ chatId :: I53, -- | Identifier of the message- message_id :: I53+ messageId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function getMessageLinkInfo@@ -727,15 +727,15 @@ = -- | Sends a message. Returns the sent message SendMessage { -- | Target chat - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message to reply to or 0- reply_to_message_id :: I53,+ replyToMessageId :: I53, -- | Options to be used to send the message options :: SendMessageOptions, -- | Markup for replying to the message; for bots only - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | The content of the message to be sent- input_message_content :: InputMessageContent+ inputMessageContent :: InputMessageContent } deriving (Show, Eq, Generic) -- | Parameter of Function sendMessageAlbum@@ -743,13 +743,13 @@ = -- | Sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages SendMessageAlbum { -- | Target chat - chat_id :: I53,+ chatId :: I53, -- | Identifier of a message to reply to or 0- reply_to_message_id :: I53,+ replyToMessageId :: I53, -- | Options to be used to send the messages options :: SendMessageOptions, -- | Contents of messages to be sent- input_message_contents :: [InputMessageContent]+ inputMessageContents :: [InputMessageContent] } deriving (Show, Eq, Generic) -- | Parameter of Function sendBotStartMessage@@ -757,9 +757,9 @@ = -- | Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message SendBotStartMessage { -- | Identifier of the bot - bot_user_id :: I32,+ botUserId :: I32, -- | Identifier of the target chat - chat_id :: I53,+ chatId :: I53, -- | A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking) parameter :: T }@@ -769,17 +769,17 @@ = -- | Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message SendInlineQueryResultMessage { -- | Target chat - chat_id :: I53,+ chatId :: I53, -- | Identifier of a message to reply to or 0- reply_to_message_id :: I53,+ replyToMessageId :: I53, -- | Options to be used to send the message options :: SendMessageOptions, -- | Identifier of the inline query - query_id :: I64,+ queryId :: I64, -- | Identifier of the inline result- result_id :: T,+ resultId :: T, -- | If true, there will be no mention of a bot, via which the message is sent. Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and GetOption("venue_search_bot_username")- hide_via_bot :: Bool+ hideViaBot :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function forwardMessages@@ -787,19 +787,19 @@ = -- | Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message ForwardMessages { -- | Identifier of the chat to which to forward messages - chat_id :: I53,+ chatId :: I53, -- | Identifier of the chat from which to forward messages - from_chat_id :: I53,+ fromChatId :: I53, -- | Identifiers of the messages to forward- message_ids :: [I53],+ messageIds :: [I53], -- | Options to be used to send the messages options :: SendMessageOptions, -- | True, if the messages should be grouped into an album after forwarding. For this to work, no more than 10 messages may be forwarded, and all of them must be photo or video messages- as_album :: Bool,+ asAlbum :: Bool, -- | True, if content of the messages needs to be copied without links to the original messages. Always true if the messages are forwarded to a secret chat- send_copy :: Bool,+ sendCopy :: Bool, -- | True, if media captions of message copies needs to be removed. Ignored if send_copy is false- remove_caption :: Bool+ removeCaption :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function resendMessages@@ -807,9 +807,9 @@ = -- | Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. ResendMessages { -- | Identifier of the chat to send messages - chat_id :: I53,+ chatId :: I53, -- | Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order- message_ids :: [I53]+ messageIds :: [I53] } deriving (Show, Eq, Generic) -- | Parameter of Function sendChatSetTtlMessage@@ -817,7 +817,7 @@ = -- | Changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message SendChatSetTtlMessage { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New TTL value, in seconds ttl :: I32 }@@ -827,7 +827,7 @@ = -- | Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats SendChatScreenshotTakenNotification { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function addLocalMessage@@ -835,15 +835,15 @@ = -- | Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message AddLocalMessage { -- | Target chat - chat_id :: I53,+ chatId :: I53, -- | Identifier of the user who will be shown as the sender of the message; may be 0 for channel posts- sender_user_id :: I32,+ senderUserId :: I32, -- | Identifier of the message to reply to or 0 - reply_to_message_id :: I53,+ replyToMessageId :: I53, -- | Pass true to disable notification for the message - disable_notification :: Bool,+ disableNotification :: Bool, -- | The content of the message to be added- input_message_content :: InputMessageContent+ inputMessageContent :: InputMessageContent } deriving (Show, Eq, Generic) -- | Parameter of Function deleteMessages@@ -851,9 +851,9 @@ = -- | Deletes messages DeleteMessages { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Identifiers of the messages to be deleted - message_ids :: [I53],+ messageIds :: [I53], -- | Pass true to try to delete messages for all chat members. Always true for supergroups, channels and secret chats revoke :: Bool }@@ -863,9 +863,9 @@ = -- | Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires can_delete_messages administrator privileges DeleteChatMessagesFromUser { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | User identifier- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function editMessageText@@ -873,13 +873,13 @@ = -- | Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side EditMessageText { -- | The chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message - message_id :: I53,+ messageId :: I53, -- | The new message reply markup; for bots only - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | New text content of the message. Should be of type InputMessageText- input_message_content :: InputMessageContent+ inputMessageContent :: InputMessageContent } deriving (Show, Eq, Generic) -- | Parameter of Function editMessageLiveLocation@@ -887,13 +887,13 @@ = -- | Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side EditMessageLiveLocation { -- | The chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message - message_id :: I53,+ messageId :: I53, -- | The new message reply markup; for bots only - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | New location content of the message; may be null. Pass null to stop sharing the live location- location :: Location+ location :: (Maybe) (Location) } deriving (Show, Eq, Generic) -- | Parameter of Function editMessageMedia@@ -901,13 +901,13 @@ = -- | Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side EditMessageMedia { -- | The chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message - message_id :: I53,+ messageId :: I53, -- | The new message reply markup; for bots only - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo- input_message_content :: InputMessageContent+ inputMessageContent :: InputMessageContent } deriving (Show, Eq, Generic) -- | Parameter of Function editMessageCaption@@ -915,11 +915,11 @@ = -- | Edits the message content caption. Returns the edited message after the edit is completed on the server side EditMessageCaption { -- | The chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message - message_id :: I53,+ messageId :: I53, -- | The new message reply markup; for bots only - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | New message content caption; 0-GetOption("message_caption_length_max") characters caption :: FormattedText }@@ -929,11 +929,11 @@ = -- | Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side EditMessageReplyMarkup { -- | The chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message - message_id :: I53,+ messageId :: I53, -- | The new message reply markup- reply_markup :: ReplyMarkup+ replyMarkup :: ReplyMarkup } deriving (Show, Eq, Generic) -- | Parameter of Function editInlineMessageText@@ -941,11 +941,11 @@ = -- | Edits the text of an inline text or game message sent via a bot; for bots only EditInlineMessageText { -- | Inline message identifier - inline_message_id :: T,+ inlineMessageId :: T, -- | The new message reply markup - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | New text content of the message. Should be of type InputMessageText- input_message_content :: InputMessageContent+ inputMessageContent :: InputMessageContent } deriving (Show, Eq, Generic) -- | Parameter of Function editInlineMessageLiveLocation@@ -953,11 +953,11 @@ = -- | Edits the content of a live location in an inline message sent via a bot; for bots only EditInlineMessageLiveLocation { -- | Inline message identifier - inline_message_id :: T,+ inlineMessageId :: T, -- | The new message reply markup - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | New location content of the message; may be null. Pass null to stop sharing the live location- location :: Location+ location :: (Maybe) (Location) } deriving (Show, Eq, Generic) -- | Parameter of Function editInlineMessageMedia@@ -965,11 +965,11 @@ = -- | Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only EditInlineMessageMedia { -- | Inline message identifier- inline_message_id :: T,+ inlineMessageId :: T, -- | The new message reply markup; for bots only - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo- input_message_content :: InputMessageContent+ inputMessageContent :: InputMessageContent } deriving (Show, Eq, Generic) -- | Parameter of Function editInlineMessageCaption@@ -977,9 +977,9 @@ = -- | Edits the caption of an inline message sent via a bot; for bots only EditInlineMessageCaption { -- | Inline message identifier - inline_message_id :: T,+ inlineMessageId :: T, -- | The new message reply markup - reply_markup :: ReplyMarkup,+ replyMarkup :: ReplyMarkup, -- | New message content caption; 0-GetOption("message_caption_length_max") characters caption :: FormattedText }@@ -989,9 +989,9 @@ = -- | Edits the reply markup of an inline message sent via a bot; for bots only EditInlineMessageReplyMarkup { -- | Inline message identifier - inline_message_id :: T,+ inlineMessageId :: T, -- | The new message reply markup- reply_markup :: ReplyMarkup+ replyMarkup :: ReplyMarkup } deriving (Show, Eq, Generic) -- | Parameter of Function editMessageSchedulingState@@ -999,11 +999,11 @@ = -- | Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed EditMessageSchedulingState { -- | The chat the message belongs to - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message - message_id :: I53,+ messageId :: I53, -- | The new message scheduling state. Pass null to send the message immediately- scheduling_state :: MessageSchedulingState+ schedulingState :: MessageSchedulingState } deriving (Show, Eq, Generic) -- | Parameter of Function getTextEntities@@ -1021,7 +1021,7 @@ { -- | The text to parse text :: T, -- | Text parse mode- parse_mode :: TextParseMode+ parseMode :: TextParseMode } deriving (Show, Eq, Generic) -- | Parameter of Function parseMarkdown@@ -1045,7 +1045,7 @@ = -- | Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously GetFileMimeType { -- | The name of the file or path to the file- file_name :: T+ fileName :: T } deriving (Show, Eq, Generic) -- | Parameter of Function getFileExtension@@ -1053,7 +1053,7 @@ = -- | Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously GetFileExtension { -- | The MIME type of the file- mime_type :: T+ mimeType :: T } deriving (Show, Eq, Generic) -- | Parameter of Function cleanFileName@@ -1061,7 +1061,7 @@ = -- | Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously CleanFileName { -- | File name or path to the file- file_name :: T+ fileName :: T } deriving (Show, Eq, Generic) -- | Parameter of Function getLanguagePackString@@ -1069,11 +1069,11 @@ = -- | Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. This is an offline method. Can be called before authorization. Can be called synchronously GetLanguagePackString { -- | Path to the language pack database in which strings are stored - language_pack_database_path :: T,+ languagePackDatabasePath :: T, -- | Localization target to which the language pack belongs - localization_target :: T,+ localizationTarget :: T, -- | Language pack identifier - language_pack_id :: T,+ languagePackId :: T, -- | Language pack key of the string to be returned key :: T }@@ -1091,7 +1091,7 @@ = -- | Converts a JsonValue object to corresponding JSON-serialized string. This is an offline method. Can be called before authorization. Can be called synchronously GetJsonString { -- | The JsonValue object- json_value :: JsonValue+ jsonValue :: JsonValue } deriving (Show, Eq, Generic) -- | Parameter of Function setPollAnswer@@ -1099,11 +1099,11 @@ = -- | Changes the user answer to a poll. A poll in quiz mode can be answered only once SetPollAnswer { -- | Identifier of the chat to which the poll belongs - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message containing the poll- message_id :: I53,+ messageId :: I53, -- | 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers- option_ids :: [I32]+ optionIds :: [I32] } deriving (Show, Eq, Generic) -- | Parameter of Function getPollVoters@@ -1111,11 +1111,11 @@ = -- | Returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library GetPollVoters { -- | Identifier of the chat to which the poll belongs - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message containing the poll- message_id :: I53,+ messageId :: I53, -- | 0-based identifier of the answer option- option_id :: I32,+ optionId :: I32, -- | Number of users to skip in the result; must be non-negative offset :: I32, -- | The maximum number of users to be returned; must be positive and can't be greater than 50. Fewer users may be returned than specified by the limit, even if the end of the voter list has not been reached@@ -1127,11 +1127,11 @@ = -- | Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set StopPoll { -- | Identifier of the chat to which the poll belongs - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message containing the poll - message_id :: I53,+ messageId :: I53, -- | The new message reply markup; for bots only- reply_markup :: ReplyMarkup+ replyMarkup :: ReplyMarkup } deriving (Show, Eq, Generic) -- | Parameter of Function getLoginUrlInfo@@ -1139,11 +1139,11 @@ = -- | Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button GetLoginUrlInfo { -- | Chat identifier of the message with the button - chat_id :: I53,+ chatId :: I53, -- | Message identifier of the message with the button - message_id :: I53,+ messageId :: I53, -- | Button identifier- button_id :: I32+ buttonId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getLoginUrl@@ -1151,13 +1151,13 @@ = -- | Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. GetLoginUrl { -- | Chat identifier of the message with the button - chat_id :: I53,+ chatId :: I53, -- | Message identifier of the message with the button - message_id :: I53,+ messageId :: I53, -- | Button identifier- button_id :: I32,+ buttonId :: I32, -- | True, if the user allowed the bot to send them messages- allow_write_access :: Bool+ allowWriteAccess :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getInlineQueryResults@@ -1165,11 +1165,11 @@ = -- | Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires GetInlineQueryResults { -- | The identifier of the target bot- bot_user_id :: I32,+ botUserId :: I32, -- | Identifier of the chat where the query was sent - chat_id :: I53,+ chatId :: I53, -- | Location of the user, only if needed - user_location :: Location,+ userLocation :: Location, -- | Text of the query query :: T, -- | Offset of the first entry to return@@ -1181,19 +1181,19 @@ = -- | Sets the result of an inline query; for bots only AnswerInlineQuery { -- | Identifier of the inline query - inline_query_id :: I64,+ inlineQueryId :: I64, -- | True, if the result of the query can be cached for the specified user- is_personal :: Bool,+ isPersonal :: Bool, -- | The results of the query results :: [InputInlineQueryResult], -- | Allowed time to cache the results of the query, in seconds - cache_time :: I32,+ cacheTime :: I32, -- | Offset for the next inline query; pass an empty string if there are no more results- next_offset :: T,+ nextOffset :: T, -- | If non-empty, this text should be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter - switch_pm_text :: T,+ switchPmText :: T, -- | The parameter for the bot start message- switch_pm_parameter :: T+ switchPmParameter :: T } deriving (Show, Eq, Generic) -- | Parameter of Function getCallbackQueryAnswer@@ -1201,9 +1201,9 @@ = -- | Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires GetCallbackQueryAnswer { -- | Identifier of the chat with the message - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message from which the query originated - message_id :: I53,+ messageId :: I53, -- | Query payload payload :: CallbackQueryPayload }@@ -1213,15 +1213,15 @@ = -- | Sets the result of a callback query; for bots only AnswerCallbackQuery { -- | Identifier of the callback query - callback_query_id :: I64,+ callbackQueryId :: I64, -- | Text of the answer text :: T, -- | If true, an alert should be shown to the user instead of a toast notification - show_alert :: Bool,+ showAlert :: Bool, -- | URL to be opened url :: T, -- | Time during which the result of the query can be cached, in seconds- cache_time :: I32+ cacheTime :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function answerShippingQuery@@ -1229,11 +1229,11 @@ = -- | Sets the result of a shipping query; for bots only AnswerShippingQuery { -- | Identifier of the shipping query - shipping_query_id :: I64,+ shippingQueryId :: I64, -- | Available shipping options - shipping_options :: [ShippingOption],+ shippingOptions :: [ShippingOption], -- | An error message, empty on success- error_message :: T+ errorMessage :: T } deriving (Show, Eq, Generic) -- | Parameter of Function answerPreCheckoutQuery@@ -1241,9 +1241,9 @@ = -- | Sets the result of a pre-checkout query; for bots only AnswerPreCheckoutQuery { -- | Identifier of the pre-checkout query - pre_checkout_query_id :: I64,+ preCheckoutQueryId :: I64, -- | An error message, empty on success- error_message :: T+ errorMessage :: T } deriving (Show, Eq, Generic) -- | Parameter of Function setGameScore@@ -1251,13 +1251,13 @@ = -- | Updates the game score of the specified user in the game; for bots only SetGameScore { -- | The chat to which the message with the game belongs - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message - message_id :: I53,+ messageId :: I53, -- | True, if the message should be edited - edit_message :: Bool,+ editMessage :: Bool, -- | User identifier - user_id :: I32,+ userId :: I32, -- | The new score score :: I32, -- | Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table@@ -1269,11 +1269,11 @@ = -- | Updates the game score of the specified user in a game; for bots only SetInlineGameScore { -- | Inline message identifier - inline_message_id :: T,+ inlineMessageId :: T, -- | True, if the message should be edited - edit_message :: Bool,+ editMessage :: Bool, -- | User identifier - user_id :: I32,+ userId :: I32, -- | The new score score :: I32, -- | Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table@@ -1285,11 +1285,11 @@ = -- | Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only GetGameHighScores { -- | The chat that contains the message with the game - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message - message_id :: I53,+ messageId :: I53, -- | User identifier- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getInlineGameHighScores@@ -1297,9 +1297,9 @@ = -- | Returns game high scores and some part of the high score table in the range of the specified user; for bots only GetInlineGameHighScores { -- | Inline message identifier - inline_message_id :: T,+ inlineMessageId :: T, -- | User identifier- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function deleteChatReplyMarkup@@ -1307,9 +1307,9 @@ = -- | Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed DeleteChatReplyMarkup { -- | Chat identifier- chat_id :: I53,+ chatId :: I53, -- | The message identifier of the used keyboard- message_id :: I53+ messageId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function sendChatAction@@ -1317,7 +1317,7 @@ = -- | Sends a notification about user activity in a chat SendChatAction { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | The action description action :: ChatAction }@@ -1327,7 +1327,7 @@ = -- | Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) OpenChat { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function closeChat@@ -1335,7 +1335,7 @@ = -- | Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed CloseChat { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function viewMessages@@ -1343,11 +1343,11 @@ = -- | Informs TDLib that messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels) ViewMessages { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | The identifiers of the messages being viewed- message_ids :: [I53],+ messageIds :: [I53], -- | True, if messages in closed chats should be marked as read- force_read :: Bool+ forceRead :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function openMessageContent@@ -1355,9 +1355,9 @@ = -- | Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed OpenMessageContent { -- | Chat identifier of the message - chat_id :: I53,+ chatId :: I53, -- | Identifier of the message with the opened content- message_id :: I53+ messageId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function readAllChatMentions@@ -1365,7 +1365,7 @@ = -- | Marks all mentions in a chat as read ReadAllChatMentions { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function createPrivateChat@@ -1373,7 +1373,7 @@ = -- | Returns an existing chat corresponding to a given user CreatePrivateChat { -- | User identifier - user_id :: I32,+ userId :: I32, -- | If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect force :: Bool }@@ -1383,7 +1383,7 @@ = -- | Returns an existing chat corresponding to a known basic group CreateBasicGroupChat { -- | Basic group identifier - basic_group_id :: I32,+ basicGroupId :: I32, -- | If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect force :: Bool }@@ -1393,7 +1393,7 @@ = -- | Returns an existing chat corresponding to a known supergroup or channel CreateSupergroupChat { -- | Supergroup or channel identifier - supergroup_id :: I32,+ supergroupId :: I32, -- | If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect force :: Bool }@@ -1403,7 +1403,7 @@ = -- | Returns an existing chat corresponding to a known secret chat CreateSecretChat { -- | Secret chat identifier- secret_chat_id :: I32+ secretChatId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function createNewBasicGroupChat@@ -1411,7 +1411,7 @@ = -- | Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat CreateNewBasicGroupChat { -- | Identifiers of users to be added to the basic group - user_ids :: [I32],+ userIds :: [I32], -- | Title of the new basic group; 1-128 characters title :: T }@@ -1423,7 +1423,7 @@ { -- | Title of the new chat; 1-128 characters title :: T, -- | True, if a channel chat should be created - is_channel :: Bool,+ isChannel :: Bool, -- | Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat description :: T, -- | Chat location if a location-based supergroup is being created@@ -1435,7 +1435,7 @@ = -- | Creates a new secret chat. Returns the newly created chat CreateNewSecretChat { -- | Identifier of the target user- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function upgradeBasicGroupChatToSupergroupChat@@ -1443,25 +1443,90 @@ = -- | Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group UpgradeBasicGroupChatToSupergroupChat { -- | Identifier of the chat to upgrade- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic)--- | Parameter of Function setChatChatList-data SetChatChatList- = -- | Moves a chat to a different chat list. Current chat list of the chat must ne non-null - SetChatChatList+-- | Parameter of Function getChatListsToAddChat+data GetChatListsToAddChat+ = -- | Returns chat lists to which the chat can be added. This is an offline request + GetChatListsToAddChat+ { -- | Chat identifier+ chatId :: I53+ }+ deriving (Show, Eq, Generic)+-- | Parameter of Function addChatToList+data AddChatToList+ = -- | Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed+ AddChatToList { -- | Chat identifier - chat_id :: I53,- -- | New chat list of the chat. The chat with the current user (Saved Messages) and the chat 777000 (Telegram) can't be moved to the Archive chat list- chat_list :: ChatList+ chatId :: I53,+ -- | The chat list. Use getChatListsToAddChat to get suitable chat lists+ chatList :: ChatList } deriving (Show, Eq, Generic)+-- | Parameter of Function getChatFilter+data GetChatFilter+ = -- | Returns information about a chat filter by its identifier + GetChatFilter+ { -- | Chat filter identifier+ chatFilterId :: I32+ }+ deriving (Show, Eq, Generic)+-- | Parameter of Function createChatFilter+data CreateChatFilter+ = -- | Creates new chat filter. Returns information about the created chat filter + CreateChatFilter+ { -- | Chat filter+ filter :: ChatFilter+ }+ deriving (Show, Eq, Generic)+-- | Parameter of Function editChatFilter+data EditChatFilter+ = -- | Edits existing chat filter. Returns information about the edited chat filter + EditChatFilter+ { -- | Chat filter identifier + chatFilterId :: I32,+ -- | The edited chat filter+ filter :: ChatFilter+ }+ deriving (Show, Eq, Generic)+-- | Parameter of Function deleteChatFilter+data DeleteChatFilter+ = -- | Deletes existing chat filter + DeleteChatFilter+ { -- | Chat filter identifier+ chatFilterId :: I32+ }+ deriving (Show, Eq, Generic)+-- | Parameter of Function reorderChatFilters+data ReorderChatFilters+ = -- | Changes the order of chat filters + ReorderChatFilters+ { -- | Identifiers of chat filters in the new correct order+ chatFilterIds :: [I32]+ }+ deriving (Show, Eq, Generic)+-- | Parameter of Function getRecommendedChatFilters+data GetRecommendedChatFilters+ = -- | Returns recommended chat filters for the current user+ GetRecommendedChatFilters+ { + }+ deriving (Show, Eq, Generic)+-- | Parameter of Function getChatFilterDefaultIconName+data GetChatFilterDefaultIconName+ = -- | Returns default icon name for a filter. This is an offline method. Can be called before authorization. Can be called synchronously + GetChatFilterDefaultIconName+ { -- | Chat filter+ filter :: ChatFilter+ }+ deriving (Show, Eq, Generic) -- | Parameter of Function setChatTitle data SetChatTitle = -- | Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info rights. The title will not be changed until the request to the server has been completed SetChatTitle { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New title of the chat; 1-128 characters title :: T }@@ -1471,7 +1536,7 @@ = -- | Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info rights. The photo will not be changed before request to the server has been completed SetChatPhoto { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New chat photo. You can use a zero InputFileId to delete the chat photo. Files that are accessible only by HTTP URL are not acceptable photo :: InputFile }@@ -1481,7 +1546,7 @@ = -- | Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right SetChatPermissions { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New non-administrator members permissions in the chat permissions :: ChatPermissions }@@ -1491,9 +1556,9 @@ = -- | Changes the draft message in a chat SetChatDraftMessage { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New draft message; may be null- draft_message :: DraftMessage+ draftMessage :: (Maybe) (DraftMessage) } deriving (Show, Eq, Generic) -- | Parameter of Function setChatNotificationSettings@@ -1501,19 +1566,9 @@ = -- | Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed SetChatNotificationSettings { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever- notification_settings :: ChatNotificationSettings- }- deriving (Show, Eq, Generic)--- | Parameter of Function toggleChatIsPinned-data ToggleChatIsPinned- = -- | Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/archive chat list - ToggleChatIsPinned- { -- | Chat identifier - chat_id :: I53,- -- | New value of is_pinned- is_pinned :: Bool+ notificationSettings :: ChatNotificationSettings } deriving (Show, Eq, Generic) -- | Parameter of Function toggleChatIsMarkedAsUnread@@ -1521,9 +1576,9 @@ = -- | Changes the marked as unread state of a chat ToggleChatIsMarkedAsUnread { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New value of is_marked_as_unread- is_marked_as_unread :: Bool+ isMarkedAsUnread :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function toggleChatDefaultDisableNotification@@ -1531,9 +1586,9 @@ = -- | Changes the value of the default disable_notification parameter, used when a message is sent to a chat ToggleChatDefaultDisableNotification { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New value of default_disable_notification- default_disable_notification :: Bool+ defaultDisableNotification :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function setChatClientData@@ -1541,9 +1596,9 @@ = -- | Changes client data associated with a chat SetChatClientData { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New value of client_data- client_data :: T+ clientData :: T } deriving (Show, Eq, Generic) -- | Parameter of Function setChatDescription@@ -1551,7 +1606,7 @@ = -- | Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info rights SetChatDescription { -- | Identifier of the chat - chat_id :: I53,+ chatId :: I53, -- | Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info rights description :: T }@@ -1561,9 +1616,9 @@ = -- | Changes the discussion group of a channel chat; requires can_change_info rights in the channel if it is specified SetChatDiscussionGroup { -- | Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages rights in the supergroup) - chat_id :: I53,+ chatId :: I53, -- | Identifier of a new channel's discussion group. Use 0 to remove the discussion group.- discussion_chat_id :: I53+ discussionChatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function setChatLocation@@ -1571,7 +1626,7 @@ = -- | Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use SetChatLocation { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New location for the chat; must be valid and not null location :: ChatLocation }@@ -1581,9 +1636,9 @@ = -- | Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights SetChatSlowModeDelay { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | New slow mode delay for the chat; must be one of 0, 10, 30, 60, 300, 900, 3600- slow_mode_delay :: I32+ slowModeDelay :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function pinChatMessage@@ -1591,11 +1646,11 @@ = -- | Pins a message in a chat; requires can_pin_messages rights PinChatMessage { -- | Identifier of the chat - chat_id :: I53,+ chatId :: I53, -- | Identifier of the new pinned message - message_id :: I53,+ messageId :: I53, -- | True, if there should be no notification about the pinned message- disable_notification :: Bool+ disableNotification :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function unpinChatMessage@@ -1603,7 +1658,7 @@ = -- | Removes the pinned message from a chat; requires can_pin_messages rights in the group or channel UnpinChatMessage { -- | Identifier of the chat- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function joinChat@@ -1611,7 +1666,7 @@ = -- | Adds current user as a new member to a chat. Private and secret chats can't be joined using this method JoinChat { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function leaveChat@@ -1619,7 +1674,7 @@ = -- | Removes current user from chat members. Private and secret chats can't be left using this method LeaveChat { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function addChatMember@@ -1627,11 +1682,11 @@ = -- | Adds a new member to a chat. Members can't be added to private or secret chats. Members will not be added until the chat state has been synchronized with the server AddChatMember { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Identifier of the user - user_id :: I32,+ userId :: I32, -- | The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels- forward_limit :: I32+ forwardLimit :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function addChatMembers@@ -1639,9 +1694,9 @@ = -- | Adds multiple new members to a chat. Currently this option is only available for supergroups and channels. This option can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Members will not be added until the chat state has been synchronized with the server AddChatMembers { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Identifiers of the users to be added to the chat- user_ids :: [I32]+ userIds :: [I32] } deriving (Show, Eq, Generic) -- | Parameter of Function setChatMemberStatus@@ -1649,9 +1704,9 @@ = -- | Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership. The chat member status will not be changed until it has been synchronized with the server SetChatMemberStatus { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | User identifier - user_id :: I32,+ userId :: I32, -- | The new status of the member in the chat status :: ChatMemberStatus }@@ -1668,9 +1723,9 @@ = -- | Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats TransferChatOwnership { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user - user_id :: I32,+ userId :: I32, -- | The password of the current user password :: T }@@ -1680,9 +1735,9 @@ = -- | Returns information about a single member of a chat GetChatMember { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | User identifier- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function searchChatMembers@@ -1690,7 +1745,7 @@ = -- | Searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels SearchChatMembers { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Query to search for query :: T, -- | The maximum number of users to be returned @@ -1704,7 +1759,7 @@ = -- | Returns a list of administrators of the chat with their custom titles GetChatAdministrators { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function clearAllDraftMessages@@ -1712,7 +1767,7 @@ = -- | Clears draft messages in all chats ClearAllDraftMessages { -- | If true, local draft messages in secret chats will not be cleared- exclude_secret_chats :: Bool+ excludeSecretChats :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getChatNotificationSettingsExceptions@@ -1722,7 +1777,7 @@ { -- | If specified, only chats from the specified scope will be returned scope :: NotificationSettingsScope, -- | If true, also chats with non-default sound will be returned- compare_sound :: Bool+ compareSound :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getScopeNotificationSettings@@ -1740,7 +1795,7 @@ { -- | Types of chats for which to change the notification settings scope :: NotificationSettingsScope, -- | The new notification settings for the given scope- notification_settings :: ScopeNotificationSettings+ notificationSettings :: ScopeNotificationSettings } deriving (Show, Eq, Generic) -- | Parameter of Function resetAllNotificationSettings@@ -1750,14 +1805,26 @@ { } deriving (Show, Eq, Generic)+-- | Parameter of Function toggleChatIsPinned+data ToggleChatIsPinned+ = -- | Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/arhive chat list+ ToggleChatIsPinned+ { -- | Chat list in which to change the pinned state of the chat + chatList :: ChatList,+ -- | Chat identifier + chatId :: I53,+ -- | True, if the chat is pinned+ isPinned :: Bool+ }+ deriving (Show, Eq, Generic) -- | Parameter of Function setPinnedChats data SetPinnedChats = -- | Changes the order of pinned chats SetPinnedChats { -- | Chat list in which to change the order of pinned chats - chat_list :: ChatList,+ chatList :: ChatList, -- | The new list of pinned chats- chat_ids :: [I53]+ chatIds :: [I53] } deriving (Show, Eq, Generic) -- | Parameter of Function downloadFile@@ -1765,7 +1832,7 @@ = -- | Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates DownloadFile { -- | Identifier of the file to download- file_id :: I32,+ fileId :: I32, -- | Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first priority :: I32, -- | The starting position from which the file should be downloaded@@ -1781,7 +1848,7 @@ = -- | Returns file downloaded prefix size from a given offset GetFileDownloadedPrefixSize { -- | Identifier of the file - file_id :: I32,+ fileId :: I32, -- | Offset from which downloaded prefix size should be calculated offset :: I32 }@@ -1791,9 +1858,9 @@ = -- | Stops the downloading of a file. If a file has already been downloaded, does nothing CancelDownloadFile { -- | Identifier of a file to stop downloading - file_id :: I32,+ fileId :: I32, -- | Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server- only_if_pending :: Bool+ onlyIfPending :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function uploadFile@@ -1803,7 +1870,7 @@ { -- | File to upload file :: InputFile, -- | File type- file_type :: FileType,+ fileType :: FileType, -- | Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which uploadFile was called will be uploaded first priority :: I32 }@@ -1813,7 +1880,7 @@ = -- | Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined CancelUploadFile { -- | Identifier of the file to stop uploading- file_id :: I32+ fileId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function writeGeneratedFilePart@@ -1821,7 +1888,7 @@ = -- | Writes a part of a generated file. This method is intended to be used only if the client has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file WriteGeneratedFilePart { -- | The identifier of the generation process - generation_id :: I64,+ generationId :: I64, -- | The offset from which to write the data to the file offset :: I32, -- | The data to write@@ -1833,11 +1900,11 @@ = -- | Informs TDLib on a file generation progress SetFileGenerationProgress { -- | The identifier of the generation process- generation_id :: I64,+ generationId :: I64, -- | Expected size of the generated file, in bytes; 0 if unknown- expected_size :: I32,+ expectedSize :: I32, -- | The number of bytes already generated- local_prefix_size :: I32+ localPrefixSize :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function finishFileGeneration@@ -1845,7 +1912,7 @@ = -- | Finishes the file generation FinishFileGeneration { -- | The identifier of the generation process- generation_id :: I64,+ generationId :: I64, -- | If set, means that file generation has failed and should be terminated error :: Error }@@ -1855,7 +1922,7 @@ = -- | Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the client has no direct access to TDLib's file system, because it is usually slower than a direct read from the file ReadFilePart { -- | Identifier of the file. The file must be located in the TDLib file cache- file_id :: I32,+ fileId :: I32, -- | The offset from which to read the file offset :: I32, -- | Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position@@ -1867,7 +1934,7 @@ = -- | Deletes a file from the TDLib file cache DeleteFile { -- | Identifier of the file to delete- file_id :: I32+ fileId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function generateChatInviteLink@@ -1875,7 +1942,7 @@ = -- | Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right GenerateChatInviteLink { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function checkChatInviteLink@@ -1883,7 +1950,7 @@ = -- | Checks the validity of an invite link for a chat and returns information about the corresponding chat CheckChatInviteLink { -- | Invite link to be checked; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"- invite_link :: T+ inviteLink :: T } deriving (Show, Eq, Generic) -- | Parameter of Function joinChatByInviteLink@@ -1891,7 +1958,7 @@ = -- | Uses an invite link to add the current user to the chat if possible. The new member will not be added until the chat state has been synchronized with the server JoinChatByInviteLink { -- | Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"- invite_link :: T+ inviteLink :: T } deriving (Show, Eq, Generic) -- | Parameter of Function createCall@@ -1899,7 +1966,7 @@ = -- | Creates a new call CreateCall { -- | Identifier of the user to be called - user_id :: I32,+ userId :: I32, -- | Description of the call protocols supported by the client protocol :: CallProtocol }@@ -1909,7 +1976,7 @@ = -- | Accepts an incoming call AcceptCall { -- | Call identifier - call_id :: I32,+ callId :: I32, -- | Description of the call protocols supported by the client protocol :: CallProtocol }@@ -1919,13 +1986,13 @@ = -- | Discards a call DiscardCall { -- | Call identifier - call_id :: I32,+ callId :: I32, -- | True, if the user was disconnected - is_disconnected :: Bool,+ isDisconnected :: Bool, -- | The call duration, in seconds duration :: I32, -- | Identifier of the connection used during the call- connection_id :: I64+ connectionId :: I64 } deriving (Show, Eq, Generic) -- | Parameter of Function sendCallRating@@ -1933,7 +2000,7 @@ = -- | Sends a call rating SendCallRating { -- | Call identifier - call_id :: I32,+ callId :: I32, -- | Call rating; 1-5 rating :: I32, -- | An optional user comment if the rating is less than 5 @@ -1947,9 +2014,9 @@ = -- | Sends debug information for a call SendCallDebugInformation { -- | Call identifier - call_id :: I32,+ callId :: I32, -- | Debug information in application-specific format- debug_information :: T+ debugInformation :: T } deriving (Show, Eq, Generic) -- | Parameter of Function blockUser@@ -1957,7 +2024,7 @@ = -- | Adds a user to the blacklist BlockUser { -- | User identifier- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function unblockUser@@ -1965,7 +2032,7 @@ = -- | Removes a user from the blacklist UnblockUser { -- | User identifier- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getBlockedUsers@@ -1985,7 +2052,7 @@ { -- | The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored contact :: Contact, -- | True, if the new contact needs to be allowed to see current user's phone number. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field UserFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number- share_phone_number :: Bool+ sharePhoneNumber :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function importContacts@@ -2018,7 +2085,7 @@ = -- | Removes users from the contact list RemoveContacts { -- | Identifiers of users to be deleted- user_ids :: [I32]+ userIds :: [I32] } deriving (Show, Eq, Generic) -- | Parameter of Function getImportedContactCount@@ -2047,7 +2114,7 @@ = -- | Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber SharePhoneNumber { -- | Identifier of the user with whom to share the phone number. The user must be a mutual contact- user_id :: I32+ userId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getUserProfilePhotos@@ -2055,7 +2122,7 @@ = -- | Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already GetUserProfilePhotos { -- | User identifier - user_id :: I32,+ userId :: I32, -- | The number of photos to skip; must be non-negative offset :: I32, -- | The maximum number of photos to be returned; up to 100@@ -2087,7 +2154,7 @@ = -- | Returns a list of installed sticker sets GetInstalledStickerSets { -- | Pass true to return mask sticker sets; pass false to return ordinary sticker sets- is_masks :: Bool+ isMasks :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getArchivedStickerSets@@ -2095,9 +2162,9 @@ = -- | Returns a list of archived sticker sets GetArchivedStickerSets { -- | Pass true to return mask stickers sets; pass false to return ordinary sticker sets - is_masks :: Bool,+ isMasks :: Bool, -- | Identifier of the sticker set from which to return the result - offset_sticker_set_id :: I64,+ offsetStickerSetId :: I64, -- | The maximum number of sticker sets to return limit :: I32 }@@ -2117,7 +2184,7 @@ = -- | Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets GetAttachedStickerSets { -- | File identifier- file_id :: I32+ fileId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getStickerSet@@ -2125,7 +2192,7 @@ = -- | Returns information about a sticker set by its identifier GetStickerSet { -- | Identifier of the sticker set- set_id :: I64+ setId :: I64 } deriving (Show, Eq, Generic) -- | Parameter of Function searchStickerSet@@ -2141,7 +2208,7 @@ = -- | Searches for installed sticker sets by looking for specified query in their title and name SearchInstalledStickerSets { -- | Pass true to return mask sticker sets; pass false to return ordinary sticker sets - is_masks :: Bool,+ isMasks :: Bool, -- | Query to search for query :: T, -- | The maximum number of sticker sets to return@@ -2161,11 +2228,11 @@ = -- | Installs/uninstalls or activates/archives a sticker set ChangeStickerSet { -- | Identifier of the sticker set - set_id :: I64,+ setId :: I64, -- | The new value of is_installed - is_installed :: Bool,+ isInstalled :: Bool, -- | The new value of is_archived. A sticker set can't be installed and archived simultaneously- is_archived :: Bool+ isArchived :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function viewTrendingStickerSets@@ -2173,7 +2240,7 @@ = -- | Informs the server that some trending sticker sets have been viewed by the user ViewTrendingStickerSets { -- | Identifiers of viewed trending sticker sets- sticker_set_ids :: [I64]+ stickerSetIds :: [I64] } deriving (Show, Eq, Generic) -- | Parameter of Function reorderInstalledStickerSets@@ -2181,9 +2248,9 @@ = -- | Changes the order of installed sticker sets ReorderInstalledStickerSets { -- | Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets - is_masks :: Bool,+ isMasks :: Bool, -- | Identifiers of installed sticker sets in the new correct order- sticker_set_ids :: [I64]+ stickerSetIds :: [I64] } deriving (Show, Eq, Generic) -- | Parameter of Function getRecentStickers@@ -2191,7 +2258,7 @@ = -- | Returns a list of recently used stickers GetRecentStickers { -- | Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers- is_attached :: Bool+ isAttached :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function addRecentSticker@@ -2199,7 +2266,7 @@ = -- | Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list AddRecentSticker { -- | Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers - is_attached :: Bool,+ isAttached :: Bool, -- | Sticker file to add sticker :: InputFile }@@ -2209,7 +2276,7 @@ = -- | Removes a sticker from the list of recently used stickers RemoveRecentSticker { -- | Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers - is_attached :: Bool,+ isAttached :: Bool, -- | Sticker file to delete sticker :: InputFile }@@ -2219,7 +2286,7 @@ = -- | Clears the list of recently used stickers ClearRecentStickers { -- | Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers- is_attached :: Bool+ isAttached :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getFavoriteStickers@@ -2260,9 +2327,9 @@ { -- | Text to search for text :: T, -- | True, if only emojis, which exactly match text needs to be returned - exact_match :: Bool,+ exactMatch :: Bool, -- | List of possible IETF language tags of the user's input language; may be empty if unknown- input_language_codes :: [T]+ inputLanguageCodes :: [T] } deriving (Show, Eq, Generic) -- | Parameter of Function getEmojiSuggestionsUrl@@ -2270,7 +2337,7 @@ = -- | Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation GetEmojiSuggestionsUrl { -- | Language code for which the emoji replacements will be suggested- language_code :: T+ languageCode :: T } deriving (Show, Eq, Generic) -- | Parameter of Function getSavedAnimations@@ -2336,7 +2403,7 @@ { -- | The web page URL url :: T, -- | If true, the full instant view for the web page will be returned- force_full :: Bool+ forceFull :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function setProfilePhoto@@ -2352,7 +2419,7 @@ = -- | Deletes a profile photo. If something changes, updateUser will be sent DeleteProfilePhoto { -- | Identifier of the profile photo to delete- profile_photo_id :: I64+ profilePhotoId :: I64 } deriving (Show, Eq, Generic) -- | Parameter of Function setName@@ -2360,9 +2427,9 @@ = -- | Changes the first and last name of the current user. If something changes, updateUser will be sent SetName { -- | The new value of the first name for the user; 1-64 characters - first_name :: T,+ firstName :: T, -- | The new value of the optional last name for the user; 0-64 characters- last_name :: T+ lastName :: T } deriving (Show, Eq, Generic) -- | Parameter of Function setBio@@ -2394,7 +2461,7 @@ = -- | Changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code ChangePhoneNumber { -- | The new phone number of the user in international format - phone_number :: T,+ phoneNumber :: T, -- | Settings for the authentication of the user's phone number settings :: PhoneNumberAuthenticationSettings }@@ -2434,7 +2501,7 @@ = -- | Terminates a session of the current user TerminateSession { -- | Session identifier- session_id :: I64+ sessionId :: I64 } deriving (Show, Eq, Generic) -- | Parameter of Function terminateAllOtherSessions@@ -2456,7 +2523,7 @@ = -- | Disconnects website from the current user's Telegram account DisconnectWebsite { -- | Website identifier- website_id :: I64+ websiteId :: I64 } deriving (Show, Eq, Generic) -- | Parameter of Function disconnectAllWebsites@@ -2471,7 +2538,7 @@ = -- | Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel SetSupergroupUsername { -- | Identifier of the supergroup or channel - supergroup_id :: I32,+ supergroupId :: I32, -- | New value of the username. Use an empty string to remove the username username :: T }@@ -2481,9 +2548,9 @@ = -- | Changes the sticker set of a supergroup; requires can_change_info rights SetSupergroupStickerSet { -- | Identifier of the supergroup - supergroup_id :: I32,+ supergroupId :: I32, -- | New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set- sticker_set_id :: I64+ stickerSetId :: I64 } deriving (Show, Eq, Generic) -- | Parameter of Function toggleSupergroupSignMessages@@ -2491,9 +2558,9 @@ = -- | Toggles sender signatures messages sent in a channel; requires can_change_info rights ToggleSupergroupSignMessages { -- | Identifier of the channel - supergroup_id :: I32,+ supergroupId :: I32, -- | New value of sign_messages- sign_messages :: Bool+ signMessages :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function toggleSupergroupIsAllHistoryAvailable@@ -2501,9 +2568,9 @@ = -- | Toggles whether the message history of a supergroup is available to new members; requires can_change_info rights ToggleSupergroupIsAllHistoryAvailable { -- | The identifier of the supergroup - supergroup_id :: I32,+ supergroupId :: I32, -- | The new value of is_all_history_available- is_all_history_available :: Bool+ isAllHistoryAvailable :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function reportSupergroupSpam@@ -2511,11 +2578,11 @@ = -- | Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup ReportSupergroupSpam { -- | Supergroup identifier - supergroup_id :: I32,+ supergroupId :: I32, -- | User identifier - user_id :: I32,+ userId :: I32, -- | Identifiers of messages sent in the supergroup by the user. This list must be non-empty- message_ids :: [I53]+ messageIds :: [I53] } deriving (Show, Eq, Generic) -- | Parameter of Function getSupergroupMembers@@ -2523,7 +2590,7 @@ = -- | Returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters GetSupergroupMembers { -- | Identifier of the supergroup or channel- supergroup_id :: I32,+ supergroupId :: I32, -- | The type of users to return. By default, supergroupMembersRecent filter :: SupergroupMembersFilter, -- | Number of users to skip @@ -2537,7 +2604,7 @@ = -- | Deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can't be deleted using this method DeleteSupergroup { -- | Identifier of the supergroup or channel- supergroup_id :: I32+ supergroupId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function closeSecretChat@@ -2545,7 +2612,7 @@ = -- | Closes a secret chat, effectively transferring its state to secretChatStateClosed CloseSecretChat { -- | Secret chat identifier- secret_chat_id :: I32+ secretChatId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getChatEventLog@@ -2553,17 +2620,17 @@ = -- | Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id) GetChatEventLog { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Search query by which to filter events query :: T, -- | Identifier of an event from which to return results. Use 0 to get results from the latest events - from_event_id :: I64,+ fromEventId :: I64, -- | The maximum number of events to return; up to 100 limit :: I32, -- | The types of events to return. By default, all types will be returned filters :: ChatEventLogFilters, -- | User identifiers by which to filter events. By default, events relating to all users will be returned- user_ids :: [I32]+ userIds :: [I32] } deriving (Show, Eq, Generic) -- | Parameter of Function getPaymentForm@@ -2571,9 +2638,9 @@ = -- | Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy GetPaymentForm { -- | Chat identifier of the Invoice message - chat_id :: I53,+ chatId :: I53, -- | Message identifier- message_id :: I53+ messageId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function validateOrderInfo@@ -2581,13 +2648,13 @@ = -- | Validates the order information provided by a user and returns the available shipping options for a flexible invoice ValidateOrderInfo { -- | Chat identifier of the Invoice message - chat_id :: I53,+ chatId :: I53, -- | Message identifier - message_id :: I53,+ messageId :: I53, -- | The order information, provided by the user - order_info :: OrderInfo,+ orderInfo :: OrderInfo, -- | True, if the order information can be saved- allow_save :: Bool+ allowSave :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function sendPaymentForm@@ -2595,13 +2662,13 @@ = -- | Sends a filled-out payment form to the bot for final verification SendPaymentForm { -- | Chat identifier of the Invoice message - chat_id :: I53,+ chatId :: I53, -- | Message identifier - message_id :: I53,+ messageId :: I53, -- | Identifier returned by ValidateOrderInfo, or an empty string - order_info_id :: T,+ orderInfoId :: T, -- | Identifier of a chosen shipping option, if applicable- shipping_option_id :: T,+ shippingOptionId :: T, -- | The credentials chosen by user for payment credentials :: InputCredentials }@@ -2611,9 +2678,9 @@ = -- | Returns information about a successful payment GetPaymentReceipt { -- | Chat identifier of the PaymentSuccessful message - chat_id :: I53,+ chatId :: I53, -- | Message identifier- message_id :: I53+ messageId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function getSavedOrderInfo@@ -2649,7 +2716,7 @@ = -- | Returns backgrounds installed by the user GetBackgrounds { -- | True, if the backgrounds needs to be ordered for dark theme- for_dark_theme :: Bool+ forDarkTheme :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getBackgroundUrl@@ -2679,7 +2746,7 @@ -- | Background type; null for default background. The method will return error 404 if type is null type_ :: BackgroundType, -- | True, if the background is chosen for dark theme- for_dark_theme :: Bool+ forDarkTheme :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function removeBackground@@ -2687,7 +2754,7 @@ = -- | Removes background from the list of installed backgrounds RemoveBackground { -- | The background identifier- background_id :: I64+ backgroundId :: I64 } deriving (Show, Eq, Generic) -- | Parameter of Function resetBackgrounds@@ -2702,7 +2769,7 @@ = -- | Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization GetLocalizationTargetInfo { -- | If true, returns only locally available information without sending network requests- only_local :: Bool+ onlyLocal :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getLanguagePackInfo@@ -2710,7 +2777,7 @@ = -- | Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization GetLanguagePackInfo { -- | Language pack identifier- language_pack_id :: T+ languagePackId :: T } deriving (Show, Eq, Generic) -- | Parameter of Function getLanguagePackStrings@@ -2718,7 +2785,7 @@ = -- | Returns strings from a language pack in the current localization target by their keys. Can be called before authorization GetLanguagePackStrings { -- | Language pack identifier of the strings to be returned - language_pack_id :: T,+ languagePackId :: T, -- | Language pack keys of the strings to be returned; leave empty to request all available strings keys :: [T] }@@ -2728,7 +2795,7 @@ = -- | Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization SynchronizeLanguagePack { -- | Language pack identifier- language_pack_id :: T+ languagePackId :: T } deriving (Show, Eq, Generic) -- | Parameter of Function addCustomServerLanguagePack@@ -2736,7 +2803,7 @@ = -- | Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization AddCustomServerLanguagePack { -- | Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link- language_pack_id :: T+ languagePackId :: T } deriving (Show, Eq, Generic) -- | Parameter of Function setCustomLanguagePack@@ -2762,9 +2829,9 @@ = -- | Adds, edits or deletes a string in a custom local language pack. Can be called before authorization SetCustomLanguagePackString { -- | Identifier of a previously added custom local language pack in the current localization target - language_pack_id :: T,+ languagePackId :: T, -- | New language pack string- new_string :: LanguagePackString+ newString :: LanguagePackString } deriving (Show, Eq, Generic) -- | Parameter of Function deleteLanguagePack@@ -2772,7 +2839,7 @@ = -- | Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization DeleteLanguagePack { -- | Identifier of the language pack to delete- language_pack_id :: T+ languagePackId :: T } deriving (Show, Eq, Generic) -- | Parameter of Function registerDevice@@ -2780,9 +2847,9 @@ = -- | Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription RegisterDevice { -- | Device token - device_token :: DeviceToken,+ deviceToken :: DeviceToken, -- | List of user identifiers of other users currently using the client- other_user_ids :: [I32]+ otherUserIds :: [I32] } deriving (Show, Eq, Generic) -- | Parameter of Function processPushNotification@@ -2873,7 +2940,7 @@ = -- | Removes a chat action bar without any other action RemoveChatActionBar { -- | Chat identifier- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function reportChat@@ -2881,11 +2948,11 @@ = -- | Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chats with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators ReportChat { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | The reason for reporting the chat reason :: ChatReportReason, -- | Identifiers of reported messages, if any- message_ids :: [I53]+ messageIds :: [I53] } deriving (Show, Eq, Generic) -- | Parameter of Function getChatStatisticsUrl@@ -2893,11 +2960,11 @@ = -- | Returns an HTTP URL with the chat statistics. Currently this method of getting the statistics is disabled and can be deleted in the future GetChatStatisticsUrl { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Parameters from "tg://statsrefresh?params=******" link parameters :: T, -- | Pass true if a URL with the dark theme must be returned- is_dark :: Bool+ isDark :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getChatStatistics@@ -2905,9 +2972,9 @@ = -- | Returns detailed statistics about a chat. Currently this method can be used only for channels. Requires administrator rights in the channel GetChatStatistics { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | Pass true if a dark theme is used by the app- is_dark :: Bool+ isDark :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function getChatStatisticsGraph@@ -2915,7 +2982,7 @@ = -- | Loads asynchronous or zoomed in chat statistics graph GetChatStatisticsGraph { -- | Chat identifier - chat_id :: I53,+ chatId :: I53, -- | The token for graph loading token :: T, -- | X-value for zoomed in graph or 0 otherwise@@ -2927,7 +2994,7 @@ = -- | Returns storage usage statistics. Can be called before authorization GetStorageStatistics { -- | The maximum number of chats with the largest storage usage for which separate statistics should be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0- chat_limit :: I32+ chatLimit :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getStorageStatisticsFast@@ -2955,17 +3022,17 @@ -- | Limit on the total count of files after deletion. Pass -1 to use the default limit count :: I32, -- | The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value- immunity_delay :: I32,+ immunityDelay :: I32, -- | If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted- file_types :: [FileType],+ fileTypes :: [FileType], -- | If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos)- chat_ids :: [I53],+ chatIds :: [I53], -- | If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos)- exclude_chat_ids :: [I53],+ excludeChatIds :: [I53], -- | Pass true if deleted file statistics needs to be returned instead of the whole storage usage statistics. Affects only returned statistics- return_deleted_file_statistics :: Bool,+ returnDeletedFileStatistics :: Bool, -- | Same as in getStorageStatistics. Affects only returned statistics- chat_limit :: I32+ chatLimit :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function setNetworkType@@ -2980,7 +3047,7 @@ = -- | Returns network data usage statistics. Can be called before authorization GetNetworkStatistics { -- | If true, returns only data for the current library launch- only_current :: Bool+ onlyCurrent :: Bool } deriving (Show, Eq, Generic) -- | Parameter of Function addNetworkStatistics@@ -3020,7 +3087,7 @@ = -- | Returns information about a bank card GetBankCardInfo { -- | The bank card number- bank_card_number :: T+ bankCardNumber :: T } deriving (Show, Eq, Generic) -- | Parameter of Function getPassportElement@@ -3064,7 +3131,7 @@ = -- | Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed SetPassportElementErrors { -- | User identifier - user_id :: I32,+ userId :: I32, -- | The errors errors :: [InputPassportElementError] }@@ -3074,7 +3141,7 @@ = -- | Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown GetPreferredCountryLanguage { -- | A two-letter ISO 3166-1 alpha-2 country code- country_code :: T+ countryCode :: T } deriving (Show, Eq, Generic) -- | Parameter of Function sendPhoneNumberVerificationCode@@ -3082,7 +3149,7 @@ = -- | Sends a code to verify a phone number to be added to a user's Telegram Passport SendPhoneNumberVerificationCode { -- | The phone number of the user, in international format - phone_number :: T,+ phoneNumber :: T, -- | Settings for the authentication of the user's phone number settings :: PhoneNumberAuthenticationSettings }@@ -3107,7 +3174,7 @@ = -- | Sends a code to verify an email address to be added to a user's Telegram Passport SendEmailAddressVerificationCode { -- | Email address- email_address :: T+ emailAddress :: T } deriving (Show, Eq, Generic) -- | Parameter of Function resendEmailAddressVerificationCode@@ -3130,11 +3197,11 @@ = -- | Returns a Telegram Passport authorization form for sharing data with a service GetPassportAuthorizationForm { -- | User identifier of the service's bot - bot_user_id :: I32,+ botUserId :: I32, -- | Telegram Passport element types requested by the service scope :: T, -- | Service's public_key - public_key :: T,+ publicKey :: T, -- | Authorization form nonce provided by the service nonce :: T }@@ -3144,7 +3211,7 @@ = -- | Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form GetPassportAuthorizationFormAvailableElements { -- | Authorization form identifier - autorization_form_id :: I32,+ autorizationFormId :: I32, -- | Password of the current user password :: T }@@ -3154,7 +3221,7 @@ = -- | Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements need to be used SendPassportAuthorizationForm { -- | Authorization form identifier - autorization_form_id :: I32,+ autorizationFormId :: I32, -- | Types of Telegram Passport elements chosen by user to complete the authorization form types :: [PassportElementType] }@@ -3166,7 +3233,7 @@ { -- | Value of the "hash" parameter from the link hash :: T, -- | Value of the "phone" parameter from the link - phone_number :: T,+ phoneNumber :: T, -- | Settings for the authentication of the user's phone number settings :: PhoneNumberAuthenticationSettings }@@ -3191,9 +3258,9 @@ = -- | Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only SetBotUpdatesStatus { -- | The number of pending updates - pending_update_count :: I32,+ pendingUpdateCount :: I32, -- | The last error message- error_message :: T+ errorMessage :: T } deriving (Show, Eq, Generic) -- | Parameter of Function uploadStickerFile@@ -3201,9 +3268,9 @@ = -- | Uploads a PNG image with a sticker; for bots only; returns the uploaded file UploadStickerFile { -- | Sticker file owner - user_id :: I32,+ userId :: I32, -- | PNG image with the sticker; must be up to 512 KB in size and fit in 512x512 square- png_sticker :: InputFile+ pngSticker :: InputFile } deriving (Show, Eq, Generic) -- | Parameter of Function createNewStickerSet@@ -3211,13 +3278,13 @@ = -- | Creates a new sticker set; for bots only. Returns the newly created sticker set CreateNewStickerSet { -- | Sticker set owner- user_id :: I32,+ userId :: I32, -- | Sticker set title; 1-64 characters title :: T, -- | Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive); 1-64 characters name :: T, -- | True, if stickers are masks. Animated stickers can't be masks- is_masks :: Bool,+ isMasks :: Bool, -- | List of stickers to be added to the set; must be non-empty. All stickers must be of the same type stickers :: [InputSticker] }@@ -3227,7 +3294,7 @@ = -- | Adds a new sticker to a set; for bots only. Returns the sticker set AddStickerToSet { -- | Sticker set owner - user_id :: I32,+ userId :: I32, -- | Sticker set name name :: T, -- | Sticker to add to the set@@ -3239,7 +3306,7 @@ = -- | Sets a sticker set thumbnail; for bots only. Returns the sticker set SetStickerSetThumbnail { -- | Sticker set owner - user_id :: I32,+ userId :: I32, -- | Sticker set name name :: T, -- | Thumbnail to set in PNG or TGS format. Animated thumbnail must be set for animated sticker sets and only for them. You can use a zero InputFileId to delete the thumbnail@@ -3279,7 +3346,7 @@ -- | Map scale; 1-3 scale :: I32, -- | Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown- chat_id :: I53+ chatId :: I53 } deriving (Show, Eq, Generic) -- | Parameter of Function acceptTermsOfService@@ -3287,7 +3354,7 @@ = -- | Accepts Telegram terms of services AcceptTermsOfService { -- | Terms of service identifier- terms_of_service_id :: T+ termsOfServiceId :: T } deriving (Show, Eq, Generic) -- | Parameter of Function sendCustomRequest@@ -3305,7 +3372,7 @@ = -- | Answers a custom query; for bots only AnswerCustomQuery { -- | Identifier of a custom query - custom_query_id :: I64,+ customQueryId :: I64, -- | JSON-serialized answer to the query data_ :: T }@@ -3320,7 +3387,7 @@ deriving (Show, Eq, Generic) -- | Parameter of Function getCountryCode data GetCountryCode- = -- | Uses current user IP address to found their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization+ = -- | Uses current user IP address to find their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization GetCountryCode { }@@ -3354,7 +3421,7 @@ { -- | Event type type_ :: T, -- | Optional chat identifier, associated with the event - chat_id :: I53,+ chatId :: I53, -- | The log event data data_ :: JsonValue }@@ -3378,7 +3445,7 @@ = -- | Edits an existing proxy server for network requests. Can be called before authorization EditProxy { -- | Proxy identifier - proxy_id :: I32,+ proxyId :: I32, -- | Proxy server IP address server :: T, -- | Proxy server port @@ -3394,7 +3461,7 @@ = -- | Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization EnableProxy { -- | Proxy identifier- proxy_id :: I32+ proxyId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function disableProxy@@ -3409,7 +3476,7 @@ = -- | Removes a proxy server. Can be called before authorization RemoveProxy { -- | Proxy identifier- proxy_id :: I32+ proxyId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getProxies@@ -3424,7 +3491,7 @@ = -- | Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization GetProxyLink { -- | Proxy identifier- proxy_id :: I32+ proxyId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function pingProxy@@ -3432,7 +3499,7 @@ = -- | Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization PingProxy { -- | Proxy identifier. Use 0 to ping a Telegram server without a proxy- proxy_id :: I32+ proxyId :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function setLogStream@@ -3440,7 +3507,7 @@ = -- | Sets new log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously SetLogStream { -- | New log stream- log_stream :: LogStream+ logStream :: LogStream } deriving (Show, Eq, Generic) -- | Parameter of Function getLogStream@@ -3455,7 +3522,7 @@ = -- | Sets the verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously SetLogVerbosityLevel { -- | New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging- new_verbosity_level :: I32+ newVerbosityLevel :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getLogVerbosityLevel@@ -3479,7 +3546,7 @@ { -- | Logging tag to change verbosity level tag :: T, -- | New verbosity level; 1-1024- new_verbosity_level :: I32+ newVerbosityLevel :: I32 } deriving (Show, Eq, Generic) -- | Parameter of Function getLogTagVerbosityLevel@@ -3495,7 +3562,7 @@ = -- | Adds a message to TDLib internal log. This is an offline method. Can be called before authorization. Can be called synchronously AddLogMessage { -- | The minimum verbosity level needed for the message to be logged, 0-1023 - verbosity_level :: I32,+ verbosityLevel :: I32, -- | Text of a message to log text :: T }@@ -3581,7 +3648,7 @@ -- | Proxy type type_ :: ProxyType, -- | Identifier of a datacenter, with which to test connection - dc_id :: I32,+ dcId :: I32, -- | The maximum overall timeout for the request timeout :: Double }
src/TDLib/Generated/Functions.hs view
@@ -52,7 +52,7 @@ T -> Sem r (Error ∪ Ok) checkAuthenticationCode _1 = runCmd $ CheckAuthenticationCode _1--- | Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber +-- | Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, requestQrCodeAuthentication :: Member TDLib r => -- | List of user identifiers of other users currently using the client@@ -320,7 +320,7 @@ FileType -> Sem r (Error ∪ File) getRemoteFile _1 _2 = runCmd $ GetRemoteFile _1 _2--- | Returns an ordered list of chats in a chat list. Chats are sorted by the pair (order, chat_id) in decreasing order. (For example, to get a list of chats from the beginning, the offset_order should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1).+-- | Returns an ordered list of chats in a chat list. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. (For example, to get a list of chats from the beginning, the offset_order should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). getChats :: Member TDLib r => -- | The chat list in which to return chats@@ -347,7 +347,7 @@ T -> Sem r (Error ∪ Chats) searchPublicChats _1 = runCmd $ SearchPublicChats _1--- | Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the chat list +-- | Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list searchChats :: Member TDLib r => -- | Query to search for. If the query is empty, returns up to 20 recently found chats @@ -356,7 +356,7 @@ I32 -> Sem r (Error ∪ Chats) searchChats _1 _2 = runCmd $ SearchChats _1 _2--- | Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the chat list +-- | Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list searchChatsOnServer :: Member TDLib r => -- | Query to search for @@ -785,7 +785,7 @@ -- | The new message reply markup; for bots only ReplyMarkup -> -- | New location content of the message; may be null. Pass null to stop sharing the live location- Location ->+ (Maybe) (Location) -> Sem r (Error ∪ Message) editMessageLiveLocation _1 _2 _3 _4 = runCmd $ EditMessageLiveLocation _1 _2 _3 _4 -- | Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side@@ -844,7 +844,7 @@ -- | The new message reply markup ReplyMarkup -> -- | New location content of the message; may be null. Pass null to stop sharing the live location- Location ->+ (Maybe) (Location) -> Sem r (Error ∪ Ok) editInlineMessageLiveLocation _1 _2 _3 = runCmd $ EditInlineMessageLiveLocation _1 _2 _3 -- | Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only @@ -1289,15 +1289,71 @@ I53 -> Sem r (Error ∪ Chat) upgradeBasicGroupChatToSupergroupChat _1 = runCmd $ UpgradeBasicGroupChatToSupergroupChat _1--- | Moves a chat to a different chat list. Current chat list of the chat must ne non-null -setChatChatList ::+-- | Returns chat lists to which the chat can be added. This is an offline request +getChatListsToAddChat :: Member TDLib r =>+ -- | Chat identifier+ I53 ->+ Sem r (Error ∪ ChatLists)+getChatListsToAddChat _1 = runCmd $ GetChatListsToAddChat _1+-- | Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed+addChatToList ::+ Member TDLib r => -- | Chat identifier I53 ->- -- | New chat list of the chat. The chat with the current user (Saved Messages) and the chat 777000 (Telegram) can't be moved to the Archive chat list+ -- | The chat list. Use getChatListsToAddChat to get suitable chat lists ChatList -> Sem r (Error ∪ Ok)-setChatChatList _1 _2 = runCmd $ SetChatChatList _1 _2+addChatToList _1 _2 = runCmd $ AddChatToList _1 _2+-- | Returns information about a chat filter by its identifier +getChatFilter ::+ Member TDLib r =>+ -- | Chat filter identifier+ I32 ->+ Sem r (Error ∪ ChatFilter)+getChatFilter _1 = runCmd $ GetChatFilter _1+-- | Creates new chat filter. Returns information about the created chat filter +createChatFilter ::+ Member TDLib r =>+ -- | Chat filter+ ChatFilter ->+ Sem r (Error ∪ ChatFilterInfo)+createChatFilter _1 = runCmd $ CreateChatFilter _1+-- | Edits existing chat filter. Returns information about the edited chat filter +editChatFilter ::+ Member TDLib r =>+ -- | Chat filter identifier + I32 ->+ -- | The edited chat filter+ ChatFilter ->+ Sem r (Error ∪ ChatFilterInfo)+editChatFilter _1 _2 = runCmd $ EditChatFilter _1 _2+-- | Deletes existing chat filter +deleteChatFilter ::+ Member TDLib r =>+ -- | Chat filter identifier+ I32 ->+ Sem r (Error ∪ Ok)+deleteChatFilter _1 = runCmd $ DeleteChatFilter _1+-- | Changes the order of chat filters +reorderChatFilters ::+ Member TDLib r =>+ -- | Identifiers of chat filters in the new correct order+ [I32] ->+ Sem r (Error ∪ Ok)+reorderChatFilters _1 = runCmd $ ReorderChatFilters _1+-- | Returns recommended chat filters for the current user+getRecommendedChatFilters ::+ Member TDLib r =>+ Sem r (Error ∪ RecommendedChatFilters)+getRecommendedChatFilters = runCmd $ GetRecommendedChatFilters +-- | Returns default icon name for a filter. This is an offline method. Can be called before authorization. Can be called synchronously +getChatFilterDefaultIconName ::+ Member TDLib r =>+ -- | Chat filter+ ChatFilter ->+ Sem r (Error ∪ Text)+getChatFilterDefaultIconName _1 = runCmd $ GetChatFilterDefaultIconName _1 -- | Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info rights. The title will not be changed until the request to the server has been completed setChatTitle :: Member TDLib r =>@@ -1331,7 +1387,7 @@ -- | Chat identifier I53 -> -- | New draft message; may be null- DraftMessage ->+ (Maybe) (DraftMessage) -> Sem r (Error ∪ Ok) setChatDraftMessage _1 _2 = runCmd $ SetChatDraftMessage _1 _2 -- | Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed@@ -1343,15 +1399,6 @@ ChatNotificationSettings -> Sem r (Error ∪ Ok) setChatNotificationSettings _1 _2 = runCmd $ SetChatNotificationSettings _1 _2--- | Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/archive chat list -toggleChatIsPinned ::- Member TDLib r =>- -- | Chat identifier - I53 ->- -- | New value of is_pinned- Bool ->- Sem r (Error ∪ Ok)-toggleChatIsPinned _1 _2 = runCmd $ ToggleChatIsPinned _1 _2 -- | Changes the marked as unread state of a chat toggleChatIsMarkedAsUnread :: Member TDLib r =>@@ -1560,6 +1607,17 @@ Member TDLib r => Sem r (Error ∪ Ok) resetAllNotificationSettings = runCmd $ ResetAllNotificationSettings +-- | Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/arhive chat list+toggleChatIsPinned ::+ Member TDLib r =>+ -- | Chat list in which to change the pinned state of the chat + ChatList ->+ -- | Chat identifier + I53 ->+ -- | True, if the chat is pinned+ Bool ->+ Sem r (Error ∪ Ok)+toggleChatIsPinned _1 _2 _3 = runCmd $ ToggleChatIsPinned _1 _2 _3 -- | Changes the order of pinned chats setPinnedChats :: Member TDLib r =>@@ -2936,7 +2994,7 @@ Double -> Sem r (Error ∪ Ok) setAlarm _1 = runCmd $ SetAlarm _1--- | Uses current user IP address to found their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization+-- | Uses current user IP address to find their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization getCountryCode :: Member TDLib r => Sem r (Error ∪ Text)
src/TDLib/Generated/Types.hs view
@@ -37,6351 +37,6459 @@ = -- | Contains parameters for TDLib initialization TdlibParameters { -- | If set to true, the Telegram test environment will be used instead of the production environment- use_test_dc :: Bool,- -- | The path to the directory for the persistent database; if empty, the current working directory will be used- database_directory :: T,- -- | The path to the directory for storing files; if empty, database_directory will be used- files_directory :: T,- -- | If set to true, information about downloaded and uploaded files will be saved between application restarts- use_file_database :: Bool,- -- | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database- use_chat_info_database :: Bool,- -- | If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database- use_message_database :: Bool,- -- | If set to true, support for secret chats will be enabled- use_secret_chats :: Bool,- -- | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org- api_id :: I32,- -- | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org- api_hash :: T,- -- | IETF language tag of the user's operating system language; must be non-empty- system_language_code :: T,- -- | Model of the device the application is being run on; must be non-empty- device_model :: T,- -- | Version of the operating system the application is being run on; must be non-empty- system_version :: T,- -- | Application version; must be non-empty- application_version :: T,- -- | If set to true, old files will automatically be deleted- enable_storage_optimizer :: Bool,- -- | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name- ignore_file_names :: Bool- }- deriving (Show, Eq, Generic)--- | Provides information about the method by which an authentication code is delivered to the user-data AuthenticationCodeType- = -- | An authentication code is delivered via a private Telegram message, which can be viewed in another client - AuthenticationCodeTypeTelegramMessage- { -- | Length of the code- length :: I32- }- | -- | An authentication code is delivered via an SMS message to the specified phone number - AuthenticationCodeTypeSms- { -- | Length of the code- length :: I32- }- | -- | An authentication code is delivered via a phone call to the specified phone number - AuthenticationCodeTypeCall- { -- | Length of the code- length :: I32- }- | -- | An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code - AuthenticationCodeTypeFlashCall- { -- | Pattern of the phone number from which the call will be made- pattern_ :: T- }- deriving (Show, Eq, Generic)-data AuthenticationCodeInfo- = -- | Information about the authentication code that was sent - AuthenticationCodeInfo- { -- | A phone number that is being authenticated - phone_number :: T,- -- | Describes the way the code was sent to the user - type_ :: AuthenticationCodeType,- -- | Describes the way the next code will be sent to the user; may be null - next_type :: AuthenticationCodeType,- -- | Timeout before the code should be re-sent, in seconds- timeout :: I32- }- deriving (Show, Eq, Generic)-data EmailAddressAuthenticationCodeInfo- = -- | Information about the email address authentication code that was sent - EmailAddressAuthenticationCodeInfo- { -- | Pattern of the email address to which an authentication code was sent - email_address_pattern :: T,- -- | Length of the code; 0 if unknown- length :: I32- }- deriving (Show, Eq, Generic)-data TextEntity- = -- | Represents a part of the text that needs to be formatted in some unusual way - TextEntity- { -- | Offset of the entity in UTF-16 code units - offset :: I32,- -- | Length of the entity, in UTF-16 code units - length :: I32,- -- | Type of the entity- type_ :: TextEntityType- }- deriving (Show, Eq, Generic)-data TextEntities- = -- | Contains a list of text entities - TextEntities- { -- | List of text entities- entities :: [TextEntity]- }- deriving (Show, Eq, Generic)-data FormattedText- = -- | A text with some entities - FormattedText- { -- | The text - text :: T,- -- | Entities contained in the text. Entities can be nested, but must not mutually intersect with each other.- entities :: [TextEntity]- }- deriving (Show, Eq, Generic)-data TermsOfService- = -- | Contains Telegram terms of service - TermsOfService- { -- | Text of the terms of service - text :: FormattedText,- -- | The minimum age of a user to be able to accept the terms; 0 if any - min_user_age :: I32,- -- | True, if a blocking popup with terms of service must be shown to the user- show_popup :: Bool- }- deriving (Show, Eq, Generic)--- | Represents the current authorization state of the client-data AuthorizationState- = -- | TDLib needs TdlibParameters for initialization- AuthorizationStateWaitTdlibParameters- { - }- | -- | TDLib needs an encryption key to decrypt the local database - AuthorizationStateWaitEncryptionKey- { -- | True, if the database is currently encrypted- is_encrypted :: Bool- }- | -- | TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options- AuthorizationStateWaitPhoneNumber- { - }- | -- | TDLib needs the user's authentication code to authorize - AuthorizationStateWaitCode- { -- | Information about the authorization code that was sent- code_info :: AuthenticationCodeInfo- }- | -- | The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link - AuthorizationStateWaitOtherDeviceConfirmation- { -- | A tg:// URL for the QR code. The link will be updated frequently- link :: T- }- | -- | The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration - AuthorizationStateWaitRegistration- { -- | Telegram terms of service- terms_of_service :: TermsOfService- }- | -- | The user has been authorized, but needs to enter a password to start using the application - AuthorizationStateWaitPassword- { -- | Hint for the password; may be empty - password_hint :: T,- -- | True, if a recovery email address has been set up- has_recovery_email_address :: Bool,- -- | Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent- recovery_email_address_pattern :: T- }- | -- | The user has been successfully authorized. TDLib is now ready to answer queries- AuthorizationStateReady- { - }- | -- | The user is currently logging out- AuthorizationStateLoggingOut- { - }- | -- | TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received- AuthorizationStateClosing- { - }- | -- | TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to- AuthorizationStateClosed- { - }- deriving (Show, Eq, Generic)-data PasswordState- = -- | Represents the current state of 2-step verification - PasswordState- { -- | True, if a 2-step verification password is set - has_password :: Bool,- -- | Hint for the password; may be empty- password_hint :: T,- -- | True, if a recovery email is set - has_recovery_email_address :: Bool,- -- | True, if some Telegram Passport elements were saved- has_passport_data :: Bool,- -- | Information about the recovery email address to which the confirmation email was sent; may be null- recovery_email_address_code_info :: EmailAddressAuthenticationCodeInfo- }- deriving (Show, Eq, Generic)-data RecoveryEmailAddress- = -- | Contains information about the current recovery email address - RecoveryEmailAddress- { -- | Recovery email address- recovery_email_address :: T- }- deriving (Show, Eq, Generic)-data TemporaryPasswordState- = -- | Returns information about the availability of a temporary password, which can be used for payments - TemporaryPasswordState- { -- | True, if a temporary password is available - has_password :: Bool,- -- | Time left before the temporary password expires, in seconds- valid_for :: I32- }- deriving (Show, Eq, Generic)-data LocalFile- = -- | Represents a local file- LocalFile- { -- | Local path to the locally available file part; may be empty- path :: T,- -- | True, if it is possible to try to download or generate the file- can_be_downloaded :: Bool,- -- | True, if the file can be deleted- can_be_deleted :: Bool,- -- | True, if the file is currently being downloaded (or a local copy is being generated by some other means)- is_downloading_active :: Bool,- -- | True, if the local copy is fully available- is_downloading_completed :: Bool,- -- | Download will be started from this offset. downloaded_prefix_size is calculated from this offset- download_offset :: I32,- -- | If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix- downloaded_prefix_size :: I32,- -- | Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage- downloaded_size :: I32- }- deriving (Show, Eq, Generic)-data RemoteFile- = -- | Represents a remote file- RemoteFile- { -- | Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.- id :: T,- -- | Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time- unique_id :: T,- -- | True, if the file is currently being uploaded (or a remote copy is being generated by some other means)- is_uploading_active :: Bool,- -- | True, if a remote copy is fully available- is_uploading_completed :: Bool,- -- | Size of the remote available part of the file; 0 if unknown- uploaded_size :: I32- }- deriving (Show, Eq, Generic)-data File- = -- | Represents a file- File- { -- | Unique file identifier- id :: I32,- -- | File size; 0 if unknown- size :: I32,- -- | Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress- expected_size :: I32,- -- | Information about the local copy of the file- local :: LocalFile,- -- | Information about the remote copy of the file- remote :: RemoteFile- }- deriving (Show, Eq, Generic)--- | Points to a file-data InputFile- = -- | A file defined by its unique ID - InputFileId- { -- | Unique file identifier- id_2 :: I32- }- | -- | A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib.- InputFileRemote- { -- | Remote file identifier- id :: T- }- | -- | A file defined by a local path - InputFileLocal- { -- | Local path to the file- path :: T- }- | -- | A file generated by the client - InputFileGenerated- { -- | Local path to a file from which the file is generated; may be empty if there is no such file- original_path :: T,- -- | String specifying the conversion applied to the original file; should be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage- conversion :: T,- -- | Expected size of the generated file; 0 if unknown- expected_size :: I32- }- deriving (Show, Eq, Generic)-data PhotoSize- = -- | Photo description - PhotoSize- { -- | Thumbnail type (see https://core.telegram.org/constructor/photoSize) - type_ :: T,- -- | Information about the photo file - photo :: File,- -- | Photo width - width :: I32,- -- | Photo height- height :: I32- }- deriving (Show, Eq, Generic)-data Minithumbnail- = -- | Thumbnail image of a very poor quality and low resolution - Minithumbnail- { -- | Thumbnail width, usually doesn't exceed 40 - width :: I32,- -- | Thumbnail height, usually doesn't exceed 40 - height :: I32,- -- | The thumbnail in JPEG format- data_ :: ByteString64- }- deriving (Show, Eq, Generic)--- | Part of the face, relative to which a mask should be placed-data MaskPoint- = -- | A mask should be placed relatively to the forehead- MaskPointForehead- { - }- | -- | A mask should be placed relatively to the eyes- MaskPointEyes- { - }- | -- | A mask should be placed relatively to the mouth- MaskPointMouth- { - }- | -- | A mask should be placed relatively to the chin- MaskPointChin- { - }- deriving (Show, Eq, Generic)-data MaskPosition- = -- | Position on a photo where a mask should be placed - MaskPosition- { -- | Part of the face, relative to which the mask should be placed- point :: MaskPoint,- -- | Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)- x_shift :: Double,- -- | Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position)- y_shift :: Double,- -- | Mask scaling coefficient. (For example, 2.0 means a doubled size)- scale :: Double- }- deriving (Show, Eq, Generic)-data PollOption- = -- | Describes one answer option of a poll - PollOption- { -- | Option text, 1-100 characters - text :: T,- -- | Number of voters for this option, available only for closed or voted polls - voter_count :: I32,- -- | The percentage of votes for this option, 0-100- vote_percentage :: I32,- -- | True, if the option was chosen by the user - is_chosen :: Bool,- -- | True, if the option is being chosen by a pending setPollAnswer request- is_being_chosen :: Bool- }- deriving (Show, Eq, Generic)--- | Describes the type of a poll-data PollType- = -- | A regular poll - PollTypeRegular- { -- | True, if multiple answer options can be chosen simultaneously- allow_multiple_answers :: Bool- }- | -- | A poll in quiz mode, which has exactly one correct answer option and can be answered only once- PollTypeQuiz- { -- | 0-based identifier of the correct answer option; -1 for a yet unanswered poll- correct_option_id :: I32,- -- | Text that is shown when the user chooses an incorrect answer or taps on the lamp icon, 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll- explanation :: FormattedText- }- deriving (Show, Eq, Generic)-data Animation- = -- | Describes an animation file. The animation must be encoded in GIF or MPEG4 format - Animation- { -- | Duration of the animation, in seconds; as defined by the sender - duration :: I32,- -- | Width of the animation - width :: I32,- -- | Height of the animation- height :: I32,- -- | Original name of the file; as defined by the sender - file_name :: T,- -- | MIME type of the file, usually "image/gif" or "video/mp4"- mime_type :: T,- -- | Animation minithumbnail; may be null - minithumbnail :: Minithumbnail,- -- | Animation thumbnail; may be null - thumbnail :: PhotoSize,- -- | File containing the animation- animation :: File- }- deriving (Show, Eq, Generic)-data Audio- = -- | Describes an audio file. Audio is usually in MP3 or M4A format - Audio- { -- | Duration of the audio, in seconds; as defined by the sender - duration :: I32,- -- | Title of the audio; as defined by the sender - title :: T,- -- | Performer of the audio; as defined by the sender- performer :: T,- -- | Original name of the file; as defined by the sender - file_name :: T,- -- | The MIME type of the file; as defined by the sender - mime_type :: T,- -- | The minithumbnail of the album cover; may be null - album_cover_minithumbnail :: Minithumbnail,- -- | The thumbnail of the album cover; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null - album_cover_thumbnail :: PhotoSize,- -- | File containing the audio- audio :: File- }- deriving (Show, Eq, Generic)-data Document- = -- | Describes a document of any type - Document- { -- | Original name of the file; as defined by the sender - file_name :: T,- -- | MIME type of the file; as defined by the sender- mime_type :: T,- -- | Document minithumbnail; may be null - minithumbnail :: Minithumbnail,- -- | Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null - thumbnail :: PhotoSize,- -- | File containing the document- document :: File- }- deriving (Show, Eq, Generic)-data Photo- = -- | Describes a photo - Photo- { -- | True, if stickers were added to the photo - has_stickers :: Bool,- -- | Photo minithumbnail; may be null - minithumbnail :: Minithumbnail,- -- | Available variants of the photo, in different sizes- sizes :: [PhotoSize]- }- deriving (Show, Eq, Generic)-data Sticker- = -- | Describes a sticker - Sticker- { -- | The identifier of the sticker set to which the sticker belongs; 0 if none - set_id :: I64,- -- | Sticker width; as defined by the sender - width :: I32,- -- | Sticker height; as defined by the sender- height :: I32,- -- | Emoji corresponding to the sticker - emoji :: T,- -- | True, if the sticker is an animated sticker in TGS format - is_animated :: Bool,- -- | True, if the sticker is a mask - is_mask :: Bool,- -- | Position where the mask should be placed; may be null - mask_position :: MaskPosition,- -- | Sticker thumbnail in WEBP or JPEG format; may be null - thumbnail :: PhotoSize,- -- | File containing the sticker- sticker :: File- }- deriving (Show, Eq, Generic)-data Video- = -- | Describes a video file - Video- { -- | Duration of the video, in seconds; as defined by the sender - duration :: I32,- -- | Video width; as defined by the sender - width :: I32,- -- | Video height; as defined by the sender- height :: I32,- -- | Original name of the file; as defined by the sender - file_name :: T,- -- | MIME type of the file; as defined by the sender - mime_type :: T,- -- | True, if stickers were added to the video- has_stickers :: Bool,- -- | True, if the video should be tried to be streamed - supports_streaming :: Bool,- -- | Video minithumbnail; may be null - minithumbnail :: Minithumbnail,- -- | Video thumbnail; as defined by the sender; may be null - thumbnail :: PhotoSize,- -- | File containing the video- video :: File- }- deriving (Show, Eq, Generic)-data VideoNote- = -- | Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format - VideoNote- { -- | Duration of the video, in seconds; as defined by the sender - duration :: I32,- -- | Video width and height; as defined by the sender - length :: I32,- -- | Video minithumbnail; may be null - minithumbnail :: Minithumbnail,- -- | Video thumbnail; as defined by the sender; may be null - thumbnail :: PhotoSize,- -- | File containing the video- video :: File- }- deriving (Show, Eq, Generic)-data VoiceNote- = -- | Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel - VoiceNote- { -- | Duration of the voice note, in seconds; as defined by the sender- duration :: I32,- -- | A waveform representation of the voice note in 5-bit format - waveform :: ByteString64,- -- | MIME type of the file; as defined by the sender - mime_type :: T,- -- | File containing the voice note- voice :: File- }- deriving (Show, Eq, Generic)-data Contact- = -- | Describes a user contact - Contact- { -- | Phone number of the user - phone_number :: T,- -- | First name of the user; 1-255 characters in length - first_name :: T,- -- | Last name of the user - last_name :: T,- -- | Additional data about the user in a form of vCard; 0-2048 bytes in length - vcard :: T,- -- | Identifier of the user, if known; otherwise 0- user_id :: I32- }- deriving (Show, Eq, Generic)-data Location- = -- | Describes a location on planet Earth - Location- { -- | Latitude of the location in degrees; as defined by the sender - latitude :: Double,- -- | Longitude of the location, in degrees; as defined by the sender- longitude :: Double- }- deriving (Show, Eq, Generic)-data Venue- = -- | Describes a venue - Venue- { -- | Venue location; as defined by the sender - location :: Location,- -- | Venue name; as defined by the sender - title :: T,- -- | Venue address; as defined by the sender - address :: T,- -- | Provider of the venue database; as defined by the sender. Currently only "foursquare" needs to be supported- provider :: T,- -- | Identifier of the venue in the provider database; as defined by the sender - id :: T,- -- | Type of the venue in the provider database; as defined by the sender- type_ :: T- }- deriving (Show, Eq, Generic)-data Game- = -- | Describes a game - Game- { -- | Game ID - id :: I64,- -- | Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} - short_name :: T,- -- | Game title - title :: T,- -- | Game text, usually containing scoreboards for a game- text :: FormattedText,- -- | Describes a game - description :: T,- -- | Game photo - photo :: Photo,- -- | Game animation; may be null- animation :: Animation- }- deriving (Show, Eq, Generic)-data Poll- = -- | Describes a poll - Poll- { -- | Unique poll identifier - id :: I64,- -- | Poll question, 1-255 characters - question :: T,- -- | List of poll answer options- options :: [PollOption],- -- | Total number of voters, participating in the poll - total_voter_count :: I32,- -- | User identifiers of recent voters, if the poll is non-anonymous- recent_voter_user_ids :: [I32],- -- | True, if the poll is anonymous - is_anonymous :: Bool,- -- | Type of the poll- type_ :: PollType,- -- | Amount of time the poll will be active after creation, in seconds - open_period :: I32,- -- | Point in time (Unix timestamp) when the poll will be automatically closed - close_date :: I32,- -- | True, if the poll is closed- is_closed :: Bool- }- deriving (Show, Eq, Generic)-data ProfilePhoto- = -- | Describes a user profile photo - ProfilePhoto- { -- | Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of userProfilePhotos- id :: I64,- -- | A small (160x160) user profile photo. The file can be downloaded only before the photo is changed - small :: File,- -- | A big (640x640) user profile photo. The file can be downloaded only before the photo is changed- big :: File- }- deriving (Show, Eq, Generic)-data ChatPhoto- = -- | Describes the photo of a chat - ChatPhoto- { -- | A small (160x160) chat photo. The file can be downloaded only before the photo is changed - small :: File,- -- | A big (640x640) chat photo. The file can be downloaded only before the photo is changed- big :: File- }- deriving (Show, Eq, Generic)--- | Represents the type of a user. The following types are possible: regular users, deleted users and bots-data UserType- = -- | A regular user- UserTypeRegular- { - }- | -- | A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user- UserTypeDeleted- { - }- | -- | A bot (see https://core.telegram.org/bots) - UserTypeBot- { -- | True, if the bot can be invited to basic group and supergroup chats- can_join_groups :: Bool,- -- | True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages- can_read_all_group_messages :: Bool,- -- | True, if the bot supports inline queries - is_inline :: Bool,- -- | Placeholder for inline queries (displayed on the client input field) - inline_query_placeholder :: T,- -- | True, if the location of the user should be sent with every inline query to this bot- need_location :: Bool- }- | -- | 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- UserTypeUnknown- { - }- deriving (Show, Eq, Generic)-data BotCommand- = -- | Represents a command supported by a bot - BotCommand- { -- | Text of the bot command - command :: T,- -- | Represents a command supported by a bot - description :: T- }- deriving (Show, Eq, Generic)-data BotInfo- = -- | Provides information about a bot and its supported commands - BotInfo- { -- | Provides information about a bot and its supported commands - description :: T,- -- | A list of commands supported by the bot- commands :: [BotCommand]- }- deriving (Show, Eq, Generic)-data ChatLocation- = -- | Represents a location to which a chat is connected - ChatLocation- { -- | The location - location :: Location,- -- | Location address; 1-64 characters, as defined by the chat owner- address :: T- }- deriving (Show, Eq, Generic)-data User- = -- | Represents a user - User- { -- | User identifier - id :: I32,- -- | First name of the user - first_name :: T,- -- | Last name of the user - last_name :: T,- -- | Username of the user- username :: T,- -- | Phone number of the user - phone_number :: T,- -- | Current online status of the user - status :: UserStatus,- -- | Profile photo of the user; may be null- profile_photo :: ProfilePhoto,- -- | The user is a contact of the current user- is_contact :: Bool,- -- | The user is a contact of the current user and the current user is a contact of the user- is_mutual_contact :: Bool,- -- | True, if the user is verified - is_verified :: Bool,- -- | True, if the user is Telegram support account- is_support :: Bool,- -- | If non-empty, it contains a human-readable description of the reason why access to this user must be restricted- restriction_reason :: T,- -- | True, if many users reported this user as a scam- is_scam :: Bool,- -- | If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser - have_access :: Bool,- -- | Type of the user - type_ :: UserType,- -- | IETF language tag of the user's language; only available to bots- language_code :: T- }- deriving (Show, Eq, Generic)-data UserFullInfo- = -- | Contains full information about a user (except the full list of profile photos) - UserFullInfo- { -- | True, if the user is blacklisted by the current user- is_blocked :: Bool,- -- | True, if the user can be called - can_be_called :: Bool,- -- | True, if the user can't be called due to their privacy settings- has_private_calls :: Bool,- -- | True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used- need_phone_number_privacy_exception :: Bool,- -- | A short user bio - bio :: T,- -- | For bots, the text that is included with the link when users share the bot - share_text :: T,- -- | Number of group chats where both the other user and the current user are a member; 0 for the current user - group_in_common_count :: I32,- -- | If the user is a bot, information about the bot; may be null- bot_info :: BotInfo- }- deriving (Show, Eq, Generic)-data UserProfilePhoto- = -- | Contains full information about a user profile photo - UserProfilePhoto- { -- | Unique user profile photo identifier - id :: I64,- -- | Point in time (Unix timestamp) when the photo has been added - added_date :: I32,- -- | Available variants of the user photo, in different sizes- sizes :: [PhotoSize]- }- deriving (Show, Eq, Generic)-data UserProfilePhotos- = -- | Contains part of the list of user photos - UserProfilePhotos- { -- | Total number of user profile photos - total_count :: I32,- -- | A list of photos- photos :: [UserProfilePhoto]- }- deriving (Show, Eq, Generic)-data Users- = -- | Represents a list of users - Users- { -- | Approximate total count of users found - total_count :: I32,- -- | A list of user identifiers- user_ids :: [I32]- }- deriving (Show, Eq, Generic)-data ChatAdministrator- = -- | Contains information about a chat administrator - ChatAdministrator- { -- | User identifier of the administrator - user_id :: I32,- -- | Custom title of the administrator - custom_title :: T,- -- | True, if the user is the owner of the chat- is_owner :: Bool- }- deriving (Show, Eq, Generic)-data ChatAdministrators- = -- | Represents a list of chat administrators - ChatAdministrators- { -- | A list of chat administrators- administrators :: [ChatAdministrator]- }- deriving (Show, Eq, Generic)-data ChatPermissions- = -- | Describes actions that a user is allowed to take in a chat- ChatPermissions- { -- | True, if the user can send text messages, contacts, locations, and venues- can_send_messages :: Bool,- -- | True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions- can_send_media_messages :: Bool,- -- | True, if the user can send polls. Implies can_send_messages permissions- can_send_polls :: Bool,- -- | True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_messages permissions- can_send_other_messages :: Bool,- -- | True, if the user may add a web page preview to their messages. Implies can_send_messages permissions- can_add_web_page_previews :: Bool,- -- | True, if the user can change the chat title, photo, and other settings- can_change_info :: Bool,- -- | True, if the user can invite new users to the chat- can_invite_users :: Bool,- -- | True, if the user can pin messages- can_pin_messages :: Bool- }- deriving (Show, Eq, Generic)--- | Provides information about the status of a member in a chat-data ChatMemberStatus- = -- | The user is the owner of a chat and has all the administrator privileges- ChatMemberStatusCreator- { -- | A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only- custom_title :: T,- -- | True, if the user is a member of the chat- is_member :: Bool- }- | -- | The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges- ChatMemberStatusAdministrator- { -- | A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only- custom_title :: T,- -- | True, if the current user can edit the administrator privileges for the called user- can_be_edited :: Bool,- -- | True, if the administrator can change the chat title, photo, and other settings- can_change_info :: Bool,- -- | True, if the administrator can create channel posts; applicable to channels only- can_post_messages :: Bool,- -- | True, if the administrator can edit messages of other users and pin messages; applicable to channels only- can_edit_messages :: Bool,- -- | True, if the administrator can delete messages of other users- can_delete_messages :: Bool,- -- | True, if the administrator can invite new users to the chat- can_invite_users :: Bool,- -- | True, if the administrator can restrict, ban, or unban chat members- can_restrict_members :: Bool,- -- | True, if the administrator can pin messages; applicable to groups only- can_pin_messages :: Bool,- -- | True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them- can_promote_members :: Bool- }- | -- | The user is a member of a chat, without any additional privileges or restrictions- ChatMemberStatusMember- { - }- | -- | The user is under certain restrictions in the chat. Not supported in basic groups and channels- ChatMemberStatusRestricted- { -- | True, if the user is a member of the chat- is_member :: Bool,- -- | Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever- restricted_until_date :: I32,- -- | User permissions in the chat- permissions :: ChatPermissions- }- | -- | The user is not a chat member- ChatMemberStatusLeft- { - }- | -- | The user was banned (and hence is not a member of the chat). Implies the user can't return to the chat or view messages- ChatMemberStatusBanned- { -- | Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever- banned_until_date :: I32- }- deriving (Show, Eq, Generic)-data ChatMember- = -- | A user with information about joining/leaving a chat - ChatMember- { -- | User identifier of the chat member - user_id :: I32,- -- | Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown- inviter_user_id :: I32,- -- | Point in time (Unix timestamp) when the user joined a chat - joined_chat_date :: I32,- -- | Status of the member in the chat - status :: ChatMemberStatus,- -- | If the user is a bot, information about the bot; may be null. Can be null even for a bot if the bot is not a chat member- bot_info :: BotInfo- }- deriving (Show, Eq, Generic)-data ChatMembers- = -- | Contains a list of chat members - ChatMembers- { -- | Approximate total count of chat members found - total_count :: I32,- -- | A list of chat members- members :: [ChatMember]- }- deriving (Show, Eq, Generic)--- | Specifies the kind of chat members to return in searchChatMembers-data ChatMembersFilter- = -- | Returns contacts of the user- ChatMembersFilterContacts- { - }- | -- | Returns the owner and administrators- ChatMembersFilterAdministrators- { - }- | -- | Returns all chat members, including restricted chat members- ChatMembersFilterMembers- { - }- | -- | Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup- ChatMembersFilterRestricted- { - }- | -- | Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel- ChatMembersFilterBanned- { - }- | -- | Returns bot members of the chat- ChatMembersFilterBots- { - }- deriving (Show, Eq, Generic)--- | Specifies the kind of chat members to return in getSupergroupMembers-data SupergroupMembersFilter- = -- | Returns recently active users in reverse chronological order- SupergroupMembersFilterRecent- { - }- | -- | Returns contacts of the user, which are members of the supergroup or channel - SupergroupMembersFilterContacts- { -- | Query to search for- query :: T- }- | -- | Returns the owner and administrators- SupergroupMembersFilterAdministrators- { - }- | -- | Used to search for supergroup or channel members via a (string) query - SupergroupMembersFilterSearch- { -- | Query to search for- query :: T- }- | -- | Returns restricted supergroup members; can be used only by administrators - SupergroupMembersFilterRestricted- { -- | Query to search for- query :: T- }- | -- | Returns users banned from the supergroup or channel; can be used only by administrators - SupergroupMembersFilterBanned- { -- | Query to search for- query :: T- }- | -- | Returns bot members of the supergroup or channel- SupergroupMembersFilterBots- { - }- deriving (Show, Eq, Generic)-data BasicGroup- = -- | Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)- BasicGroup- { -- | Group identifier- id :: I32,- -- | Number of members in the group- member_count :: I32,- -- | Status of the current user in the group- status :: ChatMemberStatus,- -- | True, if the group is active- is_active :: Bool,- -- | Identifier of the supergroup to which this group was upgraded; 0 if none- upgraded_to_supergroup_id :: I32- }- deriving (Show, Eq, Generic)-data BasicGroupFullInfo- = -- | Contains full information about a basic group - BasicGroupFullInfo- { -- | Contains full information about a basic group - description :: T,- -- | User identifier of the creator of the group; 0 if unknown - creator_user_id :: I32,- -- | Group members - members :: [ChatMember],- -- | Invite link for this group; available only after it has been generated at least once and only for the group creator- invite_link :: T- }- deriving (Show, Eq, Generic)-data Supergroup- = -- | Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers- Supergroup- { -- | Supergroup or channel identifier- id :: I32,- -- | Username of the supergroup or channel; empty for private supergroups or channels- username :: T,- -- | Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member- date :: I32,- -- | Status of the current user in the supergroup or channel; custom title will be always empty- status :: ChatMemberStatus,- -- | Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats- member_count :: I32,- -- | True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel- has_linked_chat :: Bool,- -- | True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup- has_location :: Bool,- -- | True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels- sign_messages :: Bool,- -- | True, if the slow mode is enabled in the supergroup- is_slow_mode_enabled :: Bool,- -- | True, if the supergroup is a channel- is_channel :: Bool,- -- | True, if the supergroup or channel is verified- is_verified :: Bool,- -- | If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted- restriction_reason :: T,- -- | True, if many users reported this supergroup as a scam- is_scam :: Bool- }- deriving (Show, Eq, Generic)-data SupergroupFullInfo- = -- | Contains full information about a supergroup or channel- SupergroupFullInfo- { -- | Contains full information about a supergroup or channel- description :: T,- -- | Number of members in the supergroup or channel; 0 if unknown- member_count :: I32,- -- | Number of privileged users in the supergroup or channel; 0 if unknown- administrator_count :: I32,- -- | Number of restricted users in the supergroup; 0 if unknown- restricted_count :: I32,- -- | Number of users banned from chat; 0 if unknown- banned_count :: I32,- -- | Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown- linked_chat_id :: I53,- -- | Delay between consecutive sent messages for non-administrator supergroup members, in seconds- slow_mode_delay :: I32,- -- | Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero- slow_mode_delay_expires_in :: Double,- -- | True, if members of the chat can be retrieved- can_get_members :: Bool,- -- | True, if the chat username can be changed- can_set_username :: Bool,- -- | True, if the supergroup sticker set can be changed- can_set_sticker_set :: Bool,- -- | True, if the supergroup location can be changed- can_set_location :: Bool,- -- | True, if the channel statistics is available- can_view_statistics :: Bool,- -- | True, if new chat members will have access to old messages. In public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chat. The value of this field is only available for chat administrators- is_all_history_available :: Bool,- -- | Identifier of the supergroup sticker set; 0 if none- sticker_set_id :: I64,- -- | Location to which the supergroup is connected; may be null- location :: ChatLocation,- -- | Invite link for this chat- invite_link :: T,- -- | Identifier of the basic group from which supergroup was upgraded; 0 if none- upgraded_from_basic_group_id :: I32,- -- | Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none- upgraded_from_max_message_id :: I53- }- deriving (Show, Eq, Generic)--- | Describes the current secret chat state-data SecretChatState- = -- | The secret chat is not yet created; waiting for the other user to get online- SecretChatStatePending- { - }- | -- | The secret chat is ready to use- SecretChatStateReady- { - }- | -- | The secret chat is closed- SecretChatStateClosed- { - }- deriving (Show, Eq, Generic)-data SecretChat- = -- | Represents a secret chat- SecretChat- { -- | Secret chat identifier- id :: I32,- -- | Identifier of the chat partner- user_id :: I32,- -- | State of the secret chat- state :: SecretChatState,- -- | True, if the chat was created by the current user; otherwise false- is_outbound :: Bool,- -- | Current message Time To Live setting (self-destruct timer) for the chat, in seconds- ttl :: I32,- -- | Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9.- key_hash :: ByteString64,- -- | Secret chat layer; determines features supported by the other client. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101- layer :: I32- }- deriving (Show, Eq, Generic)--- | Contains information about the origin of a forwarded message-data MessageForwardOrigin- = -- | The message was originally written by a known user - MessageForwardOriginUser- { -- | Identifier of the user that originally sent the message- sender_user_id :: I32- }- | -- | The message was originally written by a user, which is hidden by their privacy settings - MessageForwardOriginHiddenUser- { -- | Name of the sender- sender_name :: T- }- | -- | The message was originally a post in a channel- MessageForwardOriginChannel- { -- | Identifier of the chat from which the message was originally forwarded- chat_id :: I53,- -- | Message identifier of the original message; 0 if unknown- message_id :: I53,- -- | Original post author signature- author_signature :: T- }- deriving (Show, Eq, Generic)-data MessageForwardInfo- = -- | Contains information about a forwarded message- MessageForwardInfo- { -- | Origin of a forwarded message- origin :: MessageForwardOrigin,- -- | Point in time (Unix timestamp) when the message was originally sent- date :: I32,- -- | The type of a public service announcement for the forwarded message- public_service_announcement_type :: T,- -- | For messages forwarded to the chat with the current user (Saved Messages) or to the channel's discussion group, the identifier of the chat from which the message was forwarded last time; 0 if unknown- from_chat_id :: I53,- -- | For messages forwarded to the chat with the current user (Saved Messages) or to the channel's discussion group, the identifier of the original message from which the new message was forwarded last time; 0 if unknown- from_message_id :: I53- }- deriving (Show, Eq, Generic)--- | Contains information about the sending state of the message-data MessageSendingState- = -- | The message is being sent now, but has not yet been delivered to the server- MessageSendingStatePending- { - }- | -- | The message failed to be sent - MessageSendingStateFailed- { -- | An error code; 0 if unknown - error_code :: I32,- -- | Error message- error_message :: T,- -- | True, if the message can be re-sent - can_retry :: Bool,- -- | Time left before the message can be re-sent, in seconds. No update is sent when this field changes- retry_after :: Double- }- deriving (Show, Eq, Generic)-data Message- = -- | Describes a message- Message- { -- | Message identifier, unique for the chat to which the message belongs- id :: I53,- -- | Identifier of the user who sent the message; 0 if unknown. Currently, it is unknown for channel posts and for channel posts automatically forwarded to discussion group- sender_user_id :: I32,- -- | Chat identifier- chat_id :: I53,- -- | Information about the sending state of the message; may be null- sending_state :: MessageSendingState,- -- | Information about the scheduling state of the message; may be null- scheduling_state :: MessageSchedulingState,- -- | True, if the message is outgoing- is_outgoing :: Bool,- -- | True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the client- can_be_edited :: Bool,- -- | True, if the message can be forwarded- can_be_forwarded :: Bool,- -- | True, if the message can be deleted only for the current user while other users will continue to see it- can_be_deleted_only_for_self :: Bool,- -- | True, if the message can be deleted for all users- can_be_deleted_for_all_users :: Bool,- -- | True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts- is_channel_post :: Bool,- -- | True, if the message contains an unread mention for the current user- contains_unread_mention :: Bool,- -- | Point in time (Unix timestamp) when the message was sent- date :: I32,- -- | Point in time (Unix timestamp) when the message was last edited- edit_date :: I32,- -- | Information about the initial message sender; may be null- forward_info :: MessageForwardInfo,- -- | If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message- reply_to_message_id :: I53,- -- | For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires- ttl :: I32,- -- | Time left before the message expires, in seconds- ttl_expires_in :: Double,- -- | If non-zero, the user identifier of the bot through which this message was sent- via_bot_user_id :: I32,- -- | For channel posts, optional author signature- author_signature :: T,- -- | Number of times this message was viewed- views :: I32,- -- | Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums- media_album_id :: I64,- -- | If non-empty, contains a human-readable description of the reason why access to this message must be restricted- restriction_reason :: T,- -- | Content of the message- content :: MessageContent,- -- | Reply markup for the message; may be null- reply_markup :: ReplyMarkup- }- deriving (Show, Eq, Generic)-data Messages- = -- | Contains a list of messages - Messages- { -- | Approximate total count of messages found - total_count :: I32,- -- | List of messages; messages may be null- messages :: [Message]- }- deriving (Show, Eq, Generic)-data FoundMessages- = -- | Contains a list of messages found by a search - FoundMessages- { -- | List of messages - messages :: [Message],- -- | Value to pass as from_search_id to get more results- next_from_search_id :: I64- }- deriving (Show, Eq, Generic)--- | Describes the types of chats to which notification settings are applied-data NotificationSettingsScope- = -- | Notification settings applied to all private and secret chats when the corresponding chat setting has a default value- NotificationSettingsScopePrivateChats- { - }- | -- | Notification settings applied to all basic groups and supergroups when the corresponding chat setting has a default value- NotificationSettingsScopeGroupChats- { - }- | -- | Notification settings applied to all channels when the corresponding chat setting has a default value- NotificationSettingsScopeChannelChats- { - }- deriving (Show, Eq, Generic)-data ChatNotificationSettings- = -- | Contains information about notification settings for a chat- ChatNotificationSettings- { -- | If true, mute_for is ignored and the value for the relevant type of chat is used instead - use_default_mute_for :: Bool,- -- | Time left before notifications will be unmuted, in seconds- mute_for :: I32,- -- | If true, sound is ignored and the value for the relevant type of chat is used instead - use_default_sound :: Bool,- -- | The name of an audio file to be used for notification sounds; only applies to iOS applications- sound :: T,- -- | If true, show_preview is ignored and the value for the relevant type of chat is used instead - use_default_show_preview :: Bool,- -- | True, if message content should be displayed in notifications- show_preview :: Bool,- -- | If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead - use_default_disable_pinned_message_notifications :: Bool,- -- | If true, notifications for incoming pinned messages will be created as for an ordinary unread message- disable_pinned_message_notifications :: Bool,- -- | If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead - use_default_disable_mention_notifications :: Bool,- -- | If true, notifications for messages with mentions will be created as for an ordinary unread message- disable_mention_notifications :: Bool- }- deriving (Show, Eq, Generic)-data ScopeNotificationSettings- = -- | Contains information about notification settings for several chats- ScopeNotificationSettings- { -- | Time left before notifications will be unmuted, in seconds- mute_for :: I32,- -- | The name of an audio file to be used for notification sounds; only applies to iOS applications- sound :: T,- -- | True, if message content should be displayed in notifications- show_preview :: Bool,- -- | True, if notifications for incoming pinned messages will be created as for an ordinary unread message- disable_pinned_message_notifications :: Bool,- -- | True, if notifications for messages with mentions will be created as for an ordinary unread message- disable_mention_notifications :: Bool- }- deriving (Show, Eq, Generic)-data DraftMessage- = -- | Contains information about a message draft- DraftMessage- { -- | Identifier of the message to reply to; 0 if none- reply_to_message_id :: I53,- -- | Point in time (Unix timestamp) when the draft was created- date :: I32,- -- | Content of the message draft; this should always be of type inputMessageText- input_message_text :: InputMessageContent- }- deriving (Show, Eq, Generic)--- | Describes the type of a chat-data ChatType- = -- | An ordinary chat with a user - ChatTypePrivate- { -- | User identifier- user_id :: I32- }- | -- | A basic group (i.e., a chat with 0-200 other users) - ChatTypeBasicGroup- { -- | Basic group identifier- basic_group_id :: I32- }- | -- | A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members) - ChatTypeSupergroup- { -- | Supergroup or channel identifier - supergroup_id :: I32,- -- | True, if the supergroup is a channel- is_channel :: Bool- }- | -- | A secret chat with a user - ChatTypeSecret- { -- | Secret chat identifier - secret_chat_id :: I32,- -- | User identifier of the secret chat peer- user_id :: I32- }- deriving (Show, Eq, Generic)--- | Describes a list of chats-data ChatList- = -- | A main list of chats- ChatListMain- { - }- | -- | A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives- ChatListArchive- { - }- deriving (Show, Eq, Generic)--- | Describes a reason why the chat is shown in a chat list-data ChatSource- = -- | The chat is sponsored by the user's MTProxy server- ChatSourceMtprotoProxy- { - }- | -- | The chat contains a public service announcement - ChatSourcePublicServiceAnnouncement- { -- | The type of the announcement - type_ :: T,- -- | The text of the announcement- text :: T- }- deriving (Show, Eq, Generic)-data Chat- = -- | A chat. (Can be a private chat, basic group, supergroup, or secret chat)- Chat- { -- | Chat unique identifier- id :: I53,- -- | Type of the chat- type_ :: ChatType,- -- | A chat list to which the chat belongs; may be null- chat_list :: ChatList,- -- | Chat title- title :: T,- -- | Chat photo; may be null- photo :: ChatPhoto,- -- | Actions that non-administrator chat members are allowed to take in the chat- permissions :: ChatPermissions,- -- | Last message in the chat; may be null- last_message :: Message,- -- | Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined- order :: I64,- -- | Source of the chat in a chat list; may be null- source :: ChatSource,- -- | True, if the chat is pinned- is_pinned :: Bool,- -- | True, if the chat is marked as unread- is_marked_as_unread :: Bool,- -- | True, if the chat has scheduled messages- has_scheduled_messages :: Bool,- -- | True, if the chat messages can be deleted only for the current user while other users will continue to see the messages- can_be_deleted_only_for_self :: Bool,- -- | True, if the chat messages can be deleted for all users- can_be_deleted_for_all_users :: Bool,- -- | True, if the chat can be reported to Telegram moderators through reportChat- can_be_reported :: Bool,- -- | Default value of the disable_notification parameter, used when a message is sent to the chat- default_disable_notification :: Bool,- -- | Number of unread messages in the chat- unread_count :: I32,- -- | Identifier of the last read incoming message- last_read_inbox_message_id :: I53,- -- | Identifier of the last read outgoing message- last_read_outbox_message_id :: I53,- -- | Number of unread messages with a mention/reply in the chat- unread_mention_count :: I32,- -- | Notification settings for this chat- notification_settings :: ChatNotificationSettings,- -- | Describes actions which should be possible to do through a chat action bar; may be null- action_bar :: ChatActionBar,- -- | Identifier of the pinned message in the chat; 0 if none- pinned_message_id :: I53,- -- | Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat- reply_markup_message_id :: I53,- -- | A draft of a message in the chat; may be null- draft_message :: DraftMessage,- -- | Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if the message database is used- client_data :: T- }- deriving (Show, Eq, Generic)-data Chats- = -- | Represents a list of chats - Chats- { -- | List of chat identifiers- chat_ids :: [I53]- }- deriving (Show, Eq, Generic)-data ChatNearby- = -- | Describes a chat located nearby - ChatNearby- { -- | Chat identifier - chat_id :: I53,- -- | Distance to the chat location in meters- distance :: I32- }- deriving (Show, Eq, Generic)-data ChatsNearby- = -- | Represents a list of chats located nearby - ChatsNearby- { -- | List of users nearby - users_nearby :: [ChatNearby],- -- | List of location-based supergroups nearby- supergroups_nearby :: [ChatNearby]- }- deriving (Show, Eq, Generic)-data ChatInviteLink- = -- | Contains a chat invite link - ChatInviteLink- { -- | Chat invite link- invite_link :: T- }- deriving (Show, Eq, Generic)-data ChatInviteLinkInfo- = -- | Contains information about a chat invite link- ChatInviteLinkInfo- { -- | Chat identifier of the invite link; 0 if the user is not a member of this chat- chat_id :: I53,- -- | Contains information about the type of the chat- type_ :: ChatType,- -- | Title of the chat- title :: T,- -- | Chat photo; may be null- photo :: ChatPhoto,- -- | Number of members in the chat- member_count :: I32,- -- | User identifiers of some chat members that may be known to the current user- member_user_ids :: [I32],- -- | True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup- is_public :: Bool- }- deriving (Show, Eq, Generic)--- | Describes a type of public chats-data PublicChatType- = -- | The chat is public, because it has username- PublicChatTypeHasUsername- { - }- | -- | The chat is public, because it is a location-based supergroup- PublicChatTypeIsLocationBased- { - }- deriving (Show, Eq, Generic)--- | Describes actions which should be possible to do through a chat action bar-data ChatActionBar- = -- | The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam- ChatActionBarReportSpam- { - }- | -- | The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation- ChatActionBarReportUnrelatedLocation- { - }- | -- | The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be added to the contact list using the method addContact, or the other user can be blocked using the method blockUser- ChatActionBarReportAddBlock- { - }- | -- | The chat is a private or secret chat and the other user can be added to the contact list using the method addContact- ChatActionBarAddContact- { - }- | -- | The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber- ChatActionBarSharePhoneNumber- { - }- deriving (Show, Eq, Generic)--- | Describes a keyboard button type-data KeyboardButtonType- = -- | A simple button, with text that should be sent when the button is pressed- KeyboardButtonTypeText- { - }- | -- | A button that sends the user's phone number when pressed; available only in private chats- KeyboardButtonTypeRequestPhoneNumber- { - }- | -- | A button that sends the user's location when pressed; available only in private chats- KeyboardButtonTypeRequestLocation- { - }- | -- | A button that allows the user to create and send a poll when pressed; available only in private chats - KeyboardButtonTypeRequestPoll- { -- | If true, only regular polls must be allowed to create - force_regular :: Bool,- -- | If true, only polls in quiz mode must be allowed to create- force_quiz :: Bool- }- deriving (Show, Eq, Generic)-data KeyboardButton- = -- | Represents a single button in a bot keyboard - KeyboardButton- { -- | Text of the button - text :: T,- -- | Type of the button- type_ :: KeyboardButtonType- }- deriving (Show, Eq, Generic)--- | Describes the type of an inline keyboard button-data InlineKeyboardButtonType- = -- | A button that opens a specified URL - InlineKeyboardButtonTypeUrl- { -- | HTTP or tg:// URL to open- url :: T- }- | -- | A button that opens a specified URL and automatically logs in in current user if they allowed to do that - InlineKeyboardButtonTypeLoginUrl- { -- | An HTTP URL to open - url :: T,- -- | Unique button identifier - id :: I32,- -- | If non-empty, new text of the button in forwarded messages- forward_text :: T- }- | -- | A button that sends a special callback query to a bot - InlineKeyboardButtonTypeCallback- { -- | Data to be sent to the bot via a callback query- data_ :: ByteString64- }- | -- | A button with a game that sends a special callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame- InlineKeyboardButtonTypeCallbackGame- { - }- | -- | A button that forces an inline query to the bot to be inserted in the input field - InlineKeyboardButtonTypeSwitchInline- { -- | Inline query to be sent to the bot - query :: T,- -- | True, if the inline query should be sent from the current chat- in_current_chat :: Bool- }- | -- | A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice- InlineKeyboardButtonTypeBuy- { - }- deriving (Show, Eq, Generic)-data InlineKeyboardButton- = -- | Represents a single button in an inline keyboard - InlineKeyboardButton- { -- | Text of the button - text :: T,- -- | Type of the button- type_ :: InlineKeyboardButtonType- }- deriving (Show, Eq, Generic)--- | Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots-data ReplyMarkup- = -- | Instructs clients to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with message_id == 0 will be sent- ReplyMarkupRemoveKeyboard- { -- | True, if the keyboard is removed only for the mentioned users or the target user of a reply- is_personal :: Bool- }- | -- | Instructs clients to force a reply to this message- ReplyMarkupForceReply- { -- | True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply- is_personal :: Bool- }- | -- | Contains a custom keyboard layout to quickly reply to bots- ReplyMarkupShowKeyboard- { -- | A list of rows of bot keyboard buttons- rows_2 :: [[KeyboardButton]],- -- | True, if the client needs to resize the keyboard vertically- resize_keyboard :: Bool,- -- | True, if the client needs to hide the keyboard after use- one_time :: Bool,- -- | True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply- is_personal :: Bool- }- | -- | Contains an inline keyboard layout- ReplyMarkupInlineKeyboard- { -- | A list of rows of inline keyboard buttons- rows :: [[InlineKeyboardButton]]- }- deriving (Show, Eq, Generic)--- | Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl-data LoginUrlInfo- = -- | An HTTP url needs to be open - LoginUrlInfoOpen- { -- | The URL to open - url :: T,- -- | True, if there is no need to show an ordinary open URL confirm- skip_confirm :: Bool- }- | -- | An authorization confirmation dialog needs to be shown to the user - LoginUrlInfoRequestConfirmation- { -- | An HTTP URL to be opened - url :: T,- -- | A domain of the URL- domain :: T,- -- | User identifier of a bot linked with the website - bot_user_id :: I32,- -- | True, if the user needs to be requested to give the permission to the bot to send them messages- request_write_access :: Bool- }- deriving (Show, Eq, Generic)--- | Describes a text object inside an instant-view web page-data RichText- = -- | A plain text - RichTextPlain- { -- | Text- text_2 :: T- }- | -- | A bold rich text - RichTextBold- { -- | Text- text :: RichText- }- | -- | An italicized rich text - RichTextItalic- { -- | Text- text :: RichText- }- | -- | An underlined rich text - RichTextUnderline- { -- | Text- text :: RichText- }- | -- | A strikethrough rich text - RichTextStrikethrough- { -- | Text- text :: RichText- }- | -- | A fixed-width rich text - RichTextFixed- { -- | Text- text :: RichText- }- | -- | A rich text URL link - RichTextUrl- { -- | Text - text :: RichText,- -- | URL - url :: T,- -- | True, if the URL has cached instant view server-side- is_cached :: Bool- }- | -- | A rich text email link - RichTextEmailAddress- { -- | Text - text :: RichText,- -- | Email address- email_address :: T- }- | -- | A subscript rich text - RichTextSubscript- { -- | Text- text :: RichText- }- | -- | A superscript rich text - RichTextSuperscript- { -- | Text- text :: RichText- }- | -- | A marked rich text - RichTextMarked- { -- | Text- text :: RichText- }- | -- | A rich text phone number - RichTextPhoneNumber- { -- | Text - text :: RichText,- -- | Phone number- phone_number :: T- }- | -- | A small image inside the text - RichTextIcon- { -- | The image represented as a document. The image can be in GIF, JPEG or PNG format- document :: Document,- -- | Width of a bounding box in which the image should be shown; 0 if unknown- width :: I32,- -- | Height of a bounding box in which the image should be shown; 0 if unknown- height :: I32- }- | -- | A rich text reference of a text on the same web page - RichTextReference- { -- | The text - text :: RichText,- -- | The text to show on click - reference_text :: RichText,- -- | An HTTP URL, opening the reference- url :: T- }- | -- | An anchor - RichTextAnchor- { -- | Anchor name- name :: T- }- | -- | A link to an anchor on the same web page - RichTextAnchorLink- { -- | The link text - text :: RichText,- -- | The anchor name. If the name is empty, the link should bring back to top - name :: T,- -- | An HTTP URL, opening the anchor- url :: T- }- | -- | A concatenation of rich texts - RichTexts- { -- | Texts- texts :: [RichText]- }- deriving (Show, Eq, Generic)-data PageBlockCaption- = -- | Contains a caption of an instant view web page block, consisting of a text and a trailing credit - PageBlockCaption- { -- | Content of the caption - text :: RichText,- -- | Block credit (like HTML tag <cite>)- credit :: RichText- }- deriving (Show, Eq, Generic)-data PageBlockListItem- = -- | Describes an item of a list page block - PageBlockListItem- { -- | Item label - label :: T,- -- | Item blocks- page_blocks :: [PageBlock]- }- deriving (Show, Eq, Generic)--- | Describes a horizontal alignment of a table cell content-data PageBlockHorizontalAlignment- = -- | The content should be left-aligned- PageBlockHorizontalAlignmentLeft- { - }- | -- | The content should be center-aligned- PageBlockHorizontalAlignmentCenter- { - }- | -- | The content should be right-aligned- PageBlockHorizontalAlignmentRight- { - }- deriving (Show, Eq, Generic)--- | Describes a Vertical alignment of a table cell content-data PageBlockVerticalAlignment- = -- | The content should be top-aligned- PageBlockVerticalAlignmentTop- { - }- | -- | The content should be middle-aligned- PageBlockVerticalAlignmentMiddle- { - }- | -- | The content should be bottom-aligned- PageBlockVerticalAlignmentBottom- { - }- deriving (Show, Eq, Generic)-data PageBlockTableCell- = -- | Represents a cell of a table - PageBlockTableCell- { -- | Cell text; may be null. If the text is null, then the cell should be invisible - text :: RichText,- -- | True, if it is a header cell- is_header :: Bool,- -- | The number of columns the cell should span - colspan :: I32,- -- | The number of rows the cell should span- rowspan :: I32,- -- | Horizontal cell content alignment - align :: PageBlockHorizontalAlignment,- -- | Vertical cell content alignment- valign :: PageBlockVerticalAlignment- }- deriving (Show, Eq, Generic)-data PageBlockRelatedArticle- = -- | Contains information about a related article - PageBlockRelatedArticle- { -- | Related article URL - url :: T,- -- | Article title; may be empty - title :: T,- -- | Contains information about a related article - description :: T,- -- | Article photo; may be null - photo :: Photo,- -- | Article author; may be empty - author :: T,- -- | Point in time (Unix timestamp) when the article was published; 0 if unknown- publish_date :: I32- }- deriving (Show, Eq, Generic)--- | Describes a block of an instant view web page-data PageBlock- = -- | The title of a page - PageBlockTitle- { -- | Title- title_2 :: RichText- }- | -- | The subtitle of a page - PageBlockSubtitle- { -- | Subtitle- subtitle :: RichText- }- | -- | The author and publishing date of a page - PageBlockAuthorDate- { -- | Author - author_2 :: RichText,- -- | Point in time (Unix timestamp) when the article was published; 0 if unknown- publish_date :: I32- }- | -- | A header - PageBlockHeader- { -- | Header- header :: RichText- }- | -- | A subheader - PageBlockSubheader- { -- | Subheader- subheader :: RichText- }- | -- | A kicker - PageBlockKicker- { -- | Kicker- kicker :: RichText- }- | -- | A text paragraph - PageBlockParagraph- { -- | Paragraph text- text :: RichText- }- | -- | A preformatted text paragraph - PageBlockPreformatted- { -- | Paragraph text - text :: RichText,- -- | Programming language for which the text should be formatted- language :: T- }- | -- | The footer of a page - PageBlockFooter- { -- | Footer- footer :: RichText- }- | -- | An empty block separating a page- PageBlockDivider- { - }- | -- | An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor - PageBlockAnchor- { -- | Name of the anchor- name :: T- }- | -- | A list of data blocks - PageBlockList- { -- | The items of the list- items :: [PageBlockListItem]- }- | -- | A block quote - PageBlockBlockQuote- { -- | Quote text - text :: RichText,- -- | Quote credit- credit :: RichText- }- | -- | A pull quote - PageBlockPullQuote- { -- | Quote text - text :: RichText,- -- | Quote credit- credit :: RichText- }- | -- | An animation - PageBlockAnimation- { -- | Animation file; may be null - animation :: Animation,- -- | Animation caption - caption :: PageBlockCaption,- -- | True, if the animation should be played automatically- need_autoplay :: Bool- }- | -- | An audio file - PageBlockAudio- { -- | Audio file; may be null - audio :: Audio,- -- | Audio file caption- caption :: PageBlockCaption- }- | -- | A photo - PageBlockPhoto- { -- | Photo file; may be null - photo_2 :: Photo,- -- | Photo caption - caption :: PageBlockCaption,- -- | URL that needs to be opened when the photo is clicked- url :: T- }- | -- | A video - PageBlockVideo- { -- | Video file; may be null - video :: Video,- -- | Video caption - caption :: PageBlockCaption,- -- | True, if the video should be played automatically - need_autoplay :: Bool,- -- | True, if the video should be looped- is_looped :: Bool- }- | -- | A voice note - PageBlockVoiceNote- { -- | Voice note; may be null - voice_note :: VoiceNote,- -- | Voice note caption- caption :: PageBlockCaption- }- | -- | A page cover - PageBlockCover- { -- | Cover- cover :: PageBlock- }- | -- | An embedded web page - PageBlockEmbedded- { -- | Web page URL, if available - url :: T,- -- | HTML-markup of the embedded page - html :: T,- -- | Poster photo, if available; may be null - poster_photo :: Photo,- -- | Block width; 0 if unknown - width :: I32,- -- | Block height; 0 if unknown - height :: I32,- -- | Block caption - caption :: PageBlockCaption,- -- | True, if the block should be full width - is_full_width :: Bool,- -- | True, if scrolling should be allowed- allow_scrolling :: Bool- }- | -- | An embedded post - PageBlockEmbeddedPost- { -- | Web page URL - url :: T,- -- | Post author - author :: T,- -- | Post author photo; may be null - author_photo :: Photo,- -- | Point in time (Unix timestamp) when the post was created; 0 if unknown - date :: I32,- -- | Post content - page_blocks :: [PageBlock],- -- | Post caption- caption :: PageBlockCaption- }- | -- | A collage - PageBlockCollage- { -- | Collage item contents - page_blocks :: [PageBlock],- -- | Block caption- caption :: PageBlockCaption- }- | -- | A slideshow - PageBlockSlideshow- { -- | Slideshow item contents - page_blocks :: [PageBlock],- -- | Block caption- caption :: PageBlockCaption- }- | -- | A link to a chat - PageBlockChatLink- { -- | Chat title - title :: T,- -- | Chat photo; may be null - photo :: ChatPhoto,- -- | Chat username, by which all other information about the chat should be resolved- username :: T- }- | -- | A table - PageBlockTable- { -- | Table caption - caption_2 :: RichText,- -- | Table cells - cells :: [[PageBlockTableCell]],- -- | True, if the table is bordered - is_bordered :: Bool,- -- | True, if the table is striped- is_striped :: Bool- }- | -- | A collapsible block - PageBlockDetails- { -- | Always visible heading for the block - header :: RichText,- -- | Block contents - page_blocks :: [PageBlock],- -- | True, if the block is open by default- is_open :: Bool- }- | -- | Related articles - PageBlockRelatedArticles- { -- | Block header - header :: RichText,- -- | List of related articles- articles :: [PageBlockRelatedArticle]- }- | -- | A map - PageBlockMap- { -- | Location of the map center - location :: Location,- -- | Map zoom level - zoom :: I32,- -- | Map width - width :: I32,- -- | Map height - height :: I32,- -- | Block caption- caption :: PageBlockCaption- }- deriving (Show, Eq, Generic)-data WebPageInstantView- = -- | Describes an instant view page for a web page- WebPageInstantView- { -- | Content of the web page- page_blocks :: [PageBlock],- -- | Number of the instant view views; 0 if unknown- view_count :: I32,- -- | Version of the instant view, currently can be 1 or 2- version :: I32,- -- | True, if the instant view must be shown from right to left- is_rtl :: Bool,- -- | True, if the instant view contains the full page. A network request might be needed to get the full web page instant view- is_full :: Bool- }- deriving (Show, Eq, Generic)-data WebPage- = -- | Describes a web page preview- WebPage- { -- | Original URL of the link- url :: T,- -- | URL to display- display_url :: T,- -- | Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else- type_ :: T,- -- | Short name of the site (e.g., Google Docs, App Store)- site_name :: T,- -- | Title of the content- title :: T,- -- | Describes a web page preview- description :: FormattedText,- -- | Image representing the content; may be null- photo :: Photo,- -- | URL to show in the embedded preview- embed_url :: T,- -- | MIME type of the embedded preview, (e.g., text/html or video/mp4)- embed_type :: T,- -- | Width of the embedded preview- embed_width :: I32,- -- | Height of the embedded preview- embed_height :: I32,- -- | Duration of the content, in seconds- duration :: I32,- -- | Author of the content- author :: T,- -- | Preview of the content as an animation, if available; may be null- animation :: Animation,- -- | Preview of the content as an audio file, if available; may be null- audio :: Audio,- -- | Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null- document :: Document,- -- | Preview of the content as a sticker for small WEBP files, if available; may be null- sticker :: Sticker,- -- | Preview of the content as a video, if available; may be null- video :: Video,- -- | Preview of the content as a video note, if available; may be null- video_note :: VideoNote,- -- | Preview of the content as a voice note, if available; may be null- voice_note :: VoiceNote,- -- | Version of instant view, available for the web page (currently can be 1 or 2), 0 if none- instant_view_version :: I32- }- deriving (Show, Eq, Generic)-data BankCardActionOpenUrl- = -- | Describes an action associated with a bank card number - BankCardActionOpenUrl- { -- | Action text - text :: T,- -- | The URL to be opened- url :: T- }- deriving (Show, Eq, Generic)-data BankCardInfo- = -- | Information about a bank card - BankCardInfo- { -- | Title of the bank card description - title :: T,- -- | Actions that can be done with the bank card number- actions :: [BankCardActionOpenUrl]- }- deriving (Show, Eq, Generic)-data Address- = -- | Describes an address - Address- { -- | A two-letter ISO 3166-1 alpha-2 country code - country_code :: T,- -- | State, if applicable - state :: T,- -- | City - city :: T,- -- | First line of the address - street_line1 :: T,- -- | Second line of the address - street_line2 :: T,- -- | Address postal code- postal_code :: T- }- deriving (Show, Eq, Generic)-data LabeledPricePart- = -- | Portion of the price of a product (e.g., "delivery cost", "tax amount") - LabeledPricePart- { -- | Label for this portion of the product price - label :: T,- -- | Currency amount in minimal quantity of the currency- amount :: I53- }- deriving (Show, Eq, Generic)-data Invoice- = -- | Product invoice - Invoice- { -- | ISO 4217 currency code - currency :: T,- -- | A list of objects used to calculate the total price of the product - price_parts :: [LabeledPricePart],- -- | True, if the payment is a test payment- is_test :: Bool,- -- | True, if the user's name is needed for payment - need_name :: Bool,- -- | True, if the user's phone number is needed for payment - need_phone_number :: Bool,- -- | True, if the user's email address is needed for payment- need_email_address :: Bool,- -- | True, if the user's shipping address is needed for payment - need_shipping_address :: Bool,- -- | True, if the user's phone number will be sent to the provider- send_phone_number_to_provider :: Bool,- -- | True, if the user's email address will be sent to the provider - send_email_address_to_provider :: Bool,- -- | True, if the total price depends on the shipping method- is_flexible :: Bool- }- deriving (Show, Eq, Generic)-data OrderInfo- = -- | Order information - OrderInfo- { -- | Name of the user - name :: T,- -- | Phone number of the user - phone_number :: T,- -- | Email address of the user - email_address :: T,- -- | Shipping address for this order; may be null- shipping_address :: Address- }- deriving (Show, Eq, Generic)-data ShippingOption- = -- | One shipping option - ShippingOption- { -- | Shipping option identifier - id :: T,- -- | Option title - title :: T,- -- | A list of objects used to calculate the total shipping costs- price_parts :: [LabeledPricePart]- }- deriving (Show, Eq, Generic)-data SavedCredentials- = -- | Contains information about saved card credentials - SavedCredentials- { -- | Unique identifier of the saved credentials - id :: T,- -- | Title of the saved credentials- title :: T- }- deriving (Show, Eq, Generic)--- | Contains information about the payment method chosen by the user-data InputCredentials- = -- | Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password - InputCredentialsSaved- { -- | Identifier of the saved credentials- saved_credentials_id :: T- }- | -- | Applies if a user enters new credentials on a payment provider website - InputCredentialsNew- { -- | Contains JSON-encoded data with a credential identifier from the payment provider - data_ :: T,- -- | True, if the credential identifier can be saved on the server side- allow_save :: Bool- }- | -- | Applies if a user enters new credentials using Android Pay - InputCredentialsAndroidPay- { -- | JSON-encoded data with the credential identifier- data_ :: T- }- | -- | Applies if a user enters new credentials using Apple Pay - InputCredentialsApplePay- { -- | JSON-encoded data with the credential identifier- data_ :: T- }- deriving (Show, Eq, Generic)-data PaymentsProviderStripe- = -- | Stripe payment provider - PaymentsProviderStripe- { -- | Stripe API publishable key - publishable_key :: T,- -- | True, if the user country must be provided - need_country :: Bool,- -- | True, if the user ZIP/postal code must be provided - need_postal_code :: Bool,- -- | True, if the cardholder name must be provided- need_cardholder_name :: Bool- }- deriving (Show, Eq, Generic)-data PaymentForm- = -- | Contains information about an invoice payment form - PaymentForm- { -- | Full information of the invoice - invoice :: Invoice,- -- | Payment form URL - url :: T,- -- | Contains information about the payment provider, if available, to support it natively without the need for opening the URL; may be null- payments_provider :: PaymentsProviderStripe,- -- | Saved server-side order information; may be null - saved_order_info :: OrderInfo,- -- | Contains information about saved card credentials; may be null - saved_credentials :: SavedCredentials,- -- | True, if the user can choose to save credentials - can_save_credentials :: Bool,- -- | True, if the user will be able to save credentials protected by a password they set up- need_password :: Bool- }- deriving (Show, Eq, Generic)-data ValidatedOrderInfo- = -- | Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options - ValidatedOrderInfo- { -- | Temporary identifier of the order information - order_info_id :: T,- -- | Available shipping options- shipping_options :: [ShippingOption]- }- deriving (Show, Eq, Generic)-data PaymentResult- = -- | Contains the result of a payment request - PaymentResult- { -- | True, if the payment request was successful; otherwise the verification_url will be not empty - success :: Bool,- -- | URL for additional payment credentials verification- verification_url :: T- }- deriving (Show, Eq, Generic)-data PaymentReceipt- = -- | Contains information about a successful payment - PaymentReceipt- { -- | Point in time (Unix timestamp) when the payment was made - date :: I32,- -- | User identifier of the payment provider bot - payments_provider_user_id :: I32,- -- | Contains information about the invoice- invoice :: Invoice,- -- | Contains order information; may be null - order_info :: OrderInfo,- -- | Chosen shipping option; may be null - shipping_option :: ShippingOption,- -- | Title of the saved credentials- credentials_title :: T- }- deriving (Show, Eq, Generic)-data DatedFile- = -- | File with the date it was uploaded - DatedFile- { -- | The file - file :: File,- -- | Point in time (Unix timestamp) when the file was uploaded- date :: I32- }- deriving (Show, Eq, Generic)--- | Contains the type of a Telegram Passport element-data PassportElementType- = -- | A Telegram Passport element containing the user's personal details- PassportElementTypePersonalDetails- { - }- | -- | A Telegram Passport element containing the user's passport- PassportElementTypePassport- { - }- | -- | A Telegram Passport element containing the user's driver license- PassportElementTypeDriverLicense- { - }- | -- | A Telegram Passport element containing the user's identity card- PassportElementTypeIdentityCard- { - }- | -- | A Telegram Passport element containing the user's internal passport- PassportElementTypeInternalPassport- { - }- | -- | A Telegram Passport element containing the user's address- PassportElementTypeAddress- { - }- | -- | A Telegram Passport element containing the user's utility bill- PassportElementTypeUtilityBill- { - }- | -- | A Telegram Passport element containing the user's bank statement- PassportElementTypeBankStatement- { - }- | -- | A Telegram Passport element containing the user's rental agreement- PassportElementTypeRentalAgreement- { - }- | -- | A Telegram Passport element containing the registration page of the user's passport- PassportElementTypePassportRegistration- { - }- | -- | A Telegram Passport element containing the user's temporary registration- PassportElementTypeTemporaryRegistration- { - }- | -- | A Telegram Passport element containing the user's phone number- PassportElementTypePhoneNumber- { - }- | -- | A Telegram Passport element containing the user's email address- PassportElementTypeEmailAddress- { - }- deriving (Show, Eq, Generic)-data Date- = -- | Represents a date according to the Gregorian calendar - Date- { -- | Day of the month, 1-31 - day :: I32,- -- | Month, 1-12 - month :: I32,- -- | Year, 1-9999- year :: I32- }- deriving (Show, Eq, Generic)-data PersonalDetails- = -- | Contains the user's personal details- PersonalDetails- { -- | First name of the user written in English; 1-255 characters - first_name :: T,- -- | Middle name of the user written in English; 0-255 characters - middle_name :: T,- -- | Last name of the user written in English; 1-255 characters- last_name :: T,- -- | Native first name of the user; 1-255 characters - native_first_name :: T,- -- | Native middle name of the user; 0-255 characters - native_middle_name :: T,- -- | Native last name of the user; 1-255 characters- native_last_name :: T,- -- | Birthdate of the user - birthdate :: Date,- -- | Gender of the user, "male" or "female" - gender :: T,- -- | A two-letter ISO 3166-1 alpha-2 country code of the user's country - country_code :: T,- -- | A two-letter ISO 3166-1 alpha-2 country code of the user's residence country- residence_country_code :: T- }- deriving (Show, Eq, Generic)-data IdentityDocument- = -- | An identity document - IdentityDocument- { -- | Document number; 1-24 characters - number :: T,- -- | Document expiry date; may be null - expiry_date :: Date,- -- | Front side of the document- front_side :: DatedFile,- -- | Reverse side of the document; only for driver license and identity card - reverse_side :: DatedFile,- -- | Selfie with the document; may be null - selfie :: DatedFile,- -- | List of files containing a certified English translation of the document- translation :: [DatedFile]- }- deriving (Show, Eq, Generic)-data InputIdentityDocument- = -- | An identity document to be saved to Telegram Passport - InputIdentityDocument- { -- | Document number; 1-24 characters - number :: T,- -- | Document expiry date, if available - expiry_date :: Date,- -- | Front side of the document- front_side :: InputFile,- -- | Reverse side of the document; only for driver license and identity card - reverse_side :: InputFile,- -- | Selfie with the document, if available - selfie :: InputFile,- -- | List of files containing a certified English translation of the document- translation :: [InputFile]- }- deriving (Show, Eq, Generic)-data PersonalDocument- = -- | A personal document, containing some information about a user - PersonalDocument- { -- | List of files containing the pages of the document - files :: [DatedFile],- -- | List of files containing a certified English translation of the document- translation :: [DatedFile]- }- deriving (Show, Eq, Generic)-data InputPersonalDocument- = -- | A personal document to be saved to Telegram Passport - InputPersonalDocument- { -- | List of files containing the pages of the document - files :: [InputFile],- -- | List of files containing a certified English translation of the document- translation :: [InputFile]- }- deriving (Show, Eq, Generic)--- | Contains information about a Telegram Passport element-data PassportElement- = -- | A Telegram Passport element containing the user's personal details - PassportElementPersonalDetails- { -- | Personal details of the user- personal_details :: PersonalDetails- }- | -- | A Telegram Passport element containing the user's passport - PassportElementPassport- { -- | Passport- passport :: IdentityDocument- }- | -- | A Telegram Passport element containing the user's driver license - PassportElementDriverLicense- { -- | Driver license- driver_license :: IdentityDocument- }- | -- | A Telegram Passport element containing the user's identity card - PassportElementIdentityCard- { -- | Identity card- identity_card :: IdentityDocument- }- | -- | A Telegram Passport element containing the user's internal passport - PassportElementInternalPassport- { -- | Internal passport- internal_passport :: IdentityDocument- }- | -- | A Telegram Passport element containing the user's address - PassportElementAddress- { -- | Address- address :: Address- }- | -- | A Telegram Passport element containing the user's utility bill - PassportElementUtilityBill- { -- | Utility bill- utility_bill :: PersonalDocument- }- | -- | A Telegram Passport element containing the user's bank statement - PassportElementBankStatement- { -- | Bank statement- bank_statement :: PersonalDocument- }- | -- | A Telegram Passport element containing the user's rental agreement - PassportElementRentalAgreement- { -- | Rental agreement- rental_agreement :: PersonalDocument- }- | -- | A Telegram Passport element containing the user's passport registration pages - PassportElementPassportRegistration- { -- | Passport registration pages- passport_registration :: PersonalDocument- }- | -- | A Telegram Passport element containing the user's temporary registration - PassportElementTemporaryRegistration- { -- | Temporary registration- temporary_registration :: PersonalDocument- }- | -- | A Telegram Passport element containing the user's phone number - PassportElementPhoneNumber- { -- | Phone number- phone_number :: T- }- | -- | A Telegram Passport element containing the user's email address - PassportElementEmailAddress- { -- | Email address- email_address :: T- }- deriving (Show, Eq, Generic)--- | Contains information about a Telegram Passport element to be saved-data InputPassportElement- = -- | A Telegram Passport element to be saved containing the user's personal details - InputPassportElementPersonalDetails- { -- | Personal details of the user- personal_details :: PersonalDetails- }- | -- | A Telegram Passport element to be saved containing the user's passport - InputPassportElementPassport- { -- | The passport to be saved- passport :: InputIdentityDocument- }- | -- | A Telegram Passport element to be saved containing the user's driver license - InputPassportElementDriverLicense- { -- | The driver license to be saved- driver_license :: InputIdentityDocument- }- | -- | A Telegram Passport element to be saved containing the user's identity card - InputPassportElementIdentityCard- { -- | The identity card to be saved- identity_card :: InputIdentityDocument- }- | -- | A Telegram Passport element to be saved containing the user's internal passport - InputPassportElementInternalPassport- { -- | The internal passport to be saved- internal_passport :: InputIdentityDocument- }- | -- | A Telegram Passport element to be saved containing the user's address - InputPassportElementAddress- { -- | The address to be saved- address :: Address- }- | -- | A Telegram Passport element to be saved containing the user's utility bill - InputPassportElementUtilityBill- { -- | The utility bill to be saved- utility_bill :: InputPersonalDocument- }- | -- | A Telegram Passport element to be saved containing the user's bank statement - InputPassportElementBankStatement- { -- | The bank statement to be saved- bank_statement :: InputPersonalDocument- }- | -- | A Telegram Passport element to be saved containing the user's rental agreement - InputPassportElementRentalAgreement- { -- | The rental agreement to be saved- rental_agreement :: InputPersonalDocument- }- | -- | A Telegram Passport element to be saved containing the user's passport registration - InputPassportElementPassportRegistration- { -- | The passport registration page to be saved- passport_registration :: InputPersonalDocument- }- | -- | A Telegram Passport element to be saved containing the user's temporary registration - InputPassportElementTemporaryRegistration- { -- | The temporary registration document to be saved- temporary_registration :: InputPersonalDocument- }- | -- | A Telegram Passport element to be saved containing the user's phone number - InputPassportElementPhoneNumber- { -- | The phone number to be saved- phone_number :: T- }- | -- | A Telegram Passport element to be saved containing the user's email address - InputPassportElementEmailAddress- { -- | The email address to be saved- email_address :: T- }- deriving (Show, Eq, Generic)-data PassportElements- = -- | Contains information about saved Telegram Passport elements - PassportElements- { -- | Telegram Passport elements- elements :: [PassportElement]- }- deriving (Show, Eq, Generic)--- | Contains the description of an error in a Telegram Passport element-data PassportElementErrorSource- = -- | The element contains an error in an unspecified place. The error will be considered resolved when new data is added- PassportElementErrorSourceUnspecified- { - }- | -- | One of the data fields contains an error. The error will be considered resolved when the value of the field changes - PassportElementErrorSourceDataField- { -- | Field name- field_name :: T- }- | -- | The front side of the document contains an error. The error will be considered resolved when the file with the front side changes- PassportElementErrorSourceFrontSide- { - }- | -- | The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes- PassportElementErrorSourceReverseSide- { - }- | -- | The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes- PassportElementErrorSourceSelfie- { - }- | -- | One of files with the translation of the document contains an error. The error will be considered resolved when the file changes - PassportElementErrorSourceTranslationFile- { -- | Index of a file with the error- file_index :: I32- }- | -- | The translation of the document contains an error. The error will be considered resolved when the list of translation files changes- PassportElementErrorSourceTranslationFiles- { - }- | -- | The file contains an error. The error will be considered resolved when the file changes - PassportElementErrorSourceFile- { -- | Index of a file with the error- file_index :: I32- }- | -- | The list of attached files contains an error. The error will be considered resolved when the list of files changes- PassportElementErrorSourceFiles- { - }- deriving (Show, Eq, Generic)-data PassportElementError- = -- | Contains the description of an error in a Telegram Passport element - PassportElementError- { -- | Type of the Telegram Passport element which has the error - type_ :: PassportElementType,- -- | Error message - message :: T,- -- | Error source- source :: PassportElementErrorSource- }- deriving (Show, Eq, Generic)-data PassportSuitableElement- = -- | Contains information about a Telegram Passport element that was requested by a service - PassportSuitableElement- { -- | Type of the element - type_ :: PassportElementType,- -- | True, if a selfie is required with the identity document- is_selfie_required :: Bool,- -- | True, if a certified English translation is required with the document - is_translation_required :: Bool,- -- | True, if personal details must include the user's name in the language of their country of residence- is_native_name_required :: Bool- }- deriving (Show, Eq, Generic)-data PassportRequiredElement- = -- | Contains a description of the required Telegram Passport element that was requested by a service - PassportRequiredElement- { -- | List of Telegram Passport elements any of which is enough to provide- suitable_elements :: [PassportSuitableElement]- }- deriving (Show, Eq, Generic)-data PassportAuthorizationForm- = -- | Contains information about a Telegram Passport authorization form that was requested - PassportAuthorizationForm- { -- | Unique identifier of the authorization form- id :: I32,- -- | Information about the Telegram Passport elements that need to be provided to complete the form- required_elements :: [PassportRequiredElement],- -- | URL for the privacy policy of the service; may be empty- privacy_policy_url :: T- }- deriving (Show, Eq, Generic)-data PassportElementsWithErrors- = -- | Contains information about a Telegram Passport elements and corresponding errors - PassportElementsWithErrors- { -- | Telegram Passport elements - elements :: [PassportElement],- -- | Errors in the elements that are already available- errors :: [PassportElementError]- }- deriving (Show, Eq, Generic)-data EncryptedCredentials- = -- | Contains encrypted Telegram Passport data credentials - EncryptedCredentials- { -- | The encrypted credentials - data_ :: ByteString64,- -- | The decrypted data hash - hash :: ByteString64,- -- | Secret for data decryption, encrypted with the service's public key- secret :: ByteString64- }- deriving (Show, Eq, Generic)-data EncryptedPassportElement- = -- | Contains information about an encrypted Telegram Passport element; for bots only - EncryptedPassportElement- { -- | Type of Telegram Passport element - type_ :: PassportElementType,- -- | Encrypted JSON-encoded data about the user - data_ :: ByteString64,- -- | The front side of an identity document - front_side :: DatedFile,- -- | The reverse side of an identity document; may be null - reverse_side :: DatedFile,- -- | Selfie with the document; may be null - selfie :: DatedFile,- -- | List of files containing a certified English translation of the document - translation :: [DatedFile],- -- | List of attached files - files :: [DatedFile],- -- | Unencrypted data, phone number or email address - value :: T,- -- | Hash of the entire element- hash :: T- }- deriving (Show, Eq, Generic)--- | Contains the description of an error in a Telegram Passport element; for bots only-data InputPassportElementErrorSource- = -- | The element contains an error in an unspecified place. The error will be considered resolved when new data is added - InputPassportElementErrorSourceUnspecified- { -- | Current hash of the entire element- element_hash :: ByteString64- }- | -- | A data field contains an error. The error is considered resolved when the field's value changes - InputPassportElementErrorSourceDataField- { -- | Field name - field_name :: T,- -- | Current data hash- data_hash :: ByteString64- }- | -- | The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes - InputPassportElementErrorSourceFrontSide- { -- | Current hash of the file containing the front side- file_hash :: ByteString64- }- | -- | The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes - InputPassportElementErrorSourceReverseSide- { -- | Current hash of the file containing the reverse side- file_hash :: ByteString64- }- | -- | The selfie contains an error. The error is considered resolved when the file with the selfie changes - InputPassportElementErrorSourceSelfie- { -- | Current hash of the file containing the selfie- file_hash :: ByteString64- }- | -- | One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes - InputPassportElementErrorSourceTranslationFile- { -- | Current hash of the file containing the translation- file_hash :: ByteString64- }- | -- | The translation of the document contains an error. The error is considered resolved when the list of files changes - InputPassportElementErrorSourceTranslationFiles- { -- | Current hashes of all files with the translation- file_hashes :: [ByteString64]- }- | -- | The file contains an error. The error is considered resolved when the file changes - InputPassportElementErrorSourceFile- { -- | Current hash of the file which has the error- file_hash :: ByteString64- }- | -- | The list of attached files contains an error. The error is considered resolved when the file list changes - InputPassportElementErrorSourceFiles- { -- | Current hashes of all attached files- file_hashes :: [ByteString64]- }- deriving (Show, Eq, Generic)-data InputPassportElementError- = -- | Contains the description of an error in a Telegram Passport element; for bots only - InputPassportElementError- { -- | Type of Telegram Passport element that has the error - type_ :: PassportElementType,- -- | Error message - message :: T,- -- | Error source- source :: InputPassportElementErrorSource- }- deriving (Show, Eq, Generic)--- | Contains the content of a message-data MessageContent- = -- | A text message - MessageText- { -- | Text of the message - text_2 :: FormattedText,- -- | A preview of the web page that's mentioned in the text; may be null- web_page :: WebPage- }- | -- | An animation message (GIF-style). - MessageAnimation- { -- | The animation description - animation :: Animation,- -- | Animation caption - caption :: FormattedText,- -- | True, if the animation thumbnail must be blurred and the animation must be shown only while tapped- is_secret :: Bool- }- | -- | An audio message - MessageAudio- { -- | The audio description - audio :: Audio,- -- | Audio caption- caption :: FormattedText- }- | -- | A document message (general file) - MessageDocument- { -- | The document description - document :: Document,- -- | Document caption- caption :: FormattedText- }- | -- | A photo message - MessagePhoto- { -- | The photo description - photo :: Photo,- -- | Photo caption - caption :: FormattedText,- -- | True, if the photo must be blurred and must be shown only while tapped- is_secret :: Bool- }- | -- | An expired photo message (self-destructed after TTL has elapsed)- MessageExpiredPhoto- { - }- | -- | A sticker message - MessageSticker- { -- | The sticker description- sticker :: Sticker- }- | -- | A video message - MessageVideo- { -- | The video description - video :: Video,- -- | Video caption - caption :: FormattedText,- -- | True, if the video thumbnail must be blurred and the video must be shown only while tapped- is_secret :: Bool- }- | -- | An expired video message (self-destructed after TTL has elapsed)- MessageExpiredVideo- { - }- | -- | A video note message - MessageVideoNote- { -- | The video note description - video_note :: VideoNote,- -- | True, if at least one of the recipients has viewed the video note - is_viewed :: Bool,- -- | True, if the video note thumbnail must be blurred and the video note must be shown only while tapped- is_secret :: Bool- }- | -- | A voice note message - MessageVoiceNote- { -- | The voice note description - voice_note :: VoiceNote,- -- | Voice note caption - caption :: FormattedText,- -- | True, if at least one of the recipients has listened to the voice note- is_listened :: Bool- }- | -- | A message with a location - MessageLocation- { -- | The location description - location :: Location,- -- | Time relative to the message sent date until which the location can be updated, in seconds- live_period :: I32,- -- | Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes- expires_in :: I32- }- | -- | A message with information about a venue - MessageVenue- { -- | The venue description- venue :: Venue- }- | -- | A message with a user contact - MessageContact- { -- | The contact description- contact :: Contact- }- | -- | A dice message. The dice value is randomly generated by the server- MessageDice- { -- | The animated sticker with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known- initial_state_sticker :: Sticker,- -- | The animated sticker with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known- final_state_sticker :: Sticker,- -- | Emoji on which the dice throw animation is based- emoji :: T,- -- | The dice value. If the value is 0, the dice don't have final state yet- value :: I32,- -- | Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded- success_animation_frame_number :: I32- }- | -- | A message with a game - MessageGame- { -- | The game description- game :: Game- }- | -- | A message with a poll - MessagePoll- { -- | The poll description- poll :: Poll- }- | -- | A message with an invoice from a bot - MessageInvoice- { -- | Product title - title :: T,- -- | A message with an invoice from a bot - description :: T,- -- | Product photo; may be null - photo :: Photo,- -- | Currency for the product price - currency :: T,- -- | Product total price in the minimal quantity of the currency- total_amount :: I53,- -- | Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} - start_parameter :: T,- -- | True, if the invoice is a test invoice- is_test :: Bool,- -- | True, if the shipping address should be specified - need_shipping_address :: Bool,- -- | The identifier of the message with the receipt, after the product has been purchased- receipt_message_id :: I53- }- | -- | A message with information about an ended call - MessageCall- { -- | Reason why the call was discarded - discard_reason :: CallDiscardReason,- -- | Call duration, in seconds- duration :: I32- }- | -- | A newly created basic group - MessageBasicGroupChatCreate- { -- | Title of the basic group - title :: T,- -- | User identifiers of members in the basic group- member_user_ids :: [I32]- }- | -- | A newly created supergroup or channel - MessageSupergroupChatCreate- { -- | Title of the supergroup or channel- title :: T- }- | -- | An updated chat title - MessageChatChangeTitle- { -- | New chat title- title :: T- }- | -- | An updated chat photo - MessageChatChangePhoto- { -- | New chat photo- photo :: Photo- }- | -- | A deleted chat photo- MessageChatDeletePhoto- { - }- | -- | New chat members were added - MessageChatAddMembers- { -- | User identifiers of the new members- member_user_ids :: [I32]- }- | -- | A new member joined the chat by invite link- MessageChatJoinByLink- { - }- | -- | A chat member was deleted - MessageChatDeleteMember- { -- | User identifier of the deleted chat member- user_id :: I32- }- | -- | A basic group was upgraded to a supergroup and was deactivated as the result - MessageChatUpgradeTo- { -- | Identifier of the supergroup to which the basic group was upgraded- supergroup_id :: I32- }- | -- | A supergroup has been created from a basic group - MessageChatUpgradeFrom- { -- | Title of the newly created supergroup - title :: T,- -- | The identifier of the original basic group- basic_group_id :: I32- }- | -- | A message has been pinned - MessagePinMessage- { -- | Identifier of the pinned message, can be an identifier of a deleted message or 0- message_id :: I53- }- | -- | A screenshot of a message in the chat has been taken- MessageScreenshotTaken- { - }- | -- | The TTL (Time To Live) setting messages in a secret chat has been changed - MessageChatSetTtl- { -- | New TTL- ttl :: I32- }- | -- | A non-standard action has happened in the chat - MessageCustomServiceAction- { -- | Message text to be shown in the chat- text :: T- }- | -- | A new high score was achieved in a game - MessageGameScore- { -- | Identifier of the message with the game, can be an identifier of a deleted message - game_message_id :: I53,- -- | Identifier of the game; may be different from the games presented in the message with the game - game_id :: I64,- -- | New score- score :: I32- }- | -- | A payment has been completed - MessagePaymentSuccessful- { -- | Identifier of the message with the corresponding invoice; can be an identifier of a deleted message - invoice_message_id :: I53,- -- | Currency for the price of the product - currency :: T,- -- | Total price for the product, in the minimal quantity of the currency- total_amount :: I53- }- | -- | A payment has been completed; for bots only - MessagePaymentSuccessfulBot- { -- | Identifier of the message with the corresponding invoice; can be an identifier of a deleted message - invoice_message_id :: I53,- -- | Currency for price of the product- currency :: T,- -- | Total price for the product, in the minimal quantity of the currency - total_amount :: I53,- -- | Invoice payload - invoice_payload :: ByteString64,- -- | Identifier of the shipping option chosen by the user; may be empty if not applicable - shipping_option_id :: T,- -- | Information about the order; may be null- order_info :: OrderInfo,- -- | Telegram payment identifier - telegram_payment_charge_id :: T,- -- | Provider payment identifier- provider_payment_charge_id :: T- }- | -- | A contact has registered with Telegram- MessageContactRegistered- { - }- | -- | The current user has connected a website by logging in using Telegram Login Widget on it - MessageWebsiteConnected- { -- | Domain name of the connected website- domain_name :: T- }- | -- | Telegram Passport data has been sent - MessagePassportDataSent- { -- | List of Telegram Passport element types sent- types :: [PassportElementType]- }- | -- | Telegram Passport data has been received; for bots only - MessagePassportDataReceived- { -- | List of received Telegram Passport elements - elements :: [EncryptedPassportElement],- -- | Encrypted data credentials- credentials :: EncryptedCredentials- }- | -- | Message content that is not supported by the client- MessageUnsupported- { - }- deriving (Show, Eq, Generic)--- | Represents a part of the text which must be formatted differently-data TextEntityType- = -- | A mention of a user by their username- TextEntityTypeMention- { - }- | -- | A hashtag text, beginning with "#"- TextEntityTypeHashtag- { - }- | -- | A cashtag text, beginning with "$" and consisting of capital english letters (i.e. "$USD")- TextEntityTypeCashtag- { - }- | -- | A bot command, beginning with "/". This shouldn't be highlighted if there are no bots in the chat- TextEntityTypeBotCommand- { - }- | -- | An HTTP URL- TextEntityTypeUrl- { - }- | -- | An email address- TextEntityTypeEmailAddress- { - }- | -- | A phone number- TextEntityTypePhoneNumber- { - }- | -- | A bank card number. The getBankCardInfo method can be used to get information about the bank card- TextEntityTypeBankCardNumber- { - }- | -- | A bold text- TextEntityTypeBold- { - }- | -- | An italic text- TextEntityTypeItalic- { - }- | -- | An underlined text- TextEntityTypeUnderline- { - }- | -- | A strikethrough text- TextEntityTypeStrikethrough- { - }- | -- | Text that must be formatted as if inside a code HTML tag- TextEntityTypeCode- { - }- | -- | Text that must be formatted as if inside a pre HTML tag- TextEntityTypePre- { - }- | -- | Text that must be formatted as if inside pre, and code HTML tags - TextEntityTypePreCode- { -- | Programming language of the code; as defined by the sender- language :: T- }- | -- | A text description shown instead of a raw URL - TextEntityTypeTextUrl- { -- | HTTP or tg:// URL to be opened when the link is clicked- url :: T- }- | -- | A text shows instead of a raw mention of the user (e.g., when the user has no username) - TextEntityTypeMentionName- { -- | Identifier of the mentioned user- user_id :: I32- }- deriving (Show, Eq, Generic)-data InputThumbnail- = -- | A thumbnail to be sent along with a file; should be in JPEG or WEBP format for stickers, and less than 200 KB in size - InputThumbnail- { -- | Thumbnail file to send. Sending thumbnails by file_id is currently not supported- thumbnail :: InputFile,- -- | Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown - width :: I32,- -- | Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown- height :: I32- }- deriving (Show, Eq, Generic)--- | Contains information about the time when a scheduled message will be sent-data MessageSchedulingState- = -- | The message will be sent at the specified date - MessageSchedulingStateSendAtDate- { -- | Date the message will be sent. The date must be within 367 days in the future- send_date :: I32- }- | -- | 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- { - }- deriving (Show, Eq, Generic)-data SendMessageOptions- = -- | Options to be used when a message is send- SendMessageOptions- { -- | Pass true to disable notification for the message. Must be false if the message is sent to a secret chat- disable_notification :: Bool,- -- | Pass true if the message is sent from the background- from_background :: Bool,- -- | Message scheduling state. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled- scheduling_state :: MessageSchedulingState- }- deriving (Show, Eq, Generic)--- | The content of a message to send-data InputMessageContent- = -- | A text message - InputMessageText- { -- | Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually- text :: FormattedText,- -- | True, if rich web page previews for URLs in the message text should be disabled - disable_web_page_preview :: Bool,- -- | True, if a chat message draft should be deleted- clear_draft :: Bool- }- | -- | An animation message (GIF-style). - InputMessageAnimation- { -- | Animation file to be sent - animation :: InputFile,- -- | Animation thumbnail, if available - thumbnail :: InputThumbnail,- -- | Duration of the animation, in seconds - duration :: I32,- -- | Width of the animation; may be replaced by the server - width :: I32,- -- | Height of the animation; may be replaced by the server - height :: I32,- -- | Animation caption; 0-GetOption("message_caption_length_max") characters- caption :: FormattedText- }- | -- | An audio message - InputMessageAudio- { -- | Audio file to be sent - audio :: InputFile,- -- | Thumbnail of the cover for the album, if available - album_cover_thumbnail :: InputThumbnail,- -- | Duration of the audio, in seconds; may be replaced by the server - duration :: I32,- -- | Title of the audio; 0-64 characters; may be replaced by the server- title :: T,- -- | Performer of the audio; 0-64 characters, may be replaced by the server - performer :: T,- -- | Audio caption; 0-GetOption("message_caption_length_max") characters- caption :: FormattedText- }- | -- | A document message (general file) - InputMessageDocument- { -- | Document to be sent - document :: InputFile,- -- | Document thumbnail, if available - thumbnail :: InputThumbnail,- -- | Document caption; 0-GetOption("message_caption_length_max") characters- caption :: FormattedText- }- | -- | A photo message - InputMessagePhoto- { -- | Photo to send - photo :: InputFile,- -- | Photo thumbnail to be sent, this is sent to the other party in secret chats only - thumbnail :: InputThumbnail,- -- | File identifiers of the stickers added to the photo, if applicable - added_sticker_file_ids :: [I32],- -- | Photo width - width :: I32,- -- | Photo height - height :: I32,- -- | Photo caption; 0-GetOption("message_caption_length_max") characters- caption :: FormattedText,- -- | Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats- ttl :: I32- }- | -- | A sticker message - InputMessageSticker- { -- | Sticker to be sent - sticker :: InputFile,- -- | Sticker thumbnail, if available - thumbnail :: InputThumbnail,- -- | Sticker width - width :: I32,- -- | Sticker height- height :: I32- }- | -- | A video message - InputMessageVideo- { -- | Video to be sent - video :: InputFile,- -- | Video thumbnail, if available - thumbnail :: InputThumbnail,- -- | File identifiers of the stickers added to the video, if applicable- added_sticker_file_ids :: [I32],- -- | Duration of the video, in seconds - duration :: I32,- -- | Video width - width :: I32,- -- | Video height - height :: I32,- -- | True, if the video should be tried to be streamed- supports_streaming :: Bool,- -- | Video caption; 0-GetOption("message_caption_length_max") characters - caption :: FormattedText,- -- | Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats- ttl :: I32- }- | -- | A video note message - InputMessageVideoNote- { -- | Video note to be sent - video_note :: InputFile,- -- | Video thumbnail, if available - thumbnail :: InputThumbnail,- -- | Duration of the video, in seconds - duration :: I32,- -- | Video width and height; must be positive and not greater than 640- length :: I32- }- | -- | A voice note message - InputMessageVoiceNote- { -- | Voice note to be sent - voice_note :: InputFile,- -- | Duration of the voice note, in seconds - duration :: I32,- -- | Waveform representation of the voice note, in 5-bit format - waveform :: ByteString64,- -- | Voice note caption; 0-GetOption("message_caption_length_max") characters- caption :: FormattedText- }- | -- | A message with a location - InputMessageLocation- { -- | Location to be sent - location :: Location,- -- | Period for which the location can be updated, in seconds; should be between 60 and 86400 for a live location and 0 otherwise- live_period :: I32- }- | -- | A message with information about a venue - InputMessageVenue- { -- | Venue to send- venue :: Venue- }- | -- | A message containing a user contact - InputMessageContact- { -- | Contact to send- contact :: Contact- }- | -- | A dice message - InputMessageDice- { -- | Emoji on which the dice throw animation is based - emoji :: T,- -- | True, if a chat message draft should be deleted- clear_draft :: Bool- }- | -- | A message with a game; not supported for channels or secret chats - InputMessageGame- { -- | User identifier of the bot that owns the game - bot_user_id :: I32,- -- | Short name of the game- game_short_name :: T- }- | -- | A message with an invoice; can be used only by bots and only in private chats - InputMessageInvoice- { -- | Invoice - invoice :: Invoice,- -- | Product title; 1-32 characters - title :: T,- -- | A message with an invoice; can be used only by bots and only in private chats - description :: T,- -- | Product photo URL; optional - photo_url :: T,- -- | Product photo size - photo_size :: I32,- -- | Product photo width - photo_width :: I32,- -- | Product photo height- photo_height :: I32,- -- | The invoice payload - payload :: ByteString64,- -- | Payment provider token - provider_token :: T,- -- | JSON-encoded data about the invoice, which will be shared with the payment provider - provider_data :: T,- -- | Unique invoice bot start_parameter for the generation of this invoice- start_parameter :: T- }- | -- | A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot - InputMessagePoll- { -- | Poll question, 1-255 characters - question :: T,- -- | List of poll answer options, 2-10 strings 1-100 characters each- options :: [T],- -- | True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels - is_anonymous :: Bool,- -- | Type of the poll- type_ :: PollType,- -- | Amount of time the poll will be active after creation, in seconds; for bots only- open_period :: I32,- -- | Point in time (Unix timestamp) when the poll will be automatically closed; for bots only- close_date :: I32,- -- | True, if the poll needs to be sent already closed; for bots only- is_closed :: Bool- }- | -- | A forwarded message - InputMessageForwarded- { -- | Identifier for the chat this forwarded message came from - from_chat_id :: I53,- -- | Identifier of the message to forward- message_id :: I53,- -- | True, if a game message should be shared within a launched game; applies only to game messages- in_game_share :: Bool,- -- | True, if content of the message needs to be copied without a link to the original message. Always true if the message is forwarded to a secret chat- send_copy :: Bool,- -- | True, if media caption of the message copy needs to be removed. Ignored if send_copy is false- remove_caption :: Bool- }- deriving (Show, Eq, Generic)--- | Represents a filter for message search results-data SearchMessagesFilter- = -- | Returns all found messages, no filter is applied- SearchMessagesFilterEmpty- { - }- | -- | Returns only animation messages- SearchMessagesFilterAnimation- { - }- | -- | Returns only audio messages- SearchMessagesFilterAudio- { - }- | -- | Returns only document messages- SearchMessagesFilterDocument- { - }- | -- | Returns only photo messages- SearchMessagesFilterPhoto- { - }- | -- | Returns only video messages- SearchMessagesFilterVideo- { - }- | -- | Returns only voice note messages- SearchMessagesFilterVoiceNote- { - }- | -- | Returns only photo and video messages- SearchMessagesFilterPhotoAndVideo- { - }- | -- | Returns only messages containing URLs- SearchMessagesFilterUrl- { - }- | -- | Returns only messages containing chat photos- SearchMessagesFilterChatPhoto- { - }- | -- | Returns only call messages- SearchMessagesFilterCall- { - }- | -- | Returns only incoming call messages with missed/declined discard reasons- SearchMessagesFilterMissedCall- { - }- | -- | Returns only video note messages- SearchMessagesFilterVideoNote- { - }- | -- | Returns only voice and video note messages- SearchMessagesFilterVoiceAndVideoNote- { - }- | -- | Returns only messages with mentions of the current user, or messages that are replies to their messages- SearchMessagesFilterMention- { - }- | -- | Returns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query or by the sending user- SearchMessagesFilterUnreadMention- { - }- | -- | Returns only failed to send messages. This filter can be used only if the message database is used- SearchMessagesFilterFailedToSend- { - }- deriving (Show, Eq, Generic)--- | Describes the different types of activity in a chat-data ChatAction- = -- | The user is typing a message- ChatActionTyping- { - }- | -- | The user is recording a video- ChatActionRecordingVideo- { - }- | -- | The user is uploading a video - ChatActionUploadingVideo- { -- | Upload progress, as a percentage- progress :: I32- }- | -- | The user is recording a voice note- ChatActionRecordingVoiceNote- { - }- | -- | The user is uploading a voice note - ChatActionUploadingVoiceNote- { -- | Upload progress, as a percentage- progress :: I32- }- | -- | The user is uploading a photo - ChatActionUploadingPhoto- { -- | Upload progress, as a percentage- progress :: I32- }- | -- | The user is uploading a document - ChatActionUploadingDocument- { -- | Upload progress, as a percentage- progress :: I32- }- | -- | The user is picking a location or venue to send- ChatActionChoosingLocation- { - }- | -- | The user is picking a contact to send- ChatActionChoosingContact- { - }- | -- | The user has started to play a game- ChatActionStartPlayingGame- { - }- | -- | The user is recording a video note- ChatActionRecordingVideoNote- { - }- | -- | The user is uploading a video note - ChatActionUploadingVideoNote- { -- | Upload progress, as a percentage- progress :: I32- }- | -- | The user has cancelled the previous action- ChatActionCancel- { - }- deriving (Show, Eq, Generic)--- | Describes the last time the user was online-data UserStatus- = -- | The user status was never changed- UserStatusEmpty- { - }- | -- | The user is online - UserStatusOnline- { -- | Point in time (Unix timestamp) when the user's online status will expire- expires :: I32- }- | -- | The user is offline - UserStatusOffline- { -- | Point in time (Unix timestamp) when the user was last online- was_online :: I32- }- | -- | The user was online recently- UserStatusRecently- { - }- | -- | The user is offline, but was online last week- UserStatusLastWeek- { - }- | -- | The user is offline, but was online last month- UserStatusLastMonth- { - }- deriving (Show, Eq, Generic)-data Stickers- = -- | Represents a list of stickers - Stickers- { -- | List of stickers- stickers :: [Sticker]- }- deriving (Show, Eq, Generic)-data Emojis- = -- | Represents a list of emoji - Emojis- { -- | List of emojis- emojis :: [T]- }- deriving (Show, Eq, Generic)-data StickerSet- = -- | Represents a sticker set- StickerSet- { -- | Identifier of the sticker set - id :: I64,- -- | Title of the sticker set - title :: T,- -- | Name of the sticker set - name :: T,- -- | Sticker set thumbnail in WEBP format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed- thumbnail :: PhotoSize,- -- | True, if the sticker set has been installed by the current user - is_installed :: Bool,- -- | True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously- is_archived :: Bool,- -- | True, if the sticker set is official - is_official :: Bool,- -- | True, is the stickers in the set are animated - is_animated :: Bool,- -- | True, if the stickers in the set are masks - is_masks :: Bool,- -- | True for already viewed trending sticker sets- is_viewed :: Bool,- -- | List of stickers in this set - stickers :: [Sticker],- -- | A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object- emojis :: [Emojis]- }- deriving (Show, Eq, Generic)-data StickerSetInfo- = -- | Represents short information about a sticker set- StickerSetInfo- { -- | Identifier of the sticker set - id :: I64,- -- | Title of the sticker set - title :: T,- -- | Name of the sticker set - name :: T,- -- | Sticker set thumbnail in WEBP format with width and height 100; may be null- thumbnail :: PhotoSize,- -- | True, if the sticker set has been installed by current user - is_installed :: Bool,- -- | True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously- is_archived :: Bool,- -- | True, if the sticker set is official - is_official :: Bool,- -- | True, is the stickers in the set are animated - is_animated :: Bool,- -- | True, if the stickers in the set are masks - is_masks :: Bool,- -- | True for already viewed trending sticker sets- is_viewed :: Bool,- -- | Total number of stickers in the set - size :: I32,- -- | Contains up to the first 5 stickers from the set, depending on the context. If the client needs more stickers the full set should be requested- covers :: [Sticker]- }- deriving (Show, Eq, Generic)-data StickerSets- = -- | Represents a list of sticker sets - StickerSets- { -- | Approximate total number of sticker sets found - total_count :: I32,- -- | List of sticker sets- sets :: [StickerSetInfo]- }- deriving (Show, Eq, Generic)--- | Describes the reason why a call was discarded-data CallDiscardReason- = -- | The call wasn't discarded, or the reason is unknown- CallDiscardReasonEmpty- { - }- | -- | The call was ended before the conversation started. It was cancelled by the caller or missed by the other party- CallDiscardReasonMissed- { - }- | -- | The call was ended before the conversation started. It was declined by the other party- CallDiscardReasonDeclined- { - }- | -- | The call was ended during the conversation because the users were disconnected- CallDiscardReasonDisconnected- { - }- | -- | The call was ended because one of the parties hung up- CallDiscardReasonHungUp- { - }- deriving (Show, Eq, Generic)-data CallProtocol- = -- | Specifies the supported call protocols- CallProtocol- { -- | True, if UDP peer-to-peer connections are supported- udp_p2p :: Bool,- -- | True, if connection through UDP reflectors is supported- udp_reflector :: Bool,- -- | The minimum supported API layer; use 65- min_layer :: I32,- -- | The maximum supported API layer; use 65- max_layer :: I32,- -- | List of supported libtgvoip versions- library_versions :: [T]- }- deriving (Show, Eq, Generic)-data CallConnection- = -- | Describes the address of UDP reflectors - CallConnection- { -- | Reflector identifier - id :: I64,- -- | IPv4 reflector address - ip :: T,- -- | IPv6 reflector address - ipv6 :: T,- -- | Reflector port number - port :: I32,- -- | Connection peer tag- peer_tag :: ByteString64- }- deriving (Show, Eq, Generic)-data CallId- = -- | Contains the call identifier - CallId- { -- | Call identifier- id :: I32- }- deriving (Show, Eq, Generic)--- | Describes the current call state-data CallState- = -- | The call is pending, waiting to be accepted by a user - CallStatePending- { -- | True, if the call has already been created by the server - is_created :: Bool,- -- | True, if the call has already been received by the other party- is_received :: Bool- }- | -- | The call has been answered and encryption keys are being exchanged- CallStateExchangingKeys- { - }- | -- | The call is ready to use - CallStateReady- { -- | Call protocols supported by the peer - protocol :: CallProtocol,- -- | Available UDP reflectors - connections :: [CallConnection],- -- | A JSON-encoded call config - config :: T,- -- | Call encryption key - encryption_key :: ByteString64,- -- | Encryption key emojis fingerprint - emojis :: [T],- -- | True, if peer-to-peer connection is allowed by users privacy settings- allow_p2p :: Bool- }- | -- | The call is hanging up after discardCall has been called- CallStateHangingUp- { - }- | -- | The call has ended successfully - CallStateDiscarded- { -- | The reason, why the call has ended - reason :: CallDiscardReason,- -- | True, if the call rating should be sent to the server - need_rating :: Bool,- -- | True, if the call debug information should be sent to the server- need_debug_information :: Bool- }- | -- | The call has ended with an error - CallStateError- { -- | Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout- error :: Error- }- deriving (Show, Eq, Generic)--- | Describes the exact type of a problem with a call-data CallProblem- = -- | The user heard their own voice- CallProblemEcho- { - }- | -- | The user heard background noise- CallProblemNoise- { - }- | -- | The other side kept disappearing- CallProblemInterruptions- { - }- | -- | The speech was distorted- CallProblemDistortedSpeech- { - }- | -- | The user couldn't hear the other side- CallProblemSilentLocal- { - }- | -- | The other side couldn't hear the user- CallProblemSilentRemote- { - }- | -- | The call ended unexpectedly- CallProblemDropped- { - }- deriving (Show, Eq, Generic)-data Call- = -- | Describes a call - Call- { -- | Call identifier, not persistent - id :: I32,- -- | Peer user identifier - user_id :: I32,- -- | True, if the call is outgoing - is_outgoing :: Bool,- -- | Call state- state :: CallState- }- deriving (Show, Eq, Generic)-data PhoneNumberAuthenticationSettings- = -- | Contains settings for the authentication of the user's phone number- PhoneNumberAuthenticationSettings- { -- | Pass true if the authentication code may be sent via flash call to the specified phone number- allow_flash_call :: Bool,- -- | Pass true if the authenticated phone number is used on the current device- is_current_phone_number :: Bool,- -- | For official applications only. True, if the app can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details- allow_sms_retriever_api :: Bool- }- deriving (Show, Eq, Generic)-data Animations- = -- | Represents a list of animations - Animations- { -- | List of animations- animations :: [Animation]- }- deriving (Show, Eq, Generic)-data ImportedContacts- = -- | Represents the result of an ImportContacts request - ImportedContacts- { -- | User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user- user_ids :: [I32],- -- | The number of users that imported the corresponding contact; 0 for already registered users or if unavailable- importer_count :: [I32]- }- deriving (Show, Eq, Generic)-data HttpUrl- = -- | Contains an HTTP URL - HttpUrl- { -- | The URL- url :: T- }- deriving (Show, Eq, Generic)--- | Represents a single result of an inline query; for bots only-data InputInlineQueryResult- = -- | Represents a link to an animated GIF or an animated (i.e. without sound) H.264/MPEG-4 AVC video- InputInlineQueryResultAnimation- { -- | Unique identifier of the query result - id :: T,- -- | Title of the query result- title :: T,- -- | URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists - thumbnail_url :: T,- -- | MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4"- thumbnail_mime_type :: T,- -- | The URL of the video file (file size must not exceed 1MB) - video_url :: T,- -- | MIME type of the video file. Must be one of "image/gif" and "video/mp4"- video_mime_type :: T,- -- | Duration of the video, in seconds - video_duration :: I32,- -- | Width of the video - video_width :: I32,- -- | Height of the video- video_height :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents a link to an article or web page - InputInlineQueryResultArticle- { -- | Unique identifier of the query result - id :: T,- -- | URL of the result, if it exists - url :: T,- -- | True, if the URL must be not shown - hide_url :: Bool,- -- | Title of the result- title :: T,- -- | Represents a link to an article or web page - description :: T,- -- | URL of the result thumbnail, if it exists - thumbnail_url :: T,- -- | Thumbnail width, if known - thumbnail_width :: I32,- -- | Thumbnail height, if known- thumbnail_height :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents a link to an MP3 audio file - InputInlineQueryResultAudio- { -- | Unique identifier of the query result - id :: T,- -- | Title of the audio file - title :: T,- -- | Performer of the audio file- performer :: T,- -- | The URL of the audio file - audio_url :: T,- -- | Audio file duration, in seconds- audio_duration :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents a user contact - InputInlineQueryResultContact- { -- | Unique identifier of the query result - id :: T,- -- | User contact - contact :: Contact,- -- | URL of the result thumbnail, if it exists - thumbnail_url :: T,- -- | Thumbnail width, if known - thumbnail_width :: I32,- -- | Thumbnail height, if known- thumbnail_height :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents a link to a file - InputInlineQueryResultDocument- { -- | Unique identifier of the query result - id :: T,- -- | Title of the resulting file - title :: T,- -- | Represents a link to a file - description :: T,- -- | URL of the file - document_url :: T,- -- | MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed- mime_type :: T,- -- | The URL of the file thumbnail, if it exists - thumbnail_url :: T,- -- | Width of the thumbnail - thumbnail_width :: I32,- -- | Height of the thumbnail- thumbnail_height :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents a game - InputInlineQueryResultGame- { -- | Unique identifier of the query result - id :: T,- -- | Short name of the game - game_short_name :: T,- -- | Message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup- }- | -- | Represents a point on the map - InputInlineQueryResultLocation- { -- | Unique identifier of the query result - id :: T,- -- | Location result - location :: Location,- -- | Amount of time relative to the message sent time until the location can be updated, in seconds - live_period :: I32,- -- | Title of the result - title :: T,- -- | URL of the result thumbnail, if it exists - thumbnail_url :: T,- -- | Thumbnail width, if known - thumbnail_width :: I32,- -- | Thumbnail height, if known- thumbnail_height :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents link to a JPEG image - InputInlineQueryResultPhoto- { -- | Unique identifier of the query result - id :: T,- -- | Title of the result, if known - title :: T,- -- | Represents link to a JPEG image - description :: T,- -- | URL of the photo thumbnail, if it exists- thumbnail_url :: T,- -- | The URL of the JPEG photo (photo size must not exceed 5MB) - photo_url :: T,- -- | Width of the photo - photo_width :: I32,- -- | Height of the photo- photo_height :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents a link to a WEBP or TGS sticker - InputInlineQueryResultSticker- { -- | Unique identifier of the query result - id :: T,- -- | URL of the sticker thumbnail, if it exists- thumbnail_url :: T,- -- | The URL of the WEBP or TGS sticker (sticker file size must not exceed 5MB) - sticker_url :: T,- -- | Width of the sticker - sticker_width :: I32,- -- | Height of the sticker- sticker_height :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents information about a venue - InputInlineQueryResultVenue- { -- | Unique identifier of the query result - id :: T,- -- | Venue result - venue :: Venue,- -- | URL of the result thumbnail, if it exists - thumbnail_url :: T,- -- | Thumbnail width, if known - thumbnail_width :: I32,- -- | Thumbnail height, if known- thumbnail_height :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents a link to a page containing an embedded video player or a video file - InputInlineQueryResultVideo- { -- | Unique identifier of the query result - id :: T,- -- | Title of the result - title :: T,- -- | Represents a link to a page containing an embedded video player or a video file - description :: T,- -- | The URL of the video thumbnail (JPEG), if it exists - thumbnail_url :: T,- -- | URL of the embedded video player or video file - video_url :: T,- -- | MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported- mime_type :: T,- -- | Width of the video - video_width :: I32,- -- | Height of the video - video_height :: I32,- -- | Video duration, in seconds- video_duration :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- | -- | Represents a link to an opus-encoded audio file within an OGG container, single channel audio - InputInlineQueryResultVoiceNote- { -- | Unique identifier of the query result - id :: T,- -- | Title of the voice note- title :: T,- -- | The URL of the voice note file - voice_note_url :: T,- -- | Duration of the voice note, in seconds- voice_note_duration :: I32,- -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null- reply_markup :: ReplyMarkup,- -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation, InputMessageVenue or InputMessageContact- input_message_content :: InputMessageContent- }- deriving (Show, Eq, Generic)--- | Represents a single result of an inline query-data InlineQueryResult- = -- | Represents a link to an article or web page - InlineQueryResultArticle- { -- | Unique identifier of the query result - id :: T,- -- | URL of the result, if it exists - url :: T,- -- | True, if the URL must be not shown - hide_url :: Bool,- -- | Title of the result- title :: T,- -- | Represents a link to an article or web page - description :: T,- -- | Result thumbnail; may be null- thumbnail :: PhotoSize- }- | -- | Represents a user contact - InlineQueryResultContact- { -- | Unique identifier of the query result - id :: T,- -- | A user contact - contact :: Contact,- -- | Result thumbnail; may be null- thumbnail :: PhotoSize- }- | -- | Represents a point on the map - InlineQueryResultLocation- { -- | Unique identifier of the query result - id :: T,- -- | Location result - location :: Location,- -- | Title of the result - title :: T,- -- | Result thumbnail; may be null- thumbnail :: PhotoSize- }- | -- | Represents information about a venue - InlineQueryResultVenue- { -- | Unique identifier of the query result - id :: T,- -- | Venue result - venue :: Venue,- -- | Result thumbnail; may be null- thumbnail :: PhotoSize- }- | -- | Represents information about a game - InlineQueryResultGame- { -- | Unique identifier of the query result - id :: T,- -- | Game result- game :: Game- }- | -- | Represents an animation file - InlineQueryResultAnimation- { -- | Unique identifier of the query result - id :: T,- -- | Animation file - animation :: Animation,- -- | Animation title- title :: T- }- | -- | Represents an audio file - InlineQueryResultAudio- { -- | Unique identifier of the query result - id :: T,- -- | Audio file- audio :: Audio- }- | -- | Represents a document - InlineQueryResultDocument- { -- | Unique identifier of the query result - id :: T,- -- | Document - document :: Document,- -- | Document title - title :: T,- -- | Represents a document - description :: T- }- | -- | Represents a photo - InlineQueryResultPhoto- { -- | Unique identifier of the query result - id :: T,- -- | Photo - photo :: Photo,- -- | Title of the result, if known - title :: T,- -- | Represents a photo - description :: T- }- | -- | Represents a sticker - InlineQueryResultSticker- { -- | Unique identifier of the query result - id :: T,- -- | Sticker- sticker :: Sticker- }- | -- | Represents a video - InlineQueryResultVideo- { -- | Unique identifier of the query result - id :: T,- -- | Video - video :: Video,- -- | Title of the video - title :: T,- -- | Represents a video - description :: T- }- | -- | Represents a voice note - InlineQueryResultVoiceNote- { -- | Unique identifier of the query result - id :: T,- -- | Voice note - voice_note :: VoiceNote,- -- | Title of the voice note- title :: T- }- deriving (Show, Eq, Generic)-data InlineQueryResults- = -- | Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query - InlineQueryResults- { -- | Unique identifier of the inline query - inline_query_id :: I64,- -- | The offset for the next request. If empty, there are no more results - next_offset :: T,- -- | Results of the query- results :: [InlineQueryResult],- -- | If non-empty, this text should be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter - switch_pm_text :: T,- -- | Parameter for the bot start message- switch_pm_parameter :: T- }- deriving (Show, Eq, Generic)--- | Represents a payload of a callback query-data CallbackQueryPayload- = -- | The payload from a general callback button - CallbackQueryPayloadData- { -- | Data that was attached to the callback button- data_ :: ByteString64- }- | -- | The payload from a game callback button - CallbackQueryPayloadGame- { -- | A short name of the game that was attached to the callback button- game_short_name :: T- }- deriving (Show, Eq, Generic)-data CallbackQueryAnswer- = -- | Contains a bot's answer to a callback query - CallbackQueryAnswer- { -- | Text of the answer - text :: T,- -- | True, if an alert should be shown to the user instead of a toast notification - show_alert :: Bool,- -- | URL to be opened- url :: T- }- deriving (Show, Eq, Generic)-data CustomRequestResult- = -- | Contains the result of a custom request - CustomRequestResult- { -- | A JSON-serialized result- result :: T- }- deriving (Show, Eq, Generic)-data GameHighScore- = -- | Contains one row of the game high score table - GameHighScore- { -- | Position in the high score table - position :: I32,- -- | User identifier - user_id :: I32,- -- | User score- score :: I32- }- deriving (Show, Eq, Generic)-data GameHighScores- = -- | Contains a list of game high scores - GameHighScores- { -- | A list of game high scores- scores :: [GameHighScore]- }- deriving (Show, Eq, Generic)--- | Represents a chat event-data ChatEventAction- = -- | A message was edited - ChatEventMessageEdited- { -- | The original message before the edit - old_message :: Message,- -- | The message after it was edited- new_message :: Message- }- | -- | A message was deleted - ChatEventMessageDeleted- { -- | Deleted message- message :: Message- }- | -- | A poll in a message was stopped - ChatEventPollStopped- { -- | The message with the poll- message :: Message- }- | -- | A message was pinned - ChatEventMessagePinned- { -- | Pinned message- message :: Message- }- | -- | A message was unpinned- ChatEventMessageUnpinned- { - }- | -- | A new member joined the chat- ChatEventMemberJoined- { - }- | -- | A member left the chat- ChatEventMemberLeft- { - }- | -- | A new chat member was invited - ChatEventMemberInvited- { -- | New member user identifier - user_id :: I32,- -- | New member status- status :: ChatMemberStatus- }- | -- | A chat member has gained/lost administrator status, or the list of their administrator privileges has changed - ChatEventMemberPromoted- { -- | Chat member user identifier - user_id :: I32,- -- | Previous status of the chat member - old_status :: ChatMemberStatus,- -- | New status of the chat member- new_status :: ChatMemberStatus- }- | -- | A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed - ChatEventMemberRestricted- { -- | Chat member user identifier - user_id :: I32,- -- | Previous status of the chat member - old_status :: ChatMemberStatus,- -- | New status of the chat member- new_status :: ChatMemberStatus- }- | -- | The chat title was changed - ChatEventTitleChanged- { -- | Previous chat title - old_title :: T,- -- | New chat title- new_title :: T- }- | -- | The chat permissions was changed - ChatEventPermissionsChanged- { -- | Previous chat permissions - old_permissions :: ChatPermissions,- -- | New chat permissions- new_permissions :: ChatPermissions- }- | -- | The chat description was changed - ChatEventDescriptionChanged- { -- | Previous chat description - old_description :: T,- -- | New chat description- new_description :: T- }- | -- | The chat username was changed - ChatEventUsernameChanged- { -- | Previous chat username - old_username :: T,- -- | New chat username- new_username :: T- }- | -- | The chat photo was changed - ChatEventPhotoChanged- { -- | Previous chat photo value; may be null - old_photo :: Photo,- -- | New chat photo value; may be null- new_photo :: Photo- }- | -- | The can_invite_users permission of a supergroup chat was toggled - ChatEventInvitesToggled- { -- | New value of can_invite_users permission- can_invite_users :: Bool- }- | -- | The linked chat of a supergroup was changed - ChatEventLinkedChatChanged- { -- | Previous supergroup linked chat identifier - old_linked_chat_id :: I53,- -- | New supergroup linked chat identifier- new_linked_chat_id :: I53- }- | -- | The slow_mode_delay setting of a supergroup was changed - ChatEventSlowModeDelayChanged- { -- | Previous value of slow_mode_delay - old_slow_mode_delay :: I32,- -- | New value of slow_mode_delay- new_slow_mode_delay :: I32- }- | -- | The sign_messages setting of a channel was toggled - ChatEventSignMessagesToggled- { -- | New value of sign_messages- sign_messages :: Bool- }- | -- | The supergroup sticker set was changed - ChatEventStickerSetChanged- { -- | Previous identifier of the chat sticker set; 0 if none - old_sticker_set_id :: I64,- -- | New identifier of the chat sticker set; 0 if none- new_sticker_set_id :: I64- }- | -- | The supergroup location was changed - ChatEventLocationChanged- { -- | Previous location; may be null - old_location :: ChatLocation,- -- | New location; may be null- new_location :: ChatLocation- }- | -- | The is_all_history_available setting of a supergroup was toggled - ChatEventIsAllHistoryAvailableToggled- { -- | New value of is_all_history_available- is_all_history_available :: Bool- }- deriving (Show, Eq, Generic)-data ChatEvent- = -- | Represents a chat event - ChatEvent- { -- | Chat event identifier - id :: I64,- -- | Point in time (Unix timestamp) when the event happened - date :: I32,- -- | Identifier of the user who performed the action that triggered the event - user_id :: I32,- -- | Action performed by the user- action :: ChatEventAction- }- deriving (Show, Eq, Generic)-data ChatEvents- = -- | Contains a list of chat events - ChatEvents- { -- | List of events- events :: [ChatEvent]- }- deriving (Show, Eq, Generic)-data ChatEventLogFilters- = -- | Represents a set of filters used to obtain a chat event log- ChatEventLogFilters- { -- | True, if message edits should be returned- message_edits :: Bool,- -- | True, if message deletions should be returned- message_deletions :: Bool,- -- | True, if pin/unpin events should be returned- message_pins :: Bool,- -- | True, if members joining events should be returned- member_joins :: Bool,- -- | True, if members leaving events should be returned- member_leaves :: Bool,- -- | True, if invited member events should be returned- member_invites :: Bool,- -- | True, if member promotion/demotion events should be returned- member_promotions :: Bool,- -- | True, if member restricted/unrestricted/banned/unbanned events should be returned- member_restrictions :: Bool,- -- | True, if changes in chat information should be returned- info_changes :: Bool,- -- | True, if changes in chat settings should be returned- setting_changes :: Bool- }- deriving (Show, Eq, Generic)--- | Represents the value of a string in a language pack-data LanguagePackStringValue- = -- | An ordinary language pack string - LanguagePackStringValueOrdinary- { -- | String value- value :: T- }- | -- | A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info- LanguagePackStringValuePluralized- { -- | Value for zero objects - zero_value :: T,- -- | Value for one object - one_value :: T,- -- | Value for two objects- two_value :: T,- -- | Value for few objects - few_value :: T,- -- | Value for many objects - many_value :: T,- -- | Default value- other_value :: T- }- | -- | A deleted language pack string, the value should be taken from the built-in english language pack- LanguagePackStringValueDeleted- { - }- deriving (Show, Eq, Generic)-data LanguagePackString- = -- | Represents one language pack string - LanguagePackString- { -- | String key - key :: T,- -- | String value- value :: LanguagePackStringValue- }- deriving (Show, Eq, Generic)-data LanguagePackStrings- = -- | Contains a list of language pack strings - LanguagePackStrings- { -- | A list of language pack strings- strings :: [LanguagePackString]- }- deriving (Show, Eq, Generic)-data LanguagePackInfo- = -- | Contains information about a language pack - LanguagePackInfo- { -- | Unique language pack identifier- id :: T,- -- | Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs- base_language_pack_id :: T,- -- | Language name - name :: T,- -- | Name of the language in that language- native_name :: T,- -- | A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info- plural_code :: T,- -- | True, if the language pack is official - is_official :: Bool,- -- | True, if the language pack strings are RTL - is_rtl :: Bool,- -- | True, if the language pack is a beta language pack- is_beta :: Bool,- -- | True, if the language pack is installed by the current user- is_installed :: Bool,- -- | Total number of non-deleted strings from the language pack - total_string_count :: I32,- -- | Total number of translated strings from the language pack- translated_string_count :: I32,- -- | Total number of non-deleted strings from the language pack available locally - local_string_count :: I32,- -- | Link to language translation interface; empty for custom local language packs- translation_url :: T- }- deriving (Show, Eq, Generic)-data LocalizationTargetInfo- = -- | Contains information about the current localization target - LocalizationTargetInfo- { -- | List of available language packs for this application- language_packs :: [LanguagePackInfo]- }- deriving (Show, Eq, Generic)--- | Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, you must specify the correct application platform and upload valid server authentication data at https://my.telegram.org-data DeviceToken- = -- | A token for Firebase Cloud Messaging - DeviceTokenFirebaseCloudMessaging- { -- | Device registration token; may be empty to de-register a device - token :: T,- -- | True, if push notifications should be additionally encrypted- encrypt :: Bool- }- | -- | A token for Apple Push Notification service - DeviceTokenApplePush- { -- | Device token; may be empty to de-register a device - device_token :: T,- -- | True, if App Sandbox is enabled- is_app_sandbox :: Bool- }- | -- | A token for Apple Push Notification service VoIP notifications - DeviceTokenApplePushVoIP- { -- | Device token; may be empty to de-register a device - device_token :: T,- -- | True, if App Sandbox is enabled - is_app_sandbox :: Bool,- -- | True, if push notifications should be additionally encrypted- encrypt :: Bool- }- | -- | A token for Windows Push Notification Services - DeviceTokenWindowsPush- { -- | The access token that will be used to send notifications; may be empty to de-register a device- access_token :: T- }- | -- | A token for Microsoft Push Notification Service - DeviceTokenMicrosoftPush- { -- | Push notification channel URI; may be empty to de-register a device- channel_uri :: T- }- | -- | A token for Microsoft Push Notification Service VoIP channel - DeviceTokenMicrosoftPushVoIP- { -- | Push notification channel URI; may be empty to de-register a device- channel_uri :: T- }- | -- | A token for web Push API - DeviceTokenWebPush- { -- | Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device- endpoint :: T,- -- | Base64url-encoded P-256 elliptic curve Diffie-Hellman public key - p256dh_base64url :: T,- -- | Base64url-encoded authentication secret- auth_base64url :: T- }- | -- | A token for Simple Push API for Firefox OS - DeviceTokenSimplePush- { -- | Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device- endpoint :: T- }- | -- | A token for Ubuntu Push Client service - DeviceTokenUbuntuPush- { -- | Token; may be empty to de-register a device- token :: T- }- | -- | A token for BlackBerry Push Service - DeviceTokenBlackBerryPush- { -- | Token; may be empty to de-register a device- token :: T- }- | -- | A token for Tizen Push Service - DeviceTokenTizenPush- { -- | Push service registration identifier; may be empty to de-register a device- reg_id :: T- }- deriving (Show, Eq, Generic)-data PushReceiverId- = -- | Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification - PushReceiverId- { -- | The globally unique identifier of push notification subscription- id :: I64- }- deriving (Show, Eq, Generic)--- | Describes a fill of a background-data BackgroundFill- = -- | Describes a solid fill of a background - BackgroundFillSolid- { -- | A color of the background in the RGB24 format- color :: I32- }- | -- | Describes a gradient fill of a background - BackgroundFillGradient- { -- | A top color of the background in the RGB24 format - top_color :: I32,- -- | A bottom color of the background in the RGB24 format- bottom_color :: I32,- -- | Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45- rotation_angle :: I32- }- deriving (Show, Eq, Generic)--- | Describes the type of a background-data BackgroundType- = -- | A wallpaper in JPEG format- BackgroundTypeWallpaper- { -- | True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12- is_blurred :: Bool,- -- | True, if the background needs to be slightly moved when device is tilted- is_moving :: Bool- }- | -- | A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user- BackgroundTypePattern- { -- | Description of the background fill- fill :: BackgroundFill,- -- | Intensity of the pattern when it is shown above the filled background, 0-100- intensity :: I32,- -- | True, if the background needs to be slightly moved when device is tilted- is_moving :: Bool- }- | -- | A filled background - BackgroundTypeFill- { -- | Description of the background fill- fill :: BackgroundFill- }- deriving (Show, Eq, Generic)-data Background- = -- | Describes a chat background- Background- { -- | Unique background identifier- id :: I64,- -- | True, if this is one of default backgrounds- is_default :: Bool,- -- | True, if the background is dark and is recommended to be used with dark theme- is_dark :: Bool,- -- | Unique background name- name :: T,- -- | Document with the background; may be null. Null only for filled backgrounds- document :: Document,- -- | Type of the background- type_ :: BackgroundType- }- deriving (Show, Eq, Generic)-data Backgrounds- = -- | Contains a list of backgrounds - Backgrounds- { -- | A list of backgrounds- backgrounds :: [Background]- }- deriving (Show, Eq, Generic)--- | Contains information about background to set-data InputBackground- = -- | A background from a local file- InputBackgroundLocal- { -- | Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns- background :: InputFile- }- | -- | A background from the server - InputBackgroundRemote- { -- | The background identifier- background_id :: I64- }- deriving (Show, Eq, Generic)-data Hashtags- = -- | Contains a list of hashtags - Hashtags- { -- | A list of hashtags- hashtags :: [T]- }- deriving (Show, Eq, Generic)--- | Represents result of checking whether the current session can be used to transfer a chat ownership to another user-data CanTransferOwnershipResult- = -- | The session can be used- CanTransferOwnershipResultOk- { - }- | -- | The 2-step verification needs to be enabled first- CanTransferOwnershipResultPasswordNeeded- { - }- | -- | The 2-step verification was enabled recently, user needs to wait - CanTransferOwnershipResultPasswordTooFresh- { -- | Time left before the session can be used to transfer ownership of a chat, in seconds- retry_after :: I32- }- | -- | The session was created recently, user needs to wait - CanTransferOwnershipResultSessionTooFresh- { -- | Time left before the session can be used to transfer ownership of a chat, in seconds- retry_after :: I32- }- deriving (Show, Eq, Generic)--- | Represents result of checking whether a username can be set for a chat-data CheckChatUsernameResult- = -- | The username can be set- CheckChatUsernameResultOk- { - }- | -- | The username is invalid- CheckChatUsernameResultUsernameInvalid- { - }- | -- | The username is occupied- CheckChatUsernameResultUsernameOccupied- { - }- | -- | The user has too much chats with username, one of them should be made private first- CheckChatUsernameResultPublicChatsTooMuch- { - }- | -- | The user can't be a member of a public supergroup- CheckChatUsernameResultPublicGroupsUnavailable- { - }- deriving (Show, Eq, Generic)--- | Contains content of a push message notification-data PushMessageContent- = -- | A general message with hidden content - PushMessageContentHidden- { -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | An animation message (GIF-style). - PushMessageContentAnimation- { -- | Message content; may be null - animation :: Animation,- -- | Animation caption - caption :: T,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | An audio message - PushMessageContentAudio- { -- | Message content; may be null - audio :: Audio,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A message with a user contact - PushMessageContentContact- { -- | Contact's name - name :: T,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A contact has registered with Telegram- PushMessageContentContactRegistered- { - }- | -- | A document message (a general file) - PushMessageContentDocument- { -- | Message content; may be null - document :: Document,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A message with a game - PushMessageContentGame- { -- | Game title, empty for pinned game message - title :: T,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A new high score was achieved in a game - PushMessageContentGameScore- { -- | Game title, empty for pinned message - title :: T,- -- | New score, 0 for pinned message - score :: I32,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A message with an invoice from a bot - PushMessageContentInvoice- { -- | Product price - price :: T,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A message with a location - PushMessageContentLocation- { -- | True, if the location is live - is_live :: Bool,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A photo message - PushMessageContentPhoto- { -- | Message content; may be null - photo :: Photo,- -- | Photo caption - caption :: T,- -- | True, if the photo is secret - is_secret :: Bool,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A message with a poll - PushMessageContentPoll- { -- | Poll question - question :: T,- -- | True, if the poll is regular and not in quiz mode - is_regular :: Bool,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A screenshot of a message in the chat has been taken- PushMessageContentScreenshotTaken- { - }- | -- | A message with a sticker - PushMessageContentSticker- { -- | Message content; may be null - sticker :: Sticker,- -- | Emoji corresponding to the sticker; may be empty - emoji :: T,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A text message - PushMessageContentText- { -- | Message text - text :: T,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A video message - PushMessageContentVideo- { -- | Message content; may be null - video :: Video,- -- | Video caption - caption :: T,- -- | True, if the video is secret - is_secret :: Bool,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A video note message - PushMessageContentVideoNote- { -- | Message content; may be null - video_note :: VideoNote,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A voice note message - PushMessageContentVoiceNote- { -- | Message content; may be null - voice_note :: VoiceNote,- -- | True, if the message is a pinned message with the specified content- is_pinned :: Bool- }- | -- | A newly created basic group- PushMessageContentBasicGroupChatCreate- { - }- | -- | New chat members were invited to a group - PushMessageContentChatAddMembers- { -- | Name of the added member - member_name :: T,- -- | True, if the current user was added to the group- is_current_user :: Bool,- -- | True, if the user has returned to the group themself- is_returned :: Bool- }- | -- | A chat photo was edited- PushMessageContentChatChangePhoto- { - }- | -- | A chat title was edited - PushMessageContentChatChangeTitle- { -- | New chat title- title :: T- }- | -- | A chat member was deleted - PushMessageContentChatDeleteMember- { -- | Name of the deleted member - member_name :: T,- -- | True, if the current user was deleted from the group- is_current_user :: Bool,- -- | True, if the user has left the group themself- is_left :: Bool- }- | -- | A new member joined the chat by invite link- PushMessageContentChatJoinByLink- { - }- | -- | A forwarded messages - PushMessageContentMessageForwards- { -- | Number of forwarded messages- total_count :: I32- }- | -- | A media album - PushMessageContentMediaAlbum- { -- | Number of messages in the album - total_count :: I32,- -- | True, if the album has at least one photo - has_photos :: Bool,- -- | True, if the album has at least one video- has_videos :: Bool- }- deriving (Show, Eq, Generic)--- | Contains detailed information about a notification-data NotificationType- = -- | New message was received - NotificationTypeNewMessage- { -- | The message- message :: Message- }- | -- | New secret chat was created- NotificationTypeNewSecretChat- { - }- | -- | New call was received - NotificationTypeNewCall- { -- | Call identifier- call_id :: I32- }- | -- | New message was received through a push notification- NotificationTypeNewPushMessage- { -- | The message identifier. The message will not be available in the chat history, but the ID can be used in viewMessages and as reply_to_message_id- message_id :: I53,- -- | Sender of the message; 0 if unknown. Corresponding user may be inaccessible- sender_user_id :: I32,- -- | Name of the sender; can be different from the name of the sender user- sender_name :: T,- -- | True, if the message is outgoing- is_outgoing :: Bool,- -- | Push message content- content :: PushMessageContent- }- deriving (Show, Eq, Generic)--- | Describes the type of notifications in a notification group-data NotificationGroupType- = -- | A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages- NotificationGroupTypeMessages- { - }- | -- | A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message- NotificationGroupTypeMentions- { - }- | -- | A group containing a notification of type notificationTypeNewSecretChat- NotificationGroupTypeSecretChat- { - }- | -- | A group containing notifications of type notificationTypeNewCall- NotificationGroupTypeCalls- { - }- deriving (Show, Eq, Generic)-data Notification- = -- | Contains information about a notification - Notification- { -- | Unique persistent identifier of this notification - id :: I32,- -- | Notification date- date :: I32,- -- | True, if the notification was initially silent - is_silent :: Bool,- -- | Notification type- type_ :: NotificationType- }- deriving (Show, Eq, Generic)-data NotificationGroup- = -- | Describes a group of notifications - NotificationGroup- { -- | Unique persistent auto-incremented from 1 identifier of the notification group - id :: I32,- -- | Type of the group- type_ :: NotificationGroupType,- -- | Identifier of a chat to which all notifications in the group belong- chat_id :: I53,- -- | Total number of active notifications in the group - total_count :: I32,- -- | The list of active notifications- notifications :: [Notification]- }- deriving (Show, Eq, Generic)--- | Represents the value of an option-data OptionValue- = -- | Represents a boolean option - OptionValueBoolean- { -- | The value of the option- value_3 :: Bool- }- | -- | Represents an unknown option or an option which has a default value- OptionValueEmpty- { - }- | -- | Represents an integer option - OptionValueInteger- { -- | The value of the option- value_2 :: I32- }- | -- | Represents a string option - OptionValueString- { -- | The value of the option- value :: T- }- deriving (Show, Eq, Generic)-data JsonObjectMember- = -- | Represents one member of a JSON object - JsonObjectMember- { -- | Member's key - key :: T,- -- | Member's value- value :: JsonValue- }- deriving (Show, Eq, Generic)--- | Represents a JSON value-data JsonValue- = -- | Represents a null JSON value- JsonValueNull- { - }- | -- | Represents a boolean JSON value - JsonValueBoolean- { -- | The value- value_3 :: Bool- }- | -- | Represents a numeric JSON value - JsonValueNumber- { -- | The value- value_2 :: Double- }- | -- | Represents a string JSON value - JsonValueString- { -- | The value- value :: T- }- | -- | Represents a JSON array - JsonValueArray- { -- | The list of array elements- values :: [JsonValue]- }- | -- | Represents a JSON object - JsonValueObject- { -- | The list of object members- members :: [JsonObjectMember]- }- deriving (Show, Eq, Generic)--- | Represents a single rule for managing privacy settings-data UserPrivacySettingRule- = -- | A rule to allow all users to do something- UserPrivacySettingRuleAllowAll- { - }- | -- | A rule to allow all of a user's contacts to do something- UserPrivacySettingRuleAllowContacts- { - }- | -- | A rule to allow certain specified users to do something - UserPrivacySettingRuleAllowUsers- { -- | The user identifiers, total number of users in all rules must not exceed 1000- user_ids :: [I32]- }- | -- | A rule to allow all members of certain specified basic groups and supergroups to doing something - UserPrivacySettingRuleAllowChatMembers- { -- | The chat identifiers, total number of chats in all rules must not exceed 20- chat_ids :: [I53]- }- | -- | A rule to restrict all users from doing something- UserPrivacySettingRuleRestrictAll- { - }- | -- | A rule to restrict all contacts of a user from doing something- UserPrivacySettingRuleRestrictContacts- { - }- | -- | A rule to restrict all specified users from doing something - UserPrivacySettingRuleRestrictUsers- { -- | The user identifiers, total number of users in all rules must not exceed 1000- user_ids :: [I32]- }- | -- | A rule to restrict all members of specified basic groups and supergroups from doing something - UserPrivacySettingRuleRestrictChatMembers- { -- | The chat identifiers, total number of chats in all rules must not exceed 20- chat_ids :: [I53]- }- deriving (Show, Eq, Generic)-data UserPrivacySettingRules- = -- | A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed - UserPrivacySettingRules- { -- | A list of rules- rules :: [UserPrivacySettingRule]- }- deriving (Show, Eq, Generic)--- | Describes available user privacy settings-data UserPrivacySetting- = -- | A privacy setting for managing whether the user's online status is visible- UserPrivacySettingShowStatus- { - }- | -- | A privacy setting for managing whether the user's profile photo is visible- UserPrivacySettingShowProfilePhoto- { - }- | -- | A privacy setting for managing whether a link to the user's account is included in forwarded messages- UserPrivacySettingShowLinkInForwardedMessages- { - }- | -- | A privacy setting for managing whether the user's phone number is visible- UserPrivacySettingShowPhoneNumber- { - }- | -- | A privacy setting for managing whether the user can be invited to chats- UserPrivacySettingAllowChatInvites- { - }- | -- | A privacy setting for managing whether the user can be called- UserPrivacySettingAllowCalls- { - }- | -- | A privacy setting for managing whether peer-to-peer connections can be used for calls- UserPrivacySettingAllowPeerToPeerCalls- { - }- | -- | A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all"- UserPrivacySettingAllowFindingByPhoneNumber- { - }- deriving (Show, Eq, Generic)-data AccountTtl- = -- | Contains information about the period of inactivity after which the current user's account will automatically be deleted - AccountTtl- { -- | Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days- days :: I32- }- deriving (Show, Eq, Generic)-data Session- = -- | Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order- Session- { -- | Session identifier - id :: I64,- -- | True, if this session is the current session- is_current :: Bool,- -- | True, if a password is needed to complete authorization of the session- is_password_pending :: Bool,- -- | Telegram API identifier, as provided by the application - api_id :: I32,- -- | Name of the application, as provided by the application- application_name :: T,- -- | The version of the application, as provided by the application - application_version :: T,- -- | True, if the application is an official application or uses the api_id of an official application- is_official_application :: Bool,- -- | Model of the device the application has been run or is running on, as provided by the application - device_model :: T,- -- | Operating system the application has been run or is running on, as provided by the application- platform :: T,- -- | Version of the operating system the application has been run or is running on, as provided by the application - system_version :: T,- -- | Point in time (Unix timestamp) when the user has logged in- log_in_date :: I32,- -- | Point in time (Unix timestamp) when the session was last used - last_active_date :: I32,- -- | IP address from which the session was created, in human-readable format- ip :: T,- -- | A two-letter country code for the country from which the session was created, based on the IP address - country :: T,- -- | Region code from which the session was created, based on the IP address- region :: T- }- deriving (Show, Eq, Generic)-data Sessions- = -- | Contains a list of sessions - Sessions- { -- | List of sessions- sessions :: [Session]- }- deriving (Show, Eq, Generic)-data ConnectedWebsite- = -- | Contains information about one website the current user is logged in with Telegram- ConnectedWebsite- { -- | Website identifier- id :: I64,- -- | The domain name of the website- domain_name :: T,- -- | User identifier of a bot linked with the website- bot_user_id :: I32,- -- | The version of a browser used to log in- browser :: T,- -- | Operating system the browser is running on- platform :: T,- -- | Point in time (Unix timestamp) when the user was logged in- log_in_date :: I32,- -- | Point in time (Unix timestamp) when obtained authorization was last used- last_active_date :: I32,- -- | IP address from which the user was logged in, in human-readable format- ip :: T,- -- | Human-readable description of a country and a region, from which the user was logged in, based on the IP address- location :: T- }- deriving (Show, Eq, Generic)-data ConnectedWebsites- = -- | Contains a list of websites the current user is logged in with Telegram - ConnectedWebsites- { -- | List of connected websites- websites :: [ConnectedWebsite]- }- deriving (Show, Eq, Generic)--- | Describes the reason why a chat is reported-data ChatReportReason- = -- | The chat contains spam messages- ChatReportReasonSpam- { - }- | -- | The chat promotes violence- ChatReportReasonViolence- { - }- | -- | The chat contains pornographic messages- ChatReportReasonPornography- { - }- | -- | The chat has child abuse related content- ChatReportReasonChildAbuse- { - }- | -- | The chat contains copyrighted content- ChatReportReasonCopyright- { - }- | -- | The location-based chat is unrelated to its stated location- ChatReportReasonUnrelatedLocation- { - }- | -- | A custom reason provided by the user - ChatReportReasonCustom- { -- | Report text- text :: T- }- deriving (Show, Eq, Generic)-data PublicMessageLink- = -- | Contains a public HTTPS link to a message in a supergroup or channel with a username - PublicMessageLink- { -- | Message link - link :: T,- -- | HTML-code for embedding the message- html :: T- }- deriving (Show, Eq, Generic)-data MessageLinkInfo- = -- | Contains information about a link to a message in a chat- MessageLinkInfo- { -- | True, if the link is a public link for a message in a chat- is_public :: Bool,- -- | If found, identifier of the chat to which the message belongs, 0 otherwise- chat_id :: I53,- -- | If found, the linked message; may be null- message :: Message,- -- | True, if the whole media album to which the message belongs is linked- for_album :: Bool- }- deriving (Show, Eq, Generic)-data FilePart- = -- | Contains a part of a file - FilePart- { -- | File bytes- data_ :: ByteString64- }- deriving (Show, Eq, Generic)--- | Represents the type of a file-data FileType- = -- | The data is not a file- FileTypeNone- { - }- | -- | The file is an animation- FileTypeAnimation- { - }- | -- | The file is an audio file- FileTypeAudio- { - }- | -- | The file is a document- FileTypeDocument- { - }- | -- | The file is a photo- FileTypePhoto- { - }- | -- | The file is a profile photo- FileTypeProfilePhoto- { - }- | -- | The file was sent to a secret chat (the file type is not known to the server)- FileTypeSecret- { - }- | -- | The file is a thumbnail of a file from a secret chat- FileTypeSecretThumbnail- { - }- | -- | The file is a file from Secure storage used for storing Telegram Passport files- FileTypeSecure- { - }- | -- | The file is a sticker- FileTypeSticker- { - }- | -- | The file is a thumbnail of another file- FileTypeThumbnail- { - }- | -- | The file type is not yet known- FileTypeUnknown- { - }- | -- | The file is a video- FileTypeVideo- { - }- | -- | The file is a video note- FileTypeVideoNote- { - }- | -- | The file is a voice note- FileTypeVoiceNote- { - }- | -- | The file is a wallpaper or a background pattern- FileTypeWallpaper- { - }- deriving (Show, Eq, Generic)-data StorageStatisticsByFileType- = -- | Contains the storage usage statistics for a specific file type - StorageStatisticsByFileType- { -- | File type - file_type :: FileType,- -- | Total size of the files - size :: I53,- -- | Total number of files- count :: I32- }- deriving (Show, Eq, Generic)-data StorageStatisticsByChat- = -- | Contains the storage usage statistics for a specific chat - StorageStatisticsByChat- { -- | Chat identifier; 0 if none - chat_id :: I53,- -- | Total size of the files in the chat - size :: I53,- -- | Total number of files in the chat - count :: I32,- -- | Statistics split by file types- by_file_type :: [StorageStatisticsByFileType]- }- deriving (Show, Eq, Generic)-data StorageStatistics- = -- | Contains the exact storage usage statistics split by chats and file type - StorageStatistics- { -- | Total size of files - size :: I53,- -- | Total number of files - count :: I32,- -- | Statistics split by chats- by_chat :: [StorageStatisticsByChat]- }- deriving (Show, Eq, Generic)-data StorageStatisticsFast- = -- | Contains approximate storage usage statistics, excluding files of unknown file type - StorageStatisticsFast- { -- | Approximate total size of files - files_size :: I53,- -- | Approximate number of files- file_count :: I32,- -- | Size of the database - database_size :: I53,- -- | Size of the language pack database - language_pack_database_size :: I53,- -- | Size of the TDLib internal log- log_size :: I53- }- deriving (Show, Eq, Generic)-data DatabaseStatistics- = -- | Contains database statistics- DatabaseStatistics- { -- | Database statistics in an unspecified human-readable format- statistics :: T- }- deriving (Show, Eq, Generic)--- | Represents the type of a network-data NetworkType- = -- | The network is not available- NetworkTypeNone- { - }- | -- | A mobile network- NetworkTypeMobile- { - }- | -- | A mobile roaming network- NetworkTypeMobileRoaming- { - }- | -- | A Wi-Fi network- NetworkTypeWiFi- { - }- | -- | A different network type (e.g., Ethernet network)- NetworkTypeOther- { - }- deriving (Show, Eq, Generic)--- | Contains statistics about network usage-data NetworkStatisticsEntry- = -- | Contains information about the total amount of data that was used to send and receive files - NetworkStatisticsEntryFile- { -- | Type of the file the data is part of - file_type :: FileType,- -- | Type of the network the data was sent through. Call setNetworkType to maintain the actual network type- network_type :: NetworkType,- -- | Total number of bytes sent - sent_bytes :: I53,- -- | Total number of bytes received- received_bytes :: I53- }- | -- | Contains information about the total amount of data that was used for calls - NetworkStatisticsEntryCall- { -- | Type of the network the data was sent through. Call setNetworkType to maintain the actual network type- network_type :: NetworkType,- -- | Total number of bytes sent - sent_bytes :: I53,- -- | Total number of bytes received - received_bytes :: I53,- -- | Total call duration, in seconds- duration :: Double- }- deriving (Show, Eq, Generic)-data NetworkStatistics- = -- | A full list of available network statistic entries - NetworkStatistics- { -- | Point in time (Unix timestamp) when the app began collecting statistics - since_date :: I32,- -- | Network statistics entries- entries :: [NetworkStatisticsEntry]- }- deriving (Show, Eq, Generic)-data AutoDownloadSettings- = -- | Contains auto-download settings- AutoDownloadSettings- { -- | True, if the auto-download is enabled- is_auto_download_enabled :: Bool,- -- | The maximum size of a photo file to be auto-downloaded- max_photo_file_size :: I32,- -- | The maximum size of a video file to be auto-downloaded- max_video_file_size :: I32,- -- | The maximum size of other file types to be auto-downloaded- max_other_file_size :: I32,- -- | The maximum suggested bitrate for uploaded videos- video_upload_bitrate :: I32,- -- | True, if the beginning of videos needs to be preloaded for instant playback- preload_large_videos :: Bool,- -- | True, if the next audio track needs to be preloaded while the user is listening to an audio file- preload_next_audio :: Bool,- -- | True, if "use less data for calls" option needs to be enabled- use_less_data_for_calls :: Bool- }- deriving (Show, Eq, Generic)-data AutoDownloadSettingsPresets- = -- | Contains auto-download settings presets for the user- AutoDownloadSettingsPresets- { -- | Preset with lowest settings; supposed to be used by default when roaming- low :: AutoDownloadSettings,- -- | Preset with medium settings; supposed to be used by default when using mobile data- medium :: AutoDownloadSettings,- -- | Preset with highest settings; supposed to be used by default when connected on Wi-Fi- high :: AutoDownloadSettings- }- deriving (Show, Eq, Generic)--- | Describes the current state of the connection to Telegram servers-data ConnectionState- = -- | Currently waiting for the network to become available. Use setNetworkType to change the available network type- ConnectionStateWaitingForNetwork- { - }- | -- | Currently establishing a connection with a proxy server- ConnectionStateConnectingToProxy- { - }- | -- | Currently establishing a connection to the Telegram servers- ConnectionStateConnecting- { - }- | -- | Downloading data received while the client was offline- ConnectionStateUpdating- { - }- | -- | There is a working connection to the Telegram servers- ConnectionStateReady- { - }- deriving (Show, Eq, Generic)--- | Represents the categories of chats for which a list of frequently used chats can be retrieved-data TopChatCategory- = -- | A category containing frequently used private chats with non-bot users- TopChatCategoryUsers- { - }- | -- | A category containing frequently used private chats with bot users- TopChatCategoryBots- { - }- | -- | A category containing frequently used basic groups and supergroups- TopChatCategoryGroups- { - }- | -- | A category containing frequently used channels- TopChatCategoryChannels- { - }- | -- | A category containing frequently used chats with inline bots sorted by their usage in inline mode- TopChatCategoryInlineBots- { - }- | -- | A category containing frequently used chats used for calls- TopChatCategoryCalls- { - }- | -- | A category containing frequently used chats used to forward messages- TopChatCategoryForwardChats- { - }- deriving (Show, Eq, Generic)--- | Describes the type of a URL linking to an internal Telegram entity-data TMeUrlType- = -- | A URL linking to a user - TMeUrlTypeUser- { -- | Identifier of the user- user_id :: I32- }- | -- | A URL linking to a public supergroup or channel - TMeUrlTypeSupergroup- { -- | Identifier of the supergroup or channel- supergroup_id :: I53- }- | -- | A chat invite link - TMeUrlTypeChatInvite- { -- | Chat invite link info- info :: ChatInviteLinkInfo- }- | -- | A URL linking to a sticker set - TMeUrlTypeStickerSet- { -- | Identifier of the sticker set- sticker_set_id :: I64- }- deriving (Show, Eq, Generic)-data TMeUrl- = -- | Represents a URL linking to an internal Telegram entity - TMeUrl- { -- | URL - url :: T,- -- | Type of the URL- type_ :: TMeUrlType- }- deriving (Show, Eq, Generic)-data TMeUrls- = -- | Contains a list of t.me URLs - TMeUrls- { -- | List of URLs- urls :: [TMeUrl]- }- deriving (Show, Eq, Generic)-data Count- = -- | Contains a counter - Count- { -- | Count- count :: I32- }- deriving (Show, Eq, Generic)-data Text- = -- | Contains some text - Text- { -- | Text- text :: T- }- deriving (Show, Eq, Generic)-data Seconds- = -- | Contains a value representing a number of seconds - Seconds- { -- | Number of seconds- seconds :: Double- }- deriving (Show, Eq, Generic)-data DeepLinkInfo- = -- | Contains information about a tg:// deep link - DeepLinkInfo- { -- | Text to be shown to the user - text :: FormattedText,- -- | True, if user should be asked to update the application- need_update_application :: Bool- }- deriving (Show, Eq, Generic)--- | Describes the way the text should be parsed for TextEntities-data TextParseMode- = -- | The text uses Markdown-style formatting- TextParseModeMarkdown- { -- | Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode- version :: I32- }- | -- | The text uses HTML-style formatting. The same as Telegram Bot API "HTML" parse mode- TextParseModeHTML- { - }- deriving (Show, Eq, Generic)--- | Describes the type of a proxy server-data ProxyType- = -- | A SOCKS5 proxy server - ProxyTypeSocks5- { -- | Username for logging in; may be empty - username :: T,- -- | Password for logging in; may be empty- password :: T- }- | -- | A HTTP transparent proxy server - ProxyTypeHttp- { -- | Username for logging in; may be empty - username :: T,- -- | Password for logging in; may be empty - password :: T,- -- | Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method- http_only :: Bool- }- | -- | An MTProto proxy server - ProxyTypeMtproto- { -- | The proxy's secret in hexadecimal encoding- secret :: T- }- deriving (Show, Eq, Generic)-data Proxy- = -- | Contains information about a proxy server - Proxy- { -- | Unique identifier of the proxy - id :: I32,- -- | Proxy server IP address - server :: T,- -- | Proxy server port - port :: I32,- -- | Point in time (Unix timestamp) when the proxy was last used; 0 if never - last_used_date :: I32,- -- | True, if the proxy is enabled now - is_enabled :: Bool,- -- | Type of the proxy- type_ :: ProxyType- }- deriving (Show, Eq, Generic)-data Proxies- = -- | Represents a list of proxy servers - Proxies- { -- | List of proxy servers- proxies :: [Proxy]- }- deriving (Show, Eq, Generic)--- | Describes a sticker that needs to be added to a sticker set-data InputSticker- = -- | A static sticker in PNG format, which will be converted to WEBP server-side- InputStickerStatic- { -- | PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square- sticker :: InputFile,- -- | Emojis corresponding to the sticker- emojis :: T,- -- | For masks, position where the mask should be placed; may be null- mask_position :: MaskPosition- }- | -- | An animated sticker in TGS format- InputStickerAnimated- { -- | File with the animated sticker. Only local or uploaded within a week files are supported. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements- sticker :: InputFile,- -- | Emojis corresponding to the sticker- emojis :: T- }- deriving (Show, Eq, Generic)-data DateRange- = -- | Represents a date range - DateRange- { -- | Point in time (Unix timestamp) at which the date range begins - start_date :: I32,- -- | Point in time (Unix timestamp) at which the date range ends- end_date :: I32- }- deriving (Show, Eq, Generic)-data StatisticsValue- = -- | A statistics value - StatisticsValue- { -- | The value - value :: Double,- -- | The value for the previous day - previous_value :: Double,- -- | The growth rate of the value, as a percentage- growth_rate_percentage :: Double- }- deriving (Show, Eq, Generic)--- | Describes a statistics graph-data StatisticsGraph- = -- | A graph data - StatisticsGraphData- { -- | Graph data in JSON format - json_data :: T,- -- | If non-empty, a token which can be used to receive a zoomed in graph- zoom_token :: T- }- | -- | The graph data to be asynchronously loaded through getChatStatisticsGraph - StatisticsGraphAsync- { -- | The token to use for data loading- token :: T- }- | -- | An error message to be shown to the user instead of the graph - StatisticsGraphError- { -- | The error message- error_message :: T- }- deriving (Show, Eq, Generic)-data ChatStatisticsMessageInteractionCounters- = -- | Contains statistics about interactions with a message- ChatStatisticsMessageInteractionCounters- { -- | Message identifier- message_id :: I53,- -- | Number of times the message was viewed- view_count :: I32,- -- | Number of times the message was forwarded- forward_count :: I32- }- deriving (Show, Eq, Generic)-data ChatStatistics- = -- | A detailed statistics about a chat- ChatStatistics- { -- | A period to which the statistics applies- period :: DateRange,- -- | Number of members in the chat- member_count :: StatisticsValue,- -- | Mean number of times the recently sent messages was viewed- mean_view_count :: StatisticsValue,- -- | Mean number of times the recently sent messages was shared- mean_share_count :: StatisticsValue,- -- | A percentage of users with enabled notifications for the chat- enabled_notifications_percentage :: Double,- -- | A graph containing number of members in the chat- member_count_graph :: StatisticsGraph,- -- | A graph containing number of members joined and left the chat- join_graph :: StatisticsGraph,- -- | A graph containing number of members muted and unmuted the chat- mute_graph :: StatisticsGraph,- -- | A graph containing number of message views in a given hour in the last two weeks- view_count_by_hour_graph :: StatisticsGraph,- -- | A graph containing number of message views per source- view_count_by_source_graph :: StatisticsGraph,- -- | A graph containing number of new member joins per source- join_by_source_graph :: StatisticsGraph,- -- | A graph containing number of users viewed chat messages per language- language_graph :: StatisticsGraph,- -- | A graph containing number of chat message views and shares- message_interaction_graph :: StatisticsGraph,- -- | A graph containing number of views of associated with the chat instant views- instant_view_interaction_graph :: StatisticsGraph,- -- | Detailed statistics about number of views and shares of recently sent messages- recent_message_interactions :: [ChatStatisticsMessageInteractionCounters]- }- deriving (Show, Eq, Generic)--- | Contains notifications about data changes-data Update- = -- | The user authorization state has changed - UpdateAuthorizationState- { -- | New authorization state- authorization_state :: AuthorizationState- }- | -- | A new message was received; can also be an outgoing message - UpdateNewMessage- { -- | The new message- message :: Message- }- | -- | A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message- UpdateMessageSendAcknowledged- { -- | The chat identifier of the sent message - chat_id :: I53,- -- | A temporary message identifier- message_id :: I53- }- | -- | A message has been successfully sent - UpdateMessageSendSucceeded- { -- | Information about the sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change - message :: Message,- -- | The previous temporary message identifier- old_message_id :: I53- }- | -- | A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update- UpdateMessageSendFailed- { -- | Contains information about the message which failed to send - message :: Message,- -- | The previous temporary message identifier - old_message_id :: I53,- -- | An error code - error_code :: I32,- -- | Error message- error_message :: T- }- | -- | The message content has changed - UpdateMessageContent- { -- | Chat identifier - chat_id :: I53,- -- | Message identifier - message_id :: I53,- -- | New message content- new_content :: MessageContent- }- | -- | A message was edited. Changes in the message content will come in a separate updateMessageContent - UpdateMessageEdited- { -- | Chat identifier - chat_id :: I53,- -- | Message identifier - message_id :: I53,- -- | Point in time (Unix timestamp) when the message was edited - edit_date :: I32,- -- | New message reply markup; may be null- reply_markup :: ReplyMarkup- }- | -- | The view count of the message has changed - UpdateMessageViews- { -- | Chat identifier - chat_id :: I53,- -- | Message identifier - message_id :: I53,- -- | New value of the view count- views :: I32- }- | -- | The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages - UpdateMessageContentOpened- { -- | Chat identifier - chat_id :: I53,- -- | Message identifier- message_id :: I53- }- | -- | A message with an unread mention was read - UpdateMessageMentionRead- { -- | Chat identifier - chat_id :: I53,- -- | Message identifier - message_id :: I53,- -- | The new number of unread mention messages left in the chat- unread_mention_count :: I32- }- | -- | A message with a live location was viewed. When the update is received, the client is supposed to update the live location- UpdateMessageLiveLocationViewed- { -- | Identifier of the chat with the live location message - chat_id :: I53,- -- | Identifier of the message with live location- message_id :: I53- }- | -- | A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates - UpdateNewChat- { -- | The chat- chat :: Chat- }- | -- | The list to which the chat belongs was changed. This update is guaranteed to be sent only when chat.order == 0 and the current or the new chat list is null - UpdateChatChatList- { -- | Chat identifier - chat_id :: I53,- -- | The new chat's chat list; may be null- chat_list :: ChatList- }- | -- | The title of a chat was changed - UpdateChatTitle- { -- | Chat identifier - chat_id :: I53,- -- | The new chat title- title :: T- }- | -- | A chat photo was changed - UpdateChatPhoto- { -- | Chat identifier - chat_id :: I53,- -- | The new chat photo; may be null- photo :: ChatPhoto- }- | -- | Chat permissions was changed - UpdateChatPermissions- { -- | Chat identifier - chat_id :: I53,- -- | The new chat permissions- permissions :: ChatPermissions- }- | -- | The last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case - UpdateChatLastMessage- { -- | Chat identifier - chat_id :: I53,- -- | The new last message in the chat; may be null - last_message :: Message,- -- | New value of the chat order- order :: I64- }- | -- | The order of the chat in the chat list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned, updateChatDraftMessage, or updateChatSource might be sent - UpdateChatOrder- { -- | Chat identifier - chat_id :: I53,- -- | New value of the order- order :: I64- }- | -- | A chat was pinned or unpinned - UpdateChatIsPinned- { -- | Chat identifier - chat_id :: I53,- -- | New value of is_pinned - is_pinned :: Bool,- -- | New value of the chat order- order :: I64- }- | -- | A chat was marked as unread or was read - UpdateChatIsMarkedAsUnread- { -- | Chat identifier - chat_id :: I53,- -- | New value of is_marked_as_unread- is_marked_as_unread :: Bool- }- | -- | A chat's source in the chat list has changed - UpdateChatSource- { -- | Chat identifier - chat_id :: I53,- -- | New chat's source; may be null - source :: ChatSource,- -- | New value of chat order- order :: I64- }- | -- | A chat's has_scheduled_messages field has changed - UpdateChatHasScheduledMessages- { -- | Chat identifier - chat_id :: I53,- -- | New value of has_scheduled_messages- has_scheduled_messages :: Bool- }- | -- | The value of the default disable_notification parameter, used when a message is sent to the chat, was changed - UpdateChatDefaultDisableNotification- { -- | Chat identifier - chat_id :: I53,- -- | The new default_disable_notification value- default_disable_notification :: Bool- }- | -- | Incoming messages were read or number of unread messages has been changed - UpdateChatReadInbox- { -- | Chat identifier - chat_id :: I53,- -- | Identifier of the last read incoming message - last_read_inbox_message_id :: I53,- -- | The number of unread messages left in the chat- unread_count :: I32- }- | -- | Outgoing messages were read - UpdateChatReadOutbox- { -- | Chat identifier - chat_id :: I53,- -- | Identifier of last read outgoing message- last_read_outbox_message_id :: I53- }- | -- | The chat unread_mention_count has changed - UpdateChatUnreadMentionCount- { -- | Chat identifier - chat_id :: I53,- -- | The number of unread mention messages left in the chat- unread_mention_count :: I32- }- | -- | Notification settings for a chat were changed - UpdateChatNotificationSettings- { -- | Chat identifier - chat_id :: I53,- -- | The new notification settings- notification_settings_2 :: ChatNotificationSettings- }- | -- | Notification settings for some type of chats were updated - UpdateScopeNotificationSettings- { -- | Types of chats for which notification settings were updated - scope :: NotificationSettingsScope,- -- | The new notification settings- notification_settings :: ScopeNotificationSettings- }- | -- | The chat action bar was changed - UpdateChatActionBar- { -- | Chat identifier - chat_id :: I53,- -- | The new value of the action bar; may be null- action_bar :: ChatActionBar- }- | -- | The chat pinned message was changed - UpdateChatPinnedMessage- { -- | Chat identifier - chat_id :: I53,- -- | The new identifier of the pinned message; 0 if there is no pinned message in the chat- pinned_message_id :: I53- }- | -- | The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user- UpdateChatReplyMarkup- { -- | Chat identifier - chat_id :: I53,- -- | Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat- reply_markup_message_id :: I53- }- | -- | A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied - UpdateChatDraftMessage- { -- | Chat identifier - chat_id :: I53,- -- | The new draft message; may be null - draft_message :: DraftMessage,- -- | New value of the chat order- order :: I64- }- | -- | The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed - UpdateChatOnlineMemberCount- { -- | Identifier of the chat - chat_id :: I53,- -- | New number of online members in the chat, or 0 if unknown- online_member_count :: I32- }- | -- | A notification was changed - UpdateNotification- { -- | Unique notification group identifier - notification_group_id :: I32,- -- | Changed notification- notification :: Notification- }- | -- | A list of active notifications in a notification group has changed- UpdateNotificationGroup- { -- | Unique notification group identifier- notification_group_id :: I32,- -- | New type of the notification group- type_2 :: NotificationGroupType,- -- | Identifier of a chat to which all notifications in the group belong- chat_id :: I53,- -- | Chat identifier, which notification settings must be applied to the added notifications- notification_settings_chat_id :: I53,- -- | True, if the notifications should be shown without sound- is_silent :: Bool,- -- | Total number of unread notifications in the group, can be bigger than number of active notifications- total_count :: I32,- -- | List of added group notifications, sorted by notification ID - added_notifications :: [Notification],- -- | Identifiers of removed group notifications, sorted by notification ID- removed_notification_ids :: [I32]- }- | -- | Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update - UpdateActiveNotifications- { -- | Lists of active notification groups- groups :: [NotificationGroup]- }- | -- | Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications- UpdateHavePendingNotifications- { -- | True, if there are some delayed notification updates, which will be sent soon- have_delayed_notifications :: Bool,- -- | True, if there can be some yet unreceived notifications, which are being fetched from the server- have_unreceived_notifications :: Bool- }- | -- | Some messages were deleted - UpdateDeleteMessages- { -- | Chat identifier - chat_id :: I53,- -- | Identifiers of the deleted messages- message_ids :: [I53],- -- | True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible)- is_permanent :: Bool,- -- | True, if the messages are deleted only from the cache and can possibly be retrieved again in the future- from_cache :: Bool- }- | -- | User activity in the chat has changed - UpdateUserChatAction- { -- | Chat identifier - chat_id :: I53,- -- | Identifier of a user performing an action - user_id :: I32,- -- | The action description- action :: ChatAction- }- | -- | The user went online or offline - UpdateUserStatus- { -- | User identifier - user_id :: I32,- -- | New status of the user- status :: UserStatus- }- | -- | Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client - UpdateUser- { -- | New data about the user- user :: User- }- | -- | Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client - UpdateBasicGroup- { -- | New data about the group- basic_group :: BasicGroup- }- | -- | Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the client - UpdateSupergroup- { -- | New data about the supergroup- supergroup :: Supergroup- }- | -- | Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client - UpdateSecretChat- { -- | New data about the secret chat- secret_chat :: SecretChat- }- | -- | Some data from userFullInfo has been changed - UpdateUserFullInfo- { -- | User identifier - user_id :: I32,- -- | New full information about the user- user_full_info :: UserFullInfo- }- | -- | Some data from basicGroupFullInfo has been changed - UpdateBasicGroupFullInfo- { -- | Identifier of a basic group - basic_group_id :: I32,- -- | New full information about the group- basic_group_full_info :: BasicGroupFullInfo- }- | -- | Some data from supergroupFullInfo has been changed - UpdateSupergroupFullInfo- { -- | Identifier of the supergroup or channel - supergroup_id :: I32,- -- | New full information about the supergroup- supergroup_full_info :: SupergroupFullInfo- }- | -- | Service notification from the server. Upon receiving this the client must show a popup with the content of the notification- UpdateServiceNotification- { -- | Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method- type_ :: T,- -- | Notification content- content :: MessageContent- }- | -- | Information about a file was updated - UpdateFile- { -- | New data about the file- file :: File- }- | -- | The file generation process needs to be started by the client- UpdateFileGenerationStart- { -- | Unique identifier for the generation process- generation_id :: I64,- -- | The path to a file from which a new file is generated; may be empty- original_path :: T,- -- | The path to a file that should be created and where the new file should be generated- destination_path :: T,- -- | String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file, which should be downloaded by the client- conversion :: T- }- | -- | File generation is no longer needed - UpdateFileGenerationStop- { -- | Unique identifier for the generation process- generation_id :: I64- }- | -- | New call was created or information about a call was updated - UpdateCall- { -- | New data about a call- call :: Call- }- | -- | Some privacy setting rules have been changed - UpdateUserPrivacySettingRules- { -- | The privacy setting - setting :: UserPrivacySetting,- -- | New privacy rules- rules :: UserPrivacySettingRules- }- | -- | Number of unread messages in a chat list has changed. This update is sent only if the message database is used - UpdateUnreadMessageCount- { -- | The chat list with changed number of unread messages- chat_list :: ChatList,- -- | Total number of unread messages - unread_count :: I32,- -- | Total number of unread messages in unmuted chats- unread_unmuted_count :: I32- }- | -- | Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used- UpdateUnreadChatCount- { -- | The chat list with changed number of unread messages- chat_list :: ChatList,- -- | Approximate total number of chats in the chat list- total_count :: I32,- -- | Total number of unread chats - unread_count :: I32,- -- | Total number of unread unmuted chats- unread_unmuted_count :: I32,- -- | Total number of chats marked as unread - marked_as_unread_count :: I32,- -- | Total number of unmuted chats marked as unread- marked_as_unread_unmuted_count :: I32- }- | -- | An option changed its value - UpdateOption- { -- | The option name - name :: T,- -- | The new option value- value :: OptionValue- }- | -- | A sticker set has changed - UpdateStickerSet- { -- | The sticker set- sticker_set :: StickerSet- }- | -- | The list of installed sticker sets was updated - UpdateInstalledStickerSets- { -- | True, if the list of installed mask sticker sets was updated - is_masks :: Bool,- -- | The new list of installed ordinary sticker sets- sticker_set_ids :: [I64]- }- | -- | The list of trending sticker sets was updated or some of them were viewed - UpdateTrendingStickerSets- { -- | The prefix of the list of trending sticker sets with the newest trending sticker sets- sticker_sets :: StickerSets- }- | -- | The list of recently used stickers was updated - UpdateRecentStickers- { -- | True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated - is_attached :: Bool,- -- | The new list of file identifiers of recently used stickers- sticker_ids :: [I32]- }- | -- | The list of favorite stickers was updated - UpdateFavoriteStickers- { -- | The new list of file identifiers of favorite stickers- sticker_ids :: [I32]- }- | -- | The list of saved animations was updated - UpdateSavedAnimations- { -- | The new list of file identifiers of saved animations- animation_ids :: [I32]- }- | -- | The selected background has changed - UpdateSelectedBackground- { -- | True, if background for dark theme has changed - for_dark_theme :: Bool,- -- | The new selected background; may be null- background :: Background- }- | -- | Some language pack strings have been updated - UpdateLanguagePackStrings- { -- | Localization target to which the language pack belongs - localization_target :: T,- -- | Identifier of the updated language pack - language_pack_id :: T,- -- | List of changed language pack strings- strings :: [LanguagePackString]- }- | -- | The connection state has changed - UpdateConnectionState- { -- | The new connection state- state :: ConnectionState- }- | -- | New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update" - UpdateTermsOfService- { -- | Identifier of the terms of service - terms_of_service_id :: T,- -- | The new terms of service- terms_of_service :: TermsOfService- }- | -- | The list of users nearby has changed. The update is sent only 60 seconds after a successful searchChatsNearby request - UpdateUsersNearby- { -- | The new list of users nearby- users_nearby :: [ChatNearby]- }- | -- | The list of supported dice emojis has changed - UpdateDiceEmojis- { -- | The new list of supported dice emojis- emojis :: [T]- }- | -- | A new incoming inline query; for bots only - UpdateNewInlineQuery- { -- | Unique query identifier - id :: I64,- -- | Identifier of the user who sent the query - sender_user_id :: I32,- -- | User location, provided by the client; may be null- user_location :: Location,- -- | Text of the query - query :: T,- -- | Offset of the first entry to return- offset :: T- }- | -- | The user has chosen a result of an inline query; for bots only - UpdateNewChosenInlineResult- { -- | Identifier of the user who sent the query - sender_user_id :: I32,- -- | User location, provided by the client; may be null- user_location :: Location,- -- | Text of the query - query :: T,- -- | Identifier of the chosen result - result_id :: T,- -- | Identifier of the sent inline message, if known- inline_message_id :: T- }- | -- | A new incoming callback query; for bots only - UpdateNewCallbackQuery- { -- | Unique query identifier - id :: I64,- -- | Identifier of the user who sent the query- sender_user_id :: I32,- -- | Identifier of the chat where the query was sent - chat_id :: I53,- -- | Identifier of the message, from which the query originated- message_id :: I53,- -- | Identifier that uniquely corresponds to the chat to which the message was sent - chat_instance :: I64,- -- | Query payload- payload :: CallbackQueryPayload- }- | -- | A new incoming callback query from a message sent via a bot; for bots only - UpdateNewInlineCallbackQuery- { -- | Unique query identifier - id :: I64,- -- | Identifier of the user who sent the query - sender_user_id :: I32,- -- | Identifier of the inline message, from which the query originated- inline_message_id :: T,- -- | An identifier uniquely corresponding to the chat a message was sent to - chat_instance :: I64,- -- | Query payload- payload :: CallbackQueryPayload- }- | -- | A new incoming shipping query; for bots only. Only for invoices with flexible price - UpdateNewShippingQuery- { -- | Unique query identifier - id :: I64,- -- | Identifier of the user who sent the query - sender_user_id :: I32,- -- | Invoice payload - invoice_payload_2 :: T,- -- | User shipping address- shipping_address :: Address- }- | -- | A new incoming pre-checkout query; for bots only. Contains full information about a checkout - UpdateNewPreCheckoutQuery- { -- | Unique query identifier - id :: I64,- -- | Identifier of the user who sent the query - sender_user_id :: I32,- -- | Currency for the product price - currency :: T,- -- | Total price for the product, in the minimal quantity of the currency- total_amount :: I53,- -- | Invoice payload - invoice_payload :: ByteString64,- -- | Identifier of a shipping option chosen by the user; may be empty if not applicable - shipping_option_id :: T,- -- | Information about the order; may be null- order_info :: OrderInfo- }- | -- | A new incoming event; for bots only - UpdateNewCustomEvent- { -- | A JSON-serialized event- event :: T- }- | -- | A new incoming query; for bots only - UpdateNewCustomQuery- { -- | The query identifier - id :: I64,- -- | JSON-serialized query data - data_ :: T,- -- | Query timeout- timeout :: I32- }- | -- | A poll was updated; for bots only - UpdatePoll- { -- | New data about the poll- poll :: Poll- }- | -- | A user changed the answer to a poll; for bots only - UpdatePollAnswer- { -- | Unique poll identifier - poll_id :: I64,- -- | The user, who changed the answer to the poll - user_id :: I32,- -- | 0-based identifiers of answer options, chosen by the user- option_ids :: [I32]- }- deriving (Show, Eq, Generic)-data Updates- = -- | Contains a list of updates - Updates- { -- | List of updates- updates :: [Update]- }- deriving (Show, Eq, Generic)--- | Describes a stream to which TDLib internal log is written-data LogStream- = -- | The log is written to stderr or an OS specific log- LogStreamDefault- { - }- | -- | The log is written to a file - LogStreamFile- { -- | Path to the file to where the internal TDLib log will be written - path :: T,- -- | The maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated- max_file_size :: I53- }- | -- | The log is written nowhere- LogStreamEmpty- { - }- deriving (Show, Eq, Generic)-data LogVerbosityLevel- = -- | Contains a TDLib internal log verbosity level - LogVerbosityLevel- { -- | Log verbosity level- verbosity_level :: I32+ useTestDc :: Bool,+ -- | The path to the directory for the persistent database; if empty, the current working directory will be used+ databaseDirectory :: T,+ -- | The path to the directory for storing files; if empty, database_directory will be used+ filesDirectory :: T,+ -- | If set to true, information about downloaded and uploaded files will be saved between application restarts+ useFileDatabase :: Bool,+ -- | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database+ useChatInfoDatabase :: Bool,+ -- | If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database+ useMessageDatabase :: Bool,+ -- | If set to true, support for secret chats will be enabled+ useSecretChats :: Bool,+ -- | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org+ apiId :: I32,+ -- | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org+ apiHash :: T,+ -- | IETF language tag of the user's operating system language; must be non-empty+ systemLanguageCode :: T,+ -- | Model of the device the application is being run on; must be non-empty+ deviceModel :: T,+ -- | Version of the operating system the application is being run on; must be non-empty+ systemVersion :: T,+ -- | Application version; must be non-empty+ applicationVersion :: T,+ -- | If set to true, old files will automatically be deleted+ enableStorageOptimizer :: Bool,+ -- | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name+ ignoreFileNames :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Provides information about the method by which an authentication code is delivered to the user+data AuthenticationCodeType+ = -- | An authentication code is delivered via a private Telegram message, which can be viewed in another client + AuthenticationCodeTypeTelegramMessage+ { -- | Length of the code+ length :: I32+ }+ | -- | An authentication code is delivered via an SMS message to the specified phone number + AuthenticationCodeTypeSms+ { -- | Length of the code+ length :: I32+ }+ | -- | An authentication code is delivered via a phone call to the specified phone number + AuthenticationCodeTypeCall+ { -- | Length of the code+ length :: I32+ }+ | -- | An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code + AuthenticationCodeTypeFlashCall+ { -- | Pattern of the phone number from which the call will be made+ pattern_ :: T+ }+ deriving (Show, Eq, Generic)+data AuthenticationCodeInfo+ = -- | Information about the authentication code that was sent + AuthenticationCodeInfo+ { -- | A phone number that is being authenticated + phoneNumber :: T,+ -- | Describes the way the code was sent to the user + type_ :: AuthenticationCodeType,+ -- | Describes the way the next code will be sent to the user; may be null + nextType :: (Maybe) (AuthenticationCodeType),+ -- | Timeout before the code should be re-sent, in seconds+ timeout :: I32+ }+ deriving (Show, Eq, Generic)+data EmailAddressAuthenticationCodeInfo+ = -- | Information about the email address authentication code that was sent + EmailAddressAuthenticationCodeInfo+ { -- | Pattern of the email address to which an authentication code was sent + emailAddressPattern :: T,+ -- | Length of the code; 0 if unknown+ length :: I32+ }+ deriving (Show, Eq, Generic)+data TextEntity+ = -- | Represents a part of the text that needs to be formatted in some unusual way + TextEntity+ { -- | Offset of the entity in UTF-16 code units + offset :: I32,+ -- | Length of the entity, in UTF-16 code units + length :: I32,+ -- | Type of the entity+ type_ :: TextEntityType+ }+ deriving (Show, Eq, Generic)+data TextEntities+ = -- | Contains a list of text entities + TextEntities+ { -- | List of text entities+ entities :: [TextEntity]+ }+ deriving (Show, Eq, Generic)+data FormattedText+ = -- | A text with some entities + FormattedText+ { -- | The text + text :: T,+ -- | Entities contained in the text. Entities can be nested, but must not mutually intersect with each other.+ entities :: [TextEntity]+ }+ deriving (Show, Eq, Generic)+data TermsOfService+ = -- | Contains Telegram terms of service + TermsOfService+ { -- | Text of the terms of service + text :: FormattedText,+ -- | The minimum age of a user to be able to accept the terms; 0 if any + minUserAge :: I32,+ -- | True, if a blocking popup with terms of service must be shown to the user+ showPopup :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Represents the current authorization state of the client+data AuthorizationState+ = -- | TDLib needs TdlibParameters for initialization+ AuthorizationStateWaitTdlibParameters+ { + }+ | -- | TDLib needs an encryption key to decrypt the local database + AuthorizationStateWaitEncryptionKey+ { -- | True, if the database is currently encrypted+ isEncrypted :: Bool+ }+ | -- | TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options+ AuthorizationStateWaitPhoneNumber+ { + }+ | -- | TDLib needs the user's authentication code to authorize + AuthorizationStateWaitCode+ { -- | Information about the authorization code that was sent+ codeInfo :: AuthenticationCodeInfo+ }+ | -- | The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link + AuthorizationStateWaitOtherDeviceConfirmation+ { -- | A tg:// URL for the QR code. The link will be updated frequently+ link :: T+ }+ | -- | The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration + AuthorizationStateWaitRegistration+ { -- | Telegram terms of service+ termsOfService :: TermsOfService+ }+ | -- | The user has been authorized, but needs to enter a password to start using the application + AuthorizationStateWaitPassword+ { -- | Hint for the password; may be empty + passwordHint :: T,+ -- | True, if a recovery email address has been set up+ hasRecoveryEmailAddress :: Bool,+ -- | Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent+ recoveryEmailAddressPattern :: T+ }+ | -- | The user has been successfully authorized. TDLib is now ready to answer queries+ AuthorizationStateReady+ { + }+ | -- | The user is currently logging out+ AuthorizationStateLoggingOut+ { + }+ | -- | TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received+ AuthorizationStateClosing+ { + }+ | -- | TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to+ AuthorizationStateClosed+ { + }+ deriving (Show, Eq, Generic)+data PasswordState+ = -- | Represents the current state of 2-step verification + PasswordState+ { -- | True, if a 2-step verification password is set + hasPassword :: Bool,+ -- | Hint for the password; may be empty+ passwordHint :: T,+ -- | True, if a recovery email is set + hasRecoveryEmailAddress :: Bool,+ -- | True, if some Telegram Passport elements were saved+ hasPassportData :: Bool,+ -- | Information about the recovery email address to which the confirmation email was sent; may be null+ recoveryEmailAddressCodeInfo :: (Maybe) (EmailAddressAuthenticationCodeInfo)+ }+ deriving (Show, Eq, Generic)+data RecoveryEmailAddress+ = -- | Contains information about the current recovery email address + RecoveryEmailAddress+ { -- | Recovery email address+ recoveryEmailAddress :: T+ }+ deriving (Show, Eq, Generic)+data TemporaryPasswordState+ = -- | Returns information about the availability of a temporary password, which can be used for payments + TemporaryPasswordState+ { -- | True, if a temporary password is available + hasPassword :: Bool,+ -- | Time left before the temporary password expires, in seconds+ validFor :: I32+ }+ deriving (Show, Eq, Generic)+data LocalFile+ = -- | Represents a local file+ LocalFile+ { -- | Local path to the locally available file part; may be empty+ path :: T,+ -- | True, if it is possible to try to download or generate the file+ canBeDownloaded :: Bool,+ -- | True, if the file can be deleted+ canBeDeleted :: Bool,+ -- | True, if the file is currently being downloaded (or a local copy is being generated by some other means)+ isDownloadingActive :: Bool,+ -- | True, if the local copy is fully available+ isDownloadingCompleted :: Bool,+ -- | Download will be started from this offset. downloaded_prefix_size is calculated from this offset+ downloadOffset :: I32,+ -- | If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix+ downloadedPrefixSize :: I32,+ -- | Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage+ downloadedSize :: I32+ }+ deriving (Show, Eq, Generic)+data RemoteFile+ = -- | Represents a remote file+ RemoteFile+ { -- | Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.+ id :: T,+ -- | Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time+ uniqueId :: T,+ -- | True, if the file is currently being uploaded (or a remote copy is being generated by some other means)+ isUploadingActive :: Bool,+ -- | True, if a remote copy is fully available+ isUploadingCompleted :: Bool,+ -- | Size of the remote available part of the file; 0 if unknown+ uploadedSize :: I32+ }+ deriving (Show, Eq, Generic)+data File+ = -- | Represents a file+ File+ { -- | Unique file identifier+ id :: I32,+ -- | File size; 0 if unknown+ size :: I32,+ -- | Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress+ expectedSize :: I32,+ -- | Information about the local copy of the file+ local :: LocalFile,+ -- | Information about the remote copy of the file+ remote :: RemoteFile+ }+ deriving (Show, Eq, Generic)+-- | Points to a file+data InputFile+ = -- | A file defined by its unique ID + InputFileId+ { -- | Unique file identifier+ id_2 :: I32+ }+ | -- | A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib.+ InputFileRemote+ { -- | Remote file identifier+ id :: T+ }+ | -- | A file defined by a local path + InputFileLocal+ { -- | Local path to the file+ path :: T+ }+ | -- | A file generated by the client + InputFileGenerated+ { -- | Local path to a file from which the file is generated; may be empty if there is no such file+ originalPath :: T,+ -- | String specifying the conversion applied to the original file; should be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage+ conversion :: T,+ -- | Expected size of the generated file; 0 if unknown+ expectedSize :: I32+ }+ deriving (Show, Eq, Generic)+data PhotoSize+ = -- | Photo description + PhotoSize+ { -- | Thumbnail type (see https://core.telegram.org/constructor/photoSize) + type_ :: T,+ -- | Information about the photo file + photo :: File,+ -- | Photo width + width :: I32,+ -- | Photo height+ height :: I32+ }+ deriving (Show, Eq, Generic)+data Minithumbnail+ = -- | Thumbnail image of a very poor quality and low resolution + Minithumbnail+ { -- | Thumbnail width, usually doesn't exceed 40 + width :: I32,+ -- | Thumbnail height, usually doesn't exceed 40 + height :: I32,+ -- | The thumbnail in JPEG format+ data_ :: ByteString64+ }+ deriving (Show, Eq, Generic)+-- | Describes format of the thumbnail+data ThumbnailFormat+ = -- | The thumbnail is in JPEG format+ ThumbnailFormatJpeg+ { + }+ | -- | The thumbnail is in PNG format. It will be used only for background patterns+ ThumbnailFormatPng+ { + }+ | -- | The thumbnail is in WEBP format. It will be used only for some stickers+ ThumbnailFormatWebp+ { + }+ | -- | The thumbnail is in static GIF format. It will be used only for some bot inline results+ ThumbnailFormatGif+ { + }+ | -- | The thumbnail is in TGS format. It will be used only for animated sticker sets+ ThumbnailFormatTgs+ { + }+ | -- | The thumbnail is in MPEG4 format. It will be used only for some animations and videos+ ThumbnailFormatMpeg4+ { + }+ deriving (Show, Eq, Generic)+data Thumbnail+ = -- | Represents a thumbnail + Thumbnail+ { -- | Thumbnail format + format :: ThumbnailFormat,+ -- | Thumbnail width + width :: I32,+ -- | Thumbnail height + height :: I32,+ -- | The thumbnail+ file :: File+ }+ deriving (Show, Eq, Generic)+-- | Part of the face, relative to which a mask should be placed+data MaskPoint+ = -- | A mask should be placed relatively to the forehead+ MaskPointForehead+ { + }+ | -- | A mask should be placed relatively to the eyes+ MaskPointEyes+ { + }+ | -- | A mask should be placed relatively to the mouth+ MaskPointMouth+ { + }+ | -- | A mask should be placed relatively to the chin+ MaskPointChin+ { + }+ deriving (Show, Eq, Generic)+data MaskPosition+ = -- | Position on a photo where a mask should be placed + MaskPosition+ { -- | Part of the face, relative to which the mask should be placed+ point :: MaskPoint,+ -- | Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)+ xShift :: Double,+ -- | Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position)+ yShift :: Double,+ -- | Mask scaling coefficient. (For example, 2.0 means a doubled size)+ scale :: Double+ }+ deriving (Show, Eq, Generic)+data PollOption+ = -- | Describes one answer option of a poll + PollOption+ { -- | Option text, 1-100 characters + text :: T,+ -- | Number of voters for this option, available only for closed or voted polls + voterCount :: I32,+ -- | The percentage of votes for this option, 0-100+ votePercentage :: I32,+ -- | True, if the option was chosen by the user + isChosen :: Bool,+ -- | True, if the option is being chosen by a pending setPollAnswer request+ isBeingChosen :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Describes the type of a poll+data PollType+ = -- | A regular poll + PollTypeRegular+ { -- | True, if multiple answer options can be chosen simultaneously+ allowMultipleAnswers :: Bool+ }+ | -- | A poll in quiz mode, which has exactly one correct answer option and can be answered only once+ PollTypeQuiz+ { -- | 0-based identifier of the correct answer option; -1 for a yet unanswered poll+ correctOptionId :: I32,+ -- | Text that is shown when the user chooses an incorrect answer or taps on the lamp icon, 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll+ explanation :: FormattedText+ }+ deriving (Show, Eq, Generic)+data Animation+ = -- | Describes an animation file. The animation must be encoded in GIF or MPEG4 format + Animation+ { -- | Duration of the animation, in seconds; as defined by the sender + duration :: I32,+ -- | Width of the animation + width :: I32,+ -- | Height of the animation+ height :: I32,+ -- | Original name of the file; as defined by the sender + fileName :: T,+ -- | MIME type of the file, usually "image/gif" or "video/mp4"+ mimeType :: T,+ -- | True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets+ hasStickers :: Bool,+ -- | Animation minithumbnail; may be null + minithumbnail :: (Maybe) (Minithumbnail),+ -- | Animation thumbnail in JPEG or MPEG4 format; may be null + thumbnail :: (Maybe) (Thumbnail),+ -- | File containing the animation+ animation :: File+ }+ deriving (Show, Eq, Generic)+data Audio+ = -- | Describes an audio file. Audio is usually in MP3 or M4A format + Audio+ { -- | Duration of the audio, in seconds; as defined by the sender + duration :: I32,+ -- | Title of the audio; as defined by the sender + title :: T,+ -- | Performer of the audio; as defined by the sender+ performer :: T,+ -- | Original name of the file; as defined by the sender + fileName :: T,+ -- | The MIME type of the file; as defined by the sender + mimeType :: T,+ -- | The minithumbnail of the album cover; may be null+ albumCoverMinithumbnail :: (Maybe) (Minithumbnail),+ -- | The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null + albumCoverThumbnail :: (Maybe) (Thumbnail),+ -- | File containing the audio+ audio :: File+ }+ deriving (Show, Eq, Generic)+data Document+ = -- | Describes a document of any type + Document+ { -- | Original name of the file; as defined by the sender + fileName :: T,+ -- | MIME type of the file; as defined by the sender+ mimeType :: T,+ -- | Document minithumbnail; may be null + minithumbnail :: (Maybe) (Minithumbnail),+ -- | Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null + thumbnail :: (Maybe) (Thumbnail),+ -- | File containing the document+ document :: File+ }+ deriving (Show, Eq, Generic)+data Photo+ = -- | Describes a photo + Photo+ { -- | True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets+ hasStickers :: Bool,+ -- | Photo minithumbnail; may be null + minithumbnail :: (Maybe) (Minithumbnail),+ -- | Available variants of the photo, in different sizes+ sizes :: [PhotoSize]+ }+ deriving (Show, Eq, Generic)+data Sticker+ = -- | Describes a sticker + Sticker+ { -- | The identifier of the sticker set to which the sticker belongs; 0 if none + setId :: I64,+ -- | Sticker width; as defined by the sender + width :: I32,+ -- | Sticker height; as defined by the sender+ height :: I32,+ -- | Emoji corresponding to the sticker + emoji :: T,+ -- | True, if the sticker is an animated sticker in TGS format + isAnimated :: Bool,+ -- | True, if the sticker is a mask + isMask :: Bool,+ -- | Position where the mask should be placed; may be null+ maskPosition :: (Maybe) (MaskPosition),+ -- | Sticker thumbnail in WEBP or JPEG format; may be null + thumbnail :: (Maybe) (Thumbnail),+ -- | File containing the sticker+ sticker :: File+ }+ deriving (Show, Eq, Generic)+data Video+ = -- | Describes a video file + Video+ { -- | Duration of the video, in seconds; as defined by the sender + duration :: I32,+ -- | Video width; as defined by the sender + width :: I32,+ -- | Video height; as defined by the sender+ height :: I32,+ -- | Original name of the file; as defined by the sender + fileName :: T,+ -- | MIME type of the file; as defined by the sender+ mimeType :: T,+ -- | True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets+ hasStickers :: Bool,+ -- | True, if the video should be tried to be streamed + supportsStreaming :: Bool,+ -- | Video minithumbnail; may be null+ minithumbnail :: (Maybe) (Minithumbnail),+ -- | Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null + thumbnail :: (Maybe) (Thumbnail),+ -- | File containing the video+ video :: File+ }+ deriving (Show, Eq, Generic)+data VideoNote+ = -- | Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format + VideoNote+ { -- | Duration of the video, in seconds; as defined by the sender+ duration :: I32,+ -- | Video width and height; as defined by the sender + length :: I32,+ -- | Video minithumbnail; may be null+ minithumbnail :: (Maybe) (Minithumbnail),+ -- | Video thumbnail in JPEG format; as defined by the sender; may be null + thumbnail :: (Maybe) (Thumbnail),+ -- | File containing the video+ video :: File+ }+ deriving (Show, Eq, Generic)+data VoiceNote+ = -- | Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel + VoiceNote+ { -- | Duration of the voice note, in seconds; as defined by the sender+ duration :: I32,+ -- | A waveform representation of the voice note in 5-bit format + waveform :: ByteString64,+ -- | MIME type of the file; as defined by the sender + mimeType :: T,+ -- | File containing the voice note+ voice :: File+ }+ deriving (Show, Eq, Generic)+data Contact+ = -- | Describes a user contact + Contact+ { -- | Phone number of the user + phoneNumber :: T,+ -- | First name of the user; 1-255 characters in length + firstName :: T,+ -- | Last name of the user + lastName :: T,+ -- | Additional data about the user in a form of vCard; 0-2048 bytes in length + vcard :: T,+ -- | Identifier of the user, if known; otherwise 0+ userId :: I32+ }+ deriving (Show, Eq, Generic)+data Location+ = -- | Describes a location on planet Earth + Location+ { -- | Latitude of the location in degrees; as defined by the sender + latitude :: Double,+ -- | Longitude of the location, in degrees; as defined by the sender+ longitude :: Double+ }+ deriving (Show, Eq, Generic)+data Venue+ = -- | Describes a venue + Venue+ { -- | Venue location; as defined by the sender + location :: Location,+ -- | Venue name; as defined by the sender + title :: T,+ -- | Venue address; as defined by the sender + address :: T,+ -- | Provider of the venue database; as defined by the sender. Currently only "foursquare" needs to be supported+ provider :: T,+ -- | Identifier of the venue in the provider database; as defined by the sender + id :: T,+ -- | Type of the venue in the provider database; as defined by the sender+ type_ :: T+ }+ deriving (Show, Eq, Generic)+data Game+ = -- | Describes a game + Game+ { -- | Game ID + id :: I64,+ -- | Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} + shortName :: T,+ -- | Game title + title :: T,+ -- | Game text, usually containing scoreboards for a game+ text :: FormattedText,+ -- | Describes a game + description :: T,+ -- | Game photo + photo :: Photo,+ -- | Game animation; may be null+ animation :: (Maybe) (Animation)+ }+ deriving (Show, Eq, Generic)+data Poll+ = -- | Describes a poll + Poll+ { -- | Unique poll identifier + id :: I64,+ -- | Poll question, 1-255 characters + question :: T,+ -- | List of poll answer options+ options :: [PollOption],+ -- | Total number of voters, participating in the poll + totalVoterCount :: I32,+ -- | User identifiers of recent voters, if the poll is non-anonymous+ recentVoterUserIds :: [I32],+ -- | True, if the poll is anonymous + isAnonymous :: Bool,+ -- | Type of the poll+ type_ :: PollType,+ -- | Amount of time the poll will be active after creation, in seconds + openPeriod :: I32,+ -- | Point in time (Unix timestamp) when the poll will be automatically closed + closeDate :: I32,+ -- | True, if the poll is closed+ isClosed :: Bool+ }+ deriving (Show, Eq, Generic)+data ProfilePhoto+ = -- | Describes a user profile photo + ProfilePhoto+ { -- | Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of userProfilePhotos+ id :: I64,+ -- | A small (160x160) user profile photo. The file can be downloaded only before the photo is changed + small :: File,+ -- | A big (640x640) user profile photo. The file can be downloaded only before the photo is changed+ big :: File+ }+ deriving (Show, Eq, Generic)+data ChatPhoto+ = -- | Describes the photo of a chat + ChatPhoto+ { -- | A small (160x160) chat photo. The file can be downloaded only before the photo is changed + small :: File,+ -- | A big (640x640) chat photo. The file can be downloaded only before the photo is changed+ big :: File+ }+ deriving (Show, Eq, Generic)+-- | Represents the type of a user. The following types are possible: regular users, deleted users and bots+data UserType+ = -- | A regular user+ UserTypeRegular+ { + }+ | -- | A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user+ UserTypeDeleted+ { + }+ | -- | A bot (see https://core.telegram.org/bots) + UserTypeBot+ { -- | True, if the bot can be invited to basic group and supergroup chats+ canJoinGroups :: Bool,+ -- | True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages+ canReadAllGroupMessages :: Bool,+ -- | True, if the bot supports inline queries + isInline :: Bool,+ -- | Placeholder for inline queries (displayed on the client input field) + inlineQueryPlaceholder :: T,+ -- | True, if the location of the user should be sent with every inline query to this bot+ needLocation :: Bool+ }+ | -- | 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+ UserTypeUnknown+ { + }+ deriving (Show, Eq, Generic)+data BotCommand+ = -- | Represents a command supported by a bot + BotCommand+ { -- | Text of the bot command + command :: T,+ -- | Represents a command supported by a bot + description :: T+ }+ deriving (Show, Eq, Generic)+data BotInfo+ = -- | Provides information about a bot and its supported commands + BotInfo+ { -- | Provides information about a bot and its supported commands + description :: T,+ -- | A list of commands supported by the bot+ commands :: [BotCommand]+ }+ deriving (Show, Eq, Generic)+data ChatLocation+ = -- | Represents a location to which a chat is connected + ChatLocation+ { -- | The location + location :: Location,+ -- | Location address; 1-64 characters, as defined by the chat owner+ address :: T+ }+ deriving (Show, Eq, Generic)+data User+ = -- | Represents a user + User+ { -- | User identifier + id :: I32,+ -- | First name of the user + firstName :: T,+ -- | Last name of the user + lastName :: T,+ -- | Username of the user+ username :: T,+ -- | Phone number of the user + phoneNumber :: T,+ -- | Current online status of the user + status :: UserStatus,+ -- | Profile photo of the user; may be null+ profilePhoto :: (Maybe) (ProfilePhoto),+ -- | The user is a contact of the current user+ isContact :: Bool,+ -- | The user is a contact of the current user and the current user is a contact of the user+ isMutualContact :: Bool,+ -- | True, if the user is verified + isVerified :: Bool,+ -- | True, if the user is Telegram support account+ isSupport :: Bool,+ -- | If non-empty, it contains a human-readable description of the reason why access to this user must be restricted+ restrictionReason :: T,+ -- | True, if many users reported this user as a scam+ isScam :: Bool,+ -- | If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser + haveAccess :: Bool,+ -- | Type of the user + type_ :: UserType,+ -- | IETF language tag of the user's language; only available to bots+ languageCode :: T+ }+ deriving (Show, Eq, Generic)+data UserFullInfo+ = -- | Contains full information about a user (except the full list of profile photos) + UserFullInfo+ { -- | True, if the user is blacklisted by the current user+ isBlocked :: Bool,+ -- | True, if the user can be called + canBeCalled :: Bool,+ -- | True, if the user can't be called due to their privacy settings+ hasPrivateCalls :: Bool,+ -- | True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used+ needPhoneNumberPrivacyException :: Bool,+ -- | A short user bio + bio :: T,+ -- | For bots, the text that is included with the link when users share the bot + shareText :: T,+ -- | Number of group chats where both the other user and the current user are a member; 0 for the current user + groupInCommonCount :: I32,+ -- | If the user is a bot, information about the bot; may be null+ botInfo :: (Maybe) (BotInfo)+ }+ deriving (Show, Eq, Generic)+data UserProfilePhoto+ = -- | Contains full information about a user profile photo + UserProfilePhoto+ { -- | Unique user profile photo identifier + id :: I64,+ -- | Point in time (Unix timestamp) when the photo has been added + addedDate :: I32,+ -- | Available variants of the user photo, in different sizes+ sizes :: [PhotoSize]+ }+ deriving (Show, Eq, Generic)+data UserProfilePhotos+ = -- | Contains part of the list of user photos + UserProfilePhotos+ { -- | Total number of user profile photos + totalCount :: I32,+ -- | A list of photos+ photos :: [UserProfilePhoto]+ }+ deriving (Show, Eq, Generic)+data Users+ = -- | Represents a list of users + Users+ { -- | Approximate total count of users found + totalCount :: I32,+ -- | A list of user identifiers+ userIds :: [I32]+ }+ deriving (Show, Eq, Generic)+data ChatAdministrator+ = -- | Contains information about a chat administrator + ChatAdministrator+ { -- | User identifier of the administrator + userId :: I32,+ -- | Custom title of the administrator + customTitle :: T,+ -- | True, if the user is the owner of the chat+ isOwner :: Bool+ }+ deriving (Show, Eq, Generic)+data ChatAdministrators+ = -- | Represents a list of chat administrators + ChatAdministrators+ { -- | A list of chat administrators+ administrators :: [ChatAdministrator]+ }+ deriving (Show, Eq, Generic)+data ChatPermissions+ = -- | Describes actions that a user is allowed to take in a chat+ ChatPermissions+ { -- | True, if the user can send text messages, contacts, locations, and venues+ canSendMessages :: Bool,+ -- | True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions+ canSendMediaMessages :: Bool,+ -- | True, if the user can send polls. Implies can_send_messages permissions+ canSendPolls :: Bool,+ -- | True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_messages permissions+ canSendOtherMessages :: Bool,+ -- | True, if the user may add a web page preview to their messages. Implies can_send_messages permissions+ canAddWebPagePreviews :: Bool,+ -- | True, if the user can change the chat title, photo, and other settings+ canChangeInfo :: Bool,+ -- | True, if the user can invite new users to the chat+ canInviteUsers :: Bool,+ -- | True, if the user can pin messages+ canPinMessages :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Provides information about the status of a member in a chat+data ChatMemberStatus+ = -- | The user is the owner of a chat and has all the administrator privileges+ ChatMemberStatusCreator+ { -- | A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only+ customTitle :: T,+ -- | True, if the user is a member of the chat+ isMember :: Bool+ }+ | -- | The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges+ ChatMemberStatusAdministrator+ { -- | A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only+ customTitle :: T,+ -- | True, if the current user can edit the administrator privileges for the called user+ canBeEdited :: Bool,+ -- | True, if the administrator can change the chat title, photo, and other settings+ canChangeInfo :: Bool,+ -- | True, if the administrator can create channel posts; applicable to channels only+ canPostMessages :: Bool,+ -- | True, if the administrator can edit messages of other users and pin messages; applicable to channels only+ canEditMessages :: Bool,+ -- | True, if the administrator can delete messages of other users+ canDeleteMessages :: Bool,+ -- | True, if the administrator can invite new users to the chat+ canInviteUsers :: Bool,+ -- | True, if the administrator can restrict, ban, or unban chat members+ canRestrictMembers :: Bool,+ -- | True, if the administrator can pin messages; applicable to groups only+ canPinMessages :: Bool,+ -- | True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them+ canPromoteMembers :: Bool+ }+ | -- | The user is a member of a chat, without any additional privileges or restrictions+ ChatMemberStatusMember+ { + }+ | -- | The user is under certain restrictions in the chat. Not supported in basic groups and channels+ ChatMemberStatusRestricted+ { -- | True, if the user is a member of the chat+ isMember :: Bool,+ -- | Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever+ restrictedUntilDate :: I32,+ -- | User permissions in the chat+ permissions :: ChatPermissions+ }+ | -- | The user is not a chat member+ ChatMemberStatusLeft+ { + }+ | -- | The user was banned (and hence is not a member of the chat). Implies the user can't return to the chat or view messages+ ChatMemberStatusBanned+ { -- | Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever+ bannedUntilDate :: I32+ }+ deriving (Show, Eq, Generic)+data ChatMember+ = -- | A user with information about joining/leaving a chat + ChatMember+ { -- | User identifier of the chat member + userId :: I32,+ -- | Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown+ inviterUserId :: I32,+ -- | Point in time (Unix timestamp) when the user joined a chat + joinedChatDate :: I32,+ -- | Status of the member in the chat + status :: ChatMemberStatus,+ -- | If the user is a bot, information about the bot; may be null. Can be null even for a bot if the bot is not a chat member+ botInfo :: (Maybe) (BotInfo)+ }+ deriving (Show, Eq, Generic)+data ChatMembers+ = -- | Contains a list of chat members + ChatMembers+ { -- | Approximate total count of chat members found + totalCount :: I32,+ -- | A list of chat members+ members :: [ChatMember]+ }+ deriving (Show, Eq, Generic)+-- | Specifies the kind of chat members to return in searchChatMembers+data ChatMembersFilter+ = -- | Returns contacts of the user+ ChatMembersFilterContacts+ { + }+ | -- | Returns the owner and administrators+ ChatMembersFilterAdministrators+ { + }+ | -- | Returns all chat members, including restricted chat members+ ChatMembersFilterMembers+ { + }+ | -- | Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup+ ChatMembersFilterRestricted+ { + }+ | -- | Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel+ ChatMembersFilterBanned+ { + }+ | -- | Returns bot members of the chat+ ChatMembersFilterBots+ { + }+ deriving (Show, Eq, Generic)+-- | Specifies the kind of chat members to return in getSupergroupMembers+data SupergroupMembersFilter+ = -- | Returns recently active users in reverse chronological order+ SupergroupMembersFilterRecent+ { + }+ | -- | Returns contacts of the user, which are members of the supergroup or channel + SupergroupMembersFilterContacts+ { -- | Query to search for+ query :: T+ }+ | -- | Returns the owner and administrators+ SupergroupMembersFilterAdministrators+ { + }+ | -- | Used to search for supergroup or channel members via a (string) query + SupergroupMembersFilterSearch+ { -- | Query to search for+ query :: T+ }+ | -- | Returns restricted supergroup members; can be used only by administrators + SupergroupMembersFilterRestricted+ { -- | Query to search for+ query :: T+ }+ | -- | Returns users banned from the supergroup or channel; can be used only by administrators + SupergroupMembersFilterBanned+ { -- | Query to search for+ query :: T+ }+ | -- | Returns bot members of the supergroup or channel+ SupergroupMembersFilterBots+ { + }+ deriving (Show, Eq, Generic)+data BasicGroup+ = -- | Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)+ BasicGroup+ { -- | Group identifier+ id :: I32,+ -- | Number of members in the group+ memberCount :: I32,+ -- | Status of the current user in the group+ status :: ChatMemberStatus,+ -- | True, if the group is active+ isActive :: Bool,+ -- | Identifier of the supergroup to which this group was upgraded; 0 if none+ upgradedToSupergroupId :: I32+ }+ deriving (Show, Eq, Generic)+data BasicGroupFullInfo+ = -- | Contains full information about a basic group + BasicGroupFullInfo+ { -- | Contains full information about a basic group + description :: T,+ -- | User identifier of the creator of the group; 0 if unknown + creatorUserId :: I32,+ -- | Group members + members :: [ChatMember],+ -- | Invite link for this group; available only after it has been generated at least once and only for the group creator+ inviteLink :: T+ }+ deriving (Show, Eq, Generic)+data Supergroup+ = -- | Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers+ Supergroup+ { -- | Supergroup or channel identifier+ id :: I32,+ -- | Username of the supergroup or channel; empty for private supergroups or channels+ username :: T,+ -- | Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member+ date :: I32,+ -- | Status of the current user in the supergroup or channel; custom title will be always empty+ status :: ChatMemberStatus,+ -- | Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats+ memberCount :: I32,+ -- | True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel+ hasLinkedChat :: Bool,+ -- | True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup+ hasLocation :: Bool,+ -- | True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels+ signMessages :: Bool,+ -- | True, if the slow mode is enabled in the supergroup+ isSlowModeEnabled :: Bool,+ -- | True, if the supergroup is a channel+ isChannel :: Bool,+ -- | True, if the supergroup or channel is verified+ isVerified :: Bool,+ -- | If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted+ restrictionReason :: T,+ -- | True, if many users reported this supergroup as a scam+ isScam :: Bool+ }+ deriving (Show, Eq, Generic)+data SupergroupFullInfo+ = -- | Contains full information about a supergroup or channel+ SupergroupFullInfo+ { -- | Contains full information about a supergroup or channel+ description :: T,+ -- | Number of members in the supergroup or channel; 0 if unknown+ memberCount :: I32,+ -- | Number of privileged users in the supergroup or channel; 0 if unknown+ administratorCount :: I32,+ -- | Number of restricted users in the supergroup; 0 if unknown+ restrictedCount :: I32,+ -- | Number of users banned from chat; 0 if unknown+ bannedCount :: I32,+ -- | Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown+ linkedChatId :: I53,+ -- | Delay between consecutive sent messages for non-administrator supergroup members, in seconds+ slowModeDelay :: I32,+ -- | Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero+ slowModeDelayExpiresIn :: Double,+ -- | True, if members of the chat can be retrieved+ canGetMembers :: Bool,+ -- | True, if the chat username can be changed+ canSetUsername :: Bool,+ -- | True, if the supergroup sticker set can be changed+ canSetStickerSet :: Bool,+ -- | True, if the supergroup location can be changed+ canSetLocation :: Bool,+ -- | True, if the channel statistics is available+ canViewStatistics :: Bool,+ -- | True, if new chat members will have access to old messages. In public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chat. The value of this field is only available for chat administrators+ isAllHistoryAvailable :: Bool,+ -- | Identifier of the supergroup sticker set; 0 if none+ stickerSetId :: I64,+ -- | Location to which the supergroup is connected; may be null+ location :: (Maybe) (ChatLocation),+ -- | Invite link for this chat+ inviteLink :: T,+ -- | Identifier of the basic group from which supergroup was upgraded; 0 if none+ upgradedFromBasicGroupId :: I32,+ -- | Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none+ upgradedFromMaxMessageId :: I53+ }+ deriving (Show, Eq, Generic)+-- | Describes the current secret chat state+data SecretChatState+ = -- | The secret chat is not yet created; waiting for the other user to get online+ SecretChatStatePending+ { + }+ | -- | The secret chat is ready to use+ SecretChatStateReady+ { + }+ | -- | The secret chat is closed+ SecretChatStateClosed+ { + }+ deriving (Show, Eq, Generic)+data SecretChat+ = -- | Represents a secret chat+ SecretChat+ { -- | Secret chat identifier+ id :: I32,+ -- | Identifier of the chat partner+ userId :: I32,+ -- | State of the secret chat+ state :: SecretChatState,+ -- | True, if the chat was created by the current user; otherwise false+ isOutbound :: Bool,+ -- | Current message Time To Live setting (self-destruct timer) for the chat, in seconds+ ttl :: I32,+ -- | Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9.+ keyHash :: ByteString64,+ -- | Secret chat layer; determines features supported by the other client. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101+ layer :: I32+ }+ deriving (Show, Eq, Generic)+-- | Contains information about the origin of a forwarded message+data MessageForwardOrigin+ = -- | The message was originally written by a known user + MessageForwardOriginUser+ { -- | Identifier of the user that originally sent the message+ senderUserId :: I32+ }+ | -- | The message was originally written by a user, which is hidden by their privacy settings + MessageForwardOriginHiddenUser+ { -- | Name of the sender+ senderName :: T+ }+ | -- | The message was originally a post in a channel+ MessageForwardOriginChannel+ { -- | Identifier of the chat from which the message was originally forwarded+ chatId :: I53,+ -- | Message identifier of the original message; 0 if unknown+ messageId :: I53,+ -- | Original post author signature+ authorSignature :: T+ }+ deriving (Show, Eq, Generic)+data MessageForwardInfo+ = -- | Contains information about a forwarded message+ MessageForwardInfo+ { -- | Origin of a forwarded message+ origin :: MessageForwardOrigin,+ -- | Point in time (Unix timestamp) when the message was originally sent+ date :: I32,+ -- | The type of a public service announcement for the forwarded message+ publicServiceAnnouncementType :: T,+ -- | For messages forwarded to the chat with the current user (Saved Messages) or to the channel's discussion group, the identifier of the chat from which the message was forwarded last time; 0 if unknown+ fromChatId :: I53,+ -- | For messages forwarded to the chat with the current user (Saved Messages) or to the channel's discussion group, the identifier of the original message from which the new message was forwarded last time; 0 if unknown+ fromMessageId :: I53+ }+ deriving (Show, Eq, Generic)+-- | Contains information about the sending state of the message+data MessageSendingState+ = -- | The message is being sent now, but has not yet been delivered to the server+ MessageSendingStatePending+ { + }+ | -- | The message failed to be sent + MessageSendingStateFailed+ { -- | An error code; 0 if unknown + errorCode :: I32,+ -- | Error message+ errorMessage :: T,+ -- | True, if the message can be re-sent + canRetry :: Bool,+ -- | Time left before the message can be re-sent, in seconds. No update is sent when this field changes+ retryAfter :: Double+ }+ deriving (Show, Eq, Generic)+data Message+ = -- | Describes a message+ Message+ { -- | Message identifier, unique for the chat to which the message belongs+ id :: I53,+ -- | Identifier of the user who sent the message; 0 if unknown. Currently, it is unknown for channel posts and for channel posts automatically forwarded to discussion group+ senderUserId :: I32,+ -- | Chat identifier+ chatId :: I53,+ -- | Information about the sending state of the message; may be null+ sendingState :: (Maybe) (MessageSendingState),+ -- | Information about the scheduling state of the message; may be null+ schedulingState :: (Maybe) (MessageSchedulingState),+ -- | True, if the message is outgoing+ isOutgoing :: Bool,+ -- | True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the client+ canBeEdited :: Bool,+ -- | True, if the message can be forwarded+ canBeForwarded :: Bool,+ -- | True, if the message can be deleted only for the current user while other users will continue to see it+ canBeDeletedOnlyForSelf :: Bool,+ -- | True, if the message can be deleted for all users+ canBeDeletedForAllUsers :: Bool,+ -- | True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts+ isChannelPost :: Bool,+ -- | True, if the message contains an unread mention for the current user+ containsUnreadMention :: Bool,+ -- | Point in time (Unix timestamp) when the message was sent+ date :: I32,+ -- | Point in time (Unix timestamp) when the message was last edited+ editDate :: I32,+ -- | Information about the initial message sender; may be null+ forwardInfo :: (Maybe) (MessageForwardInfo),+ -- | If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message+ replyToMessageId :: I53,+ -- | For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires+ ttl :: I32,+ -- | Time left before the message expires, in seconds+ ttlExpiresIn :: Double,+ -- | If non-zero, the user identifier of the bot through which this message was sent+ viaBotUserId :: I32,+ -- | For channel posts, optional author signature+ authorSignature :: T,+ -- | Number of times this message was viewed+ views :: I32,+ -- | Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums+ mediaAlbumId :: I64,+ -- | If non-empty, contains a human-readable description of the reason why access to this message must be restricted+ restrictionReason :: T,+ -- | Content of the message+ content :: MessageContent,+ -- | Reply markup for the message; may be null+ replyMarkup :: (Maybe) (ReplyMarkup)+ }+ deriving (Show, Eq, Generic)+data Messages+ = -- | Contains a list of messages + Messages+ { -- | Approximate total count of messages found + totalCount :: I32,+ -- | List of messages; messages may be null+ messages :: [(Maybe) (Message)]+ }+ deriving (Show, Eq, Generic)+data FoundMessages+ = -- | Contains a list of messages found by a search + FoundMessages+ { -- | List of messages + messages :: [Message],+ -- | Value to pass as from_search_id to get more results+ nextFromSearchId :: I64+ }+ deriving (Show, Eq, Generic)+-- | Describes the types of chats to which notification settings are applied+data NotificationSettingsScope+ = -- | Notification settings applied to all private and secret chats when the corresponding chat setting has a default value+ NotificationSettingsScopePrivateChats+ { + }+ | -- | Notification settings applied to all basic groups and supergroups when the corresponding chat setting has a default value+ NotificationSettingsScopeGroupChats+ { + }+ | -- | Notification settings applied to all channels when the corresponding chat setting has a default value+ NotificationSettingsScopeChannelChats+ { + }+ deriving (Show, Eq, Generic)+data ChatNotificationSettings+ = -- | Contains information about notification settings for a chat+ ChatNotificationSettings+ { -- | If true, mute_for is ignored and the value for the relevant type of chat is used instead + useDefaultMuteFor :: Bool,+ -- | Time left before notifications will be unmuted, in seconds+ muteFor :: I32,+ -- | If true, sound is ignored and the value for the relevant type of chat is used instead + useDefaultSound :: Bool,+ -- | The name of an audio file to be used for notification sounds; only applies to iOS applications+ sound :: T,+ -- | If true, show_preview is ignored and the value for the relevant type of chat is used instead + useDefaultShowPreview :: Bool,+ -- | True, if message content should be displayed in notifications+ showPreview :: Bool,+ -- | If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead + useDefaultDisablePinnedMessageNotifications :: Bool,+ -- | If true, notifications for incoming pinned messages will be created as for an ordinary unread message+ disablePinnedMessageNotifications :: Bool,+ -- | If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead + useDefaultDisableMentionNotifications :: Bool,+ -- | If true, notifications for messages with mentions will be created as for an ordinary unread message+ disableMentionNotifications :: Bool+ }+ deriving (Show, Eq, Generic)+data ScopeNotificationSettings+ = -- | Contains information about notification settings for several chats+ ScopeNotificationSettings+ { -- | Time left before notifications will be unmuted, in seconds+ muteFor :: I32,+ -- | The name of an audio file to be used for notification sounds; only applies to iOS applications+ sound :: T,+ -- | True, if message content should be displayed in notifications+ showPreview :: Bool,+ -- | True, if notifications for incoming pinned messages will be created as for an ordinary unread message+ disablePinnedMessageNotifications :: Bool,+ -- | True, if notifications for messages with mentions will be created as for an ordinary unread message+ disableMentionNotifications :: Bool+ }+ deriving (Show, Eq, Generic)+data DraftMessage+ = -- | Contains information about a message draft+ DraftMessage+ { -- | Identifier of the message to reply to; 0 if none+ replyToMessageId :: I53,+ -- | Point in time (Unix timestamp) when the draft was created+ date :: I32,+ -- | Content of the message draft; this should always be of type inputMessageText+ inputMessageText :: InputMessageContent+ }+ deriving (Show, Eq, Generic)+-- | Describes the type of a chat+data ChatType+ = -- | An ordinary chat with a user + ChatTypePrivate+ { -- | User identifier+ userId :: I32+ }+ | -- | A basic group (i.e., a chat with 0-200 other users) + ChatTypeBasicGroup+ { -- | Basic group identifier+ basicGroupId :: I32+ }+ | -- | A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members) + ChatTypeSupergroup+ { -- | Supergroup or channel identifier + supergroupId :: I32,+ -- | True, if the supergroup is a channel+ isChannel :: Bool+ }+ | -- | A secret chat with a user + ChatTypeSecret+ { -- | Secret chat identifier + secretChatId :: I32,+ -- | User identifier of the secret chat peer+ userId :: I32+ }+ deriving (Show, Eq, Generic)+data ChatFilter+ = -- | Represents a filter of user chats+ ChatFilter+ { -- | The title of the filter; 1-12 characters without line feeds+ title :: T,+ -- | The icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work".+ iconName :: T,+ -- | The chat identifiers of pinned chats in the filtered chat list+ pinnedChatIds :: [I53],+ -- | The chat identifiers of always included chats in the filtered chat list+ includedChatIds :: [I53],+ -- | The chat identifiers of always excluded chats in the filtered chat list+ excludedChatIds :: [I53],+ -- | True, if the muted chats need to be excluded+ excludeMuted :: Bool,+ -- | True, if read chats need to be excluded+ excludeRead :: Bool,+ -- | True, if archived chats need to be excluded+ excludeArchived :: Bool,+ -- | True, if contacts need to be included+ includeContacts :: Bool,+ -- | True, if non-contact users need to be included+ includeNonContacts :: Bool,+ -- | True, if bots need to be included+ includeBots :: Bool,+ -- | True, if basic groups and supergroups need to be included+ includeGroups :: Bool,+ -- | True, if channels need to be included+ includeChannels :: Bool+ }+ deriving (Show, Eq, Generic)+data ChatFilterInfo+ = -- | Contains basic information about a chat filter+ ChatFilterInfo+ { -- | Unique chat filter identifier+ id :: I32,+ -- | The title of the filter; 1-12 characters without line feeds+ title :: T,+ -- | The icon name for short filter representation. One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work"+ iconName :: T+ }+ deriving (Show, Eq, Generic)+data RecommendedChatFilter+ = -- | Describes a recommended chat filter + RecommendedChatFilter+ { -- | The chat filter + filter :: ChatFilter,+ -- | Describes a recommended chat filter + description :: T+ }+ deriving (Show, Eq, Generic)+data RecommendedChatFilters+ = -- | Contains a list of recommended chat filters + RecommendedChatFilters+ { -- | List of recommended chat filters+ chatFilters :: [RecommendedChatFilter]+ }+ deriving (Show, Eq, Generic)+-- | Describes a list of chats+data ChatList+ = -- | A main list of chats+ ChatListMain+ { + }+ | -- | A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives+ ChatListArchive+ { + }+ | -- | A list of chats belonging to a chat filter + ChatListFilter+ { -- | Chat filter identifier+ chatFilterId :: I32+ }+ deriving (Show, Eq, Generic)+data ChatLists+ = -- | Contains a list of chat lists + ChatLists+ { -- | List of chat lists+ chatLists :: [ChatList]+ }+ deriving (Show, Eq, Generic)+-- | Describes a reason why an external chat is shown in a chat list+data ChatSource+ = -- | The chat is sponsored by the user's MTProxy server+ ChatSourceMtprotoProxy+ { + }+ | -- | The chat contains a public service announcement + ChatSourcePublicServiceAnnouncement+ { -- | The type of the announcement + type_ :: T,+ -- | The text of the announcement+ text :: T+ }+ deriving (Show, Eq, Generic)+data ChatPosition+ = -- | Describes a position of a chat in a chat list+ ChatPosition+ { -- | The chat list+ list :: ChatList,+ -- | A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order+ order :: I64,+ -- | True, if the chat is pinned in the chat list+ isPinned :: Bool,+ -- | Source of the chat in the chat list; may be null+ source :: (Maybe) (ChatSource)+ }+ deriving (Show, Eq, Generic)+data Chat+ = -- | A chat. (Can be a private chat, basic group, supergroup, or secret chat)+ Chat+ { -- | Chat unique identifier+ id :: I53,+ -- | Type of the chat+ type_ :: ChatType,+ -- | Chat title+ title :: T,+ -- | Chat photo; may be null+ photo :: (Maybe) (ChatPhoto),+ -- | Actions that non-administrator chat members are allowed to take in the chat+ permissions :: ChatPermissions,+ -- | Last message in the chat; may be null+ lastMessage :: (Maybe) (Message),+ -- | Positions of the chat in chat lists+ positions :: [ChatPosition],+ -- | True, if the chat is marked as unread+ isMarkedAsUnread :: Bool,+ -- | True, if the chat has scheduled messages+ hasScheduledMessages :: Bool,+ -- | True, if the chat messages can be deleted only for the current user while other users will continue to see the messages+ canBeDeletedOnlyForSelf :: Bool,+ -- | True, if the chat messages can be deleted for all users+ canBeDeletedForAllUsers :: Bool,+ -- | True, if the chat can be reported to Telegram moderators through reportChat+ canBeReported :: Bool,+ -- | Default value of the disable_notification parameter, used when a message is sent to the chat+ defaultDisableNotification :: Bool,+ -- | Number of unread messages in the chat+ unreadCount :: I32,+ -- | Identifier of the last read incoming message+ lastReadInboxMessageId :: I53,+ -- | Identifier of the last read outgoing message+ lastReadOutboxMessageId :: I53,+ -- | Number of unread messages with a mention/reply in the chat+ unreadMentionCount :: I32,+ -- | Notification settings for this chat+ notificationSettings :: ChatNotificationSettings,+ -- | Describes actions which should be possible to do through a chat action bar; may be null+ actionBar :: (Maybe) (ChatActionBar),+ -- | Identifier of the pinned message in the chat; 0 if none+ pinnedMessageId :: I53,+ -- | Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat+ replyMarkupMessageId :: I53,+ -- | A draft of a message in the chat; may be null+ draftMessage :: (Maybe) (DraftMessage),+ -- | Contains client-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used+ clientData :: T+ }+ deriving (Show, Eq, Generic)+data Chats+ = -- | Represents a list of chats + Chats+ { -- | List of chat identifiers+ chatIds :: [I53]+ }+ deriving (Show, Eq, Generic)+data ChatNearby+ = -- | Describes a chat located nearby + ChatNearby+ { -- | Chat identifier + chatId :: I53,+ -- | Distance to the chat location in meters+ distance :: I32+ }+ deriving (Show, Eq, Generic)+data ChatsNearby+ = -- | Represents a list of chats located nearby + ChatsNearby+ { -- | List of users nearby + usersNearby :: [ChatNearby],+ -- | List of location-based supergroups nearby+ supergroupsNearby :: [ChatNearby]+ }+ deriving (Show, Eq, Generic)+data ChatInviteLink+ = -- | Contains a chat invite link + ChatInviteLink+ { -- | Chat invite link+ inviteLink :: T+ }+ deriving (Show, Eq, Generic)+data ChatInviteLinkInfo+ = -- | Contains information about a chat invite link+ ChatInviteLinkInfo+ { -- | Chat identifier of the invite link; 0 if the user is not a member of this chat+ chatId :: I53,+ -- | Contains information about the type of the chat+ type_ :: ChatType,+ -- | Title of the chat+ title :: T,+ -- | Chat photo; may be null+ photo :: (Maybe) (ChatPhoto),+ -- | Number of members in the chat+ memberCount :: I32,+ -- | User identifiers of some chat members that may be known to the current user+ memberUserIds :: [I32],+ -- | True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup+ isPublic :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Describes a type of public chats+data PublicChatType+ = -- | The chat is public, because it has username+ PublicChatTypeHasUsername+ { + }+ | -- | The chat is public, because it is a location-based supergroup+ PublicChatTypeIsLocationBased+ { + }+ deriving (Show, Eq, Generic)+-- | Describes actions which should be possible to do through a chat action bar+data ChatActionBar+ = -- | The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam+ ChatActionBarReportSpam+ { + }+ | -- | The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation+ ChatActionBarReportUnrelatedLocation+ { + }+ | -- | The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be added to the contact list using the method addContact, or the other user can be blocked using the method blockUser+ ChatActionBarReportAddBlock+ { + }+ | -- | The chat is a private or secret chat and the other user can be added to the contact list using the method addContact+ ChatActionBarAddContact+ { + }+ | -- | The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber+ ChatActionBarSharePhoneNumber+ { + }+ deriving (Show, Eq, Generic)+-- | Describes a keyboard button type+data KeyboardButtonType+ = -- | A simple button, with text that should be sent when the button is pressed+ KeyboardButtonTypeText+ { + }+ | -- | A button that sends the user's phone number when pressed; available only in private chats+ KeyboardButtonTypeRequestPhoneNumber+ { + }+ | -- | A button that sends the user's location when pressed; available only in private chats+ KeyboardButtonTypeRequestLocation+ { + }+ | -- | A button that allows the user to create and send a poll when pressed; available only in private chats + KeyboardButtonTypeRequestPoll+ { -- | If true, only regular polls must be allowed to create + forceRegular :: Bool,+ -- | If true, only polls in quiz mode must be allowed to create+ forceQuiz :: Bool+ }+ deriving (Show, Eq, Generic)+data KeyboardButton+ = -- | Represents a single button in a bot keyboard + KeyboardButton+ { -- | Text of the button + text :: T,+ -- | Type of the button+ type_ :: KeyboardButtonType+ }+ deriving (Show, Eq, Generic)+-- | Describes the type of an inline keyboard button+data InlineKeyboardButtonType+ = -- | A button that opens a specified URL + InlineKeyboardButtonTypeUrl+ { -- | HTTP or tg:// URL to open+ url :: T+ }+ | -- | A button that opens a specified URL and automatically logs in in current user if they allowed to do that + InlineKeyboardButtonTypeLoginUrl+ { -- | An HTTP URL to open + url :: T,+ -- | Unique button identifier + id :: I32,+ -- | If non-empty, new text of the button in forwarded messages+ forwardText :: T+ }+ | -- | A button that sends a special callback query to a bot + InlineKeyboardButtonTypeCallback+ { -- | Data to be sent to the bot via a callback query+ data_ :: ByteString64+ }+ | -- | A button with a game that sends a special callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame+ InlineKeyboardButtonTypeCallbackGame+ { + }+ | -- | A button that forces an inline query to the bot to be inserted in the input field + InlineKeyboardButtonTypeSwitchInline+ { -- | Inline query to be sent to the bot + query :: T,+ -- | True, if the inline query should be sent from the current chat+ inCurrentChat :: Bool+ }+ | -- | A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice+ InlineKeyboardButtonTypeBuy+ { + }+ deriving (Show, Eq, Generic)+data InlineKeyboardButton+ = -- | Represents a single button in an inline keyboard + InlineKeyboardButton+ { -- | Text of the button + text :: T,+ -- | Type of the button+ type_ :: InlineKeyboardButtonType+ }+ deriving (Show, Eq, Generic)+-- | Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots+data ReplyMarkup+ = -- | Instructs clients to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with message_id == 0 will be sent+ ReplyMarkupRemoveKeyboard+ { -- | True, if the keyboard is removed only for the mentioned users or the target user of a reply+ isPersonal :: Bool+ }+ | -- | Instructs clients to force a reply to this message+ ReplyMarkupForceReply+ { -- | True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply+ isPersonal :: Bool+ }+ | -- | Contains a custom keyboard layout to quickly reply to bots+ ReplyMarkupShowKeyboard+ { -- | A list of rows of bot keyboard buttons+ rows_2 :: [[KeyboardButton]],+ -- | True, if the client needs to resize the keyboard vertically+ resizeKeyboard :: Bool,+ -- | True, if the client needs to hide the keyboard after use+ oneTime :: Bool,+ -- | True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply+ isPersonal :: Bool+ }+ | -- | Contains an inline keyboard layout+ ReplyMarkupInlineKeyboard+ { -- | A list of rows of inline keyboard buttons+ rows :: [[InlineKeyboardButton]]+ }+ deriving (Show, Eq, Generic)+-- | Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl+data LoginUrlInfo+ = -- | An HTTP url needs to be open + LoginUrlInfoOpen+ { -- | The URL to open + url :: T,+ -- | True, if there is no need to show an ordinary open URL confirm+ skipConfirm :: Bool+ }+ | -- | An authorization confirmation dialog needs to be shown to the user + LoginUrlInfoRequestConfirmation+ { -- | An HTTP URL to be opened + url :: T,+ -- | A domain of the URL+ domain :: T,+ -- | User identifier of a bot linked with the website + botUserId :: I32,+ -- | True, if the user needs to be requested to give the permission to the bot to send them messages+ requestWriteAccess :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Describes a text object inside an instant-view web page+data RichText+ = -- | A plain text + RichTextPlain+ { -- | Text+ text_2 :: T+ }+ | -- | A bold rich text + RichTextBold+ { -- | Text+ text :: RichText+ }+ | -- | An italicized rich text + RichTextItalic+ { -- | Text+ text :: RichText+ }+ | -- | An underlined rich text + RichTextUnderline+ { -- | Text+ text :: RichText+ }+ | -- | A strikethrough rich text + RichTextStrikethrough+ { -- | Text+ text :: RichText+ }+ | -- | A fixed-width rich text + RichTextFixed+ { -- | Text+ text :: RichText+ }+ | -- | A rich text URL link + RichTextUrl+ { -- | Text + text :: RichText,+ -- | URL + url :: T,+ -- | True, if the URL has cached instant view server-side+ isCached :: Bool+ }+ | -- | A rich text email link + RichTextEmailAddress+ { -- | Text + text :: RichText,+ -- | Email address+ emailAddress :: T+ }+ | -- | A subscript rich text + RichTextSubscript+ { -- | Text+ text :: RichText+ }+ | -- | A superscript rich text + RichTextSuperscript+ { -- | Text+ text :: RichText+ }+ | -- | A marked rich text + RichTextMarked+ { -- | Text+ text :: RichText+ }+ | -- | A rich text phone number + RichTextPhoneNumber+ { -- | Text + text :: RichText,+ -- | Phone number+ phoneNumber :: T+ }+ | -- | A small image inside the text + RichTextIcon+ { -- | The image represented as a document. The image can be in GIF, JPEG or PNG format+ document :: Document,+ -- | Width of a bounding box in which the image should be shown; 0 if unknown+ width :: I32,+ -- | Height of a bounding box in which the image should be shown; 0 if unknown+ height :: I32+ }+ | -- | A rich text reference of a text on the same web page + RichTextReference+ { -- | The text + text :: RichText,+ -- | The text to show on click + referenceText :: RichText,+ -- | An HTTP URL, opening the reference+ url :: T+ }+ | -- | An anchor + RichTextAnchor+ { -- | Anchor name+ name :: T+ }+ | -- | A link to an anchor on the same web page + RichTextAnchorLink+ { -- | The link text + text :: RichText,+ -- | The anchor name. If the name is empty, the link should bring back to top + name :: T,+ -- | An HTTP URL, opening the anchor+ url :: T+ }+ | -- | A concatenation of rich texts + RichTexts+ { -- | Texts+ texts :: [RichText]+ }+ deriving (Show, Eq, Generic)+data PageBlockCaption+ = -- | Contains a caption of an instant view web page block, consisting of a text and a trailing credit + PageBlockCaption+ { -- | Content of the caption + text :: RichText,+ -- | Block credit (like HTML tag <cite>)+ credit :: RichText+ }+ deriving (Show, Eq, Generic)+data PageBlockListItem+ = -- | Describes an item of a list page block + PageBlockListItem+ { -- | Item label + label :: T,+ -- | Item blocks+ pageBlocks :: [PageBlock]+ }+ deriving (Show, Eq, Generic)+-- | Describes a horizontal alignment of a table cell content+data PageBlockHorizontalAlignment+ = -- | The content should be left-aligned+ PageBlockHorizontalAlignmentLeft+ { + }+ | -- | The content should be center-aligned+ PageBlockHorizontalAlignmentCenter+ { + }+ | -- | The content should be right-aligned+ PageBlockHorizontalAlignmentRight+ { + }+ deriving (Show, Eq, Generic)+-- | Describes a Vertical alignment of a table cell content+data PageBlockVerticalAlignment+ = -- | The content should be top-aligned+ PageBlockVerticalAlignmentTop+ { + }+ | -- | The content should be middle-aligned+ PageBlockVerticalAlignmentMiddle+ { + }+ | -- | The content should be bottom-aligned+ PageBlockVerticalAlignmentBottom+ { + }+ deriving (Show, Eq, Generic)+data PageBlockTableCell+ = -- | Represents a cell of a table + PageBlockTableCell+ { -- | Cell text; may be null. If the text is null, then the cell should be invisible + text :: (Maybe) (RichText),+ -- | True, if it is a header cell+ isHeader :: Bool,+ -- | The number of columns the cell should span + colspan :: I32,+ -- | The number of rows the cell should span+ rowspan :: I32,+ -- | Horizontal cell content alignment + align :: PageBlockHorizontalAlignment,+ -- | Vertical cell content alignment+ valign :: PageBlockVerticalAlignment+ }+ deriving (Show, Eq, Generic)+data PageBlockRelatedArticle+ = -- | Contains information about a related article + PageBlockRelatedArticle+ { -- | Related article URL + url :: T,+ -- | Article title; may be empty + title :: T,+ -- | Contains information about a related article + description :: T,+ -- | Article photo; may be null + photo :: (Maybe) (Photo),+ -- | Article author; may be empty + author :: T,+ -- | Point in time (Unix timestamp) when the article was published; 0 if unknown+ publishDate :: I32+ }+ deriving (Show, Eq, Generic)+-- | Describes a block of an instant view web page+data PageBlock+ = -- | The title of a page + PageBlockTitle+ { -- | Title+ title_2 :: RichText+ }+ | -- | The subtitle of a page + PageBlockSubtitle+ { -- | Subtitle+ subtitle :: RichText+ }+ | -- | The author and publishing date of a page + PageBlockAuthorDate+ { -- | Author + author_2 :: RichText,+ -- | Point in time (Unix timestamp) when the article was published; 0 if unknown+ publishDate :: I32+ }+ | -- | A header + PageBlockHeader+ { -- | Header+ header :: RichText+ }+ | -- | A subheader + PageBlockSubheader+ { -- | Subheader+ subheader :: RichText+ }+ | -- | A kicker + PageBlockKicker+ { -- | Kicker+ kicker :: RichText+ }+ | -- | A text paragraph + PageBlockParagraph+ { -- | Paragraph text+ text :: RichText+ }+ | -- | A preformatted text paragraph + PageBlockPreformatted+ { -- | Paragraph text + text :: RichText,+ -- | Programming language for which the text should be formatted+ language :: T+ }+ | -- | The footer of a page + PageBlockFooter+ { -- | Footer+ footer :: RichText+ }+ | -- | An empty block separating a page+ PageBlockDivider+ { + }+ | -- | An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor + PageBlockAnchor+ { -- | Name of the anchor+ name :: T+ }+ | -- | A list of data blocks + PageBlockList+ { -- | The items of the list+ items :: [PageBlockListItem]+ }+ | -- | A block quote + PageBlockBlockQuote+ { -- | Quote text + text :: RichText,+ -- | Quote credit+ credit :: RichText+ }+ | -- | A pull quote + PageBlockPullQuote+ { -- | Quote text + text :: RichText,+ -- | Quote credit+ credit :: RichText+ }+ | -- | An animation + PageBlockAnimation+ { -- | Animation file; may be null + animation :: (Maybe) (Animation),+ -- | Animation caption + caption :: PageBlockCaption,+ -- | True, if the animation should be played automatically+ needAutoplay :: Bool+ }+ | -- | An audio file + PageBlockAudio+ { -- | Audio file; may be null + audio :: (Maybe) (Audio),+ -- | Audio file caption+ caption :: PageBlockCaption+ }+ | -- | A photo + PageBlockPhoto+ { -- | Photo file; may be null + photo_2 :: (Maybe) (Photo),+ -- | Photo caption + caption :: PageBlockCaption,+ -- | URL that needs to be opened when the photo is clicked+ url :: T+ }+ | -- | A video + PageBlockVideo+ { -- | Video file; may be null + video :: (Maybe) (Video),+ -- | Video caption + caption :: PageBlockCaption,+ -- | True, if the video should be played automatically + needAutoplay :: Bool,+ -- | True, if the video should be looped+ isLooped :: Bool+ }+ | -- | A voice note + PageBlockVoiceNote+ { -- | Voice note; may be null + voiceNote :: (Maybe) (VoiceNote),+ -- | Voice note caption+ caption :: PageBlockCaption+ }+ | -- | A page cover + PageBlockCover+ { -- | Cover+ cover :: PageBlock+ }+ | -- | An embedded web page + PageBlockEmbedded+ { -- | Web page URL, if available + url :: T,+ -- | HTML-markup of the embedded page + html :: T,+ -- | Poster photo, if available; may be null + posterPhoto :: (Maybe) (Photo),+ -- | Block width; 0 if unknown + width :: I32,+ -- | Block height; 0 if unknown + height :: I32,+ -- | Block caption + caption :: PageBlockCaption,+ -- | True, if the block should be full width + isFullWidth :: Bool,+ -- | True, if scrolling should be allowed+ allowScrolling :: Bool+ }+ | -- | An embedded post + PageBlockEmbeddedPost+ { -- | Web page URL + url :: T,+ -- | Post author + author :: T,+ -- | Post author photo; may be null + authorPhoto :: (Maybe) (Photo),+ -- | Point in time (Unix timestamp) when the post was created; 0 if unknown + date :: I32,+ -- | Post content + pageBlocks :: [PageBlock],+ -- | Post caption+ caption :: PageBlockCaption+ }+ | -- | A collage + PageBlockCollage+ { -- | Collage item contents + pageBlocks :: [PageBlock],+ -- | Block caption+ caption :: PageBlockCaption+ }+ | -- | A slideshow + PageBlockSlideshow+ { -- | Slideshow item contents + pageBlocks :: [PageBlock],+ -- | Block caption+ caption :: PageBlockCaption+ }+ | -- | A link to a chat + PageBlockChatLink+ { -- | Chat title + title :: T,+ -- | Chat photo; may be null + photo :: (Maybe) (ChatPhoto),+ -- | Chat username, by which all other information about the chat should be resolved+ username :: T+ }+ | -- | A table + PageBlockTable+ { -- | Table caption + caption_2 :: RichText,+ -- | Table cells + cells :: [[PageBlockTableCell]],+ -- | True, if the table is bordered + isBordered :: Bool,+ -- | True, if the table is striped+ isStriped :: Bool+ }+ | -- | A collapsible block + PageBlockDetails+ { -- | Always visible heading for the block + header :: RichText,+ -- | Block contents + pageBlocks :: [PageBlock],+ -- | True, if the block is open by default+ isOpen :: Bool+ }+ | -- | Related articles + PageBlockRelatedArticles+ { -- | Block header + header :: RichText,+ -- | List of related articles+ articles :: [PageBlockRelatedArticle]+ }+ | -- | A map + PageBlockMap+ { -- | Location of the map center + location :: Location,+ -- | Map zoom level + zoom :: I32,+ -- | Map width + width :: I32,+ -- | Map height + height :: I32,+ -- | Block caption+ caption :: PageBlockCaption+ }+ deriving (Show, Eq, Generic)+data WebPageInstantView+ = -- | Describes an instant view page for a web page+ WebPageInstantView+ { -- | Content of the web page+ pageBlocks :: [PageBlock],+ -- | Number of the instant view views; 0 if unknown+ viewCount :: I32,+ -- | Version of the instant view, currently can be 1 or 2+ version :: I32,+ -- | True, if the instant view must be shown from right to left+ isRtl :: Bool,+ -- | True, if the instant view contains the full page. A network request might be needed to get the full web page instant view+ isFull :: Bool+ }+ deriving (Show, Eq, Generic)+data WebPage+ = -- | Describes a web page preview+ WebPage+ { -- | Original URL of the link+ url :: T,+ -- | URL to display+ displayUrl :: T,+ -- | Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else+ type_ :: T,+ -- | Short name of the site (e.g., Google Docs, App Store)+ siteName :: T,+ -- | Title of the content+ title :: T,+ -- | Describes a web page preview+ description :: FormattedText,+ -- | Image representing the content; may be null+ photo :: (Maybe) (Photo),+ -- | URL to show in the embedded preview+ embedUrl :: T,+ -- | MIME type of the embedded preview, (e.g., text/html or video/mp4)+ embedType :: T,+ -- | Width of the embedded preview+ embedWidth :: I32,+ -- | Height of the embedded preview+ embedHeight :: I32,+ -- | Duration of the content, in seconds+ duration :: I32,+ -- | Author of the content+ author :: T,+ -- | Preview of the content as an animation, if available; may be null+ animation :: (Maybe) (Animation),+ -- | Preview of the content as an audio file, if available; may be null+ audio :: (Maybe) (Audio),+ -- | Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null+ document :: (Maybe) (Document),+ -- | Preview of the content as a sticker for small WEBP files, if available; may be null+ sticker :: (Maybe) (Sticker),+ -- | Preview of the content as a video, if available; may be null+ video :: (Maybe) (Video),+ -- | Preview of the content as a video note, if available; may be null+ videoNote :: (Maybe) (VideoNote),+ -- | Preview of the content as a voice note, if available; may be null+ voiceNote :: (Maybe) (VoiceNote),+ -- | Version of instant view, available for the web page (currently can be 1 or 2), 0 if none+ instantViewVersion :: I32+ }+ deriving (Show, Eq, Generic)+data BankCardActionOpenUrl+ = -- | Describes an action associated with a bank card number + BankCardActionOpenUrl+ { -- | Action text + text :: T,+ -- | The URL to be opened+ url :: T+ }+ deriving (Show, Eq, Generic)+data BankCardInfo+ = -- | Information about a bank card + BankCardInfo+ { -- | Title of the bank card description + title :: T,+ -- | Actions that can be done with the bank card number+ actions :: [BankCardActionOpenUrl]+ }+ deriving (Show, Eq, Generic)+data Address+ = -- | Describes an address + Address+ { -- | A two-letter ISO 3166-1 alpha-2 country code + countryCode :: T,+ -- | State, if applicable + state :: T,+ -- | City + city :: T,+ -- | First line of the address + streetLine1 :: T,+ -- | Second line of the address + streetLine2 :: T,+ -- | Address postal code+ postalCode :: T+ }+ deriving (Show, Eq, Generic)+data LabeledPricePart+ = -- | Portion of the price of a product (e.g., "delivery cost", "tax amount") + LabeledPricePart+ { -- | Label for this portion of the product price + label :: T,+ -- | Currency amount in minimal quantity of the currency+ amount :: I53+ }+ deriving (Show, Eq, Generic)+data Invoice+ = -- | Product invoice + Invoice+ { -- | ISO 4217 currency code + currency :: T,+ -- | A list of objects used to calculate the total price of the product + priceParts :: [LabeledPricePart],+ -- | True, if the payment is a test payment+ isTest :: Bool,+ -- | True, if the user's name is needed for payment + needName :: Bool,+ -- | True, if the user's phone number is needed for payment + needPhoneNumber :: Bool,+ -- | True, if the user's email address is needed for payment+ needEmailAddress :: Bool,+ -- | True, if the user's shipping address is needed for payment + needShippingAddress :: Bool,+ -- | True, if the user's phone number will be sent to the provider+ sendPhoneNumberToProvider :: Bool,+ -- | True, if the user's email address will be sent to the provider + sendEmailAddressToProvider :: Bool,+ -- | True, if the total price depends on the shipping method+ isFlexible :: Bool+ }+ deriving (Show, Eq, Generic)+data OrderInfo+ = -- | Order information + OrderInfo+ { -- | Name of the user + name :: T,+ -- | Phone number of the user + phoneNumber :: T,+ -- | Email address of the user + emailAddress :: T,+ -- | Shipping address for this order; may be null+ shippingAddress :: (Maybe) (Address)+ }+ deriving (Show, Eq, Generic)+data ShippingOption+ = -- | One shipping option + ShippingOption+ { -- | Shipping option identifier + id :: T,+ -- | Option title + title :: T,+ -- | A list of objects used to calculate the total shipping costs+ priceParts :: [LabeledPricePart]+ }+ deriving (Show, Eq, Generic)+data SavedCredentials+ = -- | Contains information about saved card credentials + SavedCredentials+ { -- | Unique identifier of the saved credentials + id :: T,+ -- | Title of the saved credentials+ title :: T+ }+ deriving (Show, Eq, Generic)+-- | Contains information about the payment method chosen by the user+data InputCredentials+ = -- | Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password + InputCredentialsSaved+ { -- | Identifier of the saved credentials+ savedCredentialsId :: T+ }+ | -- | Applies if a user enters new credentials on a payment provider website + InputCredentialsNew+ { -- | Contains JSON-encoded data with a credential identifier from the payment provider + data_ :: T,+ -- | True, if the credential identifier can be saved on the server side+ allowSave :: Bool+ }+ | -- | Applies if a user enters new credentials using Android Pay + InputCredentialsAndroidPay+ { -- | JSON-encoded data with the credential identifier+ data_ :: T+ }+ | -- | Applies if a user enters new credentials using Apple Pay + InputCredentialsApplePay+ { -- | JSON-encoded data with the credential identifier+ data_ :: T+ }+ deriving (Show, Eq, Generic)+data PaymentsProviderStripe+ = -- | Stripe payment provider + PaymentsProviderStripe+ { -- | Stripe API publishable key + publishableKey :: T,+ -- | True, if the user country must be provided + needCountry :: Bool,+ -- | True, if the user ZIP/postal code must be provided + needPostalCode :: Bool,+ -- | True, if the cardholder name must be provided+ needCardholderName :: Bool+ }+ deriving (Show, Eq, Generic)+data PaymentForm+ = -- | Contains information about an invoice payment form + PaymentForm+ { -- | Full information of the invoice + invoice :: Invoice,+ -- | Payment form URL + url :: T,+ -- | Contains information about the payment provider, if available, to support it natively without the need for opening the URL; may be null+ paymentsProvider :: (Maybe) (PaymentsProviderStripe),+ -- | Saved server-side order information; may be null + savedOrderInfo :: (Maybe) (OrderInfo),+ -- | Contains information about saved card credentials; may be null + savedCredentials :: (Maybe) (SavedCredentials),+ -- | True, if the user can choose to save credentials + canSaveCredentials :: Bool,+ -- | True, if the user will be able to save credentials protected by a password they set up+ needPassword :: Bool+ }+ deriving (Show, Eq, Generic)+data ValidatedOrderInfo+ = -- | Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options + ValidatedOrderInfo+ { -- | Temporary identifier of the order information + orderInfoId :: T,+ -- | Available shipping options+ shippingOptions :: [ShippingOption]+ }+ deriving (Show, Eq, Generic)+data PaymentResult+ = -- | Contains the result of a payment request + PaymentResult+ { -- | True, if the payment request was successful; otherwise the verification_url will be not empty + success :: Bool,+ -- | URL for additional payment credentials verification+ verificationUrl :: T+ }+ deriving (Show, Eq, Generic)+data PaymentReceipt+ = -- | Contains information about a successful payment + PaymentReceipt+ { -- | Point in time (Unix timestamp) when the payment was made + date :: I32,+ -- | User identifier of the payment provider bot + paymentsProviderUserId :: I32,+ -- | Contains information about the invoice+ invoice :: Invoice,+ -- | Contains order information; may be null + orderInfo :: (Maybe) (OrderInfo),+ -- | Chosen shipping option; may be null + shippingOption :: (Maybe) (ShippingOption),+ -- | Title of the saved credentials+ credentialsTitle :: T+ }+ deriving (Show, Eq, Generic)+data DatedFile+ = -- | File with the date it was uploaded + DatedFile+ { -- | The file + file :: File,+ -- | Point in time (Unix timestamp) when the file was uploaded+ date :: I32+ }+ deriving (Show, Eq, Generic)+-- | Contains the type of a Telegram Passport element+data PassportElementType+ = -- | A Telegram Passport element containing the user's personal details+ PassportElementTypePersonalDetails+ { + }+ | -- | A Telegram Passport element containing the user's passport+ PassportElementTypePassport+ { + }+ | -- | A Telegram Passport element containing the user's driver license+ PassportElementTypeDriverLicense+ { + }+ | -- | A Telegram Passport element containing the user's identity card+ PassportElementTypeIdentityCard+ { + }+ | -- | A Telegram Passport element containing the user's internal passport+ PassportElementTypeInternalPassport+ { + }+ | -- | A Telegram Passport element containing the user's address+ PassportElementTypeAddress+ { + }+ | -- | A Telegram Passport element containing the user's utility bill+ PassportElementTypeUtilityBill+ { + }+ | -- | A Telegram Passport element containing the user's bank statement+ PassportElementTypeBankStatement+ { + }+ | -- | A Telegram Passport element containing the user's rental agreement+ PassportElementTypeRentalAgreement+ { + }+ | -- | A Telegram Passport element containing the registration page of the user's passport+ PassportElementTypePassportRegistration+ { + }+ | -- | A Telegram Passport element containing the user's temporary registration+ PassportElementTypeTemporaryRegistration+ { + }+ | -- | A Telegram Passport element containing the user's phone number+ PassportElementTypePhoneNumber+ { + }+ | -- | A Telegram Passport element containing the user's email address+ PassportElementTypeEmailAddress+ { + }+ deriving (Show, Eq, Generic)+data Date+ = -- | Represents a date according to the Gregorian calendar + Date+ { -- | Day of the month, 1-31 + day :: I32,+ -- | Month, 1-12 + month :: I32,+ -- | Year, 1-9999+ year :: I32+ }+ deriving (Show, Eq, Generic)+data PersonalDetails+ = -- | Contains the user's personal details+ PersonalDetails+ { -- | First name of the user written in English; 1-255 characters + firstName :: T,+ -- | Middle name of the user written in English; 0-255 characters + middleName :: T,+ -- | Last name of the user written in English; 1-255 characters+ lastName :: T,+ -- | Native first name of the user; 1-255 characters + nativeFirstName :: T,+ -- | Native middle name of the user; 0-255 characters + nativeMiddleName :: T,+ -- | Native last name of the user; 1-255 characters+ nativeLastName :: T,+ -- | Birthdate of the user + birthdate :: Date,+ -- | Gender of the user, "male" or "female" + gender :: T,+ -- | A two-letter ISO 3166-1 alpha-2 country code of the user's country + countryCode :: T,+ -- | A two-letter ISO 3166-1 alpha-2 country code of the user's residence country+ residenceCountryCode :: T+ }+ deriving (Show, Eq, Generic)+data IdentityDocument+ = -- | An identity document + IdentityDocument+ { -- | Document number; 1-24 characters + number :: T,+ -- | Document expiry date; may be null + expiryDate :: (Maybe) (Date),+ -- | Front side of the document+ frontSide :: DatedFile,+ -- | Reverse side of the document; only for driver license and identity card + reverseSide :: DatedFile,+ -- | Selfie with the document; may be null + selfie :: (Maybe) (DatedFile),+ -- | List of files containing a certified English translation of the document+ translation :: [DatedFile]+ }+ deriving (Show, Eq, Generic)+data InputIdentityDocument+ = -- | An identity document to be saved to Telegram Passport + InputIdentityDocument+ { -- | Document number; 1-24 characters + number :: T,+ -- | Document expiry date, if available + expiryDate :: Date,+ -- | Front side of the document+ frontSide :: InputFile,+ -- | Reverse side of the document; only for driver license and identity card + reverseSide :: InputFile,+ -- | Selfie with the document, if available + selfie :: InputFile,+ -- | List of files containing a certified English translation of the document+ translation :: [InputFile]+ }+ deriving (Show, Eq, Generic)+data PersonalDocument+ = -- | A personal document, containing some information about a user + PersonalDocument+ { -- | List of files containing the pages of the document + files :: [DatedFile],+ -- | List of files containing a certified English translation of the document+ translation :: [DatedFile]+ }+ deriving (Show, Eq, Generic)+data InputPersonalDocument+ = -- | A personal document to be saved to Telegram Passport + InputPersonalDocument+ { -- | List of files containing the pages of the document + files :: [InputFile],+ -- | List of files containing a certified English translation of the document+ translation :: [InputFile]+ }+ deriving (Show, Eq, Generic)+-- | Contains information about a Telegram Passport element+data PassportElement+ = -- | A Telegram Passport element containing the user's personal details + PassportElementPersonalDetails+ { -- | Personal details of the user+ personalDetails :: PersonalDetails+ }+ | -- | A Telegram Passport element containing the user's passport + PassportElementPassport+ { -- | Passport+ passport :: IdentityDocument+ }+ | -- | A Telegram Passport element containing the user's driver license + PassportElementDriverLicense+ { -- | Driver license+ driverLicense :: IdentityDocument+ }+ | -- | A Telegram Passport element containing the user's identity card + PassportElementIdentityCard+ { -- | Identity card+ identityCard :: IdentityDocument+ }+ | -- | A Telegram Passport element containing the user's internal passport + PassportElementInternalPassport+ { -- | Internal passport+ internalPassport :: IdentityDocument+ }+ | -- | A Telegram Passport element containing the user's address + PassportElementAddress+ { -- | Address+ address :: Address+ }+ | -- | A Telegram Passport element containing the user's utility bill + PassportElementUtilityBill+ { -- | Utility bill+ utilityBill :: PersonalDocument+ }+ | -- | A Telegram Passport element containing the user's bank statement + PassportElementBankStatement+ { -- | Bank statement+ bankStatement :: PersonalDocument+ }+ | -- | A Telegram Passport element containing the user's rental agreement + PassportElementRentalAgreement+ { -- | Rental agreement+ rentalAgreement :: PersonalDocument+ }+ | -- | A Telegram Passport element containing the user's passport registration pages + PassportElementPassportRegistration+ { -- | Passport registration pages+ passportRegistration :: PersonalDocument+ }+ | -- | A Telegram Passport element containing the user's temporary registration + PassportElementTemporaryRegistration+ { -- | Temporary registration+ temporaryRegistration :: PersonalDocument+ }+ | -- | A Telegram Passport element containing the user's phone number + PassportElementPhoneNumber+ { -- | Phone number+ phoneNumber :: T+ }+ | -- | A Telegram Passport element containing the user's email address + PassportElementEmailAddress+ { -- | Email address+ emailAddress :: T+ }+ deriving (Show, Eq, Generic)+-- | Contains information about a Telegram Passport element to be saved+data InputPassportElement+ = -- | A Telegram Passport element to be saved containing the user's personal details + InputPassportElementPersonalDetails+ { -- | Personal details of the user+ personalDetails :: PersonalDetails+ }+ | -- | A Telegram Passport element to be saved containing the user's passport + InputPassportElementPassport+ { -- | The passport to be saved+ passport :: InputIdentityDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's driver license + InputPassportElementDriverLicense+ { -- | The driver license to be saved+ driverLicense :: InputIdentityDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's identity card + InputPassportElementIdentityCard+ { -- | The identity card to be saved+ identityCard :: InputIdentityDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's internal passport + InputPassportElementInternalPassport+ { -- | The internal passport to be saved+ internalPassport :: InputIdentityDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's address + InputPassportElementAddress+ { -- | The address to be saved+ address :: Address+ }+ | -- | A Telegram Passport element to be saved containing the user's utility bill + InputPassportElementUtilityBill+ { -- | The utility bill to be saved+ utilityBill :: InputPersonalDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's bank statement + InputPassportElementBankStatement+ { -- | The bank statement to be saved+ bankStatement :: InputPersonalDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's rental agreement + InputPassportElementRentalAgreement+ { -- | The rental agreement to be saved+ rentalAgreement :: InputPersonalDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's passport registration + InputPassportElementPassportRegistration+ { -- | The passport registration page to be saved+ passportRegistration :: InputPersonalDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's temporary registration + InputPassportElementTemporaryRegistration+ { -- | The temporary registration document to be saved+ temporaryRegistration :: InputPersonalDocument+ }+ | -- | A Telegram Passport element to be saved containing the user's phone number + InputPassportElementPhoneNumber+ { -- | The phone number to be saved+ phoneNumber :: T+ }+ | -- | A Telegram Passport element to be saved containing the user's email address + InputPassportElementEmailAddress+ { -- | The email address to be saved+ emailAddress :: T+ }+ deriving (Show, Eq, Generic)+data PassportElements+ = -- | Contains information about saved Telegram Passport elements + PassportElements+ { -- | Telegram Passport elements+ elements :: [PassportElement]+ }+ deriving (Show, Eq, Generic)+-- | Contains the description of an error in a Telegram Passport element+data PassportElementErrorSource+ = -- | The element contains an error in an unspecified place. The error will be considered resolved when new data is added+ PassportElementErrorSourceUnspecified+ { + }+ | -- | One of the data fields contains an error. The error will be considered resolved when the value of the field changes + PassportElementErrorSourceDataField+ { -- | Field name+ fieldName :: T+ }+ | -- | The front side of the document contains an error. The error will be considered resolved when the file with the front side changes+ PassportElementErrorSourceFrontSide+ { + }+ | -- | The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes+ PassportElementErrorSourceReverseSide+ { + }+ | -- | The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes+ PassportElementErrorSourceSelfie+ { + }+ | -- | One of files with the translation of the document contains an error. The error will be considered resolved when the file changes + PassportElementErrorSourceTranslationFile+ { -- | Index of a file with the error+ fileIndex :: I32+ }+ | -- | The translation of the document contains an error. The error will be considered resolved when the list of translation files changes+ PassportElementErrorSourceTranslationFiles+ { + }+ | -- | The file contains an error. The error will be considered resolved when the file changes + PassportElementErrorSourceFile+ { -- | Index of a file with the error+ fileIndex :: I32+ }+ | -- | The list of attached files contains an error. The error will be considered resolved when the list of files changes+ PassportElementErrorSourceFiles+ { + }+ deriving (Show, Eq, Generic)+data PassportElementError+ = -- | Contains the description of an error in a Telegram Passport element + PassportElementError+ { -- | Type of the Telegram Passport element which has the error + type_ :: PassportElementType,+ -- | Error message + message :: T,+ -- | Error source+ source :: PassportElementErrorSource+ }+ deriving (Show, Eq, Generic)+data PassportSuitableElement+ = -- | Contains information about a Telegram Passport element that was requested by a service + PassportSuitableElement+ { -- | Type of the element + type_ :: PassportElementType,+ -- | True, if a selfie is required with the identity document+ isSelfieRequired :: Bool,+ -- | True, if a certified English translation is required with the document + isTranslationRequired :: Bool,+ -- | True, if personal details must include the user's name in the language of their country of residence+ isNativeNameRequired :: Bool+ }+ deriving (Show, Eq, Generic)+data PassportRequiredElement+ = -- | Contains a description of the required Telegram Passport element that was requested by a service + PassportRequiredElement+ { -- | List of Telegram Passport elements any of which is enough to provide+ suitableElements :: [PassportSuitableElement]+ }+ deriving (Show, Eq, Generic)+data PassportAuthorizationForm+ = -- | Contains information about a Telegram Passport authorization form that was requested + PassportAuthorizationForm+ { -- | Unique identifier of the authorization form+ id :: I32,+ -- | Information about the Telegram Passport elements that need to be provided to complete the form+ requiredElements :: [PassportRequiredElement],+ -- | URL for the privacy policy of the service; may be empty+ privacyPolicyUrl :: T+ }+ deriving (Show, Eq, Generic)+data PassportElementsWithErrors+ = -- | Contains information about a Telegram Passport elements and corresponding errors + PassportElementsWithErrors+ { -- | Telegram Passport elements + elements :: [PassportElement],+ -- | Errors in the elements that are already available+ errors :: [PassportElementError]+ }+ deriving (Show, Eq, Generic)+data EncryptedCredentials+ = -- | Contains encrypted Telegram Passport data credentials + EncryptedCredentials+ { -- | The encrypted credentials + data_ :: ByteString64,+ -- | The decrypted data hash + hash :: ByteString64,+ -- | Secret for data decryption, encrypted with the service's public key+ secret :: ByteString64+ }+ deriving (Show, Eq, Generic)+data EncryptedPassportElement+ = -- | Contains information about an encrypted Telegram Passport element; for bots only + EncryptedPassportElement+ { -- | Type of Telegram Passport element + type_ :: PassportElementType,+ -- | Encrypted JSON-encoded data about the user + data_ :: ByteString64,+ -- | The front side of an identity document + frontSide :: DatedFile,+ -- | The reverse side of an identity document; may be null + reverseSide :: (Maybe) (DatedFile),+ -- | Selfie with the document; may be null + selfie :: (Maybe) (DatedFile),+ -- | List of files containing a certified English translation of the document + translation :: [DatedFile],+ -- | List of attached files + files :: [DatedFile],+ -- | Unencrypted data, phone number or email address + value :: T,+ -- | Hash of the entire element+ hash :: T+ }+ deriving (Show, Eq, Generic)+-- | Contains the description of an error in a Telegram Passport element; for bots only+data InputPassportElementErrorSource+ = -- | The element contains an error in an unspecified place. The error will be considered resolved when new data is added + InputPassportElementErrorSourceUnspecified+ { -- | Current hash of the entire element+ elementHash :: ByteString64+ }+ | -- | A data field contains an error. The error is considered resolved when the field's value changes + InputPassportElementErrorSourceDataField+ { -- | Field name + fieldName :: T,+ -- | Current data hash+ dataHash :: ByteString64+ }+ | -- | The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes + InputPassportElementErrorSourceFrontSide+ { -- | Current hash of the file containing the front side+ fileHash :: ByteString64+ }+ | -- | The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes + InputPassportElementErrorSourceReverseSide+ { -- | Current hash of the file containing the reverse side+ fileHash :: ByteString64+ }+ | -- | The selfie contains an error. The error is considered resolved when the file with the selfie changes + InputPassportElementErrorSourceSelfie+ { -- | Current hash of the file containing the selfie+ fileHash :: ByteString64+ }+ | -- | One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes + InputPassportElementErrorSourceTranslationFile+ { -- | Current hash of the file containing the translation+ fileHash :: ByteString64+ }+ | -- | The translation of the document contains an error. The error is considered resolved when the list of files changes + InputPassportElementErrorSourceTranslationFiles+ { -- | Current hashes of all files with the translation+ fileHashes :: [ByteString64]+ }+ | -- | The file contains an error. The error is considered resolved when the file changes + InputPassportElementErrorSourceFile+ { -- | Current hash of the file which has the error+ fileHash :: ByteString64+ }+ | -- | The list of attached files contains an error. The error is considered resolved when the file list changes + InputPassportElementErrorSourceFiles+ { -- | Current hashes of all attached files+ fileHashes :: [ByteString64]+ }+ deriving (Show, Eq, Generic)+data InputPassportElementError+ = -- | Contains the description of an error in a Telegram Passport element; for bots only + InputPassportElementError+ { -- | Type of Telegram Passport element that has the error + type_ :: PassportElementType,+ -- | Error message + message :: T,+ -- | Error source+ source :: InputPassportElementErrorSource+ }+ deriving (Show, Eq, Generic)+-- | Contains the content of a message+data MessageContent+ = -- | A text message + MessageText+ { -- | Text of the message + text_2 :: FormattedText,+ -- | A preview of the web page that's mentioned in the text; may be null+ webPage :: (Maybe) (WebPage)+ }+ | -- | An animation message (GIF-style). + MessageAnimation+ { -- | The animation description + animation :: Animation,+ -- | Animation caption + caption :: FormattedText,+ -- | True, if the animation thumbnail must be blurred and the animation must be shown only while tapped+ isSecret :: Bool+ }+ | -- | An audio message + MessageAudio+ { -- | The audio description + audio :: Audio,+ -- | Audio caption+ caption :: FormattedText+ }+ | -- | A document message (general file) + MessageDocument+ { -- | The document description + document :: Document,+ -- | Document caption+ caption :: FormattedText+ }+ | -- | A photo message + MessagePhoto+ { -- | The photo description + photo :: Photo,+ -- | Photo caption + caption :: FormattedText,+ -- | True, if the photo must be blurred and must be shown only while tapped+ isSecret :: Bool+ }+ | -- | An expired photo message (self-destructed after TTL has elapsed)+ MessageExpiredPhoto+ { + }+ | -- | A sticker message + MessageSticker+ { -- | The sticker description+ sticker :: Sticker+ }+ | -- | A video message + MessageVideo+ { -- | The video description + video :: Video,+ -- | Video caption + caption :: FormattedText,+ -- | True, if the video thumbnail must be blurred and the video must be shown only while tapped+ isSecret :: Bool+ }+ | -- | An expired video message (self-destructed after TTL has elapsed)+ MessageExpiredVideo+ { + }+ | -- | A video note message + MessageVideoNote+ { -- | The video note description + videoNote :: VideoNote,+ -- | True, if at least one of the recipients has viewed the video note + isViewed :: Bool,+ -- | True, if the video note thumbnail must be blurred and the video note must be shown only while tapped+ isSecret :: Bool+ }+ | -- | A voice note message + MessageVoiceNote+ { -- | The voice note description + voiceNote :: VoiceNote,+ -- | Voice note caption + caption :: FormattedText,+ -- | True, if at least one of the recipients has listened to the voice note+ isListened :: Bool+ }+ | -- | A message with a location + MessageLocation+ { -- | The location description + location :: Location,+ -- | Time relative to the message sent date until which the location can be updated, in seconds+ livePeriod :: I32,+ -- | Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes+ expiresIn :: I32+ }+ | -- | A message with information about a venue + MessageVenue+ { -- | The venue description+ venue :: Venue+ }+ | -- | A message with a user contact + MessageContact+ { -- | The contact description+ contact :: Contact+ }+ | -- | A dice message. The dice value is randomly generated by the server+ MessageDice+ { -- | The animated sticker with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known+ initialStateSticker :: (Maybe) (Sticker),+ -- | The animated sticker with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known+ finalStateSticker :: (Maybe) (Sticker),+ -- | Emoji on which the dice throw animation is based+ emoji :: T,+ -- | The dice value. If the value is 0, the dice don't have final state yet+ value :: I32,+ -- | Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded+ successAnimationFrameNumber :: I32+ }+ | -- | A message with a game + MessageGame+ { -- | The game description+ game :: Game+ }+ | -- | A message with a poll + MessagePoll+ { -- | The poll description+ poll :: Poll+ }+ | -- | A message with an invoice from a bot + MessageInvoice+ { -- | Product title + title :: T,+ -- | A message with an invoice from a bot + description :: T,+ -- | Product photo; may be null + photo_2 :: (Maybe) (Photo),+ -- | Currency for the product price + currency :: T,+ -- | Product total price in the minimal quantity of the currency+ totalAmount :: I53,+ -- | Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} + startParameter :: T,+ -- | True, if the invoice is a test invoice+ isTest :: Bool,+ -- | True, if the shipping address should be specified + needShippingAddress :: Bool,+ -- | The identifier of the message with the receipt, after the product has been purchased+ receiptMessageId :: I53+ }+ | -- | A message with information about an ended call + MessageCall+ { -- | Reason why the call was discarded + discardReason :: CallDiscardReason,+ -- | Call duration, in seconds+ duration :: I32+ }+ | -- | A newly created basic group + MessageBasicGroupChatCreate+ { -- | Title of the basic group + title :: T,+ -- | User identifiers of members in the basic group+ memberUserIds :: [I32]+ }+ | -- | A newly created supergroup or channel + MessageSupergroupChatCreate+ { -- | Title of the supergroup or channel+ title :: T+ }+ | -- | An updated chat title + MessageChatChangeTitle+ { -- | New chat title+ title :: T+ }+ | -- | An updated chat photo + MessageChatChangePhoto+ { -- | New chat photo+ photo :: Photo+ }+ | -- | A deleted chat photo+ MessageChatDeletePhoto+ { + }+ | -- | New chat members were added + MessageChatAddMembers+ { -- | User identifiers of the new members+ memberUserIds :: [I32]+ }+ | -- | A new member joined the chat by invite link+ MessageChatJoinByLink+ { + }+ | -- | A chat member was deleted + MessageChatDeleteMember+ { -- | User identifier of the deleted chat member+ userId :: I32+ }+ | -- | A basic group was upgraded to a supergroup and was deactivated as the result + MessageChatUpgradeTo+ { -- | Identifier of the supergroup to which the basic group was upgraded+ supergroupId :: I32+ }+ | -- | A supergroup has been created from a basic group + MessageChatUpgradeFrom+ { -- | Title of the newly created supergroup + title :: T,+ -- | The identifier of the original basic group+ basicGroupId :: I32+ }+ | -- | A message has been pinned + MessagePinMessage+ { -- | Identifier of the pinned message, can be an identifier of a deleted message or 0+ messageId :: I53+ }+ | -- | A screenshot of a message in the chat has been taken+ MessageScreenshotTaken+ { + }+ | -- | The TTL (Time To Live) setting messages in a secret chat has been changed + MessageChatSetTtl+ { -- | New TTL+ ttl :: I32+ }+ | -- | A non-standard action has happened in the chat + MessageCustomServiceAction+ { -- | Message text to be shown in the chat+ text :: T+ }+ | -- | A new high score was achieved in a game + MessageGameScore+ { -- | Identifier of the message with the game, can be an identifier of a deleted message + gameMessageId :: I53,+ -- | Identifier of the game; may be different from the games presented in the message with the game + gameId :: I64,+ -- | New score+ score :: I32+ }+ | -- | A payment has been completed + MessagePaymentSuccessful+ { -- | Identifier of the message with the corresponding invoice; can be an identifier of a deleted message + invoiceMessageId :: I53,+ -- | Currency for the price of the product + currency :: T,+ -- | Total price for the product, in the minimal quantity of the currency+ totalAmount :: I53+ }+ | -- | A payment has been completed; for bots only + MessagePaymentSuccessfulBot+ { -- | Identifier of the message with the corresponding invoice; can be an identifier of a deleted message + invoiceMessageId :: I53,+ -- | Currency for price of the product+ currency :: T,+ -- | Total price for the product, in the minimal quantity of the currency + totalAmount :: I53,+ -- | Invoice payload + invoicePayload :: ByteString64,+ -- | Identifier of the shipping option chosen by the user; may be empty if not applicable + shippingOptionId :: T,+ -- | Information about the order; may be null+ orderInfo :: (Maybe) (OrderInfo),+ -- | Telegram payment identifier + telegramPaymentChargeId :: T,+ -- | Provider payment identifier+ providerPaymentChargeId :: T+ }+ | -- | A contact has registered with Telegram+ MessageContactRegistered+ { + }+ | -- | The current user has connected a website by logging in using Telegram Login Widget on it + MessageWebsiteConnected+ { -- | Domain name of the connected website+ domainName :: T+ }+ | -- | Telegram Passport data has been sent + MessagePassportDataSent+ { -- | List of Telegram Passport element types sent+ types :: [PassportElementType]+ }+ | -- | Telegram Passport data has been received; for bots only + MessagePassportDataReceived+ { -- | List of received Telegram Passport elements + elements :: [EncryptedPassportElement],+ -- | Encrypted data credentials+ credentials :: EncryptedCredentials+ }+ | -- | Message content that is not supported by the client+ MessageUnsupported+ { + }+ deriving (Show, Eq, Generic)+-- | Represents a part of the text which must be formatted differently+data TextEntityType+ = -- | A mention of a user by their username+ TextEntityTypeMention+ { + }+ | -- | A hashtag text, beginning with "#"+ TextEntityTypeHashtag+ { + }+ | -- | A cashtag text, beginning with "$" and consisting of capital english letters (i.e. "$USD")+ TextEntityTypeCashtag+ { + }+ | -- | A bot command, beginning with "/". This shouldn't be highlighted if there are no bots in the chat+ TextEntityTypeBotCommand+ { + }+ | -- | An HTTP URL+ TextEntityTypeUrl+ { + }+ | -- | An email address+ TextEntityTypeEmailAddress+ { + }+ | -- | A phone number+ TextEntityTypePhoneNumber+ { + }+ | -- | A bank card number. The getBankCardInfo method can be used to get information about the bank card+ TextEntityTypeBankCardNumber+ { + }+ | -- | A bold text+ TextEntityTypeBold+ { + }+ | -- | An italic text+ TextEntityTypeItalic+ { + }+ | -- | An underlined text+ TextEntityTypeUnderline+ { + }+ | -- | A strikethrough text+ TextEntityTypeStrikethrough+ { + }+ | -- | Text that must be formatted as if inside a code HTML tag+ TextEntityTypeCode+ { + }+ | -- | Text that must be formatted as if inside a pre HTML tag+ TextEntityTypePre+ { + }+ | -- | Text that must be formatted as if inside pre, and code HTML tags + TextEntityTypePreCode+ { -- | Programming language of the code; as defined by the sender+ language :: T+ }+ | -- | A text description shown instead of a raw URL + TextEntityTypeTextUrl+ { -- | HTTP or tg:// URL to be opened when the link is clicked+ url :: T+ }+ | -- | A text shows instead of a raw mention of the user (e.g., when the user has no username) + TextEntityTypeMentionName+ { -- | Identifier of the mentioned user+ userId :: I32+ }+ deriving (Show, Eq, Generic)+data InputThumbnail+ = -- | A thumbnail to be sent along with a file; should be in JPEG or WEBP format for stickers, and less than 200 KB in size + InputThumbnail+ { -- | Thumbnail file to send. Sending thumbnails by file_id is currently not supported+ thumbnail :: InputFile,+ -- | Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown + width :: I32,+ -- | Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown+ height :: I32+ }+ deriving (Show, Eq, Generic)+-- | Contains information about the time when a scheduled message will be sent+data MessageSchedulingState+ = -- | The message will be sent at the specified date + MessageSchedulingStateSendAtDate+ { -- | Date the message will be sent. The date must be within 367 days in the future+ sendDate :: I32+ }+ | -- | 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+ { + }+ deriving (Show, Eq, Generic)+data SendMessageOptions+ = -- | Options to be used when a message is send+ SendMessageOptions+ { -- | Pass true to disable notification for the message. Must be false if the message is sent to a secret chat+ disableNotification :: Bool,+ -- | Pass true if the message is sent from the background+ fromBackground :: Bool,+ -- | Message scheduling state. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled+ schedulingState :: MessageSchedulingState+ }+ deriving (Show, Eq, Generic)+-- | The content of a message to send+data InputMessageContent+ = -- | A text message + InputMessageText+ { -- | Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually+ text :: FormattedText,+ -- | True, if rich web page previews for URLs in the message text should be disabled + disableWebPagePreview :: Bool,+ -- | True, if a chat message draft should be deleted+ clearDraft :: Bool+ }+ | -- | An animation message (GIF-style). + InputMessageAnimation+ { -- | Animation file to be sent + animation :: InputFile,+ -- | Animation thumbnail, if available + thumbnail :: InputThumbnail,+ -- | File identifiers of the stickers added to the animation, if applicable+ addedStickerFileIds :: [I32],+ -- | Duration of the animation, in seconds + duration :: I32,+ -- | Width of the animation; may be replaced by the server + width :: I32,+ -- | Height of the animation; may be replaced by the server + height :: I32,+ -- | Animation caption; 0-GetOption("message_caption_length_max") characters+ caption :: FormattedText+ }+ | -- | An audio message + InputMessageAudio+ { -- | Audio file to be sent + audio :: InputFile,+ -- | Thumbnail of the cover for the album, if available + albumCoverThumbnail :: InputThumbnail,+ -- | Duration of the audio, in seconds; may be replaced by the server + duration :: I32,+ -- | Title of the audio; 0-64 characters; may be replaced by the server+ title :: T,+ -- | Performer of the audio; 0-64 characters, may be replaced by the server + performer :: T,+ -- | Audio caption; 0-GetOption("message_caption_length_max") characters+ caption :: FormattedText+ }+ | -- | A document message (general file) + InputMessageDocument+ { -- | Document to be sent + document :: InputFile,+ -- | Document thumbnail, if available + thumbnail :: InputThumbnail,+ -- | Document caption; 0-GetOption("message_caption_length_max") characters+ caption :: FormattedText+ }+ | -- | A photo message + InputMessagePhoto+ { -- | Photo to send + photo :: InputFile,+ -- | Photo thumbnail to be sent, this is sent to the other party in secret chats only + thumbnail :: InputThumbnail,+ -- | File identifiers of the stickers added to the photo, if applicable + addedStickerFileIds :: [I32],+ -- | Photo width + width :: I32,+ -- | Photo height + height :: I32,+ -- | Photo caption; 0-GetOption("message_caption_length_max") characters+ caption :: FormattedText,+ -- | Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats+ ttl :: I32+ }+ | -- | A sticker message + InputMessageSticker+ { -- | Sticker to be sent + sticker :: InputFile,+ -- | Sticker thumbnail, if available + thumbnail :: InputThumbnail,+ -- | Sticker width + width :: I32,+ -- | Sticker height+ height :: I32+ }+ | -- | A video message + InputMessageVideo+ { -- | Video to be sent + video :: InputFile,+ -- | Video thumbnail, if available + thumbnail :: InputThumbnail,+ -- | File identifiers of the stickers added to the video, if applicable+ addedStickerFileIds :: [I32],+ -- | Duration of the video, in seconds + duration :: I32,+ -- | Video width + width :: I32,+ -- | Video height + height :: I32,+ -- | True, if the video should be tried to be streamed+ supportsStreaming :: Bool,+ -- | Video caption; 0-GetOption("message_caption_length_max") characters + caption :: FormattedText,+ -- | Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats+ ttl :: I32+ }+ | -- | A video note message + InputMessageVideoNote+ { -- | Video note to be sent + videoNote :: InputFile,+ -- | Video thumbnail, if available + thumbnail :: InputThumbnail,+ -- | Duration of the video, in seconds + duration :: I32,+ -- | Video width and height; must be positive and not greater than 640+ length :: I32+ }+ | -- | A voice note message + InputMessageVoiceNote+ { -- | Voice note to be sent + voiceNote :: InputFile,+ -- | Duration of the voice note, in seconds + duration :: I32,+ -- | Waveform representation of the voice note, in 5-bit format + waveform :: ByteString64,+ -- | Voice note caption; 0-GetOption("message_caption_length_max") characters+ caption :: FormattedText+ }+ | -- | A message with a location + InputMessageLocation+ { -- | Location to be sent + location :: Location,+ -- | Period for which the location can be updated, in seconds; should be between 60 and 86400 for a live location and 0 otherwise+ livePeriod :: I32+ }+ | -- | A message with information about a venue + InputMessageVenue+ { -- | Venue to send+ venue :: Venue+ }+ | -- | A message containing a user contact + InputMessageContact+ { -- | Contact to send+ contact :: Contact+ }+ | -- | A dice message + InputMessageDice+ { -- | Emoji on which the dice throw animation is based + emoji :: T,+ -- | True, if a chat message draft should be deleted+ clearDraft :: Bool+ }+ | -- | A message with a game; not supported for channels or secret chats + InputMessageGame+ { -- | User identifier of the bot that owns the game + botUserId :: I32,+ -- | Short name of the game+ gameShortName :: T+ }+ | -- | A message with an invoice; can be used only by bots and only in private chats + InputMessageInvoice+ { -- | Invoice + invoice :: Invoice,+ -- | Product title; 1-32 characters + title :: T,+ -- | A message with an invoice; can be used only by bots and only in private chats + description :: T,+ -- | Product photo URL; optional + photoUrl :: T,+ -- | Product photo size + photoSize :: I32,+ -- | Product photo width + photoWidth :: I32,+ -- | Product photo height+ photoHeight :: I32,+ -- | The invoice payload + payload :: ByteString64,+ -- | Payment provider token + providerToken :: T,+ -- | JSON-encoded data about the invoice, which will be shared with the payment provider + providerData :: T,+ -- | Unique invoice bot start_parameter for the generation of this invoice+ startParameter :: T+ }+ | -- | A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot + InputMessagePoll+ { -- | Poll question, 1-255 characters + question :: T,+ -- | List of poll answer options, 2-10 strings 1-100 characters each+ options :: [T],+ -- | True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels + isAnonymous :: Bool,+ -- | Type of the poll+ type_ :: PollType,+ -- | Amount of time the poll will be active after creation, in seconds; for bots only+ openPeriod :: I32,+ -- | Point in time (Unix timestamp) when the poll will be automatically closed; for bots only+ closeDate :: I32,+ -- | True, if the poll needs to be sent already closed; for bots only+ isClosed :: Bool+ }+ | -- | A forwarded message + InputMessageForwarded+ { -- | Identifier for the chat this forwarded message came from + fromChatId :: I53,+ -- | Identifier of the message to forward+ messageId :: I53,+ -- | True, if a game message should be shared within a launched game; applies only to game messages+ inGameShare :: Bool,+ -- | True, if content of the message needs to be copied without a link to the original message. Always true if the message is forwarded to a secret chat+ sendCopy :: Bool,+ -- | True, if media caption of the message copy needs to be removed. Ignored if send_copy is false+ removeCaption :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Represents a filter for message search results+data SearchMessagesFilter+ = -- | Returns all found messages, no filter is applied+ SearchMessagesFilterEmpty+ { + }+ | -- | Returns only animation messages+ SearchMessagesFilterAnimation+ { + }+ | -- | Returns only audio messages+ SearchMessagesFilterAudio+ { + }+ | -- | Returns only document messages+ SearchMessagesFilterDocument+ { + }+ | -- | Returns only photo messages+ SearchMessagesFilterPhoto+ { + }+ | -- | Returns only video messages+ SearchMessagesFilterVideo+ { + }+ | -- | Returns only voice note messages+ SearchMessagesFilterVoiceNote+ { + }+ | -- | Returns only photo and video messages+ SearchMessagesFilterPhotoAndVideo+ { + }+ | -- | Returns only messages containing URLs+ SearchMessagesFilterUrl+ { + }+ | -- | Returns only messages containing chat photos+ SearchMessagesFilterChatPhoto+ { + }+ | -- | Returns only call messages+ SearchMessagesFilterCall+ { + }+ | -- | Returns only incoming call messages with missed/declined discard reasons+ SearchMessagesFilterMissedCall+ { + }+ | -- | Returns only video note messages+ SearchMessagesFilterVideoNote+ { + }+ | -- | Returns only voice and video note messages+ SearchMessagesFilterVoiceAndVideoNote+ { + }+ | -- | Returns only messages with mentions of the current user, or messages that are replies to their messages+ SearchMessagesFilterMention+ { + }+ | -- | Returns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query or by the sending user+ SearchMessagesFilterUnreadMention+ { + }+ | -- | Returns only failed to send messages. This filter can be used only if the message database is used+ SearchMessagesFilterFailedToSend+ { + }+ deriving (Show, Eq, Generic)+-- | Describes the different types of activity in a chat+data ChatAction+ = -- | The user is typing a message+ ChatActionTyping+ { + }+ | -- | The user is recording a video+ ChatActionRecordingVideo+ { + }+ | -- | The user is uploading a video + ChatActionUploadingVideo+ { -- | Upload progress, as a percentage+ progress :: I32+ }+ | -- | The user is recording a voice note+ ChatActionRecordingVoiceNote+ { + }+ | -- | The user is uploading a voice note + ChatActionUploadingVoiceNote+ { -- | Upload progress, as a percentage+ progress :: I32+ }+ | -- | The user is uploading a photo + ChatActionUploadingPhoto+ { -- | Upload progress, as a percentage+ progress :: I32+ }+ | -- | The user is uploading a document + ChatActionUploadingDocument+ { -- | Upload progress, as a percentage+ progress :: I32+ }+ | -- | The user is picking a location or venue to send+ ChatActionChoosingLocation+ { + }+ | -- | The user is picking a contact to send+ ChatActionChoosingContact+ { + }+ | -- | The user has started to play a game+ ChatActionStartPlayingGame+ { + }+ | -- | The user is recording a video note+ ChatActionRecordingVideoNote+ { + }+ | -- | The user is uploading a video note + ChatActionUploadingVideoNote+ { -- | Upload progress, as a percentage+ progress :: I32+ }+ | -- | The user has cancelled the previous action+ ChatActionCancel+ { + }+ deriving (Show, Eq, Generic)+-- | Describes the last time the user was online+data UserStatus+ = -- | The user status was never changed+ UserStatusEmpty+ { + }+ | -- | The user is online + UserStatusOnline+ { -- | Point in time (Unix timestamp) when the user's online status will expire+ expires :: I32+ }+ | -- | The user is offline + UserStatusOffline+ { -- | Point in time (Unix timestamp) when the user was last online+ wasOnline :: I32+ }+ | -- | The user was online recently+ UserStatusRecently+ { + }+ | -- | The user is offline, but was online last week+ UserStatusLastWeek+ { + }+ | -- | The user is offline, but was online last month+ UserStatusLastMonth+ { + }+ deriving (Show, Eq, Generic)+data Stickers+ = -- | Represents a list of stickers + Stickers+ { -- | List of stickers+ stickers :: [Sticker]+ }+ deriving (Show, Eq, Generic)+data Emojis+ = -- | Represents a list of emoji + Emojis+ { -- | List of emojis+ emojis :: [T]+ }+ deriving (Show, Eq, Generic)+data StickerSet+ = -- | Represents a sticker set+ StickerSet+ { -- | Identifier of the sticker set + id :: I64,+ -- | Title of the sticker set + title :: T,+ -- | Name of the sticker set + name :: T,+ -- | Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed+ thumbnail :: (Maybe) (Thumbnail),+ -- | True, if the sticker set has been installed by the current user + isInstalled :: Bool,+ -- | True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously+ isArchived :: Bool,+ -- | True, if the sticker set is official + isOfficial :: Bool,+ -- | True, is the stickers in the set are animated + isAnimated :: Bool,+ -- | True, if the stickers in the set are masks + isMasks :: Bool,+ -- | True for already viewed trending sticker sets+ isViewed :: Bool,+ -- | List of stickers in this set + stickers :: [Sticker],+ -- | A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object+ emojis :: [Emojis]+ }+ deriving (Show, Eq, Generic)+data StickerSetInfo+ = -- | Represents short information about a sticker set+ StickerSetInfo+ { -- | Identifier of the sticker set + id :: I64,+ -- | Title of the sticker set + title :: T,+ -- | Name of the sticker set + name :: T,+ -- | Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null+ thumbnail :: (Maybe) (Thumbnail),+ -- | True, if the sticker set has been installed by current user + isInstalled :: Bool,+ -- | True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously+ isArchived :: Bool,+ -- | True, if the sticker set is official + isOfficial :: Bool,+ -- | True, is the stickers in the set are animated + isAnimated :: Bool,+ -- | True, if the stickers in the set are masks + isMasks :: Bool,+ -- | True for already viewed trending sticker sets+ isViewed :: Bool,+ -- | Total number of stickers in the set + size :: I32,+ -- | Contains up to the first 5 stickers from the set, depending on the context. If the client needs more stickers the full set should be requested+ covers :: [Sticker]+ }+ deriving (Show, Eq, Generic)+data StickerSets+ = -- | Represents a list of sticker sets + StickerSets+ { -- | Approximate total number of sticker sets found + totalCount :: I32,+ -- | List of sticker sets+ sets :: [StickerSetInfo]+ }+ deriving (Show, Eq, Generic)+-- | Describes the reason why a call was discarded+data CallDiscardReason+ = -- | The call wasn't discarded, or the reason is unknown+ CallDiscardReasonEmpty+ { + }+ | -- | The call was ended before the conversation started. It was cancelled by the caller or missed by the other party+ CallDiscardReasonMissed+ { + }+ | -- | The call was ended before the conversation started. It was declined by the other party+ CallDiscardReasonDeclined+ { + }+ | -- | The call was ended during the conversation because the users were disconnected+ CallDiscardReasonDisconnected+ { + }+ | -- | The call was ended because one of the parties hung up+ CallDiscardReasonHungUp+ { + }+ deriving (Show, Eq, Generic)+data CallProtocol+ = -- | Specifies the supported call protocols+ CallProtocol+ { -- | True, if UDP peer-to-peer connections are supported+ udpP2p :: Bool,+ -- | True, if connection through UDP reflectors is supported+ udpReflector :: Bool,+ -- | The minimum supported API layer; use 65+ minLayer :: I32,+ -- | The maximum supported API layer; use 65+ maxLayer :: I32,+ -- | List of supported libtgvoip versions+ libraryVersions :: [T]+ }+ deriving (Show, Eq, Generic)+data CallConnection+ = -- | Describes the address of UDP reflectors + CallConnection+ { -- | Reflector identifier + id :: I64,+ -- | IPv4 reflector address + ip :: T,+ -- | IPv6 reflector address + ipv6 :: T,+ -- | Reflector port number + port :: I32,+ -- | Connection peer tag+ peerTag :: ByteString64+ }+ deriving (Show, Eq, Generic)+data CallId+ = -- | Contains the call identifier + CallId+ { -- | Call identifier+ id :: I32+ }+ deriving (Show, Eq, Generic)+-- | Describes the current call state+data CallState+ = -- | The call is pending, waiting to be accepted by a user + CallStatePending+ { -- | True, if the call has already been created by the server + isCreated :: Bool,+ -- | True, if the call has already been received by the other party+ isReceived :: Bool+ }+ | -- | The call has been answered and encryption keys are being exchanged+ CallStateExchangingKeys+ { + }+ | -- | The call is ready to use + CallStateReady+ { -- | Call protocols supported by the peer + protocol :: CallProtocol,+ -- | Available UDP reflectors + connections :: [CallConnection],+ -- | A JSON-encoded call config + config :: T,+ -- | Call encryption key + encryptionKey :: ByteString64,+ -- | Encryption key emojis fingerprint + emojis :: [T],+ -- | True, if peer-to-peer connection is allowed by users privacy settings+ allowP2p :: Bool+ }+ | -- | The call is hanging up after discardCall has been called+ CallStateHangingUp+ { + }+ | -- | The call has ended successfully + CallStateDiscarded+ { -- | The reason, why the call has ended + reason :: CallDiscardReason,+ -- | True, if the call rating should be sent to the server + needRating :: Bool,+ -- | True, if the call debug information should be sent to the server+ needDebugInformation :: Bool+ }+ | -- | The call has ended with an error + CallStateError+ { -- | Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout+ error :: Error+ }+ deriving (Show, Eq, Generic)+-- | Describes the exact type of a problem with a call+data CallProblem+ = -- | The user heard their own voice+ CallProblemEcho+ { + }+ | -- | The user heard background noise+ CallProblemNoise+ { + }+ | -- | The other side kept disappearing+ CallProblemInterruptions+ { + }+ | -- | The speech was distorted+ CallProblemDistortedSpeech+ { + }+ | -- | The user couldn't hear the other side+ CallProblemSilentLocal+ { + }+ | -- | The other side couldn't hear the user+ CallProblemSilentRemote+ { + }+ | -- | The call ended unexpectedly+ CallProblemDropped+ { + }+ deriving (Show, Eq, Generic)+data Call+ = -- | Describes a call + Call+ { -- | Call identifier, not persistent + id :: I32,+ -- | Peer user identifier + userId :: I32,+ -- | True, if the call is outgoing + isOutgoing :: Bool,+ -- | Call state+ state :: CallState+ }+ deriving (Show, Eq, Generic)+data PhoneNumberAuthenticationSettings+ = -- | Contains settings for the authentication of the user's phone number+ PhoneNumberAuthenticationSettings+ { -- | Pass true if the authentication code may be sent via flash call to the specified phone number+ allowFlashCall :: Bool,+ -- | Pass true if the authenticated phone number is used on the current device+ isCurrentPhoneNumber :: Bool,+ -- | For official applications only. True, if the app can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details+ allowSmsRetrieverApi :: Bool+ }+ deriving (Show, Eq, Generic)+data Animations+ = -- | Represents a list of animations + Animations+ { -- | List of animations+ animations :: [Animation]+ }+ deriving (Show, Eq, Generic)+data ImportedContacts+ = -- | Represents the result of an ImportContacts request + ImportedContacts+ { -- | User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user+ userIds :: [I32],+ -- | The number of users that imported the corresponding contact; 0 for already registered users or if unavailable+ importerCount :: [I32]+ }+ deriving (Show, Eq, Generic)+data HttpUrl+ = -- | Contains an HTTP URL + HttpUrl+ { -- | The URL+ url :: T+ }+ deriving (Show, Eq, Generic)+-- | Represents a single result of an inline query; for bots only+data InputInlineQueryResult+ = -- | Represents a link to an animated GIF or an animated (i.e. without sound) H.264/MPEG-4 AVC video+ InputInlineQueryResultAnimation+ { -- | Unique identifier of the query result + id :: T,+ -- | Title of the query result+ title :: T,+ -- | URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists + thumbnailUrl :: T,+ -- | MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4"+ thumbnailMimeType :: T,+ -- | The URL of the video file (file size must not exceed 1MB) + videoUrl :: T,+ -- | MIME type of the video file. Must be one of "image/gif" and "video/mp4"+ videoMimeType :: T,+ -- | Duration of the video, in seconds + videoDuration :: I32,+ -- | Width of the video + videoWidth :: I32,+ -- | Height of the video+ videoHeight :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents a link to an article or web page + InputInlineQueryResultArticle+ { -- | Unique identifier of the query result + id :: T,+ -- | URL of the result, if it exists + url :: T,+ -- | True, if the URL must be not shown + hideUrl :: Bool,+ -- | Title of the result+ title :: T,+ -- | Represents a link to an article or web page + description :: T,+ -- | URL of the result thumbnail, if it exists + thumbnailUrl :: T,+ -- | Thumbnail width, if known + thumbnailWidth :: I32,+ -- | Thumbnail height, if known+ thumbnailHeight :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents a link to an MP3 audio file + InputInlineQueryResultAudio+ { -- | Unique identifier of the query result + id :: T,+ -- | Title of the audio file + title :: T,+ -- | Performer of the audio file+ performer :: T,+ -- | The URL of the audio file + audioUrl :: T,+ -- | Audio file duration, in seconds+ audioDuration :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents a user contact + InputInlineQueryResultContact+ { -- | Unique identifier of the query result + id :: T,+ -- | User contact + contact :: Contact,+ -- | URL of the result thumbnail, if it exists + thumbnailUrl :: T,+ -- | Thumbnail width, if known + thumbnailWidth :: I32,+ -- | Thumbnail height, if known+ thumbnailHeight :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents a link to a file + InputInlineQueryResultDocument+ { -- | Unique identifier of the query result + id :: T,+ -- | Title of the resulting file + title :: T,+ -- | Represents a link to a file + description :: T,+ -- | URL of the file + documentUrl :: T,+ -- | MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed+ mimeType :: T,+ -- | The URL of the file thumbnail, if it exists + thumbnailUrl :: T,+ -- | Width of the thumbnail + thumbnailWidth :: I32,+ -- | Height of the thumbnail+ thumbnailHeight :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents a game + InputInlineQueryResultGame+ { -- | Unique identifier of the query result + id :: T,+ -- | Short name of the game + gameShortName :: T,+ -- | Message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup+ }+ | -- | Represents a point on the map + InputInlineQueryResultLocation+ { -- | Unique identifier of the query result + id :: T,+ -- | Location result + location :: Location,+ -- | Amount of time relative to the message sent time until the location can be updated, in seconds + livePeriod :: I32,+ -- | Title of the result + title :: T,+ -- | URL of the result thumbnail, if it exists + thumbnailUrl :: T,+ -- | Thumbnail width, if known + thumbnailWidth :: I32,+ -- | Thumbnail height, if known+ thumbnailHeight :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents link to a JPEG image + InputInlineQueryResultPhoto+ { -- | Unique identifier of the query result + id :: T,+ -- | Title of the result, if known + title :: T,+ -- | Represents link to a JPEG image + description :: T,+ -- | URL of the photo thumbnail, if it exists+ thumbnailUrl :: T,+ -- | The URL of the JPEG photo (photo size must not exceed 5MB) + photoUrl :: T,+ -- | Width of the photo + photoWidth :: I32,+ -- | Height of the photo+ photoHeight :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents a link to a WEBP or TGS sticker + InputInlineQueryResultSticker+ { -- | Unique identifier of the query result + id :: T,+ -- | URL of the sticker thumbnail, if it exists+ thumbnailUrl :: T,+ -- | The URL of the WEBP or TGS sticker (sticker file size must not exceed 5MB) + stickerUrl :: T,+ -- | Width of the sticker + stickerWidth :: I32,+ -- | Height of the sticker+ stickerHeight :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents information about a venue + InputInlineQueryResultVenue+ { -- | Unique identifier of the query result + id :: T,+ -- | Venue result + venue :: Venue,+ -- | URL of the result thumbnail, if it exists + thumbnailUrl :: T,+ -- | Thumbnail width, if known + thumbnailWidth :: I32,+ -- | Thumbnail height, if known+ thumbnailHeight :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents a link to a page containing an embedded video player or a video file + InputInlineQueryResultVideo+ { -- | Unique identifier of the query result + id :: T,+ -- | Title of the result + title :: T,+ -- | Represents a link to a page containing an embedded video player or a video file + description :: T,+ -- | The URL of the video thumbnail (JPEG), if it exists + thumbnailUrl :: T,+ -- | URL of the embedded video player or video file + videoUrl :: T,+ -- | MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported+ mimeType :: T,+ -- | Width of the video + videoWidth :: I32,+ -- | Height of the video + videoHeight :: I32,+ -- | Video duration, in seconds+ videoDuration :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ | -- | Represents a link to an opus-encoded audio file within an OGG container, single channel audio + InputInlineQueryResultVoiceNote+ { -- | Unique identifier of the query result + id :: T,+ -- | Title of the voice note+ title :: T,+ -- | The URL of the voice note file + voiceNoteUrl :: T,+ -- | Duration of the voice note, in seconds+ voiceNoteDuration :: I32,+ -- | The message reply markup. Must be of type replyMarkupInlineKeyboard or null+ replyMarkup :: ReplyMarkup,+ -- | The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation, InputMessageVenue or InputMessageContact+ inputMessageContent :: InputMessageContent+ }+ deriving (Show, Eq, Generic)+-- | Represents a single result of an inline query+data InlineQueryResult+ = -- | Represents a link to an article or web page + InlineQueryResultArticle+ { -- | Unique identifier of the query result + id :: T,+ -- | URL of the result, if it exists + url :: T,+ -- | True, if the URL must be not shown + hideUrl :: Bool,+ -- | Title of the result+ title :: T,+ -- | Represents a link to an article or web page + description :: T,+ -- | Result thumbnail in JPEG format; may be null+ thumbnail :: (Maybe) (Thumbnail)+ }+ | -- | Represents a user contact + InlineQueryResultContact+ { -- | Unique identifier of the query result + id :: T,+ -- | A user contact + contact :: Contact,+ -- | Result thumbnail in JPEG format; may be null+ thumbnail :: (Maybe) (Thumbnail)+ }+ | -- | Represents a point on the map + InlineQueryResultLocation+ { -- | Unique identifier of the query result + id :: T,+ -- | Location result + location :: Location,+ -- | Title of the result + title :: T,+ -- | Result thumbnail in JPEG format; may be null+ thumbnail :: (Maybe) (Thumbnail)+ }+ | -- | Represents information about a venue + InlineQueryResultVenue+ { -- | Unique identifier of the query result + id :: T,+ -- | Venue result + venue :: Venue,+ -- | Result thumbnail in JPEG format; may be null+ thumbnail :: (Maybe) (Thumbnail)+ }+ | -- | Represents information about a game + InlineQueryResultGame+ { -- | Unique identifier of the query result + id :: T,+ -- | Game result+ game :: Game+ }+ | -- | Represents an animation file + InlineQueryResultAnimation+ { -- | Unique identifier of the query result + id :: T,+ -- | Animation file + animation :: Animation,+ -- | Animation title+ title :: T+ }+ | -- | Represents an audio file + InlineQueryResultAudio+ { -- | Unique identifier of the query result + id :: T,+ -- | Audio file+ audio :: Audio+ }+ | -- | Represents a document + InlineQueryResultDocument+ { -- | Unique identifier of the query result + id :: T,+ -- | Document + document :: Document,+ -- | Document title + title :: T,+ -- | Represents a document + description :: T+ }+ | -- | Represents a photo + InlineQueryResultPhoto+ { -- | Unique identifier of the query result + id :: T,+ -- | Photo + photo :: Photo,+ -- | Title of the result, if known + title :: T,+ -- | Represents a photo + description :: T+ }+ | -- | Represents a sticker + InlineQueryResultSticker+ { -- | Unique identifier of the query result + id :: T,+ -- | Sticker+ sticker :: Sticker+ }+ | -- | Represents a video + InlineQueryResultVideo+ { -- | Unique identifier of the query result + id :: T,+ -- | Video + video :: Video,+ -- | Title of the video + title :: T,+ -- | Represents a video + description :: T+ }+ | -- | Represents a voice note + InlineQueryResultVoiceNote+ { -- | Unique identifier of the query result + id :: T,+ -- | Voice note + voiceNote :: VoiceNote,+ -- | Title of the voice note+ title :: T+ }+ deriving (Show, Eq, Generic)+data InlineQueryResults+ = -- | Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query + InlineQueryResults+ { -- | Unique identifier of the inline query + inlineQueryId :: I64,+ -- | The offset for the next request. If empty, there are no more results + nextOffset :: T,+ -- | Results of the query+ results :: [InlineQueryResult],+ -- | If non-empty, this text should be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter + switchPmText :: T,+ -- | Parameter for the bot start message+ switchPmParameter :: T+ }+ deriving (Show, Eq, Generic)+-- | Represents a payload of a callback query+data CallbackQueryPayload+ = -- | The payload from a general callback button + CallbackQueryPayloadData+ { -- | Data that was attached to the callback button+ data_ :: ByteString64+ }+ | -- | The payload from a game callback button + CallbackQueryPayloadGame+ { -- | A short name of the game that was attached to the callback button+ gameShortName :: T+ }+ deriving (Show, Eq, Generic)+data CallbackQueryAnswer+ = -- | Contains a bot's answer to a callback query + CallbackQueryAnswer+ { -- | Text of the answer + text :: T,+ -- | True, if an alert should be shown to the user instead of a toast notification + showAlert :: Bool,+ -- | URL to be opened+ url :: T+ }+ deriving (Show, Eq, Generic)+data CustomRequestResult+ = -- | Contains the result of a custom request + CustomRequestResult+ { -- | A JSON-serialized result+ result :: T+ }+ deriving (Show, Eq, Generic)+data GameHighScore+ = -- | Contains one row of the game high score table + GameHighScore+ { -- | Position in the high score table + position :: I32,+ -- | User identifier + userId :: I32,+ -- | User score+ score :: I32+ }+ deriving (Show, Eq, Generic)+data GameHighScores+ = -- | Contains a list of game high scores + GameHighScores+ { -- | A list of game high scores+ scores :: [GameHighScore]+ }+ deriving (Show, Eq, Generic)+-- | Represents a chat event+data ChatEventAction+ = -- | A message was edited + ChatEventMessageEdited+ { -- | The original message before the edit + oldMessage :: Message,+ -- | The message after it was edited+ newMessage :: Message+ }+ | -- | A message was deleted + ChatEventMessageDeleted+ { -- | Deleted message+ message :: Message+ }+ | -- | A poll in a message was stopped + ChatEventPollStopped+ { -- | The message with the poll+ message :: Message+ }+ | -- | A message was pinned + ChatEventMessagePinned+ { -- | Pinned message+ message :: Message+ }+ | -- | A message was unpinned+ ChatEventMessageUnpinned+ { + }+ | -- | A new member joined the chat+ ChatEventMemberJoined+ { + }+ | -- | A member left the chat+ ChatEventMemberLeft+ { + }+ | -- | A new chat member was invited + ChatEventMemberInvited+ { -- | New member user identifier + userId :: I32,+ -- | New member status+ status :: ChatMemberStatus+ }+ | -- | A chat member has gained/lost administrator status, or the list of their administrator privileges has changed + ChatEventMemberPromoted+ { -- | Chat member user identifier + userId :: I32,+ -- | Previous status of the chat member + oldStatus :: ChatMemberStatus,+ -- | New status of the chat member+ newStatus :: ChatMemberStatus+ }+ | -- | A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed + ChatEventMemberRestricted+ { -- | Chat member user identifier + userId :: I32,+ -- | Previous status of the chat member + oldStatus :: ChatMemberStatus,+ -- | New status of the chat member+ newStatus :: ChatMemberStatus+ }+ | -- | The chat title was changed + ChatEventTitleChanged+ { -- | Previous chat title + oldTitle :: T,+ -- | New chat title+ newTitle :: T+ }+ | -- | The chat permissions was changed + ChatEventPermissionsChanged+ { -- | Previous chat permissions + oldPermissions :: ChatPermissions,+ -- | New chat permissions+ newPermissions :: ChatPermissions+ }+ | -- | The chat description was changed + ChatEventDescriptionChanged+ { -- | Previous chat description + oldDescription :: T,+ -- | New chat description+ newDescription :: T+ }+ | -- | The chat username was changed + ChatEventUsernameChanged+ { -- | Previous chat username + oldUsername :: T,+ -- | New chat username+ newUsername :: T+ }+ | -- | The chat photo was changed + ChatEventPhotoChanged+ { -- | Previous chat photo value; may be null + oldPhoto :: (Maybe) (Photo),+ -- | New chat photo value; may be null+ newPhoto :: (Maybe) (Photo)+ }+ | -- | The can_invite_users permission of a supergroup chat was toggled + ChatEventInvitesToggled+ { -- | New value of can_invite_users permission+ canInviteUsers :: Bool+ }+ | -- | The linked chat of a supergroup was changed + ChatEventLinkedChatChanged+ { -- | Previous supergroup linked chat identifier + oldLinkedChatId :: I53,+ -- | New supergroup linked chat identifier+ newLinkedChatId :: I53+ }+ | -- | The slow_mode_delay setting of a supergroup was changed + ChatEventSlowModeDelayChanged+ { -- | Previous value of slow_mode_delay + oldSlowModeDelay :: I32,+ -- | New value of slow_mode_delay+ newSlowModeDelay :: I32+ }+ | -- | The sign_messages setting of a channel was toggled + ChatEventSignMessagesToggled+ { -- | New value of sign_messages+ signMessages :: Bool+ }+ | -- | The supergroup sticker set was changed + ChatEventStickerSetChanged+ { -- | Previous identifier of the chat sticker set; 0 if none + oldStickerSetId :: I64,+ -- | New identifier of the chat sticker set; 0 if none+ newStickerSetId :: I64+ }+ | -- | The supergroup location was changed + ChatEventLocationChanged+ { -- | Previous location; may be null + oldLocation :: (Maybe) (ChatLocation),+ -- | New location; may be null+ newLocation :: (Maybe) (ChatLocation)+ }+ | -- | The is_all_history_available setting of a supergroup was toggled + ChatEventIsAllHistoryAvailableToggled+ { -- | New value of is_all_history_available+ isAllHistoryAvailable :: Bool+ }+ deriving (Show, Eq, Generic)+data ChatEvent+ = -- | Represents a chat event + ChatEvent+ { -- | Chat event identifier + id :: I64,+ -- | Point in time (Unix timestamp) when the event happened + date :: I32,+ -- | Identifier of the user who performed the action that triggered the event + userId :: I32,+ -- | Action performed by the user+ action :: ChatEventAction+ }+ deriving (Show, Eq, Generic)+data ChatEvents+ = -- | Contains a list of chat events + ChatEvents+ { -- | List of events+ events :: [ChatEvent]+ }+ deriving (Show, Eq, Generic)+data ChatEventLogFilters+ = -- | Represents a set of filters used to obtain a chat event log+ ChatEventLogFilters+ { -- | True, if message edits should be returned+ messageEdits :: Bool,+ -- | True, if message deletions should be returned+ messageDeletions :: Bool,+ -- | True, if pin/unpin events should be returned+ messagePins :: Bool,+ -- | True, if members joining events should be returned+ memberJoins :: Bool,+ -- | True, if members leaving events should be returned+ memberLeaves :: Bool,+ -- | True, if invited member events should be returned+ memberInvites :: Bool,+ -- | True, if member promotion/demotion events should be returned+ memberPromotions :: Bool,+ -- | True, if member restricted/unrestricted/banned/unbanned events should be returned+ memberRestrictions :: Bool,+ -- | True, if changes in chat information should be returned+ infoChanges :: Bool,+ -- | True, if changes in chat settings should be returned+ settingChanges :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Represents the value of a string in a language pack+data LanguagePackStringValue+ = -- | An ordinary language pack string + LanguagePackStringValueOrdinary+ { -- | String value+ value :: T+ }+ | -- | A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info+ LanguagePackStringValuePluralized+ { -- | Value for zero objects + zeroValue :: T,+ -- | Value for one object + oneValue :: T,+ -- | Value for two objects+ twoValue :: T,+ -- | Value for few objects + fewValue :: T,+ -- | Value for many objects + manyValue :: T,+ -- | Default value+ otherValue :: T+ }+ | -- | A deleted language pack string, the value should be taken from the built-in english language pack+ LanguagePackStringValueDeleted+ { + }+ deriving (Show, Eq, Generic)+data LanguagePackString+ = -- | Represents one language pack string + LanguagePackString+ { -- | String key + key :: T,+ -- | String value+ value :: LanguagePackStringValue+ }+ deriving (Show, Eq, Generic)+data LanguagePackStrings+ = -- | Contains a list of language pack strings + LanguagePackStrings+ { -- | A list of language pack strings+ strings :: [LanguagePackString]+ }+ deriving (Show, Eq, Generic)+data LanguagePackInfo+ = -- | Contains information about a language pack + LanguagePackInfo+ { -- | Unique language pack identifier+ id :: T,+ -- | Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs+ baseLanguagePackId :: T,+ -- | Language name + name :: T,+ -- | Name of the language in that language+ nativeName :: T,+ -- | A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info+ pluralCode :: T,+ -- | True, if the language pack is official + isOfficial :: Bool,+ -- | True, if the language pack strings are RTL + isRtl :: Bool,+ -- | True, if the language pack is a beta language pack+ isBeta :: Bool,+ -- | True, if the language pack is installed by the current user+ isInstalled :: Bool,+ -- | Total number of non-deleted strings from the language pack + totalStringCount :: I32,+ -- | Total number of translated strings from the language pack+ translatedStringCount :: I32,+ -- | Total number of non-deleted strings from the language pack available locally + localStringCount :: I32,+ -- | Link to language translation interface; empty for custom local language packs+ translationUrl :: T+ }+ deriving (Show, Eq, Generic)+data LocalizationTargetInfo+ = -- | Contains information about the current localization target + LocalizationTargetInfo+ { -- | List of available language packs for this application+ languagePacks :: [LanguagePackInfo]+ }+ deriving (Show, Eq, Generic)+-- | Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, you must specify the correct application platform and upload valid server authentication data at https://my.telegram.org+data DeviceToken+ = -- | A token for Firebase Cloud Messaging + DeviceTokenFirebaseCloudMessaging+ { -- | Device registration token; may be empty to de-register a device + token :: T,+ -- | True, if push notifications should be additionally encrypted+ encrypt :: Bool+ }+ | -- | A token for Apple Push Notification service + DeviceTokenApplePush+ { -- | Device token; may be empty to de-register a device + deviceToken :: T,+ -- | True, if App Sandbox is enabled+ isAppSandbox :: Bool+ }+ | -- | A token for Apple Push Notification service VoIP notifications + DeviceTokenApplePushVoIP+ { -- | Device token; may be empty to de-register a device + deviceToken :: T,+ -- | True, if App Sandbox is enabled + isAppSandbox :: Bool,+ -- | True, if push notifications should be additionally encrypted+ encrypt :: Bool+ }+ | -- | A token for Windows Push Notification Services + DeviceTokenWindowsPush+ { -- | The access token that will be used to send notifications; may be empty to de-register a device+ accessToken :: T+ }+ | -- | A token for Microsoft Push Notification Service + DeviceTokenMicrosoftPush+ { -- | Push notification channel URI; may be empty to de-register a device+ channelUri :: T+ }+ | -- | A token for Microsoft Push Notification Service VoIP channel + DeviceTokenMicrosoftPushVoIP+ { -- | Push notification channel URI; may be empty to de-register a device+ channelUri :: T+ }+ | -- | A token for web Push API + DeviceTokenWebPush+ { -- | Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device+ endpoint :: T,+ -- | Base64url-encoded P-256 elliptic curve Diffie-Hellman public key + p256dhBase64url :: T,+ -- | Base64url-encoded authentication secret+ authBase64url :: T+ }+ | -- | A token for Simple Push API for Firefox OS + DeviceTokenSimplePush+ { -- | Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device+ endpoint :: T+ }+ | -- | A token for Ubuntu Push Client service + DeviceTokenUbuntuPush+ { -- | Token; may be empty to de-register a device+ token :: T+ }+ | -- | A token for BlackBerry Push Service + DeviceTokenBlackBerryPush+ { -- | Token; may be empty to de-register a device+ token :: T+ }+ | -- | A token for Tizen Push Service + DeviceTokenTizenPush+ { -- | Push service registration identifier; may be empty to de-register a device+ regId :: T+ }+ deriving (Show, Eq, Generic)+data PushReceiverId+ = -- | Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification + PushReceiverId+ { -- | The globally unique identifier of push notification subscription+ id :: I64+ }+ deriving (Show, Eq, Generic)+-- | Describes a fill of a background+data BackgroundFill+ = -- | Describes a solid fill of a background + BackgroundFillSolid+ { -- | A color of the background in the RGB24 format+ color :: I32+ }+ | -- | Describes a gradient fill of a background + BackgroundFillGradient+ { -- | A top color of the background in the RGB24 format + topColor :: I32,+ -- | A bottom color of the background in the RGB24 format+ bottomColor :: I32,+ -- | Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45+ rotationAngle :: I32+ }+ deriving (Show, Eq, Generic)+-- | Describes the type of a background+data BackgroundType+ = -- | A wallpaper in JPEG format+ BackgroundTypeWallpaper+ { -- | True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12+ isBlurred :: Bool,+ -- | True, if the background needs to be slightly moved when device is tilted+ isMoving :: Bool+ }+ | -- | A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user+ BackgroundTypePattern+ { -- | Description of the background fill+ fill :: BackgroundFill,+ -- | Intensity of the pattern when it is shown above the filled background, 0-100+ intensity :: I32,+ -- | True, if the background needs to be slightly moved when device is tilted+ isMoving :: Bool+ }+ | -- | A filled background + BackgroundTypeFill+ { -- | Description of the background fill+ fill :: BackgroundFill+ }+ deriving (Show, Eq, Generic)+data Background+ = -- | Describes a chat background+ Background+ { -- | Unique background identifier+ id :: I64,+ -- | True, if this is one of default backgrounds+ isDefault :: Bool,+ -- | True, if the background is dark and is recommended to be used with dark theme+ isDark :: Bool,+ -- | Unique background name+ name :: T,+ -- | Document with the background; may be null. Null only for filled backgrounds+ document :: (Maybe) (Document),+ -- | Type of the background+ type_ :: BackgroundType+ }+ deriving (Show, Eq, Generic)+data Backgrounds+ = -- | Contains a list of backgrounds + Backgrounds+ { -- | A list of backgrounds+ backgrounds :: [Background]+ }+ deriving (Show, Eq, Generic)+-- | Contains information about background to set+data InputBackground+ = -- | A background from a local file+ InputBackgroundLocal+ { -- | Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns+ background :: InputFile+ }+ | -- | A background from the server + InputBackgroundRemote+ { -- | The background identifier+ backgroundId :: I64+ }+ deriving (Show, Eq, Generic)+data Hashtags+ = -- | Contains a list of hashtags + Hashtags+ { -- | A list of hashtags+ hashtags :: [T]+ }+ deriving (Show, Eq, Generic)+-- | Represents result of checking whether the current session can be used to transfer a chat ownership to another user+data CanTransferOwnershipResult+ = -- | The session can be used+ CanTransferOwnershipResultOk+ { + }+ | -- | The 2-step verification needs to be enabled first+ CanTransferOwnershipResultPasswordNeeded+ { + }+ | -- | The 2-step verification was enabled recently, user needs to wait + CanTransferOwnershipResultPasswordTooFresh+ { -- | Time left before the session can be used to transfer ownership of a chat, in seconds+ retryAfter :: I32+ }+ | -- | The session was created recently, user needs to wait + CanTransferOwnershipResultSessionTooFresh+ { -- | Time left before the session can be used to transfer ownership of a chat, in seconds+ retryAfter :: I32+ }+ deriving (Show, Eq, Generic)+-- | Represents result of checking whether a username can be set for a chat+data CheckChatUsernameResult+ = -- | The username can be set+ CheckChatUsernameResultOk+ { + }+ | -- | The username is invalid+ CheckChatUsernameResultUsernameInvalid+ { + }+ | -- | The username is occupied+ CheckChatUsernameResultUsernameOccupied+ { + }+ | -- | The user has too much chats with username, one of them should be made private first+ CheckChatUsernameResultPublicChatsTooMuch+ { + }+ | -- | The user can't be a member of a public supergroup+ CheckChatUsernameResultPublicGroupsUnavailable+ { + }+ deriving (Show, Eq, Generic)+-- | Contains content of a push message notification+data PushMessageContent+ = -- | A general message with hidden content + PushMessageContentHidden+ { -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | An animation message (GIF-style). + PushMessageContentAnimation+ { -- | Message content; may be null + animation :: (Maybe) (Animation),+ -- | Animation caption + caption :: T,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | An audio message + PushMessageContentAudio+ { -- | Message content; may be null + audio :: (Maybe) (Audio),+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A message with a user contact + PushMessageContentContact+ { -- | Contact's name + name :: T,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A contact has registered with Telegram+ PushMessageContentContactRegistered+ { + }+ | -- | A document message (a general file) + PushMessageContentDocument+ { -- | Message content; may be null + document :: (Maybe) (Document),+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A message with a game + PushMessageContentGame+ { -- | Game title, empty for pinned game message + title :: T,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A new high score was achieved in a game + PushMessageContentGameScore+ { -- | Game title, empty for pinned message + title :: T,+ -- | New score, 0 for pinned message + score :: I32,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A message with an invoice from a bot + PushMessageContentInvoice+ { -- | Product price + price :: T,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A message with a location + PushMessageContentLocation+ { -- | True, if the location is live + isLive :: Bool,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A photo message + PushMessageContentPhoto+ { -- | Message content; may be null + photo :: (Maybe) (Photo),+ -- | Photo caption + caption :: T,+ -- | True, if the photo is secret + isSecret :: Bool,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A message with a poll + PushMessageContentPoll+ { -- | Poll question + question :: T,+ -- | True, if the poll is regular and not in quiz mode + isRegular :: Bool,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A screenshot of a message in the chat has been taken+ PushMessageContentScreenshotTaken+ { + }+ | -- | A message with a sticker + PushMessageContentSticker+ { -- | Message content; may be null + sticker :: (Maybe) (Sticker),+ -- | Emoji corresponding to the sticker; may be empty + emoji :: T,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A text message + PushMessageContentText+ { -- | Message text + text :: T,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A video message + PushMessageContentVideo+ { -- | Message content; may be null + video :: (Maybe) (Video),+ -- | Video caption + caption :: T,+ -- | True, if the video is secret + isSecret :: Bool,+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A video note message + PushMessageContentVideoNote+ { -- | Message content; may be null + videoNote :: (Maybe) (VideoNote),+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A voice note message + PushMessageContentVoiceNote+ { -- | Message content; may be null + voiceNote :: (Maybe) (VoiceNote),+ -- | True, if the message is a pinned message with the specified content+ isPinned :: Bool+ }+ | -- | A newly created basic group+ PushMessageContentBasicGroupChatCreate+ { + }+ | -- | New chat members were invited to a group + PushMessageContentChatAddMembers+ { -- | Name of the added member + memberName :: T,+ -- | True, if the current user was added to the group+ isCurrentUser :: Bool,+ -- | True, if the user has returned to the group themself+ isReturned :: Bool+ }+ | -- | A chat photo was edited+ PushMessageContentChatChangePhoto+ { + }+ | -- | A chat title was edited + PushMessageContentChatChangeTitle+ { -- | New chat title+ title :: T+ }+ | -- | A chat member was deleted + PushMessageContentChatDeleteMember+ { -- | Name of the deleted member + memberName :: T,+ -- | True, if the current user was deleted from the group+ isCurrentUser :: Bool,+ -- | True, if the user has left the group themself+ isLeft :: Bool+ }+ | -- | A new member joined the chat by invite link+ PushMessageContentChatJoinByLink+ { + }+ | -- | A forwarded messages + PushMessageContentMessageForwards+ { -- | Number of forwarded messages+ totalCount :: I32+ }+ | -- | A media album + PushMessageContentMediaAlbum+ { -- | Number of messages in the album + totalCount :: I32,+ -- | True, if the album has at least one photo + hasPhotos :: Bool,+ -- | True, if the album has at least one video+ hasVideos :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Contains detailed information about a notification+data NotificationType+ = -- | New message was received + NotificationTypeNewMessage+ { -- | The message+ message :: Message+ }+ | -- | New secret chat was created+ NotificationTypeNewSecretChat+ { + }+ | -- | New call was received + NotificationTypeNewCall+ { -- | Call identifier+ callId :: I32+ }+ | -- | New message was received through a push notification+ NotificationTypeNewPushMessage+ { -- | The message identifier. The message will not be available in the chat history, but the ID can be used in viewMessages and as reply_to_message_id+ messageId :: I53,+ -- | Sender of the message; 0 if unknown. Corresponding user may be inaccessible+ senderUserId :: I32,+ -- | Name of the sender; can be different from the name of the sender user+ senderName :: T,+ -- | True, if the message is outgoing+ isOutgoing :: Bool,+ -- | Push message content+ content :: PushMessageContent+ }+ deriving (Show, Eq, Generic)+-- | Describes the type of notifications in a notification group+data NotificationGroupType+ = -- | A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages+ NotificationGroupTypeMessages+ { + }+ | -- | A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message+ NotificationGroupTypeMentions+ { + }+ | -- | A group containing a notification of type notificationTypeNewSecretChat+ NotificationGroupTypeSecretChat+ { + }+ | -- | A group containing notifications of type notificationTypeNewCall+ NotificationGroupTypeCalls+ { + }+ deriving (Show, Eq, Generic)+data Notification+ = -- | Contains information about a notification + Notification+ { -- | Unique persistent identifier of this notification + id :: I32,+ -- | Notification date+ date :: I32,+ -- | True, if the notification was initially silent + isSilent :: Bool,+ -- | Notification type+ type_ :: NotificationType+ }+ deriving (Show, Eq, Generic)+data NotificationGroup+ = -- | Describes a group of notifications + NotificationGroup+ { -- | Unique persistent auto-incremented from 1 identifier of the notification group + id :: I32,+ -- | Type of the group+ type_ :: NotificationGroupType,+ -- | Identifier of a chat to which all notifications in the group belong+ chatId :: I53,+ -- | Total number of active notifications in the group + totalCount :: I32,+ -- | The list of active notifications+ notifications :: [Notification]+ }+ deriving (Show, Eq, Generic)+-- | Represents the value of an option+data OptionValue+ = -- | Represents a boolean option + OptionValueBoolean+ { -- | The value of the option+ value_3 :: Bool+ }+ | -- | Represents an unknown option or an option which has a default value+ OptionValueEmpty+ { + }+ | -- | Represents an integer option + OptionValueInteger+ { -- | The value of the option+ value_2 :: I32+ }+ | -- | Represents a string option + OptionValueString+ { -- | The value of the option+ value :: T+ }+ deriving (Show, Eq, Generic)+data JsonObjectMember+ = -- | Represents one member of a JSON object + JsonObjectMember+ { -- | Member's key + key :: T,+ -- | Member's value+ value :: JsonValue+ }+ deriving (Show, Eq, Generic)+-- | Represents a JSON value+data JsonValue+ = -- | Represents a null JSON value+ JsonValueNull+ { + }+ | -- | Represents a boolean JSON value + JsonValueBoolean+ { -- | The value+ value_3 :: Bool+ }+ | -- | Represents a numeric JSON value + JsonValueNumber+ { -- | The value+ value_2 :: Double+ }+ | -- | Represents a string JSON value + JsonValueString+ { -- | The value+ value :: T+ }+ | -- | Represents a JSON array + JsonValueArray+ { -- | The list of array elements+ values :: [JsonValue]+ }+ | -- | Represents a JSON object + JsonValueObject+ { -- | The list of object members+ members :: [JsonObjectMember]+ }+ deriving (Show, Eq, Generic)+-- | Represents a single rule for managing privacy settings+data UserPrivacySettingRule+ = -- | A rule to allow all users to do something+ UserPrivacySettingRuleAllowAll+ { + }+ | -- | A rule to allow all of a user's contacts to do something+ UserPrivacySettingRuleAllowContacts+ { + }+ | -- | A rule to allow certain specified users to do something + UserPrivacySettingRuleAllowUsers+ { -- | The user identifiers, total number of users in all rules must not exceed 1000+ userIds :: [I32]+ }+ | -- | A rule to allow all members of certain specified basic groups and supergroups to doing something + UserPrivacySettingRuleAllowChatMembers+ { -- | The chat identifiers, total number of chats in all rules must not exceed 20+ chatIds :: [I53]+ }+ | -- | A rule to restrict all users from doing something+ UserPrivacySettingRuleRestrictAll+ { + }+ | -- | A rule to restrict all contacts of a user from doing something+ UserPrivacySettingRuleRestrictContacts+ { + }+ | -- | A rule to restrict all specified users from doing something + UserPrivacySettingRuleRestrictUsers+ { -- | The user identifiers, total number of users in all rules must not exceed 1000+ userIds :: [I32]+ }+ | -- | A rule to restrict all members of specified basic groups and supergroups from doing something + UserPrivacySettingRuleRestrictChatMembers+ { -- | The chat identifiers, total number of chats in all rules must not exceed 20+ chatIds :: [I53]+ }+ deriving (Show, Eq, Generic)+data UserPrivacySettingRules+ = -- | A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed + UserPrivacySettingRules+ { -- | A list of rules+ rules :: [UserPrivacySettingRule]+ }+ deriving (Show, Eq, Generic)+-- | Describes available user privacy settings+data UserPrivacySetting+ = -- | A privacy setting for managing whether the user's online status is visible+ UserPrivacySettingShowStatus+ { + }+ | -- | A privacy setting for managing whether the user's profile photo is visible+ UserPrivacySettingShowProfilePhoto+ { + }+ | -- | A privacy setting for managing whether a link to the user's account is included in forwarded messages+ UserPrivacySettingShowLinkInForwardedMessages+ { + }+ | -- | A privacy setting for managing whether the user's phone number is visible+ UserPrivacySettingShowPhoneNumber+ { + }+ | -- | A privacy setting for managing whether the user can be invited to chats+ UserPrivacySettingAllowChatInvites+ { + }+ | -- | A privacy setting for managing whether the user can be called+ UserPrivacySettingAllowCalls+ { + }+ | -- | A privacy setting for managing whether peer-to-peer connections can be used for calls+ UserPrivacySettingAllowPeerToPeerCalls+ { + }+ | -- | A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all"+ UserPrivacySettingAllowFindingByPhoneNumber+ { + }+ deriving (Show, Eq, Generic)+data AccountTtl+ = -- | Contains information about the period of inactivity after which the current user's account will automatically be deleted + AccountTtl+ { -- | Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days+ days :: I32+ }+ deriving (Show, Eq, Generic)+data Session+ = -- | Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order+ Session+ { -- | Session identifier + id :: I64,+ -- | True, if this session is the current session+ isCurrent :: Bool,+ -- | True, if a password is needed to complete authorization of the session+ isPasswordPending :: Bool,+ -- | Telegram API identifier, as provided by the application + apiId :: I32,+ -- | Name of the application, as provided by the application+ applicationName :: T,+ -- | The version of the application, as provided by the application + applicationVersion :: T,+ -- | True, if the application is an official application or uses the api_id of an official application+ isOfficialApplication :: Bool,+ -- | Model of the device the application has been run or is running on, as provided by the application + deviceModel :: T,+ -- | Operating system the application has been run or is running on, as provided by the application+ platform :: T,+ -- | Version of the operating system the application has been run or is running on, as provided by the application + systemVersion :: T,+ -- | Point in time (Unix timestamp) when the user has logged in+ logInDate :: I32,+ -- | Point in time (Unix timestamp) when the session was last used + lastActiveDate :: I32,+ -- | IP address from which the session was created, in human-readable format+ ip :: T,+ -- | A two-letter country code for the country from which the session was created, based on the IP address + country :: T,+ -- | Region code from which the session was created, based on the IP address+ region :: T+ }+ deriving (Show, Eq, Generic)+data Sessions+ = -- | Contains a list of sessions + Sessions+ { -- | List of sessions+ sessions :: [Session]+ }+ deriving (Show, Eq, Generic)+data ConnectedWebsite+ = -- | Contains information about one website the current user is logged in with Telegram+ ConnectedWebsite+ { -- | Website identifier+ id :: I64,+ -- | The domain name of the website+ domainName :: T,+ -- | User identifier of a bot linked with the website+ botUserId :: I32,+ -- | The version of a browser used to log in+ browser :: T,+ -- | Operating system the browser is running on+ platform :: T,+ -- | Point in time (Unix timestamp) when the user was logged in+ logInDate :: I32,+ -- | Point in time (Unix timestamp) when obtained authorization was last used+ lastActiveDate :: I32,+ -- | IP address from which the user was logged in, in human-readable format+ ip :: T,+ -- | Human-readable description of a country and a region, from which the user was logged in, based on the IP address+ location :: T+ }+ deriving (Show, Eq, Generic)+data ConnectedWebsites+ = -- | Contains a list of websites the current user is logged in with Telegram + ConnectedWebsites+ { -- | List of connected websites+ websites :: [ConnectedWebsite]+ }+ deriving (Show, Eq, Generic)+-- | Describes the reason why a chat is reported+data ChatReportReason+ = -- | The chat contains spam messages+ ChatReportReasonSpam+ { + }+ | -- | The chat promotes violence+ ChatReportReasonViolence+ { + }+ | -- | The chat contains pornographic messages+ ChatReportReasonPornography+ { + }+ | -- | The chat has child abuse related content+ ChatReportReasonChildAbuse+ { + }+ | -- | The chat contains copyrighted content+ ChatReportReasonCopyright+ { + }+ | -- | The location-based chat is unrelated to its stated location+ ChatReportReasonUnrelatedLocation+ { + }+ | -- | A custom reason provided by the user + ChatReportReasonCustom+ { -- | Report text+ text :: T+ }+ deriving (Show, Eq, Generic)+data PublicMessageLink+ = -- | Contains a public HTTPS link to a message in a supergroup or channel with a username + PublicMessageLink+ { -- | Message link + link :: T,+ -- | HTML-code for embedding the message+ html :: T+ }+ deriving (Show, Eq, Generic)+data MessageLinkInfo+ = -- | Contains information about a link to a message in a chat+ MessageLinkInfo+ { -- | True, if the link is a public link for a message in a chat+ isPublic :: Bool,+ -- | If found, identifier of the chat to which the message belongs, 0 otherwise+ chatId :: I53,+ -- | If found, the linked message; may be null+ message :: (Maybe) (Message),+ -- | True, if the whole media album to which the message belongs is linked+ forAlbum :: Bool+ }+ deriving (Show, Eq, Generic)+data FilePart+ = -- | Contains a part of a file + FilePart+ { -- | File bytes+ data_ :: ByteString64+ }+ deriving (Show, Eq, Generic)+-- | Represents the type of a file+data FileType+ = -- | The data is not a file+ FileTypeNone+ { + }+ | -- | The file is an animation+ FileTypeAnimation+ { + }+ | -- | The file is an audio file+ FileTypeAudio+ { + }+ | -- | The file is a document+ FileTypeDocument+ { + }+ | -- | The file is a photo+ FileTypePhoto+ { + }+ | -- | The file is a profile photo+ FileTypeProfilePhoto+ { + }+ | -- | The file was sent to a secret chat (the file type is not known to the server)+ FileTypeSecret+ { + }+ | -- | The file is a thumbnail of a file from a secret chat+ FileTypeSecretThumbnail+ { + }+ | -- | The file is a file from Secure storage used for storing Telegram Passport files+ FileTypeSecure+ { + }+ | -- | The file is a sticker+ FileTypeSticker+ { + }+ | -- | The file is a thumbnail of another file+ FileTypeThumbnail+ { + }+ | -- | The file type is not yet known+ FileTypeUnknown+ { + }+ | -- | The file is a video+ FileTypeVideo+ { + }+ | -- | The file is a video note+ FileTypeVideoNote+ { + }+ | -- | The file is a voice note+ FileTypeVoiceNote+ { + }+ | -- | The file is a wallpaper or a background pattern+ FileTypeWallpaper+ { + }+ deriving (Show, Eq, Generic)+data StorageStatisticsByFileType+ = -- | Contains the storage usage statistics for a specific file type + StorageStatisticsByFileType+ { -- | File type + fileType :: FileType,+ -- | Total size of the files + size :: I53,+ -- | Total number of files+ count :: I32+ }+ deriving (Show, Eq, Generic)+data StorageStatisticsByChat+ = -- | Contains the storage usage statistics for a specific chat + StorageStatisticsByChat+ { -- | Chat identifier; 0 if none + chatId :: I53,+ -- | Total size of the files in the chat + size :: I53,+ -- | Total number of files in the chat + count :: I32,+ -- | Statistics split by file types+ byFileType :: [StorageStatisticsByFileType]+ }+ deriving (Show, Eq, Generic)+data StorageStatistics+ = -- | Contains the exact storage usage statistics split by chats and file type + StorageStatistics+ { -- | Total size of files + size :: I53,+ -- | Total number of files + count :: I32,+ -- | Statistics split by chats+ byChat :: [StorageStatisticsByChat]+ }+ deriving (Show, Eq, Generic)+data StorageStatisticsFast+ = -- | Contains approximate storage usage statistics, excluding files of unknown file type + StorageStatisticsFast+ { -- | Approximate total size of files + filesSize :: I53,+ -- | Approximate number of files+ fileCount :: I32,+ -- | Size of the database + databaseSize :: I53,+ -- | Size of the language pack database + languagePackDatabaseSize :: I53,+ -- | Size of the TDLib internal log+ logSize :: I53+ }+ deriving (Show, Eq, Generic)+data DatabaseStatistics+ = -- | Contains database statistics+ DatabaseStatistics+ { -- | Database statistics in an unspecified human-readable format+ statistics :: T+ }+ deriving (Show, Eq, Generic)+-- | Represents the type of a network+data NetworkType+ = -- | The network is not available+ NetworkTypeNone+ { + }+ | -- | A mobile network+ NetworkTypeMobile+ { + }+ | -- | A mobile roaming network+ NetworkTypeMobileRoaming+ { + }+ | -- | A Wi-Fi network+ NetworkTypeWiFi+ { + }+ | -- | A different network type (e.g., Ethernet network)+ NetworkTypeOther+ { + }+ deriving (Show, Eq, Generic)+-- | Contains statistics about network usage+data NetworkStatisticsEntry+ = -- | Contains information about the total amount of data that was used to send and receive files + NetworkStatisticsEntryFile+ { -- | Type of the file the data is part of + fileType :: FileType,+ -- | Type of the network the data was sent through. Call setNetworkType to maintain the actual network type+ networkType :: NetworkType,+ -- | Total number of bytes sent + sentBytes :: I53,+ -- | Total number of bytes received+ receivedBytes :: I53+ }+ | -- | Contains information about the total amount of data that was used for calls + NetworkStatisticsEntryCall+ { -- | Type of the network the data was sent through. Call setNetworkType to maintain the actual network type+ networkType :: NetworkType,+ -- | Total number of bytes sent + sentBytes :: I53,+ -- | Total number of bytes received + receivedBytes :: I53,+ -- | Total call duration, in seconds+ duration :: Double+ }+ deriving (Show, Eq, Generic)+data NetworkStatistics+ = -- | A full list of available network statistic entries + NetworkStatistics+ { -- | Point in time (Unix timestamp) when the app began collecting statistics + sinceDate :: I32,+ -- | Network statistics entries+ entries :: [NetworkStatisticsEntry]+ }+ deriving (Show, Eq, Generic)+data AutoDownloadSettings+ = -- | Contains auto-download settings+ AutoDownloadSettings+ { -- | True, if the auto-download is enabled+ isAutoDownloadEnabled :: Bool,+ -- | The maximum size of a photo file to be auto-downloaded+ maxPhotoFileSize :: I32,+ -- | The maximum size of a video file to be auto-downloaded+ maxVideoFileSize :: I32,+ -- | The maximum size of other file types to be auto-downloaded+ maxOtherFileSize :: I32,+ -- | The maximum suggested bitrate for uploaded videos+ videoUploadBitrate :: I32,+ -- | True, if the beginning of videos needs to be preloaded for instant playback+ preloadLargeVideos :: Bool,+ -- | True, if the next audio track needs to be preloaded while the user is listening to an audio file+ preloadNextAudio :: Bool,+ -- | True, if "use less data for calls" option needs to be enabled+ useLessDataForCalls :: Bool+ }+ deriving (Show, Eq, Generic)+data AutoDownloadSettingsPresets+ = -- | Contains auto-download settings presets for the user+ AutoDownloadSettingsPresets+ { -- | Preset with lowest settings; supposed to be used by default when roaming+ low :: AutoDownloadSettings,+ -- | Preset with medium settings; supposed to be used by default when using mobile data+ medium :: AutoDownloadSettings,+ -- | Preset with highest settings; supposed to be used by default when connected on Wi-Fi+ high :: AutoDownloadSettings+ }+ deriving (Show, Eq, Generic)+-- | Describes the current state of the connection to Telegram servers+data ConnectionState+ = -- | Currently waiting for the network to become available. Use setNetworkType to change the available network type+ ConnectionStateWaitingForNetwork+ { + }+ | -- | Currently establishing a connection with a proxy server+ ConnectionStateConnectingToProxy+ { + }+ | -- | Currently establishing a connection to the Telegram servers+ ConnectionStateConnecting+ { + }+ | -- | Downloading data received while the client was offline+ ConnectionStateUpdating+ { + }+ | -- | There is a working connection to the Telegram servers+ ConnectionStateReady+ { + }+ deriving (Show, Eq, Generic)+-- | Represents the categories of chats for which a list of frequently used chats can be retrieved+data TopChatCategory+ = -- | A category containing frequently used private chats with non-bot users+ TopChatCategoryUsers+ { + }+ | -- | A category containing frequently used private chats with bot users+ TopChatCategoryBots+ { + }+ | -- | A category containing frequently used basic groups and supergroups+ TopChatCategoryGroups+ { + }+ | -- | A category containing frequently used channels+ TopChatCategoryChannels+ { + }+ | -- | A category containing frequently used chats with inline bots sorted by their usage in inline mode+ TopChatCategoryInlineBots+ { + }+ | -- | A category containing frequently used chats used for calls+ TopChatCategoryCalls+ { + }+ | -- | A category containing frequently used chats used to forward messages+ TopChatCategoryForwardChats+ { + }+ deriving (Show, Eq, Generic)+-- | Describes the type of a URL linking to an internal Telegram entity+data TMeUrlType+ = -- | A URL linking to a user + TMeUrlTypeUser+ { -- | Identifier of the user+ userId :: I32+ }+ | -- | A URL linking to a public supergroup or channel + TMeUrlTypeSupergroup+ { -- | Identifier of the supergroup or channel+ supergroupId :: I53+ }+ | -- | A chat invite link + TMeUrlTypeChatInvite+ { -- | Chat invite link info+ info :: ChatInviteLinkInfo+ }+ | -- | A URL linking to a sticker set + TMeUrlTypeStickerSet+ { -- | Identifier of the sticker set+ stickerSetId :: I64+ }+ deriving (Show, Eq, Generic)+data TMeUrl+ = -- | Represents a URL linking to an internal Telegram entity + TMeUrl+ { -- | URL + url :: T,+ -- | Type of the URL+ type_ :: TMeUrlType+ }+ deriving (Show, Eq, Generic)+data TMeUrls+ = -- | Contains a list of t.me URLs + TMeUrls+ { -- | List of URLs+ urls :: [TMeUrl]+ }+ deriving (Show, Eq, Generic)+data Count+ = -- | Contains a counter + Count+ { -- | Count+ count :: I32+ }+ deriving (Show, Eq, Generic)+data Text+ = -- | Contains some text + Text+ { -- | Text+ text :: T+ }+ deriving (Show, Eq, Generic)+data Seconds+ = -- | Contains a value representing a number of seconds + Seconds+ { -- | Number of seconds+ seconds :: Double+ }+ deriving (Show, Eq, Generic)+data DeepLinkInfo+ = -- | Contains information about a tg:// deep link + DeepLinkInfo+ { -- | Text to be shown to the user + text :: FormattedText,+ -- | True, if user should be asked to update the application+ needUpdateApplication :: Bool+ }+ deriving (Show, Eq, Generic)+-- | Describes the way the text should be parsed for TextEntities+data TextParseMode+ = -- | The text uses Markdown-style formatting+ TextParseModeMarkdown+ { -- | Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode+ version :: I32+ }+ | -- | The text uses HTML-style formatting. The same as Telegram Bot API "HTML" parse mode+ TextParseModeHTML+ { + }+ deriving (Show, Eq, Generic)+-- | Describes the type of a proxy server+data ProxyType+ = -- | A SOCKS5 proxy server + ProxyTypeSocks5+ { -- | Username for logging in; may be empty + username :: T,+ -- | Password for logging in; may be empty+ password :: T+ }+ | -- | A HTTP transparent proxy server + ProxyTypeHttp+ { -- | Username for logging in; may be empty + username :: T,+ -- | Password for logging in; may be empty + password :: T,+ -- | Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method+ httpOnly :: Bool+ }+ | -- | An MTProto proxy server + ProxyTypeMtproto+ { -- | The proxy's secret in hexadecimal encoding+ secret :: T+ }+ deriving (Show, Eq, Generic)+data Proxy+ = -- | Contains information about a proxy server + Proxy+ { -- | Unique identifier of the proxy + id :: I32,+ -- | Proxy server IP address + server :: T,+ -- | Proxy server port + port :: I32,+ -- | Point in time (Unix timestamp) when the proxy was last used; 0 if never + lastUsedDate :: I32,+ -- | True, if the proxy is enabled now + isEnabled :: Bool,+ -- | Type of the proxy+ type_ :: ProxyType+ }+ deriving (Show, Eq, Generic)+data Proxies+ = -- | Represents a list of proxy servers + Proxies+ { -- | List of proxy servers+ proxies :: [Proxy]+ }+ deriving (Show, Eq, Generic)+-- | Describes a sticker that needs to be added to a sticker set+data InputSticker+ = -- | A static sticker in PNG format, which will be converted to WEBP server-side+ InputStickerStatic+ { -- | PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square+ sticker :: InputFile,+ -- | Emojis corresponding to the sticker+ emojis :: T,+ -- | For masks, position where the mask should be placed; may be null+ maskPosition :: (Maybe) (MaskPosition)+ }+ | -- | An animated sticker in TGS format+ InputStickerAnimated+ { -- | File with the animated sticker. Only local or uploaded within a week files are supported. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements+ sticker :: InputFile,+ -- | Emojis corresponding to the sticker+ emojis :: T+ }+ deriving (Show, Eq, Generic)+data DateRange+ = -- | Represents a date range + DateRange+ { -- | Point in time (Unix timestamp) at which the date range begins + startDate :: I32,+ -- | Point in time (Unix timestamp) at which the date range ends+ endDate :: I32+ }+ deriving (Show, Eq, Generic)+data StatisticsValue+ = -- | A statistics value + StatisticsValue+ { -- | The value + value :: Double,+ -- | The value for the previous day + previousValue :: Double,+ -- | The growth rate of the value, as a percentage+ growthRatePercentage :: Double+ }+ deriving (Show, Eq, Generic)+-- | Describes a statistics graph+data StatisticsGraph+ = -- | A graph data + StatisticsGraphData+ { -- | Graph data in JSON format + jsonData :: T,+ -- | If non-empty, a token which can be used to receive a zoomed in graph+ zoomToken :: T+ }+ | -- | The graph data to be asynchronously loaded through getChatStatisticsGraph + StatisticsGraphAsync+ { -- | The token to use for data loading+ token :: T+ }+ | -- | An error message to be shown to the user instead of the graph + StatisticsGraphError+ { -- | The error message+ errorMessage :: T+ }+ deriving (Show, Eq, Generic)+data ChatStatisticsMessageInteractionCounters+ = -- | Contains statistics about interactions with a message+ ChatStatisticsMessageInteractionCounters+ { -- | Message identifier+ messageId :: I53,+ -- | Number of times the message was viewed+ viewCount :: I32,+ -- | Number of times the message was forwarded+ forwardCount :: I32+ }+ deriving (Show, Eq, Generic)+data ChatStatistics+ = -- | A detailed statistics about a chat+ ChatStatistics+ { -- | A period to which the statistics applies+ period :: DateRange,+ -- | Number of members in the chat+ memberCount :: StatisticsValue,+ -- | Mean number of times the recently sent messages was viewed+ meanViewCount :: StatisticsValue,+ -- | Mean number of times the recently sent messages was shared+ meanShareCount :: StatisticsValue,+ -- | A percentage of users with enabled notifications for the chat+ enabledNotificationsPercentage :: Double,+ -- | A graph containing number of members in the chat+ memberCountGraph :: StatisticsGraph,+ -- | A graph containing number of members joined and left the chat+ joinGraph :: StatisticsGraph,+ -- | A graph containing number of members muted and unmuted the chat+ muteGraph :: StatisticsGraph,+ -- | A graph containing number of message views in a given hour in the last two weeks+ viewCountByHourGraph :: StatisticsGraph,+ -- | A graph containing number of message views per source+ viewCountBySourceGraph :: StatisticsGraph,+ -- | A graph containing number of new member joins per source+ joinBySourceGraph :: StatisticsGraph,+ -- | A graph containing number of users viewed chat messages per language+ languageGraph :: StatisticsGraph,+ -- | A graph containing number of chat message views and shares+ messageInteractionGraph :: StatisticsGraph,+ -- | A graph containing number of views of associated with the chat instant views+ instantViewInteractionGraph :: StatisticsGraph,+ -- | Detailed statistics about number of views and shares of recently sent messages+ recentMessageInteractions :: [ChatStatisticsMessageInteractionCounters]+ }+ deriving (Show, Eq, Generic)+-- | Contains notifications about data changes+data Update+ = -- | The user authorization state has changed + UpdateAuthorizationState+ { -- | New authorization state+ authorizationState :: AuthorizationState+ }+ | -- | A new message was received; can also be an outgoing message + UpdateNewMessage+ { -- | The new message+ message :: Message+ }+ | -- | A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message+ UpdateMessageSendAcknowledged+ { -- | The chat identifier of the sent message + chatId :: I53,+ -- | A temporary message identifier+ messageId :: I53+ }+ | -- | A message has been successfully sent + UpdateMessageSendSucceeded+ { -- | Information about the sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change + message :: Message,+ -- | The previous temporary message identifier+ oldMessageId :: I53+ }+ | -- | A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update+ UpdateMessageSendFailed+ { -- | Contains information about the message which failed to send + message :: Message,+ -- | The previous temporary message identifier + oldMessageId :: I53,+ -- | An error code + errorCode :: I32,+ -- | Error message+ errorMessage :: T+ }+ | -- | The message content has changed + UpdateMessageContent+ { -- | Chat identifier + chatId :: I53,+ -- | Message identifier + messageId :: I53,+ -- | New message content+ newContent :: MessageContent+ }+ | -- | A message was edited. Changes in the message content will come in a separate updateMessageContent + UpdateMessageEdited+ { -- | Chat identifier + chatId :: I53,+ -- | Message identifier + messageId :: I53,+ -- | Point in time (Unix timestamp) when the message was edited + editDate :: I32,+ -- | New message reply markup; may be null+ replyMarkup :: (Maybe) (ReplyMarkup)+ }+ | -- | The view count of the message has changed + UpdateMessageViews+ { -- | Chat identifier + chatId :: I53,+ -- | Message identifier + messageId :: I53,+ -- | New value of the view count+ views :: I32+ }+ | -- | The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages + UpdateMessageContentOpened+ { -- | Chat identifier + chatId :: I53,+ -- | Message identifier+ messageId :: I53+ }+ | -- | A message with an unread mention was read + UpdateMessageMentionRead+ { -- | Chat identifier + chatId :: I53,+ -- | Message identifier + messageId :: I53,+ -- | The new number of unread mention messages left in the chat+ unreadMentionCount :: I32+ }+ | -- | A message with a live location was viewed. When the update is received, the client is supposed to update the live location+ UpdateMessageLiveLocationViewed+ { -- | Identifier of the chat with the live location message + chatId :: I53,+ -- | Identifier of the message with live location+ messageId :: I53+ }+ | -- | A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates + UpdateNewChat+ { -- | The chat+ chat :: Chat+ }+ | -- | The title of a chat was changed + UpdateChatTitle+ { -- | Chat identifier + chatId :: I53,+ -- | The new chat title+ title :: T+ }+ | -- | A chat photo was changed + UpdateChatPhoto+ { -- | Chat identifier + chatId :: I53,+ -- | The new chat photo; may be null+ photo :: (Maybe) (ChatPhoto)+ }+ | -- | Chat permissions was changed + UpdateChatPermissions+ { -- | Chat identifier + chatId :: I53,+ -- | The new chat permissions+ permissions :: ChatPermissions+ }+ | -- | The last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case + UpdateChatLastMessage+ { -- | Chat identifier + chatId :: I53,+ -- | The new last message in the chat; may be null + lastMessage :: (Maybe) (Message),+ -- | The new chat positions in the chat lists+ positions :: [ChatPosition]+ }+ | -- | The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent + UpdateChatPosition+ { -- | Chat identifier + chatId :: I53,+ -- | New chat position. If new order is 0, then the chat needs to be removed from the list+ position :: ChatPosition+ }+ | -- | A chat was marked as unread or was read + UpdateChatIsMarkedAsUnread+ { -- | Chat identifier + chatId :: I53,+ -- | New value of is_marked_as_unread+ isMarkedAsUnread :: Bool+ }+ | -- | A chat's has_scheduled_messages field has changed + UpdateChatHasScheduledMessages+ { -- | Chat identifier + chatId :: I53,+ -- | New value of has_scheduled_messages+ hasScheduledMessages :: Bool+ }+ | -- | The value of the default disable_notification parameter, used when a message is sent to the chat, was changed + UpdateChatDefaultDisableNotification+ { -- | Chat identifier + chatId :: I53,+ -- | The new default_disable_notification value+ defaultDisableNotification :: Bool+ }+ | -- | Incoming messages were read or number of unread messages has been changed + UpdateChatReadInbox+ { -- | Chat identifier + chatId :: I53,+ -- | Identifier of the last read incoming message + lastReadInboxMessageId :: I53,+ -- | The number of unread messages left in the chat+ unreadCount :: I32+ }+ | -- | Outgoing messages were read + UpdateChatReadOutbox+ { -- | Chat identifier + chatId :: I53,+ -- | Identifier of last read outgoing message+ lastReadOutboxMessageId :: I53+ }+ | -- | The chat unread_mention_count has changed + UpdateChatUnreadMentionCount+ { -- | Chat identifier + chatId :: I53,+ -- | The number of unread mention messages left in the chat+ unreadMentionCount :: I32+ }+ | -- | Notification settings for a chat were changed + UpdateChatNotificationSettings+ { -- | Chat identifier + chatId :: I53,+ -- | The new notification settings+ notificationSettings_2 :: ChatNotificationSettings+ }+ | -- | Notification settings for some type of chats were updated + UpdateScopeNotificationSettings+ { -- | Types of chats for which notification settings were updated + scope :: NotificationSettingsScope,+ -- | The new notification settings+ notificationSettings :: ScopeNotificationSettings+ }+ | -- | The chat action bar was changed + UpdateChatActionBar+ { -- | Chat identifier + chatId :: I53,+ -- | The new value of the action bar; may be null+ actionBar :: (Maybe) (ChatActionBar)+ }+ | -- | The chat pinned message was changed + UpdateChatPinnedMessage+ { -- | Chat identifier + chatId :: I53,+ -- | The new identifier of the pinned message; 0 if there is no pinned message in the chat+ pinnedMessageId :: I53+ }+ | -- | The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user+ UpdateChatReplyMarkup+ { -- | Chat identifier + chatId :: I53,+ -- | Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat+ replyMarkupMessageId :: I53+ }+ | -- | A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied + UpdateChatDraftMessage+ { -- | Chat identifier + chatId :: I53,+ -- | The new draft message; may be null + draftMessage :: (Maybe) (DraftMessage),+ -- | The new chat positions in the chat lists+ positions :: [ChatPosition]+ }+ | -- | The list of chat filters or a chat filter has changed + UpdateChatFilters+ { -- | The new list of chat filters+ chatFilters :: [ChatFilterInfo]+ }+ | -- | The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed + UpdateChatOnlineMemberCount+ { -- | Identifier of the chat + chatId :: I53,+ -- | New number of online members in the chat, or 0 if unknown+ onlineMemberCount :: I32+ }+ | -- | A notification was changed + UpdateNotification+ { -- | Unique notification group identifier + notificationGroupId :: I32,+ -- | Changed notification+ notification :: Notification+ }+ | -- | A list of active notifications in a notification group has changed+ UpdateNotificationGroup+ { -- | Unique notification group identifier+ notificationGroupId :: I32,+ -- | New type of the notification group+ type_2 :: NotificationGroupType,+ -- | Identifier of a chat to which all notifications in the group belong+ chatId :: I53,+ -- | Chat identifier, which notification settings must be applied to the added notifications+ notificationSettingsChatId :: I53,+ -- | True, if the notifications should be shown without sound+ isSilent :: Bool,+ -- | Total number of unread notifications in the group, can be bigger than number of active notifications+ totalCount :: I32,+ -- | List of added group notifications, sorted by notification ID + addedNotifications :: [Notification],+ -- | Identifiers of removed group notifications, sorted by notification ID+ removedNotificationIds :: [I32]+ }+ | -- | Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update + UpdateActiveNotifications+ { -- | Lists of active notification groups+ groups :: [NotificationGroup]+ }+ | -- | Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications+ UpdateHavePendingNotifications+ { -- | True, if there are some delayed notification updates, which will be sent soon+ haveDelayedNotifications :: Bool,+ -- | True, if there can be some yet unreceived notifications, which are being fetched from the server+ haveUnreceivedNotifications :: Bool+ }+ | -- | Some messages were deleted + UpdateDeleteMessages+ { -- | Chat identifier + chatId :: I53,+ -- | Identifiers of the deleted messages+ messageIds :: [I53],+ -- | True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible)+ isPermanent :: Bool,+ -- | True, if the messages are deleted only from the cache and can possibly be retrieved again in the future+ fromCache :: Bool+ }+ | -- | User activity in the chat has changed + UpdateUserChatAction+ { -- | Chat identifier + chatId :: I53,+ -- | Identifier of a user performing an action + userId :: I32,+ -- | The action description+ action :: ChatAction+ }+ | -- | The user went online or offline + UpdateUserStatus+ { -- | User identifier + userId :: I32,+ -- | New status of the user+ status :: UserStatus+ }+ | -- | Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client + UpdateUser+ { -- | New data about the user+ user :: User+ }+ | -- | Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client + UpdateBasicGroup+ { -- | New data about the group+ basicGroup :: BasicGroup+ }+ | -- | Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the client + UpdateSupergroup+ { -- | New data about the supergroup+ supergroup :: Supergroup+ }+ | -- | Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client + UpdateSecretChat+ { -- | New data about the secret chat+ secretChat :: SecretChat+ }+ | -- | Some data from userFullInfo has been changed + UpdateUserFullInfo+ { -- | User identifier + userId :: I32,+ -- | New full information about the user+ userFullInfo :: UserFullInfo+ }+ | -- | Some data from basicGroupFullInfo has been changed + UpdateBasicGroupFullInfo+ { -- | Identifier of a basic group + basicGroupId :: I32,+ -- | New full information about the group+ basicGroupFullInfo :: BasicGroupFullInfo+ }+ | -- | Some data from supergroupFullInfo has been changed + UpdateSupergroupFullInfo+ { -- | Identifier of the supergroup or channel + supergroupId :: I32,+ -- | New full information about the supergroup+ supergroupFullInfo :: SupergroupFullInfo+ }+ | -- | Service notification from the server. Upon receiving this the client must show a popup with the content of the notification+ UpdateServiceNotification+ { -- | Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method+ type_ :: T,+ -- | Notification content+ content :: MessageContent+ }+ | -- | Information about a file was updated + UpdateFile+ { -- | New data about the file+ file :: File+ }+ | -- | The file generation process needs to be started by the client+ UpdateFileGenerationStart+ { -- | Unique identifier for the generation process+ generationId :: I64,+ -- | The path to a file from which a new file is generated; may be empty+ originalPath :: T,+ -- | The path to a file that should be created and where the new file should be generated+ destinationPath :: T,+ -- | String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file, which should be downloaded by the client+ conversion :: T+ }+ | -- | File generation is no longer needed + UpdateFileGenerationStop+ { -- | Unique identifier for the generation process+ generationId :: I64+ }+ | -- | New call was created or information about a call was updated + UpdateCall+ { -- | New data about a call+ call :: Call+ }+ | -- | Some privacy setting rules have been changed + UpdateUserPrivacySettingRules+ { -- | The privacy setting + setting :: UserPrivacySetting,+ -- | New privacy rules+ rules :: UserPrivacySettingRules+ }+ | -- | Number of unread messages in a chat list has changed. This update is sent only if the message database is used + UpdateUnreadMessageCount+ { -- | The chat list with changed number of unread messages+ chatList :: ChatList,+ -- | Total number of unread messages + unreadCount :: I32,+ -- | Total number of unread messages in unmuted chats+ unreadUnmutedCount :: I32+ }+ | -- | Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used+ UpdateUnreadChatCount+ { -- | The chat list with changed number of unread messages+ chatList :: ChatList,+ -- | Approximate total number of chats in the chat list+ totalCount :: I32,+ -- | Total number of unread chats + unreadCount :: I32,+ -- | Total number of unread unmuted chats+ unreadUnmutedCount :: I32,+ -- | Total number of chats marked as unread + markedAsUnreadCount :: I32,+ -- | Total number of unmuted chats marked as unread+ markedAsUnreadUnmutedCount :: I32+ }+ | -- | An option changed its value + UpdateOption+ { -- | The option name + name :: T,+ -- | The new option value+ value :: OptionValue+ }+ | -- | A sticker set has changed + UpdateStickerSet+ { -- | The sticker set+ stickerSet :: StickerSet+ }+ | -- | The list of installed sticker sets was updated + UpdateInstalledStickerSets+ { -- | True, if the list of installed mask sticker sets was updated + isMasks :: Bool,+ -- | The new list of installed ordinary sticker sets+ stickerSetIds :: [I64]+ }+ | -- | The list of trending sticker sets was updated or some of them were viewed + UpdateTrendingStickerSets+ { -- | The prefix of the list of trending sticker sets with the newest trending sticker sets+ stickerSets :: StickerSets+ }+ | -- | The list of recently used stickers was updated + UpdateRecentStickers+ { -- | True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated + isAttached :: Bool,+ -- | The new list of file identifiers of recently used stickers+ stickerIds :: [I32]+ }+ | -- | The list of favorite stickers was updated + UpdateFavoriteStickers+ { -- | The new list of file identifiers of favorite stickers+ stickerIds :: [I32]+ }+ | -- | The list of saved animations was updated + UpdateSavedAnimations+ { -- | The new list of file identifiers of saved animations+ animationIds :: [I32]+ }+ | -- | The selected background has changed + UpdateSelectedBackground+ { -- | True, if background for dark theme has changed + forDarkTheme :: Bool,+ -- | The new selected background; may be null+ background :: (Maybe) (Background)+ }+ | -- | Some language pack strings have been updated + UpdateLanguagePackStrings+ { -- | Localization target to which the language pack belongs + localizationTarget :: T,+ -- | Identifier of the updated language pack + languagePackId :: T,+ -- | List of changed language pack strings+ strings :: [LanguagePackString]+ }+ | -- | The connection state has changed + UpdateConnectionState+ { -- | The new connection state+ state :: ConnectionState+ }+ | -- | New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update" + UpdateTermsOfService+ { -- | Identifier of the terms of service + termsOfServiceId :: T,+ -- | The new terms of service+ termsOfService :: TermsOfService+ }+ | -- | The list of users nearby has changed. The update is sent only 60 seconds after a successful searchChatsNearby request + UpdateUsersNearby+ { -- | The new list of users nearby+ usersNearby :: [ChatNearby]+ }+ | -- | The list of supported dice emojis has changed + UpdateDiceEmojis+ { -- | The new list of supported dice emojis+ emojis :: [T]+ }+ | -- | The parameters of animation search through GetOption("animation_search_bot_username") bot has changed + UpdateAnimationSearchParameters+ { -- | Name of the animation search provider + provider :: T,+ -- | The new list of emojis suggested for searching+ emojis :: [T]+ }+ | -- | A new incoming inline query; for bots only + UpdateNewInlineQuery+ { -- | Unique query identifier + id :: I64,+ -- | Identifier of the user who sent the query + senderUserId :: I32,+ -- | User location, provided by the client; may be null+ userLocation :: (Maybe) (Location),+ -- | Text of the query + query :: T,+ -- | Offset of the first entry to return+ offset :: T+ }+ | -- | The user has chosen a result of an inline query; for bots only + UpdateNewChosenInlineResult+ { -- | Identifier of the user who sent the query + senderUserId :: I32,+ -- | User location, provided by the client; may be null+ userLocation :: (Maybe) (Location),+ -- | Text of the query + query :: T,+ -- | Identifier of the chosen result + resultId :: T,+ -- | Identifier of the sent inline message, if known+ inlineMessageId :: T+ }+ | -- | A new incoming callback query; for bots only + UpdateNewCallbackQuery+ { -- | Unique query identifier + id :: I64,+ -- | Identifier of the user who sent the query+ senderUserId :: I32,+ -- | Identifier of the chat where the query was sent + chatId :: I53,+ -- | Identifier of the message, from which the query originated+ messageId :: I53,+ -- | Identifier that uniquely corresponds to the chat to which the message was sent + chatInstance :: I64,+ -- | Query payload+ payload :: CallbackQueryPayload+ }+ | -- | A new incoming callback query from a message sent via a bot; for bots only + UpdateNewInlineCallbackQuery+ { -- | Unique query identifier + id :: I64,+ -- | Identifier of the user who sent the query + senderUserId :: I32,+ -- | Identifier of the inline message, from which the query originated+ inlineMessageId :: T,+ -- | An identifier uniquely corresponding to the chat a message was sent to + chatInstance :: I64,+ -- | Query payload+ payload :: CallbackQueryPayload+ }+ | -- | A new incoming shipping query; for bots only. Only for invoices with flexible price + UpdateNewShippingQuery+ { -- | Unique query identifier + id :: I64,+ -- | Identifier of the user who sent the query + senderUserId :: I32,+ -- | Invoice payload + invoicePayload_2 :: T,+ -- | User shipping address+ shippingAddress :: Address+ }+ | -- | A new incoming pre-checkout query; for bots only. Contains full information about a checkout + UpdateNewPreCheckoutQuery+ { -- | Unique query identifier + id :: I64,+ -- | Identifier of the user who sent the query + senderUserId :: I32,+ -- | Currency for the product price + currency :: T,+ -- | Total price for the product, in the minimal quantity of the currency+ totalAmount :: I53,+ -- | Invoice payload + invoicePayload :: ByteString64,+ -- | Identifier of a shipping option chosen by the user; may be empty if not applicable + shippingOptionId :: T,+ -- | Information about the order; may be null+ orderInfo :: (Maybe) (OrderInfo)+ }+ | -- | A new incoming event; for bots only + UpdateNewCustomEvent+ { -- | A JSON-serialized event+ event :: T+ }+ | -- | A new incoming query; for bots only + UpdateNewCustomQuery+ { -- | The query identifier + id :: I64,+ -- | JSON-serialized query data + data_ :: T,+ -- | Query timeout+ timeout :: I32+ }+ | -- | A poll was updated; for bots only + UpdatePoll+ { -- | New data about the poll+ poll :: Poll+ }+ | -- | A user changed the answer to a poll; for bots only + UpdatePollAnswer+ { -- | Unique poll identifier + pollId :: I64,+ -- | The user, who changed the answer to the poll + userId :: I32,+ -- | 0-based identifiers of answer options, chosen by the user+ optionIds :: [I32]+ }+ deriving (Show, Eq, Generic)+data Updates+ = -- | Contains a list of updates + Updates+ { -- | List of updates+ updates :: [Update]+ }+ deriving (Show, Eq, Generic)+-- | Describes a stream to which TDLib internal log is written+data LogStream+ = -- | The log is written to stderr or an OS specific log+ LogStreamDefault+ { + }+ | -- | The log is written to a file + LogStreamFile+ { -- | Path to the file to where the internal TDLib log will be written + path :: T,+ -- | The maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated+ maxFileSize :: I53+ }+ | -- | The log is written nowhere+ LogStreamEmpty+ { + }+ deriving (Show, Eq, Generic)+data LogVerbosityLevel+ = -- | Contains a TDLib internal log verbosity level + LogVerbosityLevel+ { -- | Log verbosity level+ verbosityLevel :: I32 } deriving (Show, Eq, Generic) data LogTags
src/TDLib/Types.hs view
@@ -1,1 +1,35 @@-module TDLib.Types where+module TDLib.Types+ ( Error,+ Ok,+ TdlibParameters,+ Update,++ -- * Messages+ Message,+ Messages,+ FoundMessages,+ DraftMessage,++ -- * Users+ User,+ Users,+ UserType,+ UserFullInfo,+ UserProfilePhoto,+ UserProfilePhotos,++ -- * Chats+ Chat,+ ChatType,+ ChatMember,+ ChatMembers,+ BasicGroup,+ BasicGroupFullInfo,+ Supergroup,+ SupergroupFullInfo,+ SecretChat,+ SecretChatState,+ )+where++import TDLib.Generated
tdlib-types.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.33.1. -- -- see: https://github.com/sol/hpack ----- hash: 1ca0e2000f7de35c5e367b05c3bfa83906966dcd7075f37c2c521520bfd338b1+-- hash: 23ca342a7411feee35f210110fe3721bfb1b4a681a6507ad771da982eadadb33 name: tdlib-types-version: 0.3.0+version: 0.4.0 synopsis: Types and Functions generated from tdlib api spec description: Please see the README on GitHub at <https://github.com/poscat0x04/tdlib-types#readme> category: Web@@ -31,6 +31,7 @@ library exposed-modules: TDLib.Effect+ TDLib.Generated TDLib.Generated.FunArgs TDLib.Generated.Functions TDLib.Generated.Types@@ -50,7 +51,7 @@ , language-tl >=0.1.0 && <0.2 , polysemy >=1.3.0.0 && <1.4 , polysemy-plugin >=0.2.5.0 && <0.3- , tdlib-gen >=0.2.0 && <0.3+ , tdlib-gen >=0.4.0 && <0.5 , text default-language: Haskell2010 @@ -71,7 +72,7 @@ , language-tl >=0.1.0 && <0.2 , polysemy >=1.3.0.0 && <1.4 , polysemy-plugin >=0.2.5.0 && <0.3- , tdlib-gen >=0.2.0 && <0.3+ , tdlib-gen >=0.4.0 && <0.5 , tdlib-types , text default-language: Haskell2010