diff --git a/CHANGELOG.md b/CHANGELOG.md index f3d345e3..d7f16143 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] (1.8.61) +### Changed +- Update to [TDLib v1.8.61](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.61). + ## [1.8.60] - 2026-01-10 ### Changed - Update to [TDLib v1.8.60](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.60). diff --git a/Directory.Build.props b/Directory.Build.props index 451dd47d..5859097c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT - 1.8.60 + 1.8.61 diff --git a/Scripts/Get-TlFiles.ps1 b/Scripts/Get-TlFiles.ps1 index 3f940e52..2b4e9c0b 100644 --- a/Scripts/Get-TlFiles.ps1 +++ b/Scripts/Get-TlFiles.ps1 @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT param( - [string] $CommitHash = '0da5c72f8365fb4857096e716d53175ddbdf5a15', + [string] $CommitHash = '11e254af695060d8890024dd7faa1cc2d6685ef8', [string] $TdApiUrl = "https://github.com/tdlib/td/raw/$CommitHash/td/generate/scheme/td_api.tl", [string] $SourceRoot = "$PSScriptRoot/..", diff --git a/TdLib.Api/Functions/AddProxy.cs b/TdLib.Api/Functions/AddProxy.cs index bd8fe8bc..bdc4556d 100644 --- a/TdLib.Api/Functions/AddProxy.cs +++ b/TdLib.Api/Functions/AddProxy.cs @@ -13,7 +13,7 @@ public static partial class TdApi /// /// Adds a proxy server for network requests. Can be called before authorization /// - public class AddProxy : Function + public class AddProxy : Function { /// /// Data type for serialization @@ -28,18 +28,11 @@ public class AddProxy : Function public override string Extra { get; set; } /// - /// Proxy server domain or IP address + /// The proxy to add /// [JsonConverter(typeof(Converter))] - [JsonProperty("server")] - public string Server { get; set; } - - /// - /// Proxy server port - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("port")] - public int Port { get; set; } + [JsonProperty("proxy")] + public Proxy Proxy { get; set; } /// /// Pass true to immediately enable the proxy @@ -47,24 +40,17 @@ public class AddProxy : Function [JsonConverter(typeof(Converter))] [JsonProperty("enable")] public bool Enable { get; set; } - - /// - /// Proxy type - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("type")] - public ProxyType Type { get; set; } } /// /// Adds a proxy server for network requests. Can be called before authorization /// - public static Task AddProxyAsync( - this Client client, string server = default, int port = default, bool enable = default, ProxyType type = default) + public static Task AddProxyAsync( + this Client client, Proxy proxy = default, bool enable = default) { return client.ExecuteAsync(new AddProxy { - Server = server, Port = port, Enable = enable, Type = type + Proxy = proxy, Enable = enable }); } } diff --git a/TdLib.Api/Functions/AnswerInlineQuery.cs b/TdLib.Api/Functions/AnswerInlineQuery.cs index 85fdb5e2..980a75e8 100644 --- a/TdLib.Api/Functions/AnswerInlineQuery.cs +++ b/TdLib.Api/Functions/AnswerInlineQuery.cs @@ -35,7 +35,7 @@ public class AnswerInlineQuery : Function public long InlineQueryId { get; set; } /// - /// Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query + /// Pass true if results may be cached and returned only for the user who sent the query. By default, results may be returned to any user who sends the same query /// [JsonConverter(typeof(Converter))] [JsonProperty("is_personal")] diff --git a/TdLib.Api/Functions/BanChatMember.cs b/TdLib.Api/Functions/BanChatMember.cs index 3534a0d0..01cfb3c3 100644 --- a/TdLib.Api/Functions/BanChatMember.cs +++ b/TdLib.Api/Functions/BanChatMember.cs @@ -49,7 +49,7 @@ public class BanChatMember : Function public int BannedUntilDate { get; set; } /// - /// Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels + /// Pass true to delete all messages in the chat for the user who is being removed. Always true for supergroups and channels /// [JsonConverter(typeof(Converter))] [JsonProperty("revoke_messages")] diff --git a/TdLib.Api/Functions/BuyGiftUpgrade.cs b/TdLib.Api/Functions/BuyGiftUpgrade.cs index 7257314c..3843c878 100644 --- a/TdLib.Api/Functions/BuyGiftUpgrade.cs +++ b/TdLib.Api/Functions/BuyGiftUpgrade.cs @@ -42,7 +42,7 @@ public class BuyGiftUpgrade : Function public string PrepaidUpgradeHash { get; set; } /// - /// The amount of Telegram Stars the user agreed to pay for the upgrade; must be equal to gift.upgrade_star_count + /// The Telegram Star amount the user agreed to pay for the upgrade; must be equal to gift.upgrade_star_count /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Functions/GetGiftUpgradeVariants.cs b/TdLib.Api/Functions/CraftGift.cs similarity index 52% rename from TdLib.Api/Functions/GetGiftUpgradeVariants.cs rename to TdLib.Api/Functions/CraftGift.cs index fac99707..0bd15747 100644 --- a/TdLib.Api/Functions/GetGiftUpgradeVariants.cs +++ b/TdLib.Api/Functions/CraftGift.cs @@ -11,15 +11,15 @@ namespace TdLib public static partial class TdApi { /// - /// Returns all possible variants of upgraded gifts for a regular gift + /// Crafts a new gift from other gifts that will be permanently lost /// - public class GetGiftUpgradeVariants : Function + public class CraftGift : Function { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "getGiftUpgradeVariants"; + public override string DataType { get; set; } = "craftGift"; /// /// Extra data attached to the function @@ -28,22 +28,21 @@ public class GetGiftUpgradeVariants : Function public override string Extra { get; set; } /// - /// Identifier of the gift + /// Identifier of the gifts to use for crafting /// - [JsonConverter(typeof(Converter.Int64))] - [JsonProperty("gift_id")] - public long GiftId { get; set; } + [JsonProperty("received_gift_ids", ItemConverterType = typeof(Converter))] + public string[] ReceivedGiftIds { get; set; } } /// - /// Returns all possible variants of upgraded gifts for a regular gift + /// Crafts a new gift from other gifts that will be permanently lost /// - public static Task GetGiftUpgradeVariantsAsync( - this Client client, long giftId = default) + public static Task CraftGiftAsync( + this Client client, string[] receivedGiftIds = default) { - return client.ExecuteAsync(new GetGiftUpgradeVariants + return client.ExecuteAsync(new CraftGift { - GiftId = giftId + ReceivedGiftIds = receivedGiftIds }); } } diff --git a/TdLib.Api/Functions/DropGiftOriginalDetails.cs b/TdLib.Api/Functions/DropGiftOriginalDetails.cs index 592b935c..7f2d73ec 100644 --- a/TdLib.Api/Functions/DropGiftOriginalDetails.cs +++ b/TdLib.Api/Functions/DropGiftOriginalDetails.cs @@ -35,7 +35,7 @@ public class DropGiftOriginalDetails : Function public string ReceivedGiftId { get; set; } /// - /// The amount of Telegram Stars required to pay for the operation + /// The Telegram Star amount required to pay for the operation /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Functions/EditProxy.cs b/TdLib.Api/Functions/EditProxy.cs index 3f6ee152..7fafaa12 100644 --- a/TdLib.Api/Functions/EditProxy.cs +++ b/TdLib.Api/Functions/EditProxy.cs @@ -13,7 +13,7 @@ public static partial class TdApi /// /// Edits an existing proxy server for network requests. Can be called before authorization /// - public class EditProxy : Function + public class EditProxy : Function { /// /// Data type for serialization @@ -35,18 +35,11 @@ public class EditProxy : Function public int ProxyId { get; set; } /// - /// Proxy server domain or IP address + /// The new information about the proxy /// [JsonConverter(typeof(Converter))] - [JsonProperty("server")] - public string Server { get; set; } - - /// - /// Proxy server port - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("port")] - public int Port { get; set; } + [JsonProperty("proxy")] + public Proxy Proxy { get; set; } /// /// Pass true to immediately enable the proxy @@ -54,24 +47,17 @@ public class EditProxy : Function [JsonConverter(typeof(Converter))] [JsonProperty("enable")] public bool Enable { get; set; } - - /// - /// Proxy type - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("type")] - public ProxyType Type { get; set; } } /// /// Edits an existing proxy server for network requests. Can be called before authorization /// - public static Task EditProxyAsync( - this Client client, int proxyId = default, string server = default, int port = default, bool enable = default, ProxyType type = default) + public static Task EditProxyAsync( + this Client client, int proxyId = default, Proxy proxy = default, bool enable = default) { return client.ExecuteAsync(new EditProxy { - ProxyId = proxyId, Server = server, Port = port, Enable = enable, Type = type + ProxyId = proxyId, Proxy = proxy, Enable = enable }); } } diff --git a/TdLib.Api/Functions/GetBusinessAccountStarAmount.cs b/TdLib.Api/Functions/GetBusinessAccountStarAmount.cs index 3115b722..df4fbe58 100644 --- a/TdLib.Api/Functions/GetBusinessAccountStarAmount.cs +++ b/TdLib.Api/Functions/GetBusinessAccountStarAmount.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Returns the amount of Telegram Stars owned by a business account; for bots only + /// Returns the Telegram Star amount owned by a business account; for bots only /// public class GetBusinessAccountStarAmount : Function { @@ -36,7 +36,7 @@ public class GetBusinessAccountStarAmount : Function } /// - /// Returns the amount of Telegram Stars owned by a business account; for bots only + /// Returns the Telegram Star amount owned by a business account; for bots only /// public static Task GetBusinessAccountStarAmountAsync( this Client client, string businessConnectionId = default) diff --git a/TdLib.Api/Functions/GetChatOwnerAfterLeaving.cs b/TdLib.Api/Functions/GetChatOwnerAfterLeaving.cs new file mode 100644 index 00000000..7939b9e4 --- /dev/null +++ b/TdLib.Api/Functions/GetChatOwnerAfterLeaving.cs @@ -0,0 +1,53 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns the user who will become the owner of the chat after 7 days if the current user does not return to the chat during that period; requires owner privileges in the chat. + /// Available only for supergroups and channel chats + /// + public class GetChatOwnerAfterLeaving : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getChatOwnerAfterLeaving"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Chat identifier + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("chat_id")] + public long ChatId { get; set; } + } + + /// + /// Returns the user who will become the owner of the chat after 7 days if the current user does not return to the chat during that period; requires owner privileges in the chat. + /// Available only for supergroups and channel chats + /// + public static Task GetChatOwnerAfterLeavingAsync( + this Client client, long chatId = default) + { + return client.ExecuteAsync(new GetChatOwnerAfterLeaving + { + ChatId = chatId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetConnectedAffiliateProgram.cs b/TdLib.Api/Functions/GetConnectedAffiliateProgram.cs index c0334ee1..abe0a433 100644 --- a/TdLib.Api/Functions/GetConnectedAffiliateProgram.cs +++ b/TdLib.Api/Functions/GetConnectedAffiliateProgram.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Returns an affiliate program that were connected to the given affiliate by identifier of the bot that created the program + /// Returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program /// public class GetConnectedAffiliateProgram : Function { @@ -43,7 +43,7 @@ public class GetConnectedAffiliateProgram : Function } /// - /// Returns an affiliate program that were connected to the given affiliate by identifier of the bot that created the program + /// Returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program /// public static Task GetConnectedAffiliateProgramAsync( this Client client, AffiliateType affiliate = default, long botUserId = default) diff --git a/TdLib.Api/Functions/GetExternalLink.cs b/TdLib.Api/Functions/GetExternalLink.cs index 41a2d0cb..7aef5839 100644 --- a/TdLib.Api/Functions/GetExternalLink.cs +++ b/TdLib.Api/Functions/GetExternalLink.cs @@ -11,7 +11,8 @@ namespace TdLib public static partial class TdApi { /// - /// Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed + /// Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. + /// Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. May return an empty link if just a toast about successful login has to be shown /// public class GetExternalLink : Function { @@ -35,22 +36,30 @@ public class GetExternalLink : Function public string Link { get; set; } /// - /// Pass true if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages + /// Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to send them messages /// [JsonConverter(typeof(Converter))] [JsonProperty("allow_write_access")] public bool AllowWriteAccess { get; set; } + + /// + /// Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to access their phone number + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("allow_phone_number_access")] + public bool AllowPhoneNumberAccess { get; set; } } /// - /// Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed + /// Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. + /// Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. May return an empty link if just a toast about successful login has to be shown /// public static Task GetExternalLinkAsync( - this Client client, string link = default, bool allowWriteAccess = default) + this Client client, string link = default, bool allowWriteAccess = default, bool allowPhoneNumberAccess = default) { return client.ExecuteAsync(new GetExternalLink { - Link = link, AllowWriteAccess = allowWriteAccess + Link = link, AllowWriteAccess = allowWriteAccess, AllowPhoneNumberAccess = allowPhoneNumberAccess }); } } diff --git a/TdLib.Api/Functions/GetGiftUpgradePreview.cs b/TdLib.Api/Functions/GetGiftUpgradePreview.cs index f9a449a7..c51591f0 100644 --- a/TdLib.Api/Functions/GetGiftUpgradePreview.cs +++ b/TdLib.Api/Functions/GetGiftUpgradePreview.cs @@ -28,22 +28,22 @@ public class GetGiftUpgradePreview : Function public override string Extra { get; set; } /// - /// Identifier of the gift + /// Identifier of the regular gift /// [JsonConverter(typeof(Converter.Int64))] - [JsonProperty("gift_id")] - public long GiftId { get; set; } + [JsonProperty("regular_gift_id")] + public long RegularGiftId { get; set; } } /// /// Returns examples of possible upgraded gifts for a regular gift /// public static Task GetGiftUpgradePreviewAsync( - this Client client, long giftId = default) + this Client client, long regularGiftId = default) { return client.ExecuteAsync(new GetGiftUpgradePreview { - GiftId = giftId + RegularGiftId = regularGiftId }); } } diff --git a/TdLib.Api/Functions/GetGiftsForCrafting.cs b/TdLib.Api/Functions/GetGiftsForCrafting.cs new file mode 100644 index 00000000..6a5f3bb4 --- /dev/null +++ b/TdLib.Api/Functions/GetGiftsForCrafting.cs @@ -0,0 +1,65 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns upgraded gifts of the current user who can be used to craft another gifts + /// + public class GetGiftsForCrafting : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getGiftsForCrafting"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the regular gift that will be used for crafting + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("regular_gift_id")] + public long RegularGiftId { get; set; } + + /// + /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("offset")] + public string Offset { get; set; } + + /// + /// The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("limit")] + public int Limit { get; set; } + } + + /// + /// Returns upgraded gifts of the current user who can be used to craft another gifts + /// + public static Task GetGiftsForCraftingAsync( + this Client client, long regularGiftId = default, string offset = default, int limit = default) + { + return client.ExecuteAsync(new GetGiftsForCrafting + { + RegularGiftId = regularGiftId, Offset = offset, Limit = limit + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetLoginUrl.cs b/TdLib.Api/Functions/GetLoginUrl.cs index 81815711..eabd4068 100644 --- a/TdLib.Api/Functions/GetLoginUrl.cs +++ b/TdLib.Api/Functions/GetLoginUrl.cs @@ -50,7 +50,7 @@ public class GetLoginUrl : Function public long ButtonId { get; set; } /// - /// Pass true to allow the bot to send messages to the current user + /// Pass true to allow the bot to send messages to the current user. Phone number access can't be requested using the button /// [JsonConverter(typeof(Converter))] [JsonProperty("allow_write_access")] diff --git a/TdLib.Api/Functions/GetProxies.cs b/TdLib.Api/Functions/GetProxies.cs index ad9bc7bb..778685cb 100644 --- a/TdLib.Api/Functions/GetProxies.cs +++ b/TdLib.Api/Functions/GetProxies.cs @@ -13,7 +13,7 @@ public static partial class TdApi /// /// Returns the list of proxies that are currently set up. Can be called before authorization /// - public class GetProxies : Function + public class GetProxies : Function { /// /// Data type for serialization @@ -33,7 +33,7 @@ public class GetProxies : Function /// /// Returns the list of proxies that are currently set up. Can be called before authorization /// - public static Task GetProxiesAsync( + public static Task GetProxiesAsync( this Client client) { return client.ExecuteAsync(new GetProxies diff --git a/TdLib.Api/Functions/GetProxyLink.cs b/TdLib.Api/Functions/GetProxyLink.cs deleted file mode 100644 index 70824ead..00000000 --- a/TdLib.Api/Functions/GetProxyLink.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Threading.Tasks; -using Newtonsoft.Json; - -// REUSE-IgnoreStart -namespace TdLib -{ - /// - /// Autogenerated TDLib APIs - /// - public static partial class TdApi - { - /// - /// Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization - /// - public class GetProxyLink : Function - { - /// - /// Data type for serialization - /// - [JsonProperty("@type")] - public override string DataType { get; set; } = "getProxyLink"; - - /// - /// Extra data attached to the function - /// - [JsonProperty("@extra")] - public override string Extra { get; set; } - - /// - /// Proxy identifier - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("proxy_id")] - public int ProxyId { get; set; } - } - - /// - /// Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization - /// - public static Task GetProxyLinkAsync( - this Client client, int proxyId = default) - { - return client.ExecuteAsync(new GetProxyLink - { - ProxyId = proxyId - }); - } - } -} -// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetStarGiftPaymentOptions.cs b/TdLib.Api/Functions/GetStarGiftPaymentOptions.cs index ed0d6197..5bc88ef0 100644 --- a/TdLib.Api/Functions/GetStarGiftPaymentOptions.cs +++ b/TdLib.Api/Functions/GetStarGiftPaymentOptions.cs @@ -28,7 +28,7 @@ public class GetStarGiftPaymentOptions : Function public override string Extra { get; set; } /// - /// Identifier of the user that will receive Telegram Stars; pass 0 to get options for an unspecified user + /// Identifier of the user who will receive Telegram Stars; pass 0 to get options for an unspecified user /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Functions/GetSupportUser.cs b/TdLib.Api/Functions/GetSupportUser.cs index 9234ffa0..fc5eed80 100644 --- a/TdLib.Api/Functions/GetSupportUser.cs +++ b/TdLib.Api/Functions/GetSupportUser.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Returns a user that can be contacted to get support + /// Returns a user who can be contacted to get support /// public class GetSupportUser : Function { @@ -31,7 +31,7 @@ public class GetSupportUser : Function } /// - /// Returns a user that can be contacted to get support + /// Returns a user who can be contacted to get support /// public static Task GetSupportUserAsync( this Client client) diff --git a/TdLib.Api/Functions/GetUpgradedGiftVariants.cs b/TdLib.Api/Functions/GetUpgradedGiftVariants.cs new file mode 100644 index 00000000..432d631c --- /dev/null +++ b/TdLib.Api/Functions/GetUpgradedGiftVariants.cs @@ -0,0 +1,65 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns all possible variants of upgraded gifts for a regular gift + /// + public class GetUpgradedGiftVariants : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getUpgradedGiftVariants"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the regular gift + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("regular_gift_id")] + public long RegularGiftId { get; set; } + + /// + /// Pass true to get models that can be obtained by upgrading a regular gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("return_upgrade_models")] + public bool ReturnUpgradeModels { get; set; } + + /// + /// Pass true to get models that can be obtained by crafting a gift from upgraded gifts + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("return_craft_models")] + public bool ReturnCraftModels { get; set; } + } + + /// + /// Returns all possible variants of upgraded gifts for a regular gift + /// + public static Task GetUpgradedGiftVariantsAsync( + this Client client, long regularGiftId = default, bool returnUpgradeModels = default, bool returnCraftModels = default) + { + return client.ExecuteAsync(new GetUpgradedGiftVariants + { + RegularGiftId = regularGiftId, ReturnUpgradeModels = returnUpgradeModels, ReturnCraftModels = returnCraftModels + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/PingProxy.cs b/TdLib.Api/Functions/PingProxy.cs index 48a41fba..062ff34f 100644 --- a/TdLib.Api/Functions/PingProxy.cs +++ b/TdLib.Api/Functions/PingProxy.cs @@ -28,22 +28,22 @@ public class PingProxy : Function public override string Extra { get; set; } /// - /// Proxy identifier. Use 0 to ping a Telegram server without a proxy + /// The proxy to test; pass null to ping a Telegram server without a proxy /// [JsonConverter(typeof(Converter))] - [JsonProperty("proxy_id")] - public int ProxyId { get; set; } + [JsonProperty("proxy")] + public Proxy Proxy { get; set; } } /// /// Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization /// public static Task PingProxyAsync( - this Client client, int proxyId = default) + this Client client, Proxy proxy = default) { return client.ExecuteAsync(new PingProxy { - ProxyId = proxyId + Proxy = proxy }); } } diff --git a/TdLib.Api/Functions/PlaceGiftAuctionBid.cs b/TdLib.Api/Functions/PlaceGiftAuctionBid.cs index 6f5318aa..d4986b7a 100644 --- a/TdLib.Api/Functions/PlaceGiftAuctionBid.cs +++ b/TdLib.Api/Functions/PlaceGiftAuctionBid.cs @@ -42,7 +42,7 @@ public class PlaceGiftAuctionBid : Function public long StarCount { get; set; } /// - /// Identifier of the user that will receive the gift + /// Identifier of the user who will receive the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Functions/ProcessChatJoinRequest.cs b/TdLib.Api/Functions/ProcessChatJoinRequest.cs index f06e3f67..2d35817a 100644 --- a/TdLib.Api/Functions/ProcessChatJoinRequest.cs +++ b/TdLib.Api/Functions/ProcessChatJoinRequest.cs @@ -35,7 +35,7 @@ public class ProcessChatJoinRequest : Function public long ChatId { get; set; } /// - /// Identifier of the user that sent the request + /// Identifier of the user who sent the request /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Functions/RefundStarPayment.cs b/TdLib.Api/Functions/RefundStarPayment.cs index f6f155a6..ce4b892b 100644 --- a/TdLib.Api/Functions/RefundStarPayment.cs +++ b/TdLib.Api/Functions/RefundStarPayment.cs @@ -28,7 +28,7 @@ public class RefundStarPayment : Function public override string Extra { get; set; } /// - /// Identifier of the user that did the payment + /// Identifier of the user who did the payment /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Functions/SearchGiftsForResale.cs b/TdLib.Api/Functions/SearchGiftsForResale.cs index dcb64b31..8ed57e6c 100644 --- a/TdLib.Api/Functions/SearchGiftsForResale.cs +++ b/TdLib.Api/Functions/SearchGiftsForResale.cs @@ -41,8 +41,16 @@ public class SearchGiftsForResale : Function [JsonProperty("order")] public GiftForResaleOrder Order { get; set; } + /// + /// Pass true to get only gifts suitable for crafting + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("for_crafting")] + public bool ForCrafting { get; set; } + /// /// Attributes used to filter received gifts. If multiple attributes of the same type are specified, then all of them are allowed. + /// If none attributes of specific type are specified, then all values for this attribute type are allowed /// [JsonProperty("attributes", ItemConverterType = typeof(Converter))] public UpgradedGiftAttributeId[] Attributes { get; set; } @@ -66,11 +74,11 @@ public class SearchGiftsForResale : Function /// Returns upgraded gifts that can be bought from other owners using sendResoldGift /// public static Task SearchGiftsForResaleAsync( - this Client client, long giftId = default, GiftForResaleOrder order = default, UpgradedGiftAttributeId[] attributes = default, string offset = default, int limit = default) + this Client client, long giftId = default, GiftForResaleOrder order = default, bool forCrafting = default, UpgradedGiftAttributeId[] attributes = default, string offset = default, int limit = default) { return client.ExecuteAsync(new SearchGiftsForResale { - GiftId = giftId, Order = order, Attributes = attributes, Offset = offset, Limit = limit + GiftId = giftId, Order = order, ForCrafting = forCrafting, Attributes = attributes, Offset = offset, Limit = limit }); } } diff --git a/TdLib.Api/Functions/SearchPublicPosts.cs b/TdLib.Api/Functions/SearchPublicPosts.cs index 4ef0cd19..82032036 100644 --- a/TdLib.Api/Functions/SearchPublicPosts.cs +++ b/TdLib.Api/Functions/SearchPublicPosts.cs @@ -49,7 +49,7 @@ public class SearchPublicPosts : Function public int Limit { get; set; } /// - /// The amount of Telegram Stars the user agreed to pay for the search; pass 0 for free searches + /// The Telegram Star amount the user agreed to pay for the search; pass 0 for free searches /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Functions/SendChatAction.cs b/TdLib.Api/Functions/SendChatAction.cs index fab2919d..a3b7eca3 100644 --- a/TdLib.Api/Functions/SendChatAction.cs +++ b/TdLib.Api/Functions/SendChatAction.cs @@ -35,7 +35,7 @@ public class SendChatAction : Function public long ChatId { get; set; } /// - /// Identifier of the topic in which the action is performed + /// Identifier of the topic in which the action is performed; pass null if none /// [JsonConverter(typeof(Converter))] [JsonProperty("topic_id")] diff --git a/TdLib.Api/Functions/SetChatPaidMessageStarCount.cs b/TdLib.Api/Functions/SetChatPaidMessageStarCount.cs index 7a96f0cf..2799917f 100644 --- a/TdLib.Api/Functions/SetChatPaidMessageStarCount.cs +++ b/TdLib.Api/Functions/SetChatPaidMessageStarCount.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Changes the amount of Telegram Stars that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages + /// Changes the Telegram Star amount that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages /// public class SetChatPaidMessageStarCount : Function { @@ -44,7 +44,7 @@ public class SetChatPaidMessageStarCount : Function } /// - /// Changes the amount of Telegram Stars that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages + /// Changes the Telegram Star amount that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages /// public static Task SetChatPaidMessageStarCountAsync( this Client client, long chatId = default, long paidMessageStarCount = default) diff --git a/TdLib.Api/Functions/SetPassportElementErrors.cs b/TdLib.Api/Functions/SetPassportElementErrors.cs index 5878095f..4d4fbc9c 100644 --- a/TdLib.Api/Functions/SetPassportElementErrors.cs +++ b/TdLib.Api/Functions/SetPassportElementErrors.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed + /// Informs the user who some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed /// public class SetPassportElementErrors : Function { @@ -42,7 +42,7 @@ public class SetPassportElementErrors : Function } /// - /// Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed + /// Informs the user who some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed /// public static Task SetPassportElementErrorsAsync( this Client client, long userId = default, InputPassportElementError[] errors = default) diff --git a/TdLib.Api/Functions/TestProxy.cs b/TdLib.Api/Functions/TestProxy.cs index d654f602..8e776ef3 100644 --- a/TdLib.Api/Functions/TestProxy.cs +++ b/TdLib.Api/Functions/TestProxy.cs @@ -28,25 +28,11 @@ public class TestProxy : Function public override string Extra { get; set; } /// - /// Proxy server domain or IP address + /// The proxy to test /// [JsonConverter(typeof(Converter))] - [JsonProperty("server")] - public string Server { get; set; } - - /// - /// Proxy server port - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("port")] - public int Port { get; set; } - - /// - /// Proxy type - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("type")] - public ProxyType Type { get; set; } + [JsonProperty("proxy")] + public Proxy Proxy { get; set; } /// /// Identifier of a datacenter with which to test connection @@ -67,11 +53,11 @@ public class TestProxy : Function /// Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization /// public static Task TestProxyAsync( - this Client client, string server = default, int port = default, ProxyType type = default, int dcId = default, double? timeout = default) + this Client client, Proxy proxy = default, int dcId = default, double? timeout = default) { return client.ExecuteAsync(new TestProxy { - Server = server, Port = port, Type = type, DcId = dcId, Timeout = timeout + Proxy = proxy, DcId = dcId, Timeout = timeout }); } } diff --git a/TdLib.Api/Functions/TransferGift.cs b/TdLib.Api/Functions/TransferGift.cs index 3c148d54..cca1907d 100644 --- a/TdLib.Api/Functions/TransferGift.cs +++ b/TdLib.Api/Functions/TransferGift.cs @@ -49,7 +49,7 @@ public class TransferGift : Function public MessageSender NewOwnerId { get; set; } /// - /// The amount of Telegram Stars required to pay for the transfer + /// The Telegram Star amount required to pay for the transfer /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Functions/UpgradeGift.cs b/TdLib.Api/Functions/UpgradeGift.cs index 3a83a30f..f3f21dce 100644 --- a/TdLib.Api/Functions/UpgradeGift.cs +++ b/TdLib.Api/Functions/UpgradeGift.cs @@ -49,7 +49,7 @@ public class UpgradeGift : Function public bool KeepOriginalDetails { get; set; } /// - /// The amount of Telegram Stars required to pay for the upgrade. It the gift has prepaid_upgrade_star_count > 0, then pass 0, otherwise, pass gift.upgrade_star_count + /// The Telegram Star amount required to pay for the upgrade. It the gift has prepaid_upgrade_star_count > 0, then pass 0, otherwise, pass gift.upgrade_star_count /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Objects/AccountInfo.cs b/TdLib.Api/Objects/AccountInfo.cs index 111826aa..79ac7dee 100644 --- a/TdLib.Api/Objects/AccountInfo.cs +++ b/TdLib.Api/Objects/AccountInfo.cs @@ -10,7 +10,7 @@ namespace TdLib public static partial class TdApi { /// - /// Contains basic information about another user that started a chat with the current user + /// Contains basic information about another user who started a chat with the current user /// public partial class AccountInfo : Object { diff --git a/TdLib.Api/Objects/Proxies.cs b/TdLib.Api/Objects/AddedProxies.cs similarity index 76% rename from TdLib.Api/Objects/Proxies.cs rename to TdLib.Api/Objects/AddedProxies.cs index d13bf6ed..804a576f 100644 --- a/TdLib.Api/Objects/Proxies.cs +++ b/TdLib.Api/Objects/AddedProxies.cs @@ -10,15 +10,15 @@ namespace TdLib public static partial class TdApi { /// - /// Represents a list of proxy servers + /// Represents a list of added proxy servers /// - public partial class Proxies : Object + public partial class AddedProxies : Object { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "proxies"; + public override string DataType { get; set; } = "addedProxies"; /// /// Extra data attached to the object @@ -30,7 +30,7 @@ public partial class Proxies : Object /// List of proxy servers /// [JsonProperty("proxies", ItemConverterType = typeof(Converter))] - public Proxy[] Proxies_ { get; set; } + public AddedProxy[] Proxies { get; set; } } } } diff --git a/TdLib.Api/Objects/AddedProxy.cs b/TdLib.Api/Objects/AddedProxy.cs new file mode 100644 index 00000000..15874d25 --- /dev/null +++ b/TdLib.Api/Objects/AddedProxy.cs @@ -0,0 +1,59 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Contains information about a proxy server added to the list of proxies + /// + public partial class AddedProxy : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "addedProxy"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the proxy + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("id")] + public int Id { get; set; } + + /// + /// Point in time (Unix timestamp) when the proxy was last used; 0 if never + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("last_used_date")] + public int LastUsedDate { get; set; } + + /// + /// True, if the proxy is enabled now + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_enabled")] + public bool IsEnabled { get; set; } + + /// + /// The proxy + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("proxy")] + public Proxy Proxy { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/AffiliateInfo.cs b/TdLib.Api/Objects/AffiliateInfo.cs index 6d050a6b..89dbcdae 100644 --- a/TdLib.Api/Objects/AffiliateInfo.cs +++ b/TdLib.Api/Objects/AffiliateInfo.cs @@ -41,7 +41,7 @@ public partial class AffiliateInfo : Object public long AffiliateChatId { get; set; } /// - /// The amount of Telegram Stars that were received by the affiliate; can be negative for refunds + /// The Telegram Star amount that was received by the affiliate; can be negative for refunds /// [JsonConverter(typeof(Converter))] [JsonProperty("star_amount")] diff --git a/TdLib.Api/Objects/AttributeCraftPersistenceProbability.cs b/TdLib.Api/Objects/AttributeCraftPersistenceProbability.cs new file mode 100644 index 00000000..4c15bbd4 --- /dev/null +++ b/TdLib.Api/Objects/AttributeCraftPersistenceProbability.cs @@ -0,0 +1,37 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes chance of the crafted gift to have the backdrop or symbol of one of the original gifts + /// + public partial class AttributeCraftPersistenceProbability : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "attributeCraftPersistenceProbability"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The 4 numbers that describe probability of the craft result to have the same attribute as one of the original gifts + /// + [JsonProperty("persistence_chance_per_mille", ItemConverterType = typeof(Converter))] + public int[] PersistenceChancePerMille { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/BusinessBotRights.cs b/TdLib.Api/Objects/BusinessBotRights.cs index ab854dd5..b5b7224f 100644 --- a/TdLib.Api/Objects/BusinessBotRights.cs +++ b/TdLib.Api/Objects/BusinessBotRights.cs @@ -83,7 +83,7 @@ public partial class BusinessBotRights : Object public bool CanEditUsername { get; set; } /// - /// True, if the bot can view gifts and amount of Telegram Stars owned by the business account + /// True, if the bot can view gifts and Telegram Star amount owned by the business account /// [JsonConverter(typeof(Converter))] [JsonProperty("can_view_gifts_and_stars")] diff --git a/TdLib.Api/Objects/BusinessConnection.cs b/TdLib.Api/Objects/BusinessConnection.cs index 9d4e9d55..f1ad6b4d 100644 --- a/TdLib.Api/Objects/BusinessConnection.cs +++ b/TdLib.Api/Objects/BusinessConnection.cs @@ -34,7 +34,7 @@ public partial class BusinessConnection : Object public string Id { get; set; } /// - /// Identifier of the business user that created the connection + /// Identifier of the business user who created the connection /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/ButtonStyleDanger.cs b/TdLib.Api/Objects/ButtonStyleDanger.cs new file mode 100644 index 00000000..d9500c39 --- /dev/null +++ b/TdLib.Api/Objects/ButtonStyleDanger.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class ButtonStyle : Object + { + /// + /// The button has red color + /// + public class ButtonStyleDanger : ButtonStyle + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "buttonStyleDanger"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/ButtonStyleDefault.cs b/TdLib.Api/Objects/ButtonStyleDefault.cs new file mode 100644 index 00000000..a1a8a883 --- /dev/null +++ b/TdLib.Api/Objects/ButtonStyleDefault.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class ButtonStyle : Object + { + /// + /// Describes style of a button + /// + public class ButtonStyleDefault : ButtonStyle + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "buttonStyleDefault"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/ButtonStylePrimary.cs b/TdLib.Api/Objects/ButtonStylePrimary.cs new file mode 100644 index 00000000..3bd9fa26 --- /dev/null +++ b/TdLib.Api/Objects/ButtonStylePrimary.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class ButtonStyle : Object + { + /// + /// The button has dark blue color + /// + public class ButtonStylePrimary : ButtonStyle + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "buttonStylePrimary"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/ButtonStyleSuccess.cs b/TdLib.Api/Objects/ButtonStyleSuccess.cs new file mode 100644 index 00000000..9fbeaf53 --- /dev/null +++ b/TdLib.Api/Objects/ButtonStyleSuccess.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class ButtonStyle : Object + { + /// + /// The button has green color + /// + public class ButtonStyleSuccess : ButtonStyle + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "buttonStyleSuccess"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/Call.cs b/TdLib.Api/Objects/Call.cs index 80bcb491..7e027878 100644 --- a/TdLib.Api/Objects/Call.cs +++ b/TdLib.Api/Objects/Call.cs @@ -33,6 +33,13 @@ public partial class Call : Object [JsonProperty("id")] public int Id { get; set; } + /// + /// Persistent unique call identifier; 0 if isn't assigned yet by the server + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("unique_id")] + public long UniqueId { get; set; } + /// /// User identifier of the other call participant /// diff --git a/TdLib.Api/Objects/CanPostStoryResultMonthlyLimitExceeded.cs b/TdLib.Api/Objects/CanPostStoryResultMonthlyLimitExceeded.cs index e5d04eb7..c3377076 100644 --- a/TdLib.Api/Objects/CanPostStoryResultMonthlyLimitExceeded.cs +++ b/TdLib.Api/Objects/CanPostStoryResultMonthlyLimitExceeded.cs @@ -29,7 +29,7 @@ public class CanPostStoryResultMonthlyLimitExceeded : CanPostStoryResult public override string Extra { get; set; } /// - /// Time left before the user can post the next story + /// Time left before the user can post the next story, in seconds /// [JsonConverter(typeof(Converter))] [JsonProperty("retry_after")] diff --git a/TdLib.Api/Objects/CanPostStoryResultWeeklyLimitExceeded.cs b/TdLib.Api/Objects/CanPostStoryResultWeeklyLimitExceeded.cs index 04422d99..4b009260 100644 --- a/TdLib.Api/Objects/CanPostStoryResultWeeklyLimitExceeded.cs +++ b/TdLib.Api/Objects/CanPostStoryResultWeeklyLimitExceeded.cs @@ -29,7 +29,7 @@ public class CanPostStoryResultWeeklyLimitExceeded : CanPostStoryResult public override string Extra { get; set; } /// - /// Time left before the user can post the next story + /// Time left before the user can post the next story, in seconds /// [JsonConverter(typeof(Converter))] [JsonProperty("retry_after")] diff --git a/TdLib.Api/Objects/ChatBoostSourceGiveaway.cs b/TdLib.Api/Objects/ChatBoostSourceGiveaway.cs index 09d1ff87..c30328cd 100644 --- a/TdLib.Api/Objects/ChatBoostSourceGiveaway.cs +++ b/TdLib.Api/Objects/ChatBoostSourceGiveaway.cs @@ -29,7 +29,7 @@ public class ChatBoostSourceGiveaway : ChatBoostSource public override string Extra { get; set; } /// - /// Identifier of a user that won in the giveaway; 0 if none + /// Identifier of a user who won in the giveaway; 0 if none /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/ChatJoinRequest.cs b/TdLib.Api/Objects/ChatJoinRequest.cs index ea57aa83..452e2164 100644 --- a/TdLib.Api/Objects/ChatJoinRequest.cs +++ b/TdLib.Api/Objects/ChatJoinRequest.cs @@ -10,7 +10,7 @@ namespace TdLib public static partial class TdApi { /// - /// Describes a user that sent a join request and waits for administrator approval + /// Describes a user who sent a join request and waits for administrator approval /// public partial class ChatJoinRequest : Object { diff --git a/TdLib.Api/Objects/ChatMember.cs b/TdLib.Api/Objects/ChatMember.cs index 281c551b..705995f5 100644 --- a/TdLib.Api/Objects/ChatMember.cs +++ b/TdLib.Api/Objects/ChatMember.cs @@ -34,7 +34,7 @@ public partial class ChatMember : Object public MessageSender MemberId { get; set; } /// - /// Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown + /// Identifier of a user who invited/promoted/banned this member in the chat; 0 if unknown /// [JsonConverter(typeof(Converter))] [JsonProperty("inviter_user_id")] diff --git a/TdLib.Api/Objects/ChatRevenueTransactionTypeSuggestedPostEarnings.cs b/TdLib.Api/Objects/ChatRevenueTransactionTypeSuggestedPostEarnings.cs index b3daea94..5de9f873 100644 --- a/TdLib.Api/Objects/ChatRevenueTransactionTypeSuggestedPostEarnings.cs +++ b/TdLib.Api/Objects/ChatRevenueTransactionTypeSuggestedPostEarnings.cs @@ -29,7 +29,7 @@ public class ChatRevenueTransactionTypeSuggestedPostEarnings : ChatRevenueTransa public override string Extra { get; set; } /// - /// Identifier of the user that paid for the suggested post + /// Identifier of the user who paid for the suggested post /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/CloseBirthdayUser.cs b/TdLib.Api/Objects/CloseBirthdayUser.cs index c8214082..dca289e0 100644 --- a/TdLib.Api/Objects/CloseBirthdayUser.cs +++ b/TdLib.Api/Objects/CloseBirthdayUser.cs @@ -10,7 +10,7 @@ namespace TdLib public static partial class TdApi { /// - /// Describes a user that had or will have a birthday soon + /// Describes a user who had or will have a birthday soon /// public partial class CloseBirthdayUser : Object { diff --git a/TdLib.Api/Objects/CraftGiftResultFail.cs b/TdLib.Api/Objects/CraftGiftResultFail.cs new file mode 100644 index 00000000..6aafb2c7 --- /dev/null +++ b/TdLib.Api/Objects/CraftGiftResultFail.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class CraftGiftResult : Object + { + /// + /// Crafting has failed + /// + public class CraftGiftResultFail : CraftGiftResult + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "craftGiftResultFail"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/CraftGiftResultInvalidGift.cs b/TdLib.Api/Objects/CraftGiftResultInvalidGift.cs new file mode 100644 index 00000000..a2d43e40 --- /dev/null +++ b/TdLib.Api/Objects/CraftGiftResultInvalidGift.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class CraftGiftResult : Object + { + /// + /// Crafting isn't possible because one of the gifts isn't suitable for crafting + /// + public class CraftGiftResultInvalidGift : CraftGiftResult + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "craftGiftResultInvalidGift"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/CraftGiftResultSuccess.cs b/TdLib.Api/Objects/CraftGiftResultSuccess.cs new file mode 100644 index 00000000..948a5d04 --- /dev/null +++ b/TdLib.Api/Objects/CraftGiftResultSuccess.cs @@ -0,0 +1,48 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class CraftGiftResult : Object + { + /// + /// Contains result of gift crafting + /// + public class CraftGiftResultSuccess : CraftGiftResult + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "craftGiftResultSuccess"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The created gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gift")] + public UpgradedGift Gift { get; set; } + + /// + /// Unique identifier of the received gift for the current user + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("received_gift_id")] + public string ReceivedGiftId { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/CraftGiftResultTooEarly.cs b/TdLib.Api/Objects/CraftGiftResultTooEarly.cs new file mode 100644 index 00000000..37218e8b --- /dev/null +++ b/TdLib.Api/Objects/CraftGiftResultTooEarly.cs @@ -0,0 +1,41 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class CraftGiftResult : Object + { + /// + /// Crafting isn't possible because one of the gifts can't be used for crafting yet + /// + public class CraftGiftResultTooEarly : CraftGiftResult + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "craftGiftResultTooEarly"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Time left before the gift can be used for crafting + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("retry_after")] + public int RetryAfter { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/FailedToAddMember.cs b/TdLib.Api/Objects/FailedToAddMember.cs index c5733116..73b49f6e 100644 --- a/TdLib.Api/Objects/FailedToAddMember.cs +++ b/TdLib.Api/Objects/FailedToAddMember.cs @@ -10,7 +10,7 @@ namespace TdLib public static partial class TdApi { /// - /// Contains information about a user that has failed to be added to a chat + /// Contains information about a user who has failed to be added to a chat /// public partial class FailedToAddMember : Object { diff --git a/TdLib.Api/Objects/GiftResalePriceStar.cs b/TdLib.Api/Objects/GiftResalePriceStar.cs index 1e0bd215..47ae0598 100644 --- a/TdLib.Api/Objects/GiftResalePriceStar.cs +++ b/TdLib.Api/Objects/GiftResalePriceStar.cs @@ -29,7 +29,7 @@ public class GiftResalePriceStar : GiftResalePrice public override string Extra { get; set; } /// - /// The amount of Telegram Stars expected to be paid for the gift. Must be in the range + /// The Telegram Star amount expected to be paid for the gift. Must be in the range /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Objects/GiftResaleResultOk.cs b/TdLib.Api/Objects/GiftResaleResultOk.cs index c4694001..a3be6895 100644 --- a/TdLib.Api/Objects/GiftResaleResultOk.cs +++ b/TdLib.Api/Objects/GiftResaleResultOk.cs @@ -28,7 +28,12 @@ public class GiftResaleResultOk : GiftResaleResult [JsonProperty("@extra")] public override string Extra { get; set; } - + /// + /// Unique identifier of the received gift; only for the gifts sent to the current user + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("received_gift_id")] + public string ReceivedGiftId { get; set; } } } } diff --git a/TdLib.Api/Objects/GiftUpgradePrice.cs b/TdLib.Api/Objects/GiftUpgradePrice.cs index 6a560399..6d982d46 100644 --- a/TdLib.Api/Objects/GiftUpgradePrice.cs +++ b/TdLib.Api/Objects/GiftUpgradePrice.cs @@ -34,7 +34,7 @@ public partial class GiftUpgradePrice : Object public int Date { get; set; } /// - /// The amount of Telegram Stars required to pay to upgrade the gift + /// The Telegram Star amount required to pay to upgrade the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Objects/GiftsForCrafting.cs b/TdLib.Api/Objects/GiftsForCrafting.cs new file mode 100644 index 00000000..699a2aea --- /dev/null +++ b/TdLib.Api/Objects/GiftsForCrafting.cs @@ -0,0 +1,57 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a list of gifts received by a user or a chat + /// + public partial class GiftsForCrafting : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "giftsForCrafting"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The total number of received gifts + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("total_count")] + public int TotalCount { get; set; } + + /// + /// The list of gifts + /// + [JsonProperty("gifts", ItemConverterType = typeof(Converter))] + public ReceivedGift[] Gifts { get; set; } + + /// + /// The 4 objects that describe probabilities of the crafted gift to have the backdrop or symbol of one of the original gifts + /// + [JsonProperty("attribute_persistence_probabilities", ItemConverterType = typeof(Converter))] + public AttributeCraftPersistenceProbability[] AttributePersistenceProbabilities { get; set; } + + /// + /// The offset for the next request. If empty, then there are no more results + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("next_offset")] + public string NextOffset { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/GiveawayInfoCompleted.cs b/TdLib.Api/Objects/GiveawayInfoCompleted.cs index 7e82c7b8..ba7892ce 100644 --- a/TdLib.Api/Objects/GiveawayInfoCompleted.cs +++ b/TdLib.Api/Objects/GiveawayInfoCompleted.cs @@ -78,7 +78,7 @@ public class GiveawayInfoCompleted : GiveawayInfo public string GiftCode { get; set; } /// - /// The amount of Telegram Stars won by the current user; 0 if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Star giveaway + /// The Telegram Star amount won by the current user; 0 if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Star giveaway /// [JsonConverter(typeof(Converter))] [JsonProperty("won_star_count")] diff --git a/TdLib.Api/Objects/GroupCall.cs b/TdLib.Api/Objects/GroupCall.cs index cb5ebaef..9ff36ddf 100644 --- a/TdLib.Api/Objects/GroupCall.cs +++ b/TdLib.Api/Objects/GroupCall.cs @@ -33,6 +33,13 @@ public partial class GroupCall : Object [JsonProperty("id")] public int Id { get; set; } + /// + /// Persistent unique group call identifier + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("unique_id")] + public long UniqueId { get; set; } + /// /// Group call title; for video chats only /// @@ -42,6 +49,7 @@ public partial class GroupCall : Object /// /// Invite link for the group call; for group calls that aren't bound to a chat. For video chats call getVideoChatInviteLink to get the link. + /// For live stories in chats with username call getInternalLink with internalLinkTypeLiveStory /// [JsonConverter(typeof(Converter))] [JsonProperty("invite_link")] diff --git a/TdLib.Api/Objects/InlineKeyboardButton.cs b/TdLib.Api/Objects/InlineKeyboardButton.cs index 1ff9bff3..47577d10 100644 --- a/TdLib.Api/Objects/InlineKeyboardButton.cs +++ b/TdLib.Api/Objects/InlineKeyboardButton.cs @@ -33,6 +33,20 @@ public partial class InlineKeyboardButton : Object [JsonProperty("text")] public string Text { get; set; } + /// + /// Identifier of the custom emoji that must be shown on the button; 0 if none + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("icon_custom_emoji_id")] + public long IconCustomEmojiId { get; set; } + + /// + /// Style of the button + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("style")] + public ButtonStyle Style { get; set; } + /// /// Type of the button /// diff --git a/TdLib.Api/Objects/InputMessageStakeDice.cs b/TdLib.Api/Objects/InputMessageStakeDice.cs index 62baf943..6e45f6eb 100644 --- a/TdLib.Api/Objects/InputMessageStakeDice.cs +++ b/TdLib.Api/Objects/InputMessageStakeDice.cs @@ -36,7 +36,7 @@ public class InputMessageStakeDice : InputMessageContent public string StateHash { get; set; } /// - /// The amount of Toncoins that will be staked; in the smallest units of the currency. Must be in the range + /// The Toncoin amount that will be staked; in the smallest units of the currency. Must be in the range /// getOption("stake_dice_stake_amount_min")-getOption("stake_dice_stake_amount_max") /// [JsonConverter(typeof(Converter))] diff --git a/TdLib.Api/Objects/InternalLinkTypeAttachmentMenuBot.cs b/TdLib.Api/Objects/InternalLinkTypeAttachmentMenuBot.cs index 39681169..8c1336c6 100644 --- a/TdLib.Api/Objects/InternalLinkTypeAttachmentMenuBot.cs +++ b/TdLib.Api/Objects/InternalLinkTypeAttachmentMenuBot.cs @@ -12,11 +12,7 @@ public static partial class TdApi public partial class InternalLinkType : Object { /// - /// The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat. - /// Then, call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then, use getAttachmentMenuBot to receive information about the bot. - /// If the bot isn't added to attachment menu, then show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. - /// If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. - /// If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL + /// Describes an internal https://t.me or tg: link, which must be processed by the application in a special way /// public class InternalLinkTypeAttachmentMenuBot : InternalLinkType { diff --git a/TdLib.Api/Objects/InternalLinkTypeCallsPage.cs b/TdLib.Api/Objects/InternalLinkTypeCallsPage.cs new file mode 100644 index 00000000..ca90f543 --- /dev/null +++ b/TdLib.Api/Objects/InternalLinkTypeCallsPage.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class InternalLinkType : Object + { + /// + /// The link is a link to the Call tab or page + /// + public class InternalLinkTypeCallsPage : InternalLinkType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "internalLinkTypeCallsPage"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Section of the page; may be one of + /// "", "all", "missed", "edit", "show-tab", "start-call" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("section")] + public string Section { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeThemeSettings.cs b/TdLib.Api/Objects/InternalLinkTypeChatSelection.cs similarity index 81% rename from TdLib.Api/Objects/InternalLinkTypeThemeSettings.cs rename to TdLib.Api/Objects/InternalLinkTypeChatSelection.cs index 6ece4485..614780eb 100644 --- a/TdLib.Api/Objects/InternalLinkTypeThemeSettings.cs +++ b/TdLib.Api/Objects/InternalLinkTypeChatSelection.cs @@ -12,15 +12,15 @@ public static partial class TdApi public partial class InternalLinkType : Object { /// - /// The link is a link to the theme section of the application settings + /// The link is a link that allows to select some chats /// - public class InternalLinkTypeThemeSettings : InternalLinkType + public class InternalLinkTypeChatSelection : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeThemeSettings"; + public override string DataType { get; set; } = "internalLinkTypeChatSelection"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypeContactsPage.cs b/TdLib.Api/Objects/InternalLinkTypeContactsPage.cs new file mode 100644 index 00000000..6803c29c --- /dev/null +++ b/TdLib.Api/Objects/InternalLinkTypeContactsPage.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class InternalLinkType : Object + { + /// + /// The link is a link to the Contacts tab or page + /// + public class InternalLinkTypeContactsPage : InternalLinkType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "internalLinkTypeContactsPage"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Section of the page; may be one of + /// "", "search", "sort", "new", "invite", "manage" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("section")] + public string Section { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeEditProfileSettings.cs b/TdLib.Api/Objects/InternalLinkTypeEditProfileSettings.cs deleted file mode 100644 index 9c2e380e..00000000 --- a/TdLib.Api/Objects/InternalLinkTypeEditProfileSettings.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Newtonsoft.Json; - -// REUSE-IgnoreStart -namespace TdLib -{ - /// - /// Autogenerated TDLib APIs - /// - public static partial class TdApi - { - public partial class InternalLinkType : Object - { - /// - /// The link is a link to the edit profile section of the application settings - /// - public class InternalLinkTypeEditProfileSettings : InternalLinkType - { - /// - /// Data type for serialization - /// - [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeEditProfileSettings"; - - /// - /// Extra data attached to the message - /// - [JsonProperty("@extra")] - public override string Extra { get; set; } - - - } - } - } -} -// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeLoginEmailSettings.cs b/TdLib.Api/Objects/InternalLinkTypeLoginEmailSettings.cs deleted file mode 100644 index 191980cd..00000000 --- a/TdLib.Api/Objects/InternalLinkTypeLoginEmailSettings.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Newtonsoft.Json; - -// REUSE-IgnoreStart -namespace TdLib -{ - /// - /// Autogenerated TDLib APIs - /// - public static partial class TdApi - { - public partial class InternalLinkType : Object - { - /// - /// The link is a link to the login email set up section of the application settings, forcing set up of the login email - /// - public class InternalLinkTypeLoginEmailSettings : InternalLinkType - { - /// - /// Data type for serialization - /// - [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeLoginEmailSettings"; - - /// - /// Extra data attached to the message - /// - [JsonProperty("@extra")] - public override string Extra { get; set; } - - - } - } - } -} -// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeMyProfilePage.cs b/TdLib.Api/Objects/InternalLinkTypeMyProfilePage.cs new file mode 100644 index 00000000..4f883aca --- /dev/null +++ b/TdLib.Api/Objects/InternalLinkTypeMyProfilePage.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class InternalLinkType : Object + { + /// + /// The link is a link to the My Profile application page + /// + public class InternalLinkTypeMyProfilePage : InternalLinkType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "internalLinkTypeMyProfilePage"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Section of the page; may be one of + /// "", "posts", "posts/all-stories", "posts/add-album", "gifts", "archived-posts" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("section")] + public string Section { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeMyStars.cs b/TdLib.Api/Objects/InternalLinkTypeMyStars.cs deleted file mode 100644 index ad9a9027..00000000 --- a/TdLib.Api/Objects/InternalLinkTypeMyStars.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Newtonsoft.Json; - -// REUSE-IgnoreStart -namespace TdLib -{ - /// - /// Autogenerated TDLib APIs - /// - public static partial class TdApi - { - public partial class InternalLinkType : Object - { - /// - /// The link is a link to the screen with information about Telegram Star balance and transactions of the current user - /// - public class InternalLinkTypeMyStars : InternalLinkType - { - /// - /// Data type for serialization - /// - [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeMyStars"; - - /// - /// Extra data attached to the message - /// - [JsonProperty("@extra")] - public override string Extra { get; set; } - - - } - } - } -} -// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeMyToncoins.cs b/TdLib.Api/Objects/InternalLinkTypeMyToncoins.cs deleted file mode 100644 index c41550e8..00000000 --- a/TdLib.Api/Objects/InternalLinkTypeMyToncoins.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Newtonsoft.Json; - -// REUSE-IgnoreStart -namespace TdLib -{ - /// - /// Autogenerated TDLib APIs - /// - public static partial class TdApi - { - public partial class InternalLinkType : Object - { - /// - /// The link is a link to the screen with information about Toncoin balance and transactions of the current user - /// - public class InternalLinkTypeMyToncoins : InternalLinkType - { - /// - /// Data type for serialization - /// - [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeMyToncoins"; - - /// - /// Extra data attached to the message - /// - [JsonProperty("@extra")] - public override string Extra { get; set; } - - - } - } - } -} -// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeLanguageSettings.cs b/TdLib.Api/Objects/InternalLinkTypeNewChannelChat.cs similarity index 80% rename from TdLib.Api/Objects/InternalLinkTypeLanguageSettings.cs rename to TdLib.Api/Objects/InternalLinkTypeNewChannelChat.cs index e25034a7..9afa4f66 100644 --- a/TdLib.Api/Objects/InternalLinkTypeLanguageSettings.cs +++ b/TdLib.Api/Objects/InternalLinkTypeNewChannelChat.cs @@ -12,15 +12,15 @@ public static partial class TdApi public partial class InternalLinkType : Object { /// - /// The link is a link to the language section of the application settings + /// The link is a link to the screen for creating a new channel chat /// - public class InternalLinkTypeLanguageSettings : InternalLinkType + public class InternalLinkTypeNewChannelChat : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeLanguageSettings"; + public override string DataType { get; set; } = "internalLinkTypeNewChannelChat"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypePasswordSettings.cs b/TdLib.Api/Objects/InternalLinkTypeNewGroupChat.cs similarity index 80% rename from TdLib.Api/Objects/InternalLinkTypePasswordSettings.cs rename to TdLib.Api/Objects/InternalLinkTypeNewGroupChat.cs index b4f7cc94..4639e6d4 100644 --- a/TdLib.Api/Objects/InternalLinkTypePasswordSettings.cs +++ b/TdLib.Api/Objects/InternalLinkTypeNewGroupChat.cs @@ -12,15 +12,15 @@ public static partial class TdApi public partial class InternalLinkType : Object { /// - /// The link is a link to the password section of the application settings + /// The link is a link to the screen for creating a new group chat /// - public class InternalLinkTypePasswordSettings : InternalLinkType + public class InternalLinkTypeNewGroupChat : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypePasswordSettings"; + public override string DataType { get; set; } = "internalLinkTypeNewGroupChat"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypeChangePhoneNumber.cs b/TdLib.Api/Objects/InternalLinkTypeNewPrivateChat.cs similarity index 79% rename from TdLib.Api/Objects/InternalLinkTypeChangePhoneNumber.cs rename to TdLib.Api/Objects/InternalLinkTypeNewPrivateChat.cs index 1a0d3584..a4a75e50 100644 --- a/TdLib.Api/Objects/InternalLinkTypeChangePhoneNumber.cs +++ b/TdLib.Api/Objects/InternalLinkTypeNewPrivateChat.cs @@ -12,15 +12,15 @@ public static partial class TdApi public partial class InternalLinkType : Object { /// - /// The link is a link to the change phone number section of the application + /// The link is a link to the screen for creating a new private chat with a contact /// - public class InternalLinkTypeChangePhoneNumber : InternalLinkType + public class InternalLinkTypeNewPrivateChat : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeChangePhoneNumber"; + public override string DataType { get; set; } = "internalLinkTypeNewPrivateChat"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypeDefaultMessageAutoDeleteTimerSettings.cs b/TdLib.Api/Objects/InternalLinkTypeNewStory.cs similarity index 62% rename from TdLib.Api/Objects/InternalLinkTypeDefaultMessageAutoDeleteTimerSettings.cs rename to TdLib.Api/Objects/InternalLinkTypeNewStory.cs index b75fb118..5e201f98 100644 --- a/TdLib.Api/Objects/InternalLinkTypeDefaultMessageAutoDeleteTimerSettings.cs +++ b/TdLib.Api/Objects/InternalLinkTypeNewStory.cs @@ -12,15 +12,15 @@ public static partial class TdApi public partial class InternalLinkType : Object { /// - /// The link is a link to the default message auto-delete timer settings section of the application settings + /// The link is a link to open the story posting interface /// - public class InternalLinkTypeDefaultMessageAutoDeleteTimerSettings : InternalLinkType + public class InternalLinkTypeNewStory : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeDefaultMessageAutoDeleteTimerSettings"; + public override string DataType { get; set; } = "internalLinkTypeNewStory"; /// /// Extra data attached to the message @@ -28,7 +28,12 @@ public class InternalLinkTypeDefaultMessageAutoDeleteTimerSettings : InternalLin [JsonProperty("@extra")] public override string Extra { get; set; } - + /// + /// The type of the content of the story to post; may be null if unspecified + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("content_type")] + public StoryContentType ContentType { get; set; } } } } diff --git a/TdLib.Api/Objects/InternalLinkTypePhoneNumberPrivacySettings.cs b/TdLib.Api/Objects/InternalLinkTypePhoneNumberPrivacySettings.cs deleted file mode 100644 index 0d879e34..00000000 --- a/TdLib.Api/Objects/InternalLinkTypePhoneNumberPrivacySettings.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Newtonsoft.Json; - -// REUSE-IgnoreStart -namespace TdLib -{ - /// - /// Autogenerated TDLib APIs - /// - public static partial class TdApi - { - public partial class InternalLinkType : Object - { - /// - /// The link is a link to the phone number privacy settings section of the application settings - /// - public class InternalLinkTypePhoneNumberPrivacySettings : InternalLinkType - { - /// - /// Data type for serialization - /// - [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypePhoneNumberPrivacySettings"; - - /// - /// Extra data attached to the message - /// - [JsonProperty("@extra")] - public override string Extra { get; set; } - - - } - } - } -} -// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypePremiumFeatures.cs b/TdLib.Api/Objects/InternalLinkTypePremiumFeaturesPage.cs similarity index 91% rename from TdLib.Api/Objects/InternalLinkTypePremiumFeatures.cs rename to TdLib.Api/Objects/InternalLinkTypePremiumFeaturesPage.cs index b600d40d..02a00451 100644 --- a/TdLib.Api/Objects/InternalLinkTypePremiumFeatures.cs +++ b/TdLib.Api/Objects/InternalLinkTypePremiumFeaturesPage.cs @@ -14,13 +14,13 @@ public partial class InternalLinkType : Object /// /// The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link /// - public class InternalLinkTypePremiumFeatures : InternalLinkType + public class InternalLinkTypePremiumFeaturesPage : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypePremiumFeatures"; + public override string DataType { get; set; } = "internalLinkTypePremiumFeaturesPage"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypePremiumGift.cs b/TdLib.Api/Objects/InternalLinkTypePremiumGiftPurchase.cs similarity index 91% rename from TdLib.Api/Objects/InternalLinkTypePremiumGift.cs rename to TdLib.Api/Objects/InternalLinkTypePremiumGiftPurchase.cs index 176f671e..776bf6a4 100644 --- a/TdLib.Api/Objects/InternalLinkTypePremiumGift.cs +++ b/TdLib.Api/Objects/InternalLinkTypePremiumGiftPurchase.cs @@ -14,13 +14,13 @@ public partial class InternalLinkType : Object /// /// The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGift payments or in-store purchases /// - public class InternalLinkTypePremiumGift : InternalLinkType + public class InternalLinkTypePremiumGiftPurchase : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypePremiumGift"; + public override string DataType { get; set; } = "internalLinkTypePremiumGiftPurchase"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypePrivacyAndSecuritySettings.cs b/TdLib.Api/Objects/InternalLinkTypePrivacyAndSecuritySettings.cs deleted file mode 100644 index 685c9f39..00000000 --- a/TdLib.Api/Objects/InternalLinkTypePrivacyAndSecuritySettings.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Newtonsoft.Json; - -// REUSE-IgnoreStart -namespace TdLib -{ - /// - /// Autogenerated TDLib APIs - /// - public static partial class TdApi - { - public partial class InternalLinkType : Object - { - /// - /// The link is a link to the privacy and security section of the application settings - /// - public class InternalLinkTypePrivacyAndSecuritySettings : InternalLinkType - { - /// - /// Data type for serialization - /// - [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypePrivacyAndSecuritySettings"; - - /// - /// Extra data attached to the message - /// - [JsonProperty("@extra")] - public override string Extra { get; set; } - - - } - } - } -} -// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeProxy.cs b/TdLib.Api/Objects/InternalLinkTypeProxy.cs index b696ebb9..82a391b2 100644 --- a/TdLib.Api/Objects/InternalLinkTypeProxy.cs +++ b/TdLib.Api/Objects/InternalLinkTypeProxy.cs @@ -29,25 +29,11 @@ public class InternalLinkTypeProxy : InternalLinkType public override string Extra { get; set; } /// - /// Proxy server domain or IP address + /// The proxy; may be null if the proxy is unsupported, in which case an alert can be shown to the user /// [JsonConverter(typeof(Converter))] - [JsonProperty("server")] - public string Server { get; set; } - - /// - /// Proxy server port - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("port")] - public int Port { get; set; } - - /// - /// Type of the proxy - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("type")] - public ProxyType Type { get; set; } + [JsonProperty("proxy")] + public Proxy Proxy { get; set; } } } } diff --git a/TdLib.Api/Objects/InternalLinkTypeActiveSessions.cs b/TdLib.Api/Objects/InternalLinkTypeSavedMessages.cs similarity index 77% rename from TdLib.Api/Objects/InternalLinkTypeActiveSessions.cs rename to TdLib.Api/Objects/InternalLinkTypeSavedMessages.cs index b772599d..80c7b106 100644 --- a/TdLib.Api/Objects/InternalLinkTypeActiveSessions.cs +++ b/TdLib.Api/Objects/InternalLinkTypeSavedMessages.cs @@ -12,15 +12,15 @@ public static partial class TdApi public partial class InternalLinkType : Object { /// - /// Describes an internal https://t.me or tg: link, which must be processed by the application in a special way + /// The link is a link to the Saved Messages chat. Call createPrivateChat with getOption("my_id") and open the chat /// - public class InternalLinkTypeActiveSessions : InternalLinkType + public class InternalLinkTypeSavedMessages : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeActiveSessions"; + public override string DataType { get; set; } = "internalLinkTypeSavedMessages"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypeChatFolderSettings.cs b/TdLib.Api/Objects/InternalLinkTypeSearch.cs similarity index 79% rename from TdLib.Api/Objects/InternalLinkTypeChatFolderSettings.cs rename to TdLib.Api/Objects/InternalLinkTypeSearch.cs index 21ac4bb1..88cc0935 100644 --- a/TdLib.Api/Objects/InternalLinkTypeChatFolderSettings.cs +++ b/TdLib.Api/Objects/InternalLinkTypeSearch.cs @@ -12,15 +12,15 @@ public static partial class TdApi public partial class InternalLinkType : Object { /// - /// The link is a link to the folder section of the application settings + /// The link is a link to the global chat and messages search field /// - public class InternalLinkTypeChatFolderSettings : InternalLinkType + public class InternalLinkTypeSearch : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeChatFolderSettings"; + public override string DataType { get; set; } = "internalLinkTypeSearch"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypeSettings.cs b/TdLib.Api/Objects/InternalLinkTypeSettings.cs index a815ae7a..fd266128 100644 --- a/TdLib.Api/Objects/InternalLinkTypeSettings.cs +++ b/TdLib.Api/Objects/InternalLinkTypeSettings.cs @@ -28,7 +28,12 @@ public class InternalLinkTypeSettings : InternalLinkType [JsonProperty("@extra")] public override string Extra { get; set; } - + /// + /// Section of the application settings to open; may be null if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("section")] + public SettingsSection Section { get; set; } } } } diff --git a/TdLib.Api/Objects/InternalLinkTypeBuyStars.cs b/TdLib.Api/Objects/InternalLinkTypeStarPurchase.cs similarity index 93% rename from TdLib.Api/Objects/InternalLinkTypeBuyStars.cs rename to TdLib.Api/Objects/InternalLinkTypeStarPurchase.cs index 53fe28b8..88b7edc6 100644 --- a/TdLib.Api/Objects/InternalLinkTypeBuyStars.cs +++ b/TdLib.Api/Objects/InternalLinkTypeStarPurchase.cs @@ -14,13 +14,13 @@ public partial class InternalLinkType : Object /// /// The link is a link to the Telegram Star purchase section of the application /// - public class InternalLinkTypeBuyStars : InternalLinkType + public class InternalLinkTypeStarPurchase : InternalLinkType { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeBuyStars"; + public override string DataType { get; set; } = "internalLinkTypeStarPurchase"; /// /// Extra data attached to the message diff --git a/TdLib.Api/Objects/InternalLinkTypeUnsupportedProxy.cs b/TdLib.Api/Objects/InternalLinkTypeUnsupportedProxy.cs deleted file mode 100644 index f4583b3c..00000000 --- a/TdLib.Api/Objects/InternalLinkTypeUnsupportedProxy.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Newtonsoft.Json; - -// REUSE-IgnoreStart -namespace TdLib -{ - /// - /// Autogenerated TDLib APIs - /// - public static partial class TdApi - { - public partial class InternalLinkType : Object - { - /// - /// The link is a link to an unsupported proxy. An alert can be shown to the user - /// - public class InternalLinkTypeUnsupportedProxy : InternalLinkType - { - /// - /// Data type for serialization - /// - [JsonProperty("@type")] - public override string DataType { get; set; } = "internalLinkTypeUnsupportedProxy"; - - /// - /// Extra data attached to the message - /// - [JsonProperty("@extra")] - public override string Extra { get; set; } - - - } - } - } -} -// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/KeyboardButton.cs b/TdLib.Api/Objects/KeyboardButton.cs index ddc1c55b..b9eb185e 100644 --- a/TdLib.Api/Objects/KeyboardButton.cs +++ b/TdLib.Api/Objects/KeyboardButton.cs @@ -33,6 +33,20 @@ public partial class KeyboardButton : Object [JsonProperty("text")] public string Text { get; set; } + /// + /// Identifier of the custom emoji that must be shown on the button; 0 if none + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("icon_custom_emoji_id")] + public long IconCustomEmojiId { get; set; } + + /// + /// Style of the button + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("style")] + public ButtonStyle Style { get; set; } + /// /// Type of the button /// diff --git a/TdLib.Api/Objects/LoginUrlInfoRequestConfirmation.cs b/TdLib.Api/Objects/LoginUrlInfoRequestConfirmation.cs index 4d80ac85..82200d2f 100644 --- a/TdLib.Api/Objects/LoginUrlInfoRequestConfirmation.cs +++ b/TdLib.Api/Objects/LoginUrlInfoRequestConfirmation.cs @@ -55,6 +55,41 @@ public class LoginUrlInfoRequestConfirmation : LoginUrlInfo [JsonConverter(typeof(Converter))] [JsonProperty("request_write_access")] public bool RequestWriteAccess { get; set; } + + /// + /// True, if the user must be asked for the permission to share their phone number + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("request_phone_number_access")] + public bool RequestPhoneNumberAccess { get; set; } + + /// + /// The version of a browser used for the authorization; may be empty if irrelevant + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("browser")] + public string Browser { get; set; } + + /// + /// Operating system the browser is running on; may be empty if irrelevant + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("platform")] + public string Platform { get; set; } + + /// + /// IP address from which the authorization is performed, in human-readable format; may be empty if irrelevant + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("ip_address")] + public string IpAddress { get; set; } + + /// + /// Human-readable description of a country and a region from which the authorization is performed, based on the IP address; may be empty if irrelevant + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("location")] + public string Location { get; set; } } } } diff --git a/TdLib.Api/Objects/MessageChatOwnerChanged.cs b/TdLib.Api/Objects/MessageChatOwnerChanged.cs new file mode 100644 index 00000000..b3b03446 --- /dev/null +++ b/TdLib.Api/Objects/MessageChatOwnerChanged.cs @@ -0,0 +1,41 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class MessageContent : Object + { + /// + /// The owner of the chat has changed + /// + public class MessageChatOwnerChanged : MessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "messageChatOwnerChanged"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the user who is the new owner of the chat + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("new_owner_user_id")] + public long NewOwnerUserId { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/MessageChatOwnerLeft.cs b/TdLib.Api/Objects/MessageChatOwnerLeft.cs new file mode 100644 index 00000000..8d280657 --- /dev/null +++ b/TdLib.Api/Objects/MessageChatOwnerLeft.cs @@ -0,0 +1,41 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class MessageContent : Object + { + /// + /// The owner of the chat has left + /// + public class MessageChatOwnerLeft : MessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "messageChatOwnerLeft"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the user who will become the new owner of the chat if the previous owner isn't return; 0 if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("new_owner_user_id")] + public long NewOwnerUserId { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/MessageGiftedPremium.cs b/TdLib.Api/Objects/MessageGiftedPremium.cs index 2e43c15d..c6f495d3 100644 --- a/TdLib.Api/Objects/MessageGiftedPremium.cs +++ b/TdLib.Api/Objects/MessageGiftedPremium.cs @@ -29,14 +29,14 @@ public class MessageGiftedPremium : MessageContent public override string Extra { get; set; } /// - /// The identifier of a user that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing + /// The identifier of a user who gifted Telegram Premium; 0 if the gift was anonymous or is outgoing /// [JsonConverter(typeof(Converter))] [JsonProperty("gifter_user_id")] public long GifterUserId { get; set; } /// - /// The identifier of a user that received Telegram Premium; 0 if the gift is incoming + /// The identifier of a user who received Telegram Premium; 0 if the gift is incoming /// [JsonConverter(typeof(Converter))] [JsonProperty("receiver_user_id")] diff --git a/TdLib.Api/Objects/MessageGiftedStars.cs b/TdLib.Api/Objects/MessageGiftedStars.cs index b5d19a3c..387e1aee 100644 --- a/TdLib.Api/Objects/MessageGiftedStars.cs +++ b/TdLib.Api/Objects/MessageGiftedStars.cs @@ -29,14 +29,14 @@ public class MessageGiftedStars : MessageContent public override string Extra { get; set; } /// - /// The identifier of a user that gifted Telegram Stars; 0 if the gift was anonymous or is outgoing + /// The identifier of a user who gifted Telegram Stars; 0 if the gift was anonymous or is outgoing /// [JsonConverter(typeof(Converter))] [JsonProperty("gifter_user_id")] public long GifterUserId { get; set; } /// - /// The identifier of a user that received Telegram Stars; 0 if the gift is incoming + /// The identifier of a user who received Telegram Stars; 0 if the gift is incoming /// [JsonConverter(typeof(Converter))] [JsonProperty("receiver_user_id")] diff --git a/TdLib.Api/Objects/MessageGiftedTon.cs b/TdLib.Api/Objects/MessageGiftedTon.cs index 2ea0ff6f..f4694d16 100644 --- a/TdLib.Api/Objects/MessageGiftedTon.cs +++ b/TdLib.Api/Objects/MessageGiftedTon.cs @@ -29,21 +29,21 @@ public class MessageGiftedTon : MessageContent public override string Extra { get; set; } /// - /// The identifier of a user that gifted Toncoins; 0 if the gift was anonymous or is outgoing + /// The identifier of a user who gifted Toncoins; 0 if the gift was anonymous or is outgoing /// [JsonConverter(typeof(Converter))] [JsonProperty("gifter_user_id")] public long GifterUserId { get; set; } /// - /// The identifier of a user that received Toncoins; 0 if the gift is incoming + /// The identifier of a user who received Toncoins; 0 if the gift is incoming /// [JsonConverter(typeof(Converter))] [JsonProperty("receiver_user_id")] public long ReceiverUserId { get; set; } /// - /// The received amount of Toncoins, in the smallest units of the cryptocurrency + /// The received Toncoin amount, in the smallest units of the cryptocurrency /// [JsonConverter(typeof(Converter))] [JsonProperty("ton_amount")] diff --git a/TdLib.Api/Objects/MessageGroupCall.cs b/TdLib.Api/Objects/MessageGroupCall.cs index 82efb91c..48fa57c7 100644 --- a/TdLib.Api/Objects/MessageGroupCall.cs +++ b/TdLib.Api/Objects/MessageGroupCall.cs @@ -30,6 +30,13 @@ public class MessageGroupCall : MessageContent [JsonProperty("@extra")] public override string Extra { get; set; } + /// + /// Persistent unique group call identifier + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("unique_id")] + public long UniqueId { get; set; } + /// /// True, if the call is active, i.e. the called user joined the call /// diff --git a/TdLib.Api/Objects/MessageOriginUser.cs b/TdLib.Api/Objects/MessageOriginUser.cs index f08d2bb1..c9da1bc1 100644 --- a/TdLib.Api/Objects/MessageOriginUser.cs +++ b/TdLib.Api/Objects/MessageOriginUser.cs @@ -29,7 +29,7 @@ public class MessageOriginUser : MessageOrigin public override string Extra { get; set; } /// - /// Identifier of the user that originally sent the message + /// Identifier of the user who originally sent the message /// [JsonConverter(typeof(Converter))] [JsonProperty("sender_user_id")] diff --git a/TdLib.Api/Objects/MessagePremiumGiftCode.cs b/TdLib.Api/Objects/MessagePremiumGiftCode.cs index 2674cb66..15b06627 100644 --- a/TdLib.Api/Objects/MessagePremiumGiftCode.cs +++ b/TdLib.Api/Objects/MessagePremiumGiftCode.cs @@ -29,7 +29,7 @@ public class MessagePremiumGiftCode : MessageContent public override string Extra { get; set; } /// - /// Identifier of a chat or a user that created the gift code; may be null if unknown + /// Identifier of a chat or a user who created the gift code; may be null if unknown /// [JsonConverter(typeof(Converter))] [JsonProperty("creator_id")] diff --git a/TdLib.Api/Objects/MessageSenderUser.cs b/TdLib.Api/Objects/MessageSenderUser.cs index ea526a17..8c018b9a 100644 --- a/TdLib.Api/Objects/MessageSenderUser.cs +++ b/TdLib.Api/Objects/MessageSenderUser.cs @@ -29,7 +29,7 @@ public class MessageSenderUser : MessageSender public override string Extra { get; set; } /// - /// Identifier of the user that sent the message + /// Identifier of the user who sent the message /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/MessageStakeDice.cs b/TdLib.Api/Objects/MessageStakeDice.cs index 697db3b3..e1579206 100644 --- a/TdLib.Api/Objects/MessageStakeDice.cs +++ b/TdLib.Api/Objects/MessageStakeDice.cs @@ -50,14 +50,14 @@ public class MessageStakeDice : MessageContent public int Value { get; set; } /// - /// The amount of Toncoins that were staked; in the smallest units of the currency + /// The Toncoin amount that was staked; in the smallest units of the currency /// [JsonConverter(typeof(Converter))] [JsonProperty("stake_toncoin_amount")] public long StakeToncoinAmount { get; set; } /// - /// The amount of Toncoins that were gained from the roll; in the smallest units of the currency; -1 if the dice don't have final state yet + /// The Toncoin amount that was gained from the roll; in the smallest units of the currency; -1 if the dice don't have final state yet /// [JsonConverter(typeof(Converter))] [JsonProperty("prize_toncoin_amount")] diff --git a/TdLib.Api/Objects/MessageUpgradedGift.cs b/TdLib.Api/Objects/MessageUpgradedGift.cs index b0e6584c..2654a2e9 100644 --- a/TdLib.Api/Objects/MessageUpgradedGift.cs +++ b/TdLib.Api/Objects/MessageUpgradedGift.cs @@ -118,6 +118,13 @@ public class MessageUpgradedGift : MessageContent [JsonConverter(typeof(Converter))] [JsonProperty("export_date")] public int ExportDate { get; set; } + + /// + /// Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("craft_date")] + public int CraftDate { get; set; } } } } diff --git a/TdLib.Api/Objects/PaidReactor.cs b/TdLib.Api/Objects/PaidReactor.cs index 26e31f9b..eed4bf33 100644 --- a/TdLib.Api/Objects/PaidReactor.cs +++ b/TdLib.Api/Objects/PaidReactor.cs @@ -10,7 +10,7 @@ namespace TdLib public static partial class TdApi { /// - /// Contains information about a user that added paid reactions + /// Contains information about a user who added paid reactions /// public partial class PaidReactor : Object { diff --git a/TdLib.Api/Objects/PremiumGiftCodeInfo.cs b/TdLib.Api/Objects/PremiumGiftCodeInfo.cs index 3782ce30..1aac4813 100644 --- a/TdLib.Api/Objects/PremiumGiftCodeInfo.cs +++ b/TdLib.Api/Objects/PremiumGiftCodeInfo.cs @@ -27,7 +27,7 @@ public partial class PremiumGiftCodeInfo : Object public override string Extra { get; set; } /// - /// Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used + /// Identifier of a chat or a user who created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used /// [JsonConverter(typeof(Converter))] [JsonProperty("creator_id")] diff --git a/TdLib.Api/Objects/PremiumGiftPaymentOption.cs b/TdLib.Api/Objects/PremiumGiftPaymentOption.cs index 01209b1e..6c5f94aa 100644 --- a/TdLib.Api/Objects/PremiumGiftPaymentOption.cs +++ b/TdLib.Api/Objects/PremiumGiftPaymentOption.cs @@ -41,7 +41,7 @@ public partial class PremiumGiftPaymentOption : Object public long Amount { get; set; } /// - /// The alternative amount of Telegram Stars to pay; 0 if payment in Telegram Stars is not possible + /// The alternative Telegram Star amount to pay; 0 if payment in Telegram Stars is not possible /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Objects/PremiumSourceLink.cs b/TdLib.Api/Objects/PremiumSourceLink.cs index 0cb9b7de..b1c50089 100644 --- a/TdLib.Api/Objects/PremiumSourceLink.cs +++ b/TdLib.Api/Objects/PremiumSourceLink.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class PremiumSource : Object { /// - /// A user opened an internal link of the type internalLinkTypePremiumFeatures + /// A user opened an internal link of the type internalLinkTypePremiumFeaturesPage /// public class PremiumSourceLink : PremiumSource { diff --git a/TdLib.Api/Objects/Proxy.cs b/TdLib.Api/Objects/Proxy.cs index 36ddeec8..1790fb8f 100644 --- a/TdLib.Api/Objects/Proxy.cs +++ b/TdLib.Api/Objects/Proxy.cs @@ -10,7 +10,7 @@ namespace TdLib public static partial class TdApi { /// - /// Contains information about a proxy server + /// Describes a proxy server /// public partial class Proxy : Object { @@ -26,13 +26,6 @@ public partial class Proxy : Object [JsonProperty("@extra")] public override string Extra { get; set; } - /// - /// Unique identifier of the proxy - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("id")] - public int Id { get; set; } - /// /// Proxy server domain or IP address /// @@ -47,20 +40,6 @@ public partial class Proxy : Object [JsonProperty("port")] public int Port { get; set; } - /// - /// Point in time (Unix timestamp) when the proxy was last used; 0 if never - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("last_used_date")] - public int LastUsedDate { get; set; } - - /// - /// True, if the proxy is enabled now - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("is_enabled")] - public bool IsEnabled { get; set; } - /// /// Type of the proxy /// diff --git a/TdLib.Api/Objects/ReceivedGift.cs b/TdLib.Api/Objects/ReceivedGift.cs index 8edc25a7..f14d32ad 100644 --- a/TdLib.Api/Objects/ReceivedGift.cs +++ b/TdLib.Api/Objects/ReceivedGift.cs @@ -178,6 +178,13 @@ public partial class ReceivedGift : Object [JsonConverter(typeof(Converter))] [JsonProperty("prepaid_upgrade_hash")] public string PrepaidUpgradeHash { get; set; } + + /// + /// Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("craft_date")] + public int CraftDate { get; set; } } } } diff --git a/TdLib.Api/Objects/SettingsSectionAppearance.cs b/TdLib.Api/Objects/SettingsSectionAppearance.cs new file mode 100644 index 00000000..0016bb9d --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionAppearance.cs @@ -0,0 +1,51 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// Describes a section of the application settings + /// + public class SettingsSectionAppearance : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionAppearance"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "themes", "themes/edit", "themes/create", "wallpapers", "wallpapers/edit", "wallpapers/set", + /// "wallpapers/choose-photo", "your-color/profile", "your-color/profile/add-icons", "your-color/profile/use-gift", + /// "your-color/profile/reset", "your-color/name", "your-color/name/add-icons", "your-color/name/use-gift", + /// "night-mode", "auto-night-mode", "text-size", "text-size/use-system", "message-corners", "animations", + /// "stickers-and-emoji", "stickers-and-emoji/edit", "stickers-and-emoji/trending", "stickers-and-emoji/archived", + /// "stickers-and-emoji/archived/edit", "stickers-and-emoji/emoji", "stickers-and-emoji/emoji/edit", + /// "stickers-and-emoji/emoji/archived", "stickers-and-emoji/emoji/archived/edit", "stickers-and-emoji/emoji/suggest", + /// "stickers-and-emoji/emoji/quick-reaction", "stickers-and-emoji/emoji/quick-reaction/choose", + /// "stickers-and-emoji/suggest-by-emoji", "stickers-and-emoji/large-emoji", "stickers-and-emoji/dynamic-order", + /// "stickers-and-emoji/emoji/show-more", "app-icon", "tap-for-next-media" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionAskQuestion.cs b/TdLib.Api/Objects/SettingsSectionAskQuestion.cs new file mode 100644 index 00000000..3b3a9388 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionAskQuestion.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The "Ask a question" section + /// + public class SettingsSectionAskQuestion : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionAskQuestion"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionBusiness.cs b/TdLib.Api/Objects/SettingsSectionBusiness.cs new file mode 100644 index 00000000..4bde32cc --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionBusiness.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The "Telegram Business" section + /// + public class SettingsSectionBusiness : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionBusiness"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "do-not-hide-ads" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionChatFolders.cs b/TdLib.Api/Objects/SettingsSectionChatFolders.cs new file mode 100644 index 00000000..c96310e4 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionChatFolders.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The chat folder settings section + /// + public class SettingsSectionChatFolders : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionChatFolders"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "edit", "create", "add-recommended", "show-tags", "tab-view" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionDataAndStorage.cs b/TdLib.Api/Objects/SettingsSectionDataAndStorage.cs new file mode 100644 index 00000000..327e42d1 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionDataAndStorage.cs @@ -0,0 +1,57 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The data and storage settings section + /// + public class SettingsSectionDataAndStorage : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionDataAndStorage"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "storage", "storage/edit", "storage/auto-remove", "storage/clear-cache", "storage/max-cache", "usage", + /// "usage/mobile", "usage/wifi", "usage/reset", "usage/roaming", "auto-download/mobile", + /// "auto-download/mobile/enable", "auto-download/mobile/usage", "auto-download/mobile/photos", + /// "auto-download/mobile/stories", "auto-download/mobile/videos", "auto-download/mobile/files", "auto-download/wifi", + /// "auto-download/wifi/enable", "auto-download/wifi/usage", "auto-download/wifi/photos", + /// "auto-download/wifi/stories", "auto-download/wifi/videos", "auto-download/wifi/files", "auto-download/roaming", + /// "auto-download/roaming/enable", "auto-download/roaming/usage", "auto-download/roaming/photos", + /// "auto-download/roaming/stories", "auto-download/roaming/videos", "auto-download/roaming/files", + /// "auto-download/reset", "save-to-photos/chats", "save-to-photos/chats/max-video-size", + /// "save-to-photos/chats/add-exception", "save-to-photos/chats/delete-all", "save-to-photos/groups", + /// "save-to-photos/groups/max-video-size", "save-to-photos/groups/add-exception", "save-to-photos/groups/delete-all", + /// "save-to-photos/channels", "save-to-photos/channels/max-video-size", "save-to-photos/channels/add-exception", + /// "save-to-photos/channels/delete-all", "less-data-calls", "open-links", "share-sheet", + /// "share-sheet/suggested-chats", "share-sheet/suggest-by", "share-sheet/reset", "saved-edited-photos", + /// "pause-music", "raise-to-listen", "raise-to-speak", "show-18-content", "proxy", "proxy/edit", "proxy/use-proxy", + /// "proxy/add-proxy", "proxy/share-list", "proxy/use-for-calls" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionDevices.cs b/TdLib.Api/Objects/SettingsSectionDevices.cs new file mode 100644 index 00000000..368be747 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionDevices.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The Devices section + /// + public class SettingsSectionDevices : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionDevices"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "edit", "link-desktop", "terminate-sessions", "auto-terminate" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionEditProfile.cs b/TdLib.Api/Objects/SettingsSectionEditProfile.cs new file mode 100644 index 00000000..d10a551a --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionEditProfile.cs @@ -0,0 +1,45 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The profile edit section + /// + public class SettingsSectionEditProfile : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionEditProfile"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "set-photo", "first-name", "last-name", "emoji-status", "bio", "birthday", "change-number", "username", + /// "your-color", "channel", "add-account", "log-out", "profile-color/profile", "profile-color/profile/add-icons", + /// "profile-color/profile/use-gift", "profile-color/name", "profile-color/name/add-icons", + /// "profile-color/name/use-gift", "profile-photo/use-emoji" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionFaq.cs b/TdLib.Api/Objects/SettingsSectionFaq.cs new file mode 100644 index 00000000..73ed4ad4 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionFaq.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The FAQ section + /// + public class SettingsSectionFaq : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionFaq"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionFeatures.cs b/TdLib.Api/Objects/SettingsSectionFeatures.cs new file mode 100644 index 00000000..a1ddc0e6 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionFeatures.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The "Telegram Features" section + /// + public class SettingsSectionFeatures : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionFeatures"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionInAppBrowser.cs b/TdLib.Api/Objects/SettingsSectionInAppBrowser.cs new file mode 100644 index 00000000..21c3f5f8 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionInAppBrowser.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The in-app browser settings section + /// + public class SettingsSectionInAppBrowser : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionInAppBrowser"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "enable-browser", "clear-cookies", "clear-cache", "history", "clear-history", "never-open", "clear-list", "search" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionLanguage.cs b/TdLib.Api/Objects/SettingsSectionLanguage.cs new file mode 100644 index 00000000..a8df285e --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionLanguage.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The application language section + /// + public class SettingsSectionLanguage : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionLanguage"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of "", "show-button" for Show Translate Button toggle, + /// "translate-chats" for Translate Entire Chats toggle, "do-not-translate" - for Do Not Translate language list + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionMyStars.cs b/TdLib.Api/Objects/SettingsSectionMyStars.cs new file mode 100644 index 00000000..2bacf8b0 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionMyStars.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The Telegram Star balance and transaction section + /// + public class SettingsSectionMyStars : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionMyStars"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "top-up", "stats", "gift", "earn" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionMyToncoins.cs b/TdLib.Api/Objects/SettingsSectionMyToncoins.cs new file mode 100644 index 00000000..8418021b --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionMyToncoins.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The Toncoin balance and transaction section + /// + public class SettingsSectionMyToncoins : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionMyToncoins"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionNotifications.cs b/TdLib.Api/Objects/SettingsSectionNotifications.cs new file mode 100644 index 00000000..c78b46b4 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionNotifications.cs @@ -0,0 +1,54 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The notification settings section + /// + public class SettingsSectionNotifications : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionNotifications"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "accounts", "private-chats", "private-chats/edit", "private-chats/show", "private-chats/preview", + /// "private-chats/sound", "private-chats/add-exception", "private-chats/delete-exceptions", + /// "private-chats/light-color", "private-chats/vibrate", "private-chats/priority", "groups", "groups/edit", + /// "groups/show", "groups/preview", "groups/sound", "groups/add-exception", "groups/delete-exceptions", + /// "groups/light-color", "groups/vibrate", "groups/priority", "channels", "channels/edit", "channels/show", + /// "channels/preview", "channels/sound", "channels/add-exception", "channels/delete-exceptions", + /// "channels/light-color", "channels/vibrate", "channels/priority", "stories", "stories/new", "stories/important", + /// "stories/show-sender", "stories/sound", "stories/add-exception", "stories/delete-exceptions", + /// "stories/light-color", "stories/vibrate", "stories/priority", "reactions", "reactions/messages", + /// "reactions/stories", "reactions/show-sender", "reactions/sound", "reactions/light-color", "reactions/vibrate", + /// "reactions/priority", "in-app-sounds", "in-app-vibrate", "in-app-preview", "in-chat-sounds", "in-app-popup", + /// "lock-screen-names", "include-channels", "include-muted-chats", "count-unread-messages", "new-contacts", + /// "pinned-messages", "reset", "web" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionPowerSaving.cs b/TdLib.Api/Objects/SettingsSectionPowerSaving.cs new file mode 100644 index 00000000..340795c0 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionPowerSaving.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The power saving settings section + /// + public class SettingsSectionPowerSaving : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionPowerSaving"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "videos", "gifs", "stickers", "emoji", "effects", "preload", "background", "call-animations", "particles", "transitions" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionPremium.cs b/TdLib.Api/Objects/SettingsSectionPremium.cs new file mode 100644 index 00000000..380e0611 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionPremium.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The "Telegram Premium" section + /// + public class SettingsSectionPremium : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionPremium"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionPrivacyAndSecurity.cs b/TdLib.Api/Objects/SettingsSectionPrivacyAndSecurity.cs new file mode 100644 index 00000000..9e0d1f2e --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionPrivacyAndSecurity.cs @@ -0,0 +1,56 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The privacy and security section + /// + public class SettingsSectionPrivacyAndSecurity : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionPrivacyAndSecurity"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "blocked", "blocked/edit", "blocked/block-user", "blocked/block-user/chats", "blocked/block-user/contacts", + /// "active-websites", "active-websites/edit", "active-websites/disconnect-all", "passcode", "passcode/disable", + /// "passcode/change", "passcode/auto-lock", "passcode/face-id", "passcode/fingerprint", "2sv", "2sv/change", + /// "2sv/disable", "2sv/change-email", "passkey", "passkey/create", "auto-delete", "auto-delete/set-custom", + /// "login-email", "phone-number", "phone-number/never", "phone-number/always", "last-seen", "last-seen/never", + /// "last-seen/always", "last-seen/hide-read-time", "profile-photos", "profile-photos/never", "profile-photos/always", + /// "profile-photos/set-public", "profile-photos/update-public", "profile-photos/remove-public", "bio", "bio/never", + /// "bio/always", "gifts", "gifts/show-icon", "gifts/never", "gifts/always", "gifts/accepted-types", "birthday", + /// "birthday/add", "birthday/never", "birthday/always", "saved-music", "saved-music/never", "saved-music/always", + /// "forwards", "forwards/never", "forwards/always", "calls", "calls/never", "calls/always", "calls/p2p", + /// "calls/p2p/never", "calls/p2p/always", "calls/ios-integration", "voice", "voice/never", "voice/always", + /// "messages", "messages/set-price", "messages/exceptions", "invites", "invites/never", "invites/always", + /// "self-destruct", "data-settings", "data-settings/sync-contacts", "data-settings/delete-synced", + /// "data-settings/suggest-contacts", "data-settings/delete-cloud-drafts", "data-settings/clear-payment-info", + /// "data-settings/link-previews", "data-settings/bot-settings", "data-settings/map-provider", "archive-and-mute" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionPrivacyPolicy.cs b/TdLib.Api/Objects/SettingsSectionPrivacyPolicy.cs new file mode 100644 index 00000000..3b0398a6 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionPrivacyPolicy.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The "Privacy Policy" section + /// + public class SettingsSectionPrivacyPolicy : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionPrivacyPolicy"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionQrCode.cs b/TdLib.Api/Objects/SettingsSectionQrCode.cs new file mode 100644 index 00000000..00961989 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionQrCode.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The current user's QR code section + /// + public class SettingsSectionQrCode : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionQrCode"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "share", "scan" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionSearch.cs b/TdLib.Api/Objects/SettingsSectionSearch.cs new file mode 100644 index 00000000..597e9320 --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionSearch.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// Search in Settings + /// + public class SettingsSectionSearch : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionSearch"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SettingsSectionSendGift.cs b/TdLib.Api/Objects/SettingsSectionSendGift.cs new file mode 100644 index 00000000..1c0d9e7b --- /dev/null +++ b/TdLib.Api/Objects/SettingsSectionSendGift.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class SettingsSection : Object + { + /// + /// The "Send a gift" section + /// + public class SettingsSectionSendGift : SettingsSection + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "settingsSectionSendGift"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Subsection of the section; may be one of + /// "", "self" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("subsection")] + public string Subsection { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/StakeDiceState.cs b/TdLib.Api/Objects/StakeDiceState.cs index 72f20244..1478505c 100644 --- a/TdLib.Api/Objects/StakeDiceState.cs +++ b/TdLib.Api/Objects/StakeDiceState.cs @@ -34,7 +34,7 @@ public partial class StakeDiceState : Object public string StateHash { get; set; } /// - /// The amount of Toncoins that was staked in the previous roll; in the smallest units of the currency + /// The Toncoin amount that was staked in the previous roll; in the smallest units of the currency /// [JsonConverter(typeof(Converter))] [JsonProperty("stake_toncoin_amount")] diff --git a/TdLib.Api/Objects/StarAmount.cs b/TdLib.Api/Objects/StarAmount.cs index 2f03c30a..7dd741e9 100644 --- a/TdLib.Api/Objects/StarAmount.cs +++ b/TdLib.Api/Objects/StarAmount.cs @@ -10,7 +10,7 @@ namespace TdLib public static partial class TdApi { /// - /// Describes a possibly non-integer amount of Telegram Stars + /// Describes a possibly non-integer Telegram Star amount /// public partial class StarAmount : Object { @@ -27,7 +27,7 @@ public partial class StarAmount : Object public override string Extra { get; set; } /// - /// The integer amount of Telegram Stars rounded to 0 + /// The integer Telegram Star amount rounded to 0 /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Objects/StarRevenueStatus.cs b/TdLib.Api/Objects/StarRevenueStatus.cs index 1ebe9626..8eb56e7c 100644 --- a/TdLib.Api/Objects/StarRevenueStatus.cs +++ b/TdLib.Api/Objects/StarRevenueStatus.cs @@ -27,21 +27,21 @@ public partial class StarRevenueStatus : Object public override string Extra { get; set; } /// - /// Total amount of Telegram Stars earned + /// Total Telegram Star amount earned /// [JsonConverter(typeof(Converter))] [JsonProperty("total_amount")] public StarAmount TotalAmount { get; set; } /// - /// The amount of Telegram Stars that aren't withdrawn yet + /// The Telegram Star amount that isn't withdrawn yet /// [JsonConverter(typeof(Converter))] [JsonProperty("current_amount")] public StarAmount CurrentAmount { get; set; } /// - /// The amount of Telegram Stars that are available for withdrawal + /// The Telegram Star amount that is available for withdrawal /// [JsonConverter(typeof(Converter))] [JsonProperty("available_amount")] diff --git a/TdLib.Api/Objects/StarSubscriptionPricing.cs b/TdLib.Api/Objects/StarSubscriptionPricing.cs index f6bb27f4..84ec89ef 100644 --- a/TdLib.Api/Objects/StarSubscriptionPricing.cs +++ b/TdLib.Api/Objects/StarSubscriptionPricing.cs @@ -34,7 +34,7 @@ public partial class StarSubscriptionPricing : Object public int Period { get; set; } /// - /// The amount of Telegram Stars that must be paid for each period + /// The Telegram Star amount that must be paid for each period /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBotInvoicePurchase.cs b/TdLib.Api/Objects/StarTransactionTypeBotInvoicePurchase.cs index 6fd1e084..559edc90 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotInvoicePurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotInvoicePurchase.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeBotInvoicePurchase : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the bot or the business account user that created the invoice + /// Identifier of the bot or the business account user who created the invoice /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBotInvoiceSale.cs b/TdLib.Api/Objects/StarTransactionTypeBotInvoiceSale.cs index 9bdc1713..ad4745c6 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotInvoiceSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotInvoiceSale.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeBotInvoiceSale : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that bought the product + /// Identifier of the user who bought the product /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaPurchase.cs index ffae0ab4..084957bd 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaPurchase.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeBotPaidMediaPurchase : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the bot or the business account user that sent the paid media + /// Identifier of the bot or the business account user who sent the paid media /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaSale.cs b/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaSale.cs index b314e93c..4b322a57 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaSale.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeBotPaidMediaSale : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that bought the media + /// Identifier of the user who bought the media /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs index 8869ff89..4df83961 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeBotSubscriptionPurchase : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the bot or the business account user that created the subscription link + /// Identifier of the bot or the business account user who created the subscription link /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs index da70f86f..278fdb37 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeBotSubscriptionSale : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that bought the subscription + /// Identifier of the user who bought the subscription /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferReceive.cs b/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferReceive.cs index 8f37be2f..758bad82 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferReceive.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeBusinessBotTransferReceive : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that sent Telegram Stars + /// Identifier of the user who sent Telegram Stars /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaSale.cs b/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaSale.cs index 44bad88a..78cded62 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaSale.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeChannelPaidMediaSale : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that bought the media + /// Identifier of the user who bought the media /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionReceive.cs b/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionReceive.cs index 396dea32..fcf1d40c 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionReceive.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeChannelPaidReactionReceive : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that added the paid reaction + /// Identifier of the user who added the paid reaction /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionSale.cs b/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionSale.cs index 142784b8..270fe36e 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionSale.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeChannelSubscriptionSale : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that bought the subscription + /// Identifier of the user who bought the subscription /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftAuctionBid.cs b/TdLib.Api/Objects/StarTransactionTypeGiftAuctionBid.cs index 87aa615b..a84b17f0 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftAuctionBid.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftAuctionBid.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeGiftAuctionBid : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that will receive the gift + /// Identifier of the user who will receive the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("owner_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftSale.cs b/TdLib.Api/Objects/StarTransactionTypeGiftSale.cs index ddf330f2..dbf45632 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftSale.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeGiftSale : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that sent the gift + /// Identifier of the user who sent the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftUpgrade.cs b/TdLib.Api/Objects/StarTransactionTypeGiftUpgrade.cs index 555d014c..7d2e1206 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftUpgrade.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftUpgrade.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeGiftUpgrade : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that initially sent the gift + /// Identifier of the user who initially sent the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageReceive.cs b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageReceive.cs index 55219141..f566627d 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageReceive.cs @@ -43,7 +43,7 @@ public class StarTransactionTypePaidGroupCallMessageReceive : StarTransactionTyp public int CommissionPerMille { get; set; } /// - /// The amount of Telegram Stars that were received by Telegram; can be negative for refunds + /// The Telegram Star amount that was received by Telegram; can be negative for refunds /// [JsonConverter(typeof(Converter))] [JsonProperty("commission_star_amount")] diff --git a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionReceive.cs b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionReceive.cs index 7717a860..11640cba 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionReceive.cs @@ -43,7 +43,7 @@ public class StarTransactionTypePaidGroupCallReactionReceive : StarTransactionTy public int CommissionPerMille { get; set; } /// - /// The amount of Telegram Stars that were received by Telegram; can be negative for refunds + /// The Telegram Star amount that was received by Telegram; can be negative for refunds /// [JsonConverter(typeof(Converter))] [JsonProperty("commission_star_amount")] diff --git a/TdLib.Api/Objects/StarTransactionTypePaidMessageReceive.cs b/TdLib.Api/Objects/StarTransactionTypePaidMessageReceive.cs index 867c62d6..dea1ed2a 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidMessageReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidMessageReceive.cs @@ -50,7 +50,7 @@ public class StarTransactionTypePaidMessageReceive : StarTransactionType public int CommissionPerMille { get; set; } /// - /// The amount of Telegram Stars that were received by Telegram; can be negative for refunds + /// The Telegram Star amount that was received by Telegram; can be negative for refunds /// [JsonConverter(typeof(Converter))] [JsonProperty("commission_star_amount")] diff --git a/TdLib.Api/Objects/StarTransactionTypePremiumPurchase.cs b/TdLib.Api/Objects/StarTransactionTypePremiumPurchase.cs index 0bd383fc..1e930434 100644 --- a/TdLib.Api/Objects/StarTransactionTypePremiumPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypePremiumPurchase.cs @@ -29,7 +29,7 @@ public class StarTransactionTypePremiumPurchase : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that received the Telegram Premium subscription + /// Identifier of the user who received the Telegram Premium subscription /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentReceive.cs b/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentReceive.cs index ad5dcc61..bccbff70 100644 --- a/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentReceive.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeSuggestedPostPaymentReceive : StarTransactionTyp public override string Extra { get; set; } /// - /// Identifier of the user that paid for the suggested post + /// Identifier of the user who paid for the suggested post /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftPurchase.cs index 82feb7e8..85b97bbb 100644 --- a/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftPurchase.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeUpgradedGiftPurchase : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that sold the gift + /// Identifier of the user who sold the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftSale.cs b/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftSale.cs index 4714ae5f..eb7a1935 100644 --- a/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftSale.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeUpgradedGiftSale : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that bought the gift + /// Identifier of the user who bought the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] @@ -50,7 +50,7 @@ public class StarTransactionTypeUpgradedGiftSale : StarTransactionType public int CommissionPerMille { get; set; } /// - /// The amount of Telegram Stars that were received by Telegram; can be negative for refunds + /// The Telegram Star amount that was received by Telegram; can be negative for refunds /// [JsonConverter(typeof(Converter))] [JsonProperty("commission_star_amount")] diff --git a/TdLib.Api/Objects/StarTransactionTypeUserDeposit.cs b/TdLib.Api/Objects/StarTransactionTypeUserDeposit.cs index c0de5ece..477f27d4 100644 --- a/TdLib.Api/Objects/StarTransactionTypeUserDeposit.cs +++ b/TdLib.Api/Objects/StarTransactionTypeUserDeposit.cs @@ -29,7 +29,7 @@ public class StarTransactionTypeUserDeposit : StarTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that gifted Telegram Stars; 0 if the user was anonymous + /// Identifier of the user who gifted Telegram Stars; 0 if the user was anonymous /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/Story.cs b/TdLib.Api/Objects/Story.cs index 64fafea5..387eda0a 100644 --- a/TdLib.Api/Objects/Story.cs +++ b/TdLib.Api/Objects/Story.cs @@ -118,7 +118,7 @@ public partial class Story : Object public bool CanBeForwarded { get; set; } /// - /// True, if the story can be replied in the chat with the user that posted the story + /// True, if the story can be replied in the chat with the user who posted the story /// [JsonConverter(typeof(Converter))] [JsonProperty("can_be_replied")] diff --git a/TdLib.Api/Objects/StoryContentTypeLive.cs b/TdLib.Api/Objects/StoryContentTypeLive.cs new file mode 100644 index 00000000..b7c6169a --- /dev/null +++ b/TdLib.Api/Objects/StoryContentTypeLive.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class StoryContentType : Object + { + /// + /// A live story + /// + public class StoryContentTypeLive : StoryContentType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "storyContentTypeLive"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/StoryContentTypePhoto.cs b/TdLib.Api/Objects/StoryContentTypePhoto.cs new file mode 100644 index 00000000..ef9c9108 --- /dev/null +++ b/TdLib.Api/Objects/StoryContentTypePhoto.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class StoryContentType : Object + { + /// + /// Contains the type of the content of a story + /// + public class StoryContentTypePhoto : StoryContentType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "storyContentTypePhoto"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/StoryContentTypeUnsupported.cs b/TdLib.Api/Objects/StoryContentTypeUnsupported.cs new file mode 100644 index 00000000..89b40ceb --- /dev/null +++ b/TdLib.Api/Objects/StoryContentTypeUnsupported.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class StoryContentType : Object + { + /// + /// A story of unknown content type + /// + public class StoryContentTypeUnsupported : StoryContentType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "storyContentTypeUnsupported"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/StoryContentTypeVideo.cs b/TdLib.Api/Objects/StoryContentTypeVideo.cs new file mode 100644 index 00000000..708846b0 --- /dev/null +++ b/TdLib.Api/Objects/StoryContentTypeVideo.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class StoryContentType : Object + { + /// + /// A video story + /// + public class StoryContentTypeVideo : StoryContentType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "storyContentTypeVideo"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/SuggestedPostPriceStar.cs b/TdLib.Api/Objects/SuggestedPostPriceStar.cs index 8908c6d1..d00571ce 100644 --- a/TdLib.Api/Objects/SuggestedPostPriceStar.cs +++ b/TdLib.Api/Objects/SuggestedPostPriceStar.cs @@ -29,7 +29,7 @@ public class SuggestedPostPriceStar : SuggestedPostPrice public override string Extra { get; set; } /// - /// The amount of Telegram Stars expected to be paid for the post; getOption("suggested_post_star_count_min")-getOption("suggested_post_star_count_max") + /// The Telegram Star amount expected to be paid for the post; getOption("suggested_post_star_count_min")-getOption("suggested_post_star_count_max") /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Objects/TonRevenueStatus.cs b/TdLib.Api/Objects/TonRevenueStatus.cs index 08141276..af33583b 100644 --- a/TdLib.Api/Objects/TonRevenueStatus.cs +++ b/TdLib.Api/Objects/TonRevenueStatus.cs @@ -27,21 +27,21 @@ public partial class TonRevenueStatus : Object public override string Extra { get; set; } /// - /// Total amount of Toncoins earned; in the smallest units of the cryptocurrency + /// Total Toncoin amount earned; in the smallest units of the cryptocurrency /// [JsonConverter(typeof(Converter.Int64))] [JsonProperty("total_amount")] public long TotalAmount { get; set; } /// - /// Amount of Toncoins that aren't withdrawn yet; in the smallest units of the cryptocurrency + /// The Toncoin amount that isn't withdrawn yet; in the smallest units of the cryptocurrency /// [JsonConverter(typeof(Converter.Int64))] [JsonProperty("balance_amount")] public long BalanceAmount { get; set; } /// - /// Amount of Toncoins that are available for withdrawal; in the smallest units of the cryptocurrency + /// The Toncoin amount that is available for withdrawal; in the smallest units of the cryptocurrency /// [JsonConverter(typeof(Converter.Int64))] [JsonProperty("available_amount")] diff --git a/TdLib.Api/Objects/TonTransactionTypeStakeDicePayout.cs b/TdLib.Api/Objects/TonTransactionTypeStakeDicePayout.cs new file mode 100644 index 00000000..0be0a2a2 --- /dev/null +++ b/TdLib.Api/Objects/TonTransactionTypeStakeDicePayout.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class TonTransactionType : Object + { + /// + /// The transaction is a payment for successful stake dice throw + /// + public class TonTransactionTypeStakeDicePayout : TonTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonTransactionTypeStakeDicePayout"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonTransactionTypeStakeDiceStake.cs b/TdLib.Api/Objects/TonTransactionTypeStakeDiceStake.cs new file mode 100644 index 00000000..f80f51c4 --- /dev/null +++ b/TdLib.Api/Objects/TonTransactionTypeStakeDiceStake.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class TonTransactionType : Object + { + /// + /// The transaction is a payment for stake dice throw + /// + public class TonTransactionTypeStakeDiceStake : TonTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonTransactionTypeStakeDiceStake"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftPurchase.cs b/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftPurchase.cs index 7b95396d..bbf5b232 100644 --- a/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftPurchase.cs +++ b/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftPurchase.cs @@ -29,7 +29,7 @@ public class TonTransactionTypeUpgradedGiftPurchase : TonTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that sold the gift + /// Identifier of the user who sold the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] diff --git a/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftSale.cs b/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftSale.cs index 6b277eb7..a2a54350 100644 --- a/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftSale.cs +++ b/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftSale.cs @@ -29,7 +29,7 @@ public class TonTransactionTypeUpgradedGiftSale : TonTransactionType public override string Extra { get; set; } /// - /// Identifier of the user that bought the gift + /// Identifier of the user who bought the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] @@ -50,7 +50,7 @@ public class TonTransactionTypeUpgradedGiftSale : TonTransactionType public int CommissionPerMille { get; set; } /// - /// The amount of Toncoins that were received by the Telegram; in the smallest units of the currency + /// The Toncoin amount that was received by the Telegram; in the smallest units of the currency /// [JsonConverter(typeof(Converter))] [JsonProperty("commission_toncoin_amount")] diff --git a/TdLib.Api/Objects/UpgradedGift.cs b/TdLib.Api/Objects/UpgradedGift.cs index ea6bef8a..e798c59c 100644 --- a/TdLib.Api/Objects/UpgradedGift.cs +++ b/TdLib.Api/Objects/UpgradedGift.cs @@ -82,6 +82,20 @@ public partial class UpgradedGift : Object [JsonProperty("max_upgraded_count")] public int MaxUpgradedCount { get; set; } + /// + /// True, if the gift was used to craft another gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_burned")] + public bool IsBurned { get; set; } + + /// + /// True, if the gift was craft from another gifts + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_crafted")] + public bool IsCrafted { get; set; } + /// /// True, if the original gift could have been bought only by Telegram Premium subscribers /// @@ -167,7 +181,7 @@ public partial class UpgradedGift : Object public UpgradedGiftOriginalDetails OriginalDetails { get; set; } /// - /// Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none + /// Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none or unknown /// [JsonConverter(typeof(Converter))] [JsonProperty("colors")] @@ -187,6 +201,13 @@ public partial class UpgradedGift : Object [JsonProperty("can_send_purchase_offer")] public bool CanSendPurchaseOffer { get; set; } + /// + /// Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("craft_probability_per_mille")] + public int CraftProbabilityPerMille { get; set; } + /// /// ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable /// diff --git a/TdLib.Api/Objects/UpgradedGiftAttributeRarityEpic.cs b/TdLib.Api/Objects/UpgradedGiftAttributeRarityEpic.cs new file mode 100644 index 00000000..8fbee569 --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftAttributeRarityEpic.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class UpgradedGiftAttributeRarity : Object + { + /// + /// The attribute is epic + /// + public class UpgradedGiftAttributeRarityEpic : UpgradedGiftAttributeRarity + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftAttributeRarityEpic"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftAttributeRarityLegendary.cs b/TdLib.Api/Objects/UpgradedGiftAttributeRarityLegendary.cs new file mode 100644 index 00000000..d791def0 --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftAttributeRarityLegendary.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class UpgradedGiftAttributeRarity : Object + { + /// + /// The attribute is legendary + /// + public class UpgradedGiftAttributeRarityLegendary : UpgradedGiftAttributeRarity + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftAttributeRarityLegendary"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftAttributeRarityPerMille.cs b/TdLib.Api/Objects/UpgradedGiftAttributeRarityPerMille.cs new file mode 100644 index 00000000..d66a385f --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftAttributeRarityPerMille.cs @@ -0,0 +1,41 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class UpgradedGiftAttributeRarity : Object + { + /// + /// Describes rarity of an upgraded gift attribute + /// + public class UpgradedGiftAttributeRarityPerMille : UpgradedGiftAttributeRarity + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftAttributeRarityPerMille"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The number of upgraded gifts that receive this attribute for each 1000 gifts upgraded; if 0, then it can be shown as "<0.1%" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("per_mille")] + public int PerMille { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftAttributeRarityRare.cs b/TdLib.Api/Objects/UpgradedGiftAttributeRarityRare.cs new file mode 100644 index 00000000..d494a74b --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftAttributeRarityRare.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class UpgradedGiftAttributeRarity : Object + { + /// + /// The attribute is rare + /// + public class UpgradedGiftAttributeRarityRare : UpgradedGiftAttributeRarity + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftAttributeRarityRare"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftAttributeRarityUncommon.cs b/TdLib.Api/Objects/UpgradedGiftAttributeRarityUncommon.cs new file mode 100644 index 00000000..97dc8809 --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftAttributeRarityUncommon.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class UpgradedGiftAttributeRarity : Object + { + /// + /// The attribute is uncommon + /// + public class UpgradedGiftAttributeRarityUncommon : UpgradedGiftAttributeRarity + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftAttributeRarityUncommon"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftBackdrop.cs b/TdLib.Api/Objects/UpgradedGiftBackdrop.cs index 6acd8882..13cd6c99 100644 --- a/TdLib.Api/Objects/UpgradedGiftBackdrop.cs +++ b/TdLib.Api/Objects/UpgradedGiftBackdrop.cs @@ -48,11 +48,11 @@ public partial class UpgradedGiftBackdrop : Object public UpgradedGiftBackdropColors Colors { get; set; } /// - /// The number of upgraded gifts that receive this backdrop for each 1000 gifts upgraded + /// The rarity of the backdrop /// [JsonConverter(typeof(Converter))] - [JsonProperty("rarity_per_mille")] - public int RarityPerMille { get; set; } + [JsonProperty("rarity")] + public UpgradedGiftAttributeRarity Rarity { get; set; } } } } diff --git a/TdLib.Api/Objects/UpgradedGiftModel.cs b/TdLib.Api/Objects/UpgradedGiftModel.cs index 5b03a07f..3fc287bb 100644 --- a/TdLib.Api/Objects/UpgradedGiftModel.cs +++ b/TdLib.Api/Objects/UpgradedGiftModel.cs @@ -41,11 +41,18 @@ public partial class UpgradedGiftModel : Object public Sticker Sticker { get; set; } /// - /// The number of upgraded gifts that receive this model for each 1000 gifts upgraded + /// The rarity of the model /// [JsonConverter(typeof(Converter))] - [JsonProperty("rarity_per_mille")] - public int RarityPerMille { get; set; } + [JsonProperty("rarity")] + public UpgradedGiftAttributeRarity Rarity { get; set; } + + /// + /// True, if the model can be obtained only through gift crafting + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_crafted")] + public bool IsCrafted { get; set; } } } } diff --git a/TdLib.Api/Objects/UpgradedGiftOriginCraft.cs b/TdLib.Api/Objects/UpgradedGiftOriginCraft.cs new file mode 100644 index 00000000..7d02b034 --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftOriginCraft.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class UpgradedGiftOrigin : Object + { + /// + /// The gift was crafted from other gifts + /// + public class UpgradedGiftOriginCraft : UpgradedGiftOrigin + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftOriginCraft"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftSymbol.cs b/TdLib.Api/Objects/UpgradedGiftSymbol.cs index c5124411..2206bbff 100644 --- a/TdLib.Api/Objects/UpgradedGiftSymbol.cs +++ b/TdLib.Api/Objects/UpgradedGiftSymbol.cs @@ -41,11 +41,11 @@ public partial class UpgradedGiftSymbol : Object public Sticker Sticker { get; set; } /// - /// The number of upgraded gifts that receive this symbol for each 1000 gifts upgraded + /// The rarity of the symbol /// [JsonConverter(typeof(Converter))] - [JsonProperty("rarity_per_mille")] - public int RarityPerMille { get; set; } + [JsonProperty("rarity")] + public UpgradedGiftAttributeRarity Rarity { get; set; } } } } diff --git a/TdLib.Api/Objects/UpgradedGiftValueInfo.cs b/TdLib.Api/Objects/UpgradedGiftValueInfo.cs index 2cc3c356..9acf8ab6 100644 --- a/TdLib.Api/Objects/UpgradedGiftValueInfo.cs +++ b/TdLib.Api/Objects/UpgradedGiftValueInfo.cs @@ -55,7 +55,7 @@ public partial class UpgradedGiftValueInfo : Object public int InitialSaleDate { get; set; } /// - /// Amount of Telegram Stars that were paid for the gift + /// The Telegram Star amount that was paid for the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("initial_sale_star_count")] diff --git a/TdLib.Api/Objects/UserTypeBot.cs b/TdLib.Api/Objects/UserTypeBot.cs index 52c64b4c..8d3e69b9 100644 --- a/TdLib.Api/Objects/UserTypeBot.cs +++ b/TdLib.Api/Objects/UserTypeBot.cs @@ -63,6 +63,13 @@ public class UserTypeBot : UserType [JsonProperty("has_topics")] public bool HasTopics { get; set; } + /// + /// True, if users can create and delete topics in the chat with the bot + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("allows_users_to_create_topics")] + public bool AllowsUsersToCreateTopics { get; set; } + /// /// True, if the bot supports inline queries /// diff --git a/TdLib.CodeGen/Methods.tl b/TdLib.CodeGen/Methods.tl index 80d57da0..0de113e8 100644 --- a/TdLib.CodeGen/Methods.tl +++ b/TdLib.CodeGen/Methods.tl @@ -587,7 +587,7 @@ getPublicPostSearchLimits query:string = PublicPostSearchLimits; //@query Query to search for //@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results //@limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit -//@star_count The amount of Telegram Stars the user agreed to pay for the search; pass 0 for free searches +//@star_count The Telegram Star amount the user agreed to pay for the search; pass 0 for free searches searchPublicPosts query:string offset:string limit:int32 star_count:int53 = FoundPublicPosts; //@description Searches for public channel posts containing the given hashtag or cashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @@ -1098,7 +1098,7 @@ setBusinessAccountUsername business_connection_id:string username:string = Ok; //@settings The new settings setBusinessAccountGiftSettings business_connection_id:string settings:giftSettings = Ok; -//@description Returns the amount of Telegram Stars owned by a business account; for bots only @business_connection_id Unique identifier of business connection +//@description Returns the Telegram Star amount owned by a business account; for bots only @business_connection_id Unique identifier of business connection getBusinessAccountStarAmount business_connection_id:string = StarAmount; //@description Transfers Telegram Stars from the business account to the business bot; for bots only @@ -1469,7 +1469,7 @@ getLoginUrlInfo chat_id:int53 message_id:int53 button_id:int53 = LoginUrlInfo; //@chat_id Chat identifier of the message with the button //@message_id Message identifier of the message with the button //@button_id Button identifier -//@allow_write_access Pass true to allow the bot to send messages to the current user +//@allow_write_access Pass true to allow the bot to send messages to the current user. Phone number access can't be requested using the button getLoginUrl chat_id:int53 message_id:int53 button_id:int53 allow_write_access:Bool = HttpUrl; @@ -1502,7 +1502,7 @@ getInlineQueryResults bot_user_id:int53 chat_id:int53 user_location:location que //@description Sets the result of an inline query; for bots only //@inline_query_id Identifier of the inline query -//@is_personal Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query +//@is_personal Pass true if results may be cached and returned only for the user who sent the query. By default, results may be returned to any user who sends the same query //@button Button to be shown above inline query results; pass null if none //@results The results of the query //@cache_time Allowed time to cache the results of the query, in seconds @@ -1641,7 +1641,7 @@ deleteChatReplyMarkup chat_id:int53 message_id:int53 = Ok; //@description Sends a notification about user activity in a chat //@chat_id Chat identifier -//@topic_id Identifier of the topic in which the action is performed +//@topic_id Identifier of the topic in which the action is performed; pass null if none //@business_connection_id Unique identifier of business connection on behalf of which to send the request; for bots only //@action The action description; pass null to cancel the currently active action sendChatAction chat_id:int53 topic_id:MessageTopic business_connection_id:string action:ChatAction = Ok; @@ -1686,10 +1686,12 @@ getInternalLinkType link:string = InternalLinkType; //@description Returns information about an action to be done when the current user clicks an external link. Don't use this method for links from secret chats if link preview is disabled in secret chats @link The link getExternalLinkInfo link:string = LoginUrlInfo; -//@description Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed +//@description Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. +//-Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. May return an empty link if just a toast about successful login has to be shown //@link The HTTP link -//@allow_write_access Pass true if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages -getExternalLink link:string allow_write_access:Bool = HttpUrl; +//@allow_write_access Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to send them messages +//@allow_phone_number_access Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to access their phone number +getExternalLink link:string allow_write_access:Bool allow_phone_number_access:Bool = HttpUrl; //@description Marks all mentions in a chat as read @chat_id Chat identifier @@ -1979,7 +1981,7 @@ setChatMemberStatus chat_id:int53 member_id:MessageSender status:ChatMemberStatu //@chat_id Chat identifier //@member_id Member identifier //@banned_until_date Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned -//@revoke_messages Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels +//@revoke_messages Pass true to delete all messages in the chat for the user who is being removed. Always true for supergroups and channels banChatMember chat_id:int53 member_id:MessageSender banned_until_date:int32 revoke_messages:Bool = Ok; //@description Checks whether the current session can be used to transfer a chat ownership to another user @@ -1991,6 +1993,11 @@ canTransferOwnership = CanTransferOwnershipResult; //@password The 2-step verification password of the current user transferChatOwnership chat_id:int53 user_id:int53 password:string = Ok; +//@description Returns the user who will become the owner of the chat after 7 days if the current user does not return to the chat during that period; requires owner privileges in the chat. +//-Available only for supergroups and channel chats +//@chat_id Chat identifier +getChatOwnerAfterLeaving chat_id:int53 = User; + //@description Returns information about a single member of a chat @chat_id Chat identifier @member_id Member identifier getChatMember chat_id:int53 member_id:MessageSender = ChatMember; @@ -2546,7 +2553,7 @@ joinChatByInviteLink invite_link:string = Chat; //@limit The maximum number of requests to join the chat to return getChatJoinRequests chat_id:int53 invite_link:string query:string offset_request:chatJoinRequest limit:int32 = ChatJoinRequests; -//@description Handles a pending join request in a chat @chat_id Chat identifier @user_id Identifier of the user that sent the request @approve Pass true to approve the request; pass false to decline it +//@description Handles a pending join request in a chat @chat_id Chat identifier @user_id Identifier of the user who sent the request @approve Pass true to approve the request; pass false to decline it processChatJoinRequest chat_id:int53 user_id:int53 approve:Bool = Ok; //@description Handles all pending join requests for a given link in a chat @@ -3663,7 +3670,7 @@ closeGiftAuction gift_id:int64 = Ok; //@description Places a bid on an auction gift //@gift_id Identifier of the gift to place the bid on //@star_count The number of Telegram Stars to place in the bid -//@user_id Identifier of the user that will receive the gift +//@user_id Identifier of the user who will receive the gift //@text Text to show along with the gift; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed. //-Must be empty if the receiver enabled paid messages //@is_private Pass true to show gift text and sender only to the gift receiver; otherwise, everyone will be able to see them @@ -3694,35 +3701,42 @@ setPinnedGifts owner_id:MessageSender received_gift_ids:vector = Ok; //@are_enabled Pass true to enable notifications about new gifts owned by the channel chat; pass false to disable the notifications toggleChatGiftNotifications chat_id:int53 are_enabled:Bool = Ok; -//@description Returns examples of possible upgraded gifts for a regular gift @gift_id Identifier of the gift -getGiftUpgradePreview gift_id:int64 = GiftUpgradePreview; +//@description Returns examples of possible upgraded gifts for a regular gift @regular_gift_id Identifier of the regular gift +getGiftUpgradePreview regular_gift_id:int64 = GiftUpgradePreview; -//@description Returns all possible variants of upgraded gifts for a regular gift @gift_id Identifier of the gift -getGiftUpgradeVariants gift_id:int64 = GiftUpgradeVariants; +//@description Returns all possible variants of upgraded gifts for a regular gift +//@regular_gift_id Identifier of the regular gift +//@return_upgrade_models Pass true to get models that can be obtained by upgrading a regular gift +//@return_craft_models Pass true to get models that can be obtained by crafting a gift from upgraded gifts +getUpgradedGiftVariants regular_gift_id:int64 return_upgrade_models:Bool return_craft_models:Bool = GiftUpgradeVariants; //@description Upgrades a regular gift //@business_connection_id Unique identifier of business connection on behalf of which to send the request; for bots only //@received_gift_id Identifier of the gift //@keep_original_details Pass true to keep the original gift text, sender and receiver in the upgraded gift -//@star_count The amount of Telegram Stars required to pay for the upgrade. It the gift has prepaid_upgrade_star_count > 0, then pass 0, otherwise, pass gift.upgrade_star_count +//@star_count The Telegram Star amount required to pay for the upgrade. It the gift has prepaid_upgrade_star_count > 0, then pass 0, otherwise, pass gift.upgrade_star_count upgradeGift business_connection_id:string received_gift_id:string keep_original_details:Bool star_count:int53 = UpgradeGiftResult; //@description Pays for upgrade of a regular gift that is owned by another user or channel chat //@owner_id Identifier of the user or the channel chat that owns the gift //@prepaid_upgrade_hash Prepaid upgrade hash as received along with the gift -//@star_count The amount of Telegram Stars the user agreed to pay for the upgrade; must be equal to gift.upgrade_star_count +//@star_count The Telegram Star amount the user agreed to pay for the upgrade; must be equal to gift.upgrade_star_count buyGiftUpgrade owner_id:MessageSender prepaid_upgrade_hash:string star_count:int53 = Ok; +//@description Crafts a new gift from other gifts that will be permanently lost +//@received_gift_ids Identifier of the gifts to use for crafting +craftGift received_gift_ids:vector = CraftGiftResult; + //@description Sends an upgraded gift to another user or channel chat //@business_connection_id Unique identifier of business connection on behalf of which to send the request; for bots only //@received_gift_id Identifier of the gift //@new_owner_id Identifier of the user or the channel chat that will receive the gift -//@star_count The amount of Telegram Stars required to pay for the transfer +//@star_count The Telegram Star amount required to pay for the transfer transferGift business_connection_id:string received_gift_id:string new_owner_id:MessageSender star_count:int53 = Ok; //@description Drops original details for an upgraded gift //@received_gift_id Identifier of the gift -//@star_count The amount of Telegram Stars required to pay for the operation +//@star_count The Telegram Star amount required to pay for the operation dropGiftOriginalDetails received_gift_id:string star_count:int53 = Ok; //@description Sends an upgraded gift that is available for resale to another user or channel chat; gifts already owned by the current user @@ -3765,6 +3779,12 @@ getReceivedGifts business_connection_id:string owner_id:MessageSender collection //@description Returns information about a received gift @received_gift_id Identifier of the gift getReceivedGift received_gift_id:string = ReceivedGift; +//@description Returns upgraded gifts of the current user who can be used to craft another gifts +//@regular_gift_id Identifier of the regular gift that will be used for crafting +//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results +//@limit The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit +getGiftsForCrafting regular_gift_id:int64 offset:string limit:int32 = GiftsForCrafting; + //@description Returns information about an upgraded gift by its name @name Unique name of the upgraded gift getUpgradedGift name:string = UpgradedGift; @@ -3789,11 +3809,12 @@ setGiftResalePrice received_gift_id:string price:GiftResalePrice = Ok; //@description Returns upgraded gifts that can be bought from other owners using sendResoldGift //@gift_id Identifier of the regular gift that was upgraded to a unique gift //@order Order in which the results will be sorted +//@for_crafting Pass true to get only gifts suitable for crafting //@attributes Attributes used to filter received gifts. If multiple attributes of the same type are specified, then all of them are allowed. //-If none attributes of specific type are specified, then all values for this attribute type are allowed //@offset Offset of the first entry to return as received from the previous request with the same order and attributes; use empty string to get the first chunk of results //@limit The maximum number of gifts to return -searchGiftsForResale gift_id:int64 order:GiftForResaleOrder attributes:vector offset:string limit:int32 = GiftsForResale; +searchGiftsForResale gift_id:int64 order:GiftForResaleOrder for_crafting:Bool attributes:vector offset:string limit:int32 = GiftsForResale; //@description Returns collections of gifts owned by the given user or chat @@ -3849,12 +3870,12 @@ reorderGiftCollectionGifts owner_id:MessageSender collection_id:int32 received_g createInvoiceLink business_connection_id:string invoice:InputMessageContent = HttpUrl; //@description Refunds a previously done payment in Telegram Stars; for bots only -//@user_id Identifier of the user that did the payment +//@user_id Identifier of the user who did the payment //@telegram_payment_charge_id Telegram payment identifier refundStarPayment user_id:int53 telegram_payment_charge_id:string = Ok; -//@description Returns a user that can be contacted to get support +//@description Returns a user who can be contacted to get support getSupportUser = User; @@ -3960,7 +3981,7 @@ getPaidMessageRevenue user_id:int53 = StarCount; //@refund_payments Pass true to refund the user previously paid messages allowUnpaidMessagesFromUser user_id:int53 refund_payments:Bool = Ok; -//@description Changes the amount of Telegram Stars that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages +//@description Changes the Telegram Star amount that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages //@chat_id Identifier of the supergroup chat //@paid_message_star_count The new number of Telegram Stars that must be paid for each message that is sent to the supergroup chat unless the sender is an administrator of the chat; 0-getOption("paid_message_star_count_max"). //-The supergroup will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending @@ -4168,7 +4189,7 @@ setPassportElement element:InputPassportElement password:string = PassportElemen //@description Deletes a Telegram Passport element @type Element type deletePassportElement type:PassportElementType = Ok; -//@description Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed @user_id User identifier @errors The errors +//@description Informs the user who some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed @user_id User identifier @errors The errors setPassportElementErrors user_id:int53 errors:vector = Ok; @@ -4358,7 +4379,7 @@ getGiveawayInfo chat_id:int53 message_id:int53 = GiveawayInfo; //@description Returns available options for Telegram Stars purchase getStarPaymentOptions = StarPaymentOptions; -//@description Returns available options for Telegram Stars gifting @user_id Identifier of the user that will receive Telegram Stars; pass 0 to get options for an unspecified user +//@description Returns available options for Telegram Stars gifting @user_id Identifier of the user who will receive Telegram Stars; pass 0 to get options for an unspecified user getStarGiftPaymentOptions user_id:int53 = StarPaymentOptions; //@description Returns available options for Telegram Star giveaway creation @@ -4427,7 +4448,7 @@ connectAffiliateProgram affiliate:AffiliateType bot_user_id:int53 = ConnectedAff //@url The referral link of the affiliate program disconnectAffiliateProgram affiliate:AffiliateType url:string = ConnectedAffiliateProgram; -//@description Returns an affiliate program that were connected to the given affiliate by identifier of the bot that created the program +//@description Returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program //@affiliate The affiliate to which the affiliate program will be connected //@bot_user_id Identifier of the bot that created the program getConnectedAffiliateProgram affiliate:AffiliateType bot_user_id:int53 = ConnectedAffiliateProgram; @@ -4501,19 +4522,15 @@ getApplicationDownloadLink = HttpUrl; //@description Adds a proxy server for network requests. Can be called before authorization -//@server Proxy server domain or IP address -//@port Proxy server port +//@proxy The proxy to add //@enable Pass true to immediately enable the proxy -//@type Proxy type -addProxy server:string port:int32 enable:Bool type:ProxyType = Proxy; +addProxy proxy:proxy enable:Bool = AddedProxy; //@description Edits an existing proxy server for network requests. Can be called before authorization //@proxy_id Proxy identifier -//@server Proxy server domain or IP address -//@port Proxy server port +//@proxy The new information about the proxy //@enable Pass true to immediately enable the proxy -//@type Proxy type -editProxy proxy_id:int32 server:string port:int32 enable:Bool type:ProxyType = Proxy; +editProxy proxy_id:int32 proxy:proxy enable:Bool = AddedProxy; //@description Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization @proxy_id Proxy identifier enableProxy proxy_id:int32 = Ok; @@ -4525,13 +4542,11 @@ disableProxy = Ok; removeProxy proxy_id:int32 = Ok; //@description Returns the list of proxies that are currently set up. Can be called before authorization -getProxies = Proxies; - -//@description Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization @proxy_id Proxy identifier -getProxyLink proxy_id:int32 = HttpUrl; +getProxies = AddedProxies; -//@description Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization @proxy_id Proxy identifier. Use 0 to ping a Telegram server without a proxy -pingProxy proxy_id:int32 = Seconds; +//@description Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization +//@proxy The proxy to test; pass null to ping a Telegram server without a proxy +pingProxy proxy:proxy = Seconds; //@description Sets new log stream for internal logging of TDLib. Can be called synchronously @log_stream New log stream @@ -4603,12 +4618,10 @@ testSquareInt x:int32 = TestInt; testNetwork = Ok; //@description Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization -//@server Proxy server domain or IP address -//@port Proxy server port -//@type Proxy type +//@proxy The proxy to test //@dc_id Identifier of a datacenter with which to test connection //@timeout The maximum overall timeout for the request -testProxy server:string port:int32 type:ProxyType dc_id:int32 timeout:double = Ok; +testProxy proxy:proxy dc_id:int32 timeout:double = Ok; //@description Forces an updates.getDifference call to the Telegram servers; for testing only testGetDifference = Ok; diff --git a/TdLib.CodeGen/Types.tl b/TdLib.CodeGen/Types.tl index 94e356bf..f39e0136 100644 --- a/TdLib.CodeGen/Types.tl +++ b/TdLib.CodeGen/Types.tl @@ -557,7 +557,7 @@ game id:int64 short_name:string title:string text:formattedText description:stri //@description Describes state of the stake dice //@state_hash Hash of the state to use for sending the next dice; may be empty if the stake dice can't be sent by the current user -//@stake_toncoin_amount The amount of Toncoins that was staked in the previous roll; in the smallest units of the currency +//@stake_toncoin_amount The Toncoin amount that was staked in the previous roll; in the smallest units of the currency //@suggested_stake_toncoin_amounts The amounts of Toncoins that are suggested to be staked; in the smallest units of the currency //@current_streak The number of rolled sixes towards the streak; 0-2 //@prize_per_mille The number of Toncoins received by the user for each 1000 Toncoins staked if the dice outcome is 1-6 correspondingly; may be empty if the stake dice can't be sent by the current user @@ -678,13 +678,14 @@ userTypeDeleted = UserType; //@can_read_all_group_messages True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages //@has_main_web_app True, if the bot has the main Web App //@has_topics True, if the bot has topics +//@allows_users_to_create_topics True, if users can create and delete topics in the chat with the bot //@is_inline True, if the bot supports inline queries //@inline_query_placeholder Placeholder for inline queries (displayed on the application input field) //@need_location True, if the location of the user is expected to be sent with every inline query to this bot //@can_connect_to_business True, if the bot supports connection to Telegram Business accounts //@can_be_added_to_attachment_menu True, if the bot can be added to attachment or side menu //@active_user_count The number of recently active users of the bot -userTypeBot can_be_edited:Bool can_join_groups:Bool can_read_all_group_messages:Bool has_main_web_app:Bool has_topics:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool can_connect_to_business:Bool can_be_added_to_attachment_menu:Bool active_user_count:int32 = UserType; +userTypeBot can_be_edited:Bool can_join_groups:Bool can_read_all_group_messages:Bool has_main_web_app:Bool has_topics:Bool allows_users_to_create_topics:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool can_connect_to_business:Bool can_be_added_to_attachment_menu:Bool active_user_count:int32 = UserType; //@description No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type userTypeUnknown = UserType; @@ -730,7 +731,7 @@ chatLocation location:location address:string = ChatLocation; //@description Represents a birthdate of a user @day Day of the month; 1-31 @month Month of the year; 1-12 @year Birth year; 0 if unknown birthdate day:int32 month:int32 year:int32 = Birthdate; -//@description Describes a user that had or will have a birthday soon @user_id User identifier @birthdate Birthdate of the user +//@description Describes a user who had or will have a birthday soon @user_id User identifier @birthdate Birthdate of the user closeBirthdayUser user_id:int53 birthdate:birthdate = CloseBirthdayUser; @@ -783,7 +784,7 @@ businessGreetingMessageSettings shortcut_id:int32 recipients:businessRecipients //@can_edit_bio True, if the bot can edit bio of the business account //@can_edit_profile_photo True, if the bot can edit profile photo of the business account //@can_edit_username True, if the bot can edit username of the business account -//@can_view_gifts_and_stars True, if the bot can view gifts and amount of Telegram Stars owned by the business account +//@can_view_gifts_and_stars True, if the bot can view gifts and Telegram Star amount owned by the business account //@can_sell_gifts True, if the bot can sell regular gifts received by the business account //@can_change_gift_settings True, if the bot can change gift receiving settings of the business account //@can_transfer_and_upgrade_gifts True, if the bot can transfer and upgrade gifts received by the business account @@ -947,7 +948,7 @@ chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messa //@class GiftResalePrice @description Describes price of a resold gift //@description Describes price of a resold gift in Telegram Stars -//@star_count The amount of Telegram Stars expected to be paid for the gift. Must be in the range +//@star_count The Telegram Star amount expected to be paid for the gift. Must be in the range //-getOption("gift_resale_star_count_min")-getOption("gift_resale_star_count_max") for gifts put for resale giftResalePriceStar star_count:int53 = GiftResalePrice; @@ -972,7 +973,7 @@ giftPurchaseOfferStateRejected = GiftPurchaseOfferState; //@class SuggestedPostPrice @description Describes price of a suggested post //@description Describes price of a suggested post in Telegram Stars -//@star_count The amount of Telegram Stars expected to be paid for the post; getOption("suggested_post_star_count_min")-getOption("suggested_post_star_count_max") +//@star_count The Telegram Star amount expected to be paid for the post; getOption("suggested_post_star_count_min")-getOption("suggested_post_star_count_max") suggestedPostPriceStar star_count:int53 = SuggestedPostPrice; //@description Describes price of a suggested post in Toncoins @@ -1018,8 +1019,8 @@ suggestedPostRefundReasonPostDeleted = SuggestedPostRefundReason; suggestedPostRefundReasonPaymentRefunded = SuggestedPostRefundReason; -//@description Describes a possibly non-integer amount of Telegram Stars -//@star_count The integer amount of Telegram Stars rounded to 0 +//@description Describes a possibly non-integer Telegram Star amount +//@star_count The integer Telegram Star amount rounded to 0 //@nanostar_count The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999 starAmount star_count:int53 nanostar_count:int32 = StarAmount; @@ -1041,7 +1042,7 @@ starSubscriptionTypeBot is_canceled_by_bot:Bool title:string photo:photo invoice //@description Describes subscription plan paid in Telegram Stars //@period The number of seconds between consecutive Telegram Star debiting -//@star_count The amount of Telegram Stars that must be paid for each period +//@star_count The Telegram Star amount that must be paid for each period starSubscriptionPricing period:int32 star_count:int53 = StarSubscriptionPricing; //@description Contains information about subscription to a channel chat, a bot, or a business account that was paid in Telegram Stars @@ -1102,7 +1103,7 @@ affiliateProgramInfo parameters:affiliateProgramParameters end_date:int32 daily_ //@description Contains information about an affiliate that received commission from a Telegram Star transaction //@commission_per_mille The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner //@affiliate_chat_id Identifier of the chat which received the commission -//@star_amount The amount of Telegram Stars that were received by the affiliate; can be negative for refunds +//@star_amount The Telegram Star amount that was received by the affiliate; can be negative for refunds affiliateInfo commission_per_mille:int32 affiliate_chat_id:int53 star_amount:starAmount = AffiliateInfo; //@description Describes a found affiliate program @@ -1159,7 +1160,7 @@ premiumStatePaymentOption payment_option:premiumPaymentOption is_current:Bool is //@description Describes an option for gifting Telegram Premium to a user. Use telegramPaymentPurposePremiumGift for out-of-store payments or payments in Telegram Stars //@currency ISO 4217 currency code for the payment //@amount The amount to pay, in the smallest units of the currency -//@star_count The alternative amount of Telegram Stars to pay; 0 if payment in Telegram Stars is not possible +//@star_count The alternative Telegram Star amount to pay; 0 if payment in Telegram Stars is not possible //@discount_percentage The discount associated with this option, as a percentage //@month_count Number of months the Telegram Premium subscription will be active //@store_product_id Identifier of the store product associated with the option @@ -1182,7 +1183,7 @@ premiumGiveawayPaymentOption currency:string amount:int53 winner_count:int32 mon premiumGiveawayPaymentOptions options:vector = PremiumGiveawayPaymentOptions; //@description Contains information about a Telegram Premium gift code -//@creator_id Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used +//@creator_id Identifier of a chat or a user who created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used //@creation_date Point in time (Unix timestamp) when the code was created //@is_from_giveaway True, if the gift code was created for a giveaway //@giveaway_message_id Identifier of the corresponding giveaway message in the creator_id chat; may be 0 or an identifier of a deleted message @@ -1302,18 +1303,41 @@ upgradedGiftOriginPrepaidUpgrade = UpgradedGiftOrigin; //@description The gift was bought through an offer @price Price paid for the gift upgradedGiftOriginOffer price:GiftResalePrice = UpgradedGiftOrigin; +//@description The gift was crafted from other gifts +upgradedGiftOriginCraft = UpgradedGiftOrigin; + + +//@class UpgradedGiftAttributeRarity @description Describes rarity of an upgraded gift attribute + +//@description The rarity is represented as the numeric frequence of the model +//@per_mille The number of upgraded gifts that receive this attribute for each 1000 gifts upgraded; if 0, then it can be shown as "<0.1%" +upgradedGiftAttributeRarityPerMille per_mille:int32 = UpgradedGiftAttributeRarity; + +//@description The attribute is uncommon +upgradedGiftAttributeRarityUncommon = UpgradedGiftAttributeRarity; + +//@description The attribute is rare +upgradedGiftAttributeRarityRare = UpgradedGiftAttributeRarity; + +//@description The attribute is epic +upgradedGiftAttributeRarityEpic = UpgradedGiftAttributeRarity; + +//@description The attribute is legendary +upgradedGiftAttributeRarityLegendary = UpgradedGiftAttributeRarity; + //@description Describes a model of an upgraded gift //@name Name of the model //@sticker The sticker representing the upgraded gift -//@rarity_per_mille The number of upgraded gifts that receive this model for each 1000 gifts upgraded -upgradedGiftModel name:string sticker:sticker rarity_per_mille:int32 = UpgradedGiftModel; +//@rarity The rarity of the model +//@is_crafted True, if the model can be obtained only through gift crafting +upgradedGiftModel name:string sticker:sticker rarity:UpgradedGiftAttributeRarity is_crafted:Bool = UpgradedGiftModel; //@description Describes a symbol shown on the pattern of an upgraded gift //@name Name of the symbol //@sticker The sticker representing the symbol -//@rarity_per_mille The number of upgraded gifts that receive this symbol for each 1000 gifts upgraded -upgradedGiftSymbol name:string sticker:sticker rarity_per_mille:int32 = UpgradedGiftSymbol; +//@rarity The rarity of the symbol +upgradedGiftSymbol name:string sticker:sticker rarity:UpgradedGiftAttributeRarity = UpgradedGiftSymbol; //@description Describes colors of a backdrop of an upgraded gift //@center_color A color in the center of the backdrop in the RGB format @@ -1326,8 +1350,8 @@ upgradedGiftBackdropColors center_color:int32 edge_color:int32 symbol_color:int3 //@id Unique identifier of the backdrop //@name Name of the backdrop //@colors Colors of the backdrop -//@rarity_per_mille The number of upgraded gifts that receive this backdrop for each 1000 gifts upgraded -upgradedGiftBackdrop id:int32 name:string colors:upgradedGiftBackdropColors rarity_per_mille:int32 = UpgradedGiftBackdrop; +//@rarity The rarity of the backdrop +upgradedGiftBackdrop id:int32 name:string colors:upgradedGiftBackdropColors rarity:UpgradedGiftAttributeRarity = UpgradedGiftBackdrop; //@description Describes the original details about the gift //@sender_id Identifier of the user or the chat that sent the gift; may be null if the gift was private @@ -1376,6 +1400,8 @@ gift id:int64 publisher_chat_id:int53 sticker:sticker star_count:int53 default_s //@number Unique number of the upgraded gift among gifts upgraded from the same gift //@total_upgraded_count Total number of gifts that were upgraded from the same gift //@max_upgraded_count The maximum number of gifts that can be upgraded from the same gift +//@is_burned True, if the gift was used to craft another gift +//@is_crafted True, if the gift was craft from another gifts //@is_premium True, if the original gift could have been bought only by Telegram Premium subscribers //@is_theme_available True, if the gift can be used to set a theme in a chat //@used_theme_chat_id Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user @@ -1388,20 +1414,21 @@ gift id:int64 publisher_chat_id:int53 sticker:sticker star_count:int53 default_s //@symbol Symbol of the upgraded gift //@backdrop Backdrop of the upgraded gift //@original_details Information about the originally sent gift; may be null if unknown -//@colors Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none +//@colors Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none or unknown //@resale_parameters Resale parameters of the gift; may be null if resale isn't possible //@can_send_purchase_offer True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer +//@craft_probability_per_mille Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting //@value_currency ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable //@value_amount Estimated value of the gift; in the smallest units of the currency; 0 if unavailable //@value_usd_amount Estimated value of the gift in USD; in USD cents; 0 if unavailable -upgradedGift id:int64 regular_gift_id:int64 publisher_chat_id:int53 title:string name:string number:int32 total_upgraded_count:int32 max_upgraded_count:int32 is_premium:Bool is_theme_available:Bool used_theme_chat_id:int53 host_id:MessageSender owner_id:MessageSender owner_address:string owner_name:string gift_address:string model:upgradedGiftModel symbol:upgradedGiftSymbol backdrop:upgradedGiftBackdrop original_details:upgradedGiftOriginalDetails colors:upgradedGiftColors resale_parameters:giftResaleParameters can_send_purchase_offer:Bool value_currency:string value_amount:int53 value_usd_amount:int53 = UpgradedGift; +upgradedGift id:int64 regular_gift_id:int64 publisher_chat_id:int53 title:string name:string number:int32 total_upgraded_count:int32 max_upgraded_count:int32 is_burned:Bool is_crafted:Bool is_premium:Bool is_theme_available:Bool used_theme_chat_id:int53 host_id:MessageSender owner_id:MessageSender owner_address:string owner_name:string gift_address:string model:upgradedGiftModel symbol:upgradedGiftSymbol backdrop:upgradedGiftBackdrop original_details:upgradedGiftOriginalDetails colors:upgradedGiftColors resale_parameters:giftResaleParameters can_send_purchase_offer:Bool craft_probability_per_mille:int32 value_currency:string value_amount:int53 value_usd_amount:int53 = UpgradedGift; //@description Contains information about value of an upgraded gift //@currency ISO 4217 currency code of the currency in which the prices are represented //@value Estimated value of the gift; in the smallest units of the currency //@is_value_average True, if the value is calculated as average value of similar sold gifts. Otherwise, it is based on the sale price of the gift //@initial_sale_date Point in time (Unix timestamp) when the corresponding regular gift was originally purchased -//@initial_sale_star_count Amount of Telegram Stars that were paid for the gift +//@initial_sale_star_count The Telegram Star amount that was paid for the gift //@initial_sale_price Initial price of the gift; in the smallest units of the currency //@last_sale_date Point in time (Unix timestamp) when the upgraded gift was purchased last time; 0 if never //@last_sale_price Last purchase price of the gift; in the smallest units of the currency; 0 if the gift has never been resold @@ -1425,6 +1452,24 @@ upgradedGiftValueInfo currency:string value:int53 is_value_average:Bool initial_ //@export_date Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; can be in the past upgradeGiftResult gift:upgradedGift received_gift_id:string is_saved:Bool can_be_transferred:Bool transfer_star_count:int53 drop_original_details_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 = UpgradeGiftResult; + +//@class CraftGiftResult @description Contains result of gift crafting + +//@description Crafting was successful +//@gift The created gift +//@received_gift_id Unique identifier of the received gift for the current user +craftGiftResultSuccess gift:upgradedGift received_gift_id:string = CraftGiftResult; + +//@description Crafting isn't possible because one of the gifts can't be used for crafting yet @retry_after Time left before the gift can be used for crafting +craftGiftResultTooEarly retry_after:int32 = CraftGiftResult; + +//@description Crafting isn't possible because one of the gifts isn't suitable for crafting +craftGiftResultInvalidGift = CraftGiftResult; + +//@description Crafting has failed +craftGiftResultFail = CraftGiftResult; + + //@description Describes a gift that is available for purchase //@gift The gift //@resale_count Number of gifts that are available for resale @@ -1438,7 +1483,7 @@ availableGifts gifts:vector = AvailableGifts; //@description Describes a price required to pay to upgrade a gift //@date Point in time (Unix timestamp) when the price will be in effect -//@star_count The amount of Telegram Stars required to pay to upgrade the gift +//@star_count The Telegram Star amount required to pay to upgrade the gift giftUpgradePrice date:int32 star_count:int53 = GiftUpgradePrice; @@ -1494,7 +1539,8 @@ giftsForResale total_count:int32 gifts:vector models:vector sell_star_count:int53 prepaid_upgrade_star_count:int53 is_upgrade_separate:Bool transfer_star_count:int53 drop_original_details_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 prepaid_upgrade_hash:string = ReceivedGift; +//@craft_date Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift +receivedGift received_gift_id:string sender_id:MessageSender text:formattedText unique_gift_number:int32 is_private:Bool is_saved:Bool is_pinned:Bool can_be_upgraded:Bool can_be_transferred:Bool was_refunded:Bool date:int32 gift:SentGift collection_ids:vector sell_star_count:int53 prepaid_upgrade_star_count:int53 is_upgrade_separate:Bool transfer_star_count:int53 drop_original_details_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 prepaid_upgrade_hash:string craft_date:int32 = ReceivedGift; //@description Represents a list of gifts received by a user or a chat //@total_count The total number of received gifts @@ -1541,6 +1588,19 @@ receivedGift received_gift_id:string sender_id:MessageSender text:formattedText //@next_offset The offset for the next request. If empty, then there are no more results receivedGifts total_count:int32 gifts:vector are_notifications_enabled:Bool next_offset:string = ReceivedGifts; +//@description Describes chance of the crafted gift to have the backdrop or symbol of one of the original gifts +//@persistence_chance_per_mille The 4 numbers that describe probability of the craft result to have the same attribute as one of the original gifts +//-if 1, 2, 3, or 4 gifts with the attribute are used in the craft. Each number represents the number of crafted gifts with the original attribute per 1000 successful craftings +attributeCraftPersistenceProbability persistence_chance_per_mille:vector = AttributeCraftPersistenceProbability; + +//@description Represents a list of gifts received by a user or a chat +//@total_count The total number of received gifts +//@gifts The list of gifts +//@attribute_persistence_probabilities The 4 objects that describe probabilities of the crafted gift to have the backdrop or symbol of one of the original gifts +//-for the cases when 1, 2, 3 or 4 gifts are used in the craft correspondingly +//@next_offset The offset for the next request. If empty, then there are no more results +giftsForCrafting total_count:int32 gifts:vector attribute_persistence_probabilities:vector next_offset:string = GiftsForCrafting; + //@description Contains examples of possible upgraded gifts for the given regular gift //@models Examples of possible models that can be chosen for the gift after upgrade //@symbols Examples of possible symbols that can be chosen for the gift after upgrade @@ -1651,7 +1711,7 @@ starTransactionTypeGooglePlayDeposit = StarTransactionType; starTransactionTypeFragmentDeposit = StarTransactionType; //@description The transaction is a deposit of Telegram Stars by another user; relevant for regular users only -//@user_id Identifier of the user that gifted Telegram Stars; 0 if the user was anonymous +//@user_id Identifier of the user who gifted Telegram Stars; 0 if the user was anonymous //@sticker The sticker to be shown in the transaction information; may be null if unknown starTransactionTypeUserDeposit user_id:int53 sticker:sticker = StarTransactionType; @@ -1671,12 +1731,12 @@ starTransactionTypeTelegramAdsWithdrawal = StarTransactionType; starTransactionTypeTelegramApiUsage request_count:int32 = StarTransactionType; //@description The transaction is a purchase of paid media from a bot or a business account by the current user; relevant for regular users only -//@user_id Identifier of the bot or the business account user that sent the paid media +//@user_id Identifier of the bot or the business account user who sent the paid media //@media The bought media if the transaction wasn't refunded starTransactionTypeBotPaidMediaPurchase user_id:int53 media:vector = StarTransactionType; //@description The transaction is a sale of paid media by the bot or a business account managed by the bot; relevant for bots only -//@user_id Identifier of the user that bought the media +//@user_id Identifier of the user who bought the media //@media The bought media //@payload Bot-provided payload //@affiliate Information about the affiliate which received commission from the transaction; may be null if none @@ -1689,31 +1749,31 @@ starTransactionTypeBotPaidMediaSale user_id:int53 media:vector payloa starTransactionTypeChannelPaidMediaPurchase chat_id:int53 message_id:int53 media:vector = StarTransactionType; //@description The transaction is a sale of paid media by the channel chat; relevant for channel chats only -//@user_id Identifier of the user that bought the media +//@user_id Identifier of the user who bought the media //@message_id Identifier of the corresponding message with paid media; may be 0 or an identifier of a deleted message //@media The bought media starTransactionTypeChannelPaidMediaSale user_id:int53 message_id:int53 media:vector = StarTransactionType; //@description The transaction is a purchase of a product from a bot or a business account by the current user; relevant for regular users only -//@user_id Identifier of the bot or the business account user that created the invoice +//@user_id Identifier of the bot or the business account user who created the invoice //@product_info Information about the bought product starTransactionTypeBotInvoicePurchase user_id:int53 product_info:productInfo = StarTransactionType; //@description The transaction is a sale of a product by the bot; relevant for bots only -//@user_id Identifier of the user that bought the product +//@user_id Identifier of the user who bought the product //@product_info Information about the bought product //@invoice_payload Invoice payload //@affiliate Information about the affiliate which received commission from the transaction; may be null if none starTransactionTypeBotInvoiceSale user_id:int53 product_info:productInfo invoice_payload:bytes affiliate:affiliateInfo = StarTransactionType; //@description The transaction is a purchase of a subscription from a bot or a business account by the current user; relevant for regular users only -//@user_id Identifier of the bot or the business account user that created the subscription link +//@user_id Identifier of the bot or the business account user who created the subscription link //@subscription_period The number of seconds between consecutive Telegram Star debitings //@product_info Information about the bought subscription starTransactionTypeBotSubscriptionPurchase user_id:int53 subscription_period:int32 product_info:productInfo = StarTransactionType; //@description The transaction is a sale of a subscription by the bot; relevant for bots only -//@user_id Identifier of the user that bought the subscription +//@user_id Identifier of the user who bought the subscription //@subscription_period The number of seconds between consecutive Telegram Star debitings //@product_info Information about the bought subscription //@invoice_payload Invoice payload @@ -1726,11 +1786,11 @@ starTransactionTypeBotSubscriptionSale user_id:int53 subscription_period:int32 p starTransactionTypeChannelSubscriptionPurchase chat_id:int53 subscription_period:int32 = StarTransactionType; //@description The transaction is a sale of a subscription by the channel chat; relevant for channel chats only -//@user_id Identifier of the user that bought the subscription +//@user_id Identifier of the user who bought the subscription //@subscription_period The number of seconds between consecutive Telegram Star debitings starTransactionTypeChannelSubscriptionSale user_id:int53 subscription_period:int32 = StarTransactionType; -//@description The transaction is a bid on a gift auction; relevant for regular users only @owner_id Identifier of the user that will receive the gift @gift The gift +//@description The transaction is a bid on a gift auction; relevant for regular users only @owner_id Identifier of the user who will receive the gift @gift The gift starTransactionTypeGiftAuctionBid owner_id:MessageSender gift:gift = StarTransactionType; //@description The transaction is a purchase of a regular gift; relevant for regular users and bots only @owner_id Identifier of the user or the channel that received the gift @gift The gift @@ -1745,23 +1805,23 @@ starTransactionTypeGiftTransfer owner_id:MessageSender gift:upgradedGift = StarT //@description The transaction is a drop of original details of an upgraded gift; relevant for regular users only @owner_id Identifier of the user or the channel that owns the gift @gift The gift starTransactionTypeGiftOriginalDetailsDrop owner_id:MessageSender gift:upgradedGift = StarTransactionType; -//@description The transaction is a sale of a received gift; relevant for regular users and channel chats only @user_id Identifier of the user that sent the gift @gift The gift +//@description The transaction is a sale of a received gift; relevant for regular users and channel chats only @user_id Identifier of the user who sent the gift @gift The gift starTransactionTypeGiftSale user_id:int53 gift:gift = StarTransactionType; -//@description The transaction is an upgrade of a gift; relevant for regular users only @user_id Identifier of the user that initially sent the gift @gift The upgraded gift +//@description The transaction is an upgrade of a gift; relevant for regular users only @user_id Identifier of the user who initially sent the gift @gift The upgraded gift starTransactionTypeGiftUpgrade user_id:int53 gift:upgradedGift = StarTransactionType; //@description The transaction is a purchase of an upgrade of a gift owned by another user or channel; relevant for regular users only @owner_id Owner of the upgraded gift @gift The gift starTransactionTypeGiftUpgradePurchase owner_id:MessageSender gift:gift = StarTransactionType; -//@description The transaction is a purchase of an upgraded gift for some user or channel; relevant for regular users only @user_id Identifier of the user that sold the gift @gift The gift +//@description The transaction is a purchase of an upgraded gift for some user or channel; relevant for regular users only @user_id Identifier of the user who sold the gift @gift The gift starTransactionTypeUpgradedGiftPurchase user_id:int53 gift:upgradedGift = StarTransactionType; //@description The transaction is a sale of an upgraded gift; relevant for regular users only -//@user_id Identifier of the user that bought the gift +//@user_id Identifier of the user who bought the gift //@gift The gift //@commission_per_mille The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars received by the seller of the gift -//@commission_star_amount The amount of Telegram Stars that were received by Telegram; can be negative for refunds +//@commission_star_amount The Telegram Star amount that was received by Telegram; can be negative for refunds //@via_offer True, if the gift was sold through a purchase offer starTransactionTypeUpgradedGiftSale user_id:int53 gift:upgradedGift commission_per_mille:int32 commission_star_amount:starAmount via_offer:Bool = StarTransactionType; @@ -1771,7 +1831,7 @@ starTransactionTypeUpgradedGiftSale user_id:int53 gift:upgradedGift commission_p starTransactionTypeChannelPaidReactionSend chat_id:int53 message_id:int53 = StarTransactionType; //@description The transaction is a receiving of a paid reaction to a message by the channel chat; relevant for channel chats only -//@user_id Identifier of the user that added the paid reaction +//@user_id Identifier of the user who added the paid reaction //@message_id Identifier of the reacted message; may be 0 or an identifier of a deleted message starTransactionTypeChannelPaidReactionReceive user_id:int53 message_id:int53 = StarTransactionType; @@ -1787,7 +1847,7 @@ starTransactionTypePaidMessageSend chat_id:int53 message_count:int32 = StarTrans //@sender_id Identifier of the sender of the message //@message_count Number of received paid messages //@commission_per_mille The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for message sending -//@commission_star_amount The amount of Telegram Stars that were received by Telegram; can be negative for refunds +//@commission_star_amount The Telegram Star amount that was received by Telegram; can be negative for refunds starTransactionTypePaidMessageReceive sender_id:MessageSender message_count:int32 commission_per_mille:int32 commission_star_amount:starAmount = StarTransactionType; //@description The transaction is a sending of a paid group call message; relevant for regular users only @chat_id Identifier of the chat that received the payment @@ -1796,7 +1856,7 @@ starTransactionTypePaidGroupCallMessageSend chat_id:int53 = StarTransactionType; //@description The transaction is a receiving of a paid group call message; relevant for regular users and channel chats only //@sender_id Identifier of the sender of the message //@commission_per_mille The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for message sending -//@commission_star_amount The amount of Telegram Stars that were received by Telegram; can be negative for refunds +//@commission_star_amount The Telegram Star amount that was received by Telegram; can be negative for refunds starTransactionTypePaidGroupCallMessageReceive sender_id:MessageSender commission_per_mille:int32 commission_star_amount:starAmount = StarTransactionType; //@description The transaction is a sending of a paid group reaction; relevant for regular users only @chat_id Identifier of the chat that received the payment @@ -1805,7 +1865,7 @@ starTransactionTypePaidGroupCallReactionSend chat_id:int53 = StarTransactionType //@description The transaction is a receiving of a paid group call reaction; relevant for regular users and channel chats only //@sender_id Identifier of the sender of the reaction //@commission_per_mille The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for reaction sending -//@commission_star_amount The amount of Telegram Stars that were received by Telegram; can be negative for refunds +//@commission_star_amount The Telegram Star amount that was received by Telegram; can be negative for refunds starTransactionTypePaidGroupCallReactionReceive sender_id:MessageSender commission_per_mille:int32 commission_star_amount:starAmount = StarTransactionType; //@description The transaction is a payment for a suggested post; relevant for regular users only @@ -1813,11 +1873,11 @@ starTransactionTypePaidGroupCallReactionReceive sender_id:MessageSender commissi starTransactionTypeSuggestedPostPaymentSend chat_id:int53 = StarTransactionType; //@description The transaction is a receiving of a payment for a suggested post by the channel chat; relevant for channel chats only -//@user_id Identifier of the user that paid for the suggested post +//@user_id Identifier of the user who paid for the suggested post starTransactionTypeSuggestedPostPaymentReceive user_id:int53 = StarTransactionType; //@description The transaction is a purchase of Telegram Premium subscription; relevant for regular users and bots only -//@user_id Identifier of the user that received the Telegram Premium subscription +//@user_id Identifier of the user who received the Telegram Premium subscription //@month_count Number of months the Telegram Premium subscription will be active //@sticker A sticker to be shown in the transaction information; may be null if unknown starTransactionTypePremiumPurchase user_id:int53 month_count:int32 sticker:sticker = StarTransactionType; @@ -1825,7 +1885,7 @@ starTransactionTypePremiumPurchase user_id:int53 month_count:int32 sticker:stick //@description The transaction is a transfer of Telegram Stars to a business bot; relevant for regular users only @user_id Identifier of the bot that received Telegram Stars starTransactionTypeBusinessBotTransferSend user_id:int53 = StarTransactionType; -//@description The transaction is a transfer of Telegram Stars from a business account; relevant for bots only @user_id Identifier of the user that sent Telegram Stars +//@description The transaction is a transfer of Telegram Stars from a business account; relevant for bots only @user_id Identifier of the user who sent Telegram Stars starTransactionTypeBusinessBotTransferReceive user_id:int53 = StarTransactionType; //@description The transaction is a payment for search of posts in public Telegram channels; relevant for regular users only @@ -1866,17 +1926,23 @@ tonTransactionTypeSuggestedPostPayment chat_id:int53 = TonTransactionType; //@description The transaction is an offer of gift purchase @gift The gift tonTransactionTypeGiftPurchaseOffer gift:upgradedGift = TonTransactionType; -//@description The transaction is a purchase of an upgraded gift for some user or channel @user_id Identifier of the user that sold the gift @gift The gift +//@description The transaction is a purchase of an upgraded gift for some user or channel @user_id Identifier of the user who sold the gift @gift The gift tonTransactionTypeUpgradedGiftPurchase user_id:int53 gift:upgradedGift = TonTransactionType; //@description The transaction is a sale of an upgraded gift -//@user_id Identifier of the user that bought the gift +//@user_id Identifier of the user who bought the gift //@gift The gift //@commission_per_mille The number of Toncoins received by the Telegram for each 1000 Toncoins received by the seller of the gift -//@commission_toncoin_amount The amount of Toncoins that were received by the Telegram; in the smallest units of the currency +//@commission_toncoin_amount The Toncoin amount that was received by the Telegram; in the smallest units of the currency //@via_offer True, if the gift was sold through a purchase offer tonTransactionTypeUpgradedGiftSale user_id:int53 gift:upgradedGift commission_per_mille:int32 commission_toncoin_amount:int53 via_offer:Bool = TonTransactionType; +//@description The transaction is a payment for stake dice throw +tonTransactionTypeStakeDiceStake = TonTransactionType; + +//@description The transaction is a payment for successful stake dice throw +tonTransactionTypeStakeDicePayout = TonTransactionType; + //@description The transaction is a transaction of an unsupported type tonTransactionTypeUnsupported = TonTransactionType; @@ -1943,7 +2009,7 @@ giveawayInfoOngoing creation_date:int32 status:GiveawayParticipantStatus is_ende //@winner_count Number of winners in the giveaway //@activation_count Number of winners, which activated their gift codes; for Telegram Premium giveaways only //@gift_code Telegram Premium gift code that was received by the current user; empty if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Premium giveaway -//@won_star_count The amount of Telegram Stars won by the current user; 0 if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Star giveaway +//@won_star_count The Telegram Star amount won by the current user; 0 if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Star giveaway giveawayInfoCompleted creation_date:int32 actual_winners_selection_date:int32 was_refunded:Bool is_winner:Bool winner_count:int32 activation_count:int32 gift_code:string won_star_count:int53 = GiveawayInfo; @@ -2173,7 +2239,7 @@ chatMemberStatusBanned banned_until_date:int32 = ChatMemberStatus; //@description Describes a user or a chat as a member of another chat //@member_id Identifier of the chat member. Currently, other chats can be only Left or Banned. Only supergroups and channels can have other chats as Left or Banned members and these chats must be supergroups or channels -//@inviter_user_id Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown +//@inviter_user_id Identifier of a user who invited/promoted/banned this member in the chat; 0 if unknown //@joined_chat_date Point in time (Unix timestamp) when the user joined/was promoted/was banned in the chat //@status Status of the member in the chat chatMember member_id:MessageSender inviter_user_id:int53 joined_chat_date:int32 status:ChatMemberStatus = ChatMember; @@ -2308,7 +2374,7 @@ chatInviteLinkSubscriptionInfo pricing:starSubscriptionPricing can_reuse:Bool fo chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:InviteLinkChatType title:string photo:chatPhotoInfo accent_color_id:int32 description:string member_count:int32 member_user_ids:vector subscription_info:chatInviteLinkSubscriptionInfo creates_join_request:Bool is_public:Bool verification_status:verificationStatus = ChatInviteLinkInfo; -//@description Describes a user that sent a join request and waits for administrator approval @user_id User identifier @date Point in time (Unix timestamp) when the user sent the join request @bio A short bio of the user +//@description Describes a user who sent a join request and waits for administrator approval @user_id User identifier @date Point in time (Unix timestamp) when the user sent the join request @bio A short bio of the user chatJoinRequest user_id:int53 date:int32 bio:string = ChatJoinRequest; //@description Contains a list of requests to join a chat @total_count Approximate total number of requests found @requests List of the requests @@ -2451,7 +2517,7 @@ publicPostSearchLimits daily_free_query_count:int32 remaining_free_query_count:i //@class MessageSender @description Contains information about the sender of a message -//@description The message was sent by a known user @user_id Identifier of the user that sent the message +//@description The message was sent by a known user @user_id Identifier of the user who sent the message messageSenderUser user_id:int53 = MessageSender; //@description The message was sent on behalf of a chat @chat_id Identifier of the chat that sent the message @@ -2496,7 +2562,7 @@ messageViewers viewers:vector = MessageViewers; //@class MessageOrigin @description Contains information about the origin of a message -//@description The message was originally sent by a known user @sender_user_id Identifier of the user that originally sent the message +//@description The message was originally sent by a known user @sender_user_id Identifier of the user who originally sent the message messageOriginUser sender_user_id:int53 = MessageOrigin; //@description The message was originally sent by a user, which is hidden by their privacy settings @sender_name Name of the sender @@ -2548,7 +2614,7 @@ paidReactionTypeAnonymous = PaidReactionType; paidReactionTypeChat chat_id:int53 = PaidReactionType; -//@description Contains information about a user that added paid reactions +//@description Contains information about a user who added paid reactions //@sender_id Identifier of the user or chat that added the reactions; may be null for anonymous reactors that aren't the current user //@star_count Number of Telegram Stars added //@is_top True, if the reactor is one of the most active reactors; may be false if the reactor is the current user @@ -3192,7 +3258,7 @@ chat id:int53 type:ChatType title:string photo:chatPhotoInfo accent_color_id:int chats total_count:int32 chat_ids:vector = Chats; -//@description Contains information about a user that has failed to be added to a chat +//@description Contains information about a user who has failed to be added to a chat //@user_id User identifier //@premium_would_allow_invite True, if subscription to Telegram Premium would have allowed to add the user to the chat //@premium_required_to_send_messages True, if subscription to Telegram Premium is required to send the user chat invite link @@ -3215,7 +3281,7 @@ publicChatTypeHasUsername = PublicChatType; publicChatTypeIsLocationBased = PublicChatType; -//@description Contains basic information about another user that started a chat with the current user +//@description Contains basic information about another user who started a chat with the current user //@registration_month Month when the user was registered in Telegram; 0-12; may be 0 if unknown //@registration_year Year when the user was registered in Telegram; 0-9999; may be 0 if unknown //@phone_number_country_code A two-letter ISO 3166-1 alpha-2 country code based on the phone number of the user; may be empty if unknown @@ -3252,6 +3318,21 @@ chatActionBarSharePhoneNumber = ChatActionBar; chatActionBarJoinRequest title:string is_channel:Bool request_date:int32 = ChatActionBar; +//@class ButtonStyle @description Describes style of a button + +//@description The button has default style +buttonStyleDefault = ButtonStyle; + +//@description The button has dark blue color +buttonStylePrimary = ButtonStyle; + +//@description The button has red color +buttonStyleDanger = ButtonStyle; + +//@description The button has green color +buttonStyleSuccess = ButtonStyle; + + //@class KeyboardButtonType @description Describes a keyboard button type //@description A simple button, with text that must be sent when the button is pressed @@ -3298,8 +3379,12 @@ keyboardButtonTypeRequestChat id:int32 chat_is_channel:Bool restrict_chat_is_for keyboardButtonTypeWebApp url:string = KeyboardButtonType; -//@description Represents a single button in a bot keyboard @text Text of the button @type Type of the button -keyboardButton text:string type:KeyboardButtonType = KeyboardButton; +//@description Represents a single button in a bot keyboard +//@text Text of the button +//@icon_custom_emoji_id Identifier of the custom emoji that must be shown on the button; 0 if none +//@style Style of the button +//@type Type of the button +keyboardButton text:string icon_custom_emoji_id:int64 style:ButtonStyle type:KeyboardButtonType = KeyboardButton; //@class InlineKeyboardButtonType @description Describes the type of inline keyboard button @@ -3335,8 +3420,12 @@ inlineKeyboardButtonTypeUser user_id:int53 = InlineKeyboardButtonType; inlineKeyboardButtonTypeCopyText text:string = InlineKeyboardButtonType; -//@description Represents a single button in an inline keyboard @text Text of the button @type Type of the button -inlineKeyboardButton text:string type:InlineKeyboardButtonType = InlineKeyboardButton; +//@description Represents a single button in an inline keyboard +//@text Text of the button +//@icon_custom_emoji_id Identifier of the custom emoji that must be shown on the button; 0 if none +//@style Style of the button +//@type Type of the button +inlineKeyboardButton text:string icon_custom_emoji_id:int64 style:ButtonStyle type:InlineKeyboardButtonType = InlineKeyboardButton; //@class ReplyMarkup @description Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots @@ -3374,7 +3463,12 @@ loginUrlInfoOpen url:string skip_confirmation:Bool = LoginUrlInfo; //@domain A domain of the URL //@bot_user_id User identifier of a bot linked with the website //@request_write_access True, if the user must be asked for the permission to the bot to send them messages -loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 request_write_access:Bool = LoginUrlInfo; +//@request_phone_number_access True, if the user must be asked for the permission to share their phone number +//@browser The version of a browser used for the authorization; may be empty if irrelevant +//@platform Operating system the browser is running on; may be empty if irrelevant +//@ip_address IP address from which the authorization is performed, in human-readable format; may be empty if irrelevant +//@location Human-readable description of a country and a region from which the authorization is performed, based on the IP address; may be empty if irrelevant +loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 request_write_access:Bool request_phone_number_access:Bool browser:string platform:string ip_address:string location:string = LoginUrlInfo; //@description Contains parameters of the application theme @@ -4639,8 +4733,8 @@ messagePoll poll:poll = MessageContent; //@initial_state The animated stickers with the initial dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known //@final_state The animated stickers with the final dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known //@value The dice value. If the value is 0, then the dice don't have final state yet -//@stake_toncoin_amount The amount of Toncoins that were staked; in the smallest units of the currency -//@prize_toncoin_amount The amount of Toncoins that were gained from the roll; in the smallest units of the currency; -1 if the dice don't have final state yet +//@stake_toncoin_amount The Toncoin amount that was staked; in the smallest units of the currency +//@prize_toncoin_amount The Toncoin amount that was gained from the roll; in the smallest units of the currency; -1 if the dice don't have final state yet messageStakeDice initial_state:DiceStickers final_state:DiceStickers value:int32 stake_toncoin_amount:int53 prize_toncoin_amount:int53 = MessageContent; //@description A message with a forwarded story @@ -4670,12 +4764,13 @@ messageCall is_video:Bool discard_reason:CallDiscardReason duration:int32 = Mess //@description A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, //-and getOption("can_accept_calls") is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen. //-Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden +//@unique_id Persistent unique group call identifier //@is_active True, if the call is active, i.e. the called user joined the call //@was_missed True, if the called user missed or declined the call //@is_video True, if the call is a video call //@duration Call duration, in seconds; for left calls only //@other_participant_ids Identifiers of some other call participants -messageGroupCall is_active:Bool was_missed:Bool is_video:Bool duration:int32 other_participant_ids:vector = MessageContent; +messageGroupCall unique_id:int64 is_active:Bool was_missed:Bool is_video:Bool duration:int32 other_participant_ids:vector = MessageContent; //@description A new video chat was scheduled @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall @start_date Point in time (Unix timestamp) when the group call is expected to be started by an administrator messageVideoChatScheduled group_call_id:int32 start_date:int32 = MessageContent; @@ -4704,6 +4799,12 @@ messageChatChangePhoto photo:chatPhoto = MessageContent; //@description A deleted chat photo messageChatDeletePhoto = MessageContent; +//@description The owner of the chat has left @new_owner_user_id Identifier of the user who will become the new owner of the chat if the previous owner isn't return; 0 if none +messageChatOwnerLeft new_owner_user_id:int53 = MessageContent; + +//@description The owner of the chat has changed @new_owner_user_id Identifier of the user who is the new owner of the chat +messageChatOwnerChanged new_owner_user_id:int53 = MessageContent; + //@description New chat members were added @member_user_ids User identifiers of the new members messageChatAddMembers member_user_ids:vector = MessageContent; @@ -4807,8 +4908,8 @@ messagePaymentSuccessfulBot currency:string total_amount:int53 subscription_unti messagePaymentRefunded owner_id:MessageSender currency:string total_amount:int53 invoice_payload:bytes telegram_payment_charge_id:string provider_payment_charge_id:string = MessageContent; //@description Telegram Premium was gifted to a user -//@gifter_user_id The identifier of a user that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing -//@receiver_user_id The identifier of a user that received Telegram Premium; 0 if the gift is incoming +//@gifter_user_id The identifier of a user who gifted Telegram Premium; 0 if the gift was anonymous or is outgoing +//@receiver_user_id The identifier of a user who received Telegram Premium; 0 if the gift is incoming //@text Message added to the gifted Telegram Premium by the sender //@currency Currency for the paid amount //@amount The paid amount, in the smallest units of the currency @@ -4820,7 +4921,7 @@ messagePaymentRefunded owner_id:MessageSender currency:string total_amount:int53 messageGiftedPremium gifter_user_id:int53 receiver_user_id:int53 text:formattedText currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 month_count:int32 day_count:int32 sticker:sticker = MessageContent; //@description A Telegram Premium gift code was created for the user -//@creator_id Identifier of a chat or a user that created the gift code; may be null if unknown +//@creator_id Identifier of a chat or a user who created the gift code; may be null if unknown //@text Message added to the gift //@is_from_giveaway True, if the gift code was created for a giveaway //@is_unclaimed True, if the winner for the corresponding Telegram Premium subscription wasn't chosen @@ -4867,8 +4968,8 @@ messageGiveawayCompleted giveaway_message_id:int53 winner_count:int32 is_star_gi messageGiveawayWinners boosted_chat_id:int53 giveaway_message_id:int53 additional_chat_count:int32 actual_winners_selection_date:int32 only_new_members:Bool was_refunded:Bool prize:GiveawayPrize prize_description:string winner_count:int32 winner_user_ids:vector unclaimed_prize_count:int32 = MessageContent; //@description Telegram Stars were gifted to a user -//@gifter_user_id The identifier of a user that gifted Telegram Stars; 0 if the gift was anonymous or is outgoing -//@receiver_user_id The identifier of a user that received Telegram Stars; 0 if the gift is incoming +//@gifter_user_id The identifier of a user who gifted Telegram Stars; 0 if the gift was anonymous or is outgoing +//@receiver_user_id The identifier of a user who received Telegram Stars; 0 if the gift is incoming //@currency Currency for the paid amount //@amount The paid amount, in the smallest units of the currency //@cryptocurrency Cryptocurrency used to pay for the gift; may be empty if none @@ -4879,9 +4980,9 @@ messageGiveawayWinners boosted_chat_id:int53 giveaway_message_id:int53 additiona messageGiftedStars gifter_user_id:int53 receiver_user_id:int53 currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 star_count:int53 transaction_id:string sticker:sticker = MessageContent; //@description Toncoins were gifted to a user -//@gifter_user_id The identifier of a user that gifted Toncoins; 0 if the gift was anonymous or is outgoing -//@receiver_user_id The identifier of a user that received Toncoins; 0 if the gift is incoming -//@ton_amount The received amount of Toncoins, in the smallest units of the cryptocurrency +//@gifter_user_id The identifier of a user who gifted Toncoins; 0 if the gift was anonymous or is outgoing +//@receiver_user_id The identifier of a user who received Toncoins; 0 if the gift is incoming +//@ton_amount The received Toncoin amount, in the smallest units of the cryptocurrency //@transaction_id Identifier of the transaction for Toncoin credit; for receiver only //@sticker A sticker to be shown in the message; may be null if unknown messageGiftedTon gifter_user_id:int53 receiver_user_id:int53 ton_amount:int53 transaction_id:string sticker:sticker = MessageContent; @@ -4931,7 +5032,8 @@ messageGift gift:gift sender_id:MessageSender receiver_id:MessageSender received //@next_transfer_date Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift //@next_resale_date Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can't be resold; only for the receiver of the gift //@export_date Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift -messageUpgradedGift gift:upgradedGift sender_id:MessageSender receiver_id:MessageSender origin:UpgradedGiftOrigin received_gift_id:string is_saved:Bool can_be_transferred:Bool was_transferred:Bool transfer_star_count:int53 drop_original_details_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 = MessageContent; +//@craft_date Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift +messageUpgradedGift gift:upgradedGift sender_id:MessageSender receiver_id:MessageSender origin:UpgradedGiftOrigin received_gift_id:string is_saved:Bool can_be_transferred:Bool was_transferred:Bool transfer_star_count:int53 drop_original_details_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 craft_date:int32 = MessageContent; //@description A gift which purchase, upgrade or transfer were refunded //@gift The gift @@ -5327,7 +5429,7 @@ inputMessagePoll question:formattedText options:vector is_anonymo //@description A stake dice message //@state_hash Hash of the stake dice state. The state hash can be used only if it was received recently enough. Otherwise, a new state must be requested using getStakeDiceState -//@stake_toncoin_amount The amount of Toncoins that will be staked; in the smallest units of the currency. Must be in the range +//@stake_toncoin_amount The Toncoin amount that will be staked; in the smallest units of the currency. Must be in the range //-getOption("stake_dice_stake_amount_min")-getOption("stake_dice_stake_amount_max") //@clear_draft True, if the chat message draft must be deleted inputMessageStakeDice state_hash:string stake_toncoin_amount:int53 clear_draft:Bool = InputMessageContent; @@ -5737,6 +5839,21 @@ inputStoryAreas areas:vector = InputStoryAreas; storyVideo duration:double width:int32 height:int32 has_stickers:Bool is_animation:Bool minithumbnail:minithumbnail thumbnail:thumbnail preload_prefix_size:int32 cover_frame_timestamp:double video:file = StoryVideo; +//@class StoryContentType @description Contains the type of the content of a story + +//@description A photo story +storyContentTypePhoto = StoryContentType; + +//@description A video story +storyContentTypeVideo = StoryContentType; + +//@description A live story +storyContentTypeLive = StoryContentType; + +//@description A story of unknown content type +storyContentTypeUnsupported = StoryContentType; + + //@class StoryContent @description Contains the content of a story //@description A photo story @photo The photo @@ -5814,7 +5931,7 @@ storyInteractionInfo view_count:int32 forward_count:int32 reaction_count:int32 r //@can_be_deleted True, if the story can be deleted //@can_be_edited True, if the story can be edited //@can_be_forwarded True, if the story can be forwarded as a message or reposted as a story. Otherwise, screenshotting and saving of the story content must be also forbidden -//@can_be_replied True, if the story can be replied in the chat with the user that posted the story +//@can_be_replied True, if the story can be replied in the chat with the user who posted the story //@can_set_privacy_settings True, if the story privacy settings can be changed //@can_toggle_is_posted_to_chat_page True, if the story's is_posted_to_chat_page value can be changed //@can_get_statistics True, if the story statistics are available through getStoryStatistics @@ -5992,7 +6109,7 @@ chatBoostFeatures features:vector min_profile_background chatBoostSourceGiftCode user_id:int53 gift_code:string = ChatBoostSource; //@description The chat created a giveaway -//@user_id Identifier of a user that won in the giveaway; 0 if none +//@user_id Identifier of a user who won in the giveaway; 0 if none //@gift_code The created Telegram Premium gift code if it was used by the user or can be claimed by the current user; an empty string otherwise; for Telegram Premium giveways only //@star_count Number of Telegram Stars distributed among winners of the giveaway //@giveaway_message_id Identifier of the corresponding giveaway message; can be an identifier of a deleted message @@ -6191,6 +6308,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall //@description Describes a group call //@id Group call identifier +//@unique_id Persistent unique group call identifier //@title Group call title; for video chats only //@invite_link Invite link for the group call; for group calls that aren't bound to a chat. For video chats call getVideoChatInviteLink to get the link. //-For live stories in chats with username call getInternalLink with internalLinkTypeLiveStory @@ -6222,7 +6340,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall //@record_duration Duration of the ongoing group call recording, in seconds; 0 if none. An updateGroupCall update is not triggered when value of this field changes, but the same recording goes on //@is_video_recorded True, if a video file is being recorded for the call //@duration Call duration, in seconds; for ended calls only -groupCall id:int32 title:string invite_link:string paid_message_star_count:int53 scheduled_start_date:int32 enabled_start_notification:Bool is_active:Bool is_video_chat:Bool is_live_story:Bool is_rtmp_stream:Bool is_joined:Bool need_rejoin:Bool is_owned:Bool can_be_managed:Bool participant_count:int32 has_hidden_listeners:Bool loaded_all_participants:Bool message_sender_id:MessageSender recent_speakers:vector is_my_video_enabled:Bool is_my_video_paused:Bool can_enable_video:Bool mute_new_participants:Bool can_toggle_mute_new_participants:Bool can_send_messages:Bool are_messages_allowed:Bool can_toggle_are_messages_allowed:Bool can_delete_messages:Bool record_duration:int32 is_video_recorded:Bool duration:int32 = GroupCall; +groupCall id:int32 unique_id:int64 title:string invite_link:string paid_message_star_count:int53 scheduled_start_date:int32 enabled_start_notification:Bool is_active:Bool is_video_chat:Bool is_live_story:Bool is_rtmp_stream:Bool is_joined:Bool need_rejoin:Bool is_owned:Bool can_be_managed:Bool participant_count:int32 has_hidden_listeners:Bool loaded_all_participants:Bool message_sender_id:MessageSender recent_speakers:vector is_my_video_enabled:Bool is_my_video_paused:Bool can_enable_video:Bool mute_new_participants:Bool can_toggle_mute_new_participants:Bool can_send_messages:Bool are_messages_allowed:Bool can_toggle_are_messages_allowed:Bool can_delete_messages:Bool record_duration:int32 is_video_recorded:Bool duration:int32 = GroupCall; //@description Describes a group of video synchronization source identifiers @semantics The semantics of sources, one of "SIM" or "FID" @source_ids The list of synchronization source identifiers groupCallVideoSourceGroup semantics:string source_ids:vector = GroupCallVideoSourceGroup; @@ -6350,11 +6468,12 @@ callProblemPixelatedVideo = CallProblem; //@description Describes a call //@id Call identifier, not persistent +//@unique_id Persistent unique call identifier; 0 if isn't assigned yet by the server //@user_id User identifier of the other call participant //@is_outgoing True, if the call is outgoing //@is_video True, if the call is a video call //@state Call state -call id:int32 user_id:int53 is_outgoing:Bool is_video:Bool state:CallState = Call; +call id:int32 unique_id:int64 user_id:int53 is_outgoing:Bool is_video:Bool state:CallState = Call; //@class FirebaseAuthenticationSettings @description Contains settings for Firebase Authentication in the official applications @@ -6468,7 +6587,7 @@ speechRecognitionResultError error:error = SpeechRecognitionResult; //@description Describes a connection of the bot with a business account //@id Unique identifier of the connection -//@user_id Identifier of the business user that created the connection +//@user_id Identifier of the business user who created the connection //@user_chat_id Chat identifier of the private chat with the user //@date Point in time (Unix timestamp) when the connection was established //@rights Rights of the bot; may be null if the connection was disabled @@ -7292,7 +7411,7 @@ premiumSourceBusinessFeature feature:BusinessFeature = PremiumSource; //@description A user tried to use a Premium story feature @feature The used feature premiumSourceStoryFeature feature:PremiumStoryFeature = PremiumSource; -//@description A user opened an internal link of the type internalLinkTypePremiumFeatures @referrer The referrer from the link +//@description A user opened an internal link of the type internalLinkTypePremiumFeaturesPage @referrer The referrer from the link premiumSourceLink referrer:string = PremiumSource; //@description A user opened the Premium features screen from settings @@ -7588,10 +7707,10 @@ canPostStoryResultBoostNeeded = CanPostStoryResult; //@description The limit for the number of active stories exceeded. The user can buy Telegram Premium, delete an active story, or wait for the oldest story to expire canPostStoryResultActiveStoryLimitExceeded = CanPostStoryResult; -//@description The weekly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time @retry_after Time left before the user can post the next story +//@description The weekly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time @retry_after Time left before the user can post the next story, in seconds canPostStoryResultWeeklyLimitExceeded retry_after:int32 = CanPostStoryResult; -//@description The monthly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time @retry_after Time left before the user can post the next story +//@description The monthly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time @retry_after Time left before the user can post the next story, in seconds canPostStoryResultMonthlyLimitExceeded retry_after:int32 = CanPostStoryResult; //@description The user or the chat has an active live story. The live story must be deleted first @story_id Identifier of the active live story @@ -7918,6 +8037,13 @@ notification id:int32 date:int32 is_silent:Bool type:NotificationType = Notifica notificationGroup id:int32 type:NotificationGroupType chat_id:int53 total_count:int32 notifications:vector = NotificationGroup; +//@description Describes a proxy server +//@server Proxy server domain or IP address +//@port Proxy server port +//@type Type of the proxy +proxy server:string port:int32 type:ProxyType = Proxy; + + //@class OptionValue @description Represents the value of an option //@description Represents a boolean option @value The value of the option @@ -8254,10 +8380,140 @@ reportStoryResultOptionRequired title:string options:vector = Repo reportStoryResultTextRequired option_id:bytes is_optional:Bool = ReportStoryResult; -//@class InternalLinkType @description Describes an internal https://t.me or tg: link, which must be processed by the application in a special way +//@class SettingsSection @description Describes a section of the application settings + +//@description The appearance section @subsection Subsection of the section; may be one of +//-"", "themes", "themes/edit", "themes/create", "wallpapers", "wallpapers/edit", "wallpapers/set", +//-"wallpapers/choose-photo", "your-color/profile", "your-color/profile/add-icons", "your-color/profile/use-gift", +//-"your-color/profile/reset", "your-color/name", "your-color/name/add-icons", "your-color/name/use-gift", +//-"night-mode", "auto-night-mode", "text-size", "text-size/use-system", "message-corners", "animations", +//-"stickers-and-emoji", "stickers-and-emoji/edit", "stickers-and-emoji/trending", "stickers-and-emoji/archived", +//-"stickers-and-emoji/archived/edit", "stickers-and-emoji/emoji", "stickers-and-emoji/emoji/edit", +//-"stickers-and-emoji/emoji/archived", "stickers-and-emoji/emoji/archived/edit", "stickers-and-emoji/emoji/suggest", +//-"stickers-and-emoji/emoji/quick-reaction", "stickers-and-emoji/emoji/quick-reaction/choose", +//-"stickers-and-emoji/suggest-by-emoji", "stickers-and-emoji/large-emoji", "stickers-and-emoji/dynamic-order", +//-"stickers-and-emoji/emoji/show-more", "app-icon", "tap-for-next-media" +settingsSectionAppearance subsection:string = SettingsSection; + +//@description The "Ask a question" section +settingsSectionAskQuestion = SettingsSection; + +//@description The "Telegram Business" section @subsection Subsection of the section; may be one of +//-"", "do-not-hide-ads" +settingsSectionBusiness subsection:string = SettingsSection; + +//@description The chat folder settings section @subsection Subsection of the section; may be one of +//-"", "edit", "create", "add-recommended", "show-tags", "tab-view" +settingsSectionChatFolders subsection:string = SettingsSection; + +//@description The data and storage settings section @subsection Subsection of the section; may be one of +//-"", "storage", "storage/edit", "storage/auto-remove", "storage/clear-cache", "storage/max-cache", "usage", +//-"usage/mobile", "usage/wifi", "usage/reset", "usage/roaming", "auto-download/mobile", +//-"auto-download/mobile/enable", "auto-download/mobile/usage", "auto-download/mobile/photos", +//-"auto-download/mobile/stories", "auto-download/mobile/videos", "auto-download/mobile/files", "auto-download/wifi", +//-"auto-download/wifi/enable", "auto-download/wifi/usage", "auto-download/wifi/photos", +//-"auto-download/wifi/stories", "auto-download/wifi/videos", "auto-download/wifi/files", "auto-download/roaming", +//-"auto-download/roaming/enable", "auto-download/roaming/usage", "auto-download/roaming/photos", +//-"auto-download/roaming/stories", "auto-download/roaming/videos", "auto-download/roaming/files", +//-"auto-download/reset", "save-to-photos/chats", "save-to-photos/chats/max-video-size", +//-"save-to-photos/chats/add-exception", "save-to-photos/chats/delete-all", "save-to-photos/groups", +//-"save-to-photos/groups/max-video-size", "save-to-photos/groups/add-exception", "save-to-photos/groups/delete-all", +//-"save-to-photos/channels", "save-to-photos/channels/max-video-size", "save-to-photos/channels/add-exception", +//-"save-to-photos/channels/delete-all", "less-data-calls", "open-links", "share-sheet", +//-"share-sheet/suggested-chats", "share-sheet/suggest-by", "share-sheet/reset", "saved-edited-photos", +//-"pause-music", "raise-to-listen", "raise-to-speak", "show-18-content", "proxy", "proxy/edit", "proxy/use-proxy", +//-"proxy/add-proxy", "proxy/share-list", "proxy/use-for-calls" +settingsSectionDataAndStorage subsection:string = SettingsSection; + +//@description The Devices section @subsection Subsection of the section; may be one of +//-"", "edit", "link-desktop", "terminate-sessions", "auto-terminate" +settingsSectionDevices subsection:string = SettingsSection; + +//@description The profile edit section @subsection Subsection of the section; may be one of +//-"", "set-photo", "first-name", "last-name", "emoji-status", "bio", "birthday", "change-number", "username", +//-"your-color", "channel", "add-account", "log-out", "profile-color/profile", "profile-color/profile/add-icons", +//-"profile-color/profile/use-gift", "profile-color/name", "profile-color/name/add-icons", +//-"profile-color/name/use-gift", "profile-photo/use-emoji" +settingsSectionEditProfile subsection:string = SettingsSection; + +//@description The FAQ section +settingsSectionFaq = SettingsSection; + +//@description The "Telegram Features" section +settingsSectionFeatures = SettingsSection; + +//@description The in-app browser settings section @subsection Subsection of the section; may be one of +//-"", "enable-browser", "clear-cookies", "clear-cache", "history", "clear-history", "never-open", "clear-list", "search" +settingsSectionInAppBrowser subsection:string = SettingsSection; + +//@description The application language section @subsection Subsection of the section; may be one of "", "show-button" for Show Translate Button toggle, +//-"translate-chats" for Translate Entire Chats toggle, "do-not-translate" - for Do Not Translate language list +settingsSectionLanguage subsection:string = SettingsSection; + +//@description The Telegram Star balance and transaction section @subsection Subsection of the section; may be one of +//-"", "top-up", "stats", "gift", "earn" +settingsSectionMyStars subsection:string = SettingsSection; + +//@description The Toncoin balance and transaction section +settingsSectionMyToncoins = SettingsSection; + +//@description The notification settings section @subsection Subsection of the section; may be one of +//-"", "accounts", "private-chats", "private-chats/edit", "private-chats/show", "private-chats/preview", +//-"private-chats/sound", "private-chats/add-exception", "private-chats/delete-exceptions", +//-"private-chats/light-color", "private-chats/vibrate", "private-chats/priority", "groups", "groups/edit", +//-"groups/show", "groups/preview", "groups/sound", "groups/add-exception", "groups/delete-exceptions", +//-"groups/light-color", "groups/vibrate", "groups/priority", "channels", "channels/edit", "channels/show", +//-"channels/preview", "channels/sound", "channels/add-exception", "channels/delete-exceptions", +//-"channels/light-color", "channels/vibrate", "channels/priority", "stories", "stories/new", "stories/important", +//-"stories/show-sender", "stories/sound", "stories/add-exception", "stories/delete-exceptions", +//-"stories/light-color", "stories/vibrate", "stories/priority", "reactions", "reactions/messages", +//-"reactions/stories", "reactions/show-sender", "reactions/sound", "reactions/light-color", "reactions/vibrate", +//-"reactions/priority", "in-app-sounds", "in-app-vibrate", "in-app-preview", "in-chat-sounds", "in-app-popup", +//-"lock-screen-names", "include-channels", "include-muted-chats", "count-unread-messages", "new-contacts", +//-"pinned-messages", "reset", "web" +settingsSectionNotifications subsection:string = SettingsSection; + +//@description The power saving settings section @subsection Subsection of the section; may be one of +//-"", "videos", "gifs", "stickers", "emoji", "effects", "preload", "background", "call-animations", "particles", "transitions" +settingsSectionPowerSaving subsection:string = SettingsSection; + +//@description The "Telegram Premium" section +settingsSectionPremium = SettingsSection; + +//@description The privacy and security section @subsection Subsection of the section; may be one of +//-"", "blocked", "blocked/edit", "blocked/block-user", "blocked/block-user/chats", "blocked/block-user/contacts", +//-"active-websites", "active-websites/edit", "active-websites/disconnect-all", "passcode", "passcode/disable", +//-"passcode/change", "passcode/auto-lock", "passcode/face-id", "passcode/fingerprint", "2sv", "2sv/change", +//-"2sv/disable", "2sv/change-email", "passkey", "passkey/create", "auto-delete", "auto-delete/set-custom", +//-"login-email", "phone-number", "phone-number/never", "phone-number/always", "last-seen", "last-seen/never", +//-"last-seen/always", "last-seen/hide-read-time", "profile-photos", "profile-photos/never", "profile-photos/always", +//-"profile-photos/set-public", "profile-photos/update-public", "profile-photos/remove-public", "bio", "bio/never", +//-"bio/always", "gifts", "gifts/show-icon", "gifts/never", "gifts/always", "gifts/accepted-types", "birthday", +//-"birthday/add", "birthday/never", "birthday/always", "saved-music", "saved-music/never", "saved-music/always", +//-"forwards", "forwards/never", "forwards/always", "calls", "calls/never", "calls/always", "calls/p2p", +//-"calls/p2p/never", "calls/p2p/always", "calls/ios-integration", "voice", "voice/never", "voice/always", +//-"messages", "messages/set-price", "messages/exceptions", "invites", "invites/never", "invites/always", +//-"self-destruct", "data-settings", "data-settings/sync-contacts", "data-settings/delete-synced", +//-"data-settings/suggest-contacts", "data-settings/delete-cloud-drafts", "data-settings/clear-payment-info", +//-"data-settings/link-previews", "data-settings/bot-settings", "data-settings/map-provider", "archive-and-mute" +settingsSectionPrivacyAndSecurity subsection:string = SettingsSection; + +//@description The "Privacy Policy" section +settingsSectionPrivacyPolicy = SettingsSection; + +//@description The current user's QR code section @subsection Subsection of the section; may be one of +//-"", "share", "scan" +settingsSectionQrCode subsection:string = SettingsSection; + +//@description Search in Settings +settingsSectionSearch = SettingsSection; + +//@description The "Send a gift" section @subsection Subsection of the section; may be one of +//-"", "self" +settingsSectionSendGift subsection:string = SettingsSection; + -//@description The link is a link to the Devices section of the application. Use getActiveSessions to get the list of active sessions and show them to the user -internalLinkTypeActiveSessions = InternalLinkType; +//@class InternalLinkType @description Describes an internal https://t.me or tg: link, which must be processed by the application in a special way //@description The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat. //-Then, call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then, use getAttachmentMenuBot to receive information about the bot. @@ -8307,13 +8563,9 @@ internalLinkTypeBotStartInGroup bot_username:string start_parameter:string admin //@link_name Name of the link internalLinkTypeBusinessChat link_name:string = InternalLinkType; -//@description The link is a link to the Telegram Star purchase section of the application -//@star_count The number of Telegram Stars that must be owned by the user -//@purpose Purpose of Telegram Star purchase. Arbitrary string specified by the server, for example, "subs" if the Telegram Stars are required to extend channel subscriptions -internalLinkTypeBuyStars star_count:int53 purpose:string = InternalLinkType; - -//@description The link is a link to the change phone number section of the application -internalLinkTypeChangePhoneNumber = InternalLinkType; +//@description The link is a link to the Call tab or page @section Section of the page; may be one of +//-"", "all", "missed", "edit", "show-tab", "start-call" +internalLinkTypeCallsPage section:string = InternalLinkType; //@description The link is an affiliate program link. Call searchChatAffiliateProgram with the given username and referrer to process the link //@username Username to be passed to searchChatAffiliateProgram @@ -8331,25 +8583,23 @@ internalLinkTypeChatBoost url:string = InternalLinkType; //@invite_link Internal representation of the invite link internalLinkTypeChatFolderInvite invite_link:string = InternalLinkType; -//@description The link is a link to the folder section of the application settings -internalLinkTypeChatFolderSettings = InternalLinkType; - //@description The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link. //-If the link is valid and the user wants to join the chat, then call joinChatByInviteLink //@invite_link Internal representation of the invite link internalLinkTypeChatInvite invite_link:string = InternalLinkType; -//@description The link is a link to the default message auto-delete timer settings section of the application settings -internalLinkTypeDefaultMessageAutoDeleteTimerSettings = InternalLinkType; +//@description The link is a link that allows to select some chats +internalLinkTypeChatSelection = InternalLinkType; + +//@description The link is a link to the Contacts tab or page @section Section of the page; may be one of +//-"", "search", "sort", "new", "invite", "manage" +internalLinkTypeContactsPage section:string = InternalLinkType; //@description The link is a link to a channel direct messages chat by username of the channel. Call searchPublicChat with the given chat username to process the link. //-If the chat is found and is channel, open the direct messages chat of the channel //@channel_username Username of the channel internalLinkTypeDirectMessagesChat channel_username:string = InternalLinkType; -//@description The link is a link to the edit profile section of the application settings -internalLinkTypeEditProfileSettings = InternalLinkType; - //@description The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, //-ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame //@bot_username Username of the bot that owns the game @@ -8385,17 +8635,11 @@ internalLinkTypeInvoice invoice_name:string = InternalLinkType; //@language_pack_id Language pack identifier internalLinkTypeLanguagePack language_pack_id:string = InternalLinkType; -//@description The link is a link to the language section of the application settings -internalLinkTypeLanguageSettings = InternalLinkType; - //@description The link is a link to a live story. Call searchPublicChat with the given chat username, then getChatActiveStories to get active stories in the chat, //-then find a live story among active stories of the chat, and then joinLiveStory to join the live story //@story_poster_username Username of the poster of the story internalLinkTypeLiveStory story_poster_username:string = InternalLinkType; -//@description The link is a link to the login email set up section of the application settings, forcing set up of the login email -internalLinkTypeLoginEmailSettings = InternalLinkType; - //@description The link is a link to the main Web App of a bot. Call searchPublicChat with the given bot username, check that the user is a bot and has the main Web App. //-If the bot can be added to attachment menu, then use getAttachmentMenuBot to receive information about the bot, then if the bot isn't added to side menu, //-show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu, @@ -8416,11 +8660,21 @@ internalLinkTypeMessage url:string = InternalLinkType; //@contains_link True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLinkType; -//@description The link is a link to the screen with information about Telegram Star balance and transactions of the current user -internalLinkTypeMyStars = InternalLinkType; +//@description The link is a link to the My Profile application page @section Section of the page; may be one of +//-"", "posts", "posts/all-stories", "posts/add-album", "gifts", "archived-posts" +internalLinkTypeMyProfilePage section:string = InternalLinkType; + +//@description The link is a link to the screen for creating a new channel chat +internalLinkTypeNewChannelChat = InternalLinkType; + +//@description The link is a link to the screen for creating a new group chat +internalLinkTypeNewGroupChat = InternalLinkType; + +//@description The link is a link to the screen for creating a new private chat with a contact +internalLinkTypeNewPrivateChat = InternalLinkType; -//@description The link is a link to the screen with information about Toncoin balance and transactions of the current user -internalLinkTypeMyToncoins = InternalLinkType; +//@description The link is a link to open the story posting interface @content_type The type of the content of the story to post; may be null if unspecified +internalLinkTypeNewStory content_type:StoryContentType = InternalLinkType; //@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it //@bot_user_id User identifier of the service's bot; the corresponding user may be unknown yet @@ -8431,39 +8685,28 @@ internalLinkTypeMyToncoins = InternalLinkType; //-If empty, then onActivityResult method must be used to return response on Android, or the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel must be opened otherwise internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:string nonce:string callback_url:string = InternalLinkType; -//@description The link is a link to the password section of the application settings -internalLinkTypePasswordSettings = InternalLinkType; - //@description The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberCode with the given phone number and with phoneNumberCodeTypeConfirmOwnership with the given hash to process the link. //-If succeeded, call checkPhoneNumberCode to check entered by the user code, or resendPhoneNumberCode to resend it //@hash Hash value from the link //@phone_number Phone number value from the link internalLinkTypePhoneNumberConfirmation hash:string phone_number:string = InternalLinkType; -//@description The link is a link to the phone number privacy settings section of the application settings -internalLinkTypePhoneNumberPrivacySettings = InternalLinkType; - //@description The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link //@referrer Referrer specified in the link -internalLinkTypePremiumFeatures referrer:string = InternalLinkType; - -//@description The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGift payments or in-store purchases -//@referrer Referrer specified in the link -internalLinkTypePremiumGift referrer:string = InternalLinkType; +internalLinkTypePremiumFeaturesPage referrer:string = InternalLinkType; //@description The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. //-If the code is valid and the user wants to apply it, then call applyPremiumGiftCode //@code The Telegram Premium gift code internalLinkTypePremiumGiftCode code:string = InternalLinkType; -//@description The link is a link to the privacy and security section of the application settings -internalLinkTypePrivacyAndSecuritySettings = InternalLinkType; +//@description The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGift payments or in-store purchases +//@referrer Referrer specified in the link +internalLinkTypePremiumGiftPurchase referrer:string = InternalLinkType; //@description The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy -//@server Proxy server domain or IP address -//@port Proxy server port -//@type Type of the proxy -internalLinkTypeProxy server:string port:int32 type:ProxyType = InternalLinkType; +//@proxy The proxy; may be null if the proxy is unsupported, in which case an alert can be shown to the user +internalLinkTypeProxy proxy:proxy = InternalLinkType; //@description The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link. //-If the chat is found, open its profile information screen or the chat itself. @@ -8480,8 +8723,19 @@ internalLinkTypeQrCodeAuthentication = InternalLinkType; //@description The link forces restore of App Store purchases when opened. For official iOS application only internalLinkTypeRestorePurchases = InternalLinkType; -//@description The link is a link to application settings -internalLinkTypeSettings = InternalLinkType; +//@description The link is a link to the Saved Messages chat. Call createPrivateChat with getOption("my_id") and open the chat +internalLinkTypeSavedMessages = InternalLinkType; + +//@description The link is a link to the global chat and messages search field +internalLinkTypeSearch = InternalLinkType; + +//@description The link is a link to application settings @section Section of the application settings to open; may be null if none +internalLinkTypeSettings section:SettingsSection = InternalLinkType; + +//@description The link is a link to the Telegram Star purchase section of the application +//@star_count The number of Telegram Stars that must be owned by the user +//@purpose Purpose of Telegram Star purchase. Arbitrary string specified by the server, for example, "subs" if the Telegram Stars are required to extend channel subscriptions +internalLinkTypeStarPurchase star_count:int53 purpose:string = InternalLinkType; //@description The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set. //-If the sticker set is found and the user wants to add it, then call changeStickerSet @@ -8503,15 +8757,9 @@ internalLinkTypeStoryAlbum story_album_owner_username:string story_album_id:int3 //@description The link is a link to a cloud theme. TDLib has no theme support yet @theme_name Name of the theme internalLinkTypeTheme theme_name:string = InternalLinkType; -//@description The link is a link to the theme section of the application settings -internalLinkTypeThemeSettings = InternalLinkType; - //@description The link is an unknown tg: link. Call getDeepLinkInfo to process the link @link Link to be passed to getDeepLinkInfo internalLinkTypeUnknownDeepLink link:string = InternalLinkType; -//@description The link is a link to an unsupported proxy. An alert can be shown to the user -internalLinkTypeUnsupportedProxy = InternalLinkType; - //@description The link is a link to an upgraded gift. Call getUpgradedGift with the given name to process the link @name Name of the unique gift internalLinkTypeUpgradedGift name:string = InternalLinkType; @@ -8957,17 +9205,15 @@ proxyTypeHttp username:string password:string http_only:Bool = ProxyType; proxyTypeMtproto secret:string = ProxyType; -//@description Contains information about a proxy server +//@description Contains information about a proxy server added to the list of proxies //@id Unique identifier of the proxy -//@server Proxy server domain or IP address -//@port Proxy server port //@last_used_date Point in time (Unix timestamp) when the proxy was last used; 0 if never //@is_enabled True, if the proxy is enabled now -//@type Type of the proxy -proxy id:int32 server:string port:int32 last_used_date:int32 is_enabled:Bool type:ProxyType = Proxy; +//@proxy The proxy +addedProxy id:int32 last_used_date:int32 is_enabled:Bool proxy:proxy = AddedProxy; -//@description Represents a list of proxy servers @proxies List of proxy servers -proxies proxies:vector = Proxies; +//@description Represents a list of added proxy servers @proxies List of proxy servers +addedProxies proxies:vector = AddedProxies; //@description A sticker to be added to a sticker set @@ -9132,7 +9378,7 @@ chatRevenueTransactionTypeUnsupported = ChatRevenueTransactionType; //@end_date Point in time (Unix timestamp) when the earnings ended chatRevenueTransactionTypeSponsoredMessageEarnings start_date:int32 end_date:int32 = ChatRevenueTransactionType; -//@description Describes earnings from a published suggested post @user_id Identifier of the user that paid for the suggested post +//@description Describes earnings from a published suggested post @user_id Identifier of the user who paid for the suggested post chatRevenueTransactionTypeSuggestedPostEarnings user_id:int53 = ChatRevenueTransactionType; //@description Describes a withdrawal of earnings through Fragment @@ -9159,9 +9405,9 @@ chatRevenueTransactions ton_amount:int53 transactions:vector