diff --git a/CHANGELOG.md b/CHANGELOG.md index f26eb76f..c37e2fc2 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.59) +### Changed +- Update to [TDLib v1.8.59](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.59). + ## [1.8.58] - 2025-12-07 ### Changed - Update to [TDLib v1.8.58](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.58). diff --git a/Directory.Build.props b/Directory.Build.props index f867733f..44e99daa 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT - 1.8.58 + 1.8.59 diff --git a/Scripts/Get-TlFiles.ps1 b/Scripts/Get-TlFiles.ps1 index 23016795..a06d97dc 100644 --- a/Scripts/Get-TlFiles.ps1 +++ b/Scripts/Get-TlFiles.ps1 @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT param( - [string] $CommitHash = '282f96ca66421c348ed75aaca84471b3e39e64dd', + [string] $CommitHash = '89e7366783e13d63085878ba407da83107ccd401', [string] $TdApiUrl = "https://github.com/tdlib/td/raw/$CommitHash/td/generate/scheme/td_api.tl", [string] $SourceRoot = "$PSScriptRoot/..", diff --git a/TdLib.Api/Functions/AddLoginPasskey.cs b/TdLib.Api/Functions/AddLoginPasskey.cs new file mode 100644 index 00000000..8a159daf --- /dev/null +++ b/TdLib.Api/Functions/AddLoginPasskey.cs @@ -0,0 +1,58 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Adds a passkey allowed to be used for the login by the current user and returns the added passkey. Call getPasskeyParameters to get parameters for creating of the passkey + /// + public class AddLoginPasskey : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "addLoginPasskey"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// JSON-encoded client data + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("client_data")] + public string ClientData { get; set; } + + /// + /// Passkey attestation object + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("attestation_object")] + public byte[] AttestationObject { get; set; } + } + + /// + /// Adds a passkey allowed to be used for the login by the current user and returns the added passkey. Call getPasskeyParameters to get parameters for creating of the passkey + /// + public static Task AddLoginPasskeyAsync( + this Client client, string clientData = default, byte[] attestationObject = default) + { + return client.ExecuteAsync(new AddLoginPasskey + { + ClientData = clientData, AttestationObject = attestationObject + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/CanSendMessageToUser.cs b/TdLib.Api/Functions/CanSendMessageToUser.cs index aa8e8035..d9e98bd4 100644 --- a/TdLib.Api/Functions/CanSendMessageToUser.cs +++ b/TdLib.Api/Functions/CanSendMessageToUser.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Check whether the current user can message another user or try to create a chat with them + /// Checks whether the current user can message another user or try to create a chat with them /// public class CanSendMessageToUser : Function { @@ -43,7 +43,7 @@ public class CanSendMessageToUser : Function } /// - /// Check whether the current user can message another user or try to create a chat with them + /// Checks whether the current user can message another user or try to create a chat with them /// public static Task CanSendMessageToUserAsync( this Client client, long userId = default, bool onlyLocal = default) diff --git a/TdLib.Api/Functions/CheckAuthenticationPasskey.cs b/TdLib.Api/Functions/CheckAuthenticationPasskey.cs new file mode 100644 index 00000000..6a85f126 --- /dev/null +++ b/TdLib.Api/Functions/CheckAuthenticationPasskey.cs @@ -0,0 +1,83 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Checks a passkey to log in to the corresponding account. Call getAuthenticationPasskeyParameters to get parameters for the passkey. Works only when the current authorization state is + /// authorizationStateWaitPhoneNumber or authorizationStateWaitOtherDeviceConfirmation, or if there is no pending authentication query and the current authorization state is + /// authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword + /// + public class CheckAuthenticationPasskey : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "checkAuthenticationPasskey"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Base64url-encoded identifier of the credential + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("credential_id")] + public string CredentialId { get; set; } + + /// + /// JSON-encoded client data + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("client_data")] + public string ClientData { get; set; } + + /// + /// Authenticator data of the application that created the credential + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("authenticator_data")] + public byte[] AuthenticatorData { get; set; } + + /// + /// Cryptographic signature of the credential + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("signature")] + public byte[] Signature { get; set; } + + /// + /// User handle of the passkey + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("user_handle")] + public byte[] UserHandle { get; set; } + } + + /// + /// Checks a passkey to log in to the corresponding account. Call getAuthenticationPasskeyParameters to get parameters for the passkey. Works only when the current authorization state is + /// authorizationStateWaitPhoneNumber or authorizationStateWaitOtherDeviceConfirmation, or if there is no pending authentication query and the current authorization state is + /// authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword + /// + public static Task CheckAuthenticationPasskeyAsync( + this Client client, string credentialId = default, string clientData = default, byte[] authenticatorData = default, byte[] signature = default, byte[] userHandle = default) + { + return client.ExecuteAsync(new CheckAuthenticationPasskey + { + CredentialId = credentialId, ClientData = clientData, AuthenticatorData = authenticatorData, Signature = signature, UserHandle = userHandle + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/CheckPhoneNumberCode.cs b/TdLib.Api/Functions/CheckPhoneNumberCode.cs index 156060c7..060b88db 100644 --- a/TdLib.Api/Functions/CheckPhoneNumberCode.cs +++ b/TdLib.Api/Functions/CheckPhoneNumberCode.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Check the authentication code and completes the request for which the code was sent if appropriate + /// Checks the authentication code and completes the request for which the code was sent if appropriate /// public class CheckPhoneNumberCode : Function { @@ -36,7 +36,7 @@ public class CheckPhoneNumberCode : Function } /// - /// Check the authentication code and completes the request for which the code was sent if appropriate + /// Checks the authentication code and completes the request for which the code was sent if appropriate /// public static Task CheckPhoneNumberCodeAsync( this Client client, string code = default) diff --git a/TdLib.Api/Functions/CheckPremiumGiftCode.cs b/TdLib.Api/Functions/CheckPremiumGiftCode.cs index c85a3cda..4fc38f62 100644 --- a/TdLib.Api/Functions/CheckPremiumGiftCode.cs +++ b/TdLib.Api/Functions/CheckPremiumGiftCode.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Return information about a Telegram Premium gift code + /// Returns information about a Telegram Premium gift code /// public class CheckPremiumGiftCode : Function { @@ -36,7 +36,7 @@ public class CheckPremiumGiftCode : Function } /// - /// Return information about a Telegram Premium gift code + /// Returns information about a Telegram Premium gift code /// public static Task CheckPremiumGiftCodeAsync( this Client client, string code = default) diff --git a/TdLib.Api/Functions/DeleteBotMediaPreviews.cs b/TdLib.Api/Functions/DeleteBotMediaPreviews.cs index 2b5ddbe8..6a45d80b 100644 --- a/TdLib.Api/Functions/DeleteBotMediaPreviews.cs +++ b/TdLib.Api/Functions/DeleteBotMediaPreviews.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Delete media previews from the list of media previews of a bot + /// Deletes media previews from the list of media previews of a bot /// public class DeleteBotMediaPreviews : Function { @@ -49,7 +49,7 @@ public class DeleteBotMediaPreviews : Function } /// - /// Delete media previews from the list of media previews of a bot + /// Deletes media previews from the list of media previews of a bot /// public static Task DeleteBotMediaPreviewsAsync( this Client client, long botUserId = default, string languageCode = default, int[] fileIds = default) diff --git a/TdLib.Api/Functions/GetAuthenticationPasskeyParameters.cs b/TdLib.Api/Functions/GetAuthenticationPasskeyParameters.cs new file mode 100644 index 00000000..51045e47 --- /dev/null +++ b/TdLib.Api/Functions/GetAuthenticationPasskeyParameters.cs @@ -0,0 +1,46 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns parameters for authentication using a passkey as JSON-serialized string + /// + public class GetAuthenticationPasskeyParameters : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getAuthenticationPasskeyParameters"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns parameters for authentication using a passkey as JSON-serialized string + /// + public static Task GetAuthenticationPasskeyParametersAsync( + this Client client) + { + return client.ExecuteAsync(new GetAuthenticationPasskeyParameters + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetGiftUpgradeVariants.cs b/TdLib.Api/Functions/GetGiftUpgradeVariants.cs new file mode 100644 index 00000000..fac99707 --- /dev/null +++ b/TdLib.Api/Functions/GetGiftUpgradeVariants.cs @@ -0,0 +1,51 @@ +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 GetGiftUpgradeVariants : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getGiftUpgradeVariants"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the gift + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("gift_id")] + public long GiftId { get; set; } + } + + /// + /// Returns all possible variants of upgraded gifts for a regular gift + /// + public static Task GetGiftUpgradeVariantsAsync( + this Client client, long giftId = default) + { + return client.ExecuteAsync(new GetGiftUpgradeVariants + { + GiftId = giftId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetKeywordEmojis.cs b/TdLib.Api/Functions/GetKeywordEmojis.cs index ec1da4bd..6661a394 100644 --- a/TdLib.Api/Functions/GetKeywordEmojis.cs +++ b/TdLib.Api/Functions/GetKeywordEmojis.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Return emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified + /// Returns emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified /// public class GetKeywordEmojis : Function { @@ -42,7 +42,7 @@ public class GetKeywordEmojis : Function } /// - /// Return emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified + /// Returns emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified /// public static Task GetKeywordEmojisAsync( this Client client, string text = default, string[] inputLanguageCodes = default) diff --git a/TdLib.Api/Functions/GetLoginPasskeys.cs b/TdLib.Api/Functions/GetLoginPasskeys.cs new file mode 100644 index 00000000..9cab2207 --- /dev/null +++ b/TdLib.Api/Functions/GetLoginPasskeys.cs @@ -0,0 +1,46 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns the list of passkeys allowed to be used for the login by the current user + /// + public class GetLoginPasskeys : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getLoginPasskeys"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns the list of passkeys allowed to be used for the login by the current user + /// + public static Task GetLoginPasskeysAsync( + this Client client) + { + return client.ExecuteAsync(new GetLoginPasskeys + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetPasskeyParameters.cs b/TdLib.Api/Functions/GetPasskeyParameters.cs new file mode 100644 index 00000000..a5804f84 --- /dev/null +++ b/TdLib.Api/Functions/GetPasskeyParameters.cs @@ -0,0 +1,46 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns parameters for creating of a new passkey as JSON-serialized string + /// + public class GetPasskeyParameters : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getPasskeyParameters"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns parameters for creating of a new passkey as JSON-serialized string + /// + public static Task GetPasskeyParametersAsync( + this Client client) + { + return client.ExecuteAsync(new GetPasskeyParameters + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetRepliedMessage.cs b/TdLib.Api/Functions/GetRepliedMessage.cs index 9626f1d4..7562b597 100644 --- a/TdLib.Api/Functions/GetRepliedMessage.cs +++ b/TdLib.Api/Functions/GetRepliedMessage.cs @@ -16,6 +16,7 @@ public static partial class TdApi /// the giveaway message for messageGiveawayCompleted, the checklist message for messageChecklistTasksDone, messageChecklistTasksAdded, the message with suggested post information /// for messageSuggestedPostApprovalFailed, messageSuggestedPostApproved, messageSuggestedPostDeclined, messageSuggestedPostPaid, messageSuggestedPostRefunded, /// the message with the regular gift that was upgraded for messageUpgradedGift with origin of the type upgradedGiftOriginUpgrade, + /// the message with gift purchase offer for messageUpgradedGiftPurchaseOfferDeclined, /// and the topic creation message for topic messages without non-bundled replied message. Returns a 404 error if the message doesn't exist /// public class GetRepliedMessage : Function @@ -53,6 +54,7 @@ public class GetRepliedMessage : Function /// the giveaway message for messageGiveawayCompleted, the checklist message for messageChecklistTasksDone, messageChecklistTasksAdded, the message with suggested post information /// for messageSuggestedPostApprovalFailed, messageSuggestedPostApproved, messageSuggestedPostDeclined, messageSuggestedPostPaid, messageSuggestedPostRefunded, /// the message with the regular gift that was upgraded for messageUpgradedGift with origin of the type upgradedGiftOriginUpgrade, + /// the message with gift purchase offer for messageUpgradedGiftPurchaseOfferDeclined, /// and the topic creation message for topic messages without non-bundled replied message. Returns a 404 error if the message doesn't exist /// public static Task GetRepliedMessageAsync( diff --git a/TdLib.Api/Functions/GetStickerOutlineSvgPath.cs b/TdLib.Api/Functions/GetStickerOutlineSvgPath.cs new file mode 100644 index 00000000..78252e5b --- /dev/null +++ b/TdLib.Api/Functions/GetStickerOutlineSvgPath.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 outline of a sticker as an SVG path. This is an offline method. Returns an empty string if the outline isn't known + /// + public class GetStickerOutlineSvgPath : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getStickerOutlineSvgPath"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// File identifier of the sticker + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("sticker_file_id")] + public int StickerFileId { get; set; } + + /// + /// Pass true to get the outline scaled for animated emoji + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("for_animated_emoji")] + public bool ForAnimatedEmoji { get; set; } + + /// + /// Pass true to get the outline scaled for clicked animated emoji message + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("for_clicked_animated_emoji_message")] + public bool ForClickedAnimatedEmojiMessage { get; set; } + } + + /// + /// Returns outline of a sticker as an SVG path. This is an offline method. Returns an empty string if the outline isn't known + /// + public static Task GetStickerOutlineSvgPathAsync( + this Client client, int stickerFileId = default, bool forAnimatedEmoji = default, bool forClickedAnimatedEmojiMessage = default) + { + return client.ExecuteAsync(new GetStickerOutlineSvgPath + { + StickerFileId = stickerFileId, ForAnimatedEmoji = forAnimatedEmoji, ForClickedAnimatedEmojiMessage = forClickedAnimatedEmojiMessage + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetUpgradedGiftsPromotionalAnimation.cs b/TdLib.Api/Functions/GetUpgradedGiftsPromotionalAnimation.cs new file mode 100644 index 00000000..00b5be3f --- /dev/null +++ b/TdLib.Api/Functions/GetUpgradedGiftsPromotionalAnimation.cs @@ -0,0 +1,46 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns promotional anumation for upgraded gifts + /// + public class GetUpgradedGiftsPromotionalAnimation : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getUpgradedGiftsPromotionalAnimation"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns promotional anumation for upgraded gifts + /// + public static Task GetUpgradedGiftsPromotionalAnimationAsync( + this Client client) + { + return client.ExecuteAsync(new GetUpgradedGiftsPromotionalAnimation + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/PreliminaryUploadFile.cs b/TdLib.Api/Functions/PreliminaryUploadFile.cs index 87a3d732..6b336a69 100644 --- a/TdLib.Api/Functions/PreliminaryUploadFile.cs +++ b/TdLib.Api/Functions/PreliminaryUploadFile.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. + /// Preliminarily uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. /// In all other cases there is no need to preliminary upload a file. Updates updateFile will be used to notify about upload progress. /// The upload will not be completed until the file is sent in a message /// @@ -52,7 +52,7 @@ public class PreliminaryUploadFile : Function } /// - /// Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. + /// Preliminarily uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. /// In all other cases there is no need to preliminary upload a file. Updates updateFile will be used to notify about upload progress. /// The upload will not be completed until the file is sent in a message /// diff --git a/TdLib.Api/Functions/ProcessGiftPurchaseOffer.cs b/TdLib.Api/Functions/ProcessGiftPurchaseOffer.cs new file mode 100644 index 00000000..4a323bc9 --- /dev/null +++ b/TdLib.Api/Functions/ProcessGiftPurchaseOffer.cs @@ -0,0 +1,58 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Handles a pending gift purchase offer + /// + public class ProcessGiftPurchaseOffer : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "processGiftPurchaseOffer"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the message with the gift purchase offer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("message_id")] + public long MessageId { get; set; } + + /// + /// Pass true to approve the request; pass false to decline it + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("approve")] + public bool Approve { get; set; } + } + + /// + /// Handles a pending gift purchase offer + /// + public static Task ProcessGiftPurchaseOfferAsync( + this Client client, long messageId = default, bool approve = default) + { + return client.ExecuteAsync(new ProcessGiftPurchaseOffer + { + MessageId = messageId, Approve = approve + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/ReadChatList.cs b/TdLib.Api/Functions/ReadChatList.cs index 384c66c6..32f94ebf 100644 --- a/TdLib.Api/Functions/ReadChatList.cs +++ b/TdLib.Api/Functions/ReadChatList.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Traverse all chats in a chat list and marks all messages in the chats as read + /// Traverses all chats in a chat list and marks all messages in the chats as read /// public class ReadChatList : Function { @@ -36,7 +36,7 @@ public class ReadChatList : Function } /// - /// Traverse all chats in a chat list and marks all messages in the chats as read + /// Traverses all chats in a chat list and marks all messages in the chats as read /// public static Task ReadChatListAsync( this Client client, ChatList chatList = default) diff --git a/TdLib.Api/Functions/RemoveLoginPasskey.cs b/TdLib.Api/Functions/RemoveLoginPasskey.cs new file mode 100644 index 00000000..99fbe102 --- /dev/null +++ b/TdLib.Api/Functions/RemoveLoginPasskey.cs @@ -0,0 +1,51 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Removes a passkey from the list of passkeys allowed to be used for the login by the current user + /// + public class RemoveLoginPasskey : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "removeLoginPasskey"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the passkey to remove + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("passkey_id")] + public string PasskeyId { get; set; } + } + + /// + /// Removes a passkey from the list of passkeys allowed to be used for the login by the current user + /// + public static Task RemoveLoginPasskeyAsync( + this Client client, string passkeyId = default) + { + return client.ExecuteAsync(new RemoveLoginPasskey + { + PasskeyId = passkeyId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/SendGiftPurchaseOffer.cs b/TdLib.Api/Functions/SendGiftPurchaseOffer.cs new file mode 100644 index 00000000..30270538 --- /dev/null +++ b/TdLib.Api/Functions/SendGiftPurchaseOffer.cs @@ -0,0 +1,79 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Sends an offer to purchase an upgraded gift + /// + public class SendGiftPurchaseOffer : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "sendGiftPurchaseOffer"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the user or the channel chat that currently owns the gift and will receive the offer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("owner_id")] + public MessageSender OwnerId { get; set; } + + /// + /// Name of the upgraded gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gift_name")] + public string GiftName { get; set; } + + /// + /// The price that the user agreed to pay for the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("price")] + public GiftResalePrice Price { get; set; } + + /// + /// Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("duration")] + public int Duration { get; set; } + + /// + /// The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoing_paid_message_star_count for users and 0 otherwise + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("paid_message_star_count")] + public long PaidMessageStarCount { get; set; } + } + + /// + /// Sends an offer to purchase an upgraded gift + /// + public static Task SendGiftPurchaseOfferAsync( + this Client client, MessageSender ownerId = default, string giftName = default, GiftResalePrice price = default, int duration = default, long paidMessageStarCount = default) + { + return client.ExecuteAsync(new SendGiftPurchaseOffer + { + OwnerId = ownerId, GiftName = giftName, Price = price, Duration = duration, PaidMessageStarCount = paidMessageStarCount + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/SetApplicationVerificationToken.cs b/TdLib.Api/Functions/SetApplicationVerificationToken.cs index 4ee7821a..b38f1608 100644 --- a/TdLib.Api/Functions/SetApplicationVerificationToken.cs +++ b/TdLib.Api/Functions/SetApplicationVerificationToken.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Application or reCAPTCHA verification has been completed. Can be called before authorization + /// Informs TDLib that application or reCAPTCHA verification has been completed. Can be called before authorization /// public class SetApplicationVerificationToken : Function { @@ -44,7 +44,7 @@ public class SetApplicationVerificationToken : Function } /// - /// Application or reCAPTCHA verification has been completed. Can be called before authorization + /// Informs TDLib that application or reCAPTCHA verification has been completed. Can be called before authorization /// public static Task SetApplicationVerificationTokenAsync( this Client client, long verificationId = default, string token = default) diff --git a/TdLib.Api/Functions/TransferBusinessAccountStars.cs b/TdLib.Api/Functions/TransferBusinessAccountStars.cs index 77626e3b..87593eb5 100644 --- a/TdLib.Api/Functions/TransferBusinessAccountStars.cs +++ b/TdLib.Api/Functions/TransferBusinessAccountStars.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Transfer Telegram Stars from the business account to the business bot; for bots only + /// Transfers Telegram Stars from the business account to the business bot; for bots only /// public class TransferBusinessAccountStars : Function { @@ -43,7 +43,7 @@ public class TransferBusinessAccountStars : Function } /// - /// Transfer Telegram Stars from the business account to the business bot; for bots only + /// Transfers Telegram Stars from the business account to the business bot; for bots only /// public static Task TransferBusinessAccountStarsAsync( this Client client, string businessConnectionId = default, long starCount = default) diff --git a/TdLib.Api/Objects/AlternativeVideo.cs b/TdLib.Api/Objects/AlternativeVideo.cs index e1301552..391ecd92 100644 --- a/TdLib.Api/Objects/AlternativeVideo.cs +++ b/TdLib.Api/Objects/AlternativeVideo.cs @@ -48,7 +48,7 @@ public partial class AlternativeVideo : Object public int Height { get; set; } /// - /// Codec used for video file encoding, for example, "h264", "h265", or "av1" + /// Codec used for video file encoding, for example, "h264", "h265", "av1", or "av01" /// [JsonConverter(typeof(Converter))] [JsonProperty("codec")] diff --git a/TdLib.Api/Objects/AuctionRound.cs b/TdLib.Api/Objects/AuctionRound.cs new file mode 100644 index 00000000..7e93d76a --- /dev/null +++ b/TdLib.Api/Objects/AuctionRound.cs @@ -0,0 +1,59 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes a round of an auction + /// + public partial class AuctionRound : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "auctionRound"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// 1-based number of the round + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("number")] + public int Number { get; set; } + + /// + /// Duration of the round, in seconds + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("duration")] + public int Duration { get; set; } + + /// + /// The number of seconds for which the round will be extended if there are changes in the top winners + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("extend_time")] + public int ExtendTime { get; set; } + + /// + /// The number of top winners who trigger round extension if changed + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("top_winner_count")] + public int TopWinnerCount { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/AuctionStateActive.cs b/TdLib.Api/Objects/AuctionStateActive.cs index bfeb5726..3db854d1 100644 --- a/TdLib.Api/Objects/AuctionStateActive.cs +++ b/TdLib.Api/Objects/AuctionStateActive.cs @@ -29,7 +29,7 @@ public class AuctionStateActive : AuctionState public override string Extra { get; set; } /// - /// Point in time (Unix timestamp) when the auction started + /// Point in time (Unix timestamp) when the auction started or will start /// [JsonConverter(typeof(Converter))] [JsonProperty("start_date")] @@ -61,6 +61,12 @@ public class AuctionStateActive : AuctionState [JsonProperty("top_bidder_user_ids", ItemConverterType = typeof(Converter))] public long[] TopBidderUserIds { get; set; } + /// + /// Rounds of the auction in which their duration or extension rules are changed + /// + [JsonProperty("rounds", ItemConverterType = typeof(Converter))] + public AuctionRound[] Rounds { get; set; } + /// /// Point in time (Unix timestamp) when the current round will end /// @@ -83,14 +89,21 @@ public class AuctionStateActive : AuctionState public int TotalRoundCount { get; set; } /// - /// The number of items that have to be distributed on the auciton + /// The number of items that were purchased on the auction by all users + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("distributed_item_count")] + public int DistributedItemCount { get; set; } + + /// + /// The number of items that have to be distributed on the auction /// [JsonConverter(typeof(Converter))] [JsonProperty("left_item_count")] public int LeftItemCount { get; set; } /// - /// The number of items that were purchased by the current user on the auciton + /// The number of items that were purchased by the current user on the auction /// [JsonConverter(typeof(Converter))] [JsonProperty("acquired_item_count")] diff --git a/TdLib.Api/Objects/AuctionStateFinished.cs b/TdLib.Api/Objects/AuctionStateFinished.cs index 07ea922f..fbf39fa6 100644 --- a/TdLib.Api/Objects/AuctionStateFinished.cs +++ b/TdLib.Api/Objects/AuctionStateFinished.cs @@ -50,11 +50,32 @@ public class AuctionStateFinished : AuctionState public long AveragePrice { get; set; } /// - /// The number of items that were purchased by the current user on the auciton + /// The number of items that were purchased by the current user on the auction /// [JsonConverter(typeof(Converter))] [JsonProperty("acquired_item_count")] public int AcquiredItemCount { get; set; } + + /// + /// Number of items from the auction being resold on Telegram + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("telegram_listed_item_count")] + public int TelegramListedItemCount { get; set; } + + /// + /// Number of items from the auction being resold on Fragment + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("fragment_listed_item_count")] + public int FragmentListedItemCount { get; set; } + + /// + /// The HTTPS link to the Fragment for the resold items; may be empty if there are no such items being sold on Fragment + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("fragment_url")] + public string FragmentUrl { get; set; } } } } diff --git a/TdLib.Api/Objects/AuthorizationStateWaitPhoneNumber.cs b/TdLib.Api/Objects/AuthorizationStateWaitPhoneNumber.cs index b75e59f1..2ef664fe 100644 --- a/TdLib.Api/Objects/AuthorizationStateWaitPhoneNumber.cs +++ b/TdLib.Api/Objects/AuthorizationStateWaitPhoneNumber.cs @@ -12,7 +12,8 @@ public static partial class TdApi public partial class AuthorizationState : Object { /// - /// TDLib needs the user's phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, or use requestQrCodeAuthentication or checkAuthenticationBotToken for other authentication options + /// TDLib needs the user's phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, + /// or use requestQrCodeAuthentication, getAuthenticationPasskeyParameters, or checkAuthenticationBotToken for other authentication options /// public class AuthorizationStateWaitPhoneNumber : AuthorizationState { diff --git a/TdLib.Api/Objects/ChatAdministratorRights.cs b/TdLib.Api/Objects/ChatAdministratorRights.cs index 7e465fbc..79967cc0 100644 --- a/TdLib.Api/Objects/ChatAdministratorRights.cs +++ b/TdLib.Api/Objects/ChatAdministratorRights.cs @@ -69,7 +69,7 @@ public partial class ChatAdministratorRights : Object public bool CanInviteUsers { get; set; } /// - /// True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics; always true for channels + /// True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics /// [JsonConverter(typeof(Converter))] [JsonProperty("can_restrict_members")] diff --git a/TdLib.Api/Objects/Gift.cs b/TdLib.Api/Objects/Gift.cs index 0fc1f028..cfa49b7d 100644 --- a/TdLib.Api/Objects/Gift.cs +++ b/TdLib.Api/Objects/Gift.cs @@ -68,6 +68,13 @@ public partial class Gift : Object [JsonProperty("upgrade_star_count")] public long UpgradeStarCount { get; set; } + /// + /// Number of unique gift variants that are available for the upgraded gift; 0 if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("upgrade_variant_count")] + public int UpgradeVariantCount { get; set; } + /// /// True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview /// @@ -97,7 +104,8 @@ public partial class Gift : Object public GiftAuction AuctionInfo { get; set; } /// - /// Point in time (Unix timestamp) when the gift can be sent next time by the current user; can be 0 or a date in the past. + /// Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. + /// If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now /// [JsonConverter(typeof(Converter))] [JsonProperty("next_send_date")] @@ -117,6 +125,13 @@ public partial class Gift : Object [JsonProperty("overall_limits")] public GiftPurchaseLimits OverallLimits { get; set; } + /// + /// Background of the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("background")] + public GiftBackground Background { get; set; } + /// /// Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only /// diff --git a/TdLib.Api/Objects/GiftAuction.cs b/TdLib.Api/Objects/GiftAuction.cs index 48aec3f4..75d5cac0 100644 --- a/TdLib.Api/Objects/GiftAuction.cs +++ b/TdLib.Api/Objects/GiftAuction.cs @@ -39,6 +39,13 @@ public partial class GiftAuction : Object [JsonConverter(typeof(Converter))] [JsonProperty("gifts_per_round")] public int GiftsPerRound { get; set; } + + /// + /// Point in time (Unix timestamp) when the auction will start + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("start_date")] + public int StartDate { get; set; } } } } diff --git a/TdLib.Api/Objects/GiftAuctionAcquiredGift.cs b/TdLib.Api/Objects/GiftAuctionAcquiredGift.cs index beece07d..5eb1033c 100644 --- a/TdLib.Api/Objects/GiftAuctionAcquiredGift.cs +++ b/TdLib.Api/Objects/GiftAuctionAcquiredGift.cs @@ -61,6 +61,13 @@ public partial class GiftAuctionAcquiredGift : Object [JsonProperty("auction_round_position")] public int AuctionRoundPosition { get; set; } + /// + /// Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("unique_gift_number")] + public int UniqueGiftNumber { get; set; } + /// /// Message added to the gift /// diff --git a/TdLib.Api/Objects/GiftPurchaseOfferStateAccepted.cs b/TdLib.Api/Objects/GiftPurchaseOfferStateAccepted.cs new file mode 100644 index 00000000..e6158fd5 --- /dev/null +++ b/TdLib.Api/Objects/GiftPurchaseOfferStateAccepted.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 GiftPurchaseOfferState : Object + { + /// + /// The offer was accepted + /// + public class GiftPurchaseOfferStateAccepted : GiftPurchaseOfferState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "giftPurchaseOfferStateAccepted"; + + /// + /// 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/GiftPurchaseOfferStatePending.cs b/TdLib.Api/Objects/GiftPurchaseOfferStatePending.cs new file mode 100644 index 00000000..fb99b042 --- /dev/null +++ b/TdLib.Api/Objects/GiftPurchaseOfferStatePending.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 GiftPurchaseOfferState : Object + { + /// + /// Describes state of a gift purchase offer + /// + public class GiftPurchaseOfferStatePending : GiftPurchaseOfferState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "giftPurchaseOfferStatePending"; + + /// + /// 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/GiftPurchaseOfferStateRejected.cs b/TdLib.Api/Objects/GiftPurchaseOfferStateRejected.cs new file mode 100644 index 00000000..fa860a0e --- /dev/null +++ b/TdLib.Api/Objects/GiftPurchaseOfferStateRejected.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 GiftPurchaseOfferState : Object + { + /// + /// The offer was rejected + /// + public class GiftPurchaseOfferStateRejected : GiftPurchaseOfferState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "giftPurchaseOfferStateRejected"; + + /// + /// 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/GiftUpgradeVariants.cs b/TdLib.Api/Objects/GiftUpgradeVariants.cs new file mode 100644 index 00000000..2ddd8746 --- /dev/null +++ b/TdLib.Api/Objects/GiftUpgradeVariants.cs @@ -0,0 +1,49 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Contains all possible variants of upgraded gifts for the given regular gift + /// + public partial class GiftUpgradeVariants : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "giftUpgradeVariants"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Models that can be chosen for the gift after upgrade + /// + [JsonProperty("models", ItemConverterType = typeof(Converter))] + public UpgradedGiftModel[] Models { get; set; } + + /// + /// Symbols that can be chosen for the gift after upgrade + /// + [JsonProperty("symbols", ItemConverterType = typeof(Converter))] + public UpgradedGiftSymbol[] Symbols { get; set; } + + /// + /// Backdrops that can be chosen for the gift after upgrade + /// + [JsonProperty("backdrops", ItemConverterType = typeof(Converter))] + public UpgradedGiftBackdrop[] Backdrops { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/LinkPreviewTypeGiftAuction.cs b/TdLib.Api/Objects/LinkPreviewTypeGiftAuction.cs index 9e82a79e..1e475719 100644 --- a/TdLib.Api/Objects/LinkPreviewTypeGiftAuction.cs +++ b/TdLib.Api/Objects/LinkPreviewTypeGiftAuction.cs @@ -35,13 +35,6 @@ public class LinkPreviewTypeGiftAuction : LinkPreviewType [JsonProperty("gift")] public Gift Gift { get; set; } - /// - /// Background of the gift - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("gift_background")] - public GiftBackground GiftBackground { get; set; } - /// /// Point in time (Unix timestamp) when the auction will be ended /// diff --git a/TdLib.Api/Objects/MessageChecklistTasksAdded.cs b/TdLib.Api/Objects/MessageChecklistTasksAdded.cs index d3a87eb4..b3b51451 100644 --- a/TdLib.Api/Objects/MessageChecklistTasksAdded.cs +++ b/TdLib.Api/Objects/MessageChecklistTasksAdded.cs @@ -29,7 +29,7 @@ public class MessageChecklistTasksAdded : MessageContent public override string Extra { get; set; } /// - /// Identifier of the message with the checklist; can be 0 if the message was deleted + /// Identifier of the message with the checklist; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("checklist_message_id")] diff --git a/TdLib.Api/Objects/MessageChecklistTasksDone.cs b/TdLib.Api/Objects/MessageChecklistTasksDone.cs index ac72a394..6aa4a0f8 100644 --- a/TdLib.Api/Objects/MessageChecklistTasksDone.cs +++ b/TdLib.Api/Objects/MessageChecklistTasksDone.cs @@ -29,7 +29,7 @@ public class MessageChecklistTasksDone : MessageContent public override string Extra { get; set; } /// - /// Identifier of the message with the checklist; can be 0 if the message was deleted + /// Identifier of the message with the checklist; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("checklist_message_id")] diff --git a/TdLib.Api/Objects/MessageGift.cs b/TdLib.Api/Objects/MessageGift.cs index 5936940a..ff97d631 100644 --- a/TdLib.Api/Objects/MessageGift.cs +++ b/TdLib.Api/Objects/MessageGift.cs @@ -63,6 +63,13 @@ public class MessageGift : MessageContent [JsonProperty("text")] public FormattedText Text { get; set; } + /// + /// Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("unique_gift_number")] + public int UniqueGiftNumber { get; set; } + /// /// Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver /// diff --git a/TdLib.Api/Objects/MessageGiveawayCompleted.cs b/TdLib.Api/Objects/MessageGiveawayCompleted.cs index 30d734a9..0e9768d2 100644 --- a/TdLib.Api/Objects/MessageGiveawayCompleted.cs +++ b/TdLib.Api/Objects/MessageGiveawayCompleted.cs @@ -29,7 +29,7 @@ public class MessageGiveawayCompleted : MessageContent public override string Extra { get; set; } /// - /// Identifier of the message with the giveaway; can be 0 if the message was deleted + /// Identifier of the message with the giveaway; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("giveaway_message_id")] diff --git a/TdLib.Api/Objects/MessageGiveawayPrizeStars.cs b/TdLib.Api/Objects/MessageGiveawayPrizeStars.cs index 50cd4426..da9574d6 100644 --- a/TdLib.Api/Objects/MessageGiveawayPrizeStars.cs +++ b/TdLib.Api/Objects/MessageGiveawayPrizeStars.cs @@ -50,7 +50,7 @@ public class MessageGiveawayPrizeStars : MessageContent public long BoostedChatId { get; set; } /// - /// Identifier of the message with the giveaway in the boosted chat; can be 0 if the message was deleted + /// Identifier of the message with the giveaway in the boosted chat; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("giveaway_message_id")] diff --git a/TdLib.Api/Objects/MessagePaymentSuccessful.cs b/TdLib.Api/Objects/MessagePaymentSuccessful.cs index c30e9c2f..7982e423 100644 --- a/TdLib.Api/Objects/MessagePaymentSuccessful.cs +++ b/TdLib.Api/Objects/MessagePaymentSuccessful.cs @@ -36,7 +36,7 @@ public class MessagePaymentSuccessful : MessageContent public long InvoiceChatId { get; set; } /// - /// Identifier of the message with the corresponding invoice; can be 0 or an identifier of a deleted message + /// Identifier of the message with the corresponding invoice; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("invoice_message_id")] diff --git a/TdLib.Api/Objects/MessageSendOptions.cs b/TdLib.Api/Objects/MessageSendOptions.cs index c5a5a1f5..9c28770e 100644 --- a/TdLib.Api/Objects/MessageSendOptions.cs +++ b/TdLib.Api/Objects/MessageSendOptions.cs @@ -84,7 +84,7 @@ public partial class MessageSendOptions : Object public MessageSchedulingState SchedulingState { get; set; } /// - /// Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats + /// Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage, sendMessageAlbum in private chats and forwardMessages with one message to private chats /// [JsonConverter(typeof(Converter.Int64))] [JsonProperty("effect_id")] diff --git a/TdLib.Api/Objects/MessageSuggestedPostApprovalFailed.cs b/TdLib.Api/Objects/MessageSuggestedPostApprovalFailed.cs index 20e0a36d..7d54278d 100644 --- a/TdLib.Api/Objects/MessageSuggestedPostApprovalFailed.cs +++ b/TdLib.Api/Objects/MessageSuggestedPostApprovalFailed.cs @@ -29,7 +29,7 @@ public class MessageSuggestedPostApprovalFailed : MessageContent public override string Extra { get; set; } /// - /// Identifier of the message with the suggested post; can be 0 if the message was deleted + /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("suggested_post_message_id")] diff --git a/TdLib.Api/Objects/MessageSuggestedPostApproved.cs b/TdLib.Api/Objects/MessageSuggestedPostApproved.cs index 7a56e91a..20c02599 100644 --- a/TdLib.Api/Objects/MessageSuggestedPostApproved.cs +++ b/TdLib.Api/Objects/MessageSuggestedPostApproved.cs @@ -29,7 +29,7 @@ public class MessageSuggestedPostApproved : MessageContent public override string Extra { get; set; } /// - /// Identifier of the message with the suggested post; can be 0 if the message was deleted + /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("suggested_post_message_id")] diff --git a/TdLib.Api/Objects/MessageSuggestedPostDeclined.cs b/TdLib.Api/Objects/MessageSuggestedPostDeclined.cs index 9669cfb1..f3ee9eb6 100644 --- a/TdLib.Api/Objects/MessageSuggestedPostDeclined.cs +++ b/TdLib.Api/Objects/MessageSuggestedPostDeclined.cs @@ -29,7 +29,7 @@ public class MessageSuggestedPostDeclined : MessageContent public override string Extra { get; set; } /// - /// Identifier of the message with the suggested post; can be 0 if the message was deleted + /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("suggested_post_message_id")] diff --git a/TdLib.Api/Objects/MessageSuggestedPostPaid.cs b/TdLib.Api/Objects/MessageSuggestedPostPaid.cs index de001fff..63b1e734 100644 --- a/TdLib.Api/Objects/MessageSuggestedPostPaid.cs +++ b/TdLib.Api/Objects/MessageSuggestedPostPaid.cs @@ -29,7 +29,7 @@ public class MessageSuggestedPostPaid : MessageContent public override string Extra { get; set; } /// - /// Identifier of the message with the suggested post; can be 0 if the message was deleted + /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("suggested_post_message_id")] diff --git a/TdLib.Api/Objects/MessageSuggestedPostRefunded.cs b/TdLib.Api/Objects/MessageSuggestedPostRefunded.cs index f13a15b8..4d350f4a 100644 --- a/TdLib.Api/Objects/MessageSuggestedPostRefunded.cs +++ b/TdLib.Api/Objects/MessageSuggestedPostRefunded.cs @@ -29,7 +29,7 @@ public class MessageSuggestedPostRefunded : MessageContent public override string Extra { get; set; } /// - /// Identifier of the message with the suggested post; can be 0 if the message was deleted + /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("suggested_post_message_id")] diff --git a/TdLib.Api/Objects/MessageUpgradedGiftPurchaseOffer.cs b/TdLib.Api/Objects/MessageUpgradedGiftPurchaseOffer.cs new file mode 100644 index 00000000..f9a4020b --- /dev/null +++ b/TdLib.Api/Objects/MessageUpgradedGiftPurchaseOffer.cs @@ -0,0 +1,62 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class MessageContent : Object + { + /// + /// An offer to purchase an upgraded gift was sent or received + /// + public class MessageUpgradedGiftPurchaseOffer : MessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "messageUpgradedGiftPurchaseOffer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gift")] + public UpgradedGift Gift { get; set; } + + /// + /// State of the offer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("state")] + public GiftPurchaseOfferState State { get; set; } + + /// + /// The proposed price + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("price")] + public GiftResalePrice Price { get; set; } + + /// + /// Point in time (Unix timestamp) when the offer will expire or has expired + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("expiration_date")] + public int ExpirationDate { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/MessageUpgradedGiftPurchaseOfferDeclined.cs b/TdLib.Api/Objects/MessageUpgradedGiftPurchaseOfferDeclined.cs new file mode 100644 index 00000000..a584da70 --- /dev/null +++ b/TdLib.Api/Objects/MessageUpgradedGiftPurchaseOfferDeclined.cs @@ -0,0 +1,62 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class MessageContent : Object + { + /// + /// An offer to purchase a gift was declined or expired + /// + public class MessageUpgradedGiftPurchaseOfferDeclined : MessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "messageUpgradedGiftPurchaseOfferDeclined"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gift")] + public UpgradedGift Gift { get; set; } + + /// + /// The proposed price + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("price")] + public GiftResalePrice Price { get; set; } + + /// + /// Identifier of the message with purchase offer which was declined or expired; may be 0 or an identifier of a deleted message + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("offer_message_id")] + public long OfferMessageId { get; set; } + + /// + /// True, if the offer has expired; otherwise, the offer was explicitly declined + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("was_expired")] + public bool WasExpired { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/Passkey.cs b/TdLib.Api/Objects/Passkey.cs new file mode 100644 index 00000000..a6226926 --- /dev/null +++ b/TdLib.Api/Objects/Passkey.cs @@ -0,0 +1,66 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes a passkey + /// + public partial class Passkey : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "passkey"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the passkey + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// Name of the passkey + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// Point in time (Unix timestamp) when the passkey was added + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("addition_date")] + public int AdditionDate { get; set; } + + /// + /// Point in time (Unix timestamp) when the passkey was used last time; 0 if never + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("last_usage_date")] + public int LastUsageDate { get; set; } + + /// + /// Identifier of the custom emoji that is used as the icon of the software, which created the passkey; 0 if unknown + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("software_icon_custom_emoji_id")] + public long SoftwareIconCustomEmojiId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/Passkeys.cs b/TdLib.Api/Objects/Passkeys.cs new file mode 100644 index 00000000..01e7ab6f --- /dev/null +++ b/TdLib.Api/Objects/Passkeys.cs @@ -0,0 +1,37 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Contains a list of passkeys + /// + public partial class Passkeys : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "passkeys"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// List of passkeys + /// + [JsonProperty("passkeys", ItemConverterType = typeof(Converter))] + public Passkey[] Passkeys_ { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/PremiumFeaturePaidMessages.cs b/TdLib.Api/Objects/PremiumFeaturePaidMessages.cs new file mode 100644 index 00000000..5702880f --- /dev/null +++ b/TdLib.Api/Objects/PremiumFeaturePaidMessages.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 PremiumFeature : Object + { + /// + /// The ability to require a payment for incoming messages in new chats + /// + public class PremiumFeaturePaidMessages : PremiumFeature + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "premiumFeaturePaidMessages"; + + /// + /// 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/PremiumGiftCodeInfo.cs b/TdLib.Api/Objects/PremiumGiftCodeInfo.cs index 429986d3..3782ce30 100644 --- a/TdLib.Api/Objects/PremiumGiftCodeInfo.cs +++ b/TdLib.Api/Objects/PremiumGiftCodeInfo.cs @@ -48,7 +48,7 @@ public partial class PremiumGiftCodeInfo : Object public bool IsFromGiveaway { get; set; } /// - /// Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message + /// Identifier of the corresponding giveaway message in the creator_id chat; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("giveaway_message_id")] diff --git a/TdLib.Api/Objects/ReceivedGift.cs b/TdLib.Api/Objects/ReceivedGift.cs index 68a7c42f..8edc25a7 100644 --- a/TdLib.Api/Objects/ReceivedGift.cs +++ b/TdLib.Api/Objects/ReceivedGift.cs @@ -47,6 +47,13 @@ public partial class ReceivedGift : Object [JsonProperty("text")] public FormattedText Text { get; set; } + /// + /// Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("unique_gift_number")] + public int UniqueGiftNumber { get; set; } + /// /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them /// diff --git a/TdLib.Api/Objects/StarTransactionTypeAffiliateProgramCommission.cs b/TdLib.Api/Objects/StarTransactionTypeAffiliateProgramCommission.cs index 0cbbb894..904117a3 100644 --- a/TdLib.Api/Objects/StarTransactionTypeAffiliateProgramCommission.cs +++ b/TdLib.Api/Objects/StarTransactionTypeAffiliateProgramCommission.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a receiving of a commission from an affiliate program; for regular users, bots and channel chats only + /// The transaction is a receiving of a commission from an affiliate program; relevant for regular users, bots and channel chats only /// public class StarTransactionTypeAffiliateProgramCommission : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeAppStoreDeposit.cs b/TdLib.Api/Objects/StarTransactionTypeAppStoreDeposit.cs index a386574f..d48150cb 100644 --- a/TdLib.Api/Objects/StarTransactionTypeAppStoreDeposit.cs +++ b/TdLib.Api/Objects/StarTransactionTypeAppStoreDeposit.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a deposit of Telegram Stars from App Store; for regular users only + /// The transaction is a deposit of Telegram Stars from App Store; relevant for regular users only /// public class StarTransactionTypeAppStoreDeposit : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeBotInvoicePurchase.cs b/TdLib.Api/Objects/StarTransactionTypeBotInvoicePurchase.cs index 17996e9f..6fd1e084 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotInvoicePurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotInvoicePurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of a product from a bot or a business account by the current user; for regular users only + /// The transaction is a purchase of a product from a bot or a business account by the current user; relevant for regular users only /// public class StarTransactionTypeBotInvoicePurchase : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeBotInvoiceSale.cs b/TdLib.Api/Objects/StarTransactionTypeBotInvoiceSale.cs index 8baae167..9bdc1713 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotInvoiceSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotInvoiceSale.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sale of a product by the bot; for bots only + /// The transaction is a sale of a product by the bot; relevant for bots only /// public class StarTransactionTypeBotInvoiceSale : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaPurchase.cs index 3c28b333..ffae0ab4 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaPurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of paid media from a bot or a business account by the current user; for regular users only + /// The transaction is a purchase of paid media from a bot or a business account by the current user; relevant for regular users only /// public class StarTransactionTypeBotPaidMediaPurchase : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaSale.cs b/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaSale.cs index b00a0b91..b314e93c 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotPaidMediaSale.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sale of paid media by the bot or a business account managed by the bot; for bots only + /// The transaction is a sale of paid media by the bot or a business account managed by the bot; relevant for bots only /// public class StarTransactionTypeBotPaidMediaSale : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs index 66bc5ca8..8869ff89 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of a subscription from a bot or a business account by the current user; for regular users only + /// The transaction is a purchase of a subscription from a bot or a business account by the current user; relevant for regular users only /// public class StarTransactionTypeBotSubscriptionPurchase : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs index a9d464dd..da70f86f 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sale of a subscription by the bot; for bots only + /// The transaction is a sale of a subscription by the bot; relevant for bots only /// public class StarTransactionTypeBotSubscriptionSale : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferReceive.cs b/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferReceive.cs index 79a4de8a..8f37be2f 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferReceive.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a transfer of Telegram Stars from a business account; for bots only + /// The transaction is a transfer of Telegram Stars from a business account; relevant for bots only /// public class StarTransactionTypeBusinessBotTransferReceive : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferSend.cs b/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferSend.cs index fe652d38..0fbac1ea 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferSend.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBusinessBotTransferSend.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a transfer of Telegram Stars to a business bot; for regular users only + /// The transaction is a transfer of Telegram Stars to a business bot; relevant for regular users only /// public class StarTransactionTypeBusinessBotTransferSend : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaPurchase.cs index c37cab4a..ebb26b7b 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaPurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of paid media from a channel by the current user; for regular users only + /// The transaction is a purchase of paid media from a channel by the current user; relevant for regular users only /// public class StarTransactionTypeChannelPaidMediaPurchase : StarTransactionType { @@ -36,7 +36,7 @@ public class StarTransactionTypeChannelPaidMediaPurchase : StarTransactionType public long ChatId { get; set; } /// - /// Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message + /// Identifier of the corresponding message with paid media; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("message_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaSale.cs b/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaSale.cs index 75054649..44bad88a 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelPaidMediaSale.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sale of paid media by the channel chat; for channel chats only + /// The transaction is a sale of paid media by the channel chat; relevant for channel chats only /// public class StarTransactionTypeChannelPaidMediaSale : StarTransactionType { @@ -36,7 +36,7 @@ public class StarTransactionTypeChannelPaidMediaSale : StarTransactionType public long UserId { get; set; } /// - /// Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message + /// Identifier of the corresponding message with paid media; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("message_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionReceive.cs b/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionReceive.cs index dcb5be12..396dea32 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionReceive.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a receiving of a paid reaction to a message by the channel chat; for channel chats only + /// The transaction is a receiving of a paid reaction to a message by the channel chat; relevant for channel chats only /// public class StarTransactionTypeChannelPaidReactionReceive : StarTransactionType { @@ -36,7 +36,7 @@ public class StarTransactionTypeChannelPaidReactionReceive : StarTransactionType public long UserId { get; set; } /// - /// Identifier of the reacted message; can be 0 or an identifier of a deleted message + /// Identifier of the reacted message; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("message_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionSend.cs b/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionSend.cs index 2247cdbe..5207f2e7 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionSend.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelPaidReactionSend.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sending of a paid reaction to a message in a channel chat by the current user; for regular users only + /// The transaction is a sending of a paid reaction to a message in a channel chat by the current user; relevant for regular users only /// public class StarTransactionTypeChannelPaidReactionSend : StarTransactionType { @@ -36,7 +36,7 @@ public class StarTransactionTypeChannelPaidReactionSend : StarTransactionType public long ChatId { get; set; } /// - /// Identifier of the reacted message; can be 0 or an identifier of a deleted message + /// Identifier of the reacted message; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("message_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionPurchase.cs index ddaeb75c..bbedd49f 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionPurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of a subscription to a channel chat by the current user; for regular users only + /// The transaction is a purchase of a subscription to a channel chat by the current user; relevant for regular users only /// public class StarTransactionTypeChannelSubscriptionPurchase : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionSale.cs b/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionSale.cs index 5c97f071..142784b8 100644 --- a/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeChannelSubscriptionSale.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sale of a subscription by the channel chat; for channel chats only + /// The transaction is a sale of a subscription by the channel chat; relevant for channel chats only /// public class StarTransactionTypeChannelSubscriptionSale : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeFragmentDeposit.cs b/TdLib.Api/Objects/StarTransactionTypeFragmentDeposit.cs index c0c3089d..e88e1ce0 100644 --- a/TdLib.Api/Objects/StarTransactionTypeFragmentDeposit.cs +++ b/TdLib.Api/Objects/StarTransactionTypeFragmentDeposit.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a deposit of Telegram Stars from Fragment; for regular users and bots only + /// The transaction is a deposit of Telegram Stars from Fragment; relevant for regular users and bots only /// public class StarTransactionTypeFragmentDeposit : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeFragmentWithdrawal.cs b/TdLib.Api/Objects/StarTransactionTypeFragmentWithdrawal.cs index 5c43ab03..fedad2df 100644 --- a/TdLib.Api/Objects/StarTransactionTypeFragmentWithdrawal.cs +++ b/TdLib.Api/Objects/StarTransactionTypeFragmentWithdrawal.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a withdrawal of earned Telegram Stars to Fragment; for regular users, bots, supergroup and channel chats only + /// The transaction is a withdrawal of earned Telegram Stars to Fragment; relevant for regular users, bots, supergroup and channel chats only /// public class StarTransactionTypeFragmentWithdrawal : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftAuctionBid.cs b/TdLib.Api/Objects/StarTransactionTypeGiftAuctionBid.cs index acff3cb6..87aa615b 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftAuctionBid.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftAuctionBid.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a bid on a gift auction; for regular users only + /// The transaction is a bid on a gift auction; relevant for regular users only /// public class StarTransactionTypeGiftAuctionBid : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftOriginalDetailsDrop.cs b/TdLib.Api/Objects/StarTransactionTypeGiftOriginalDetailsDrop.cs index 232a7fbc..2395ce0f 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftOriginalDetailsDrop.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftOriginalDetailsDrop.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a drop of original details of an upgraded gift; for regular users only + /// The transaction is a drop of original details of an upgraded gift; relevant for regular users only /// public class StarTransactionTypeGiftOriginalDetailsDrop : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeGiftPurchase.cs index a8eb6bf9..417273fa 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftPurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of a regular gift; for regular users and bots only + /// The transaction is a purchase of a regular gift; relevant for regular users and bots only /// public class StarTransactionTypeGiftPurchase : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftPurchaseOffer.cs b/TdLib.Api/Objects/StarTransactionTypeGiftPurchaseOffer.cs new file mode 100644 index 00000000..23904199 --- /dev/null +++ b/TdLib.Api/Objects/StarTransactionTypeGiftPurchaseOffer.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 StarTransactionType : Object + { + /// + /// The transaction is an offer of gift purchase; relevant for regular users only + /// + public class StarTransactionTypeGiftPurchaseOffer : StarTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "starTransactionTypeGiftPurchaseOffer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gift")] + public UpgradedGift Gift { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftSale.cs b/TdLib.Api/Objects/StarTransactionTypeGiftSale.cs index f613c6c3..ddf330f2 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftSale.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sale of a received gift; for regular users and channel chats only + /// The transaction is a sale of a received gift; relevant for regular users and channel chats only /// public class StarTransactionTypeGiftSale : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftTransfer.cs b/TdLib.Api/Objects/StarTransactionTypeGiftTransfer.cs index b1ee1e2a..2828de05 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftTransfer.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftTransfer.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a transfer of an upgraded gift; for regular users only + /// The transaction is a transfer of an upgraded gift; relevant for regular users only /// public class StarTransactionTypeGiftTransfer : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftUpgrade.cs b/TdLib.Api/Objects/StarTransactionTypeGiftUpgrade.cs index 50853f65..555d014c 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftUpgrade.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftUpgrade.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is an upgrade of a gift; for regular users only + /// The transaction is an upgrade of a gift; relevant for regular users only /// public class StarTransactionTypeGiftUpgrade : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeGiftUpgradePurchase.cs b/TdLib.Api/Objects/StarTransactionTypeGiftUpgradePurchase.cs index 607b1679..abf1d4df 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiftUpgradePurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiftUpgradePurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of an upgrade of a gift owned by another user or channel; for regular users only + /// The transaction is a purchase of an upgrade of a gift owned by another user or channel; relevant for regular users only /// public class StarTransactionTypeGiftUpgradePurchase : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeGiveawayDeposit.cs b/TdLib.Api/Objects/StarTransactionTypeGiveawayDeposit.cs index ad45b7c4..23b980e6 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGiveawayDeposit.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGiveawayDeposit.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a deposit of Telegram Stars from a giveaway; for regular users only + /// The transaction is a deposit of Telegram Stars from a giveaway; relevant for regular users only /// public class StarTransactionTypeGiveawayDeposit : StarTransactionType { @@ -36,7 +36,7 @@ public class StarTransactionTypeGiveawayDeposit : StarTransactionType public long ChatId { get; set; } /// - /// Identifier of the message with the giveaway; can be 0 or an identifier of a deleted message + /// Identifier of the message with the giveaway; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("giveaway_message_id")] diff --git a/TdLib.Api/Objects/StarTransactionTypeGooglePlayDeposit.cs b/TdLib.Api/Objects/StarTransactionTypeGooglePlayDeposit.cs index 76465aa8..4d612fad 100644 --- a/TdLib.Api/Objects/StarTransactionTypeGooglePlayDeposit.cs +++ b/TdLib.Api/Objects/StarTransactionTypeGooglePlayDeposit.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a deposit of Telegram Stars from Google Play; for regular users only + /// The transaction is a deposit of Telegram Stars from Google Play; relevant for regular users only /// public class StarTransactionTypeGooglePlayDeposit : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageReceive.cs b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageReceive.cs index 5bf2923d..55219141 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageReceive.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a receiving of a paid group call message; for regular users and channel chats only + /// The transaction is a receiving of a paid group call message; relevant for regular users and channel chats only /// public class StarTransactionTypePaidGroupCallMessageReceive : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageSend.cs b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageSend.cs index 3c676cdc..b1188c79 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageSend.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallMessageSend.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sending of a paid group call message; for regular users only + /// The transaction is a sending of a paid group call message; relevant for regular users only /// public class StarTransactionTypePaidGroupCallMessageSend : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionReceive.cs b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionReceive.cs index 8a00237a..7717a860 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionReceive.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a receiving of a paid group call reaction; for regular users and channel chats only + /// The transaction is a receiving of a paid group call reaction; relevant for regular users and channel chats only /// public class StarTransactionTypePaidGroupCallReactionReceive : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionSend.cs b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionSend.cs index 60b9a9a9..2690c6a2 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionSend.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionSend.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sending of a paid group reaction; for regular users only + /// The transaction is a sending of a paid group reaction; relevant for regular users only /// public class StarTransactionTypePaidGroupCallReactionSend : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypePaidMessageReceive.cs b/TdLib.Api/Objects/StarTransactionTypePaidMessageReceive.cs index 51d32b4e..867c62d6 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidMessageReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidMessageReceive.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a receiving of a paid message; for regular users, supergroup and channel chats only + /// The transaction is a receiving of a paid message; relevant for regular users, supergroup and channel chats only /// public class StarTransactionTypePaidMessageReceive : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypePaidMessageSend.cs b/TdLib.Api/Objects/StarTransactionTypePaidMessageSend.cs index 3ad3c530..5f0f2216 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidMessageSend.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidMessageSend.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sending of a paid message; for regular users only + /// The transaction is a sending of a paid message; relevant for regular users only /// public class StarTransactionTypePaidMessageSend : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypePremiumPurchase.cs b/TdLib.Api/Objects/StarTransactionTypePremiumPurchase.cs index 96c85904..0bd383fc 100644 --- a/TdLib.Api/Objects/StarTransactionTypePremiumPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypePremiumPurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of Telegram Premium subscription; for regular users and bots only + /// The transaction is a purchase of Telegram Premium subscription; relevant for regular users and bots only /// public class StarTransactionTypePremiumPurchase : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypePublicPostSearch.cs b/TdLib.Api/Objects/StarTransactionTypePublicPostSearch.cs index 89994772..46e16f69 100644 --- a/TdLib.Api/Objects/StarTransactionTypePublicPostSearch.cs +++ b/TdLib.Api/Objects/StarTransactionTypePublicPostSearch.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a payment for search of posts in public Telegram channels; for regular users only + /// The transaction is a payment for search of posts in public Telegram channels; relevant for regular users only /// public class StarTransactionTypePublicPostSearch : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentReceive.cs b/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentReceive.cs index 489285c6..ad5dcc61 100644 --- a/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentReceive.cs +++ b/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentReceive.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a receiving of a payment for a suggested post by the channel chat; for channel chats only + /// The transaction is a receiving of a payment for a suggested post by the channel chat; relevant for channel chats only /// public class StarTransactionTypeSuggestedPostPaymentReceive : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentSend.cs b/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentSend.cs index 922f0bdc..629e8532 100644 --- a/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentSend.cs +++ b/TdLib.Api/Objects/StarTransactionTypeSuggestedPostPaymentSend.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a payment for a suggested post; for regular users only + /// The transaction is a payment for a suggested post; relevant for regular users only /// public class StarTransactionTypeSuggestedPostPaymentSend : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeTelegramAdsWithdrawal.cs b/TdLib.Api/Objects/StarTransactionTypeTelegramAdsWithdrawal.cs index 1228c78a..6c2832e3 100644 --- a/TdLib.Api/Objects/StarTransactionTypeTelegramAdsWithdrawal.cs +++ b/TdLib.Api/Objects/StarTransactionTypeTelegramAdsWithdrawal.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a withdrawal of earned Telegram Stars to Telegram Ad platform; for bots and channel chats only + /// The transaction is a withdrawal of earned Telegram Stars to Telegram Ad platform; relevant for bots and channel chats only /// public class StarTransactionTypeTelegramAdsWithdrawal : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeTelegramApiUsage.cs b/TdLib.Api/Objects/StarTransactionTypeTelegramApiUsage.cs index e79a63bb..57c92533 100644 --- a/TdLib.Api/Objects/StarTransactionTypeTelegramApiUsage.cs +++ b/TdLib.Api/Objects/StarTransactionTypeTelegramApiUsage.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a payment for Telegram API usage; for bots only + /// The transaction is a payment for Telegram API usage; relevant for bots only /// public class StarTransactionTypeTelegramApiUsage : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftPurchase.cs index cd08b7b2..82feb7e8 100644 --- a/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftPurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a purchase of an upgraded gift for some user or channel; for regular users only + /// The transaction is a purchase of an upgraded gift for some user or channel; relevant for regular users only /// public class StarTransactionTypeUpgradedGiftPurchase : StarTransactionType { diff --git a/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftSale.cs b/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftSale.cs index a2a1f919..4714ae5f 100644 --- a/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeUpgradedGiftSale.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sale of an upgraded gift; for regular users only + /// The transaction is a sale of an upgraded gift; relevant for regular users only /// public class StarTransactionTypeUpgradedGiftSale : StarTransactionType { @@ -55,6 +55,13 @@ public class StarTransactionTypeUpgradedGiftSale : StarTransactionType [JsonConverter(typeof(Converter))] [JsonProperty("commission_star_amount")] public StarAmount CommissionStarAmount { get; set; } + + /// + /// True, if the gift was sold through a purchase offer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("via_offer")] + public bool ViaOffer { get; set; } } } } diff --git a/TdLib.Api/Objects/StarTransactionTypeUserDeposit.cs b/TdLib.Api/Objects/StarTransactionTypeUserDeposit.cs index 7f1e4335..c0de5ece 100644 --- a/TdLib.Api/Objects/StarTransactionTypeUserDeposit.cs +++ b/TdLib.Api/Objects/StarTransactionTypeUserDeposit.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a deposit of Telegram Stars by another user; for regular users only + /// The transaction is a deposit of Telegram Stars by another user; relevant for regular users only /// public class StarTransactionTypeUserDeposit : StarTransactionType { diff --git a/TdLib.Api/Objects/SuggestedActionAddLoginPasskey.cs b/TdLib.Api/Objects/SuggestedActionAddLoginPasskey.cs new file mode 100644 index 00000000..076941c7 --- /dev/null +++ b/TdLib.Api/Objects/SuggestedActionAddLoginPasskey.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 SuggestedAction : Object + { + /// + /// Suggests the user to add a passkey for login using addLoginPasskey + /// + public class SuggestedActionAddLoginPasskey : SuggestedAction + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "suggestedActionAddLoginPasskey"; + + /// + /// 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/TonTransactionTypeFragmentWithdrawal.cs b/TdLib.Api/Objects/TonTransactionTypeFragmentWithdrawal.cs new file mode 100644 index 00000000..2e571934 --- /dev/null +++ b/TdLib.Api/Objects/TonTransactionTypeFragmentWithdrawal.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 TonTransactionType : Object + { + /// + /// The transaction is a withdrawal of earned Toncoins to Fragment + /// + public class TonTransactionTypeFragmentWithdrawal : TonTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonTransactionTypeFragmentWithdrawal"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// State of the withdrawal; may be null for refunds from Fragment + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("withdrawal_state")] + public RevenueWithdrawalState WithdrawalState { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonTransactionTypeGiftPurchaseOffer.cs b/TdLib.Api/Objects/TonTransactionTypeGiftPurchaseOffer.cs new file mode 100644 index 00000000..d414fb12 --- /dev/null +++ b/TdLib.Api/Objects/TonTransactionTypeGiftPurchaseOffer.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 TonTransactionType : Object + { + /// + /// The transaction is an offer of gift purchase + /// + public class TonTransactionTypeGiftPurchaseOffer : TonTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonTransactionTypeGiftPurchaseOffer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gift")] + public UpgradedGift Gift { 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 b6f0ec28..7b95396d 100644 --- a/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftPurchase.cs +++ b/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftPurchase.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class TonTransactionType : Object { /// - /// The transaction is a purchase of an upgraded gift for some user or channel; for regular users only + /// The transaction is a purchase of an upgraded gift for some user or channel /// public class TonTransactionTypeUpgradedGiftPurchase : TonTransactionType { diff --git a/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftSale.cs b/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftSale.cs index 021d061e..6b277eb7 100644 --- a/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftSale.cs +++ b/TdLib.Api/Objects/TonTransactionTypeUpgradedGiftSale.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class TonTransactionType : Object { /// - /// The transaction is a sale of an upgraded gift; for regular users only + /// The transaction is a sale of an upgraded gift /// public class TonTransactionTypeUpgradedGiftSale : TonTransactionType { @@ -55,6 +55,13 @@ public class TonTransactionTypeUpgradedGiftSale : TonTransactionType [JsonConverter(typeof(Converter))] [JsonProperty("commission_toncoin_amount")] public long CommissionToncoinAmount { get; set; } + + /// + /// True, if the gift was sold through a purchase offer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("via_offer")] + public bool ViaOffer { get; set; } } } } diff --git a/TdLib.Api/Objects/UpgradedGift.cs b/TdLib.Api/Objects/UpgradedGift.cs index 2aecab39..ea6bef8a 100644 --- a/TdLib.Api/Objects/UpgradedGift.cs +++ b/TdLib.Api/Objects/UpgradedGift.cs @@ -180,6 +180,13 @@ public partial class UpgradedGift : Object [JsonProperty("resale_parameters")] public GiftResaleParameters ResaleParameters { get; set; } + /// + /// True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("can_send_purchase_offer")] + public bool CanSendPurchaseOffer { get; set; } + /// /// ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable /// @@ -193,6 +200,13 @@ public partial class UpgradedGift : Object [JsonConverter(typeof(Converter))] [JsonProperty("value_amount")] public long ValueAmount { get; set; } + + /// + /// Estimated value of the gift in USD; in USD cents; 0 if unavailable + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("value_usd_amount")] + public long ValueUsdAmount { get; set; } } } } diff --git a/TdLib.Api/Objects/UpgradedGiftOriginOffer.cs b/TdLib.Api/Objects/UpgradedGiftOriginOffer.cs new file mode 100644 index 00000000..1f168f61 --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftOriginOffer.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 UpgradedGiftOrigin : Object + { + /// + /// The gift was bought through an offer + /// + public class UpgradedGiftOriginOffer : UpgradedGiftOrigin + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftOriginOffer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Price paid for the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("price")] + public GiftResalePrice Price { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftOriginResale.cs b/TdLib.Api/Objects/UpgradedGiftOriginResale.cs index 2a752a3a..daf84a94 100644 --- a/TdLib.Api/Objects/UpgradedGiftOriginResale.cs +++ b/TdLib.Api/Objects/UpgradedGiftOriginResale.cs @@ -29,7 +29,7 @@ public class UpgradedGiftOriginResale : UpgradedGiftOrigin public override string Extra { get; set; } /// - /// Price paid by the sender for the gift + /// Price paid for the gift /// [JsonConverter(typeof(Converter))] [JsonProperty("price")] diff --git a/TdLib.Api/Objects/UpgradedGiftOriginUpgrade.cs b/TdLib.Api/Objects/UpgradedGiftOriginUpgrade.cs index a97a555a..752de6f6 100644 --- a/TdLib.Api/Objects/UpgradedGiftOriginUpgrade.cs +++ b/TdLib.Api/Objects/UpgradedGiftOriginUpgrade.cs @@ -29,7 +29,7 @@ public class UpgradedGiftOriginUpgrade : UpgradedGiftOrigin public override string Extra { get; set; } /// - /// Identifier of the message with the regular gift that was upgraded; can be 0 or an identifier of a deleted message + /// Identifier of the message with the regular gift that was upgraded; may be 0 or an identifier of a deleted message /// [JsonConverter(typeof(Converter))] [JsonProperty("gift_message_id")] diff --git a/TdLib.CodeGen/Methods.tl b/TdLib.CodeGen/Methods.tl index 4057df66..5d9025f6 100644 --- a/TdLib.CodeGen/Methods.tl +++ b/TdLib.CodeGen/Methods.tl @@ -58,6 +58,19 @@ checkAuthenticationCode code:string = Ok; //@other_user_ids List of user identifiers of other users currently using the application requestQrCodeAuthentication other_user_ids:vector = Ok; +//@description Returns parameters for authentication using a passkey as JSON-serialized string +getAuthenticationPasskeyParameters = Text; + +//@description Checks a passkey to log in to the corresponding account. Call getAuthenticationPasskeyParameters to get parameters for the passkey. Works only when the current authorization state is +//-authorizationStateWaitPhoneNumber or authorizationStateWaitOtherDeviceConfirmation, or if there is no pending authentication query and the current authorization state is +//-authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword +//@credential_id Base64url-encoded identifier of the credential +//@client_data JSON-encoded client data +//@authenticator_data Authenticator data of the application that created the credential +//@signature Cryptographic signature of the credential +//@user_handle User handle of the passkey +checkAuthenticationPasskey credential_id:string client_data:string authenticator_data:bytes signature:bytes user_handle:bytes = Ok; + //@description Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration //@first_name The first name of the user; 1-64 characters //@last_name The last name of the user; 0-64 characters @@ -227,6 +240,7 @@ getMessageLocally chat_id:int53 message_id:int53 = Message; //-the giveaway message for messageGiveawayCompleted, the checklist message for messageChecklistTasksDone, messageChecklistTasksAdded, the message with suggested post information //-for messageSuggestedPostApprovalFailed, messageSuggestedPostApproved, messageSuggestedPostDeclined, messageSuggestedPostPaid, messageSuggestedPostRefunded, //-the message with the regular gift that was upgraded for messageUpgradedGift with origin of the type upgradedGiftOriginUpgrade, +//-the message with gift purchase offer for messageUpgradedGiftPurchaseOfferDeclined, //-and the topic creation message for topic messages without non-bundled replied message. Returns a 404 error if the message doesn't exist //@chat_id Identifier of the chat the message belongs to //@message_id Identifier of the reply message @@ -1085,7 +1099,7 @@ setBusinessAccountGiftSettings business_connection_id:string settings:giftSettin //@description Returns the amount of Telegram Stars owned by a business account; for bots only @business_connection_id Unique identifier of business connection getBusinessAccountStarAmount business_connection_id:string = StarAmount; -//@description Transfer Telegram Stars from the business account to the business bot; for bots only +//@description Transfers Telegram Stars from the business account to the business bot; for bots only //@business_connection_id Unique identifier of business connection //@star_count Number of Telegram Stars to transfer transferBusinessAccountStars business_connection_id:string star_count:int53 = Ok; @@ -1250,6 +1264,21 @@ readAllForumTopicReactions chat_id:int53 forum_topic_id:int32 = Ok; unpinAllForumTopicMessages chat_id:int53 forum_topic_id:int32 = Ok; +//@description Returns parameters for creating of a new passkey as JSON-serialized string +getPasskeyParameters = Text; + +//@description Adds a passkey allowed to be used for the login by the current user and returns the added passkey. Call getPasskeyParameters to get parameters for creating of the passkey +//@client_data JSON-encoded client data +//@attestation_object Passkey attestation object +addLoginPasskey client_data:string attestation_object:bytes = Passkey; + +//@description Returns the list of passkeys allowed to be used for the login by the current user +getLoginPasskeys = Passkeys; + +//@description Removes a passkey from the list of passkeys allowed to be used for the login by the current user @passkey_id Unique identifier of the passkey to remove +removeLoginPasskey passkey_id:string = Ok; + + //@description Returns information about an emoji reaction. Returns a 404 error if the reaction is not found @emoji Text representation of the reaction getEmojiReaction emoji:string = EmojiReaction; @@ -2018,7 +2047,7 @@ toggleChatIsPinned chat_list:ChatList chat_id:int53 is_pinned:Bool = Ok; //@description Changes the order of pinned chats @chat_list Chat list in which to change the order of pinned chats @chat_ids The new list of pinned chats setPinnedChats chat_list:ChatList chat_ids:vector = Ok; -//@description Traverse all chats in a chat list and marks all messages in the chats as read @chat_list Chat list in which to mark all chats as read +//@description Traverses all chats in a chat list and marks all messages in the chats as read @chat_list Chat list in which to mark all chats as read readChatList chat_list:ChatList = Ok; @@ -2331,7 +2360,7 @@ cancelDownloadFile file_id:int32 only_if_pending:Bool = Ok; //@description Returns suggested name for saving a file in a given directory @file_id Identifier of the file @directory Directory in which the file is expected to be saved getSuggestedFileName file_id:int32 directory:string = Text; -//@description Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. +//@description Preliminarily uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. //-In all other cases there is no need to preliminary upload a file. Updates updateFile will be used to notify about upload progress. //-The upload will not be completed until the file is sent in a message //@file File to upload @@ -2402,7 +2431,7 @@ removeAllFilesFromDownloads only_active:Bool only_completed:Bool delete_from_cac searchFileDownloads query:string only_active:Bool only_completed:Bool offset:string limit:int32 = FoundFileDownloads; -//@description Application or reCAPTCHA verification has been completed. Can be called before authorization +//@description Informs TDLib that application or reCAPTCHA verification has been completed. Can be called before authorization //@verification_id Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired //@token Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications; //-pass an empty string to abort verification and receive the error "VERIFICATION_FAILED" for the request @@ -2952,6 +2981,12 @@ removeProfileAudio file_id:int32 = Ok; //@for_clicked_animated_emoji_message Pass true to get the outline scaled for clicked animated emoji message getStickerOutline sticker_file_id:int32 for_animated_emoji:Bool for_clicked_animated_emoji_message:Bool = Outline; +//@description Returns outline of a sticker as an SVG path. This is an offline method. Returns an empty string if the outline isn't known +//@sticker_file_id File identifier of the sticker +//@for_animated_emoji Pass true to get the outline scaled for animated emoji +//@for_clicked_animated_emoji_message Pass true to get the outline scaled for clicked animated emoji message +getStickerOutlineSvgPath sticker_file_id:int32 for_animated_emoji:Bool for_clicked_animated_emoji_message:Bool = Text; + //@description Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned //@sticker_type Type of the stickers to return //@query Search query; a space-separated list of emojis or a keyword prefix. If empty, returns all known installed stickers @@ -3059,7 +3094,7 @@ getStickerEmojis sticker:InputFile = Emojis; //@input_language_codes List of possible IETF language tags of the user's input language; may be empty if unknown searchEmojis text:string input_language_codes:vector = EmojiKeywords; -//@description Return emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified +//@description Returns emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified //@text Text to search for //@input_language_codes List of possible IETF language tags of the user's input language; may be empty if unknown getKeywordEmojis text:string input_language_codes:vector = Emojis; @@ -3215,7 +3250,7 @@ reportPhoneNumberCodeMissing mobile_network_code:string = Ok; //@reason Reason of code resending; pass null if unknown resendPhoneNumberCode reason:ResendCodeReason = AuthenticationCodeInfo; -//@description Check the authentication code and completes the request for which the code was sent if appropriate @code Authentication code to check +//@description Checks the authentication code and completes the request for which the code was sent if appropriate @code Authentication code to check checkPhoneNumberCode code:string = Ok; @@ -3333,7 +3368,7 @@ editBotMediaPreview bot_user_id:int53 language_code:string file_id:int32 content //@file_ids File identifiers of the media in the new order reorderBotMediaPreviews bot_user_id:int53 language_code:string file_ids:vector = Ok; -//@description Delete media previews from the list of media previews of a bot +//@description Deletes media previews from the list of media previews of a bot //@bot_user_id Identifier of the target bot. The bot must be owned and must have the main Web App //@language_code Language code of the media previews to delete //@file_ids File identifiers of the media to delete @@ -3656,6 +3691,9 @@ 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 all possible variants of upgraded gifts for a regular gift @gift_id Identifier of the gift +getGiftUpgradeVariants gift_id:int64 = 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 @@ -3688,6 +3726,19 @@ dropGiftOriginalDetails received_gift_id:string star_count:int53 = Ok; //@price The price that the user agreed to pay for the gift sendResoldGift gift_name:string owner_id:MessageSender price:GiftResalePrice = GiftResaleResult; +//@description Sends an offer to purchase an upgraded gift +//@owner_id Identifier of the user or the channel chat that currently owns the gift and will receive the offer +//@gift_name Name of the upgraded gift +//@price The price that the user agreed to pay for the gift +//@duration Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used +//@paid_message_star_count The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoing_paid_message_star_count for users and 0 otherwise +sendGiftPurchaseOffer owner_id:MessageSender gift_name:string price:GiftResalePrice duration:int32 paid_message_star_count:int53 = Ok; + +//@description Handles a pending gift purchase offer +//@message_id Identifier of the message with the gift purchase offer +//@approve Pass true to approve the request; pass false to decline it +processGiftPurchaseOffer message_id:int53 approve:Bool = Ok; + //@description Returns gifts received by the given user or chat //@business_connection_id Unique identifier of business connection on behalf of which to send the request; for bots only //@owner_id Identifier of the gift receiver @@ -3719,6 +3770,9 @@ getUpgradedGiftValueInfo name:string = UpgradedGiftValueInfo; //@password The 2-step verification password of the current user getUpgradedGiftWithdrawalUrl received_gift_id:string password:string = HttpUrl; +//@description Returns promotional anumation for upgraded gifts +getUpgradedGiftsPromotionalAnimation = Animation; + //@description Changes resale price of a unique gift owned by the current user //@received_gift_id Identifier of the unique gift //@price The new price for the unique gift; pass null to disallow gift resale. The current user will receive @@ -3907,7 +3961,7 @@ allowUnpaidMessagesFromUser user_id:int53 refund_payments:Bool = Ok; setChatPaidMessageStarCount chat_id:int53 paid_message_star_count:int53 = Ok; -//@description Check whether the current user can message another user or try to create a chat with them +//@description Checks whether the current user can message another user or try to create a chat with them //@user_id Identifier of the other user //@only_local Pass true to get only locally available information without sending network requests canSendMessageToUser user_id:int53 only_local:Bool = CanSendMessageToUserResult; @@ -4270,7 +4324,7 @@ getPremiumGiftPaymentOptions = PremiumGiftPaymentOptions; //@boosted_chat_id Identifier of the supergroup or channel chat, which will be automatically boosted by receivers of the gift codes and which is administered by the user getPremiumGiveawayPaymentOptions boosted_chat_id:int53 = PremiumGiveawayPaymentOptions; -//@description Return information about a Telegram Premium gift code @code The code to check +//@description Returns information about a Telegram Premium gift code @code The code to check checkPremiumGiftCode code:string = PremiumGiftCodeInfo; //@description Applies a Telegram Premium gift code @code The code to apply diff --git a/TdLib.CodeGen/Types.tl b/TdLib.CodeGen/Types.tl index dd76ba2b..4924a459 100644 --- a/TdLib.CodeGen/Types.tl +++ b/TdLib.CodeGen/Types.tl @@ -120,13 +120,25 @@ formattedText text:string entities:vector = FormattedText; //@description Contains Telegram terms of service @text Text of the terms of service @min_user_age The minimum age of a user to be able to accept the terms; 0 if age isn't restricted @show_popup True, if a blocking popup with terms of service must be shown to the user termsOfService text:formattedText min_user_age:int32 show_popup:Bool = TermsOfService; +//@description Describes a passkey +//@id Unique identifier of the passkey +//@name Name of the passkey +//@addition_date Point in time (Unix timestamp) when the passkey was added +//@last_usage_date Point in time (Unix timestamp) when the passkey was used last time; 0 if never +//@software_icon_custom_emoji_id Identifier of the custom emoji that is used as the icon of the software, which created the passkey; 0 if unknown +passkey id:string name:string addition_date:int32 last_usage_date:int32 software_icon_custom_emoji_id:int64 = Passkey; + +//@description Contains a list of passkeys @passkeys List of passkeys +passkeys passkeys:vector = Passkeys; + //@class AuthorizationState @description Represents the current authorization state of the TDLib client //@description Initialization parameters are needed. Call setTdlibParameters to provide them authorizationStateWaitTdlibParameters = AuthorizationState; -//@description TDLib needs the user's phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, or use requestQrCodeAuthentication or checkAuthenticationBotToken for other authentication options +//@description TDLib needs the user's phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, +//-or use requestQrCodeAuthentication, getAuthenticationPasskeyParameters, or checkAuthenticationBotToken for other authentication options authorizationStateWaitPhoneNumber = AuthorizationState; //@description The user must buy Telegram Premium as an in-store purchase to log in. Call checkAuthenticationPremiumPurchase and then setAuthenticationPremiumPurchaseTransaction @@ -569,7 +581,7 @@ poll id:int64 question:formattedText options:vector total_voter_coun //@id Unique identifier of the alternative video, which is used in the HLS file //@width Video width //@height Video height -//@codec Codec used for video file encoding, for example, "h264", "h265", or "av1" +//@codec Codec used for video file encoding, for example, "h264", "h265", "av1", or "av01" //@hls_file HLS file describing the video //@video File containing the video alternativeVideo id:int64 width:int32 height:int32 codec:string hls_file:file video:file = AlternativeVideo; @@ -910,7 +922,7 @@ chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_docum //@can_edit_messages True, if the administrator can edit messages of other users and pin messages; applicable to channels only //@can_delete_messages True, if the administrator can delete messages of other users //@can_invite_users True, if the administrator can invite new users to the chat -//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics; always true for channels +//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics //@can_pin_messages True, if the administrator can pin messages; applicable to basic groups and supergroups only //@can_manage_topics True, if the administrator can create, rename, close, reopen, hide, and unhide forum topics; applicable to forum supergroups only //@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them @@ -936,6 +948,18 @@ giftResalePriceStar star_count:int53 = GiftResalePrice; giftResalePriceTon toncoin_cent_count:int53 = GiftResalePrice; +//@class GiftPurchaseOfferState @description Describes state of a gift purchase offer + +//@description The offer must be accepted or rejected +giftPurchaseOfferStatePending = GiftPurchaseOfferState; + +//@description The offer was accepted +giftPurchaseOfferStateAccepted = GiftPurchaseOfferState; + +//@description The offer was rejected +giftPurchaseOfferStateRejected = GiftPurchaseOfferState; + + //@class SuggestedPostPrice @description Describes price of a suggested post //@description Describes price of a suggested post in Telegram Stars @@ -1152,7 +1176,7 @@ premiumGiveawayPaymentOptions options:vector = Pre //@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 //@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; can be 0 or an identifier of a deleted message +//@giveaway_message_id Identifier of the corresponding giveaway message in the creator_id chat; may be 0 or an identifier of a deleted message //@month_count Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer //@day_count Number of days the Telegram Premium subscription will be active after code activation //@user_id Identifier of a user for which the code was created; 0 if none @@ -1208,7 +1232,8 @@ giftSettings show_gift_button:Bool accepted_gift_types:acceptedGiftTypes = GiftS //@description Describes an auction on which a gift can be purchased //@id Identifier of the auction //@gifts_per_round Number of gifts distributed in each round -giftAuction id:string gifts_per_round:int32 = GiftAuction; +//@start_date Point in time (Unix timestamp) when the auction will start +giftAuction id:string gifts_per_round:int32 start_date:int32 = GiftAuction; //@description Describes background of a gift //@center_color Center color in RGB format @@ -1250,13 +1275,13 @@ canSendGiftResultFail reason:formattedText = CanSendGiftResult; //@class UpgradedGiftOrigin @description Describes origin from which the upgraded gift was obtained //@description The gift was obtained by upgrading of a previously received gift -//@gift_message_id Identifier of the message with the regular gift that was upgraded; can be 0 or an identifier of a deleted message +//@gift_message_id Identifier of the message with the regular gift that was upgraded; may be 0 or an identifier of a deleted message upgradedGiftOriginUpgrade gift_message_id:int53 = UpgradedGiftOrigin; //@description The gift was transferred from another owner upgradedGiftOriginTransfer = UpgradedGiftOrigin; -//@description The gift was bought from another user @price Price paid by the sender for the gift +//@description The gift was bought from another user @price Price paid for the gift upgradedGiftOriginResale price:GiftResalePrice = UpgradedGiftOrigin; //@description The gift was assigned from blockchain and isn't owned by the current user. The gift can't be transferred, resold or withdrawn to blockchain @@ -1265,6 +1290,9 @@ upgradedGiftOriginBlockchain = UpgradedGiftOrigin; //@description The sender or receiver of the message has paid for upgraid of the gift, which has been completed upgradedGiftOriginPrepaidUpgrade = UpgradedGiftOrigin; +//@description The gift was bought through an offer @price Price paid for the gift +upgradedGiftOriginOffer price:GiftResalePrice = UpgradedGiftOrigin; + //@description Describes a model of an upgraded gift //@name Name of the model @@ -1316,17 +1344,19 @@ upgradedGiftColors id:int64 model_custom_emoji_id:int64 symbol_custom_emoji_id:i //@star_count Number of Telegram Stars that must be paid for the gift //@default_sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed //@upgrade_star_count Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible +//@upgrade_variant_count Number of unique gift variants that are available for the upgraded gift; 0 if unknown //@has_colors True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview //@is_for_birthday True, if the gift is a birthday gift //@is_premium True, if the gift can be bought only by Telegram Premium subscribers //@auction_info Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly -//@next_send_date Point in time (Unix timestamp) when the gift can be sent next time by the current user; can be 0 or a date in the past. +//@next_send_date Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. //-If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now //@user_limits Number of times the gift can be purchased by the current user; may be null if not limited //@overall_limits Number of times the gift can be purchased all users; may be null if not limited +//@background Background of the gift //@first_send_date Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only //@last_send_date Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only -gift id:int64 publisher_chat_id:int53 sticker:sticker star_count:int53 default_sell_star_count:int53 upgrade_star_count:int53 has_colors:Bool is_for_birthday:Bool is_premium:Bool auction_info:giftAuction next_send_date:int32 user_limits:giftPurchaseLimits overall_limits:giftPurchaseLimits first_send_date:int32 last_send_date:int32 = Gift; +gift id:int64 publisher_chat_id:int53 sticker:sticker star_count:int53 default_sell_star_count:int53 upgrade_star_count:int53 upgrade_variant_count:int32 has_colors:Bool is_for_birthday:Bool is_premium:Bool auction_info:giftAuction next_send_date:int32 user_limits:giftPurchaseLimits overall_limits:giftPurchaseLimits background:giftBackground first_send_date:int32 last_send_date:int32 = Gift; //@description Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT //@id Unique identifier of the gift @@ -1351,9 +1381,11 @@ gift id:int64 publisher_chat_id:int53 sticker:sticker star_count:int53 default_s //@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 //@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 //@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 -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 value_currency:string value_amount:int53 = UpgradedGift; +//@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; //@description Contains information about value of an upgraded gift //@currency ISO 4217 currency code of the currency in which the prices are represented @@ -1472,6 +1504,7 @@ sentGiftUpgraded gift:upgradedGift = SentGift; //@received_gift_id Unique identifier of the received gift for the current user; only for the receiver of the gift //@sender_id Identifier of a user or a chat that sent the gift; may be null if unknown //@text Message added to the gift +//@unique_gift_number Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned //@is_private True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them //@is_saved True, if the gift is displayed on the chat's profile page; only for the receiver of the gift //@is_pinned True, if the gift is pinned to the top of the chat's profile page @@ -1490,7 +1523,7 @@ sentGiftUpgraded gift:upgradedGift = SentGift; //@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 upgraded 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 //@prepaid_upgrade_hash If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade -receivedGift received_gift_id:string sender_id:MessageSender text:formattedText 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 = ReceivedGift; +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 = ReceivedGift; //@description Represents a list of gifts received by a user or a chat //@total_count The total number of received gifts @@ -1507,6 +1540,12 @@ receivedGifts total_count:int32 gifts:vector are_notifications_ena //@next_prices Next changes for the price for gift upgrade with more granularity than in prices giftUpgradePreview models:vector symbols:vector backdrops:vector prices:vector next_prices:vector = GiftUpgradePreview; +//@description Contains all possible variants of upgraded gifts for the given regular gift +//@models Models that can be chosen for the gift after upgrade +//@symbols Symbols that can be chosen for the gift after upgrade +//@backdrops Backdrops that can be chosen for the gift after upgrade +giftUpgradeVariants models:vector symbols:vector backdrops:vector = GiftUpgradeVariants; + //@description Describes a bid in an auction //@star_count The number of Telegram Stars that were put in the bid @@ -1522,29 +1561,41 @@ auctionBid star_count:int53 bid_date:int32 position:int32 = AuctionBid; //@was_returned True, if the bid was returned to the user, because it was outbid and can't win anymore userAuctionBid star_count:int53 bid_date:int32 next_bid_star_count:int53 owner_id:MessageSender was_returned:Bool = UserAuctionBid; +//@description Describes a round of an auction +//@number 1-based number of the round +//@duration Duration of the round, in seconds +//@extend_time The number of seconds for which the round will be extended if there are changes in the top winners +//@top_winner_count The number of top winners who trigger round extension if changed +auctionRound number:int32 duration:int32 extend_time:int32 top_winner_count:int32 = AuctionRound; + //@class AuctionState @description Describes state of an auction -//@description Contains information about an ongoing auction -//@start_date Point in time (Unix timestamp) when the auction started +//@description Contains information about an ongoing or scheduled auction +//@start_date Point in time (Unix timestamp) when the auction started or will start //@end_date Point in time (Unix timestamp) when the auction will be ended //@min_bid The minimum possible bid in the auction in Telegram Stars //@bid_levels A sparse list of bids that were made in the auction //@top_bidder_user_ids User identifiers of at most 3 users with the biggest bids +//@rounds Rounds of the auction in which their duration or extension rules are changed //@current_round_end_date Point in time (Unix timestamp) when the current round will end //@current_round_number 1-based number of the current round //@total_round_count The total number of rounds -//@left_item_count The number of items that have to be distributed on the auciton -//@acquired_item_count The number of items that were purchased by the current user on the auciton +//@distributed_item_count The number of items that were purchased on the auction by all users +//@left_item_count The number of items that have to be distributed on the auction +//@acquired_item_count The number of items that were purchased by the current user on the auction //@user_bid Bid of the current user in the auction; may be null if none -auctionStateActive start_date:int32 end_date:int32 min_bid:int53 bid_levels:vector top_bidder_user_ids:vector current_round_end_date:int32 current_round_number:int32 total_round_count:int32 left_item_count:int32 acquired_item_count:int32 user_bid:userAuctionBid = AuctionState; +auctionStateActive start_date:int32 end_date:int32 min_bid:int53 bid_levels:vector top_bidder_user_ids:vector rounds:vector current_round_end_date:int32 current_round_number:int32 total_round_count:int32 distributed_item_count:int32 left_item_count:int32 acquired_item_count:int32 user_bid:userAuctionBid = AuctionState; //@description Contains information about a finished auction //@start_date Point in time (Unix timestamp) when the auction started //@end_date Point in time (Unix timestamp) when the auction will be ended //@average_price Average price of bought items in Telegram Stars -//@acquired_item_count The number of items that were purchased by the current user on the auciton -auctionStateFinished start_date:int32 end_date:int32 average_price:int53 acquired_item_count:int32 = AuctionState; +//@acquired_item_count The number of items that were purchased by the current user on the auction +//@telegram_listed_item_count Number of items from the auction being resold on Telegram +//@fragment_listed_item_count Number of items from the auction being resold on Fragment +//@fragment_url The HTTPS link to the Fragment for the resold items; may be empty if there are no such items being sold on Fragment +auctionStateFinished start_date:int32 end_date:int32 average_price:int53 acquired_item_count:int32 telegram_listed_item_count:int32 fragment_listed_item_count:int32 fragment_url:string = AuctionState; //@description Represent auction state of a gift @@ -1558,9 +1609,10 @@ giftAuctionState gift:gift state:AuctionState = GiftAuctionState; //@star_count The number of Telegram Stars that were paid for the gift //@auction_round_number Identifier of the auction round in which the gift was acquired //@auction_round_position Position of the user in the round among all auction participants +//@unique_gift_number Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned //@text Message added to the gift //@is_private True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them -giftAuctionAcquiredGift receiver_id:MessageSender date:int32 star_count:int53 auction_round_number:int32 auction_round_position:int32 text:formattedText is_private:Bool = GiftAuctionAcquiredGift; +giftAuctionAcquiredGift receiver_id:MessageSender date:int32 star_count:int53 auction_round_number:int32 auction_round_position:int32 unique_gift_number:int32 text:formattedText is_private:Bool = GiftAuctionAcquiredGift; //@description Represents a list of gifts that were acquired by the current user on an auction @gifts The list of acquired gifts giftAuctionAcquiredGifts gifts:vector = GiftAuctionAcquiredGifts; @@ -1577,81 +1629,81 @@ transactionDirectionOutgoing = TransactionDirection; //@class StarTransactionType @description Describes type of transaction with Telegram Stars -//@description The transaction is a deposit of Telegram Stars from the Premium bot; for regular users only +//@description The transaction is a deposit of Telegram Stars from the Premium bot; relevant for regular users only starTransactionTypePremiumBotDeposit = StarTransactionType; -//@description The transaction is a deposit of Telegram Stars from App Store; for regular users only +//@description The transaction is a deposit of Telegram Stars from App Store; relevant for regular users only starTransactionTypeAppStoreDeposit = StarTransactionType; -//@description The transaction is a deposit of Telegram Stars from Google Play; for regular users only +//@description The transaction is a deposit of Telegram Stars from Google Play; relevant for regular users only starTransactionTypeGooglePlayDeposit = StarTransactionType; -//@description The transaction is a deposit of Telegram Stars from Fragment; for regular users and bots only +//@description The transaction is a deposit of Telegram Stars from Fragment; relevant for regular users and bots only starTransactionTypeFragmentDeposit = StarTransactionType; -//@description The transaction is a deposit of Telegram Stars by another user; for regular users only +//@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 //@sticker The sticker to be shown in the transaction information; may be null if unknown starTransactionTypeUserDeposit user_id:int53 sticker:sticker = StarTransactionType; -//@description The transaction is a deposit of Telegram Stars from a giveaway; for regular users only +//@description The transaction is a deposit of Telegram Stars from a giveaway; relevant for regular users only //@chat_id Identifier of a supergroup or a channel chat that created the giveaway -//@giveaway_message_id Identifier of the message with the giveaway; can be 0 or an identifier of a deleted message +//@giveaway_message_id Identifier of the message with the giveaway; may be 0 or an identifier of a deleted message starTransactionTypeGiveawayDeposit chat_id:int53 giveaway_message_id:int53 = StarTransactionType; -//@description The transaction is a withdrawal of earned Telegram Stars to Fragment; for regular users, bots, supergroup and channel chats only +//@description The transaction is a withdrawal of earned Telegram Stars to Fragment; relevant for regular users, bots, supergroup and channel chats only //@withdrawal_state State of the withdrawal; may be null for refunds from Fragment starTransactionTypeFragmentWithdrawal withdrawal_state:RevenueWithdrawalState = StarTransactionType; -//@description The transaction is a withdrawal of earned Telegram Stars to Telegram Ad platform; for bots and channel chats only +//@description The transaction is a withdrawal of earned Telegram Stars to Telegram Ad platform; relevant for bots and channel chats only starTransactionTypeTelegramAdsWithdrawal = StarTransactionType; -//@description The transaction is a payment for Telegram API usage; for bots only @request_count The number of billed requests +//@description The transaction is a payment for Telegram API usage; relevant for bots only @request_count The number of billed requests 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; for regular users only +//@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 //@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; for bots only +//@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 //@media The bought media //@payload Bot-provided payload //@affiliate Information about the affiliate which received commission from the transaction; may be null if none starTransactionTypeBotPaidMediaSale user_id:int53 media:vector payload:string affiliate:affiliateInfo = StarTransactionType; -//@description The transaction is a purchase of paid media from a channel by the current user; for regular users only +//@description The transaction is a purchase of paid media from a channel by the current user; relevant for regular users only //@chat_id Identifier of the channel chat that sent the paid media -//@message_id Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message +//@message_id Identifier of the corresponding message with paid media; may be 0 or an identifier of a deleted message //@media The bought media if the transaction wasn't refunded starTransactionTypeChannelPaidMediaPurchase chat_id:int53 message_id:int53 media:vector = StarTransactionType; -//@description The transaction is a sale of paid media by the channel chat; for channel chats only +//@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 -//@message_id Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message +//@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; for regular users only +//@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 //@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; for bots only +//@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 //@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; for regular users only +//@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 //@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; for bots only +//@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 //@subscription_period The number of seconds between consecutive Telegram Star debitings //@product_info Information about the bought subscription @@ -1659,111 +1711,115 @@ starTransactionTypeBotSubscriptionPurchase user_id:int53 subscription_period:int //@affiliate Information about the affiliate which received commission from the transaction; may be null if none starTransactionTypeBotSubscriptionSale user_id:int53 subscription_period:int32 product_info:productInfo invoice_payload:bytes affiliate:affiliateInfo = StarTransactionType; -//@description The transaction is a purchase of a subscription to a channel chat by the current user; for regular users only +//@description The transaction is a purchase of a subscription to a channel chat by the current user; relevant for regular users only //@chat_id Identifier of the channel chat that created the subscription //@subscription_period The number of seconds between consecutive Telegram Star debitings starTransactionTypeChannelSubscriptionPurchase chat_id:int53 subscription_period:int32 = StarTransactionType; -//@description The transaction is a sale of a subscription by the channel chat; for channel chats only +//@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 //@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; 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 that will receive the gift @gift The gift starTransactionTypeGiftAuctionBid owner_id:MessageSender gift:gift = StarTransactionType; -//@description The transaction is a purchase of a regular gift; for regular users and bots only @owner_id Identifier of the user or the channel that received the gift @gift The gift +//@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 starTransactionTypeGiftPurchase owner_id:MessageSender gift:gift = StarTransactionType; -//@description The transaction is a transfer of an upgraded gift; for regular users only @owner_id Identifier of the user or the channel that received the gift @gift The gift +//@description The transaction is an offer of gift purchase; relevant for regular users only @gift The gift +starTransactionTypeGiftPurchaseOffer gift:upgradedGift = StarTransactionType; + +//@description The transaction is a transfer of an upgraded gift; relevant for regular users only @owner_id Identifier of the user or the channel that received the gift @gift The gift starTransactionTypeGiftTransfer owner_id:MessageSender gift:upgradedGift = StarTransactionType; -//@description The transaction is a drop of original details of an upgraded gift; for regular users only @owner_id Identifier of the user or the channel that owns the gift @gift The gift +//@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; 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 that sent the gift @gift The gift starTransactionTypeGiftSale user_id:int53 gift:gift = StarTransactionType; -//@description The transaction is an upgrade of a gift; 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 that 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; for regular users only @owner_id Owner of the upgraded gift @gift The gift +//@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; 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 that sold the gift @gift The gift starTransactionTypeUpgradedGiftPurchase user_id:int53 gift:upgradedGift = StarTransactionType; -//@description The transaction is a sale of an upgraded gift; for regular users only +//@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 //@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 -starTransactionTypeUpgradedGiftSale user_id:int53 gift:upgradedGift commission_per_mille:int32 commission_star_amount:starAmount = StarTransactionType; +//@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; -//@description The transaction is a sending of a paid reaction to a message in a channel chat by the current user; for regular users only +//@description The transaction is a sending of a paid reaction to a message in a channel chat by the current user; relevant for regular users only //@chat_id Identifier of the channel chat -//@message_id Identifier of the reacted message; can be 0 or an identifier of a deleted message +//@message_id Identifier of the reacted message; may be 0 or an identifier of a deleted message 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; for channel chats only +//@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 -//@message_id Identifier of the reacted message; can be 0 or an identifier of a deleted message +//@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; -//@description The transaction is a receiving of a commission from an affiliate program; for regular users, bots and channel chats only +//@description The transaction is a receiving of a commission from an affiliate program; relevant for regular users, bots and channel chats only //@chat_id Identifier of the chat that created the affiliate program //@commission_per_mille The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner starTransactionTypeAffiliateProgramCommission chat_id:int53 commission_per_mille:int32 = StarTransactionType; -//@description The transaction is a sending of a paid message; for regular users only @chat_id Identifier of the chat that received the payment @message_count Number of sent paid messages +//@description The transaction is a sending of a paid message; relevant for regular users only @chat_id Identifier of the chat that received the payment @message_count Number of sent paid messages starTransactionTypePaidMessageSend chat_id:int53 message_count:int32 = StarTransactionType; -//@description The transaction is a receiving of a paid message; for regular users, supergroup and channel chats only +//@description The transaction is a receiving of a paid message; relevant for regular users, supergroup and channel chats only //@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 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; for regular users only @chat_id Identifier of the chat that received the payment +//@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 starTransactionTypePaidGroupCallMessageSend chat_id:int53 = StarTransactionType; -//@description The transaction is a receiving of a paid group call message; for regular users and channel chats only +//@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 starTransactionTypePaidGroupCallMessageReceive sender_id:MessageSender commission_per_mille:int32 commission_star_amount:starAmount = StarTransactionType; -//@description The transaction is a sending of a paid group reaction; for regular users only @chat_id Identifier of the chat that received the payment +//@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 starTransactionTypePaidGroupCallReactionSend chat_id:int53 = StarTransactionType; -//@description The transaction is a receiving of a paid group call reaction; for regular users and channel chats only +//@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 starTransactionTypePaidGroupCallReactionReceive sender_id:MessageSender commission_per_mille:int32 commission_star_amount:starAmount = StarTransactionType; -//@description The transaction is a payment for a suggested post; for regular users only +//@description The transaction is a payment for a suggested post; relevant for regular users only //@chat_id Identifier of the channel chat that posted the post starTransactionTypeSuggestedPostPaymentSend chat_id:int53 = StarTransactionType; -//@description The transaction is a receiving of a payment for a suggested post by the channel chat; for channel chats only +//@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 starTransactionTypeSuggestedPostPaymentReceive user_id:int53 = StarTransactionType; -//@description The transaction is a purchase of Telegram Premium subscription; for regular users and bots only +//@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 //@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; -//@description The transaction is a transfer of Telegram Stars to a business bot; for regular users only @user_id Identifier of the bot that received Telegram Stars +//@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; 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 that sent Telegram Stars starTransactionTypeBusinessBotTransferReceive user_id:int53 = StarTransactionType; -//@description The transaction is a payment for search of posts in public Telegram channels; for regular users only +//@description The transaction is a payment for search of posts in public Telegram channels; relevant for regular users only starTransactionTypePublicPostSearch = StarTransactionType; //@description The transaction is a transaction of an unsupported type @@ -1792,18 +1848,25 @@ starTransactions star_amount:starAmount transactions:vector nex //@sticker The sticker to be shown in the transaction information; may be null if unknown tonTransactionTypeFragmentDeposit is_gift:Bool sticker:sticker = TonTransactionType; +//@description The transaction is a withdrawal of earned Toncoins to Fragment @withdrawal_state State of the withdrawal; may be null for refunds from Fragment +tonTransactionTypeFragmentWithdrawal withdrawal_state:RevenueWithdrawalState = TonTransactionType; + //@description The transaction is a payment for a suggested post @chat_id Identifier of the channel chat that posted the post tonTransactionTypeSuggestedPostPayment chat_id:int53 = TonTransactionType; -//@description The transaction is a purchase of an upgraded gift for some user or channel; for regular users only @user_id Identifier of the user that sold the gift @gift The gift +//@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 tonTransactionTypeUpgradedGiftPurchase user_id:int53 gift:upgradedGift = TonTransactionType; -//@description The transaction is a sale of an upgraded gift; for regular users only +//@description The transaction is a sale of an upgraded gift //@user_id Identifier of the user that 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 -tonTransactionTypeUpgradedGiftSale user_id:int53 gift:upgradedGift commission_per_mille:int32 commission_toncoin_amount:int53 = TonTransactionType; +//@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 transaction of an unsupported type tonTransactionTypeUnsupported = TonTransactionType; @@ -3841,9 +3904,8 @@ linkPreviewTypeExternalVideo url:string mime_type:string width:int32 height:int3 //@description The link is a link to a gift auction //@gift The gift -//@gift_background Background of the gift //@auction_end_date Point in time (Unix timestamp) when the auction will be ended -linkPreviewTypeGiftAuction gift:gift gift_background:giftBackground auction_end_date:int32 = LinkPreviewType; +linkPreviewTypeGiftAuction gift:gift auction_end_date:int32 = LinkPreviewType; //@description The link is a link to a gift collection @icons Icons for some gifts from the collection; may be empty linkPreviewTypeGiftCollection icons:vector = LinkPreviewType; @@ -4695,7 +4757,7 @@ messageGameScore game_message_id:int53 game_id:int64 score:int32 = MessageConten //@description A payment has been sent to a bot or a business account //@invoice_chat_id Identifier of the chat, containing the corresponding invoice message -//@invoice_message_id Identifier of the message with the corresponding invoice; can be 0 or an identifier of a deleted message +//@invoice_message_id Identifier of the message with the corresponding invoice; may be 0 or an identifier of a deleted message //@currency Currency for the price of the product //@total_amount Total price for the product, in the smallest units of the currency //@subscription_until_date Point in time (Unix timestamp) when the subscription will expire; 0 if unknown or the payment isn't recurring @@ -4766,7 +4828,7 @@ messageGiveawayCreated star_count:int53 = MessageContent; messageGiveaway parameters:giveawayParameters winner_count:int32 prize:GiveawayPrize sticker:sticker = MessageContent; //@description A giveaway without public winners has been completed for the chat -//@giveaway_message_id Identifier of the message with the giveaway; can be 0 if the message was deleted +//@giveaway_message_id Identifier of the message with the giveaway; may be 0 or an identifier of a deleted message //@winner_count Number of winners in the giveaway //@is_star_giveaway True, if the giveaway is a Telegram Star giveaway //@unclaimed_prize_count Number of undistributed prizes; for Telegram Premium giveaways only @@ -4810,7 +4872,7 @@ messageGiftedTon gifter_user_id:int53 receiver_user_id:int53 ton_amount:int53 tr //@star_count Number of Telegram Stars that were received //@transaction_id Identifier of the transaction for Telegram Stars credit //@boosted_chat_id Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway -//@giveaway_message_id Identifier of the message with the giveaway in the boosted chat; can be 0 if the message was deleted +//@giveaway_message_id Identifier of the message with the giveaway in the boosted chat; may be 0 or an identifier of a deleted message //@is_unclaimed True, if the corresponding winner wasn't chosen and the Telegram Stars were received by the owner of the boosted chat //@sticker A sticker to be shown in the message; may be null if unknown messageGiveawayPrizeStars star_count:int53 transaction_id:string boosted_chat_id:int53 giveaway_message_id:int53 is_unclaimed:Bool sticker:sticker = MessageContent; @@ -4821,6 +4883,7 @@ messageGiveawayPrizeStars star_count:int53 transaction_id:string boosted_chat_id //@receiver_id Receiver of the gift //@received_gift_id Unique identifier of the received gift for the current user; only for the receiver of the gift //@text Message added to the gift +//@unique_gift_number Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned //@sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver //@prepaid_upgrade_star_count Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift //@is_upgrade_separate True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost @@ -4834,7 +4897,7 @@ messageGiveawayPrizeStars star_count:int53 transaction_id:string boosted_chat_id //@was_refunded True, if the gift was refunded and isn't available anymore //@upgraded_received_gift_id Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift //@prepaid_upgrade_hash If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade -messageGift gift:gift sender_id:MessageSender receiver_id:MessageSender received_gift_id:string text:formattedText sell_star_count:int53 prepaid_upgrade_star_count:int53 is_upgrade_separate:Bool is_from_auction:Bool is_private:Bool is_saved:Bool is_prepaid_upgrade:Bool can_be_upgraded:Bool was_converted:Bool was_upgraded:Bool was_refunded:Bool upgraded_received_gift_id:string prepaid_upgrade_hash:string = MessageContent; +messageGift gift:gift sender_id:MessageSender receiver_id:MessageSender received_gift_id:string text:formattedText unique_gift_number:int32 sell_star_count:int53 prepaid_upgrade_star_count:int53 is_upgrade_separate:Bool is_from_auction:Bool is_private:Bool is_saved:Bool is_prepaid_upgrade:Bool can_be_upgraded:Bool was_converted:Bool was_upgraded:Bool was_refunded:Bool upgraded_received_gift_id:string prepaid_upgrade_hash:string = MessageContent; //@description An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift //@gift The gift @@ -4859,6 +4922,20 @@ messageUpgradedGift gift:upgradedGift sender_id:MessageSender receiver_id:Messag //@origin Origin of the upgraded gift messageRefundedUpgradedGift gift:gift sender_id:MessageSender receiver_id:MessageSender origin:UpgradedGiftOrigin = MessageContent; +//@description An offer to purchase an upgraded gift was sent or received +//@gift The gift +//@state State of the offer +//@price The proposed price +//@expiration_date Point in time (Unix timestamp) when the offer will expire or has expired +messageUpgradedGiftPurchaseOffer gift:upgradedGift state:GiftPurchaseOfferState price:GiftResalePrice expiration_date:int32 = MessageContent; + +//@description An offer to purchase a gift was declined or expired +//@gift The gift +//@price The proposed price +//@offer_message_id Identifier of the message with purchase offer which was declined or expired; may be 0 or an identifier of a deleted message +//@was_expired True, if the offer has expired; otherwise, the offer was explicitly declined +messageUpgradedGiftPurchaseOfferDeclined gift:upgradedGift price:GiftResalePrice offer_message_id:int53 was_expired:Bool = MessageContent; + //@description Paid messages were refunded @message_count The number of refunded messages @star_count The number of refunded Telegram Stars messagePaidMessagesRefunded message_count:int32 star_count:int53 = MessageContent; @@ -4872,40 +4949,40 @@ messagePaidMessagePriceChanged paid_message_star_count:int53 = MessageContent; messageDirectMessagePriceChanged is_enabled:Bool paid_message_star_count:int53 = MessageContent; //@description Some tasks from a checklist were marked as done or not done -//@checklist_message_id Identifier of the message with the checklist; can be 0 if the message was deleted +//@checklist_message_id Identifier of the message with the checklist; may be 0 or an identifier of a deleted message //@marked_as_done_task_ids Identifiers of tasks that were marked as done //@marked_as_not_done_task_ids Identifiers of tasks that were marked as not done messageChecklistTasksDone checklist_message_id:int53 marked_as_done_task_ids:vector marked_as_not_done_task_ids:vector = MessageContent; //@description Some tasks were added to a checklist -//@checklist_message_id Identifier of the message with the checklist; can be 0 if the message was deleted +//@checklist_message_id Identifier of the message with the checklist; may be 0 or an identifier of a deleted message //@tasks List of tasks added to the checklist messageChecklistTasksAdded checklist_message_id:int53 tasks:vector = MessageContent; //@description Approval of suggested post has failed, because the user which proposed the post had no enough funds -//@suggested_post_message_id Identifier of the message with the suggested post; can be 0 if the message was deleted +//@suggested_post_message_id Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message //@price Price of the suggested post messageSuggestedPostApprovalFailed suggested_post_message_id:int53 price:SuggestedPostPrice = MessageContent; //@description A suggested post was approved -//@suggested_post_message_id Identifier of the message with the suggested post; can be 0 if the message was deleted +//@suggested_post_message_id Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message //@price Price of the suggested post; may be null if the post is non-paid //@send_date Point in time (Unix timestamp) when the post is expected to be published messageSuggestedPostApproved suggested_post_message_id:int53 price:SuggestedPostPrice send_date:int32 = MessageContent; //@description A suggested post was declined -//@suggested_post_message_id Identifier of the message with the suggested post; can be 0 if the message was deleted +//@suggested_post_message_id Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message //@comment Comment added by administrator of the channel when the post was declined messageSuggestedPostDeclined suggested_post_message_id:int53 comment:string = MessageContent; //@description A suggested post was published for getOption("suggested_post_lifetime_min") seconds and payment for the post was received -//@suggested_post_message_id Identifier of the message with the suggested post; can be 0 if the message was deleted +//@suggested_post_message_id Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message //@star_amount The amount of received Telegram Stars //@ton_amount The amount of received Toncoins; in the smallest units of the cryptocurrency messageSuggestedPostPaid suggested_post_message_id:int53 star_amount:starAmount ton_amount:int53 = MessageContent; //@description A suggested post was refunded -//@suggested_post_message_id Identifier of the message with the suggested post; can be 0 if the message was deleted +//@suggested_post_message_id Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message //@reason Reason of the refund messageSuggestedPostRefunded suggested_post_message_id:int53 reason:SuggestedPostRefundReason = MessageContent; @@ -5074,7 +5151,7 @@ messageSelfDestructTypeImmediately = MessageSelfDestructType; //@update_order_of_installed_sticker_sets Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum //@scheduling_state Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, to a channel direct messages chat, //-live location messages and self-destructing messages can't be scheduled -//@effect_id Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats +//@effect_id Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage, sendMessageAlbum in private chats and forwardMessages with one message to private chats //@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates //@only_preview Pass true to get a fake message instead of actually sending them messageSendOptions suggested_post_info:inputSuggestedPostInfo disable_notification:Bool from_background:Bool protect_content:Bool allow_paid_broadcast:Bool paid_message_star_count:int53 update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState effect_id:int64 sending_id:int32 only_preview:Bool = MessageSendOptions; @@ -7099,6 +7176,9 @@ premiumFeatureMessageEffects = PremiumFeature; //@description The ability to create and use checklist messages premiumFeatureChecklists = PremiumFeature; +//@description The ability to require a payment for incoming messages in new chats +premiumFeaturePaidMessages = PremiumFeature; + //@class BusinessFeature @description Describes a feature available to Business user accounts @@ -8803,6 +8883,9 @@ suggestedActionCustom name:string title:formattedText description:formattedText //@can_be_hidden True, if the suggested action can be hidden using hideSuggestedAction. Otherwise, the user must not be able to use the app without setting up the email address suggestedActionSetLoginEmailAddress can_be_hidden:Bool = SuggestedAction; +//@description Suggests the user to add a passkey for login using addLoginPasskey +suggestedActionAddLoginPasskey = SuggestedAction; + //@description Contains a counter @count Count count count:int32 = Count;