diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b54c29..e94bcb0f 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.68) +### Changed +- Update to [TDLib v1.8.68](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.68). + ## [1.8.67] - 2026-08-27 ### Changed - Update to [TDLib v1.8.67](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.67). diff --git a/Directory.Build.props b/Directory.Build.props index 42e70ae9..b95fa866 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT - 1.8.67 + 1.8.68 diff --git a/Scripts/Get-TlFiles.ps1 b/Scripts/Get-TlFiles.ps1 index 219f72b7..c061e1a6 100644 --- a/Scripts/Get-TlFiles.ps1 +++ b/Scripts/Get-TlFiles.ps1 @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT param( - [string] $CommitHash = 'bc9c263e2bfee06aaab41e82db51a103376030bc', + [string] $CommitHash = 'c15d3f5a5de6e3ba5839822c451152e5e18bb700', [string] $TdApiUrl = "https://github.com/tdlib/td/raw/$CommitHash/td/generate/scheme/td_api.tl", [string] $SourceRoot = "$PSScriptRoot/..", diff --git a/TdLib.Api/Functions/AddBotSecondaryUsername.cs b/TdLib.Api/Functions/AddBotSecondaryUsername.cs new file mode 100644 index 00000000..46fcbc29 --- /dev/null +++ b/TdLib.Api/Functions/AddBotSecondaryUsername.cs @@ -0,0 +1,60 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Adds a secondary username to a bot. Can be called only if userTypeBot.can_be_edited, the bot has no secondary username and the current user has Telegram Premium subscription. + /// May return an error with a message "OWNER_USERNAMES_LIMIT_EXCEEDED" if the current user already owns at least getOption("secondary_bot_username_count_max") bots with a secondary username + /// + public class AddBotSecondaryUsername : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "addBotSecondaryUsername"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the target bot + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("bot_user_id")] + public long BotUserId { get; set; } + + /// + /// The new secondary username; must be non-empty. Use checkBotUsername to check username validness + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("username")] + public string Username { get; set; } + } + + /// + /// Adds a secondary username to a bot. Can be called only if userTypeBot.can_be_edited, the bot has no secondary username and the current user has Telegram Premium subscription. + /// May return an error with a message "OWNER_USERNAMES_LIMIT_EXCEEDED" if the current user already owns at least getOption("secondary_bot_username_count_max") bots with a secondary username + /// + public static Task AddBotSecondaryUsernameAsync( + this IClient client, long botUserId = default, string username = default) + { + return client.ExecuteAsync(new AddBotSecondaryUsername + { + BotUserId = botUserId, Username = username + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/AnswerTonConnectRequest.cs b/TdLib.Api/Functions/AnswerTonConnectRequest.cs new file mode 100644 index 00000000..25a02908 --- /dev/null +++ b/TdLib.Api/Functions/AnswerTonConnectRequest.cs @@ -0,0 +1,72 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Sends an answer for a request received through TON Connect + /// + public class AnswerTonConnectRequest : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "answerTonConnectRequest"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the TON Connect session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + + /// + /// Identifier of the message with the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("message_id")] + public long MessageId { get; set; } + + /// + /// Identifier to trace the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("trace_id")] + public string TraceId { get; set; } + + /// + /// Body of the response + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("body")] + public byte[] Body { get; set; } + } + + /// + /// Sends an answer for a request received through TON Connect + /// + public static Task AnswerTonConnectRequestAsync( + this IClient client, long sessionId = default, long messageId = default, string traceId = default, byte[] body = default) + { + return client.ExecuteAsync(new AnswerTonConnectRequest + { + SessionId = sessionId, MessageId = messageId, TraceId = traceId, Body = body + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/CheckBotUsername.cs b/TdLib.Api/Functions/CheckBotUsername.cs index 0855c388..6e5f9331 100644 --- a/TdLib.Api/Functions/CheckBotUsername.cs +++ b/TdLib.Api/Functions/CheckBotUsername.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Checks whether a username can be set for a new bot. Use checkChatUsername to check username for other chat types + /// Checks whether a username can be set for a new bot or assigned as a secondary username to an existing bot. Use checkChatUsername to check username for other chat types /// public class CheckBotUsername : Function { @@ -33,17 +33,24 @@ public class CheckBotUsername : Function [JsonConverter(typeof(Converter))] [JsonProperty("username")] public string Username { get; set; } + + /// + /// Pass true to check whether the username is suitable as a secondary username for an existing bot; pass false to check whether the username is suitable for createBot + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_secondary")] + public bool IsSecondary { get; set; } } /// - /// Checks whether a username can be set for a new bot. Use checkChatUsername to check username for other chat types + /// Checks whether a username can be set for a new bot or assigned as a secondary username to an existing bot. Use checkChatUsername to check username for other chat types /// public static Task CheckBotUsernameAsync( - this IClient client, string username = default) + this IClient client, string username = default, bool isSecondary = default) { return client.ExecuteAsync(new CheckBotUsername { - Username = username + Username = username, IsSecondary = isSecondary }); } } diff --git a/TdLib.Api/Functions/CheckWalletBotBalance.cs b/TdLib.Api/Functions/CheckWalletBotBalance.cs new file mode 100644 index 00000000..29bd7a32 --- /dev/null +++ b/TdLib.Api/Functions/CheckWalletBotBalance.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 information about balance of the current user in the bot https://t.me/walt; can be used only if getOption("can_use_ton_wallet") + /// + public class CheckWalletBotBalance : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "checkWalletBotBalance"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns information about balance of the current user in the bot https://t.me/walt; can be used only if getOption("can_use_ton_wallet") + /// + public static Task CheckWalletBotBalanceAsync( + this IClient client) + { + return client.ExecuteAsync(new CheckWalletBotBalance + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/ClaimTonConnectRequest.cs b/TdLib.Api/Functions/ClaimTonConnectRequest.cs new file mode 100644 index 00000000..24513c6a --- /dev/null +++ b/TdLib.Api/Functions/ClaimTonConnectRequest.cs @@ -0,0 +1,72 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Claims a request received through TON Connect for processing on this device + /// + public class ClaimTonConnectRequest : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "claimTonConnectRequest"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the TON Connect session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + + /// + /// Identifier of the message with the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("message_id")] + public long MessageId { get; set; } + + /// + /// Identifier of the request assigned by the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("dapp_request_id")] + public string DappRequestId { get; set; } + + /// + /// Pass true to reject the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_rejected")] + public bool IsRejected { get; set; } + } + + /// + /// Claims a request received through TON Connect for processing on this device + /// + public static Task ClaimTonConnectRequestAsync( + this IClient client, long sessionId = default, long messageId = default, string dappRequestId = default, bool isRejected = default) + { + return client.ExecuteAsync(new ClaimTonConnectRequest + { + SessionId = sessionId, MessageId = messageId, DappRequestId = dappRequestId, IsRejected = isRejected + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/CreateBot.cs b/TdLib.Api/Functions/CreateBot.cs index 50654fdb..f64430ec 100644 --- a/TdLib.Api/Functions/CreateBot.cs +++ b/TdLib.Api/Functions/CreateBot.cs @@ -43,7 +43,7 @@ public class CreateBot : Function public string Name { get; set; } /// - /// Username of the bot. The username must end with "bot". Use checkBotUsername to find whether the name is suitable + /// Username of the bot. The username must end with "bot" or a string from updateAllowedBotUsernamePremiumSuffixes case-insensitive. /// [JsonConverter(typeof(Converter))] [JsonProperty("username")] diff --git a/TdLib.Api/Functions/CreateOnRampPaymentSession.cs b/TdLib.Api/Functions/CreateOnRampPaymentSession.cs new file mode 100644 index 00000000..1bb08c8b --- /dev/null +++ b/TdLib.Api/Functions/CreateOnRampPaymentSession.cs @@ -0,0 +1,121 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Creates a session for an on-ramp payment + /// + public class CreateOnRampPaymentSession : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "createOnRampPaymentSession"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the on-ramp provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("provider_id")] + public string ProviderId { get; set; } + + /// + /// The cryptocurrency that will be bought + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency")] + public string Cryptocurrency { get; set; } + + /// + /// Address to which the cryptocurrency will be sent + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("address")] + public string Address { get; set; } + + /// + /// Name of the chosen payment method; pass an empty string if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payment_method_name")] + public string PaymentMethodName { get; set; } + + /// + /// ISO 4217 currency code of the currency that will be used for the purchase; pass an empty string if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency")] + public string BaseCurrency { get; set; } + + /// + /// The amount of the cryptocurrency to buy; pass an empty string if the user selected base_currency_amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency_amount")] + public string CryptocurrencyAmount { get; set; } + + /// + /// The amount of the base currency to spend; pass an empty string if the user selected cryptocurrency_amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency_amount")] + public string BaseCurrencyAmount { get; set; } + + /// + /// Memo for the query; pass an empty string if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("memo")] + public string Memo { get; set; } + + /// + /// Preferred theme for the WebView; pass "light" for a light theme, "dark" for a dark theme, or leave empty for a default theme + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("theme")] + public string Theme { get; set; } + + /// + /// The URL opened on successful payment; pass an empty string if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("success_return_url")] + public string SuccessReturnUrl { get; set; } + + /// + /// The URL opened on failed payment; pass an empty string if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("fail_return_url")] + public string FailReturnUrl { get; set; } + } + + /// + /// Creates a session for an on-ramp payment + /// + public static Task CreateOnRampPaymentSessionAsync( + this IClient client, string providerId = default, string cryptocurrency = default, string address = default, string paymentMethodName = default, string baseCurrency = default, string cryptocurrencyAmount = default, string baseCurrencyAmount = default, string memo = default, string theme = default, string successReturnUrl = default, string failReturnUrl = default) + { + return client.ExecuteAsync(new CreateOnRampPaymentSession + { + ProviderId = providerId, Cryptocurrency = cryptocurrency, Address = address, PaymentMethodName = paymentMethodName, BaseCurrency = baseCurrency, CryptocurrencyAmount = cryptocurrencyAmount, BaseCurrencyAmount = baseCurrencyAmount, Memo = memo, Theme = theme, SuccessReturnUrl = successReturnUrl, FailReturnUrl = failReturnUrl + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/CreateTonConnectSession.cs b/TdLib.Api/Functions/CreateTonConnectSession.cs new file mode 100644 index 00000000..504a3cc9 --- /dev/null +++ b/TdLib.Api/Functions/CreateTonConnectSession.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 + { + /// + /// Creates a TON Connect session; can be used only if getOption("can_use_ton_wallet") + /// + public class CreateTonConnectSession : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "createTonConnectSession"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Hex-encoded public X25519 key of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("dapp_client_id")] + public string DappClientId { get; set; } + + /// + /// URL of the manifest of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("manifest_url")] + public string ManifestUrl { get; set; } + } + + /// + /// Creates a TON Connect session; can be used only if getOption("can_use_ton_wallet") + /// + public static Task CreateTonConnectSessionAsync( + this IClient client, string dappClientId = default, string manifestUrl = default) + { + return client.ExecuteAsync(new CreateTonConnectSession + { + DappClientId = dappClientId, ManifestUrl = manifestUrl + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/CreateUserTonWallet.cs b/TdLib.Api/Functions/CreateUserTonWallet.cs new file mode 100644 index 00000000..ab3423ff --- /dev/null +++ b/TdLib.Api/Functions/CreateUserTonWallet.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 + { + /// + /// Creates a TON wallet for the specified regular user; can be used only if getOption("can_use_ton_wallet"). The current user must have positive TON wallet balance + /// + public class CreateUserTonWallet : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "createUserTonWallet"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the user + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("user_id")] + public long UserId { get; set; } + } + + /// + /// Creates a TON wallet for the specified regular user; can be used only if getOption("can_use_ton_wallet"). The current user must have positive TON wallet balance + /// + public static Task CreateUserTonWalletAsync( + this IClient client, long userId = default) + { + return client.ExecuteAsync(new CreateUserTonWallet + { + UserId = userId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DeleteBotSecondaryUsername.cs b/TdLib.Api/Functions/DeleteBotSecondaryUsername.cs new file mode 100644 index 00000000..635ad671 --- /dev/null +++ b/TdLib.Api/Functions/DeleteBotSecondaryUsername.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 secondary username from a bot. Can be called only if userTypeBot.can_be_edited == true and the bot has a secondary username + /// + public class DeleteBotSecondaryUsername : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "deleteBotSecondaryUsername"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the target bot + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("bot_user_id")] + public long BotUserId { get; set; } + } + + /// + /// Removes a secondary username from a bot. Can be called only if userTypeBot.can_be_edited == true and the bot has a secondary username + /// + public static Task DeleteBotSecondaryUsernameAsync( + this IClient client, long botUserId = default) + { + return client.ExecuteAsync(new DeleteBotSecondaryUsername + { + BotUserId = botUserId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DeleteCommunity.cs b/TdLib.Api/Functions/DeleteCommunity.cs new file mode 100644 index 00000000..1f50ca2d --- /dev/null +++ b/TdLib.Api/Functions/DeleteCommunity.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 + { + /// + /// Deletes a community; requires owner privileges + /// + public class DeleteCommunity : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "deleteCommunity"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the community + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("community_id")] + public long CommunityId { get; set; } + } + + /// + /// Deletes a community; requires owner privileges + /// + public static Task DeleteCommunityAsync( + this IClient client, long communityId = default) + { + return client.ExecuteAsync(new DeleteCommunity + { + CommunityId = communityId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DeleteTonWallet.cs b/TdLib.Api/Functions/DeleteTonWallet.cs new file mode 100644 index 00000000..283f8cb5 --- /dev/null +++ b/TdLib.Api/Functions/DeleteTonWallet.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 + { + /// + /// Deletes the current TON wallet of the user and creates a new one; can be used only if getOption("can_use_ton_wallet") + /// + public class DeleteTonWallet : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "deleteTonWallet"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("password")] + public string Password { get; set; } + } + + /// + /// Deletes the current TON wallet of the user and creates a new one; can be used only if getOption("can_use_ton_wallet") + /// + public static Task DeleteTonWalletAsync( + this IClient client, string password = default) + { + return client.ExecuteAsync(new DeleteTonWallet + { + Password = password + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DisableTonWalletBackup.cs b/TdLib.Api/Functions/DisableTonWalletBackup.cs new file mode 100644 index 00000000..a69be652 --- /dev/null +++ b/TdLib.Api/Functions/DisableTonWalletBackup.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 + { + /// + /// Disables backup of the TON wallet of the user. Works only if tonWalletState.is_backup_enabled is true + /// + public class DisableTonWalletBackup : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "disableTonWalletBackup"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("password")] + public string Password { get; set; } + } + + /// + /// Disables backup of the TON wallet of the user. Works only if tonWalletState.is_backup_enabled is true + /// + public static Task DisableTonWalletBackupAsync( + this IClient client, string password = default) + { + return client.ExecuteAsync(new DisableTonWalletBackup + { + Password = password + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DisableTonWalletBackupWithProof.cs b/TdLib.Api/Functions/DisableTonWalletBackupWithProof.cs new file mode 100644 index 00000000..93b2f711 --- /dev/null +++ b/TdLib.Api/Functions/DisableTonWalletBackupWithProof.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 + { + /// + /// Disables backup of the TON wallet of the user using proof of wallet ownership instead of the password. Works only if tonWalletState.is_backup_enabled is true + /// + public class DisableTonWalletBackupWithProof : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "disableTonWalletBackupWithProof"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Proof of the TON wallet ownership; use getTonWalletOwnershipProofChallenge to get a challenge for the proof + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("proof")] + public TonWalletOwnershipProof Proof { get; set; } + } + + /// + /// Disables backup of the TON wallet of the user using proof of wallet ownership instead of the password. Works only if tonWalletState.is_backup_enabled is true + /// + public static Task DisableTonWalletBackupWithProofAsync( + this IClient client, TonWalletOwnershipProof proof = default) + { + return client.ExecuteAsync(new DisableTonWalletBackupWithProof + { + Proof = proof + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DisconnectTonConnectSession.cs b/TdLib.Api/Functions/DisconnectTonConnectSession.cs new file mode 100644 index 00000000..c474b55d --- /dev/null +++ b/TdLib.Api/Functions/DisconnectTonConnectSession.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 + { + /// + /// Closes a TON Connect session + /// + public class DisconnectTonConnectSession : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "disconnectTonConnectSession"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the TON Connect session to close + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + + /// + /// Encrypted body of the disconnect event; may be empty if the session has already been closed. Use getTonConnectSessionNextEventId to get event identifier for the event + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("body")] + public byte[] Body { get; set; } + } + + /// + /// Closes a TON Connect session + /// + public static Task DisconnectTonConnectSessionAsync( + this IClient client, long sessionId = default, byte[] body = default) + { + return client.ExecuteAsync(new DisconnectTonConnectSession + { + SessionId = sessionId, Body = body + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DismissWebToken.cs b/TdLib.Api/Functions/DismissWebToken.cs new file mode 100644 index 00000000..9e0ea6e0 --- /dev/null +++ b/TdLib.Api/Functions/DismissWebToken.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 + { + /// + /// Dismissess a received web token without consumption; for official Telegram apps only + /// + public class DismissWebToken : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "dismissWebToken"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The token to dismiss + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("token")] + public string Token { get; set; } + } + + /// + /// Dismissess a received web token without consumption; for official Telegram apps only + /// + public static Task DismissWebTokenAsync( + this IClient client, string token = default) + { + return client.ExecuteAsync(new DismissWebToken + { + Token = token + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/EnableTonWalletBackup.cs b/TdLib.Api/Functions/EnableTonWalletBackup.cs new file mode 100644 index 00000000..b86af27b --- /dev/null +++ b/TdLib.Api/Functions/EnableTonWalletBackup.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 + { + /// + /// Enables backup of the TON wallet of the user. Works only if tonWalletState.can_enable_backup is true + /// + public class EnableTonWalletBackup : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "enableTonWalletBackup"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The secret phrase of the user's TON wallet as a space separated list of words + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("secret_phrase")] + public string SecretPhrase { get; set; } + + /// + /// Proof of the TON wallet ownership; use getTonWalletOwnershipProofChallenge to get a challenge for the proof + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("proof")] + public TonWalletOwnershipProof Proof { get; set; } + } + + /// + /// Enables backup of the TON wallet of the user. Works only if tonWalletState.can_enable_backup is true + /// + public static Task EnableTonWalletBackupAsync( + this IClient client, string secretPhrase = default, TonWalletOwnershipProof proof = default) + { + return client.ExecuteAsync(new EnableTonWalletBackup + { + SecretPhrase = secretPhrase, Proof = proof + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetAddressTonWallet.cs b/TdLib.Api/Functions/GetAddressTonWallet.cs new file mode 100644 index 00000000..f6fbee1c --- /dev/null +++ b/TdLib.Api/Functions/GetAddressTonWallet.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 information about a TON wallet with the given address; can be used only if getOption("can_use_ton_wallet") + /// + public class GetAddressTonWallet : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getAddressTonWallet"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Address in the TON blockchain + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("address")] + public string Address { get; set; } + } + + /// + /// Returns information about a TON wallet with the given address; can be used only if getOption("can_use_ton_wallet") + /// + public static Task GetAddressTonWalletAsync( + this IClient client, string address = default) + { + return client.ExecuteAsync(new GetAddressTonWallet + { + Address = address + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/LoadCommunityFullInfo.cs b/TdLib.Api/Functions/GetCommunityFullInfo.cs similarity index 70% rename from TdLib.Api/Functions/LoadCommunityFullInfo.cs rename to TdLib.Api/Functions/GetCommunityFullInfo.cs index ad31434a..fd638b72 100644 --- a/TdLib.Api/Functions/LoadCommunityFullInfo.cs +++ b/TdLib.Api/Functions/GetCommunityFullInfo.cs @@ -11,15 +11,15 @@ namespace TdLib public static partial class TdApi { /// - /// Returns full information about a community. The data will be sent through update. + /// Returns full information about a community /// - public class LoadCommunityFullInfo : Function + public class GetCommunityFullInfo : Function { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "loadCommunityFullInfo"; + public override string DataType { get; set; } = "getCommunityFullInfo"; /// /// Extra data attached to the function @@ -36,12 +36,12 @@ public class LoadCommunityFullInfo : Function } /// - /// Returns full information about a community. The data will be sent through update. + /// Returns full information about a community /// - public static Task LoadCommunityFullInfoAsync( + public static Task GetCommunityFullInfoAsync( this IClient client, long communityId = default) { - return client.ExecuteAsync(new LoadCommunityFullInfo + return client.ExecuteAsync(new GetCommunityFullInfo { CommunityId = communityId }); diff --git a/TdLib.Api/Functions/GetCurrencyExchangeRates.cs b/TdLib.Api/Functions/GetCurrencyExchangeRates.cs new file mode 100644 index 00000000..5f941075 --- /dev/null +++ b/TdLib.Api/Functions/GetCurrencyExchangeRates.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 exchange rates of currencies to USD + /// + public class GetCurrencyExchangeRates : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getCurrencyExchangeRates"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns exchange rates of currencies to USD + /// + public static Task GetCurrencyExchangeRatesAsync( + this IClient client) + { + return client.ExecuteAsync(new GetCurrencyExchangeRates + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetOnRampPaymentAvailability.cs b/TdLib.Api/Functions/GetOnRampPaymentAvailability.cs new file mode 100644 index 00000000..c9486737 --- /dev/null +++ b/TdLib.Api/Functions/GetOnRampPaymentAvailability.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 the available on-ramp payment methods based on the current user location + /// + public class GetOnRampPaymentAvailability : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getOnRampPaymentAvailability"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the on-ramp provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("provider_id")] + public string ProviderId { get; set; } + + /// + /// The cryptocurrency that will be bought + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency")] + public string Cryptocurrency { get; set; } + + /// + /// ISO 4217 currency code of the currency that will be used for the purchase; pass an empty string if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency")] + public string BaseCurrency { get; set; } + } + + /// + /// Returns the available on-ramp payment methods based on the current user location + /// + public static Task GetOnRampPaymentAvailabilityAsync( + this IClient client, string providerId = default, string cryptocurrency = default, string baseCurrency = default) + { + return client.ExecuteAsync(new GetOnRampPaymentAvailability + { + ProviderId = providerId, Cryptocurrency = cryptocurrency, BaseCurrency = baseCurrency + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetOnRampPaymentLimits.cs b/TdLib.Api/Functions/GetOnRampPaymentLimits.cs new file mode 100644 index 00000000..0e291a00 --- /dev/null +++ b/TdLib.Api/Functions/GetOnRampPaymentLimits.cs @@ -0,0 +1,72 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns the limits for an on-ramp payment; only for providers that supports limits retrieval + /// + public class GetOnRampPaymentLimits : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getOnRampPaymentLimits"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the on-ramp provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("provider_id")] + public string ProviderId { get; set; } + + /// + /// The cryptocurrency that will be bought + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency")] + public string Cryptocurrency { get; set; } + + /// + /// ISO 4217 currency code of the currency that will be used for the purchase + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency")] + public string BaseCurrency { get; set; } + + /// + /// Name of the chosen payment method; pass an empty string if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payment_method_name")] + public string PaymentMethodName { get; set; } + } + + /// + /// Returns the limits for an on-ramp payment; only for providers that supports limits retrieval + /// + public static Task GetOnRampPaymentLimitsAsync( + this IClient client, string providerId = default, string cryptocurrency = default, string baseCurrency = default, string paymentMethodName = default) + { + return client.ExecuteAsync(new GetOnRampPaymentLimits + { + ProviderId = providerId, Cryptocurrency = cryptocurrency, BaseCurrency = baseCurrency, PaymentMethodName = paymentMethodName + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetOnRampPaymentQuote.cs b/TdLib.Api/Functions/GetOnRampPaymentQuote.cs new file mode 100644 index 00000000..18f51229 --- /dev/null +++ b/TdLib.Api/Functions/GetOnRampPaymentQuote.cs @@ -0,0 +1,86 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns a quote for an on-ramp payment; only for providers that supports quote retrieval + /// + public class GetOnRampPaymentQuote : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getOnRampPaymentQuote"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the on-ramp provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("provider_id")] + public string ProviderId { get; set; } + + /// + /// The cryptocurrency that will be bought + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency")] + public string Cryptocurrency { get; set; } + + /// + /// ISO 4217 currency code of the currency that will be used for the purchase + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency")] + public string BaseCurrency { get; set; } + + /// + /// The amount of the cryptocurrency to buy; pass an empty string if the user selected base_currency_amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency_amount")] + public string CryptocurrencyAmount { get; set; } + + /// + /// The amount of the base currency to spend; pass an empty string if the user selected cryptocurrency_amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency_amount")] + public string BaseCurrencyAmount { get; set; } + + /// + /// Name of the chosen payment method; pass an empty string if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payment_method_name")] + public string PaymentMethodName { get; set; } + } + + /// + /// Returns a quote for an on-ramp payment; only for providers that supports quote retrieval + /// + public static Task GetOnRampPaymentQuoteAsync( + this IClient client, string providerId = default, string cryptocurrency = default, string baseCurrency = default, string cryptocurrencyAmount = default, string baseCurrencyAmount = default, string paymentMethodName = default) + { + return client.ExecuteAsync(new GetOnRampPaymentQuote + { + ProviderId = providerId, Cryptocurrency = cryptocurrency, BaseCurrency = baseCurrency, CryptocurrencyAmount = cryptocurrencyAmount, BaseCurrencyAmount = baseCurrencyAmount, PaymentMethodName = paymentMethodName + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetOnRampProviderBaseCurrencies.cs b/TdLib.Api/Functions/GetOnRampProviderBaseCurrencies.cs new file mode 100644 index 00000000..0bc56c42 --- /dev/null +++ b/TdLib.Api/Functions/GetOnRampProviderBaseCurrencies.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 + { + /// + /// Returns the list of fiat currencies supported by an on-ramp provider for the given cryptocurrency + /// + public class GetOnRampProviderBaseCurrencies : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getOnRampProviderBaseCurrencies"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the on-ramp provider; only for providers that supports base currencies + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("provider_id")] + public string ProviderId { get; set; } + + /// + /// The cryptocurrency that will be bought + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency")] + public string Cryptocurrency { get; set; } + } + + /// + /// Returns the list of fiat currencies supported by an on-ramp provider for the given cryptocurrency + /// + public static Task GetOnRampProviderBaseCurrenciesAsync( + this IClient client, string providerId = default, string cryptocurrency = default) + { + return client.ExecuteAsync(new GetOnRampProviderBaseCurrencies + { + ProviderId = providerId, Cryptocurrency = cryptocurrency + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetOnRampProviders.cs b/TdLib.Api/Functions/GetOnRampProviders.cs new file mode 100644 index 00000000..c4b92746 --- /dev/null +++ b/TdLib.Api/Functions/GetOnRampProviders.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 available on-ramp providers + /// + public class GetOnRampProviders : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getOnRampProviders"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Pass a cryptocurrency to receive only providers that support it; pass an empty string to receive all providers + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency")] + public string Cryptocurrency { get; set; } + } + + /// + /// Returns available on-ramp providers + /// + public static Task GetOnRampProvidersAsync( + this IClient client, string cryptocurrency = default) + { + return client.ExecuteAsync(new GetOnRampProviders + { + Cryptocurrency = cryptocurrency + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTextEntities.cs b/TdLib.Api/Functions/GetTextEntities.cs index 7e40f955..2a60283c 100644 --- a/TdLib.Api/Functions/GetTextEntities.cs +++ b/TdLib.Api/Functions/GetTextEntities.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously + /// Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, TON blockchain addresses, URLs, and email addresses) found in the text. Can be called synchronously /// public class GetTextEntities : Function { @@ -36,7 +36,7 @@ public class GetTextEntities : Function } /// - /// Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously + /// Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, TON blockchain addresses, URLs, and email addresses) found in the text. Can be called synchronously /// public static Task GetTextEntitiesAsync( this IClient client, string text = default) diff --git a/TdLib.Api/Functions/GetTonCenterStreamingApiUrl.cs b/TdLib.Api/Functions/GetTonCenterStreamingApiUrl.cs new file mode 100644 index 00000000..3b7f6cc2 --- /dev/null +++ b/TdLib.Api/Functions/GetTonCenterStreamingApiUrl.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 a URL for TON Center Streaming API + /// + public class GetTonCenterStreamingApiUrl : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonCenterStreamingApiUrl"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns a URL for TON Center Streaming API + /// + public static Task GetTonCenterStreamingApiUrlAsync( + this IClient client) + { + return client.ExecuteAsync(new GetTonCenterStreamingApiUrl + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonConnectDAppPendingRequests.cs b/TdLib.Api/Functions/GetTonConnectDAppPendingRequests.cs new file mode 100644 index 00000000..e0aa2939 --- /dev/null +++ b/TdLib.Api/Functions/GetTonConnectDAppPendingRequests.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 pending requests with a dApp through TON Connect + /// + public class GetTonConnectDAppPendingRequests : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonConnectDAppPendingRequests"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Hex-encoded public X25519 key of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("dapp_client_id")] + public string DappClientId { get; set; } + } + + /// + /// Returns pending requests with a dApp through TON Connect + /// + public static Task GetTonConnectDAppPendingRequestsAsync( + this IClient client, string dappClientId = default) + { + return client.ExecuteAsync(new GetTonConnectDAppPendingRequests + { + DappClientId = dappClientId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonConnectSessionNextEventId.cs b/TdLib.Api/Functions/GetTonConnectSessionNextEventId.cs new file mode 100644 index 00000000..9617e6e3 --- /dev/null +++ b/TdLib.Api/Functions/GetTonConnectSessionNextEventId.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 the next event identifier for the given TON Connect session + /// + public class GetTonConnectSessionNextEventId : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonConnectSessionNextEventId"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the TON Connect session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + } + + /// + /// Returns the next event identifier for the given TON Connect session + /// + public static Task GetTonConnectSessionNextEventIdAsync( + this IClient client, long sessionId = default) + { + return client.ExecuteAsync(new GetTonConnectSessionNextEventId + { + SessionId = sessionId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonConnectSessionPendingRequests.cs b/TdLib.Api/Functions/GetTonConnectSessionPendingRequests.cs new file mode 100644 index 00000000..1864dbab --- /dev/null +++ b/TdLib.Api/Functions/GetTonConnectSessionPendingRequests.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 pending requests in a TON Connect session + /// + public class GetTonConnectSessionPendingRequests : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonConnectSessionPendingRequests"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + } + + /// + /// Returns pending requests in a TON Connect session + /// + public static Task GetTonConnectSessionPendingRequestsAsync( + this IClient client, long sessionId = default) + { + return client.ExecuteAsync(new GetTonConnectSessionPendingRequests + { + SessionId = sessionId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonConnectSessions.cs b/TdLib.Api/Functions/GetTonConnectSessions.cs new file mode 100644 index 00000000..dcd9f2d0 --- /dev/null +++ b/TdLib.Api/Functions/GetTonConnectSessions.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 active TON Connect sessions; can be used only if getOption("can_use_ton_wallet") + /// + public class GetTonConnectSessions : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonConnectSessions"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns active TON Connect sessions; can be used only if getOption("can_use_ton_wallet") + /// + public static Task GetTonConnectSessionsAsync( + this IClient client) + { + return client.ExecuteAsync(new GetTonConnectSessions + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonTransactions.cs b/TdLib.Api/Functions/GetTonTransactions.cs index 3102255a..a3a19fb2 100644 --- a/TdLib.Api/Functions/GetTonTransactions.cs +++ b/TdLib.Api/Functions/GetTonTransactions.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Returns the list of TON blockchain transactions of the current user + /// Returns the list of TON Gram transactions of the current user /// public class GetTonTransactions : Function { @@ -50,7 +50,7 @@ public class GetTonTransactions : Function } /// - /// Returns the list of TON blockchain transactions of the current user + /// Returns the list of TON Gram transactions of the current user /// public static Task GetTonTransactionsAsync( this IClient client, TransactionDirection direction = default, string offset = default, int limit = default) diff --git a/TdLib.Api/Functions/GetTonWalletNfts.cs b/TdLib.Api/Functions/GetTonWalletNfts.cs new file mode 100644 index 00000000..0ac65c6a --- /dev/null +++ b/TdLib.Api/Functions/GetTonWalletNfts.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 + { + /// + /// Returns NFTs stored on the TON wallet of the user; can be used only if getOption("can_use_ton_wallet") + /// + public class GetTonWalletNfts : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonWalletNfts"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("offset")] + public string Offset { get; set; } + + /// + /// The maximum number of NFTs to be returned; must be positive and can't be greater than 20 + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("limit")] + public int Limit { get; set; } + } + + /// + /// Returns NFTs stored on the TON wallet of the user; can be used only if getOption("can_use_ton_wallet") + /// + public static Task GetTonWalletNftsAsync( + this IClient client, string offset = default, int limit = default) + { + return client.ExecuteAsync(new GetTonWalletNfts + { + Offset = offset, Limit = limit + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonWalletOwnershipProofChallenge.cs b/TdLib.Api/Functions/GetTonWalletOwnershipProofChallenge.cs new file mode 100644 index 00000000..ed7d45f7 --- /dev/null +++ b/TdLib.Api/Functions/GetTonWalletOwnershipProofChallenge.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 a challenge which may be used to proof ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") + /// + public class GetTonWalletOwnershipProofChallenge : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonWalletOwnershipProofChallenge"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Returns a challenge which may be used to proof ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") + /// + public static Task GetTonWalletOwnershipProofChallengeAsync( + this IClient client) + { + return client.ExecuteAsync(new GetTonWalletOwnershipProofChallenge + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonWalletSecretPhrase.cs b/TdLib.Api/Functions/GetTonWalletSecretPhrase.cs new file mode 100644 index 00000000..1ff11ee7 --- /dev/null +++ b/TdLib.Api/Functions/GetTonWalletSecretPhrase.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 the secret phrase of the user's TON wallet as a space separated list of words. Works only if tonWalletState.can_export_phrase is true + /// + public class GetTonWalletSecretPhrase : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonWalletSecretPhrase"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("password")] + public string Password { get; set; } + } + + /// + /// Returns the secret phrase of the user's TON wallet as a space separated list of words. Works only if tonWalletState.can_export_phrase is true + /// + public static Task GetTonWalletSecretPhraseAsync( + this IClient client, string password = default) + { + return client.ExecuteAsync(new GetTonWalletSecretPhrase + { + Password = password + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonWalletTransaction.cs b/TdLib.Api/Functions/GetTonWalletTransaction.cs new file mode 100644 index 00000000..b659db54 --- /dev/null +++ b/TdLib.Api/Functions/GetTonWalletTransaction.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 a TON wallet transaction by their identifier + /// + public class GetTonWalletTransaction : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonWalletTransaction"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("transaction_id")] + public string TransactionId { get; set; } + } + + /// + /// Returns a TON wallet transaction by their identifier + /// + public static Task GetTonWalletTransactionAsync( + this IClient client, string transactionId = default) + { + return client.ExecuteAsync(new GetTonWalletTransaction + { + TransactionId = transactionId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonWalletTransactionByMsgHash.cs b/TdLib.Api/Functions/GetTonWalletTransactionByMsgHash.cs new file mode 100644 index 00000000..3da25024 --- /dev/null +++ b/TdLib.Api/Functions/GetTonWalletTransactionByMsgHash.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 a TON wallet transaction by their msg_hash; return an error if the transaction isn't finalized yet + /// + public class GetTonWalletTransactionByMsgHash : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonWalletTransactionByMsgHash"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Value of msg_hash of the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("msg_hash")] + public string MsgHash { get; set; } + } + + /// + /// Returns a TON wallet transaction by their msg_hash; return an error if the transaction isn't finalized yet + /// + public static Task GetTonWalletTransactionByMsgHashAsync( + this IClient client, string msgHash = default) + { + return client.ExecuteAsync(new GetTonWalletTransactionByMsgHash + { + MsgHash = msgHash + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonWalletTransactions.cs b/TdLib.Api/Functions/GetTonWalletTransactions.cs new file mode 100644 index 00000000..b5e20e4d --- /dev/null +++ b/TdLib.Api/Functions/GetTonWalletTransactions.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 the list of TON wallet transactions of the current user; can be used only if getOption("can_use_ton_wallet") + /// + public class GetTonWalletTransactions : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonWalletTransactions"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Direction of the transactions to receive; pass null to get all transactions + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("direction")] + public TransactionDirection Direction { get; set; } + + /// + /// Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("offset")] + public string Offset { get; set; } + + /// + /// The maximum number of transactions to return + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("limit")] + public int Limit { get; set; } + } + + /// + /// Returns the list of TON wallet transactions of the current user; can be used only if getOption("can_use_ton_wallet") + /// + public static Task GetTonWalletTransactionsAsync( + this IClient client, TransactionDirection direction = default, string offset = default, int limit = default) + { + return client.ExecuteAsync(new GetTonWalletTransactions + { + Direction = direction, Offset = offset, Limit = limit + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetUserTonWalletAddresses.cs b/TdLib.Api/Functions/GetUserTonWalletAddresses.cs new file mode 100644 index 00000000..5171bd17 --- /dev/null +++ b/TdLib.Api/Functions/GetUserTonWalletAddresses.cs @@ -0,0 +1,50 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Returns TON wallet addresses of the specified users; can be used only if getOption("can_use_ton_wallet") + /// + public class GetUserTonWalletAddresses : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getUserTonWalletAddresses"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifiers of the users whose wallet addresses have to be returned. If a user has no TON wallet, it will be skipped in the result + /// + [JsonProperty("user_ids", ItemConverterType = typeof(Converter))] + public long[] UserIds { get; set; } + } + + /// + /// Returns TON wallet addresses of the specified users; can be used only if getOption("can_use_ton_wallet") + /// + public static Task GetUserTonWalletAddressesAsync( + this IClient client, long[] userIds = default) + { + return client.ExecuteAsync(new GetUserTonWalletAddresses + { + UserIds = userIds + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/LoadTonWalletGaslessTransfersInfo.cs b/TdLib.Api/Functions/LoadTonWalletGaslessTransfersInfo.cs new file mode 100644 index 00000000..2520f8e1 --- /dev/null +++ b/TdLib.Api/Functions/LoadTonWalletGaslessTransfersInfo.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 + { + /// + /// Loads or reloads the current state of gasless transfers for the current user; can be used only if getOption("can_use_ton_wallet") + /// + public class LoadTonWalletGaslessTransfersInfo : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "loadTonWalletGaslessTransfersInfo"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Loads or reloads the current state of gasless transfers for the current user; can be used only if getOption("can_use_ton_wallet") + /// + public static Task LoadTonWalletGaslessTransfersInfoAsync( + this IClient client) + { + return client.ExecuteAsync(new LoadTonWalletGaslessTransfersInfo + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/LoadTonWalletState.cs b/TdLib.Api/Functions/LoadTonWalletState.cs new file mode 100644 index 00000000..f6eac571 --- /dev/null +++ b/TdLib.Api/Functions/LoadTonWalletState.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 + { + /// + /// Loads state of the TON wallet of the current user; can be used only if getOption("can_use_ton_wallet") + /// + public class LoadTonWalletState : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "loadTonWalletState"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + + } + + /// + /// Loads state of the TON wallet of the current user; can be used only if getOption("can_use_ton_wallet") + /// + public static Task LoadTonWalletStateAsync( + this IClient client) + { + return client.ExecuteAsync(new LoadTonWalletState + { + + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/ReplaceTonWallet.cs b/TdLib.Api/Functions/ReplaceTonWallet.cs new file mode 100644 index 00000000..98c6308b --- /dev/null +++ b/TdLib.Api/Functions/ReplaceTonWallet.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 + { + /// + /// Replaces the current TON wallet with another existing v6r2 wallet or changes private key of the current TON wallet; can be used only if getOption("can_use_ton_wallet") + /// + public class ReplaceTonWallet : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "replaceTonWallet"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("password")] + public string Password { get; set; } + + /// + /// Original public key of the new TON wallet + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("anchor_public_key")] + public byte[] AnchorPublicKey { get; set; } + + /// + /// Proof of ownership of the new private key of the TON wallet; use getTonWalletOwnershipProofChallenge to get a challenge for the proof + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("proof")] + public TonWalletOwnershipProof Proof { get; set; } + } + + /// + /// Replaces the current TON wallet with another existing v6r2 wallet or changes private key of the current TON wallet; can be used only if getOption("can_use_ton_wallet") + /// + public static Task ReplaceTonWalletAsync( + this IClient client, string password = default, byte[] anchorPublicKey = default, TonWalletOwnershipProof proof = default) + { + return client.ExecuteAsync(new ReplaceTonWallet + { + Password = password, AnchorPublicKey = anchorPublicKey, Proof = proof + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/EditCallbackQueryMessage.cs b/TdLib.Api/Functions/ReplyToCallbackQueryWithEphemeralMessage.cs similarity index 61% rename from TdLib.Api/Functions/EditCallbackQueryMessage.cs rename to TdLib.Api/Functions/ReplyToCallbackQueryWithEphemeralMessage.cs index 01f3fbf9..052e4591 100644 --- a/TdLib.Api/Functions/EditCallbackQueryMessage.cs +++ b/TdLib.Api/Functions/ReplyToCallbackQueryWithEphemeralMessage.cs @@ -11,15 +11,15 @@ namespace TdLib public static partial class TdApi { /// - /// Edits the message from which a callback query has originated with an ephemeral message; for bots only + /// Replies to a callback query with an ephemeral message; for bots only /// - public class EditCallbackQueryMessage : Function + public class ReplyToCallbackQueryWithEphemeralMessage : Function { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "editCallbackQueryMessage"; + public override string DataType { get; set; } = "replyToCallbackQueryWithEphemeralMessage"; /// /// Extra data attached to the function @@ -34,6 +34,13 @@ public class EditCallbackQueryMessage : Function [JsonProperty("callback_query_id")] public long CallbackQueryId { get; set; } + /// + /// Pass true if the ephemeral message must replace the message from which the callback query originated + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("replace_callback_query_message")] + public bool ReplaceCallbackQueryMessage { get; set; } + /// /// Pass true if the content of the message must be protected from forwarding and saving /// @@ -50,7 +57,6 @@ public class EditCallbackQueryMessage : Function /// /// New content of the message. Must be one of the following types: inputMessageText, inputMessageAnimation, - /// inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] @@ -58,14 +64,14 @@ public class EditCallbackQueryMessage : Function } /// - /// Edits the message from which a callback query has originated with an ephemeral message; for bots only + /// Replies to a callback query with an ephemeral message; for bots only /// - public static Task EditCallbackQueryMessageAsync( - this IClient client, long callbackQueryId = default, bool protectContent = default, ReplyMarkup replyMarkup = default, InputMessageContent inputMessageContent = default) + public static Task ReplyToCallbackQueryWithEphemeralMessageAsync( + this IClient client, long callbackQueryId = default, bool replaceCallbackQueryMessage = default, bool protectContent = default, ReplyMarkup replyMarkup = default, InputMessageContent inputMessageContent = default) { - return client.ExecuteAsync(new EditCallbackQueryMessage + return client.ExecuteAsync(new ReplyToCallbackQueryWithEphemeralMessage { - CallbackQueryId = callbackQueryId, ProtectContent = protectContent, ReplyMarkup = replyMarkup, InputMessageContent = inputMessageContent + CallbackQueryId = callbackQueryId, ReplaceCallbackQueryMessage = replaceCallbackQueryMessage, ProtectContent = protectContent, ReplyMarkup = replyMarkup, InputMessageContent = inputMessageContent }); } } diff --git a/TdLib.Api/Functions/ReportChat.cs b/TdLib.Api/Functions/ReportChat.cs index 602e5404..605cb5e2 100644 --- a/TdLib.Api/Functions/ReportChat.cs +++ b/TdLib.Api/Functions/ReportChat.cs @@ -11,7 +11,7 @@ namespace TdLib public static partial class TdApi { /// - /// Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported + /// Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, if chat.can_be_reported, or if messageProperties.can_report_chat /// public class ReportChat : Function { @@ -56,7 +56,7 @@ public class ReportChat : Function } /// - /// Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported + /// Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, if chat.can_be_reported, or if messageProperties.can_report_chat /// public static Task ReportChatAsync( this IClient client, long chatId = default, byte[] optionId = default, long[] messageIds = default, string text = default) diff --git a/TdLib.Api/Functions/SendTonCenterApiRequest.cs b/TdLib.Api/Functions/SendTonCenterApiRequest.cs new file mode 100644 index 00000000..5d59a980 --- /dev/null +++ b/TdLib.Api/Functions/SendTonCenterApiRequest.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 + { + /// + /// Sends a request to TON Center API and returns its response in JSON format + /// + public class SendTonCenterApiRequest : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "sendTonCenterApiRequest"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The path of the requested endpoint. See https://toncenter.com/api/v3/index.html for the list of supported endpoints + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("endpoint")] + public string Endpoint { get; set; } + + /// + /// Type of the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("type")] + public TonCenterApiRequestType Type { get; set; } + } + + /// + /// Sends a request to TON Center API and returns its response in JSON format + /// + public static Task SendTonCenterApiRequestAsync( + this IClient client, string endpoint = default, TonCenterApiRequestType type = default) + { + return client.ExecuteAsync(new SendTonCenterApiRequest + { + Endpoint = endpoint, Type = type + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/SendTonConnectSessionConnectResult.cs b/TdLib.Api/Functions/SendTonConnectSessionConnectResult.cs new file mode 100644 index 00000000..1ba84eda --- /dev/null +++ b/TdLib.Api/Functions/SendTonConnectSessionConnectResult.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 + { + /// + /// Accepts or rejects a TON Connect session + /// + public class SendTonConnectSessionConnectResult : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "sendTonConnectSessionConnectResult"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + + /// + /// Answer to the challenge received from setTonConnectSessionWalletClientId + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("challenge_answer")] + public byte[] ChallengeAnswer { get; set; } + + /// + /// Pass true to reject the request; pass false to accept it + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_error")] + public bool IsError { get; set; } + + /// + /// Body of the result + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("body")] + public byte[] Body { get; set; } + + /// + /// Identifier to trace the connection request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("trace_id")] + public string TraceId { get; set; } + } + + /// + /// Accepts or rejects a TON Connect session + /// + public static Task SendTonConnectSessionConnectResultAsync( + this IClient client, long sessionId = default, byte[] challengeAnswer = default, bool isError = default, byte[] body = default, string traceId = default) + { + return client.ExecuteAsync(new SendTonConnectSessionConnectResult + { + SessionId = sessionId, ChallengeAnswer = challengeAnswer, IsError = isError, Body = body, TraceId = traceId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/SendTonWalletTransfer.cs b/TdLib.Api/Functions/SendTonWalletTransfer.cs new file mode 100644 index 00000000..d223e87b --- /dev/null +++ b/TdLib.Api/Functions/SendTonWalletTransfer.cs @@ -0,0 +1,101 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Sends a cryptocurrency from the user's TON wallet; can be used only if getOption("can_use_ton_wallet") + /// + public class SendTonWalletTransfer : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "sendTonWalletTransfer"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the user who will receive the transfer; pass 0 if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("user_id")] + public long UserId { get; set; } + + /// + /// Address in the TON blockchain of the transaction peer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("address")] + public string Address { get; set; } + + /// + /// The amount of the sent cryptocurrency, in the smallest units of the cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("amount")] + public long Amount { get; set; } + + /// + /// Comment added to the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("comment")] + public string Comment { get; set; } + + /// + /// Pass true if the comment is encrypted and must be decrypted using the receiver's or sender's private key + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_comment_encrypted")] + public bool IsCommentEncrypted { get; set; } + + /// + /// Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("sending_id")] + public int SendingId { get; set; } + + /// + /// Serialized data for regular cryptocurrency transfer request. The minimum allowed transfer amount is getOption("ton_wallet_transfer_amount_min") + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("regular_transfer_data")] + public byte[] RegularTransferData { get; set; } + + /// + /// Serialized data for gasless cryptocurrency transfer request; pass an empty string to force a regular request. + /// The minimum allowed transfer amount for a gassless transfer is getOption("ton_wallet_gasless_transfer_amount_min") + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gasless_transfer_data")] + public byte[] GaslessTransferData { get; set; } + } + + /// + /// Sends a cryptocurrency from the user's TON wallet; can be used only if getOption("can_use_ton_wallet") + /// + public static Task SendTonWalletTransferAsync( + this IClient client, long userId = default, string address = default, long amount = default, string comment = default, bool isCommentEncrypted = default, int sendingId = default, byte[] regularTransferData = default, byte[] gaslessTransferData = default) + { + return client.ExecuteAsync(new SendTonWalletTransfer + { + UserId = userId, Address = address, Amount = amount, Comment = comment, IsCommentEncrypted = isCommentEncrypted, SendingId = sendingId, RegularTransferData = regularTransferData, GaslessTransferData = gaslessTransferData + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/SetCommunityPermissions.cs b/TdLib.Api/Functions/SetCommunityPermissions.cs new file mode 100644 index 00000000..54798722 --- /dev/null +++ b/TdLib.Api/Functions/SetCommunityPermissions.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 + { + /// + /// Changes permissions of regular members in the given community; requires can_ban_members administrator right in the community + /// + public class SetCommunityPermissions : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "setCommunityPermissions"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the community + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("community_id")] + public long CommunityId { get; set; } + + /// + /// New permissions of the community + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("permissions")] + public CommunityPermissions Permissions { get; set; } + } + + /// + /// Changes permissions of regular members in the given community; requires can_ban_members administrator right in the community + /// + public static Task SetCommunityPermissionsAsync( + this IClient client, long communityId = default, CommunityPermissions permissions = default) + { + return client.ExecuteAsync(new SetCommunityPermissions + { + CommunityId = communityId, Permissions = permissions + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/SetCommunityPhoto.cs b/TdLib.Api/Functions/SetCommunityPhoto.cs new file mode 100644 index 00000000..5ae81663 --- /dev/null +++ b/TdLib.Api/Functions/SetCommunityPhoto.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 + { + /// + /// Changes the photo of a community; requires can_change_info administrator right in the community + /// + public class SetCommunityPhoto : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "setCommunityPhoto"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the community + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("community_id")] + public long CommunityId { get; set; } + + /// + /// New chat photo; pass null to delete the chat photo + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("photo")] + public InputChatPhoto Photo { get; set; } + } + + /// + /// Changes the photo of a community; requires can_change_info administrator right in the community + /// + public static Task SetCommunityPhotoAsync( + this IClient client, long communityId = default, InputChatPhoto photo = default) + { + return client.ExecuteAsync(new SetCommunityPhoto + { + CommunityId = communityId, Photo = photo + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/SetMessageSenderBotVerification.cs b/TdLib.Api/Functions/SetMessageSenderBotVerification.cs index 2f7b40ae..ff548136 100644 --- a/TdLib.Api/Functions/SetMessageSenderBotVerification.cs +++ b/TdLib.Api/Functions/SetMessageSenderBotVerification.cs @@ -42,18 +42,18 @@ public class SetMessageSenderBotVerification : Function public MessageSender VerifiedId { get; set; } /// - /// Custom description of verification reason; 0-getOption("bot_verification_custom_description_length_max"). + /// Custom description of verification reason; 0-getOption("bot_verification_custom_description_length_max") characters. Only TextUrl entities are supported. /// [JsonConverter(typeof(Converter))] [JsonProperty("custom_description")] - public string CustomDescription { get; set; } + public FormattedText CustomDescription { get; set; } } /// /// Changes the verification status of a user or a chat by an owned bot /// public static Task SetMessageSenderBotVerificationAsync( - this IClient client, long botUserId = default, MessageSender verifiedId = default, string customDescription = default) + this IClient client, long botUserId = default, MessageSender verifiedId = default, FormattedText customDescription = default) { return client.ExecuteAsync(new SetMessageSenderBotVerification { diff --git a/TdLib.Api/Functions/SetTonConnectSessionWalletClientId.cs b/TdLib.Api/Functions/SetTonConnectSessionWalletClientId.cs new file mode 100644 index 00000000..61b29d15 --- /dev/null +++ b/TdLib.Api/Functions/SetTonConnectSessionWalletClientId.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 + { + /// + /// Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session + /// + public class SetTonConnectSessionWalletClientId : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "setTonConnectSessionWalletClientId"; + + /// + /// Extra data attached to the function + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + + /// + /// Hex-encoded public X25519 key of the current user's application calculated from the TON wallet private key and session parameters + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("wallet_client_id")] + public string WalletClientId { get; set; } + } + + /// + /// Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session + /// + public static Task SetTonConnectSessionWalletClientIdAsync( + this IClient client, long sessionId = default, string walletClientId = default) + { + return client.ExecuteAsync(new SetTonConnectSessionWalletClientId + { + SessionId = sessionId, WalletClientId = walletClientId + }); + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/AnimatedEmoji.cs b/TdLib.Api/Objects/AnimatedEmoji.cs index dc9d1b4f..ac6d7f25 100644 --- a/TdLib.Api/Objects/AnimatedEmoji.cs +++ b/TdLib.Api/Objects/AnimatedEmoji.cs @@ -60,6 +60,13 @@ public partial class AnimatedEmoji : Object [JsonConverter(typeof(Converter))] [JsonProperty("sound")] public File Sound { get; set; } + + /// + /// True, if the emoji is a regular emoji + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_regular_emoji")] + public bool IsRegularEmoji { get; set; } } } } diff --git a/TdLib.Api/Objects/BotVerification.cs b/TdLib.Api/Objects/BotVerification.cs index d7d4fb20..992245c0 100644 --- a/TdLib.Api/Objects/BotVerification.cs +++ b/TdLib.Api/Objects/BotVerification.cs @@ -41,7 +41,7 @@ public partial class BotVerification : Object public long IconCustomEmojiId { get; set; } /// - /// Custom description of verification reason set by the bot. Can contain only Mention, Hashtag, Cashtag, PhoneNumber, BankCardNumber, Url, and EmailAddress entities + /// Custom description of verification reason set by the bot. Can contain only Mention, Hashtag, Cashtag, PhoneNumber, BankCardNumber, TonAddress, Url, and EmailAddress entities /// [JsonConverter(typeof(Converter))] [JsonProperty("custom_description")] diff --git a/TdLib.Api/Objects/ChatEventHasProtectedContentToggled.cs b/TdLib.Api/Objects/ChatEventHasProtectedContentToggled.cs index f87c9526..2aa759a5 100644 --- a/TdLib.Api/Objects/ChatEventHasProtectedContentToggled.cs +++ b/TdLib.Api/Objects/ChatEventHasProtectedContentToggled.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class ChatEventAction : Object { /// - /// The has_protected_content setting of a channel was toggled + /// The has_protected_content setting of a chat was toggled /// public class ChatEventHasProtectedContentToggled : ChatEventAction { diff --git a/TdLib.Api/Objects/ChatEventIsForumToggled.cs b/TdLib.Api/Objects/ChatEventIsForumToggled.cs index dd524333..f5c28071 100644 --- a/TdLib.Api/Objects/ChatEventIsForumToggled.cs +++ b/TdLib.Api/Objects/ChatEventIsForumToggled.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class ChatEventAction : Object { /// - /// The is_forum setting of a channel was toggled + /// The is_forum setting of a supergroup was toggled /// public class ChatEventIsForumToggled : ChatEventAction { diff --git a/TdLib.Api/Objects/ChatInviteLink.cs b/TdLib.Api/Objects/ChatInviteLink.cs index 60ede0e2..b831635b 100644 --- a/TdLib.Api/Objects/ChatInviteLink.cs +++ b/TdLib.Api/Objects/ChatInviteLink.cs @@ -111,7 +111,7 @@ public partial class ChatInviteLink : Object public bool CreatesJoinRequest { get; set; } /// - /// True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time + /// True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. Primary link can create join requests only if this is set up using toggleSupergroupJoinByRequest. /// [JsonConverter(typeof(Converter))] [JsonProperty("is_primary")] diff --git a/TdLib.Api/Objects/ChatRevenueStatistics.cs b/TdLib.Api/Objects/ChatRevenueStatistics.cs index edec1c82..bbcfeee9 100644 --- a/TdLib.Api/Objects/ChatRevenueStatistics.cs +++ b/TdLib.Api/Objects/ChatRevenueStatistics.cs @@ -48,7 +48,7 @@ public partial class ChatRevenueStatistics : Object public ChatRevenueAmount RevenueAmount { get; set; } /// - /// Current conversion rate of the cryptocurrency in which revenue is calculated to USD + /// Current exchange rate of the cryptocurrency in which revenue is calculated to USD /// [JsonConverter(typeof(Converter))] [JsonProperty("usd_rate")] diff --git a/TdLib.Api/Objects/Currencies.cs b/TdLib.Api/Objects/Currencies.cs new file mode 100644 index 00000000..907f1a67 --- /dev/null +++ b/TdLib.Api/Objects/Currencies.cs @@ -0,0 +1,37 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a list of currencies + /// + public partial class Currencies : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "currencies"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// A list of ISO 4217 currency codes + /// + [JsonProperty("currencies", ItemConverterType = typeof(Converter))] + public string[] Currencies_ { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/CurrencyExchangeRate.cs b/TdLib.Api/Objects/CurrencyExchangeRate.cs new file mode 100644 index 00000000..c7aeea15 --- /dev/null +++ b/TdLib.Api/Objects/CurrencyExchangeRate.cs @@ -0,0 +1,45 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes exchange rate of a currency to USD + /// + public partial class CurrencyExchangeRate : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "currencyExchangeRate"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// ISO 4217 currency code of the payment currency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("currency")] + public string Currency { get; set; } + + /// + /// Exchange rate of the currency to USD + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("rate")] + public double? Rate { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/CurrencyExchangeRates.cs b/TdLib.Api/Objects/CurrencyExchangeRates.cs new file mode 100644 index 00000000..fb06df1c --- /dev/null +++ b/TdLib.Api/Objects/CurrencyExchangeRates.cs @@ -0,0 +1,37 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a list of currency exchange rates + /// + public partial class CurrencyExchangeRates : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "currencyExchangeRates"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// A list of currency exchange rates + /// + [JsonProperty("rates", ItemConverterType = typeof(Converter))] + public CurrencyExchangeRate[] Rates { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/GramRevenueStatistics.cs b/TdLib.Api/Objects/GramRevenueStatistics.cs index 961ca963..91850dd0 100644 --- a/TdLib.Api/Objects/GramRevenueStatistics.cs +++ b/TdLib.Api/Objects/GramRevenueStatistics.cs @@ -41,7 +41,7 @@ public partial class GramRevenueStatistics : Object public GramRevenueStatus Status { get; set; } /// - /// Current conversion rate of nanogram to USD cents + /// Current exchange rate of nanogram to USD cents /// [JsonConverter(typeof(Converter))] [JsonProperty("usd_rate")] diff --git a/TdLib.Api/Objects/InternalLinkTypeRequestManagedBot.cs b/TdLib.Api/Objects/InternalLinkTypeRequestManagedBot.cs index 47a70d9f..52bd1b8b 100644 --- a/TdLib.Api/Objects/InternalLinkTypeRequestManagedBot.cs +++ b/TdLib.Api/Objects/InternalLinkTypeRequestManagedBot.cs @@ -38,7 +38,7 @@ public class InternalLinkTypeRequestManagedBot : InternalLinkType public string ManagerBotUsername { get; set; } /// - /// Suggested username for the bot; always ends with "bot" case-insensitive + /// Suggested username for the bot; always ends with "bot" or a string from updateAllowedBotUsernamePremiumSuffixes case-insensitive /// [JsonConverter(typeof(Converter))] [JsonProperty("suggested_bot_username")] diff --git a/TdLib.Api/Objects/InternalLinkTypeTonConnect.cs b/TdLib.Api/Objects/InternalLinkTypeTonConnect.cs new file mode 100644 index 00000000..f5ae7ba7 --- /dev/null +++ b/TdLib.Api/Objects/InternalLinkTypeTonConnect.cs @@ -0,0 +1,76 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class InternalLinkType : Object + { + /// + /// The link is a universal TON Connect link + /// + public class InternalLinkTypeTonConnect : InternalLinkType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "internalLinkTypeTonConnect"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// TON Connect version + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("version")] + public int Version { get; set; } + + /// + /// Hex-encoded public X25519 key of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("dapp_client_id")] + public string DappClientId { get; set; } + + /// + /// TON Connect connect request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("connect_request")] + public TonConnectConnectRequest ConnectRequest { get; set; } + + /// + /// Request return strategy; one of "back", "none", or a URL to open + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("return_strategy")] + public string ReturnStrategy { get; set; } + + /// + /// Embedded RPC request represented as base64url-encoded JSON + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("rpc_request")] + public string RpcRequest { get; set; } + + /// + /// Identifier to trace the connection request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("trace_id")] + public string TraceId { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InternalLinkTypeTonWalletTransfer.cs b/TdLib.Api/Objects/InternalLinkTypeTonWalletTransfer.cs new file mode 100644 index 00000000..24391c80 --- /dev/null +++ b/TdLib.Api/Objects/InternalLinkTypeTonWalletTransfer.cs @@ -0,0 +1,48 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class InternalLinkType : Object + { + /// + /// The link is a link for sending Grams from the user's TON wallet + /// + public class InternalLinkTypeTonWalletTransfer : InternalLinkType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "internalLinkTypeTonWalletTransfer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Chosen receiver of the transfer; may be null if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("receiver")] + public TonWalletTransferReceiver Receiver { get; set; } + + /// + /// The pre-filled amount of TON Grams to send; in the smallest units of the cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gram_amount")] + public long GramAmount { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/MessageProperties.cs b/TdLib.Api/Objects/MessageProperties.cs index 87ac4db5..b1446075 100644 --- a/TdLib.Api/Objects/MessageProperties.cs +++ b/TdLib.Api/Objects/MessageProperties.cs @@ -278,6 +278,12 @@ public partial class MessageProperties : Object [JsonProperty("can_set_fact_check")] public bool CanSetFactCheck { get; set; } + /// + /// Identifiers of custom emoji used in the message + /// + [JsonProperty("custom_emoji_ids", ItemConverterType = typeof(Converter))] + public long[] CustomEmojiIds { get; set; } + /// /// True, if content of the message can't be saved locally, because it is protected by the current user; if true, then can_be_saved is false /// diff --git a/TdLib.Api/Objects/MessageTonConnectRequest.cs b/TdLib.Api/Objects/MessageTonConnectRequest.cs new file mode 100644 index 00000000..84f0cb68 --- /dev/null +++ b/TdLib.Api/Objects/MessageTonConnectRequest.cs @@ -0,0 +1,69 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class MessageContent : Object + { + /// + /// A request from a dApp was received through TON Connect + /// + public class MessageTonConnectRequest : MessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "messageTonConnectRequest"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the TON Connect session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + + /// + /// State of the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("state")] + public TonConnectRequestState State { get; set; } + + /// + /// Name of the dApp; may be empty if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("dapp_name")] + public string DappName { get; set; } + + /// + /// Topic of the request; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("topic")] + public string Topic { get; set; } + + /// + /// Identifier to trace the request; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("trace_id")] + public string TraceId { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/MessageTonWalletTransfer.cs b/TdLib.Api/Objects/MessageTonWalletTransfer.cs new file mode 100644 index 00000000..d6148134 --- /dev/null +++ b/TdLib.Api/Objects/MessageTonWalletTransfer.cs @@ -0,0 +1,76 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class MessageContent : Object + { + /// + /// Represents a transfer with the TON wallet of the current user + /// + public class MessageTonWalletTransfer : MessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "messageTonWalletTransfer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Sender of the transfer; 0 if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("sender_user_id")] + public long SenderUserId { get; set; } + + /// + /// Unique identifier of the transaction; may be empty if the transfer isn't send yet. Use getTonWalletTransaction to get additional information about the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("transaction_id")] + public string TransactionId { get; set; } + + /// + /// Address in the TON blockchain of the transaction peer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("peer_address")] + public string PeerAddress { get; set; } + + /// + /// The amount of received cryptocurrency, in the smallest units of the cryptocurrency; negative for outgoing transactions + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("amount")] + public long Amount { get; set; } + + /// + /// Comment added to the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("comment")] + public string Comment { get; set; } + + /// + /// True, if the comment is encrypted and must be decrypted using the receiver's or sender's private key + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_comment_encrypted")] + public bool IsCommentEncrypted { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/OnRampPaymentAvailability.cs b/TdLib.Api/Objects/OnRampPaymentAvailability.cs new file mode 100644 index 00000000..19e32574 --- /dev/null +++ b/TdLib.Api/Objects/OnRampPaymentAvailability.cs @@ -0,0 +1,65 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes availability of cryptocurrency purchase through an on-ramp provider + /// + public partial class OnRampPaymentAvailability : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "onRampPaymentAvailability"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// True, if the current user can use the provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_allowed")] + public bool IsAllowed { get; set; } + + /// + /// True, if the current user can purchase through the provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_purchase_allowed")] + public bool IsPurchaseAllowed { get; set; } + + /// + /// The list of available payment methods + /// + [JsonProperty("methods", ItemConverterType = typeof(Converter))] + public OnRampPaymentMethod[] Methods { get; set; } + + /// + /// A two-letter ISO 3166-1 alpha-2 country code of the current user's country + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// Code of the state of the current user; may be empty if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("state")] + public string State { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/OnRampPaymentLimits.cs b/TdLib.Api/Objects/OnRampPaymentLimits.cs new file mode 100644 index 00000000..52b2adfb --- /dev/null +++ b/TdLib.Api/Objects/OnRampPaymentLimits.cs @@ -0,0 +1,66 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes limits for an on-ramp purchase + /// + public partial class OnRampPaymentLimits : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "onRampPaymentLimits"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The payment method to be used + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payment_method")] + public string PaymentMethod { get; set; } + + /// + /// The minimum allowed amount of the base currency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency_min_amount")] + public string BaseCurrencyMinAmount { get; set; } + + /// + /// The maximum allowed amount of the base currency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency_max_amount")] + public string BaseCurrencyMaxAmount { get; set; } + + /// + /// The minimum allowed amount of the bought cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency_min_amount")] + public string CryptocurrencyMinAmount { get; set; } + + /// + /// The maximum allowed amount of the bought cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency_max_amount")] + public string CryptocurrencyMaxAmount { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/OnRampPaymentMethod.cs b/TdLib.Api/Objects/OnRampPaymentMethod.cs new file mode 100644 index 00000000..d781fd71 --- /dev/null +++ b/TdLib.Api/Objects/OnRampPaymentMethod.cs @@ -0,0 +1,45 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes a payment method of an on-ramp provider + /// + public partial class OnRampPaymentMethod : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "onRampPaymentMethod"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Name of the method + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// True, if the method is available to the user + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_available")] + public bool IsAvailable { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/OnRampPaymentQuote.cs b/TdLib.Api/Objects/OnRampPaymentQuote.cs new file mode 100644 index 00000000..301f4096 --- /dev/null +++ b/TdLib.Api/Objects/OnRampPaymentQuote.cs @@ -0,0 +1,94 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes a quote for an on-ramp purchase + /// + public partial class OnRampPaymentQuote : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "onRampPaymentQuote"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The payment method to be used + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payment_method")] + public string PaymentMethod { get; set; } + + /// + /// Point in time (Unix timestamp) when the quote will expire + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("expiration_date")] + public int ExpirationDate { get; set; } + + /// + /// Paid amount of the base currency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("base_currency_amount")] + public string BaseCurrencyAmount { get; set; } + + /// + /// Purchased amount of the cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency_amount")] + public string CryptocurrencyAmount { get; set; } + + /// + /// The price of the cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("cryptocurrency_price")] + public string CryptocurrencyPrice { get; set; } + + /// + /// Fee amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("fee_amount")] + public string FeeAmount { get; set; } + + /// + /// Extra fee amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("extra_fee_amount")] + public string ExtraFeeAmount { get; set; } + + /// + /// Network fee amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("network_fee_amount")] + public string NetworkFeeAmount { get; set; } + + /// + /// Total paid amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("total_amount")] + public string TotalAmount { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/OnRampPaymentSession.cs b/TdLib.Api/Objects/OnRampPaymentSession.cs new file mode 100644 index 00000000..b6920b4f --- /dev/null +++ b/TdLib.Api/Objects/OnRampPaymentSession.cs @@ -0,0 +1,52 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes a session for an on-ramp purchase + /// + public partial class OnRampPaymentSession : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "onRampPaymentSession"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the session + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("session_id")] + public string SessionId { get; set; } + + /// + /// Point in time (Unix timestamp) when the session will expire + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("expiration_date")] + public int ExpirationDate { get; set; } + + /// + /// HTTPS URL to be opened in a WebView to complete the purchase + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("url")] + public string Url { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/OnRampProvider.cs b/TdLib.Api/Objects/OnRampProvider.cs new file mode 100644 index 00000000..cdfd077d --- /dev/null +++ b/TdLib.Api/Objects/OnRampProvider.cs @@ -0,0 +1,72 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes an on-ramp provider + /// + public partial class OnRampProvider : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "onRampProvider"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// Name of the provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// List of cryptocurrencies supported by the provider + /// + [JsonProperty("cryptocurrencies", ItemConverterType = typeof(Converter))] + public string[] Cryptocurrencies { get; set; } + + /// + /// True, if the provider supports base currencies and can be used in the method getOnRampProviderBaseCurrencies + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("supports_base_currencies")] + public bool SupportsBaseCurrencies { get; set; } + + /// + /// True, if the provider supports limits retrieval using the method getOnRampPaymentLimits + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("supports_limits")] + public bool SupportsLimits { get; set; } + + /// + /// True, if the provider supports quote retrieval using the method getOnRampPaymentQuote + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("supports_quote")] + public bool SupportsQuote { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/OnRampProviders.cs b/TdLib.Api/Objects/OnRampProviders.cs new file mode 100644 index 00000000..273aa002 --- /dev/null +++ b/TdLib.Api/Objects/OnRampProviders.cs @@ -0,0 +1,37 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a list of on-ramp providers + /// + public partial class OnRampProviders : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "onRampProviders"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// A list of providers + /// + [JsonProperty("providers", ItemConverterType = typeof(Converter))] + public OnRampProvider[] Providers { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/PushMessageContentTonConnectRequest.cs b/TdLib.Api/Objects/PushMessageContentTonConnectRequest.cs new file mode 100644 index 00000000..7fe25059 --- /dev/null +++ b/TdLib.Api/Objects/PushMessageContentTonConnectRequest.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 PushMessageContent : Object + { + /// + /// A message with a request from a dApp was received through TON Connect + /// + public class PushMessageContentTonConnectRequest : PushMessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "pushMessageContentTonConnectRequest"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Name of the dApp; may be empty if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("dapp_name")] + public string DappName { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/PushMessageContentTonWalletTransfer.cs b/TdLib.Api/Objects/PushMessageContentTonWalletTransfer.cs new file mode 100644 index 00000000..3054de47 --- /dev/null +++ b/TdLib.Api/Objects/PushMessageContentTonWalletTransfer.cs @@ -0,0 +1,55 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class PushMessageContent : Object + { + /// + /// A message with a TON wallet transfer + /// + public class PushMessageContentTonWalletTransfer : PushMessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "pushMessageContentTonWalletTransfer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Sender of the transfer; 0 if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("sender_user_id")] + public long SenderUserId { get; set; } + + /// + /// String representation of the received amount + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("amount")] + public string Amount { get; set; } + + /// + /// Comment added to the transaction if it is public + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("comment")] + public string Comment { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/RichTextTonAddress.cs b/TdLib.Api/Objects/RichTextTonAddress.cs new file mode 100644 index 00000000..f0b3563f --- /dev/null +++ b/TdLib.Api/Objects/RichTextTonAddress.cs @@ -0,0 +1,48 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class RichText : Object + { + /// + /// An address in the TON blockchain + /// + public class RichTextTonAddress : RichText + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "richTextTonAddress"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Text + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("text")] + public RichText Text { get; set; } + + /// + /// The address + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("address")] + public string Address { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/StarRevenueStatistics.cs b/TdLib.Api/Objects/StarRevenueStatistics.cs index bdd91906..c8616876 100644 --- a/TdLib.Api/Objects/StarRevenueStatistics.cs +++ b/TdLib.Api/Objects/StarRevenueStatistics.cs @@ -41,7 +41,7 @@ public partial class StarRevenueStatistics : Object public StarRevenueStatus Status { get; set; } /// - /// Current conversion rate of a Telegram Star to USD + /// Current exchange rate of a Telegram Star to USD /// [JsonConverter(typeof(Converter))] [JsonProperty("usd_rate")] diff --git a/TdLib.Api/Objects/SuggestedActionViewFirstTonWalletTransferHint.cs b/TdLib.Api/Objects/SuggestedActionViewFirstTonWalletTransferHint.cs new file mode 100644 index 00000000..5f264184 --- /dev/null +++ b/TdLib.Api/Objects/SuggestedActionViewFirstTonWalletTransferHint.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 view a hint about receiving of the first TON wallet transfer + /// + public class SuggestedActionViewFirstTonWalletTransferHint : SuggestedAction + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "suggestedActionViewFirstTonWalletTransferHint"; + + /// + /// 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/TelegramPaymentPurposeStars.cs b/TdLib.Api/Objects/TelegramPaymentPurposeStars.cs index afe733b3..eba93107 100644 --- a/TdLib.Api/Objects/TelegramPaymentPurposeStars.cs +++ b/TdLib.Api/Objects/TelegramPaymentPurposeStars.cs @@ -50,7 +50,8 @@ public class TelegramPaymentPurposeStars : TelegramPaymentPurpose public long StarCount { get; set; } /// - /// Identifier of the chat that is supposed to receive the Telegram Stars; pass 0 if none + /// Identifier of the chat that is supposed to receive the Telegram Stars; pass 0 if none. If non-zero and getOption("star_top_up_disabled"), + /// then the payment isn't allowed and the user can't buy Telegram Stars in this place /// [JsonConverter(typeof(Converter))] [JsonProperty("chat_id")] diff --git a/TdLib.Api/Objects/TextEntityTypeTonAddress.cs b/TdLib.Api/Objects/TextEntityTypeTonAddress.cs new file mode 100644 index 00000000..b9a12c06 --- /dev/null +++ b/TdLib.Api/Objects/TextEntityTypeTonAddress.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 TextEntityType : Object + { + /// + /// An address in the TON blockchain + /// + public class TextEntityTypeTonAddress : TextEntityType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "textEntityTypeTonAddress"; + + /// + /// 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/ThemeSettings.cs b/TdLib.Api/Objects/ThemeSettings.cs index 701349c3..bf7ed715 100644 --- a/TdLib.Api/Objects/ThemeSettings.cs +++ b/TdLib.Api/Objects/ThemeSettings.cs @@ -62,7 +62,14 @@ public partial class ThemeSettings : Object public bool AnimateOutgoingMessageFill { get; set; } /// - /// Accent color of outgoing messages in ARGB format + /// True, if there is chosen accent color for outgoing messages; otherwise, the color must be deduced from other theme settings + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("has_outgoing_message_accent_color")] + public bool HasOutgoingMessageAccentColor { get; set; } + + /// + /// Accent color of outgoing messages in ARGB format; must be ignored if has_outgoing_message_accent_color is false /// [JsonConverter(typeof(Converter))] [JsonProperty("outgoing_message_accent_color")] diff --git a/TdLib.Api/Objects/TonCenterApiRequestTypeGet.cs b/TdLib.Api/Objects/TonCenterApiRequestTypeGet.cs new file mode 100644 index 00000000..959015be --- /dev/null +++ b/TdLib.Api/Objects/TonCenterApiRequestTypeGet.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 TonCenterApiRequestType : Object + { + /// + /// Describes state of active stories posted by a chat + /// + public class TonCenterApiRequestTypeGet : TonCenterApiRequestType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonCenterApiRequestTypeGet"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// URL-encoded query of the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("query")] + public string Query { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonCenterApiRequestTypePost.cs b/TdLib.Api/Objects/TonCenterApiRequestTypePost.cs new file mode 100644 index 00000000..ade6817e --- /dev/null +++ b/TdLib.Api/Objects/TonCenterApiRequestTypePost.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 TonCenterApiRequestType : Object + { + /// + /// A POST request + /// + public class TonCenterApiRequestTypePost : TonCenterApiRequestType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonCenterApiRequestTypePost"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Payload of the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payload")] + public string Payload { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonCenterStreamingApiUrl.cs b/TdLib.Api/Objects/TonCenterStreamingApiUrl.cs new file mode 100644 index 00000000..900de228 --- /dev/null +++ b/TdLib.Api/Objects/TonCenterStreamingApiUrl.cs @@ -0,0 +1,45 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Contains an HTTP URL for TON Center Streaming API + /// + public partial class TonCenterStreamingApiUrl : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonCenterStreamingApiUrl"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The URL + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("url")] + public string Url { get; set; } + + /// + /// Time after which the URL expires + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("expires_in")] + public int ExpiresIn { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectChallenge.cs b/TdLib.Api/Objects/TonConnectChallenge.cs new file mode 100644 index 00000000..8c4133cb --- /dev/null +++ b/TdLib.Api/Objects/TonConnectChallenge.cs @@ -0,0 +1,45 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a TON Connect challenge + /// + public partial class TonConnectChallenge : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectChallenge"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// 104-byte challenge + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("challenge")] + public byte[] Challenge { get; set; } + + /// + /// Unique identifier of the first outgoing event + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("event_id")] + public long EventId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectConnectItemAddress.cs b/TdLib.Api/Objects/TonConnectConnectItemAddress.cs new file mode 100644 index 00000000..6a8f3dc2 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectConnectItemAddress.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 TonConnectConnectItem : Object + { + /// + /// Represents a data item to share with a dApp + /// + public class TonConnectConnectItemAddress : TonConnectConnectItem + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectConnectItemAddress"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Stringified TON network global_id (e.g. "-239" for mainnet); may be empty + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("network")] + public string Network { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectConnectItemProof.cs b/TdLib.Api/Objects/TonConnectConnectItemProof.cs new file mode 100644 index 00000000..d04b924f --- /dev/null +++ b/TdLib.Api/Objects/TonConnectConnectItemProof.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 TonConnectConnectItem : Object + { + /// + /// Proof of the wallet ownership + /// + public class TonConnectConnectItemProof : TonConnectConnectItem + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectConnectItemProof"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Payload to be used for the proof (e.g. nonce + expiration timestamp) + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payload")] + public string Payload { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectConnectRequest.cs b/TdLib.Api/Objects/TonConnectConnectRequest.cs new file mode 100644 index 00000000..e902e616 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectConnectRequest.cs @@ -0,0 +1,44 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Contains information about a request to connect the user's TON wallet to a dApp using TON Connect + /// + public partial class TonConnectConnectRequest : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectConnectRequest"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// URL of the manifest of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("manifest_url")] + public string ManifestUrl { get; set; } + + /// + /// Items requested from the wallet + /// + [JsonProperty("items", ItemConverterType = typeof(Converter))] + public TonConnectConnectItem[] Items { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectManifestFailed.cs b/TdLib.Api/Objects/TonConnectManifestFailed.cs new file mode 100644 index 00000000..a933da40 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectManifestFailed.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 TonConnectManifest : Object + { + /// + /// The manifest has failed to download + /// + public class TonConnectManifestFailed : TonConnectManifest + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectManifestFailed"; + + /// + /// 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/TonConnectManifestInfo.cs b/TdLib.Api/Objects/TonConnectManifestInfo.cs new file mode 100644 index 00000000..bbb22b34 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectManifestInfo.cs @@ -0,0 +1,55 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class TonConnectManifest : Object + { + /// + /// The manifest is available + /// + public class TonConnectManifestInfo : TonConnectManifest + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectManifestInfo"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// URL of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("url")] + public string Url { get; set; } + + /// + /// Name of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// App icon in PNG or ICO format + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("icon")] + public Document Icon { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectManifestInvalid.cs b/TdLib.Api/Objects/TonConnectManifestInvalid.cs new file mode 100644 index 00000000..5165cbff --- /dev/null +++ b/TdLib.Api/Objects/TonConnectManifestInvalid.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 TonConnectManifest : Object + { + /// + /// The manifest is invalid + /// + public class TonConnectManifestInvalid : TonConnectManifest + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectManifestInvalid"; + + /// + /// 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/TonConnectManifestPending.cs b/TdLib.Api/Objects/TonConnectManifestPending.cs new file mode 100644 index 00000000..0ac826a3 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectManifestPending.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 TonConnectManifest : Object + { + /// + /// Describes manifest of the dApp that is being connected using TON Connect + /// + public class TonConnectManifestPending : TonConnectManifest + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectManifestPending"; + + /// + /// 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/TonConnectRequest.cs b/TdLib.Api/Objects/TonConnectRequest.cs new file mode 100644 index 00000000..be9c9e83 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectRequest.cs @@ -0,0 +1,73 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a pending TON Connect request + /// + public partial class TonConnectRequest : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectRequest"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + + /// + /// Unique identifier of the service message in the chat 777000 with the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("message_id")] + public long MessageId { get; set; } + + /// + /// Body of the request + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("body")] + public byte[] Body { get; set; } + + /// + /// Point in time (Unix timestamp) when the request will expire; 0 if never + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("expiration_date")] + public int ExpirationDate { get; set; } + + /// + /// Topic of the request; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("topic")] + public string Topic { get; set; } + + /// + /// Identifier to trace the request; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("trace_id")] + public string TraceId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectRequestStateAccepted.cs b/TdLib.Api/Objects/TonConnectRequestStateAccepted.cs new file mode 100644 index 00000000..4fe13f2a --- /dev/null +++ b/TdLib.Api/Objects/TonConnectRequestStateAccepted.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 TonConnectRequestState : Object + { + /// + /// The request was accepted + /// + public class TonConnectRequestStateAccepted : TonConnectRequestState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectRequestStateAccepted"; + + /// + /// 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/TonConnectRequestStatePending.cs b/TdLib.Api/Objects/TonConnectRequestStatePending.cs new file mode 100644 index 00000000..bf8de036 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectRequestStatePending.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 TonConnectRequestState : Object + { + /// + /// Describes state of a request received from a dApp through TON Connect + /// + public class TonConnectRequestStatePending : TonConnectRequestState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectRequestStatePending"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Point in time (Unix timestamp) when the request 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/TonConnectRequestStateRejected.cs b/TdLib.Api/Objects/TonConnectRequestStateRejected.cs new file mode 100644 index 00000000..eb5c80c3 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectRequestStateRejected.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 TonConnectRequestState : Object + { + /// + /// The request was rejected + /// + public class TonConnectRequestStateRejected : TonConnectRequestState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectRequestStateRejected"; + + /// + /// 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/TonConnectRequests.cs b/TdLib.Api/Objects/TonConnectRequests.cs new file mode 100644 index 00000000..707c51d1 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectRequests.cs @@ -0,0 +1,44 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a session with its pending TON Connect requests + /// + public partial class TonConnectRequests : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectRequests"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The session + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("session")] + public TonConnectSession Session { get; set; } + + /// + /// The requests + /// + [JsonProperty("requests", ItemConverterType = typeof(Converter))] + public TonConnectRequest[] Requests { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectSession.cs b/TdLib.Api/Objects/TonConnectSession.cs new file mode 100644 index 00000000..83e9ac7d --- /dev/null +++ b/TdLib.Api/Objects/TonConnectSession.cs @@ -0,0 +1,80 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a TON Connect session. See https://github.com/ton-blockchain/ton-connect/tree/main/spec for full TON Connect protocol documentation + /// + public partial class TonConnectSession : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectSession"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("id")] + public long Id { get; set; } + + /// + /// Hex-encoded public X25519 key of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("dapp_client_id")] + public string DappClientId { get; set; } + + /// + /// Hex-encoded public X25519 key of the current user's application; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("wallet_client_id")] + public string WalletClientId { get; set; } + + /// + /// Point in time (Unix timestamp) when the session was created + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("creation_date")] + public int CreationDate { get; set; } + + /// + /// Manifest of the dApp + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("manifest")] + public TonConnectManifest Manifest { get; set; } + + /// + /// Nonce used for the session + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("nonce")] + public byte[] Nonce { get; set; } + + /// + /// Session state + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("state")] + public TonConnectSessionState State { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectSessionEventId.cs b/TdLib.Api/Objects/TonConnectSessionEventId.cs new file mode 100644 index 00000000..05c44a8b --- /dev/null +++ b/TdLib.Api/Objects/TonConnectSessionEventId.cs @@ -0,0 +1,38 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents identifier of an event in a TON Connect session + /// + public partial class TonConnectSessionEventId : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectSessionEventId"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The event identifier + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("event_id")] + public long EventId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonConnectSessionStateClosed.cs b/TdLib.Api/Objects/TonConnectSessionStateClosed.cs new file mode 100644 index 00000000..7974e8b2 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectSessionStateClosed.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 TonConnectSessionState : Object + { + /// + /// The session is closed + /// + public class TonConnectSessionStateClosed : TonConnectSessionState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectSessionStateClosed"; + + /// + /// 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/TonConnectSessionStateClosing.cs b/TdLib.Api/Objects/TonConnectSessionStateClosing.cs new file mode 100644 index 00000000..7a59822f --- /dev/null +++ b/TdLib.Api/Objects/TonConnectSessionStateClosing.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 TonConnectSessionState : Object + { + /// + /// The session is being closed + /// + public class TonConnectSessionStateClosing : TonConnectSessionState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectSessionStateClosing"; + + /// + /// 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/TonConnectSessionStatePending.cs b/TdLib.Api/Objects/TonConnectSessionStatePending.cs new file mode 100644 index 00000000..5ac55e26 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectSessionStatePending.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 TonConnectSessionState : Object + { + /// + /// Describes state of a TON Connect session + /// + public class TonConnectSessionStatePending : TonConnectSessionState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectSessionStatePending"; + + /// + /// 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/TonConnectSessionStateReady.cs b/TdLib.Api/Objects/TonConnectSessionStateReady.cs new file mode 100644 index 00000000..9d9321c1 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectSessionStateReady.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 TonConnectSessionState : Object + { + /// + /// The session is ready + /// + public class TonConnectSessionStateReady : TonConnectSessionState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectSessionStateReady"; + + /// + /// 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/TonConnectSessions.cs b/TdLib.Api/Objects/TonConnectSessions.cs new file mode 100644 index 00000000..dfa3f662 --- /dev/null +++ b/TdLib.Api/Objects/TonConnectSessions.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 TON Connect sessions + /// + public partial class TonConnectSessions : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectSessions"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The list of sessions + /// + [JsonProperty("sessions", ItemConverterType = typeof(Converter))] + public TonConnectSession[] Sessions { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonNft.cs b/TdLib.Api/Objects/TonNft.cs new file mode 100644 index 00000000..8e05f7b5 --- /dev/null +++ b/TdLib.Api/Objects/TonNft.cs @@ -0,0 +1,114 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents an NFT in the TON blockchain + /// + public partial class TonNft : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonNft"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Address of the collection to which the NFT belongs; may be empty if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("collection_address")] + public string CollectionAddress { get; set; } + + /// + /// Address of the NFT + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("address")] + public string Address { get; set; } + + /// + /// Address of the owner of the NFT + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("owner_address")] + public string OwnerAddress { get; set; } + + /// + /// Index of the NFT among all NFTs from the collection as a decimal number + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("index")] + public string Index { get; set; } + + /// + /// Name of the NFT + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("description")] + public string Description { get; set; } + + /// + /// Image of the NFT; may be null if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("image")] + public PhotoSize Image { get; set; } + + /// + /// Thumbnail of the NFT; may be null if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("thumbnail")] + public PhotoSize Thumbnail { get; set; } + + /// + /// Content of the NFT; may be null if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("content")] + public Document Content { get; set; } + + /// + /// Sticker of the NFT; may be null if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("sticker")] + public Sticker Sticker { get; set; } + + /// + /// Attributes of the NFT + /// + [JsonProperty("attributes", ItemConverterType = typeof(Converter))] + public TonNftAttribute[] Attributes { get; set; } + + /// + /// Additional data about the NFT; may be null if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("extra")] + public JsonValue Extra { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonNftAttribute.cs b/TdLib.Api/Objects/TonNftAttribute.cs new file mode 100644 index 00000000..7770d936 --- /dev/null +++ b/TdLib.Api/Objects/TonNftAttribute.cs @@ -0,0 +1,45 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents an attribute of an NFT in the TON blockchain + /// + public partial class TonNftAttribute : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonNftAttribute"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Trait type + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("trait_type")] + public string TraitType { get; set; } + + /// + /// Value of the attribute + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("value")] + public string Value { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonNfts.cs b/TdLib.Api/Objects/TonNfts.cs new file mode 100644 index 00000000..7942f083 --- /dev/null +++ b/TdLib.Api/Objects/TonNfts.cs @@ -0,0 +1,44 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a list of TON NFTs + /// + public partial class TonNfts : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonNfts"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// List of NFTs + /// + [JsonProperty("nfts", ItemConverterType = typeof(Converter))] + public TonNft[] Nfts { get; set; } + + /// + /// The offset for the next request. If empty, then there are no more results + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("next_offset")] + public string NextOffset { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletGaslessTransfersInfo.cs b/TdLib.Api/Objects/TonWalletGaslessTransfersInfo.cs new file mode 100644 index 00000000..423b91e9 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletGaslessTransfersInfo.cs @@ -0,0 +1,52 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents state of gasless transfers for the current user + /// + public partial class TonWalletGaslessTransfersInfo : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletGaslessTransfersInfo"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Number of left gasless transfers. The daily available number of gasless transfers is available as getOption("ton_wallet_gasless_transfer_daily_count_max") + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("left_count")] + public int LeftCount { get; set; } + + /// + /// Point in time (Unix timestamp) when the number of left transfers will be reset; 0 if never + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("reset_date")] + public int ResetDate { get; set; } + + /// + /// Address of the relayer for gasless transfers; may be empty if unavailable + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("relayer_address")] + public string RelayerAddress { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletOwnershipProof.cs b/TdLib.Api/Objects/TonWalletOwnershipProof.cs new file mode 100644 index 00000000..e2216fc5 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletOwnershipProof.cs @@ -0,0 +1,52 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a proof of TON wallet ownership + /// + public partial class TonWalletOwnershipProof : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletOwnershipProof"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Public key of the wallet + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("public_key")] + public byte[] PublicKey { get; set; } + + /// + /// The current UNIX timestamp which was used to create the proof + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("timestamp")] + public int Timestamp { get; set; } + + /// + /// The signature prooving the ownership + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("signature")] + public byte[] Signature { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletOwnershipProofChallenge.cs b/TdLib.Api/Objects/TonWalletOwnershipProofChallenge.cs new file mode 100644 index 00000000..2fc9442f --- /dev/null +++ b/TdLib.Api/Objects/TonWalletOwnershipProofChallenge.cs @@ -0,0 +1,45 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a challenge for TON wallet ownership proof + /// + public partial class TonWalletOwnershipProofChallenge : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletOwnershipProofChallenge"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Payload of the challenge + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payload")] + public string Payload { get; set; } + + /// + /// Domain of the proof requester + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("domain")] + public string Domain { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletState.cs b/TdLib.Api/Objects/TonWalletState.cs new file mode 100644 index 00000000..edd1873f --- /dev/null +++ b/TdLib.Api/Objects/TonWalletState.cs @@ -0,0 +1,80 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes state of the wallet of the current user in the TON blockchain + /// + public partial class TonWalletState : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletState"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Address of the wallet; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("address")] + public string Address { get; set; } + + /// + /// Public key of the wallet; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("public_key")] + public byte[] PublicKey { get; set; } + + /// + /// The total amount of owned TON Grams, in the smallest units of the cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gram_amount")] + public long GramAmount { get; set; } + + /// + /// True, if the wallet is being created + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_being_created")] + public bool IsBeingCreated { get; set; } + + /// + /// True, if backup for the wallet key is enabled + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_backup_enabled")] + public bool IsBackupEnabled { get; set; } + + /// + /// True, if the user can enable backup for the wallet key + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("can_enable_backup")] + public bool CanEnableBackup { get; set; } + + /// + /// True, if the wallet key can be exported using getTonWalletSecretPhrase + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("can_export_phrase")] + public bool CanExportPhrase { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransaction.cs b/TdLib.Api/Objects/TonWalletTransaction.cs new file mode 100644 index 00000000..45cd5ef6 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransaction.cs @@ -0,0 +1,87 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a transaction with the TON wallet of the current user + /// + public partial class TonWalletTransaction : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransaction"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Unique identifier of the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// Address in the TON blockchain of the transaction peer; may be empty if the transaction isn't a wallet transfer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("peer_address")] + public string PeerAddress { get; set; } + + /// + /// Identifier of the other user who participated in the transaction; 0 if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("peer_user_id")] + public long PeerUserId { get; set; } + + /// + /// Identifier of the domain assigned to the peer address; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("peer_domain")] + public string PeerDomain { get; set; } + + /// + /// Point in time (Unix timestamp) when the transaction was completed + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("date")] + public int Date { get; set; } + + /// + /// The fee amount paid for the transaction in TON Grams, in the smallest units of the cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("fee_amount")] + public long FeeAmount { get; set; } + + /// + /// State of the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("state")] + public TonWalletTransactionState State { get; set; } + + /// + /// Type of the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("type")] + public TonWalletTransactionType Type { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransactionStateFailed.cs b/TdLib.Api/Objects/TonWalletTransactionStateFailed.cs new file mode 100644 index 00000000..fdd887fb --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransactionStateFailed.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 TonWalletTransactionState : Object + { + /// + /// The transaction failed + /// + public class TonWalletTransactionStateFailed : TonWalletTransactionState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransactionStateFailed"; + + /// + /// 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/TonWalletTransactionStateSucceeded.cs b/TdLib.Api/Objects/TonWalletTransactionStateSucceeded.cs new file mode 100644 index 00000000..af3f7aed --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransactionStateSucceeded.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 TonWalletTransactionState : Object + { + /// + /// Describes state of a transaction with a TON wallet + /// + public class TonWalletTransactionStateSucceeded : TonWalletTransactionState + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransactionStateSucceeded"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Hash of the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("tx_hash")] + public string TxHash { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransactionTypeKeyChange.cs b/TdLib.Api/Objects/TonWalletTransactionTypeKeyChange.cs new file mode 100644 index 00000000..27186e34 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransactionTypeKeyChange.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 TonWalletTransactionType : Object + { + /// + /// Change of the wallet key + /// + public class TonWalletTransactionTypeKeyChange : TonWalletTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransactionTypeKeyChange"; + + /// + /// 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/TonWalletTransactionTypeNftTransfer.cs b/TdLib.Api/Objects/TonWalletTransactionTypeNftTransfer.cs new file mode 100644 index 00000000..5778a45d --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransactionTypeNftTransfer.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 TonWalletTransactionType : Object + { + /// + /// A transfer of a TON NFT to or from the wallet + /// + public class TonWalletTransactionTypeNftTransfer : TonWalletTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransactionTypeNftTransfer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The transferred NFT + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("nft")] + public TonNft Nft { get; set; } + + /// + /// True, if the transfer is outgoing + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_outgoing")] + public bool IsOutgoing { get; set; } + + /// + /// Comment added to the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("comment")] + public string Comment { get; set; } + + /// + /// True, if the comment is encrypted and must be decrypted using the user's private key + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_comment_encrypted")] + public bool IsCommentEncrypted { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransactionTypeOnRampDeposit.cs b/TdLib.Api/Objects/TonWalletTransactionTypeOnRampDeposit.cs new file mode 100644 index 00000000..81868547 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransactionTypeOnRampDeposit.cs @@ -0,0 +1,48 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class TonWalletTransactionType : Object + { + /// + /// Describes type of transaction with a TON wallet + /// + public class TonWalletTransactionTypeOnRampDeposit : TonWalletTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransactionTypeOnRampDeposit"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The amount of received cryptocurrency, in the smallest units of the cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("amount")] + public long Amount { get; set; } + + /// + /// Name of the on-ramp provider + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("provider_name")] + public string ProviderName { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransactionTypeTransfer.cs b/TdLib.Api/Objects/TonWalletTransactionTypeTransfer.cs new file mode 100644 index 00000000..e2c4ec7c --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransactionTypeTransfer.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 TonWalletTransactionType : Object + { + /// + /// A transfer of TON Grams to or from the wallet + /// + public class TonWalletTransactionTypeTransfer : TonWalletTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransactionTypeTransfer"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The amount of received cryptocurrency, in the smallest units of the cryptocurrency; negative for outgoing transactions + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("amount")] + public long Amount { get; set; } + + /// + /// True, if the fee was paid by Telegram + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_gasless")] + public bool IsGasless { get; set; } + + /// + /// Comment added to the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("comment")] + public string Comment { get; set; } + + /// + /// True, if the comment is encrypted and must be decrypted using the user's private key + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_comment_encrypted")] + public bool IsCommentEncrypted { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransactions.cs b/TdLib.Api/Objects/TonWalletTransactions.cs new file mode 100644 index 00000000..fe063812 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransactions.cs @@ -0,0 +1,51 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a list of TON Gram transactions + /// + public partial class TonWalletTransactions : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransactions"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The total amount of owned TON Grams, in the smallest units of the cryptocurrency + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gram_amount")] + public long GramAmount { get; set; } + + /// + /// List of transactions + /// + [JsonProperty("transactions", ItemConverterType = typeof(Converter))] + public TonWalletTransaction[] Transactions { get; set; } + + /// + /// The offset for the next request. If empty, then there are no more results + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("next_offset")] + public string NextOffset { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransferReceiverAddress.cs b/TdLib.Api/Objects/TonWalletTransferReceiverAddress.cs new file mode 100644 index 00000000..47ae2d16 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransferReceiverAddress.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 TonWalletTransferReceiver : Object + { + /// + /// The receiver is specified by its address + /// + public class TonWalletTransferReceiverAddress : TonWalletTransferReceiver + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransferReceiverAddress"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Address of the receiver. Use getAddressTonWallet to get information about the user's TON wallet + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("address")] + public string Address { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransferReceiverUser.cs b/TdLib.Api/Objects/TonWalletTransferReceiverUser.cs new file mode 100644 index 00000000..ee15b0d6 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransferReceiverUser.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class TonWalletTransferReceiver : Object + { + /// + /// Represents expected receiver of a TON wallet transfer + /// + public class TonWalletTransferReceiverUser : TonWalletTransferReceiver + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransferReceiverUser"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Username of the user. Use searchPublicChat to find the user, check that it is a regular user, + /// and then use createUserTonWallet to get information about the user's TON wallet + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("username")] + public string Username { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransferResult.cs b/TdLib.Api/Objects/TonWalletTransferResult.cs new file mode 100644 index 00000000..681ca827 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransferResult.cs @@ -0,0 +1,52 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents result of cryptocurrency transfer from the current user's TON wallet + /// + public partial class TonWalletTransferResult : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransferResult"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// True, if the transfer is gasless + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_gasless")] + public bool IsGasless { get; set; } + + /// + /// Unique identifier of the sent message; use getTonWalletTransactionByMsgHash to poll information about the transaction + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("msg_hash")] + public byte[] MsgHash { get; set; } + + /// + /// The completed transaction; may be null if the transaction is still pending + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("transaction")] + public TonWalletTransaction Transaction { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpdateAllowedBotUsernamePremiumSuffixes.cs b/TdLib.Api/Objects/UpdateAllowedBotUsernamePremiumSuffixes.cs new file mode 100644 index 00000000..00badf95 --- /dev/null +++ b/TdLib.Api/Objects/UpdateAllowedBotUsernamePremiumSuffixes.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class Update : Object + { + /// + /// Lists of suffixes allowed in secondary bot usernames, which can be added additionally to the main username if the bot's owner has a Telegram Premium subscription + /// + public class UpdateAllowedBotUsernamePremiumSuffixes : Update + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "updateAllowedBotUsernamePremiumSuffixes"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The list of allowed suffixes + /// + [JsonProperty("suffixes", ItemConverterType = typeof(Converter))] + public string[] Suffixes { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpdateFileGenerationStart.cs b/TdLib.Api/Objects/UpdateFileGenerationStart.cs index ff39adf0..5237c590 100644 --- a/TdLib.Api/Objects/UpdateFileGenerationStart.cs +++ b/TdLib.Api/Objects/UpdateFileGenerationStart.cs @@ -50,7 +50,7 @@ public class UpdateFileGenerationStart : Update public string DestinationPath { get; set; } /// - /// If the conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application. + /// If the conversion is "#url#", then original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application. /// [JsonConverter(typeof(Converter))] [JsonProperty("conversion")] diff --git a/TdLib.Api/Objects/UpdateTonWalletGaslessTransfersInfo.cs b/TdLib.Api/Objects/UpdateTonWalletGaslessTransfersInfo.cs new file mode 100644 index 00000000..bee426ce --- /dev/null +++ b/TdLib.Api/Objects/UpdateTonWalletGaslessTransfersInfo.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 Update : Object + { + /// + /// The information about gasless transfers has changed + /// + public class UpdateTonWalletGaslessTransfersInfo : Update + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "updateTonWalletGaslessTransfersInfo"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The new state of the wallet + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("info")] + public TonWalletGaslessTransfersInfo Info { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpdateTonWalletState.cs b/TdLib.Api/Objects/UpdateTonWalletState.cs new file mode 100644 index 00000000..c1e13681 --- /dev/null +++ b/TdLib.Api/Objects/UpdateTonWalletState.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 Update : Object + { + /// + /// The state of the TON wallet of the current user has changed + /// + public class UpdateTonWalletState : Update + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "updateTonWalletState"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The new state of the wallet + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("state")] + public TonWalletState State { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpdateTonWalletTonConnectSession.cs b/TdLib.Api/Objects/UpdateTonWalletTonConnectSession.cs new file mode 100644 index 00000000..d44b49f9 --- /dev/null +++ b/TdLib.Api/Objects/UpdateTonWalletTonConnectSession.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 Update : Object + { + /// + /// A session of a TON Connect has changed + /// + public class UpdateTonWalletTonConnectSession : Update + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "updateTonWalletTonConnectSession"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// The new state of the session + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("session")] + public TonConnectSession Session { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpdateTonWalletTonConnectSessionDisconnectRequired.cs b/TdLib.Api/Objects/UpdateTonWalletTonConnectSessionDisconnectRequired.cs new file mode 100644 index 00000000..e148b19e --- /dev/null +++ b/TdLib.Api/Objects/UpdateTonWalletTonConnectSessionDisconnectRequired.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + public partial class Update : Object + { + /// + /// TON Connect sessions must be disconnected in a regular way + /// + public class UpdateTonWalletTonConnectSessionDisconnectRequired : Update + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "updateTonWalletTonConnectSessionDisconnectRequired"; + + /// + /// Extra data attached to the message + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifiers of the sessions + /// + [JsonProperty("session_ids", ItemConverterType = typeof(Converter))] + public long[] SessionIds { get; set; } + } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UserTonWalletAddress.cs b/TdLib.Api/Objects/UserTonWalletAddress.cs new file mode 100644 index 00000000..d7329c63 --- /dev/null +++ b/TdLib.Api/Objects/UserTonWalletAddress.cs @@ -0,0 +1,52 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Contains TON wallet address of a user + /// + public partial class UserTonWalletAddress : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "userTonWalletAddress"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// Identifier of the user; 0 if unknown + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("user_id")] + public long UserId { get; set; } + + /// + /// Address of the user's wallet in the TON blockchain + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("wallet_address")] + public string WalletAddress { get; set; } + + /// + /// Public key of the user + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("public_key")] + public byte[] PublicKey { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UserTonWalletAddresses.cs b/TdLib.Api/Objects/UserTonWalletAddresses.cs new file mode 100644 index 00000000..e582dd79 --- /dev/null +++ b/TdLib.Api/Objects/UserTonWalletAddresses.cs @@ -0,0 +1,37 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Represents a list of TON wallet addresses of users + /// + public partial class UserTonWalletAddresses : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "userTonWalletAddresses"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// A list of TON wallet addresses + /// + [JsonProperty("addresses", ItemConverterType = typeof(Converter))] + public UserTonWalletAddress[] Addresses { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/Usernames.cs b/TdLib.Api/Objects/Usernames.cs index 1d8d2db3..bc2d9e01 100644 --- a/TdLib.Api/Objects/Usernames.cs +++ b/TdLib.Api/Objects/Usernames.cs @@ -50,6 +50,13 @@ public partial class Usernames : Object /// [JsonProperty("collectible_usernames", ItemConverterType = typeof(Converter))] public string[] CollectibleUsernames { get; set; } + + /// + /// Secondary non-collectible username; for bots only. Can't be used in toggleBotUsernameIsActive; use addBotSecondaryUsername or deleteBotSecondaryUsername to edit it. + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("secondary_username")] + public string SecondaryUsername { get; set; } } } } diff --git a/TdLib.Api/Objects/WalletBotBalance.cs b/TdLib.Api/Objects/WalletBotBalance.cs new file mode 100644 index 00000000..31ab78e1 --- /dev/null +++ b/TdLib.Api/Objects/WalletBotBalance.cs @@ -0,0 +1,45 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib +{ + /// + /// Autogenerated TDLib APIs + /// + public static partial class TdApi + { + /// + /// Describes balance of the current user in the bot https://t.me/walt + /// + public partial class WalletBotBalance : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "walletBotBalance"; + + /// + /// Extra data attached to the object + /// + [JsonProperty("@extra")] + public override string Extra { get; set; } + + /// + /// True, if the user has positive TON Gram balance + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("has_balance")] + public bool HasBalance { get; set; } + + /// + /// The URL to open to launch the bot; may be empty if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("url")] + public string Url { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.CodeGen/Methods.tl b/TdLib.CodeGen/Methods.tl index f22baed1..eb4222f8 100644 --- a/TdLib.CodeGen/Methods.tl +++ b/TdLib.CodeGen/Methods.tl @@ -510,8 +510,8 @@ toggleSavedMessagesTopicIsPinned saved_messages_topic_id:int53 is_pinned:Bool = setPinnedSavedMessagesTopics saved_messages_topic_ids:vector = Ok; -//@description Returns full information about a community. The data will be sent through update. @community_id Community identifier -loadCommunityFullInfo community_id:int53 = Ok; +//@description Returns full information about a community @community_id Community identifier +getCommunityFullInfo community_id:int53 = CommunityFullInfo; //@description Creates a new community for the given chat. Returns identifier of the created community //@name Name of the new community @@ -525,6 +525,19 @@ createCommunity name:string chat_id:int53 is_chat_hidden:Bool = CommunityId; //@name New name of the community setCommunityName community_id:int53 name:string = Ok; +//@description Changes the photo of a community; requires can_change_info administrator right in the community +//@community_id Identifier of the community +//@photo New chat photo; pass null to delete the chat photo +setCommunityPhoto community_id:int53 photo:InputChatPhoto = Ok; + +//@description Changes permissions of regular members in the given community; requires can_ban_members administrator right in the community +//@community_id Identifier of the community +//@permissions New permissions of the community +setCommunityPermissions community_id:int53 permissions:communityPermissions = Ok; + +//@description Deletes a community; requires owner privileges @community_id Identifier of the community +deleteCommunity community_id:int53 = Ok; + //@description Returns a list of common group chats with a given user. Chats are sorted by their type and creation date //@user_id User identifier @@ -1107,13 +1120,14 @@ editEphemeralMessage chat_id:int53 receiver_user_id:int53 ephemeral_message_id:i //@show_caption_above_media Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages editEphemeralMessageCaption chat_id:int53 receiver_user_id:int53 ephemeral_message_id:int32 reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = Ok; -//@description Edits the message from which a callback query has originated with an ephemeral message; for bots only +//@description Replies to a callback query with an ephemeral message; for bots only //@callback_query_id Identifier of the callback query +//@replace_callback_query_message Pass true if the ephemeral message must replace the message from which the callback query originated //@protect_content Pass true if the content of the message must be protected from forwarding and saving //@reply_markup The new message reply markup; pass null if none //@input_message_content New content of the message. Must be one of the following types: inputMessageText, inputMessageAnimation, //-inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote -editCallbackQueryMessage callback_query_id:int64 protect_content:Bool reply_markup:ReplyMarkup input_message_content:InputMessageContent = Ok; +replyToCallbackQueryWithEphemeralMessage callback_query_id:int64 replace_callback_query_message:Bool protect_content:Bool reply_markup:ReplyMarkup input_message_content:InputMessageContent = Ok; //@description Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed //@chat_id The chat the message belongs to @@ -1583,7 +1597,8 @@ getMessageEffect effect_id:int64 = MessageEffect; //@quote_position Approximate quote position in UTF-16 code units searchQuote text:formattedText quote:formattedText quote_position:int32 = FoundPosition; -//@description Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously @text The text in which to look for entities +//@description Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, TON blockchain addresses, URLs, and email addresses) found in the text. Can be called synchronously +//@text The text in which to look for entities getTextEntities text:string = TextEntities; //@description Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl, @@ -3730,15 +3745,18 @@ reorderBotMediaPreviews bot_user_id:int53 language_code:string file_ids:vector = Ok; -//@description Checks whether a username can be set for a new bot. Use checkChatUsername to check username for other chat types +//@description Checks whether a username can be set for a new bot or assigned as a secondary username to an existing bot. Use checkChatUsername to check username for other chat types //@username Username to be checked -checkBotUsername username:string = CheckChatUsernameResult; +//@is_secondary Pass true to check whether the username is suitable as a secondary username for an existing bot; pass false to check whether the username is suitable for createBot +checkBotUsername username:string is_secondary:Bool = CheckChatUsernameResult; //@description Creates a bot which will be managed by another bot. Returns the created bot. May return an error with a message "BOT_CREATE_LIMIT_EXCEEDED" //-if the user already owns the maximum allowed number of bots as per getOption("owned_bot_count_max"). An internal link "https://t.me/BotFather?start=deletebot" can be processed to handle the error //@manager_bot_user_id Identifier of the bot that will manage the created bot //@name Name of the bot; 1-64 characters -//@username Username of the bot. The username must end with "bot". Use checkBotUsername to find whether the name is suitable +//@username Username of the bot. The username must end with "bot" or a string from updateAllowedBotUsernamePremiumSuffixes case-insensitive. +//-Use checkBotUsername to find whether the name is suitable. If the username doesn't end with "bot", then the current user must have Telegram Premium subscription, +//-the chosen username will be assigned as secondary and an additional regular username ending with "bot" will be automatically assigned to the created bot //@via_link Pass true if the bot is created from an internalLinkTypeRequestManagedBot link createBot manager_bot_user_id:int53 name:string username:string via_link:Bool = User; @@ -3767,6 +3785,16 @@ getBotName bot_user_id:int53 language_code:string = Text; //@description Changes a profile photo for a bot @bot_user_id Identifier of the target bot @photo Profile photo to set; pass null to delete the chat photo setBotProfilePhoto bot_user_id:int53 photo:InputChatPhoto = Ok; +//@description Adds a secondary username to a bot. Can be called only if userTypeBot.can_be_edited, the bot has no secondary username and the current user has Telegram Premium subscription. +//-May return an error with a message "OWNER_USERNAMES_LIMIT_EXCEEDED" if the current user already owns at least getOption("secondary_bot_username_count_max") bots with a secondary username +//@bot_user_id Identifier of the target bot +//@username The new secondary username; must be non-empty. Use checkBotUsername to check username validness +addBotSecondaryUsername bot_user_id:int53 username:string = Ok; + +//@description Removes a secondary username from a bot. Can be called only if userTypeBot.can_be_edited == true and the bot has a secondary username +//@bot_user_id Identifier of the target bot +deleteBotSecondaryUsername bot_user_id:int53 = Ok; + //@description Changes active state for a username of a bot. The editable username can be disabled only if there are other active usernames. //-May return an error with a message "USERNAMES_ACTIVE_TOO_MUCH" if the maximum number of active usernames has been reached. Can be called only if userTypeBot.can_be_edited == true //@bot_user_id Identifier of the target bot @@ -3803,9 +3831,9 @@ getBotInfoShortDescription bot_user_id:int53 language_code:string = Text; //@description Changes the verification status of a user or a chat by an owned bot //@bot_user_id Identifier of the owned bot, which will verify the user or the chat //@verified_id Identifier of the user or the supergroup or channel chat, which will be verified by the bot -//@custom_description Custom description of verification reason; 0-getOption("bot_verification_custom_description_length_max"). +//@custom_description Custom description of verification reason; 0-getOption("bot_verification_custom_description_length_max") characters. Only TextUrl entities are supported. //-If empty, then "was verified by organization "organization_name"" will be used as description. Can be specified only if the bot is allowed to provide custom description -setMessageSenderBotVerification bot_user_id:int53 verified_id:MessageSender custom_description:string = Ok; +setMessageSenderBotVerification bot_user_id:int53 verified_id:MessageSender custom_description:formattedText = Ok; //@description Removes the verification status of a user or a chat by an owned bot //@bot_user_id Identifier of the owned bot, which verified the user or the chat @@ -4400,7 +4428,7 @@ getDefaultMessageAutoDeleteTime = MessageAutoDeleteTime; //@description Removes a chat action bar without any other action @chat_id Chat identifier removeChatActionBar chat_id:int53 = Ok; -//@description Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported +//@description Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, if chat.can_be_reported, or if messageProperties.can_report_chat //@chat_id Chat identifier //@option_id Option identifier chosen by the user; leave empty for the initial request //@message_ids Identifiers of reported messages. Use messageProperties.can_report_chat to check whether the message can be reported @@ -4440,12 +4468,197 @@ getChatRevenueWithdrawalUrl chat_id:int53 password:string = HttpUrl; //@limit The maximum number of transactions to be returned; up to 100 getChatRevenueTransactions chat_id:int53 offset:string limit:int32 = ChatRevenueTransactions; -//@description Returns the list of TON blockchain transactions of the current user +//@description Returns the list of TON Gram transactions of the current user //@direction Direction of the transactions to receive; pass null to get all transactions //@offset Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results //@limit The maximum number of transactions to return getTonTransactions direction:TransactionDirection offset:string limit:int32 = TonTransactions; +//@description Returns the list of TON wallet transactions of the current user; can be used only if getOption("can_use_ton_wallet") +//@direction Direction of the transactions to receive; pass null to get all transactions +//@offset Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results +//@limit The maximum number of transactions to return +getTonWalletTransactions direction:TransactionDirection offset:string limit:int32 = TonWalletTransactions; + +//@description Returns a TON wallet transaction by their identifier @transaction_id Identifier of the transaction +getTonWalletTransaction transaction_id:string = TonWalletTransaction; + +//@description Returns a TON wallet transaction by their msg_hash; return an error if the transaction isn't finalized yet @msg_hash Value of msg_hash of the transaction +getTonWalletTransactionByMsgHash msg_hash:string = TonWalletTransaction; + + +//@description Loads state of the TON wallet of the current user; can be used only if getOption("can_use_ton_wallet") +loadTonWalletState = Ok; + +//@description Loads or reloads the current state of gasless transfers for the current user; can be used only if getOption("can_use_ton_wallet") +loadTonWalletGaslessTransfersInfo = Ok; + +//@description Returns information about balance of the current user in the bot https://t.me/walt; can be used only if getOption("can_use_ton_wallet") +checkWalletBotBalance = WalletBotBalance; + +//@description Returns TON wallet addresses of the specified users; can be used only if getOption("can_use_ton_wallet") +//@user_ids Identifiers of the users whose wallet addresses have to be returned. If a user has no TON wallet, it will be skipped in the result +getUserTonWalletAddresses user_ids:vector = UserTonWalletAddresses; + +//@description Creates a TON wallet for the specified regular user; can be used only if getOption("can_use_ton_wallet"). The current user must have positive TON wallet balance @user_id Identifier of the user +createUserTonWallet user_id:int53 = UserTonWalletAddress; + +//@description Returns information about a TON wallet with the given address; can be used only if getOption("can_use_ton_wallet") @address Address in the TON blockchain +getAddressTonWallet address:string = UserTonWalletAddress; + +//@description Returns the secret phrase of the user's TON wallet as a space separated list of words. Works only if tonWalletState.can_export_phrase is true +//@password Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request +getTonWalletSecretPhrase password:string = Text; + +//@description Returns a challenge which may be used to proof ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") +getTonWalletOwnershipProofChallenge = TonWalletOwnershipProofChallenge; + +//@description Enables backup of the TON wallet of the user. Works only if tonWalletState.can_enable_backup is true +//@secret_phrase The secret phrase of the user's TON wallet as a space separated list of words +//@proof Proof of the TON wallet ownership; use getTonWalletOwnershipProofChallenge to get a challenge for the proof +enableTonWalletBackup secret_phrase:string proof:tonWalletOwnershipProof = Ok; + +//@description Disables backup of the TON wallet of the user. Works only if tonWalletState.is_backup_enabled is true +//@password Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request +disableTonWalletBackup password:string = Ok; + +//@description Disables backup of the TON wallet of the user using proof of wallet ownership instead of the password. Works only if tonWalletState.is_backup_enabled is true +//@proof Proof of the TON wallet ownership; use getTonWalletOwnershipProofChallenge to get a challenge for the proof +disableTonWalletBackupWithProof proof:tonWalletOwnershipProof = Ok; + +//@description Sends a cryptocurrency from the user's TON wallet; can be used only if getOption("can_use_ton_wallet") +//@user_id Identifier of the user who will receive the transfer; pass 0 if unknown +//@address Address in the TON blockchain of the transaction peer +//@amount The amount of the sent cryptocurrency, in the smallest units of the cryptocurrency +//@comment Comment added to the transaction +//@is_comment_encrypted Pass true if the comment is encrypted and must be decrypted using the receiver's or sender's private key +//@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 +//@regular_transfer_data Serialized data for regular cryptocurrency transfer request. The minimum allowed transfer amount is getOption("ton_wallet_transfer_amount_min") +//@gasless_transfer_data Serialized data for gasless cryptocurrency transfer request; pass an empty string to force a regular request. +//-The minimum allowed transfer amount for a gassless transfer is getOption("ton_wallet_gasless_transfer_amount_min") +sendTonWalletTransfer user_id:int53 address:string amount:int53 comment:string is_comment_encrypted:Bool sending_id:int32 regular_transfer_data:bytes gasless_transfer_data:bytes = TonWalletTransferResult; + +//@description Deletes the current TON wallet of the user and creates a new one; can be used only if getOption("can_use_ton_wallet") +//@password Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request +deleteTonWallet password:string = Ok; + +//@description Replaces the current TON wallet with another existing v6r2 wallet or changes private key of the current TON wallet; can be used only if getOption("can_use_ton_wallet") +//@password Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request +//@anchor_public_key Original public key of the new TON wallet +//@proof Proof of ownership of the new private key of the TON wallet; use getTonWalletOwnershipProofChallenge to get a challenge for the proof +replaceTonWallet password:string anchor_public_key:bytes proof:tonWalletOwnershipProof = Ok; + +//@description Returns exchange rates of currencies to USD +getCurrencyExchangeRates = CurrencyExchangeRates; + +//@description Returns NFTs stored on the TON wallet of the user; can be used only if getOption("can_use_ton_wallet") +//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results +//@limit The maximum number of NFTs to be returned; must be positive and can't be greater than 20 +getTonWalletNfts offset:string limit:int32 = TonNfts; + + +//@description Returns active TON Connect sessions; can be used only if getOption("can_use_ton_wallet") +getTonConnectSessions = TonConnectSessions; + +//@description Creates a TON Connect session; can be used only if getOption("can_use_ton_wallet") +//@dapp_client_id Hex-encoded public X25519 key of the dApp +//@manifest_url URL of the manifest of the dApp +createTonConnectSession dapp_client_id:string manifest_url:string = TonConnectSession; + +//@description Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session +//@session_id Unique identifier of the session +//@wallet_client_id Hex-encoded public X25519 key of the current user's application calculated from the TON wallet private key and session parameters +setTonConnectSessionWalletClientId session_id:int64 wallet_client_id:string = TonConnectChallenge; + +//@description Accepts or rejects a TON Connect session +//@session_id Unique identifier of the session +//@challenge_answer Answer to the challenge received from setTonConnectSessionWalletClientId +//@is_error Pass true to reject the request; pass false to accept it +//@body Body of the result +//@trace_id Identifier to trace the connection request +sendTonConnectSessionConnectResult session_id:int64 challenge_answer:bytes is_error:Bool body:bytes trace_id:string = Ok; + +//@description Returns pending requests in a TON Connect session @session_id Unique identifier of the session +getTonConnectSessionPendingRequests session_id:int64 = TonConnectRequests; + +//@description Returns pending requests with a dApp through TON Connect @dapp_client_id Hex-encoded public X25519 key of the dApp +getTonConnectDAppPendingRequests dapp_client_id:string = TonConnectRequests; + +//@description Claims a request received through TON Connect for processing on this device +//@session_id Unique identifier of the TON Connect session +//@message_id Identifier of the message with the request +//@dapp_request_id Identifier of the request assigned by the dApp +//@is_rejected Pass true to reject the request +claimTonConnectRequest session_id:int64 message_id:int53 dapp_request_id:string is_rejected:Bool = Ok; + +//@description Sends an answer for a request received through TON Connect +//@session_id Unique identifier of the TON Connect session +//@message_id Identifier of the message with the request +//@trace_id Identifier to trace the request +//@body Body of the response +answerTonConnectRequest session_id:int64 message_id:int53 trace_id:string body:bytes = Ok; + +//@description Returns the next event identifier for the given TON Connect session @session_id Unique identifier of the TON Connect session +getTonConnectSessionNextEventId session_id:int64 = TonConnectSessionEventId; + +//@description Closes a TON Connect session +//@session_id Unique identifier of the TON Connect session to close +//@body Encrypted body of the disconnect event; may be empty if the session has already been closed. Use getTonConnectSessionNextEventId to get event identifier for the event +disconnectTonConnectSession session_id:int64 body:bytes = Ok; + + +//@description Returns available on-ramp providers @cryptocurrency Pass a cryptocurrency to receive only providers that support it; pass an empty string to receive all providers +getOnRampProviders cryptocurrency:string = OnRampProviders; + +//@description Returns the list of fiat currencies supported by an on-ramp provider for the given cryptocurrency +//@provider_id Unique identifier of the on-ramp provider; only for providers that supports base currencies +//@cryptocurrency The cryptocurrency that will be bought +getOnRampProviderBaseCurrencies provider_id:string cryptocurrency:string = Currencies; + +//@description Returns the available on-ramp payment methods based on the current user location +//@provider_id Unique identifier of the on-ramp provider +//@cryptocurrency The cryptocurrency that will be bought +//@base_currency ISO 4217 currency code of the currency that will be used for the purchase; pass an empty string if unknown +getOnRampPaymentAvailability provider_id:string cryptocurrency:string base_currency:string = OnRampPaymentAvailability; + +//@description Returns the limits for an on-ramp payment; only for providers that supports limits retrieval +//@provider_id Unique identifier of the on-ramp provider +//@cryptocurrency The cryptocurrency that will be bought +//@base_currency ISO 4217 currency code of the currency that will be used for the purchase +//@payment_method_name Name of the chosen payment method; pass an empty string if none +getOnRampPaymentLimits provider_id:string cryptocurrency:string base_currency:string payment_method_name:string = OnRampPaymentLimits; + +//@description Returns a quote for an on-ramp payment; only for providers that supports quote retrieval +//@provider_id Unique identifier of the on-ramp provider +//@cryptocurrency The cryptocurrency that will be bought +//@base_currency ISO 4217 currency code of the currency that will be used for the purchase +//@cryptocurrency_amount The amount of the cryptocurrency to buy; pass an empty string if the user selected base_currency_amount +//@base_currency_amount The amount of the base currency to spend; pass an empty string if the user selected cryptocurrency_amount +//@payment_method_name Name of the chosen payment method; pass an empty string if none +getOnRampPaymentQuote provider_id:string cryptocurrency:string base_currency:string cryptocurrency_amount:string base_currency_amount:string payment_method_name:string = OnRampPaymentQuote; + +//@description Creates a session for an on-ramp payment +//@provider_id Unique identifier of the on-ramp provider +//@cryptocurrency The cryptocurrency that will be bought +//@address Address to which the cryptocurrency will be sent +//@payment_method_name Name of the chosen payment method; pass an empty string if none +//@base_currency ISO 4217 currency code of the currency that will be used for the purchase; pass an empty string if unknown +//@cryptocurrency_amount The amount of the cryptocurrency to buy; pass an empty string if the user selected base_currency_amount +//@base_currency_amount The amount of the base currency to spend; pass an empty string if the user selected cryptocurrency_amount +//@memo Memo for the query; pass an empty string if none +//@theme Preferred theme for the WebView; pass "light" for a light theme, "dark" for a dark theme, or leave empty for a default theme +//@success_return_url The URL opened on successful payment; pass an empty string if none +//@fail_return_url The URL opened on failed payment; pass an empty string if none +createOnRampPaymentSession provider_id:string cryptocurrency:string address:string payment_method_name:string base_currency:string cryptocurrency_amount:string base_currency_amount:string memo:string theme:string success_return_url:string fail_return_url:string = OnRampPaymentSession; + +//@description Sends a request to TON Center API and returns its response in JSON format +//@endpoint The path of the requested endpoint. See https://toncenter.com/api/v3/index.html for the list of supported endpoints +//@type Type of the request +sendTonCenterApiRequest endpoint:string type:TonCenterApiRequestType = Text; + +//@description Returns a URL for TON Center Streaming API +getTonCenterStreamingApiUrl = TonCenterStreamingApiUrl; + //@description Returns detailed Telegram Star revenue statistics //@owner_id Identifier of the owner of the Telegram Stars; can be identifier of the current user, an owned bot, or a supergroup or a channel chat with supergroupFullInfo.can_get_star_revenue_statistics == true @@ -4904,6 +5117,10 @@ getCollectibleItemInfo type:CollectibleItemType = CollectibleItemInfo; getDeepLinkInfo link:string = DeepLinkInfo; +//@description Dismissess a received web token without consumption; for official Telegram apps only @token The token to dismiss +dismissWebToken token:string = Ok; + + //@description Returns application config, provided by the server. Can be called before authorization getApplicationConfig = JsonValue; diff --git a/TdLib.CodeGen/Types.tl b/TdLib.CodeGen/Types.tl index 184b899c..d59d1ad3 100644 --- a/TdLib.CodeGen/Types.tl +++ b/TdLib.CodeGen/Types.tl @@ -629,7 +629,8 @@ voiceNote duration:int32 waveform:bytes mime_type:string speech_recognition_resu //@sticker_height Expected height of the sticker, which can be used if the sticker is null //@fitzpatrick_type Emoji modifier fitzpatrick type; 0-6; 0 if none //@sound File containing the sound to be played when the sticker is clicked; may be null. The sound is encoded with the Opus codec, and stored inside an OGG container -animatedEmoji sticker:sticker sticker_width:int32 sticker_height:int32 fitzpatrick_type:int32 sound:file = AnimatedEmoji; +//@is_regular_emoji True, if the emoji is a regular emoji +animatedEmoji sticker:sticker sticker_width:int32 sticker_height:int32 fitzpatrick_type:int32 sound:file is_regular_emoji:Bool = AnimatedEmoji; //@description Describes a contact of a user //@phone_number Phone number of the user @@ -849,7 +850,7 @@ botVerificationParameters icon_custom_emoji_id:int64 organization_name:string de //@description Describes verification status provided by a bot //@bot_user_id Identifier of the bot that provided the verification //@icon_custom_emoji_id Identifier of the custom emoji that is used as the verification sign -//@custom_description Custom description of verification reason set by the bot. Can contain only Mention, Hashtag, Cashtag, PhoneNumber, BankCardNumber, Url, and EmailAddress entities +//@custom_description Custom description of verification reason set by the bot. Can contain only Mention, Hashtag, Cashtag, PhoneNumber, BankCardNumber, TonAddress, Url, and EmailAddress entities botVerification bot_user_id:int53 icon_custom_emoji_id:int64 custom_description:formattedText = BotVerification; //@description Contains information about verification status of a chat or a user @@ -2168,6 +2169,312 @@ tonTransaction id:string gram_amount:int53 is_refund:Bool date:int32 type:TonTra tonTransactions gram_amount:int53 transactions:vector next_offset:string = TonTransactions; +//@class TonCenterApiRequestType @description Describes state of active stories posted by a chat + +//@description A GET request @query URL-encoded query of the request +tonCenterApiRequestTypeGet query:string = TonCenterApiRequestType; + +//@description A POST request @payload Payload of the request +tonCenterApiRequestTypePost payload:string = TonCenterApiRequestType; + + +//@class TonWalletTransferReceiver @description Represents expected receiver of a TON wallet transfer + +//@description The receiver is specified by its username @username Username of the user. Use searchPublicChat to find the user, check that it is a regular user, +//-and then use createUserTonWallet to get information about the user's TON wallet +tonWalletTransferReceiverUser username:string = TonWalletTransferReceiver; + +//@description The receiver is specified by its address @address Address of the receiver. Use getAddressTonWallet to get information about the user's TON wallet +tonWalletTransferReceiverAddress address:string = TonWalletTransferReceiver; + + +//@description Contains an HTTP URL for TON Center Streaming API @url The URL @expires_in Time after which the URL expires +tonCenterStreamingApiUrl url:string expires_in:int32 = TonCenterStreamingApiUrl; + +//@description Describes balance of the current user in the bot https://t.me/walt +//@has_balance True, if the user has positive TON Gram balance +//@url The URL to open to launch the bot; may be empty if none +walletBotBalance has_balance:Bool url:string = WalletBotBalance; + +//@description Contains TON wallet address of a user +//@user_id Identifier of the user; 0 if unknown +//@wallet_address Address of the user's wallet in the TON blockchain +//@public_key Public key of the user +userTonWalletAddress user_id:int53 wallet_address:string public_key:bytes = UserTonWalletAddress; + +//@description Represents a list of TON wallet addresses of users @addresses A list of TON wallet addresses +userTonWalletAddresses addresses:vector = UserTonWalletAddresses; + +//@description Represents a challenge for TON wallet ownership proof +//@payload Payload of the challenge +//@domain Domain of the proof requester +tonWalletOwnershipProofChallenge payload:string domain:string = TonWalletOwnershipProofChallenge; + +//@description Represents a proof of TON wallet ownership +//@public_key Public key of the wallet +//@timestamp The current UNIX timestamp which was used to create the proof +//@signature The signature prooving the ownership +tonWalletOwnershipProof public_key:bytes timestamp:int32 signature:bytes = TonWalletOwnershipProof; + +//@description Represents state of gasless transfers for the current user +//@left_count Number of left gasless transfers. The daily available number of gasless transfers is available as getOption("ton_wallet_gasless_transfer_daily_count_max") +//@reset_date Point in time (Unix timestamp) when the number of left transfers will be reset; 0 if never +//@relayer_address Address of the relayer for gasless transfers; may be empty if unavailable +tonWalletGaslessTransfersInfo left_count:int32 reset_date:int32 relayer_address:string = TonWalletGaslessTransfersInfo; + +//@description Describes exchange rate of a currency to USD +//@currency ISO 4217 currency code of the payment currency +//@rate Exchange rate of the currency to USD +currencyExchangeRate currency:string rate:double = CurrencyExchangeRate; + +//@description Represents a list of currency exchange rates @rates A list of currency exchange rates +currencyExchangeRates rates:vector = CurrencyExchangeRates; + +//@description Describes an on-ramp provider +//@id Unique identifier of the provider +//@name Name of the provider +//@cryptocurrencies List of cryptocurrencies supported by the provider +//@supports_base_currencies True, if the provider supports base currencies and can be used in the method getOnRampProviderBaseCurrencies +//@supports_limits True, if the provider supports limits retrieval using the method getOnRampPaymentLimits +//@supports_quote True, if the provider supports quote retrieval using the method getOnRampPaymentQuote +onRampProvider id:string name:string cryptocurrencies:vector supports_base_currencies:Bool supports_limits:Bool supports_quote:Bool = OnRampProvider; + +//@description Represents a list of on-ramp providers @providers A list of providers +onRampProviders providers:vector = OnRampProviders; + +//@description Represents a list of currencies @currencies A list of ISO 4217 currency codes +currencies currencies:vector = Currencies; + +//@description Describes a payment method of an on-ramp provider +//@name Name of the method +//@is_available True, if the method is available to the user +onRampPaymentMethod name:string is_available:Bool = OnRampPaymentMethod; + +//@description Describes availability of cryptocurrency purchase through an on-ramp provider +//@is_allowed True, if the current user can use the provider +//@is_purchase_allowed True, if the current user can purchase through the provider +//@methods The list of available payment methods +//@country_code A two-letter ISO 3166-1 alpha-2 country code of the current user's country +//@state Code of the state of the current user; may be empty if unknown +onRampPaymentAvailability is_allowed:Bool is_purchase_allowed:Bool methods:vector country_code:string state:string = OnRampPaymentAvailability; + +//@description Describes limits for an on-ramp purchase +//@payment_method The payment method to be used +//@base_currency_min_amount The minimum allowed amount of the base currency +//@base_currency_max_amount The maximum allowed amount of the base currency +//@cryptocurrency_min_amount The minimum allowed amount of the bought cryptocurrency +//@cryptocurrency_max_amount The maximum allowed amount of the bought cryptocurrency +onRampPaymentLimits payment_method:string base_currency_min_amount:string base_currency_max_amount:string cryptocurrency_min_amount:string cryptocurrency_max_amount:string = OnRampPaymentLimits; + +//@description Describes a quote for an on-ramp purchase +//@payment_method The payment method to be used +//@expiration_date Point in time (Unix timestamp) when the quote will expire +//@base_currency_amount Paid amount of the base currency +//@cryptocurrency_amount Purchased amount of the cryptocurrency +//@cryptocurrency_price The price of the cryptocurrency +//@fee_amount Fee amount +//@extra_fee_amount Extra fee amount +//@network_fee_amount Network fee amount +//@total_amount Total paid amount +onRampPaymentQuote payment_method:string expiration_date:int32 base_currency_amount:string cryptocurrency_amount:string cryptocurrency_price:string fee_amount:string extra_fee_amount:string network_fee_amount:string total_amount:string = OnRampPaymentQuote; + +//@description Describes a session for an on-ramp purchase +//@session_id Identifier of the session +//@expiration_date Point in time (Unix timestamp) when the session will expire +//@url HTTPS URL to be opened in a WebView to complete the purchase +onRampPaymentSession session_id:string expiration_date:int32 url:string = OnRampPaymentSession; + +//@description Describes state of the wallet of the current user in the TON blockchain +//@address Address of the wallet; may be empty if none +//@public_key Public key of the wallet; may be empty if none +//@gram_amount The total amount of owned TON Grams, in the smallest units of the cryptocurrency +//@is_being_created True, if the wallet is being created +//@is_backup_enabled True, if backup for the wallet key is enabled +//@can_enable_backup True, if the user can enable backup for the wallet key +//@can_export_phrase True, if the wallet key can be exported using getTonWalletSecretPhrase +tonWalletState address:string public_key:bytes gram_amount:int53 is_being_created:Bool is_backup_enabled:Bool can_enable_backup:Bool can_export_phrase:Bool = TonWalletState; + +//@description Represents an attribute of an NFT in the TON blockchain +//@trait_type Trait type +//@value Value of the attribute +tonNftAttribute trait_type:string value:string = TonNftAttribute; + +//@description Represents an NFT in the TON blockchain +//@collection_address Address of the collection to which the NFT belongs; may be empty if unknown +//@address Address of the NFT +//@owner_address Address of the owner of the NFT +//@index Index of the NFT among all NFTs from the collection as a decimal number +//@name Name of the NFT +//@param_description Description of the NFT +//@image Image of the NFT; may be null if none +//@thumbnail Thumbnail of the NFT; may be null if none +//@content Content of the NFT; may be null if none +//@sticker Sticker of the NFT; may be null if none +//@attributes Attributes of the NFT +//@extra Additional data about the NFT; may be null if none +tonNft collection_address:string address:string owner_address:string index:string name:string description:string image:photoSize thumbnail:photoSize content:document sticker:sticker attributes:vector extra:JsonValue = TonNft; + +//@description Represents a list of TON NFTs +//@nfts List of NFTs +//@next_offset The offset for the next request. If empty, then there are no more results +tonNfts nfts:vector next_offset:string = TonNfts; + + +//@class TonWalletTransactionState @description Describes state of a transaction with a TON wallet + +//@description The transaction succeeded @tx_hash Hash of the transaction +tonWalletTransactionStateSucceeded tx_hash:string = TonWalletTransactionState; + +//@description The transaction failed +tonWalletTransactionStateFailed = TonWalletTransactionState; + + +//@class TonWalletTransactionType @description Describes type of transaction with a TON wallet + +//@description The transaction is a deposit from an on-ramp provider +//@amount The amount of received cryptocurrency, in the smallest units of the cryptocurrency +//@provider_name Name of the on-ramp provider +tonWalletTransactionTypeOnRampDeposit amount:int53 provider_name:string = TonWalletTransactionType; + +//@description A transfer of TON Grams to or from the wallet +//@amount The amount of received cryptocurrency, in the smallest units of the cryptocurrency; negative for outgoing transactions +//@is_gasless True, if the fee was paid by Telegram +//@comment Comment added to the transaction +//@is_comment_encrypted True, if the comment is encrypted and must be decrypted using the user's private key +tonWalletTransactionTypeTransfer amount:int53 is_gasless:Bool comment:string is_comment_encrypted:Bool = TonWalletTransactionType; + +//@description A transfer of a TON NFT to or from the wallet +//@nft The transferred NFT +//@is_outgoing True, if the transfer is outgoing +//@comment Comment added to the transaction +//@is_comment_encrypted True, if the comment is encrypted and must be decrypted using the user's private key +tonWalletTransactionTypeNftTransfer nft:tonNft is_outgoing:Bool comment:string is_comment_encrypted:Bool = TonWalletTransactionType; + +//@description Change of the wallet key +tonWalletTransactionTypeKeyChange = TonWalletTransactionType; + + +//@description Represents a transaction with the TON wallet of the current user +//@id Unique identifier of the transaction +//@peer_address Address in the TON blockchain of the transaction peer; may be empty if the transaction isn't a wallet transfer +//@peer_user_id Identifier of the other user who participated in the transaction; 0 if unknown +//@peer_domain Identifier of the domain assigned to the peer address; may be empty if none +//@date Point in time (Unix timestamp) when the transaction was completed +//@fee_amount The fee amount paid for the transaction in TON Grams, in the smallest units of the cryptocurrency +//@state State of the transaction +//@type Type of the transaction +tonWalletTransaction id:string peer_address:string peer_user_id:int53 peer_domain:string date:int32 fee_amount:int53 state:TonWalletTransactionState type:TonWalletTransactionType = TonWalletTransaction; + +//@description Represents a list of TON Gram transactions +//@gram_amount The total amount of owned TON Grams, in the smallest units of the cryptocurrency +//@transactions List of transactions +//@next_offset The offset for the next request. If empty, then there are no more results +tonWalletTransactions gram_amount:int53 transactions:vector next_offset:string = TonWalletTransactions; + + +//@class TonConnectRequestState @description Describes state of a request received from a dApp through TON Connect + +//@description The request must be accepted or rejected if it isn't expired yet +//@expiration_date Point in time (Unix timestamp) when the request will expire or has expired +tonConnectRequestStatePending expiration_date:int32 = TonConnectRequestState; + +//@description The request was accepted +tonConnectRequestStateAccepted = TonConnectRequestState; + +//@description The request was rejected +tonConnectRequestStateRejected = TonConnectRequestState; + + +//@class TonConnectManifest @description Describes manifest of the dApp that is being connected using TON Connect + +//@description The manifest is being downloaded +tonConnectManifestPending = TonConnectManifest; + +//@description The manifest is available +//@url URL of the dApp +//@name Name of the dApp +//@icon App icon in PNG or ICO format +tonConnectManifestInfo url:string name:string icon:document = TonConnectManifest; + +//@description The manifest has failed to download +tonConnectManifestFailed = TonConnectManifest; + +//@description The manifest is invalid +tonConnectManifestInvalid = TonConnectManifest; + + +//@class TonConnectSessionState @description Describes state of a TON Connect session + +//@description The session is pending +tonConnectSessionStatePending = TonConnectSessionState; + +//@description The session is ready +tonConnectSessionStateReady = TonConnectSessionState; + +//@description The session is being closed +tonConnectSessionStateClosing = TonConnectSessionState; + +//@description The session is closed +tonConnectSessionStateClosed = TonConnectSessionState; + + +//@class TonConnectConnectItem @description Represents a data item to share with a dApp + +//@description Address of the wallet @network Stringified TON network global_id (e.g. "-239" for mainnet); may be empty +tonConnectConnectItemAddress network:string = TonConnectConnectItem; + +//@description Proof of the wallet ownership @payload Payload to be used for the proof (e.g. nonce + expiration timestamp) +tonConnectConnectItemProof payload:string = TonConnectConnectItem; + + +//@description Contains information about a request to connect the user's TON wallet to a dApp using TON Connect +//@manifest_url URL of the manifest of the dApp +//@items Items requested from the wallet +tonConnectConnectRequest manifest_url:string items:vector = TonConnectConnectRequest; + +//@description Represents a TON Connect session. See https://github.com/ton-blockchain/ton-connect/tree/main/spec for full TON Connect protocol documentation +//@id Unique identifier of the session +//@dapp_client_id Hex-encoded public X25519 key of the dApp +//@wallet_client_id Hex-encoded public X25519 key of the current user's application; may be empty if none +//@creation_date Point in time (Unix timestamp) when the session was created +//@manifest Manifest of the dApp +//@nonce Nonce used for the session +//@state Session state +tonConnectSession id:int64 dapp_client_id:string wallet_client_id:string creation_date:int32 manifest:TonConnectManifest nonce:bytes state:TonConnectSessionState = TonConnectSession; + +//@description Contains a list of TON Connect sessions @sessions The list of sessions +tonConnectSessions sessions:vector = TonConnectSessions; + +//@description Represents a pending TON Connect request +//@session_id Unique identifier of the session +//@message_id Unique identifier of the service message in the chat 777000 with the request +//@body Body of the request +//@expiration_date Point in time (Unix timestamp) when the request will expire; 0 if never +//@topic Topic of the request; may be empty if none +//@trace_id Identifier to trace the request; may be empty if none +tonConnectRequest session_id:int64 message_id:int53 body:bytes expiration_date:int32 topic:string trace_id:string = TonConnectRequest; + +//@description Represents a session with its pending TON Connect requests +//@session The session +//@requests The requests +tonConnectRequests session:tonConnectSession requests:vector = TonConnectRequests; + +//@description Represents a TON Connect challenge +//@challenge 104-byte challenge +//@event_id Unique identifier of the first outgoing event +tonConnectChallenge challenge:bytes event_id:int64 = TonConnectChallenge; + +//@description Represents identifier of an event in a TON Connect session @event_id The event identifier +tonConnectSessionEventId event_id:int64 = TonConnectSessionEventId; + + +//@description Represents result of cryptocurrency transfer from the current user's TON wallet +//@is_gasless True, if the transfer is gasless +//@msg_hash Unique identifier of the sent message; use getTonWalletTransactionByMsgHash to poll information about the transaction +//@transaction The completed transaction; may be null if the transaction is still pending +tonWalletTransferResult is_gasless:Bool msg_hash:bytes transaction:tonWalletTransaction = TonWalletTransferResult; + + //@class ActiveStoryState @description Describes state of active stories posted by a chat //@description The chat has an active live story @story_id Identifier of the active live story @@ -2369,7 +2676,9 @@ emojiStatusCustomEmojis custom_emoji_ids:vector = EmojiStatusCustomEmojis //@disabled_usernames List of currently disabled usernames; the username can be activated with toggleUsernameIsActive, toggleBotUsernameIsActive, or toggleSupergroupUsernameIsActive //@editable_username Active or disabled username, which may be changed with setUsername or setSupergroupUsername //@collectible_usernames Collectible usernames that were purchased at https://fragment.com and can be passed to getCollectibleItemInfo for more details -usernames active_usernames:vector disabled_usernames:vector editable_username:string collectible_usernames:vector = Usernames; +//@secondary_username Secondary non-collectible username; for bots only. Can't be used in toggleBotUsernameIsActive; use addBotSecondaryUsername or deleteBotSecondaryUsername to edit it. +//-If the username is disabled, then Telegram Premium subscription is required to re-enable it +usernames active_usernames:vector disabled_usernames:vector editable_username:string collectible_usernames:vector secondary_username:string = Usernames; //@description Represents a user @@ -2622,7 +2931,8 @@ chatJoinRequestResultQueued = ChatJoinRequestResult; //@expired_member_count Number of chat members, which joined the chat using the link, but have already left because of expired subscription; for subscription links only //@pending_join_request_count Number of pending join requests created using this link //@creates_join_request True, if the link only creates join request. If true, total number of joining members will be unlimited -//@is_primary True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time +//@is_primary True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. Primary link can create join requests only if this is set up using toggleSupergroupJoinByRequest. +//-There is exactly one primary invite link for each administrator with can_invite_users right at a given time //@is_revoked True, if the link was revoked chatInviteLink invite_link:string name:string creator_user_id:int53 date:int32 edit_date:int32 expiration_date:int32 subscription_pricing:starSubscriptionPricing member_limit:int32 member_count:int32 expired_member_count:int32 pending_join_request_count:int32 creates_join_request:Bool is_primary:Bool is_revoked:Bool = ChatInviteLink; @@ -4016,8 +4326,9 @@ builtInThemeArctic = BuiltInTheme; //@background The background to be used in chats; may be null //@outgoing_message_fill The fill to be used as a background for outgoing messages; may be null if the fill from the base theme must be used instead //@animate_outgoing_message_fill If true, the freeform gradient fill needs to be animated on every sent message -//@outgoing_message_accent_color Accent color of outgoing messages in ARGB format -themeSettings base_theme:BuiltInTheme accent_color:int32 background:background outgoing_message_fill:BackgroundFill animate_outgoing_message_fill:Bool outgoing_message_accent_color:int32 = ThemeSettings; +//@has_outgoing_message_accent_color True, if there is chosen accent color for outgoing messages; otherwise, the color must be deduced from other theme settings +//@outgoing_message_accent_color Accent color of outgoing messages in ARGB format; must be ignored if has_outgoing_message_accent_color is false +themeSettings base_theme:BuiltInTheme accent_color:int32 background:background outgoing_message_fill:BackgroundFill animate_outgoing_message_fill:Bool has_outgoing_message_accent_color:Bool outgoing_message_accent_color:int32 = ThemeSettings; //@description Represents a button inside a rich message @@ -4077,6 +4388,9 @@ richTextCashtag text:RichText cashtag:string = RichText; //@description A bank card number @text Text @bank_card_number The number of the bank card richTextBankCardNumber text:RichText bank_card_number:string = RichText; +//@description An address in the TON blockchain @text Text @address The address +richTextTonAddress text:RichText address:string = RichText; + //@description A bot command @text Text @bot_command The bot command richTextBotCommand text:RichText bot_command:string = RichText; @@ -5546,6 +5860,23 @@ messageGiftedGrams gifter_user_id:int53 receiver_user_id:int53 gram_amount:int53 //@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; +//@description Represents a transfer with the TON wallet of the current user +//@sender_user_id Sender of the transfer; 0 if unknown +//@transaction_id Unique identifier of the transaction; may be empty if the transfer isn't send yet. Use getTonWalletTransaction to get additional information about the transaction +//@peer_address Address in the TON blockchain of the transaction peer +//@amount The amount of received cryptocurrency, in the smallest units of the cryptocurrency; negative for outgoing transactions +//@comment Comment added to the transaction +//@is_comment_encrypted True, if the comment is encrypted and must be decrypted using the receiver's or sender's private key +messageTonWalletTransfer sender_user_id:int53 transaction_id:string peer_address:string amount:int53 comment:string is_comment_encrypted:Bool = MessageContent; + +//@description A request from a dApp was received through TON Connect +//@session_id Unique identifier of the TON Connect session +//@state State of the request +//@dapp_name Name of the dApp; may be empty if unknown +//@topic Topic of the request; may be empty if none +//@trace_id Identifier to trace the request; may be empty if none +messageTonConnectRequest session_id:int64 state:TonConnectRequestState dapp_name:string topic:string trace_id:string = MessageContent; + //@description A regular gift was received or sent by the current user, or the current user was notified about a channel gift //@gift The gift //@sender_id Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users @@ -5739,6 +6070,9 @@ textEntityTypePhoneNumber = TextEntityType; //@description A bank card number. The getBankCardInfo method can be used to get information about the bank card textEntityTypeBankCardNumber = TextEntityType; +//@description An address in the TON blockchain +textEntityTypeTonAddress = TextEntityType; + //@description A bold text textEntityTypeBold = TextEntityType; @@ -6256,10 +6590,11 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool rep //@can_report_reactions True, if reactions on the message can be reported through reportMessageReactions //@can_report_supergroup_spam True, if the message can be reported using reportSupergroupSpam //@can_set_fact_check True, if fact check for the message can be changed through setMessageFactCheck +//@custom_emoji_ids Identifiers of custom emoji used in the message //@has_protected_content_by_current_user True, if content of the message can't be saved locally, because it is protected by the current user; if true, then can_be_saved is false //@has_protected_content_by_other_user True, if content of the message can't be saved locally, because it is protected by the other user; if true, then can_be_saved is false //@need_show_statistics True, if message statistics must be available from context menu of the message -messageProperties can_add_offer:Bool can_add_tasks:Bool can_be_approved:Bool can_be_copied:Bool can_be_copied_to_secret_chat:Bool can_be_declined:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_paid:Bool can_be_pinned:Bool can_be_replied:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_shared_in_story:Bool can_delete_reactions:Bool can_edit_media:Bool can_edit_scheduling_state:Bool can_edit_suggested_post_info:Bool can_get_author:Bool can_get_embedding_code:Bool can_get_link:Bool can_get_media_timestamp_links:Bool can_get_message_thread:Bool can_get_poll_vote_statistics:Bool can_get_read_date:Bool can_get_statistics:Bool can_get_video_advertisements:Bool can_get_viewers:Bool can_mark_tasks_as_done:Bool can_recognize_speech:Bool can_report_chat:Bool can_report_reactions:Bool can_report_supergroup_spam:Bool can_set_fact_check:Bool has_protected_content_by_current_user:Bool has_protected_content_by_other_user:Bool need_show_statistics:Bool = MessageProperties; +messageProperties can_add_offer:Bool can_add_tasks:Bool can_be_approved:Bool can_be_copied:Bool can_be_copied_to_secret_chat:Bool can_be_declined:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_paid:Bool can_be_pinned:Bool can_be_replied:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_shared_in_story:Bool can_delete_reactions:Bool can_edit_media:Bool can_edit_scheduling_state:Bool can_edit_suggested_post_info:Bool can_get_author:Bool can_get_embedding_code:Bool can_get_link:Bool can_get_media_timestamp_links:Bool can_get_message_thread:Bool can_get_poll_vote_statistics:Bool can_get_read_date:Bool can_get_statistics:Bool can_get_video_advertisements:Bool can_get_viewers:Bool can_mark_tasks_as_done:Bool can_recognize_speech:Bool can_report_chat:Bool can_report_reactions:Bool can_report_supergroup_spam:Bool can_set_fact_check:Bool custom_emoji_ids:vector has_protected_content_by_current_user:Bool has_protected_content_by_other_user:Bool need_show_statistics:Bool = MessageProperties; //@description Contains properties of a poll option and describes actions that can be done with the option right now //@can_be_deleted True, if the option can be deleted using deletePollOption @@ -7861,7 +8196,7 @@ chatEventAccentColorChanged old_accent_color_id:int32 old_background_custom_emoj //@new_profile_background_custom_emoji_id New identifier of the custom emoji; 0 if none chatEventProfileAccentColorChanged old_profile_accent_color_id:int32 old_profile_background_custom_emoji_id:int64 new_profile_accent_color_id:int32 new_profile_background_custom_emoji_id:int64 = ChatEventAction; -//@description The has_protected_content setting of a channel was toggled @has_protected_content New value of has_protected_content +//@description The has_protected_content setting of a chat was toggled @has_protected_content New value of has_protected_content chatEventHasProtectedContentToggled has_protected_content:Bool = ChatEventAction; //@description The can_invite_users permission of a supergroup chat was toggled @can_invite_users New value of can_invite_users permission @@ -7906,7 +8241,7 @@ chatEventVideoChatParticipantIsMutedToggled participant_id:MessageSender is_mute //@description A video chat participant volume level was changed @participant_id Identifier of the affected group call participant @volume_level New value of volume_level; 1-20000 in hundreds of percents chatEventVideoChatParticipantVolumeLevelChanged participant_id:MessageSender volume_level:int32 = ChatEventAction; -//@description The is_forum setting of a channel was toggled @is_forum New value of is_forum +//@description The is_forum setting of a supergroup was toggled @is_forum New value of is_forum chatEventIsForumToggled is_forum:Bool = ChatEventAction; //@description A new forum topic was created @topic_info Information about the topic @@ -8360,7 +8695,8 @@ telegramPaymentPurposePremiumGiveaway parameters:giveawayParameters currency:str //@currency ISO 4217 currency code of the payment currency //@amount Paid amount, in the smallest units of the currency //@star_count Number of bought Telegram Stars -//@chat_id Identifier of the chat that is supposed to receive the Telegram Stars; pass 0 if none +//@chat_id Identifier of the chat that is supposed to receive the Telegram Stars; pass 0 if none. If non-zero and getOption("star_top_up_disabled"), +//-then the payment isn't allowed and the user can't buy Telegram Stars in this place telegramPaymentPurposeStars currency:string amount:int53 star_count:int53 chat_id:int53 = TelegramPaymentPurpose; //@description The user buying Telegram Stars for other users @@ -8693,6 +9029,16 @@ pushMessageContentPremiumGiftCode month_count:int32 = PushMessageContent; //@is_pinned True, if the message is a pinned message with the specified content pushMessageContentGiveaway winner_count:int32 prize:GiveawayPrize is_pinned:Bool = PushMessageContent; +//@description A message with a TON wallet transfer +//@sender_user_id Sender of the transfer; 0 if unknown +//@amount String representation of the received amount +//@comment Comment added to the transaction if it is public +pushMessageContentTonWalletTransfer sender_user_id:int53 amount:string comment:string = PushMessageContent; + +//@description A message with a request from a dApp was received through TON Connect +//@dapp_name Name of the dApp; may be empty if unknown +pushMessageContentTonConnectRequest dapp_name:string = PushMessageContent; + //@description A message with a gift //@star_count Number of Telegram Stars that sender paid for the gift //@is_prepaid_upgrade True, if the message is about prepaid upgrade of the gift by another user instead of actual receiving of a new gift @@ -9580,7 +9926,7 @@ internalLinkTypeQrCodeAuthentication = InternalLinkType; //-If the chat is found, the chat is a chat with a bot and the bot has can_manage_bots == true, then show bot creation confirmation dialog //-with the given suggested_bot_username and suggested_bot_name. If user agrees, call createBot with via_link == true to create the bot //@manager_bot_username Username of the bot which will manage the new bot -//@suggested_bot_username Suggested username for the bot; always ends with "bot" case-insensitive +//@suggested_bot_username Suggested username for the bot; always ends with "bot" or a string from updateAllowedBotUsernamePremiumSuffixes case-insensitive //@suggested_bot_name Suggested name for the bot; may be empty if not specified internalLinkTypeRequestManagedBot manager_bot_username:string suggested_bot_username:string suggested_bot_name:string = InternalLinkType; @@ -9626,6 +9972,20 @@ internalLinkTypeTextCompositionStyle style_name:string = InternalLinkType; //@description The link is a link to a cloud theme. TDLib has no theme support yet @theme_name Name of the theme internalLinkTypeTheme theme_name:string = InternalLinkType; +//@description The link is a universal TON Connect link +//@version TON Connect version +//@dapp_client_id Hex-encoded public X25519 key of the dApp +//@connect_request TON Connect connect request +//@return_strategy Request return strategy; one of "back", "none", or a URL to open +//@rpc_request Embedded RPC request represented as base64url-encoded JSON +//@trace_id Identifier to trace the connection request +internalLinkTypeTonConnect version:int32 dapp_client_id:string connect_request:tonConnectConnectRequest return_strategy:string rpc_request:string trace_id:string = InternalLinkType; + +//@description The link is a link for sending Grams from the user's TON wallet +//@receiver Chosen receiver of the transfer; may be null if none +//@gram_amount The pre-filled amount of TON Grams to send; in the smallest units of the cryptocurrency +internalLinkTypeTonWalletTransfer receiver:TonWalletTransferReceiver gram_amount:int53 = InternalLinkType; + //@description The link is an unknown tg: link. Call getDeepLinkInfo to process the link @link Link to be passed to getDeepLinkInfo internalLinkTypeUnknownDeepLink link:string = InternalLinkType; @@ -10017,6 +10377,9 @@ suggestedActionCheckPhoneNumber = SuggestedAction; //@description Suggests the user to view a hint about the meaning of one and two check marks on sent messages suggestedActionViewChecksHint = SuggestedAction; +//@description Suggests the user to view a hint about receiving of the first TON wallet transfer +suggestedActionViewFirstTonWalletTransferHint = SuggestedAction; + //@description Suggests the user to convert specified supergroup to a broadcast group @supergroup_id Supergroup identifier suggestedActionConvertToBroadcastGroup supergroup_id:int53 = SuggestedAction; @@ -10245,7 +10608,7 @@ chatRevenueAmount cryptocurrency:string total_amount:int64 balance_amount:int64 //@revenue_by_hour_graph A graph containing amount of revenue in a given hour //@revenue_graph A graph containing amount of revenue //@revenue_amount Amount of earned revenue -//@usd_rate Current conversion rate of the cryptocurrency in which revenue is calculated to USD +//@usd_rate Current exchange rate of the cryptocurrency in which revenue is calculated to USD chatRevenueStatistics revenue_by_hour_graph:StatisticalGraph revenue_graph:StatisticalGraph revenue_amount:chatRevenueAmount usd_rate:double = ChatRevenueStatistics; //@description A detailed statistics about a message @@ -10324,7 +10687,7 @@ starRevenueStatus total_amount:starAmount current_amount:starAmount available_am //@description A detailed statistics about Telegram Stars earned by a user or a chat //@revenue_by_day_graph A graph containing amount of revenue in a given day //@status Telegram Star revenue status -//@usd_rate Current conversion rate of a Telegram Star to USD +//@usd_rate Current exchange rate of a Telegram Star to USD starRevenueStatistics revenue_by_day_graph:StatisticalGraph status:starRevenueStatus usd_rate:double = StarRevenueStatistics; //@description Contains information about TON Grams earned by the current user @@ -10337,7 +10700,7 @@ gramRevenueStatus total_amount:int64 balance_amount:int64 available_amount:int64 //@description A detailed statistics about TON Grams earned by the current user //@revenue_by_day_graph A graph containing amount of revenue in a given day //@status Amount of earned revenue -//@usd_rate Current conversion rate of nanogram to USD cents +//@usd_rate Current exchange rate of nanogram to USD cents gramRevenueStatistics revenue_by_day_graph:StatisticalGraph status:gramRevenueStatus usd_rate:double = GramRevenueStatistics; @@ -10771,7 +11134,7 @@ updateFile file:file = Update; //@original_path The original path specified by the application in inputFileGenerated //@destination_path The path to a file that must be created and where the new file must be generated by the application. //-If the application has no access to the path, it can use writeGeneratedFilePart to generate the file -//@conversion If the conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application. +//@conversion If the conversion is "#url#", then original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application. //-Otherwise, this is the conversion specified by the application in inputFileGenerated updateFileGenerationStart generation_id:int64 original_path:string destination_path:string conversion:string = Update; @@ -10918,6 +11281,10 @@ updateStoryListChatCount story_list:StoryList chat_count:int32 = Update; //@cooldown_until_date Point in time (Unix timestamp) when stealth mode can be enabled again; 0 if there is no active cooldown updateStoryStealthMode active_until_date:int32 cooldown_until_date:int32 = Update; +//@description Lists of suffixes allowed in secondary bot usernames, which can be added additionally to the main username if the bot's owner has a Telegram Premium subscription +//@suffixes The list of allowed suffixes +updateAllowedBotUsernamePremiumSuffixes suffixes:vector = Update; + //@description Lists of bots which Mini Apps must be allowed to read text from clipboard and must be opened without a warning //@bot_user_ids List of user identifiers of the bots; the corresponding users may not be sent using updateUser updates and may not be accessible updateTrustedMiniAppBots bot_user_ids:vector = Update; @@ -11024,6 +11391,18 @@ updateOwnedStarCount star_amount:starAmount = Update; //@description The number of TON Grams owned by the current user has changed @gram_amount The new amount of owned Grams; in the smallest units of the cryptocurrency updateOwnedGramCount gram_amount:int53 = Update; +//@description The state of the TON wallet of the current user has changed @state The new state of the wallet +updateTonWalletState state:tonWalletState = Update; + +//@description The information about gasless transfers has changed @info The new state of the wallet +updateTonWalletGaslessTransfersInfo info:tonWalletGaslessTransfersInfo = Update; + +//@description A session of a TON Connect has changed @session The new state of the session +updateTonWalletTonConnectSession session:tonConnectSession = Update; + +//@description TON Connect sessions must be disconnected in a regular way @session_ids Identifiers of the sessions +updateTonWalletTonConnectSessionDisconnectRequired session_ids:vector = Update; + //@description The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions //@chat_id Identifier of the chat //@revenue_amount New amount of earned revenue