From 436e7d35ee3a30ce688087ba85f0ebaf0b908a34 Mon Sep 17 00:00:00 2001 From: Nikolay Matyushin Date: Fri, 19 Apr 2024 14:58:09 +0400 Subject: [PATCH] Update Bot API to 7.2 --- README.md | 2 +- src/Funogram.Generator/out/methods.json | 266 ++++++++-- src/Funogram.Generator/out/types.json | 548 ++++++++++++++++++-- src/Funogram.Telegram/Directory.Build.props | 2 +- src/Funogram.Telegram/RequestsTypes.fs | 232 ++++++--- src/Funogram.Telegram/Types.fs | 394 +++++++++++--- src/Funogram.Tests/Constants.fs | 2 +- 7 files changed, 1209 insertions(+), 237 deletions(-) diff --git a/README.md b/README.md index 219f60e..5d6dc9f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![.NET Core](https://github.com/Dolfik1/Funogram/workflows/.NET/badge.svg) [![NuGet](https://img.shields.io/nuget/v/Funogram.svg)](https://www.nuget.org/packages/Funogram/) [![NuGet](https://img.shields.io/nuget/v/Funogram.Telegram.svg)](https://www.nuget.org/packages/Funogram.Telegram/) -[![NuGet](https://img.shields.io/badge/Bot%20API-7.0-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/) +[![NuGet](https://img.shields.io/badge/Bot%20API-7.2-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/) Funogram Logo diff --git a/src/Funogram.Generator/out/methods.json b/src/Funogram.Generator/out/methods.json index 8870634..22d1df4 100644 --- a/src/Funogram.Generator/out/methods.json +++ b/src/Funogram.Generator/out/methods.json @@ -159,6 +159,14 @@ "ConvertedName": "SendMessage", "Description": "Use this method to send text messages. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -234,7 +242,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -332,7 +340,7 @@ { "OriginalName": "message_ids", "ConvertedName": "MessageIds", - "Description": "Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.", + "Description": "A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.", "OriginalFieldType": "Array of Integer", "ConvertedFieldType": "int64[]", "Optional": false @@ -486,7 +494,7 @@ { "OriginalName": "message_ids", "ConvertedName": "MessageIds", - "Description": "Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.", + "Description": "A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.", "OriginalFieldType": "Array of Integer", "ConvertedFieldType": "int64[]", "Optional": false @@ -524,6 +532,14 @@ "ConvertedName": "SendPhoto", "Description": "Use this method to send photos. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -607,7 +623,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -621,6 +637,14 @@ "ConvertedName": "SendAudio", "Description": "Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -728,7 +752,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -742,6 +766,14 @@ "ConvertedName": "SendDocument", "Description": "Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -833,7 +865,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -847,6 +879,14 @@ "ConvertedName": "SendVideo", "Description": "Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -970,7 +1010,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -984,6 +1024,14 @@ "ConvertedName": "SendAnimation", "Description": "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1099,7 +1147,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1113,6 +1161,14 @@ "ConvertedName": "SendVoice", "Description": "Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1196,7 +1252,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1210,6 +1266,14 @@ "ConvertedName": "SendVideoNote", "Description": "As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1285,7 +1349,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1299,6 +1363,14 @@ "ConvertedName": "SendMediaGroup", "Description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1356,6 +1428,14 @@ "ConvertedName": "SendLocation", "Description": "Use this method to send point on the map. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1447,7 +1527,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1461,6 +1541,14 @@ "ConvertedName": "SendVenue", "Description": "Use this method to send information about a venue. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1568,7 +1656,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1582,6 +1670,14 @@ "ConvertedName": "SendContact", "Description": "Use this method to send phone contacts. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1657,7 +1753,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1671,6 +1767,14 @@ "ConvertedName": "SendPoll", "Description": "Use this method to send a native poll. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1810,7 +1914,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1824,6 +1928,14 @@ "ConvertedName": "SendDice", "Description": "Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1875,7 +1987,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1889,6 +2001,14 @@ "ConvertedName": "SendChatAction", "Description": "Use this method when you need to tell the user that something is happening on the bot\u0027s side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the action will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -1900,7 +2020,7 @@ { "OriginalName": "message_thread_id", "ConvertedName": "MessageThreadId", - "Description": "Unique identifier for the target message thread; supergroups only", + "Description": "Unique identifier for the target message thread; for supergroups only", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -1941,7 +2061,7 @@ { "OriginalName": "reaction", "ConvertedName": "Reaction", - "Description": "New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", + "Description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", "OriginalFieldType": "Array of ReactionType", "ConvertedFieldType": "ReactionType[]", "Optional": true @@ -2243,7 +2363,7 @@ { "OriginalName": "can_post_messages", "ConvertedName": "CanPostMessages", - "Description": "Pass True if the administrator can post messages in the channel, or access channel statistics; channels only", + "Description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -2251,7 +2371,7 @@ { "OriginalName": "can_edit_messages", "ConvertedName": "CanEditMessages", - "Description": "Pass True if the administrator can edit messages of other users and can pin messages; channels only", + "Description": "Pass True if the administrator can edit messages of other users and can pin messages; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -2259,7 +2379,7 @@ { "OriginalName": "can_pin_messages", "ConvertedName": "CanPinMessages", - "Description": "Pass True if the administrator can pin messages, supergroups only", + "Description": "Pass True if the administrator can pin messages; for supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -2267,7 +2387,7 @@ { "OriginalName": "can_manage_topics", "ConvertedName": "CanManageTopics", - "Description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only", + "Description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -3266,6 +3386,23 @@ "OriginalReturnType": "UserChatBoosts", "ConvertedReturnType": "UserChatBoosts" }, + { + "OriginalName": "getBusinessConnection", + "ConvertedName": "GetBusinessConnection", + "Description": "Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.", + "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ], + "OriginalReturnType": "BusinessConnection", + "ConvertedReturnType": "BusinessConnection" + }, { "OriginalName": "setMyCommands", "ConvertedName": "SetMyCommands", @@ -3983,7 +4120,7 @@ { "OriginalName": "message_ids", "ConvertedName": "MessageIds", - "Description": "Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted", + "Description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted", "OriginalFieldType": "Array of Integer", "ConvertedFieldType": "int64[]", "Optional": false @@ -3997,6 +4134,14 @@ "ConvertedName": "SendSticker", "Description": "Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -4016,7 +4161,7 @@ { "OriginalName": "sticker", "ConvertedName": "Sticker", - "Description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files \u00BB. Video stickers can only be sent by a file_id. Animated stickers can\u0027t be sent via an HTTP URL.", + "Description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. More information on Sending Files \u00BB. Video and animated stickers can\u0027t be sent via an HTTP URL.", "OriginalFieldType": "InputFile or String", "ConvertedFieldType": "InputFile", "Optional": false @@ -4056,7 +4201,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -4090,7 +4235,7 @@ { "OriginalName": "custom_emoji_ids", "ConvertedName": "CustomEmojiIds", - "Description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "Description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", "OriginalFieldType": "Array of String", "ConvertedFieldType": "string[]", "Optional": false @@ -4102,7 +4247,7 @@ { "OriginalName": "uploadStickerFile", "ConvertedName": "UploadStickerFile", - "Description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.", + "Description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.", "Fields": [ { "OriginalName": "user_id", @@ -4169,14 +4314,6 @@ "ConvertedFieldType": "InputSticker[]", "Optional": false }, - { - "OriginalName": "sticker_format", - "ConvertedName": "StickerFormat", - "Description": "Format of stickers in the set, must be one of \u201Cstatic\u201D, \u201Canimated\u201D, \u201Cvideo\u201D", - "OriginalFieldType": "String", - "ConvertedFieldType": "string", - "Optional": false - }, { "OriginalName": "sticker_type", "ConvertedName": "StickerType", @@ -4200,7 +4337,7 @@ { "OriginalName": "addStickerToSet", "ConvertedName": "AddStickerToSet", - "Description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.", + "Description": "Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success.", "Fields": [ { "OriginalName": "user_id", @@ -4272,6 +4409,47 @@ "OriginalReturnType": "True", "ConvertedReturnType": "bool" }, + { + "OriginalName": "replaceStickerInSet", + "ConvertedName": "ReplaceStickerInSet", + "Description": "Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.", + "Fields": [ + { + "OriginalName": "user_id", + "ConvertedName": "UserId", + "Description": "User identifier of the sticker set owner", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "name", + "ConvertedName": "Name", + "Description": "Sticker set name", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "old_sticker", + "ConvertedName": "OldSticker", + "Description": "File identifier of the replaced sticker", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "sticker", + "ConvertedName": "Sticker", + "Description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.", + "OriginalFieldType": "InputSticker", + "ConvertedFieldType": "InputSticker", + "Optional": false + } + ], + "OriginalReturnType": "True", + "ConvertedReturnType": "bool" + }, { "OriginalName": "setStickerEmojiList", "ConvertedName": "SetStickerEmojiList", @@ -4400,6 +4578,14 @@ "OriginalFieldType": "InputFile or String", "ConvertedFieldType": "InputFile", "Optional": true + }, + { + "OriginalName": "format", + "ConvertedName": "Format", + "Description": "Format of the thumbnail, must be one of \u201Cstatic\u201D for a .WEBP or .PNG image, \u201Canimated\u201D for a .TGS animation, or \u201Cvideo\u201D for a WEBM video", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false } ], "OriginalReturnType": "True", @@ -5027,6 +5213,14 @@ "ConvertedName": "SendGame", "Description": "Use this method to send a game. On success, the sent Message is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -5078,7 +5272,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "A JSON-serialized object for an inline keyboard. If empty, one \u0027Play game_title\u0027 button will be shown. If not empty, the first button must launch the game.", + "Description": "A JSON-serialized object for an inline keyboard. If empty, one \u0027Play game_title\u0027 button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.", "OriginalFieldType": "InlineKeyboardMarkup", "ConvertedFieldType": "InlineKeyboardMarkup", "Optional": true diff --git a/src/Funogram.Generator/out/types.json b/src/Funogram.Generator/out/types.json index 1991ea1..09f5672 100644 --- a/src/Funogram.Generator/out/types.json +++ b/src/Funogram.Generator/out/types.json @@ -46,6 +46,38 @@ "ConvertedFieldType": "Message", "Optional": true }, + { + "OriginalName": "business_connection", + "ConvertedName": "BusinessConnection", + "Description": "The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot", + "OriginalFieldType": "BusinessConnection", + "ConvertedFieldType": "BusinessConnection", + "Optional": true + }, + { + "OriginalName": "business_message", + "ConvertedName": "BusinessMessage", + "Description": "New non-service message from a connected business account", + "OriginalFieldType": "Message", + "ConvertedFieldType": "Message", + "Optional": true + }, + { + "OriginalName": "edited_business_message", + "ConvertedName": "EditedBusinessMessage", + "Description": "New version of a message from a connected business account", + "OriginalFieldType": "Message", + "ConvertedFieldType": "Message", + "Optional": true + }, + { + "OriginalName": "deleted_business_messages", + "ConvertedName": "DeletedBusinessMessages", + "Description": "Messages were deleted from a connected business account", + "OriginalFieldType": "BusinessMessagesDeleted", + "ConvertedFieldType": "BusinessMessagesDeleted", + "Optional": true + }, { "OriginalName": "message_reaction", "ConvertedName": "MessageReaction", @@ -339,6 +371,14 @@ "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true + }, + { + "OriginalName": "can_connect_to_business", + "ConvertedName": "CanConnectToBusiness", + "Description": "True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true } ] ] @@ -423,6 +463,46 @@ "ConvertedFieldType": "string[]", "Optional": true }, + { + "OriginalName": "birthdate", + "ConvertedName": "Birthdate", + "Description": "For private chats, the date of birth of the user. Returned only in getChat.", + "OriginalFieldType": "Birthdate", + "ConvertedFieldType": "Birthdate", + "Optional": true + }, + { + "OriginalName": "business_intro", + "ConvertedName": "BusinessIntro", + "Description": "For private chats with business accounts, the intro of the business. Returned only in getChat.", + "OriginalFieldType": "BusinessIntro", + "ConvertedFieldType": "BusinessIntro", + "Optional": true + }, + { + "OriginalName": "business_location", + "ConvertedName": "BusinessLocation", + "Description": "For private chats with business accounts, the location of the business. Returned only in getChat.", + "OriginalFieldType": "BusinessLocation", + "ConvertedFieldType": "BusinessLocation", + "Optional": true + }, + { + "OriginalName": "business_opening_hours", + "ConvertedName": "BusinessOpeningHours", + "Description": "For private chats with business accounts, the opening hours of the business. Returned only in getChat.", + "OriginalFieldType": "BusinessOpeningHours", + "ConvertedFieldType": "BusinessOpeningHours", + "Optional": true + }, + { + "OriginalName": "personal_chat", + "ConvertedName": "PersonalChat", + "Description": "For private chats, the personal channel of the user. Returned only in getChat.", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": true + }, { "OriginalName": "available_reactions", "ConvertedName": "AvailableReactions", @@ -698,6 +778,14 @@ "ConvertedFieldType": "int64", "Optional": true }, + { + "OriginalName": "sender_business_bot", + "ConvertedName": "SenderBusinessBot", + "Description": "The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": true + }, { "OriginalName": "date", "ConvertedName": "Date", @@ -706,6 +794,14 @@ "ConvertedFieldType": "DateTime", "Optional": false }, + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat", "ConvertedName": "Chat", @@ -794,6 +890,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "is_from_offline", + "ConvertedName": "IsFromOffline", + "Description": "True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "media_group_id", "ConvertedName": "MediaGroupId", @@ -1674,7 +1778,7 @@ { "OriginalName": "chat_id", "ConvertedName": "ChatId", - "Description": "If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername)", + "Description": "If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account.", "OriginalFieldType": "Integer or String", "ConvertedFieldType": "ChatId", "Optional": true @@ -1682,7 +1786,7 @@ { "OriginalName": "allow_sending_without_reply", "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.", + "Description": "Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -2989,6 +3093,57 @@ "Case": "Stub" } }, + { + "Name": "SharedUser", + "Description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "user_id", + "ConvertedName": "UserId", + "Description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "first_name", + "ConvertedName": "FirstName", + "Description": "First name of the user, if the name was requested by the bot", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "last_name", + "ConvertedName": "LastName", + "Description": "Last name of the user, if the name was requested by the bot", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "username", + "ConvertedName": "Username", + "Description": "Username of the user, if the username was requested by the bot", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "photo", + "ConvertedName": "Photo", + "Description": "Available sizes of the chat photo, if the photo was requested by the bot", + "OriginalFieldType": "Array of PhotoSize", + "ConvertedFieldType": "PhotoSize[]", + "Optional": true + } + ] + ] + } + }, { "Name": "UsersShared", "Description": "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.", @@ -3005,11 +3160,11 @@ "Optional": false }, { - "OriginalName": "user_ids", - "ConvertedName": "UserIds", - "Description": "Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.", - "OriginalFieldType": "Array of Integer", - "ConvertedFieldType": "int64[]", + "OriginalName": "users", + "ConvertedName": "Users", + "Description": "Information about users shared with the bot.", + "OriginalFieldType": "Array of SharedUser", + "ConvertedFieldType": "SharedUser[]", "Optional": false } ] @@ -3018,7 +3173,7 @@ }, { "Name": "ChatShared", - "Description": "This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.", + "Description": "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.", "Kind": { "Case": "Fields", "Fields": [ @@ -3038,6 +3193,30 @@ "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false + }, + { + "OriginalName": "title", + "ConvertedName": "Title", + "Description": "Title of the chat, if the title was requested by the bot.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "username", + "ConvertedName": "Username", + "Description": "Username of the chat, if the username was requested by the bot and available.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "photo", + "ConvertedName": "Photo", + "Description": "Available sizes of the chat photo, if the photo was requested by the bot", + "OriginalFieldType": "Array of PhotoSize", + "ConvertedFieldType": "PhotoSize[]", + "Optional": true } ] ] @@ -3626,7 +3805,7 @@ }, { "Name": "KeyboardButtonRequestUsers", - "Description": "This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users \u00BB", + "Description": "This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users \u00BB", "Kind": { "Case": "Fields", "Fields": [ @@ -3662,6 +3841,30 @@ "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true + }, + { + "OriginalName": "request_name", + "ConvertedName": "RequestName", + "Description": "Pass True to request the users\u0027 first and last name", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "request_username", + "ConvertedName": "RequestUsername", + "Description": "Pass True to request the users\u0027 username", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "request_photo", + "ConvertedName": "RequestPhoto", + "Description": "Pass True to request the users\u0027 photo", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true } ] ] @@ -3669,7 +3872,7 @@ }, { "Name": "KeyboardButtonRequestChat", - "Description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats \u00BB", + "Description": "This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the \u0441hat if appropriate More about requesting chats \u00BB", "Kind": { "Case": "Fields", "Fields": [ @@ -3737,6 +3940,30 @@ "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true + }, + { + "OriginalName": "request_title", + "ConvertedName": "RequestTitle", + "Description": "Pass True to request the chat\u0027s title", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "request_username", + "ConvertedName": "RequestUsername", + "Description": "Pass True to request the chat\u0027s username", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "request_photo", + "ConvertedName": "RequestPhoto", + "Description": "Pass True to request the chat\u0027s photo", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true } ] ] @@ -4318,7 +4545,7 @@ { "OriginalName": "can_post_messages", "ConvertedName": "CanPostMessages", - "Description": "True, if the administrator can post messages in the channel, or access channel statistics; channels only", + "Description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4326,7 +4553,7 @@ { "OriginalName": "can_edit_messages", "ConvertedName": "CanEditMessages", - "Description": "True, if the administrator can edit messages of other users and can pin messages; channels only", + "Description": "True, if the administrator can edit messages of other users and can pin messages; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4334,7 +4561,7 @@ { "OriginalName": "can_pin_messages", "ConvertedName": "CanPinMessages", - "Description": "True, if the user is allowed to pin messages; groups and supergroups only", + "Description": "True, if the user is allowed to pin messages; for groups and supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4342,7 +4569,7 @@ { "OriginalName": "can_manage_topics", "ConvertedName": "CanManageTopics", - "Description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "Description": "True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4626,7 +4853,7 @@ { "OriginalName": "can_post_messages", "ConvertedName": "CanPostMessages", - "Description": "True, if the administrator can post messages in the channel, or access channel statistics; channels only", + "Description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4634,7 +4861,7 @@ { "OriginalName": "can_edit_messages", "ConvertedName": "CanEditMessages", - "Description": "True, if the administrator can edit messages of other users and can pin messages; channels only", + "Description": "True, if the administrator can edit messages of other users and can pin messages; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4642,7 +4869,7 @@ { "OriginalName": "can_pin_messages", "ConvertedName": "CanPinMessages", - "Description": "True, if the user is allowed to pin messages; groups and supergroups only", + "Description": "True, if the user is allowed to pin messages; for groups and supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4650,7 +4877,7 @@ { "OriginalName": "can_manage_topics", "ConvertedName": "CanManageTopics", - "Description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "Description": "True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5101,6 +5328,157 @@ ] } }, + { + "Name": "Birthdate", + "Description": "", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "day", + "ConvertedName": "Day", + "Description": "Day of the user\u0027s birth; 1-31", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "month", + "ConvertedName": "Month", + "Description": "Month of the user\u0027s birth; 1-12", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "year", + "ConvertedName": "Year", + "Description": "Year of the user\u0027s birth", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ] + ] + } + }, + { + "Name": "BusinessIntro", + "Description": "", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "title", + "ConvertedName": "Title", + "Description": "Title text of the business intro", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "message", + "ConvertedName": "Message", + "Description": "Message text of the business intro", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "sticker", + "ConvertedName": "Sticker", + "Description": "Sticker of the business intro", + "OriginalFieldType": "Sticker", + "ConvertedFieldType": "Sticker", + "Optional": true + } + ] + ] + } + }, + { + "Name": "BusinessLocation", + "Description": "", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "address", + "ConvertedName": "Address", + "Description": "Address of the business", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "location", + "ConvertedName": "Location", + "Description": "Location of the business", + "OriginalFieldType": "Location", + "ConvertedFieldType": "Location", + "Optional": true + } + ] + ] + } + }, + { + "Name": "BusinessOpeningHoursInterval", + "Description": "", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "opening_minute", + "ConvertedName": "OpeningMinute", + "Description": "The minute\u0027s sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "closing_minute", + "ConvertedName": "ClosingMinute", + "Description": "The minute\u0027s sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + } + ] + ] + } + }, + { + "Name": "BusinessOpeningHours", + "Description": "", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "time_zone_name", + "ConvertedName": "TimeZoneName", + "Description": "Unique name of the time zone for which the opening hours are defined", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "opening_hours", + "ConvertedName": "OpeningHours", + "Description": "List of time intervals describing business opening hours", + "OriginalFieldType": "Array of BusinessOpeningHoursInterval", + "ConvertedFieldType": "BusinessOpeningHoursInterval[]", + "Optional": false + } + ] + ] + } + }, { "Name": "ChatLocation", "Description": "Represents a location to which a chat is connected.", @@ -6017,6 +6395,100 @@ ] } }, + { + "Name": "BusinessConnection", + "Description": "Describes the connection of the bot with a business account.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "id", + "ConvertedName": "Id", + "Description": "Unique identifier of the business connection", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "user", + "ConvertedName": "User", + "Description": "Business account user that created the business connection", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": false + }, + { + "OriginalName": "user_chat_id", + "ConvertedName": "UserChatId", + "Description": "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date the connection was established in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "can_reply", + "ConvertedName": "CanReply", + "Description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": false + }, + { + "OriginalName": "is_enabled", + "ConvertedName": "IsEnabled", + "Description": "True, if the connection is active", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": false + } + ] + ] + } + }, + { + "Name": "BusinessMessagesDeleted", + "Description": "This object is received when messages are deleted from a connected business account.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "message_ids", + "ConvertedName": "MessageIds", + "Description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account", + "OriginalFieldType": "Array of Integer", + "ConvertedFieldType": "int64[]", + "Optional": false + } + ] + ] + } + }, { "Name": "ResponseParameters", "Description": "Describes why a request was unsuccessful.", @@ -6643,22 +7115,6 @@ "ConvertedFieldType": "string", "Optional": false }, - { - "OriginalName": "is_animated", - "ConvertedName": "IsAnimated", - "Description": "True, if the sticker set contains animated stickers", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", - "Optional": false - }, - { - "OriginalName": "is_video", - "ConvertedName": "IsVideo", - "Description": "True, if the sticker set contains video stickers", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", - "Optional": false - }, { "OriginalName": "stickers", "ConvertedName": "Stickers", @@ -6737,6 +7193,14 @@ "ConvertedFieldType": "InputFile", "Optional": false }, + { + "OriginalName": "format", + "ConvertedName": "Format", + "Description": "Format of the added sticker, must be one of \u201Cstatic\u201D for a .WEBP or .PNG image, \u201Canimated\u201D for a .TGS animation, \u201Cvideo\u201D for a WEBM video", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, { "OriginalName": "emoji_list", "ConvertedName": "EmojiList", @@ -9870,7 +10334,7 @@ { "OriginalName": "data", "ConvertedName": "Data", - "Description": "Base64-encoded encrypted Telegram Passport element data provided by the user, available for \u201Cpersonal_details\u201D, \u201Cpassport\u201D, \u201Cdriver_license\u201D, \u201Cidentity_card\u201D, \u201Cinternal_passport\u201D and \u201Caddress\u201D types. Can be decrypted and verified using the accompanying EncryptedCredentials.", + "Description": "Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \u201Cpersonal_details\u201D, \u201Cpassport\u201D, \u201Cdriver_license\u201D, \u201Cidentity_card\u201D, \u201Cinternal_passport\u201D and \u201Caddress\u201D types. Can be decrypted and verified using the accompanying EncryptedCredentials.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -9878,7 +10342,7 @@ { "OriginalName": "phone_number", "ConvertedName": "PhoneNumber", - "Description": "User\u0027s verified phone number, available only for \u201Cphone_number\u201D type", + "Description": "User\u0027s verified phone number; available only for \u201Cphone_number\u201D type", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -9886,7 +10350,7 @@ { "OriginalName": "email", "ConvertedName": "Email", - "Description": "User\u0027s verified email address, available only for \u201Cemail\u201D type", + "Description": "User\u0027s verified email address; available only for \u201Cemail\u201D type", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -9894,7 +10358,7 @@ { "OriginalName": "files", "ConvertedName": "Files", - "Description": "Array of encrypted files with documents provided by the user, available for \u201Cutility_bill\u201D, \u201Cbank_statement\u201D, \u201Crental_agreement\u201D, \u201Cpassport_registration\u201D and \u201Ctemporary_registration\u201D types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "Description": "Array of encrypted files with documents provided by the user; available only for \u201Cutility_bill\u201D, \u201Cbank_statement\u201D, \u201Crental_agreement\u201D, \u201Cpassport_registration\u201D and \u201Ctemporary_registration\u201D types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", "OriginalFieldType": "Array of PassportFile", "ConvertedFieldType": "PassportFile[]", "Optional": true @@ -9902,7 +10366,7 @@ { "OriginalName": "front_side", "ConvertedName": "FrontSide", - "Description": "Encrypted file with the front side of the document, provided by the user. Available for \u201Cpassport\u201D, \u201Cdriver_license\u201D, \u201Cidentity_card\u201D and \u201Cinternal_passport\u201D. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "Description": "Encrypted file with the front side of the document, provided by the user; available only for \u201Cpassport\u201D, \u201Cdriver_license\u201D, \u201Cidentity_card\u201D and \u201Cinternal_passport\u201D. The file can be decrypted and verified using the accompanying EncryptedCredentials.", "OriginalFieldType": "PassportFile", "ConvertedFieldType": "PassportFile", "Optional": true @@ -9910,7 +10374,7 @@ { "OriginalName": "reverse_side", "ConvertedName": "ReverseSide", - "Description": "Encrypted file with the reverse side of the document, provided by the user. Available for \u201Cdriver_license\u201D and \u201Cidentity_card\u201D. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "Description": "Encrypted file with the reverse side of the document, provided by the user; available only for \u201Cdriver_license\u201D and \u201Cidentity_card\u201D. The file can be decrypted and verified using the accompanying EncryptedCredentials.", "OriginalFieldType": "PassportFile", "ConvertedFieldType": "PassportFile", "Optional": true @@ -9918,7 +10382,7 @@ { "OriginalName": "selfie", "ConvertedName": "Selfie", - "Description": "Encrypted file with the selfie of the user holding a document, provided by the user; available for \u201Cpassport\u201D, \u201Cdriver_license\u201D, \u201Cidentity_card\u201D and \u201Cinternal_passport\u201D. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "Description": "Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \u201Cpassport\u201D, \u201Cdriver_license\u201D, \u201Cidentity_card\u201D and \u201Cinternal_passport\u201D. The file can be decrypted and verified using the accompanying EncryptedCredentials.", "OriginalFieldType": "PassportFile", "ConvertedFieldType": "PassportFile", "Optional": true @@ -9926,7 +10390,7 @@ { "OriginalName": "translation", "ConvertedName": "Translation", - "Description": "Array of encrypted files with translated versions of documents provided by the user. Available if requested for \u201Cpassport\u201D, \u201Cdriver_license\u201D, \u201Cidentity_card\u201D, \u201Cinternal_passport\u201D, \u201Cutility_bill\u201D, \u201Cbank_statement\u201D, \u201Crental_agreement\u201D, \u201Cpassport_registration\u201D and \u201Ctemporary_registration\u201D types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "Description": "Array of encrypted files with translated versions of documents provided by the user; available if requested for \u201Cpassport\u201D, \u201Cdriver_license\u201D, \u201Cidentity_card\u201D, \u201Cinternal_passport\u201D, \u201Cutility_bill\u201D, \u201Cbank_statement\u201D, \u201Crental_agreement\u201D, \u201Cpassport_registration\u201D and \u201Ctemporary_registration\u201D types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", "OriginalFieldType": "Array of PassportFile", "ConvertedFieldType": "PassportFile[]", "Optional": true diff --git a/src/Funogram.Telegram/Directory.Build.props b/src/Funogram.Telegram/Directory.Build.props index 4a9e755..0125c90 100644 --- a/src/Funogram.Telegram/Directory.Build.props +++ b/src/Funogram.Telegram/Directory.Build.props @@ -1,6 +1,6 @@ - 7.1.0 + 7.2.0 Nikolay Matyushin Funogram.Telegram Funogram.Telegram diff --git a/src/Funogram.Telegram/RequestsTypes.fs b/src/Funogram.Telegram/RequestsTypes.fs index 9bcec38..42fd0f4 100644 --- a/src/Funogram.Telegram/RequestsTypes.fs +++ b/src/Funogram.Telegram/RequestsTypes.fs @@ -78,6 +78,7 @@ type Close() = type SendMessage = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Text: string @@ -89,8 +90,9 @@ type SendMessage = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Text = text @@ -102,10 +104,10 @@ type SendMessage = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendMessage.Make(ChatId.Int chatId, text, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendMessage.Make(ChatId.String chatId, text, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendMessage.Make(ChatId.Int chatId, text, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendMessage.Make(ChatId.String chatId, text, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendMessage" @@ -223,6 +225,7 @@ type CopyMessages = type SendPhoto = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Photo: InputFile @@ -235,8 +238,9 @@ type SendPhoto = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, photo: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Photo = photo @@ -249,15 +253,16 @@ type SendPhoto = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, photo: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendPhoto.Make(ChatId.Int chatId, photo, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, photo: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendPhoto.Make(ChatId.String chatId, photo, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendPhoto.Make(ChatId.Int chatId, photo, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendPhoto.Make(ChatId.String chatId, photo, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendPhoto" type SendAudio = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Audio: InputFile @@ -273,8 +278,9 @@ type SendAudio = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, audio: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Audio = audio @@ -290,15 +296,16 @@ type SendAudio = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, audio: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendAudio.Make(ChatId.Int chatId, audio, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, audio: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendAudio.Make(ChatId.String chatId, audio, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendAudio.Make(ChatId.Int chatId, audio, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendAudio.Make(ChatId.String chatId, audio, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendAudio" type SendDocument = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Document: InputFile @@ -312,8 +319,9 @@ type SendDocument = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, document: InputFile, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Document = document @@ -327,15 +335,16 @@ type SendDocument = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, document: InputFile, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendDocument.Make(ChatId.Int chatId, document, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, document: InputFile, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendDocument.Make(ChatId.String chatId, document, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDocument.Make(ChatId.Int chatId, document, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDocument.Make(ChatId.String chatId, document, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendDocument" type SendVideo = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Video: InputFile @@ -353,8 +362,9 @@ type SendVideo = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, video: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?supportsStreaming: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, video: InputFile, ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Video = video @@ -372,15 +382,16 @@ type SendVideo = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, video: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?supportsStreaming: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVideo.Make(ChatId.Int chatId, video, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?supportsStreaming = supportsStreaming, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, video: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?supportsStreaming: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVideo.Make(ChatId.String chatId, video, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?supportsStreaming = supportsStreaming, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, video: InputFile, ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideo.Make(ChatId.Int chatId, video, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?supportsStreaming = supportsStreaming, ?hasSpoiler = hasSpoiler, ?captionEntities = captionEntities, ?parseMode = parseMode, ?caption = caption, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, video: InputFile, ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideo.Make(ChatId.String chatId, video, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?supportsStreaming = supportsStreaming, ?hasSpoiler = hasSpoiler, ?captionEntities = captionEntities, ?parseMode = parseMode, ?caption = caption, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVideo" type SendAnimation = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Animation: InputFile @@ -397,8 +408,9 @@ type SendAnimation = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, animation: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, animation: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Animation = animation @@ -415,15 +427,16 @@ type SendAnimation = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, animation: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendAnimation.Make(ChatId.Int chatId, animation, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, animation: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendAnimation.Make(ChatId.String chatId, animation, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, animation: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendAnimation.Make(ChatId.Int chatId, animation, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, animation: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendAnimation.Make(ChatId.String chatId, animation, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendAnimation" type SendVoice = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Voice: InputFile @@ -436,8 +449,9 @@ type SendVoice = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, voice: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Voice = voice @@ -450,15 +464,16 @@ type SendVoice = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, voice: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVoice.Make(ChatId.Int chatId, voice, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, voice: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVoice.Make(ChatId.String chatId, voice, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVoice.Make(ChatId.Int chatId, voice, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVoice.Make(ChatId.String chatId, voice, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVoice" type SendVideoNote = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option VideoNote: InputFile @@ -470,8 +485,9 @@ type SendVideoNote = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId VideoNote = videoNote @@ -483,15 +499,16 @@ type SendVideoNote = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVideoNote.Make(ChatId.Int chatId, videoNote, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVideoNote.Make(ChatId.String chatId, videoNote, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideoNote.Make(ChatId.Int chatId, videoNote, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideoNote.Make(ChatId.String chatId, videoNote, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVideoNote" type SendMediaGroup = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Media: InputMedia[] @@ -499,8 +516,9 @@ type SendMediaGroup = ProtectContent: bool option ReplyParameters: ReplyParameters option } - static member Make(chatId: ChatId, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = + static member Make(chatId: ChatId, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Media = media @@ -508,15 +526,16 @@ type SendMediaGroup = ProtectContent = protectContent ReplyParameters = replyParameters } - static member Make(chatId: int64, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = - SendMediaGroup.Make(ChatId.Int chatId, media, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters) - static member Make(chatId: string, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = - SendMediaGroup.Make(ChatId.String chatId, media, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters) + static member Make(chatId: int64, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = + SendMediaGroup.Make(ChatId.Int chatId, media, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters) + static member Make(chatId: string, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = + SendMediaGroup.Make(ChatId.String chatId, media, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters) interface IRequestBase with member _.MethodName = "sendMediaGroup" type SendLocation = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Latitude: float @@ -530,8 +549,9 @@ type SendLocation = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, latitude: float, longitude: float, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Latitude = latitude @@ -545,15 +565,16 @@ type SendLocation = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, latitude: float, longitude: float, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendLocation.Make(ChatId.Int chatId, latitude, longitude, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, latitude: float, longitude: float, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendLocation.Make(ChatId.String chatId, latitude, longitude, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendLocation.Make(ChatId.Int chatId, latitude, longitude, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendLocation.Make(ChatId.String chatId, latitude, longitude, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendLocation" type SendVenue = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Latitude: float @@ -569,8 +590,9 @@ type SendVenue = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, latitude: float, longitude: float, title: string, address: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Latitude = latitude @@ -586,15 +608,16 @@ type SendVenue = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, latitude: float, longitude: float, title: string, address: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVenue.Make(ChatId.Int chatId, latitude, longitude, title, address, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, latitude: float, longitude: float, title: string, address: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVenue.Make(ChatId.String chatId, latitude, longitude, title, address, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVenue.Make(ChatId.Int chatId, latitude, longitude, title, address, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVenue.Make(ChatId.String chatId, latitude, longitude, title, address, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVenue" type SendContact = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option PhoneNumber: string @@ -606,8 +629,9 @@ type SendContact = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId PhoneNumber = phoneNumber @@ -619,15 +643,16 @@ type SendContact = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendContact.Make(ChatId.Int chatId, phoneNumber, firstName, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendContact.Make(ChatId.String chatId, phoneNumber, firstName, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendContact.Make(ChatId.Int chatId, phoneNumber, firstName, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendContact.Make(ChatId.String chatId, phoneNumber, firstName, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendContact" type SendPoll = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Question: string @@ -647,8 +672,9 @@ type SendPoll = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, question: string, options: string[], ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, question: string, options: string[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Question = question @@ -668,15 +694,16 @@ type SendPoll = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, question: string, options: string[], ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = - SendPoll.Make(ChatId.Int chatId, question, options, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanation = explanation, ?replyParameters = replyParameters, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?explanationParseMode = explanationParseMode, ?replyMarkup = replyMarkup) - static member Make(chatId: string, question: string, options: string[], ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = - SendPoll.Make(ChatId.String chatId, question, options, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanation = explanation, ?replyParameters = replyParameters, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?explanationParseMode = explanationParseMode, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, question: string, options: string[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = + SendPoll.Make(ChatId.Int chatId, question, options, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanation = explanation, ?replyParameters = replyParameters, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?explanationParseMode = explanationParseMode, ?replyMarkup = replyMarkup) + static member Make(chatId: string, question: string, options: string[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = + SendPoll.Make(ChatId.String chatId, question, options, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanation = explanation, ?replyParameters = replyParameters, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?explanationParseMode = explanationParseMode, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendPoll" type SendDice = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Emoji: string option @@ -685,8 +712,9 @@ type SendDice = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Emoji = emoji @@ -695,29 +723,31 @@ type SendDice = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendDice.Make(ChatId.Int chatId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendDice.Make(ChatId.String chatId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDice.Make(ChatId.Int chatId, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDice.Make(ChatId.String chatId, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendDice" type SendChatAction = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Action: ChatAction } - static member Make(chatId: ChatId, action: ChatAction, ?messageThreadId: int64) = + static member Make(chatId: ChatId, action: ChatAction, ?businessConnectionId: string, ?messageThreadId: int64) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Action = action } - static member Make(chatId: int64, action: ChatAction, ?messageThreadId: int64) = - SendChatAction.Make(ChatId.Int chatId, action, ?messageThreadId = messageThreadId) - static member Make(chatId: string, action: ChatAction, ?messageThreadId: int64) = - SendChatAction.Make(ChatId.String chatId, action, ?messageThreadId = messageThreadId) + static member Make(chatId: int64, action: ChatAction, ?businessConnectionId: string, ?messageThreadId: int64) = + SendChatAction.Make(ChatId.Int chatId, action, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId) + static member Make(chatId: string, action: ChatAction, ?businessConnectionId: string, ?messageThreadId: int64) = + SendChatAction.Make(ChatId.String chatId, action, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId) interface IRequestBase with member _.MethodName = "sendChatAction" @@ -1533,6 +1563,17 @@ type GetUserChatBoosts = interface IRequestBase with member _.MethodName = "getUserChatBoosts" +type GetBusinessConnection = + { + BusinessConnectionId: string + } + static member Make(businessConnectionId: string) = + { + BusinessConnectionId = businessConnectionId + } + interface IRequestBase with + member _.MethodName = "getBusinessConnection" + type SetMyCommands = { Commands: BotCommand[] @@ -1889,6 +1930,7 @@ type DeleteMessages = type SendSticker = { + BusinessConnectionId: string option ChatId: ChatId MessageThreadId: int64 option Sticker: InputFile @@ -1898,8 +1940,9 @@ type SendSticker = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Sticker = sticker @@ -1909,10 +1952,10 @@ type SendSticker = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendSticker.Make(ChatId.Int chatId, sticker, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendSticker.Make(ChatId.String chatId, sticker, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendSticker.Make(ChatId.Int chatId, sticker, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendSticker.Make(ChatId.String chatId, sticker, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendSticker" @@ -1959,17 +2002,15 @@ type CreateNewStickerSet = Name: string Title: string Stickers: InputSticker[] - StickerFormat: string StickerType: string option NeedsRepainting: bool option } - static member Make(userId: int64, name: string, title: string, stickers: InputSticker[], stickerFormat: string, ?stickerType: string, ?needsRepainting: bool) = + static member Make(userId: int64, name: string, title: string, stickers: InputSticker[], ?stickerType: string, ?needsRepainting: bool) = { UserId = userId Name = name Title = title Stickers = stickers - StickerFormat = stickerFormat StickerType = stickerType NeedsRepainting = needsRepainting } @@ -2015,6 +2056,23 @@ type DeleteStickerFromSet = interface IRequestBase with member _.MethodName = "deleteStickerFromSet" +type ReplaceStickerInSet = + { + UserId: int64 + Name: string + OldSticker: string + Sticker: InputSticker + } + static member Make(userId: int64, name: string, oldSticker: string, sticker: InputSticker) = + { + UserId = userId + Name = name + OldSticker = oldSticker + Sticker = sticker + } + interface IRequestBase with + member _.MethodName = "replaceStickerInSet" + type SetStickerEmojiList = { Sticker: string @@ -2072,12 +2130,14 @@ type SetStickerSetThumbnail = Name: string UserId: int64 Thumbnail: InputFile option + Format: string } - static member Make(name: string, userId: int64, ?thumbnail: InputFile) = + static member Make(name: string, userId: int64, format: string, ?thumbnail: InputFile) = { Name = name UserId = userId Thumbnail = thumbnail + Format = format } interface IRequestBase with member _.MethodName = "setStickerSetThumbnail" @@ -2303,6 +2363,7 @@ type SetPassportDataErrors = type SendGame = { + BusinessConnectionId: string option ChatId: int64 MessageThreadId: int64 option GameShortName: string @@ -2311,8 +2372,9 @@ type SendGame = ReplyParameters: ReplyParameters option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(chatId: int64, gameShortName: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(chatId: int64, gameShortName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: InlineKeyboardMarkup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId GameShortName = gameShortName diff --git a/src/Funogram.Telegram/Types.fs b/src/Funogram.Telegram/Types.fs index 2cd14af..3513cce 100644 --- a/src/Funogram.Telegram/Types.fs +++ b/src/Funogram.Telegram/Types.fs @@ -90,6 +90,18 @@ and [] Update = /// New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot. [] EditedChannelPost: Message option + /// The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot + [] + BusinessConnection: BusinessConnection option + /// New non-service message from a connected business account + [] + BusinessMessage: Message option + /// New version of a message from a connected business account + [] + EditedBusinessMessage: Message option + /// Messages were deleted from a connected business account + [] + DeletedBusinessMessages: BusinessMessagesDeleted option /// A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots. [] MessageReaction: MessageReactionUpdated option @@ -133,7 +145,7 @@ and [] Update = [] RemovedChatBoost: ChatBoostRemoved option } - static member Create(updateId: int64, ?chatJoinRequest: ChatJoinRequest, ?chatMember: ChatMemberUpdated, ?myChatMember: ChatMemberUpdated, ?pollAnswer: PollAnswer, ?poll: Poll, ?preCheckoutQuery: PreCheckoutQuery, ?shippingQuery: ShippingQuery, ?chatBoost: ChatBoostUpdated, ?callbackQuery: CallbackQuery, ?inlineQuery: InlineQuery, ?messageReactionCount: MessageReactionCountUpdated, ?messageReaction: MessageReactionUpdated, ?editedChannelPost: Message, ?channelPost: Message, ?editedMessage: Message, ?message: Message, ?chosenInlineResult: ChosenInlineResult, ?removedChatBoost: ChatBoostRemoved) = + static member Create(updateId: int64, ?chatJoinRequest: ChatJoinRequest, ?chatMember: ChatMemberUpdated, ?myChatMember: ChatMemberUpdated, ?pollAnswer: PollAnswer, ?poll: Poll, ?preCheckoutQuery: PreCheckoutQuery, ?shippingQuery: ShippingQuery, ?callbackQuery: CallbackQuery, ?chosenInlineResult: ChosenInlineResult, ?chatBoost: ChatBoostUpdated, ?inlineQuery: InlineQuery, ?messageReaction: MessageReactionUpdated, ?deletedBusinessMessages: BusinessMessagesDeleted, ?editedBusinessMessage: Message, ?businessMessage: Message, ?businessConnection: BusinessConnection, ?editedChannelPost: Message, ?channelPost: Message, ?editedMessage: Message, ?message: Message, ?messageReactionCount: MessageReactionCountUpdated, ?removedChatBoost: ChatBoostRemoved) = { UpdateId = updateId ChatJoinRequest = chatJoinRequest @@ -143,16 +155,20 @@ and [] Update = Poll = poll PreCheckoutQuery = preCheckoutQuery ShippingQuery = shippingQuery - ChatBoost = chatBoost CallbackQuery = callbackQuery + ChosenInlineResult = chosenInlineResult + ChatBoost = chatBoost InlineQuery = inlineQuery - MessageReactionCount = messageReactionCount MessageReaction = messageReaction + DeletedBusinessMessages = deletedBusinessMessages + EditedBusinessMessage = editedBusinessMessage + BusinessMessage = businessMessage + BusinessConnection = businessConnection EditedChannelPost = editedChannelPost ChannelPost = channelPost EditedMessage = editedMessage Message = message - ChosenInlineResult = chosenInlineResult + MessageReactionCount = messageReactionCount RemovedChatBoost = removedChatBoost } @@ -238,8 +254,11 @@ and [] User = /// True, if the bot supports inline queries. Returned only in getMe. [] SupportsInlineQueries: bool option + /// True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe. + [] + CanConnectToBusiness: bool option } - static member Create(id: int64, isBot: bool, firstName: string, ?lastName: string, ?username: string, ?languageCode: string, ?isPremium: bool, ?addedToAttachmentMenu: bool, ?canJoinGroups: bool, ?canReadAllGroupMessages: bool, ?supportsInlineQueries: bool) = + static member Create(id: int64, isBot: bool, firstName: string, ?lastName: string, ?username: string, ?languageCode: string, ?isPremium: bool, ?addedToAttachmentMenu: bool, ?canJoinGroups: bool, ?canReadAllGroupMessages: bool, ?supportsInlineQueries: bool, ?canConnectToBusiness: bool) = { Id = id IsBot = isBot @@ -252,6 +271,7 @@ and [] User = CanJoinGroups = canJoinGroups CanReadAllGroupMessages = canReadAllGroupMessages SupportsInlineQueries = supportsInlineQueries + CanConnectToBusiness = canConnectToBusiness } /// This object represents a chat. @@ -284,6 +304,21 @@ and [] Chat = /// If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat. [] ActiveUsernames: string[] option + /// For private chats, the date of birth of the user. Returned only in getChat. + [] + Birthdate: Birthdate option + /// For private chats with business accounts, the intro of the business. Returned only in getChat. + [] + BusinessIntro: BusinessIntro option + /// For private chats with business accounts, the location of the business. Returned only in getChat. + [] + BusinessLocation: BusinessLocation option + /// For private chats with business accounts, the opening hours of the business. Returned only in getChat. + [] + BusinessOpeningHours: BusinessOpeningHours option + /// For private chats, the personal channel of the user. Returned only in getChat. + [] + PersonalChat: Chat option /// List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat. [] AvailableReactions: ReactionType[] option @@ -369,10 +404,13 @@ and [] Chat = [] Location: ChatLocation option } - static member Create(id: int64, ``type``: ChatType, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?slowModeDelay: int64, ?unrestrictBoostCount: int64, ?messageAutoDeleteTime: int64, ?hasAggressiveAntiSpamEnabled: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?customEmojiStickerSetName: string, ?joinByRequest: bool, ?joinToSendMessages: bool, ?hasRestrictedVoiceAndVideoMessages: bool, ?hasPrivateForwards: bool, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?activeUsernames: string[], ?availableReactions: ReactionType[], ?accentColorId: int64, ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?emojiStatusCustomEmojiId: string, ?emojiStatusExpirationDate: int64, ?bio: string, ?linkedChatId: int64, ?location: ChatLocation) = + static member Create(id: int64, ``type``: ChatType, ?hasRestrictedVoiceAndVideoMessages: bool, ?joinToSendMessages: bool, ?joinByRequest: bool, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?slowModeDelay: int64, ?unrestrictBoostCount: int64, ?messageAutoDeleteTime: int64, ?hasAggressiveAntiSpamEnabled: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?customEmojiStickerSetName: string, ?hasPrivateForwards: bool, ?bio: string, ?emojiStatusExpirationDate: int64, ?emojiStatusCustomEmojiId: string, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?activeUsernames: string[], ?birthdate: Birthdate, ?businessIntro: BusinessIntro, ?businessLocation: BusinessLocation, ?businessOpeningHours: BusinessOpeningHours, ?personalChat: Chat, ?availableReactions: ReactionType[], ?accentColorId: int64, ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?linkedChatId: int64, ?location: ChatLocation) = { Id = id Type = ``type`` + HasRestrictedVoiceAndVideoMessages = hasRestrictedVoiceAndVideoMessages + JoinToSendMessages = joinToSendMessages + JoinByRequest = joinByRequest Description = description InviteLink = inviteLink PinnedMessage = pinnedMessage @@ -387,10 +425,10 @@ and [] Chat = StickerSetName = stickerSetName CanSetStickerSet = canSetStickerSet CustomEmojiStickerSetName = customEmojiStickerSetName - JoinByRequest = joinByRequest - JoinToSendMessages = joinToSendMessages - HasRestrictedVoiceAndVideoMessages = hasRestrictedVoiceAndVideoMessages HasPrivateForwards = hasPrivateForwards + Bio = bio + EmojiStatusExpirationDate = emojiStatusExpirationDate + EmojiStatusCustomEmojiId = emojiStatusCustomEmojiId Title = title Username = username FirstName = firstName @@ -398,14 +436,16 @@ and [] Chat = IsForum = isForum Photo = photo ActiveUsernames = activeUsernames + Birthdate = birthdate + BusinessIntro = businessIntro + BusinessLocation = businessLocation + BusinessOpeningHours = businessOpeningHours + PersonalChat = personalChat AvailableReactions = availableReactions AccentColorId = accentColorId BackgroundCustomEmojiId = backgroundCustomEmojiId ProfileAccentColorId = profileAccentColorId ProfileBackgroundCustomEmojiId = profileBackgroundCustomEmojiId - EmojiStatusCustomEmojiId = emojiStatusCustomEmojiId - EmojiStatusExpirationDate = emojiStatusExpirationDate - Bio = bio LinkedChatId = linkedChatId Location = location } @@ -428,9 +468,15 @@ and [] Message = /// If the sender of the message boosted the chat, the number of boosts added by the user [] SenderBoostCount: int64 option + /// The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account. + [] + SenderBusinessBot: User option /// Date the message was sent in Unix time. It is always a positive number, representing a valid date. [] Date: DateTime + /// Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier. + [] + BusinessConnectionId: string option /// Chat the message belongs to [] Chat: Chat @@ -464,6 +510,9 @@ and [] Message = /// True, if the message can't be forwarded [] HasProtectedContent: bool option + /// True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message + [] + IsFromOffline: bool option /// The unique identifier of a media message group this message belongs to [] MediaGroupId: string option @@ -645,30 +694,30 @@ and [] Message = [] ReplyMarkup: InlineKeyboardMarkup option } - static member Create(messageId: int64, date: DateTime, chat: Chat, ?chatShared: ChatShared, ?usersShared: UsersShared, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?channelChatCreated: bool, ?connectedWebsite: string, ?supergroupChatCreated: bool, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?writeAccessAllowed: WriteAccessAllowed, ?passportData: PassportData, ?proximityAlertTriggered: ProximityAlertTriggered, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?giveawayCreated: GiveawayCreated, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?boostAdded: ChatBoostAdded, ?newChatMembers: User[], ?location: Location, ?venue: Venue, ?poll: Poll, ?mediaGroupId: string, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?replyToMessage: Message, ?isAutomaticForward: bool, ?isTopicMessage: bool, ?forwardOrigin: MessageOrigin, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?authorSignature: string, ?webAppData: WebAppData, ?text: string, ?linkPreviewOptions: LinkPreviewOptions, ?game: Game, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?document: Document, ?audio: Audio, ?animation: Animation, ?entities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup) = + static member Create(messageId: int64, date: DateTime, chat: Chat, ?usersShared: UsersShared, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?supergroupChatCreated: bool, ?chatShared: ChatShared, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?newChatMembers: User[], ?channelChatCreated: bool, ?connectedWebsite: string, ?passportData: PassportData, ?location: Location, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?writeAccessAllowed: WriteAccessAllowed, ?giveawayCreated: GiveawayCreated, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?boostAdded: ChatBoostAdded, ?proximityAlertTriggered: ProximityAlertTriggered, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?venue: Venue, ?game: Game, ?webAppData: WebAppData, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?replyToMessage: Message, ?isFromOffline: bool, ?isAutomaticForward: bool, ?forwardOrigin: MessageOrigin, ?businessConnectionId: string, ?senderBusinessBot: User, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?isTopicMessage: bool, ?poll: Poll, ?mediaGroupId: string, ?text: string, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?authorSignature: string, ?video: Video, ?sticker: Sticker, ?photo: PhotoSize[], ?document: Document, ?audio: Audio, ?animation: Animation, ?linkPreviewOptions: LinkPreviewOptions, ?entities: MessageEntity[], ?story: Story, ?replyMarkup: InlineKeyboardMarkup) = { MessageId = messageId Date = date Chat = chat - ChatShared = chatShared UsersShared = usersShared SuccessfulPayment = successfulPayment Invoice = invoice PinnedMessage = pinnedMessage MigrateFromChatId = migrateFromChatId MigrateToChatId = migrateToChatId - ChannelChatCreated = channelChatCreated - ConnectedWebsite = connectedWebsite + MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged SupergroupChatCreated = supergroupChatCreated + ChatShared = chatShared GroupChatCreated = groupChatCreated DeleteChatPhoto = deleteChatPhoto NewChatPhoto = newChatPhoto NewChatTitle = newChatTitle LeftChatMember = leftChatMember - MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged - WriteAccessAllowed = writeAccessAllowed + NewChatMembers = newChatMembers + ChannelChatCreated = channelChatCreated + ConnectedWebsite = connectedWebsite PassportData = passportData - ProximityAlertTriggered = proximityAlertTriggered + Location = location VideoChatParticipantsInvited = videoChatParticipantsInvited VideoChatEnded = videoChatEnded VideoChatStarted = videoChatStarted @@ -676,19 +725,19 @@ and [] Message = GiveawayCompleted = giveawayCompleted GiveawayWinners = giveawayWinners Giveaway = giveaway + WriteAccessAllowed = writeAccessAllowed GiveawayCreated = giveawayCreated - GeneralForumTopicUnhidden = generalForumTopicUnhidden GeneralForumTopicHidden = generalForumTopicHidden ForumTopicReopened = forumTopicReopened ForumTopicClosed = forumTopicClosed ForumTopicEdited = forumTopicEdited ForumTopicCreated = forumTopicCreated BoostAdded = boostAdded - NewChatMembers = newChatMembers - Location = location + ProximityAlertTriggered = proximityAlertTriggered + GeneralForumTopicUnhidden = generalForumTopicUnhidden Venue = venue - Poll = poll - MediaGroupId = mediaGroupId + Game = game + WebAppData = webAppData HasProtectedContent = hasProtectedContent EditDate = editDate ViaBot = viaBot @@ -696,18 +745,19 @@ and [] Message = Quote = quote ExternalReply = externalReply ReplyToMessage = replyToMessage + IsFromOffline = isFromOffline IsAutomaticForward = isAutomaticForward - IsTopicMessage = isTopicMessage ForwardOrigin = forwardOrigin + BusinessConnectionId = businessConnectionId + SenderBusinessBot = senderBusinessBot SenderBoostCount = senderBoostCount SenderChat = senderChat From = from MessageThreadId = messageThreadId - AuthorSignature = authorSignature - WebAppData = webAppData + IsTopicMessage = isTopicMessage + Poll = poll + MediaGroupId = mediaGroupId Text = text - LinkPreviewOptions = linkPreviewOptions - Game = game Dice = dice Contact = contact HasMediaSpoiler = hasMediaSpoiler @@ -715,14 +765,16 @@ and [] Message = Caption = caption Voice = voice VideoNote = videoNote + AuthorSignature = authorSignature Video = video - Story = story Sticker = sticker Photo = photo Document = document Audio = audio Animation = animation + LinkPreviewOptions = linkPreviewOptions Entities = entities + Story = story ReplyMarkup = replyMarkup } @@ -929,10 +981,10 @@ and [] ReplyParameters = /// Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified [] MessageId: int64 - /// If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername) + /// If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account. [] ChatId: ChatId option - /// Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic. + /// Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account. [] AllowSendingWithoutReply: bool option /// Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message. @@ -1650,23 +1702,51 @@ and GeneralForumTopicHidden = and GeneralForumTopicUnhidden = new() = {} +/// This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button. +and [] SharedUser = + { + /// Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means. + [] + UserId: int64 + /// First name of the user, if the name was requested by the bot + [] + FirstName: string option + /// Last name of the user, if the name was requested by the bot + [] + LastName: string option + /// Username of the user, if the username was requested by the bot + [] + Username: string option + /// Available sizes of the chat photo, if the photo was requested by the bot + [] + Photo: PhotoSize[] option + } + static member Create(userId: int64, ?firstName: string, ?lastName: string, ?username: string, ?photo: PhotoSize[]) = + { + UserId = userId + FirstName = firstName + LastName = lastName + Username = username + Photo = photo + } + /// This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. and [] UsersShared = { /// Identifier of the request [] RequestId: int64 - /// Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means. - [] - UserIds: int64[] + /// Information about users shared with the bot. + [] + Users: SharedUser[] } - static member Create(requestId: int64, userIds: int64[]) = + static member Create(requestId: int64, users: SharedUser[]) = { RequestId = requestId - UserIds = userIds + Users = users } -/// This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. +/// This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button. and [] ChatShared = { /// Identifier of the request @@ -1675,11 +1755,23 @@ and [] ChatShared = /// Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means. [] ChatId: int64 + /// Title of the chat, if the title was requested by the bot. + [] + Title: string option + /// Username of the chat, if the username was requested by the bot and available. + [] + Username: string option + /// Available sizes of the chat photo, if the photo was requested by the bot + [] + Photo: PhotoSize[] option } - static member Create(requestId: int64, chatId: int64) = + static member Create(requestId: int64, chatId: int64, ?title: string, ?username: string, ?photo: PhotoSize[]) = { RequestId = requestId ChatId = chatId + Title = title + Username = username + Photo = photo } /// This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess. @@ -2009,7 +2101,7 @@ and [] KeyboardButton = WebApp = webApp } -/// This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users » +/// This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users » and [] KeyboardButtonRequestUsers = { /// Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message @@ -2024,16 +2116,28 @@ and [] KeyboardButtonRequestUsers = /// The maximum number of users to be selected; 1-10. Defaults to 1. [] MaxQuantity: int64 option - } - static member Create(requestId: int64, ?userIsBot: bool, ?userIsPremium: bool, ?maxQuantity: int64) = + /// Pass True to request the users' first and last name + [] + RequestName: bool option + /// Pass True to request the users' username + [] + RequestUsername: bool option + /// Pass True to request the users' photo + [] + RequestPhoto: bool option + } + static member Create(requestId: int64, ?userIsBot: bool, ?userIsPremium: bool, ?maxQuantity: int64, ?requestName: bool, ?requestUsername: bool, ?requestPhoto: bool) = { RequestId = requestId UserIsBot = userIsBot UserIsPremium = userIsPremium MaxQuantity = maxQuantity + RequestName = requestName + RequestUsername = requestUsername + RequestPhoto = requestPhoto } -/// This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats » +/// This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the сhat if appropriate More about requesting chats » and [] KeyboardButtonRequestChat = { /// Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message @@ -2060,8 +2164,17 @@ and [] KeyboardButtonRequestChat = /// Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. [] BotIsMember: bool option - } - static member Create(requestId: int64, chatIsChannel: bool, ?chatIsForum: bool, ?chatHasUsername: bool, ?chatIsCreated: bool, ?userAdministratorRights: ChatAdministratorRights, ?botAdministratorRights: ChatAdministratorRights, ?botIsMember: bool) = + /// Pass True to request the chat's title + [] + RequestTitle: bool option + /// Pass True to request the chat's username + [] + RequestUsername: bool option + /// Pass True to request the chat's photo + [] + RequestPhoto: bool option + } + static member Create(requestId: int64, chatIsChannel: bool, ?chatIsForum: bool, ?chatHasUsername: bool, ?chatIsCreated: bool, ?userAdministratorRights: ChatAdministratorRights, ?botAdministratorRights: ChatAdministratorRights, ?botIsMember: bool, ?requestTitle: bool, ?requestUsername: bool, ?requestPhoto: bool) = { RequestId = requestId ChatIsChannel = chatIsChannel @@ -2071,6 +2184,9 @@ and [] KeyboardButtonRequestChat = UserAdministratorRights = userAdministratorRights BotAdministratorRights = botAdministratorRights BotIsMember = botIsMember + RequestTitle = requestTitle + RequestUsername = requestUsername + RequestPhoto = requestPhoto } /// This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. @@ -2384,16 +2500,16 @@ and [] ChatAdministratorRights = /// True, if the administrator can delete stories posted by other users [] CanDeleteStories: bool - /// True, if the administrator can post messages in the channel, or access channel statistics; channels only + /// True, if the administrator can post messages in the channel, or access channel statistics; for channels only [] CanPostMessages: bool option - /// True, if the administrator can edit messages of other users and can pin messages; channels only + /// True, if the administrator can edit messages of other users and can pin messages; for channels only [] CanEditMessages: bool option - /// True, if the user is allowed to pin messages; groups and supergroups only + /// True, if the user is allowed to pin messages; for groups and supergroups only [] CanPinMessages: bool option - /// True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only + /// True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only [] CanManageTopics: bool option /// DEPRECATED: use can_manage_video_chats instead @@ -2534,16 +2650,16 @@ and [] ChatMemberAdministrator = /// True, if the administrator can delete stories posted by other users [] CanDeleteStories: bool - /// True, if the administrator can post messages in the channel, or access channel statistics; channels only + /// True, if the administrator can post messages in the channel, or access channel statistics; for channels only [] CanPostMessages: bool option - /// True, if the administrator can edit messages of other users and can pin messages; channels only + /// True, if the administrator can edit messages of other users and can pin messages; for channels only [] CanEditMessages: bool option - /// True, if the user is allowed to pin messages; groups and supergroups only + /// True, if the user is allowed to pin messages; for groups and supergroups only [] CanPinMessages: bool option - /// True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only + /// True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only [] CanManageTopics: bool option /// Custom title for this user @@ -2805,6 +2921,94 @@ and [] ChatPermissions = CanManageTopics = canManageTopics } +/// +and [] Birthdate = + { + /// Day of the user's birth; 1-31 + [] + Day: int64 + /// Month of the user's birth; 1-12 + [] + Month: int64 + /// Year of the user's birth + [] + Year: int64 option + } + static member Create(day: int64, month: int64, ?year: int64) = + { + Day = day + Month = month + Year = year + } + +/// +and [] BusinessIntro = + { + /// Title text of the business intro + [] + Title: string option + /// Message text of the business intro + [] + Message: string option + /// Sticker of the business intro + [] + Sticker: Sticker option + } + static member Create(?title: string, ?message: string, ?sticker: Sticker) = + { + Title = title + Message = message + Sticker = sticker + } + +/// +and [] BusinessLocation = + { + /// Address of the business + [] + Address: string + /// Location of the business + [] + Location: Location option + } + static member Create(address: string, ?location: Location) = + { + Address = address + Location = location + } + +/// +and [] BusinessOpeningHoursInterval = + { + /// The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60 + [] + OpeningMinute: int64 + /// The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60 + [] + ClosingMinute: int64 + } + static member Create(openingMinute: int64, closingMinute: int64) = + { + OpeningMinute = openingMinute + ClosingMinute = closingMinute + } + +/// +and [] BusinessOpeningHours = + { + /// Unique name of the time zone for which the opening hours are defined + [] + TimeZoneName: string + /// List of time intervals describing business opening hours + [] + OpeningHours: BusinessOpeningHoursInterval[] + } + static member Create(timeZoneName: string, openingHours: BusinessOpeningHoursInterval[]) = + { + TimeZoneName = timeZoneName + OpeningHours = openingHours + } + /// Represents a location to which a chat is connected. and [] ChatLocation = { @@ -3309,6 +3513,58 @@ and [] UserChatBoosts = Boosts = boosts } +/// Describes the connection of the bot with a business account. +and [] BusinessConnection = + { + /// Unique identifier of the business connection + [] + Id: string + /// Business account user that created the business connection + [] + User: User + /// Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. + [] + UserChatId: int64 + /// Date the connection was established in Unix time + [] + Date: DateTime + /// True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours + [] + CanReply: bool + /// True, if the connection is active + [] + IsEnabled: bool + } + static member Create(id: string, user: User, userChatId: int64, date: DateTime, canReply: bool, isEnabled: bool) = + { + Id = id + User = user + UserChatId = userChatId + Date = date + CanReply = canReply + IsEnabled = isEnabled + } + +/// This object is received when messages are deleted from a connected business account. +and [] BusinessMessagesDeleted = + { + /// Unique identifier of the business connection + [] + BusinessConnectionId: string + /// Information about a chat in the business account. The bot may not have access to the chat or the corresponding user. + [] + Chat: Chat + /// A JSON-serialized list of identifiers of deleted messages in the chat of the business account + [] + MessageIds: int64[] + } + static member Create(businessConnectionId: string, chat: Chat, messageIds: int64[]) = + { + BusinessConnectionId = businessConnectionId + Chat = chat + MessageIds = messageIds + } + /// Describes why a request was unsuccessful. and [] ResponseParameters = { @@ -3625,12 +3881,6 @@ and [] StickerSet = /// Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji” [] StickerType: string - /// True, if the sticker set contains animated stickers - [] - IsAnimated: bool - /// True, if the sticker set contains video stickers - [] - IsVideo: bool /// List of all set stickers [] Stickers: Sticker[] @@ -3638,13 +3888,11 @@ and [] StickerSet = [] Thumbnail: PhotoSize option } - static member Create(name: string, title: string, stickerType: string, isAnimated: bool, isVideo: bool, stickers: Sticker[], ?thumbnail: PhotoSize) = + static member Create(name: string, title: string, stickerType: string, stickers: Sticker[], ?thumbnail: PhotoSize) = { Name = name Title = title StickerType = stickerType - IsAnimated = isAnimated - IsVideo = isVideo Stickers = stickers Thumbnail = thumbnail } @@ -3679,6 +3927,9 @@ and [] InputSticker = /// The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass “attach://” to upload a new one using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files » [] Sticker: InputFile + /// Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video + [] + Format: string /// List of 1-20 emoji associated with the sticker [] EmojiList: string[] @@ -3689,9 +3940,10 @@ and [] InputSticker = [] Keywords: string[] option } - static member Create(sticker: InputFile, emojiList: string[], ?maskPosition: MaskPosition, ?keywords: string[]) = + static member Create(sticker: InputFile, format: string, emojiList: string[], ?maskPosition: MaskPosition, ?keywords: string[]) = { Sticker = sticker + Format = format EmojiList = emojiList MaskPosition = maskPosition Keywords = keywords @@ -5320,28 +5572,28 @@ and [] EncryptedPassportElement = /// Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”. [] Type: string - /// Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials. + /// Base64-encoded encrypted Telegram Passport element data provided by the user; available only for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials. [] Data: string option - /// User's verified phone number, available only for “phone_number” type + /// User's verified phone number; available only for “phone_number” type [] PhoneNumber: string option - /// User's verified email address, available only for “email” type + /// User's verified email address; available only for “email” type [] Email: string option - /// Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. + /// Array of encrypted files with documents provided by the user; available only for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. [] Files: PassportFile[] option - /// Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials. + /// Encrypted file with the front side of the document, provided by the user; available only for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials. [] FrontSide: PassportFile option - /// Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials. + /// Encrypted file with the reverse side of the document, provided by the user; available only for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials. [] ReverseSide: PassportFile option - /// Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials. + /// Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials. [] Selfie: PassportFile option - /// Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. + /// Array of encrypted files with translated versions of documents provided by the user; available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. [] Translation: PassportFile[] option /// Base64-encoded element hash for using in PassportElementErrorUnspecified diff --git a/src/Funogram.Tests/Constants.fs b/src/Funogram.Tests/Constants.fs index 748766c..a2c8cc2 100644 --- a/src/Funogram.Tests/Constants.fs +++ b/src/Funogram.Tests/Constants.fs @@ -22,7 +22,7 @@ module Constants = let jsonTestObjString = """{"type":"italic","offset":0,"length":100,"url":"http://github.com"}""" let jsonTestObjResultString = """{"ok":true,"result":{"type":"italic","offset":0,"length":100,"url":"http://github.com","user":null,"language":null} }""" - let jsonTestObjUser = { Id = 123456L; FirstName = "BotFather"; LastName = None; Username = (Some "BotFather"); LanguageCode = None; IsBot = false; CanJoinGroups = None; CanReadAllGroupMessages = None; SupportsInlineQueries = None; IsPremium = None; AddedToAttachmentMenu = None } + let jsonTestObjUser = { Id = 123456L; FirstName = "BotFather"; LastName = None; Username = (Some "BotFather"); LanguageCode = None; IsBot = false; CanJoinGroups = None; CanReadAllGroupMessages = None; SupportsInlineQueries = None; IsPremium = None; AddedToAttachmentMenu = None; CanConnectToBusiness = None } let jsonTestObjUserResultString = """{"ok":true,"result":{"id":123456,"first_name":"BotFather","username":"BotFather","language_code":null,"is_bot":false,"can_join_groups":null,"can_read_all_group_messages":null,"supports_inline_queries":null}}""" let jsonTestEditResult1 = EditMessageResult.Success(true)