Update to TDLib 1.8.47

This commit is contained in:
c0re100 2025-04-13 20:30:45 +08:00
parent 05b67218a9
commit c695d13f46
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 1664 additions and 249 deletions

File diff suppressed because it is too large Load diff

View file

@ -48,7 +48,7 @@ const (
ClassMessageReplyTo = "MessageReplyTo"
ClassInputMessageReplyTo = "InputMessageReplyTo"
ClassMessageSource = "MessageSource"
ClassReportChatSponsoredMessageResult = "ReportChatSponsoredMessageResult"
ClassReportSponsoredResult = "ReportSponsoredResult"
ClassNotificationSettingsScope = "NotificationSettingsScope"
ClassReactionNotificationSource = "ReactionNotificationSource"
ClassChatType = "ChatType"
@ -126,6 +126,7 @@ const (
ClassPremiumStoryFeature = "PremiumStoryFeature"
ClassPremiumSource = "PremiumSource"
ClassStorePaymentPurpose = "StorePaymentPurpose"
ClassStoreTransaction = "StoreTransaction"
ClassTelegramPaymentPurpose = "TelegramPaymentPurpose"
ClassDeviceToken = "DeviceToken"
ClassBackgroundFill = "BackgroundFill"
@ -227,6 +228,7 @@ const (
ClassBusinessRecipients = "BusinessRecipients"
ClassBusinessAwayMessageSettings = "BusinessAwayMessageSettings"
ClassBusinessGreetingMessageSettings = "BusinessGreetingMessageSettings"
ClassBusinessBotRights = "BusinessBotRights"
ClassBusinessConnectedBot = "BusinessConnectedBot"
ClassBusinessStartPage = "BusinessStartPage"
ClassInputBusinessStartPage = "InputBusinessStartPage"
@ -267,6 +269,8 @@ const (
ClassStarGiveawayWinnerOption = "StarGiveawayWinnerOption"
ClassStarGiveawayPaymentOption = "StarGiveawayPaymentOption"
ClassStarGiveawayPaymentOptions = "StarGiveawayPaymentOptions"
ClassAcceptedGiftTypes = "AcceptedGiftTypes"
ClassGiftSettings = "GiftSettings"
ClassUpgradedGiftModel = "UpgradedGiftModel"
ClassUpgradedGiftSymbol = "UpgradedGiftSymbol"
ClassUpgradedGiftBackdropColors = "UpgradedGiftBackdropColors"
@ -344,6 +348,8 @@ const (
ClassMessageSponsor = "MessageSponsor"
ClassSponsoredMessage = "SponsoredMessage"
ClassSponsoredMessages = "SponsoredMessages"
ClassSponsoredChat = "SponsoredChat"
ClassSponsoredChats = "SponsoredChats"
ClassReportOption = "ReportOption"
ClassFileDownload = "FileDownload"
ClassDownloadedFileCounts = "DownloadedFileCounts"
@ -630,6 +636,7 @@ const (
TypeTermsOfService = "termsOfService"
TypeAuthorizationStateWaitTdlibParameters = "authorizationStateWaitTdlibParameters"
TypeAuthorizationStateWaitPhoneNumber = "authorizationStateWaitPhoneNumber"
TypeAuthorizationStateWaitPremiumPurchase = "authorizationStateWaitPremiumPurchase"
TypeAuthorizationStateWaitEmailAddress = "authorizationStateWaitEmailAddress"
TypeAuthorizationStateWaitEmailCode = "authorizationStateWaitEmailCode"
TypeAuthorizationStateWaitCode = "authorizationStateWaitCode"
@ -722,6 +729,7 @@ const (
TypeBusinessRecipients = "businessRecipients"
TypeBusinessAwayMessageSettings = "businessAwayMessageSettings"
TypeBusinessGreetingMessageSettings = "businessGreetingMessageSettings"
TypeBusinessBotRights = "businessBotRights"
TypeBusinessConnectedBot = "businessConnectedBot"
TypeBusinessStartPage = "businessStartPage"
TypeInputBusinessStartPage = "inputBusinessStartPage"
@ -776,6 +784,8 @@ const (
TypeStarGiveawayWinnerOption = "starGiveawayWinnerOption"
TypeStarGiveawayPaymentOption = "starGiveawayPaymentOption"
TypeStarGiveawayPaymentOptions = "starGiveawayPaymentOptions"
TypeAcceptedGiftTypes = "acceptedGiftTypes"
TypeGiftSettings = "giftSettings"
TypeUpgradedGiftModel = "upgradedGiftModel"
TypeUpgradedGiftSymbol = "upgradedGiftSymbol"
TypeUpgradedGiftBackdropColors = "upgradedGiftBackdropColors"
@ -821,6 +831,8 @@ const (
TypeStarTransactionTypePaidMessageSend = "starTransactionTypePaidMessageSend"
TypeStarTransactionTypePaidMessageReceive = "starTransactionTypePaidMessageReceive"
TypeStarTransactionTypePremiumPurchase = "starTransactionTypePremiumPurchase"
TypeStarTransactionTypeBusinessBotTransferSend = "starTransactionTypeBusinessBotTransferSend"
TypeStarTransactionTypeBusinessBotTransferReceive = "starTransactionTypeBusinessBotTransferReceive"
TypeStarTransactionTypeUnsupported = "starTransactionTypeUnsupported"
TypeStarTransaction = "starTransaction"
TypeStarTransactions = "starTransactions"
@ -961,12 +973,14 @@ const (
TypeMessageSponsor = "messageSponsor"
TypeSponsoredMessage = "sponsoredMessage"
TypeSponsoredMessages = "sponsoredMessages"
TypeSponsoredChat = "sponsoredChat"
TypeSponsoredChats = "sponsoredChats"
TypeReportOption = "reportOption"
TypeReportChatSponsoredMessageResultOk = "reportChatSponsoredMessageResultOk"
TypeReportChatSponsoredMessageResultFailed = "reportChatSponsoredMessageResultFailed"
TypeReportChatSponsoredMessageResultOptionRequired = "reportChatSponsoredMessageResultOptionRequired"
TypeReportChatSponsoredMessageResultAdsHidden = "reportChatSponsoredMessageResultAdsHidden"
TypeReportChatSponsoredMessageResultPremiumRequired = "reportChatSponsoredMessageResultPremiumRequired"
TypeReportSponsoredResultOk = "reportSponsoredResultOk"
TypeReportSponsoredResultFailed = "reportSponsoredResultFailed"
TypeReportSponsoredResultOptionRequired = "reportSponsoredResultOptionRequired"
TypeReportSponsoredResultAdsHidden = "reportSponsoredResultAdsHidden"
TypeReportSponsoredResultPremiumRequired = "reportSponsoredResultPremiumRequired"
TypeFileDownload = "fileDownload"
TypeDownloadedFileCounts = "downloadedFileCounts"
TypeFoundFileDownloads = "foundFileDownloads"
@ -1338,6 +1352,8 @@ const (
TypeMessageGift = "messageGift"
TypeMessageUpgradedGift = "messageUpgradedGift"
TypeMessageRefundedUpgradedGift = "messageRefundedUpgradedGift"
TypeMessagePaidMessagesRefunded = "messagePaidMessagesRefunded"
TypeMessagePaidMessagePriceChanged = "messagePaidMessagePriceChanged"
TypeMessageContactRegistered = "messageContactRegistered"
TypeMessageUsersShared = "messageUsersShared"
TypeMessageChatShared = "messageChatShared"
@ -1771,6 +1787,8 @@ const (
TypeStorePaymentPurposeStarGiveaway = "storePaymentPurposeStarGiveaway"
TypeStorePaymentPurposeStars = "storePaymentPurposeStars"
TypeStorePaymentPurposeGiftedStars = "storePaymentPurposeGiftedStars"
TypeStoreTransactionAppStore = "storeTransactionAppStore"
TypeStoreTransactionGooglePlay = "storeTransactionGooglePlay"
TypeTelegramPaymentPurposePremiumGift = "telegramPaymentPurposePremiumGift"
TypeTelegramPaymentPurposePremiumGiftCodes = "telegramPaymentPurposePremiumGiftCodes"
TypeTelegramPaymentPurposePremiumGiveaway = "telegramPaymentPurposePremiumGiveaway"
@ -2215,6 +2233,7 @@ const (
TypeUpdateQuickReplyShortcuts = "updateQuickReplyShortcuts"
TypeUpdateQuickReplyShortcutMessages = "updateQuickReplyShortcutMessages"
TypeUpdateForumTopicInfo = "updateForumTopicInfo"
TypeUpdateForumTopic = "updateForumTopic"
TypeUpdateScopeNotificationSettings = "updateScopeNotificationSettings"
TypeUpdateReactionNotificationSettings = "updateReactionNotificationSettings"
TypeUpdateNotification = "updateNotification"
@ -2269,6 +2288,7 @@ const (
TypeUpdateProfileAccentColors = "updateProfileAccentColors"
TypeUpdateLanguagePackStrings = "updateLanguagePackStrings"
TypeUpdateConnectionState = "updateConnectionState"
TypeUpdateFreezeState = "updateFreezeState"
TypeUpdateTermsOfService = "updateTermsOfService"
TypeUpdateUnconfirmedSession = "updateUnconfirmedSession"
TypeUpdateAttachmentMenuBots = "updateAttachmentMenuBots"
@ -2532,9 +2552,9 @@ type MessageSource interface {
MessageSourceType() string
}
// Describes result of sponsored message report
type ReportChatSponsoredMessageResult interface {
ReportChatSponsoredMessageResultType() string
// Describes result of sponsored message or chat report
type ReportSponsoredResult interface {
ReportSponsoredResultType() string
}
// Describes the types of chats to which notification settings are relevant
@ -2922,6 +2942,11 @@ type StorePaymentPurpose interface {
StorePaymentPurposeType() string
}
// Describes an in-store transaction
type StoreTransaction interface {
StoreTransactionType() string
}
// Describes a purpose of a payment toward Telegram
type TelegramPaymentPurpose interface {
TelegramPaymentPurposeType() string
@ -3884,6 +3909,33 @@ func (*AuthorizationStateWaitPhoneNumber) AuthorizationStateType() string {
return TypeAuthorizationStateWaitPhoneNumber
}
// The user must buy Telegram Premium as an in-store purchase to log in. Call checkAuthenticationPremiumPurchase and then setAuthenticationPremiumPurchaseTransaction
type AuthorizationStateWaitPremiumPurchase struct {
meta
// Identifier of the store product that must be bought
StoreProductId string `json:"store_product_id"`
}
func (entity *AuthorizationStateWaitPremiumPurchase) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub AuthorizationStateWaitPremiumPurchase
return json.Marshal((*stub)(entity))
}
func (*AuthorizationStateWaitPremiumPurchase) GetClass() string {
return ClassAuthorizationState
}
func (*AuthorizationStateWaitPremiumPurchase) GetType() string {
return TypeAuthorizationStateWaitPremiumPurchase
}
func (*AuthorizationStateWaitPremiumPurchase) AuthorizationStateType() string {
return TypeAuthorizationStateWaitPremiumPurchase
}
// TDLib needs the user's email address to authorize. Call setAuthenticationEmailAddress to provide the email address, or directly call checkAuthenticationEmailCode with Apple ID/Google ID token if allowed
type AuthorizationStateWaitEmailAddress struct {
meta
@ -6771,6 +6823,55 @@ func (*BusinessGreetingMessageSettings) GetType() string {
return TypeBusinessGreetingMessageSettings
}
// Describes rights of a business bot
type BusinessBotRights struct {
meta
// True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours
CanReply bool `json:"can_reply"`
// True, if the bot can mark incoming private messages as read
CanReadMessages bool `json:"can_read_messages"`
// True, if the bot can delete sent messages
CanDeleteSentMessages bool `json:"can_delete_sent_messages"`
// True, if the bot can delete any message
CanDeleteAllMessages bool `json:"can_delete_all_messages"`
// True, if the bot can edit name of the business account
CanEditName bool `json:"can_edit_name"`
// True, if the bot can edit bio of the business account
CanEditBio bool `json:"can_edit_bio"`
// True, if the bot can edit profile photo of the business account
CanEditProfilePhoto bool `json:"can_edit_profile_photo"`
// True, if the bot can edit username of the business account
CanEditUsername bool `json:"can_edit_username"`
// True, if the bot can view gifts and amount of Telegram Stars owned by the business account
CanViewGiftsAndStars bool `json:"can_view_gifts_and_stars"`
// True, if the bot can sell regular gifts received by the business account
CanSellGifts bool `json:"can_sell_gifts"`
// True, if the bot can change gift receiving settings of the business account
CanChangeGiftSettings bool `json:"can_change_gift_settings"`
// True, if the bot can transfer and upgrade gifts received by the business account
CanTransferAndUpgradeGifts bool `json:"can_transfer_and_upgrade_gifts"`
// True, if the bot can transfer Telegram Stars received by the business account to account of the bot, or use them to upgrade and transfer gifts
CanTransferStars bool `json:"can_transfer_stars"`
// True, if the bot can send, edit and delete stories
CanManageStories bool `json:"can_manage_stories"`
}
func (entity *BusinessBotRights) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub BusinessBotRights
return json.Marshal((*stub)(entity))
}
func (*BusinessBotRights) GetClass() string {
return ClassBusinessBotRights
}
func (*BusinessBotRights) GetType() string {
return TypeBusinessBotRights
}
// Describes a bot connected to a business account
type BusinessConnectedBot struct {
meta
@ -6778,8 +6879,8 @@ type BusinessConnectedBot struct {
BotUserId int64 `json:"bot_user_id"`
// Private chats that will be accessible to the bot
Recipients *BusinessRecipients `json:"recipients"`
// True, if the bot can send messages to the private chats; false otherwise
CanReply bool `json:"can_reply"`
// Rights of the bot
Rights *BusinessBotRights `json:"rights"`
}
func (entity *BusinessConnectedBot) MarshalJSON() ([]byte, error) {
@ -8488,6 +8589,60 @@ func (*StarGiveawayPaymentOptions) GetType() string {
return TypeStarGiveawayPaymentOptions
}
// Describes gift types that are accepted by a user
type AcceptedGiftTypes struct {
meta
// True, if unlimited regular gifts are accepted
UnlimitedGifts bool `json:"unlimited_gifts"`
// True, if limited regular gifts are accepted
LimitedGifts bool `json:"limited_gifts"`
// True, if upgraded gifts and regular gifts that can be upgraded for free are accepted
UpgradedGifts bool `json:"upgraded_gifts"`
// True, if Telegram Premium subscription is accepted
PremiumSubscription bool `json:"premium_subscription"`
}
func (entity *AcceptedGiftTypes) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub AcceptedGiftTypes
return json.Marshal((*stub)(entity))
}
func (*AcceptedGiftTypes) GetClass() string {
return ClassAcceptedGiftTypes
}
func (*AcceptedGiftTypes) GetType() string {
return TypeAcceptedGiftTypes
}
// Contains settings for gift receiving for a user
type GiftSettings struct {
meta
// True, if a button for sending a gift to the user or by the user must always be shown in the input field
ShowGiftButton bool `json:"show_gift_button"`
// Types of gifts accepted by the user; for Telegram Premium users only
AcceptedGiftTypes *AcceptedGiftTypes `json:"accepted_gift_types"`
}
func (entity *GiftSettings) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub GiftSettings
return json.Marshal((*stub)(entity))
}
func (*GiftSettings) GetClass() string {
return ClassGiftSettings
}
func (*GiftSettings) GetType() string {
return TypeGiftSettings
}
// Describes a model of an upgraded gift
type UpgradedGiftModel struct {
meta
@ -8495,7 +8650,7 @@ type UpgradedGiftModel struct {
Name string `json:"name"`
// The sticker representing the upgraded gift
Sticker *Sticker `json:"sticker"`
// The number of upgraded gift that receive this model for each 1000 gifts upgraded
// The number of upgraded gifts that receive this model for each 1000 gifts upgraded
RarityPerMille int32 `json:"rarity_per_mille"`
}
@ -8520,9 +8675,9 @@ type UpgradedGiftSymbol struct {
meta
// Name of the symbol
Name string `json:"name"`
// The sticker representing the upgraded gift
// The sticker representing the symbol
Sticker *Sticker `json:"sticker"`
// The number of upgraded gift that receive this symbol for each 1000 gifts upgraded
// The number of upgraded gifts that receive this symbol for each 1000 gifts upgraded
RarityPerMille int32 `json:"rarity_per_mille"`
}
@ -8578,7 +8733,7 @@ type UpgradedGiftBackdrop struct {
Name string `json:"name"`
// Colors of the backdrop
Colors *UpgradedGiftBackdropColors `json:"colors"`
// The number of upgraded gift that receive this backdrop for each 1000 gifts upgraded
// The number of upgraded gifts that receive this backdrop for each 1000 gifts upgraded
RarityPerMille int32 `json:"rarity_per_mille"`
}
@ -8733,11 +8888,11 @@ type UpgradedGift struct {
MaxUpgradedCount int32 `json:"max_upgraded_count"`
// Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown
OwnerId MessageSender `json:"owner_id"`
// Address of the gift NFT owner in TON blockchain; may be empty if none
// Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address
OwnerAddress string `json:"owner_address"`
// Name of the owner for the case when owner identifier and address aren't known
OwnerName string `json:"owner_name"`
// Address of the gift NFT in TON blockchain; may be empty if none
// Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address
GiftAddress string `json:"gift_address"`
// Model of the upgraded gift
Model *UpgradedGiftModel `json:"model"`
@ -10072,7 +10227,7 @@ func (starTransactionTypePaidMessageReceive *StarTransactionTypePaidMessageRecei
return nil
}
// The transaction is a purchase of Telegram Premium subscription; for regular users only
// The transaction is a purchase of Telegram Premium subscription; for regular users and bots only
type StarTransactionTypePremiumPurchase struct {
meta
// Identifier of the user that received the Telegram Premium subscription
@ -10103,6 +10258,60 @@ func (*StarTransactionTypePremiumPurchase) StarTransactionTypeType() string {
return TypeStarTransactionTypePremiumPurchase
}
// The transaction is a transfer of Telegram Stars to a business bot; for regular users only
type StarTransactionTypeBusinessBotTransferSend struct {
meta
// Identifier of the bot that received Telegram Stars
UserId int64 `json:"user_id"`
}
func (entity *StarTransactionTypeBusinessBotTransferSend) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub StarTransactionTypeBusinessBotTransferSend
return json.Marshal((*stub)(entity))
}
func (*StarTransactionTypeBusinessBotTransferSend) GetClass() string {
return ClassStarTransactionType
}
func (*StarTransactionTypeBusinessBotTransferSend) GetType() string {
return TypeStarTransactionTypeBusinessBotTransferSend
}
func (*StarTransactionTypeBusinessBotTransferSend) StarTransactionTypeType() string {
return TypeStarTransactionTypeBusinessBotTransferSend
}
// The transaction is a transfer of Telegram Stars from a business account; for bots only
type StarTransactionTypeBusinessBotTransferReceive struct {
meta
// Identifier of the user that sent Telegram Stars
UserId int64 `json:"user_id"`
}
func (entity *StarTransactionTypeBusinessBotTransferReceive) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub StarTransactionTypeBusinessBotTransferReceive
return json.Marshal((*stub)(entity))
}
func (*StarTransactionTypeBusinessBotTransferReceive) GetClass() string {
return ClassStarTransactionType
}
func (*StarTransactionTypeBusinessBotTransferReceive) GetType() string {
return TypeStarTransactionTypeBusinessBotTransferReceive
}
func (*StarTransactionTypeBusinessBotTransferReceive) StarTransactionTypeType() string {
return TypeStarTransactionTypeBusinessBotTransferReceive
}
// The transaction is a transaction of an unsupported type
type StarTransactionTypeUnsupported struct{
meta
@ -11082,6 +11291,8 @@ type UserFullInfo struct {
IncomingPaidMessageStarCount int64 `json:"incoming_paid_message_star_count"`
// Number of Telegram Stars that must be paid by the current user for each sent message to the user
OutgoingPaidMessageStarCount int64 `json:"outgoing_paid_message_star_count"`
// Settings for gift receiving for the user
GiftSettings *GiftSettings `json:"gift_settings"`
// Information about verification status of the user provided by a bot; may be null if none or unknown
BotVerification *BotVerification `json:"bot_verification"`
// Information about business settings for Telegram Business accounts; may be null if none
@ -11128,6 +11339,7 @@ func (userFullInfo *UserFullInfo) UnmarshalJSON(data []byte) error {
GroupInCommonCount int32 `json:"group_in_common_count"`
IncomingPaidMessageStarCount int64 `json:"incoming_paid_message_star_count"`
OutgoingPaidMessageStarCount int64 `json:"outgoing_paid_message_star_count"`
GiftSettings *GiftSettings `json:"gift_settings"`
BotVerification *BotVerification `json:"bot_verification"`
BusinessInfo *BusinessInfo `json:"business_info"`
BotInfo *BotInfo `json:"bot_info"`
@ -11157,6 +11369,7 @@ func (userFullInfo *UserFullInfo) UnmarshalJSON(data []byte) error {
userFullInfo.GroupInCommonCount = tmp.GroupInCommonCount
userFullInfo.IncomingPaidMessageStarCount = tmp.IncomingPaidMessageStarCount
userFullInfo.OutgoingPaidMessageStarCount = tmp.OutgoingPaidMessageStarCount
userFullInfo.GiftSettings = tmp.GiftSettings
userFullInfo.BotVerification = tmp.BotVerification
userFullInfo.BusinessInfo = tmp.BusinessInfo
userFullInfo.BotInfo = tmp.BotInfo
@ -15072,6 +15285,58 @@ func (*SponsoredMessages) GetType() string {
return TypeSponsoredMessages
}
// Describes a sponsored chat
type SponsoredChat struct {
meta
// Unique identifier of this result
UniqueId int64 `json:"unique_id"`
// Chat identifier
ChatId int64 `json:"chat_id"`
// Additional optional information about the sponsor to be shown along with the chat
SponsorInfo string `json:"sponsor_info"`
// If non-empty, additional information about the sponsored chat to be shown along with the chat
AdditionalInfo string `json:"additional_info"`
}
func (entity *SponsoredChat) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub SponsoredChat
return json.Marshal((*stub)(entity))
}
func (*SponsoredChat) GetClass() string {
return ClassSponsoredChat
}
func (*SponsoredChat) GetType() string {
return TypeSponsoredChat
}
// Contains a list of sponsored chats
type SponsoredChats struct {
meta
// List of sponsored chats
Chats []*SponsoredChat `json:"chats"`
}
func (entity *SponsoredChats) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub SponsoredChats
return json.Marshal((*stub)(entity))
}
func (*SponsoredChats) GetClass() string {
return ClassSponsoredChats
}
func (*SponsoredChats) GetType() string {
return TypeSponsoredChats
}
// Describes an option to report an entity to Telegram
type ReportOption struct {
meta
@ -15098,57 +15363,57 @@ func (*ReportOption) GetType() string {
}
// The message was reported successfully
type ReportChatSponsoredMessageResultOk struct{
type ReportSponsoredResultOk struct{
meta
}
func (entity *ReportChatSponsoredMessageResultOk) MarshalJSON() ([]byte, error) {
func (entity *ReportSponsoredResultOk) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ReportChatSponsoredMessageResultOk
type stub ReportSponsoredResultOk
return json.Marshal((*stub)(entity))
}
func (*ReportChatSponsoredMessageResultOk) GetClass() string {
return ClassReportChatSponsoredMessageResult
func (*ReportSponsoredResultOk) GetClass() string {
return ClassReportSponsoredResult
}
func (*ReportChatSponsoredMessageResultOk) GetType() string {
return TypeReportChatSponsoredMessageResultOk
func (*ReportSponsoredResultOk) GetType() string {
return TypeReportSponsoredResultOk
}
func (*ReportChatSponsoredMessageResultOk) ReportChatSponsoredMessageResultType() string {
return TypeReportChatSponsoredMessageResultOk
func (*ReportSponsoredResultOk) ReportSponsoredResultType() string {
return TypeReportSponsoredResultOk
}
// The sponsored message is too old or not found
type ReportChatSponsoredMessageResultFailed struct{
type ReportSponsoredResultFailed struct{
meta
}
func (entity *ReportChatSponsoredMessageResultFailed) MarshalJSON() ([]byte, error) {
func (entity *ReportSponsoredResultFailed) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ReportChatSponsoredMessageResultFailed
type stub ReportSponsoredResultFailed
return json.Marshal((*stub)(entity))
}
func (*ReportChatSponsoredMessageResultFailed) GetClass() string {
return ClassReportChatSponsoredMessageResult
func (*ReportSponsoredResultFailed) GetClass() string {
return ClassReportSponsoredResult
}
func (*ReportChatSponsoredMessageResultFailed) GetType() string {
return TypeReportChatSponsoredMessageResultFailed
func (*ReportSponsoredResultFailed) GetType() string {
return TypeReportSponsoredResultFailed
}
func (*ReportChatSponsoredMessageResultFailed) ReportChatSponsoredMessageResultType() string {
return TypeReportChatSponsoredMessageResultFailed
func (*ReportSponsoredResultFailed) ReportSponsoredResultType() string {
return TypeReportSponsoredResultFailed
}
// The user must choose an option to report the message and repeat request with the chosen option
type ReportChatSponsoredMessageResultOptionRequired struct {
type ReportSponsoredResultOptionRequired struct {
meta
// Title for the option choice
Title string `json:"title"`
@ -15156,74 +15421,74 @@ type ReportChatSponsoredMessageResultOptionRequired struct {
Options []*ReportOption `json:"options"`
}
func (entity *ReportChatSponsoredMessageResultOptionRequired) MarshalJSON() ([]byte, error) {
func (entity *ReportSponsoredResultOptionRequired) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ReportChatSponsoredMessageResultOptionRequired
type stub ReportSponsoredResultOptionRequired
return json.Marshal((*stub)(entity))
}
func (*ReportChatSponsoredMessageResultOptionRequired) GetClass() string {
return ClassReportChatSponsoredMessageResult
func (*ReportSponsoredResultOptionRequired) GetClass() string {
return ClassReportSponsoredResult
}
func (*ReportChatSponsoredMessageResultOptionRequired) GetType() string {
return TypeReportChatSponsoredMessageResultOptionRequired
func (*ReportSponsoredResultOptionRequired) GetType() string {
return TypeReportSponsoredResultOptionRequired
}
func (*ReportChatSponsoredMessageResultOptionRequired) ReportChatSponsoredMessageResultType() string {
return TypeReportChatSponsoredMessageResultOptionRequired
func (*ReportSponsoredResultOptionRequired) ReportSponsoredResultType() string {
return TypeReportSponsoredResultOptionRequired
}
// Sponsored messages were hidden for the user in all chats
type ReportChatSponsoredMessageResultAdsHidden struct{
type ReportSponsoredResultAdsHidden struct{
meta
}
func (entity *ReportChatSponsoredMessageResultAdsHidden) MarshalJSON() ([]byte, error) {
func (entity *ReportSponsoredResultAdsHidden) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ReportChatSponsoredMessageResultAdsHidden
type stub ReportSponsoredResultAdsHidden
return json.Marshal((*stub)(entity))
}
func (*ReportChatSponsoredMessageResultAdsHidden) GetClass() string {
return ClassReportChatSponsoredMessageResult
func (*ReportSponsoredResultAdsHidden) GetClass() string {
return ClassReportSponsoredResult
}
func (*ReportChatSponsoredMessageResultAdsHidden) GetType() string {
return TypeReportChatSponsoredMessageResultAdsHidden
func (*ReportSponsoredResultAdsHidden) GetType() string {
return TypeReportSponsoredResultAdsHidden
}
func (*ReportChatSponsoredMessageResultAdsHidden) ReportChatSponsoredMessageResultType() string {
return TypeReportChatSponsoredMessageResultAdsHidden
func (*ReportSponsoredResultAdsHidden) ReportSponsoredResultType() string {
return TypeReportSponsoredResultAdsHidden
}
// The user asked to hide sponsored messages, but Telegram Premium is required for this
type ReportChatSponsoredMessageResultPremiumRequired struct{
type ReportSponsoredResultPremiumRequired struct{
meta
}
func (entity *ReportChatSponsoredMessageResultPremiumRequired) MarshalJSON() ([]byte, error) {
func (entity *ReportSponsoredResultPremiumRequired) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ReportChatSponsoredMessageResultPremiumRequired
type stub ReportSponsoredResultPremiumRequired
return json.Marshal((*stub)(entity))
}
func (*ReportChatSponsoredMessageResultPremiumRequired) GetClass() string {
return ClassReportChatSponsoredMessageResult
func (*ReportSponsoredResultPremiumRequired) GetClass() string {
return ClassReportSponsoredResult
}
func (*ReportChatSponsoredMessageResultPremiumRequired) GetType() string {
return TypeReportChatSponsoredMessageResultPremiumRequired
func (*ReportSponsoredResultPremiumRequired) GetType() string {
return TypeReportSponsoredResultPremiumRequired
}
func (*ReportChatSponsoredMessageResultPremiumRequired) ReportChatSponsoredMessageResultType() string {
return TypeReportChatSponsoredMessageResultPremiumRequired
func (*ReportSponsoredResultPremiumRequired) ReportSponsoredResultType() string {
return TypeReportSponsoredResultPremiumRequired
}
// Describes a file added to file download list
@ -18311,6 +18576,8 @@ func (*ForumTopicIcon) GetType() string {
// Contains basic information about a forum topic
type ForumTopicInfo struct {
meta
// Identifier of the forum chat to which the topic belongs
ChatId int64 `json:"chat_id"`
// Message thread identifier of the topic
MessageThreadId int64 `json:"message_thread_id"`
// Name of the topic
@ -18349,6 +18616,7 @@ func (*ForumTopicInfo) GetType() string {
func (forumTopicInfo *ForumTopicInfo) UnmarshalJSON(data []byte) error {
var tmp struct {
ChatId int64 `json:"chat_id"`
MessageThreadId int64 `json:"message_thread_id"`
Name string `json:"name"`
Icon *ForumTopicIcon `json:"icon"`
@ -18365,6 +18633,7 @@ func (forumTopicInfo *ForumTopicInfo) UnmarshalJSON(data []byte) error {
return err
}
forumTopicInfo.ChatId = tmp.ChatId
forumTopicInfo.MessageThreadId = tmp.MessageThreadId
forumTopicInfo.Name = tmp.Name
forumTopicInfo.Icon = tmp.Icon
@ -18387,6 +18656,8 @@ type ForumTopic struct {
Info *ForumTopicInfo `json:"info"`
// Last message in the topic; may be null if unknown
LastMessage *Message `json:"last_message"`
// A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order
Order JsonInt64 `json:"order"`
// True, if the topic is pinned in the topic list
IsPinned bool `json:"is_pinned"`
// Number of unread messages in the topic
@ -27826,6 +28097,62 @@ func (messageRefundedUpgradedGift *MessageRefundedUpgradedGift) UnmarshalJSON(da
return nil
}
// Paid messages were refunded
type MessagePaidMessagesRefunded struct {
meta
// The number of refunded messages
MessageCount int32 `json:"message_count"`
// The number of refunded Telegram Stars
StarCount int64 `json:"star_count"`
}
func (entity *MessagePaidMessagesRefunded) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub MessagePaidMessagesRefunded
return json.Marshal((*stub)(entity))
}
func (*MessagePaidMessagesRefunded) GetClass() string {
return ClassMessageContent
}
func (*MessagePaidMessagesRefunded) GetType() string {
return TypeMessagePaidMessagesRefunded
}
func (*MessagePaidMessagesRefunded) MessageContentType() string {
return TypeMessagePaidMessagesRefunded
}
// A price for paid messages was changed in the supergroup chat
type MessagePaidMessagePriceChanged struct {
meta
// The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
PaidMessageStarCount int64 `json:"paid_message_star_count"`
}
func (entity *MessagePaidMessagePriceChanged) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub MessagePaidMessagePriceChanged
return json.Marshal((*stub)(entity))
}
func (*MessagePaidMessagePriceChanged) GetClass() string {
return ClassMessageContent
}
func (*MessagePaidMessagePriceChanged) GetType() string {
return TypeMessagePaidMessagePriceChanged
}
func (*MessagePaidMessagePriceChanged) MessageContentType() string {
return TypeMessagePaidMessagePriceChanged
}
// A contact has registered with Telegram
type MessageContactRegistered struct{
meta
@ -35953,8 +36280,8 @@ type BusinessConnection struct {
UserChatId int64 `json:"user_chat_id"`
// Point in time (Unix timestamp) when the connection was established
Date int32 `json:"date"`
// True, if the bot can send messages to the connected user; false otherwise
CanReply bool `json:"can_reply"`
// Rights of the bot; may be null if the connection was disabled
Rights *BusinessBotRights `json:"rights"`
// True, if the connection is enabled; false otherwise
IsEnabled bool `json:"is_enabled"`
}
@ -42212,10 +42539,68 @@ func (*StorePaymentPurposeGiftedStars) StorePaymentPurposeType() string {
return TypeStorePaymentPurposeGiftedStars
}
// A purchase through App Store
type StoreTransactionAppStore struct {
meta
// App Store receipt
Receipt []byte `json:"receipt"`
}
func (entity *StoreTransactionAppStore) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub StoreTransactionAppStore
return json.Marshal((*stub)(entity))
}
func (*StoreTransactionAppStore) GetClass() string {
return ClassStoreTransaction
}
func (*StoreTransactionAppStore) GetType() string {
return TypeStoreTransactionAppStore
}
func (*StoreTransactionAppStore) StoreTransactionType() string {
return TypeStoreTransactionAppStore
}
// A purchase through Google Play
type StoreTransactionGooglePlay struct {
meta
// Application package name
PackageName string `json:"package_name"`
// Identifier of the purchased store product
StoreProductId string `json:"store_product_id"`
// Google Play purchase token
PurchaseToken string `json:"purchase_token"`
}
func (entity *StoreTransactionGooglePlay) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub StoreTransactionGooglePlay
return json.Marshal((*stub)(entity))
}
func (*StoreTransactionGooglePlay) GetClass() string {
return ClassStoreTransaction
}
func (*StoreTransactionGooglePlay) GetType() string {
return TypeStoreTransactionGooglePlay
}
func (*StoreTransactionGooglePlay) StoreTransactionType() string {
return TypeStoreTransactionGooglePlay
}
// The user gifting Telegram Premium to another user
type TelegramPaymentPurposePremiumGift struct {
meta
// ISO 4217 currency code of the payment currency
// ISO 4217 currency code of the payment currency, or "XTR" for payments in Telegram Stars
Currency string `json:"currency"`
// Paid amount, in the smallest units of the currency
Amount int64 `json:"amount"`
@ -46578,7 +46963,7 @@ type NewChatPrivacySettings struct {
meta
// True, if non-contacts users are able to write first to the current user. Telegram Premium subscribers are able to write first regardless of this setting
AllowNewChatsFromUnknownUsers bool `json:"allow_new_chats_from_unknown_users"`
// Number of Telegram Stars that must be paid for every incoming private message by non-contacts; 0-getOption("paid_message_star_count_max"). If positive, then allow_new_chats_from_unknown_users must be true. The current user will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending
// Number of Telegram Stars that must be paid for every incoming private message by non-contacts; 0-getOption("paid_message_star_count_max"). If positive, then allow_new_chats_from_unknown_users must be true. The current user will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending. Can be positive, only if getOption("can_enable_paid_messages") is true
IncomingPaidMessageStarCount int64 `json:"incoming_paid_message_star_count"`
}
@ -55269,8 +55654,6 @@ func (*UpdateQuickReplyShortcutMessages) UpdateType() string {
// Basic information about a topic in a forum chat was changed
type UpdateForumTopicInfo struct {
meta
// Chat identifier
ChatId int64 `json:"chat_id"`
// New information about the topic
Info *ForumTopicInfo `json:"info"`
}
@ -55295,6 +55678,41 @@ func (*UpdateForumTopicInfo) UpdateType() string {
return TypeUpdateForumTopicInfo
}
// Information about a topic in a forum chat was changed
type UpdateForumTopic struct {
meta
// Chat identifier
ChatId int64 `json:"chat_id"`
// Message thread identifier of the topic
MessageThreadId int64 `json:"message_thread_id"`
// True, if the topic is pinned in the topic list
IsPinned bool `json:"is_pinned"`
// Identifier of the last read outgoing message
LastReadOutboxMessageId int64 `json:"last_read_outbox_message_id"`
// Notification settings for the topic
NotificationSettings *ChatNotificationSettings `json:"notification_settings"`
}
func (entity *UpdateForumTopic) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub UpdateForumTopic
return json.Marshal((*stub)(entity))
}
func (*UpdateForumTopic) GetClass() string {
return ClassUpdate
}
func (*UpdateForumTopic) GetType() string {
return TypeUpdateForumTopic
}
func (*UpdateForumTopic) UpdateType() string {
return TypeUpdateForumTopic
}
// Notification settings for some type of chats were updated
type UpdateScopeNotificationSettings struct {
meta
@ -57166,6 +57584,39 @@ func (updateConnectionState *UpdateConnectionState) UnmarshalJSON(data []byte) e
return nil
}
// The freeze state of the current user's account has changed
type UpdateFreezeState struct {
meta
// True, if the account is frozen
IsFrozen bool `json:"is_frozen"`
// Point in time (Unix timestamp) when the account was frozen; 0 if the account isn't frozen
FreezingDate int32 `json:"freezing_date"`
// Point in time (Unix timestamp) when the account will be deleted and can't be unfrozen; 0 if the account isn't frozen
DeletionDate int32 `json:"deletion_date"`
// The link to open to send an appeal to unfreeze the account
AppealLink string `json:"appeal_link"`
}
func (entity *UpdateFreezeState) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub UpdateFreezeState
return json.Marshal((*stub)(entity))
}
func (*UpdateFreezeState) GetClass() string {
return ClassUpdate
}
func (*UpdateFreezeState) GetType() string {
return TypeUpdateFreezeState
}
func (*UpdateFreezeState) UpdateType() string {
return TypeUpdateFreezeState
}
// New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason "Decline ToS update"
type UpdateTermsOfService struct {
meta

View file

@ -151,6 +151,9 @@ func UnmarshalAuthorizationState(data json.RawMessage) (AuthorizationState, erro
case TypeAuthorizationStateWaitPhoneNumber:
return UnmarshalAuthorizationStateWaitPhoneNumber(data)
case TypeAuthorizationStateWaitPremiumPurchase:
return UnmarshalAuthorizationStateWaitPremiumPurchase(data)
case TypeAuthorizationStateWaitEmailAddress:
return UnmarshalAuthorizationStateWaitEmailAddress(data)
@ -931,6 +934,12 @@ func UnmarshalStarTransactionType(data json.RawMessage) (StarTransactionType, er
case TypeStarTransactionTypePremiumPurchase:
return UnmarshalStarTransactionTypePremiumPurchase(data)
case TypeStarTransactionTypeBusinessBotTransferSend:
return UnmarshalStarTransactionTypeBusinessBotTransferSend(data)
case TypeStarTransactionTypeBusinessBotTransferReceive:
return UnmarshalStarTransactionTypeBusinessBotTransferReceive(data)
case TypeStarTransactionTypeUnsupported:
return UnmarshalStarTransactionTypeUnsupported(data)
@ -1707,7 +1716,7 @@ func UnmarshalListOfMessageSource(dataList []json.RawMessage) ([]MessageSource,
return list, nil
}
func UnmarshalReportChatSponsoredMessageResult(data json.RawMessage) (ReportChatSponsoredMessageResult, error) {
func UnmarshalReportSponsoredResult(data json.RawMessage) (ReportSponsoredResult, error) {
var meta meta
err := json.Unmarshal(data, &meta)
@ -1716,31 +1725,31 @@ func UnmarshalReportChatSponsoredMessageResult(data json.RawMessage) (ReportChat
}
switch meta.Type {
case TypeReportChatSponsoredMessageResultOk:
return UnmarshalReportChatSponsoredMessageResultOk(data)
case TypeReportSponsoredResultOk:
return UnmarshalReportSponsoredResultOk(data)
case TypeReportChatSponsoredMessageResultFailed:
return UnmarshalReportChatSponsoredMessageResultFailed(data)
case TypeReportSponsoredResultFailed:
return UnmarshalReportSponsoredResultFailed(data)
case TypeReportChatSponsoredMessageResultOptionRequired:
return UnmarshalReportChatSponsoredMessageResultOptionRequired(data)
case TypeReportSponsoredResultOptionRequired:
return UnmarshalReportSponsoredResultOptionRequired(data)
case TypeReportChatSponsoredMessageResultAdsHidden:
return UnmarshalReportChatSponsoredMessageResultAdsHidden(data)
case TypeReportSponsoredResultAdsHidden:
return UnmarshalReportSponsoredResultAdsHidden(data)
case TypeReportChatSponsoredMessageResultPremiumRequired:
return UnmarshalReportChatSponsoredMessageResultPremiumRequired(data)
case TypeReportSponsoredResultPremiumRequired:
return UnmarshalReportSponsoredResultPremiumRequired(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfReportChatSponsoredMessageResult(dataList []json.RawMessage) ([]ReportChatSponsoredMessageResult, error) {
list := []ReportChatSponsoredMessageResult{}
func UnmarshalListOfReportSponsoredResult(dataList []json.RawMessage) ([]ReportSponsoredResult, error) {
list := []ReportSponsoredResult{}
for _, data := range dataList {
entity, err := UnmarshalReportChatSponsoredMessageResult(data)
entity, err := UnmarshalReportSponsoredResult(data)
if err != nil {
return nil, err
}
@ -3507,6 +3516,12 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
case TypeMessageRefundedUpgradedGift:
return UnmarshalMessageRefundedUpgradedGift(data)
case TypeMessagePaidMessagesRefunded:
return UnmarshalMessagePaidMessagesRefunded(data)
case TypeMessagePaidMessagePriceChanged:
return UnmarshalMessagePaidMessagePriceChanged(data)
case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data)
@ -5772,6 +5787,40 @@ func UnmarshalListOfStorePaymentPurpose(dataList []json.RawMessage) ([]StorePaym
return list, nil
}
func UnmarshalStoreTransaction(data json.RawMessage) (StoreTransaction, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeStoreTransactionAppStore:
return UnmarshalStoreTransactionAppStore(data)
case TypeStoreTransactionGooglePlay:
return UnmarshalStoreTransactionGooglePlay(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfStoreTransaction(dataList []json.RawMessage) ([]StoreTransaction, error) {
list := []StoreTransaction{}
for _, data := range dataList {
entity, err := UnmarshalStoreTransaction(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalTelegramPaymentPurpose(data json.RawMessage) (TelegramPaymentPurpose, error) {
var meta meta
@ -8153,6 +8202,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateForumTopicInfo:
return UnmarshalUpdateForumTopicInfo(data)
case TypeUpdateForumTopic:
return UnmarshalUpdateForumTopic(data)
case TypeUpdateScopeNotificationSettings:
return UnmarshalUpdateScopeNotificationSettings(data)
@ -8315,6 +8367,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateConnectionState:
return UnmarshalUpdateConnectionState(data)
case TypeUpdateFreezeState:
return UnmarshalUpdateFreezeState(data)
case TypeUpdateTermsOfService:
return UnmarshalUpdateTermsOfService(data)
@ -8697,6 +8752,14 @@ func UnmarshalAuthorizationStateWaitPhoneNumber(data json.RawMessage) (*Authoriz
return &resp, err
}
func UnmarshalAuthorizationStateWaitPremiumPurchase(data json.RawMessage) (*AuthorizationStateWaitPremiumPurchase, error) {
var resp AuthorizationStateWaitPremiumPurchase
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAuthorizationStateWaitEmailAddress(data json.RawMessage) (*AuthorizationStateWaitEmailAddress, error) {
var resp AuthorizationStateWaitEmailAddress
@ -9433,6 +9496,14 @@ func UnmarshalBusinessGreetingMessageSettings(data json.RawMessage) (*BusinessGr
return &resp, err
}
func UnmarshalBusinessBotRights(data json.RawMessage) (*BusinessBotRights, error) {
var resp BusinessBotRights
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalBusinessConnectedBot(data json.RawMessage) (*BusinessConnectedBot, error) {
var resp BusinessConnectedBot
@ -9865,6 +9936,22 @@ func UnmarshalStarGiveawayPaymentOptions(data json.RawMessage) (*StarGiveawayPay
return &resp, err
}
func UnmarshalAcceptedGiftTypes(data json.RawMessage) (*AcceptedGiftTypes, error) {
var resp AcceptedGiftTypes
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalGiftSettings(data json.RawMessage) (*GiftSettings, error) {
var resp GiftSettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpgradedGiftModel(data json.RawMessage) (*UpgradedGiftModel, error) {
var resp UpgradedGiftModel
@ -10225,6 +10312,22 @@ func UnmarshalStarTransactionTypePremiumPurchase(data json.RawMessage) (*StarTra
return &resp, err
}
func UnmarshalStarTransactionTypeBusinessBotTransferSend(data json.RawMessage) (*StarTransactionTypeBusinessBotTransferSend, error) {
var resp StarTransactionTypeBusinessBotTransferSend
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionTypeBusinessBotTransferReceive(data json.RawMessage) (*StarTransactionTypeBusinessBotTransferReceive, error) {
var resp StarTransactionTypeBusinessBotTransferReceive
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionTypeUnsupported(data json.RawMessage) (*StarTransactionTypeUnsupported, error) {
var resp StarTransactionTypeUnsupported
@ -11345,6 +11448,22 @@ func UnmarshalSponsoredMessages(data json.RawMessage) (*SponsoredMessages, error
return &resp, err
}
func UnmarshalSponsoredChat(data json.RawMessage) (*SponsoredChat, error) {
var resp SponsoredChat
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalSponsoredChats(data json.RawMessage) (*SponsoredChats, error) {
var resp SponsoredChats
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalReportOption(data json.RawMessage) (*ReportOption, error) {
var resp ReportOption
@ -11353,40 +11472,40 @@ func UnmarshalReportOption(data json.RawMessage) (*ReportOption, error) {
return &resp, err
}
func UnmarshalReportChatSponsoredMessageResultOk(data json.RawMessage) (*ReportChatSponsoredMessageResultOk, error) {
var resp ReportChatSponsoredMessageResultOk
func UnmarshalReportSponsoredResultOk(data json.RawMessage) (*ReportSponsoredResultOk, error) {
var resp ReportSponsoredResultOk
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalReportChatSponsoredMessageResultFailed(data json.RawMessage) (*ReportChatSponsoredMessageResultFailed, error) {
var resp ReportChatSponsoredMessageResultFailed
func UnmarshalReportSponsoredResultFailed(data json.RawMessage) (*ReportSponsoredResultFailed, error) {
var resp ReportSponsoredResultFailed
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalReportChatSponsoredMessageResultOptionRequired(data json.RawMessage) (*ReportChatSponsoredMessageResultOptionRequired, error) {
var resp ReportChatSponsoredMessageResultOptionRequired
func UnmarshalReportSponsoredResultOptionRequired(data json.RawMessage) (*ReportSponsoredResultOptionRequired, error) {
var resp ReportSponsoredResultOptionRequired
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalReportChatSponsoredMessageResultAdsHidden(data json.RawMessage) (*ReportChatSponsoredMessageResultAdsHidden, error) {
var resp ReportChatSponsoredMessageResultAdsHidden
func UnmarshalReportSponsoredResultAdsHidden(data json.RawMessage) (*ReportSponsoredResultAdsHidden, error) {
var resp ReportSponsoredResultAdsHidden
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalReportChatSponsoredMessageResultPremiumRequired(data json.RawMessage) (*ReportChatSponsoredMessageResultPremiumRequired, error) {
var resp ReportChatSponsoredMessageResultPremiumRequired
func UnmarshalReportSponsoredResultPremiumRequired(data json.RawMessage) (*ReportSponsoredResultPremiumRequired, error) {
var resp ReportSponsoredResultPremiumRequired
err := json.Unmarshal(data, &resp)
@ -14361,6 +14480,22 @@ func UnmarshalMessageRefundedUpgradedGift(data json.RawMessage) (*MessageRefunde
return &resp, err
}
func UnmarshalMessagePaidMessagesRefunded(data json.RawMessage) (*MessagePaidMessagesRefunded, error) {
var resp MessagePaidMessagesRefunded
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessagePaidMessagePriceChanged(data json.RawMessage) (*MessagePaidMessagePriceChanged, error) {
var resp MessagePaidMessagePriceChanged
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
var resp MessageContactRegistered
@ -17825,6 +17960,22 @@ func UnmarshalStorePaymentPurposeGiftedStars(data json.RawMessage) (*StorePaymen
return &resp, err
}
func UnmarshalStoreTransactionAppStore(data json.RawMessage) (*StoreTransactionAppStore, error) {
var resp StoreTransactionAppStore
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoreTransactionGooglePlay(data json.RawMessage) (*StoreTransactionGooglePlay, error) {
var resp StoreTransactionGooglePlay
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalTelegramPaymentPurposePremiumGift(data json.RawMessage) (*TelegramPaymentPurposePremiumGift, error) {
var resp TelegramPaymentPurposePremiumGift
@ -21377,6 +21528,14 @@ func UnmarshalUpdateForumTopicInfo(data json.RawMessage) (*UpdateForumTopicInfo,
return &resp, err
}
func UnmarshalUpdateForumTopic(data json.RawMessage) (*UpdateForumTopic, error) {
var resp UpdateForumTopic
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateScopeNotificationSettings(data json.RawMessage) (*UpdateScopeNotificationSettings, error) {
var resp UpdateScopeNotificationSettings
@ -21809,6 +21968,14 @@ func UnmarshalUpdateConnectionState(data json.RawMessage) (*UpdateConnectionStat
return &resp, err
}
func UnmarshalUpdateFreezeState(data json.RawMessage) (*UpdateFreezeState, error) {
var resp UpdateFreezeState
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateTermsOfService(data json.RawMessage) (*UpdateTermsOfService, error) {
var resp UpdateTermsOfService
@ -22341,6 +22508,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeAuthorizationStateWaitPhoneNumber:
return UnmarshalAuthorizationStateWaitPhoneNumber(data)
case TypeAuthorizationStateWaitPremiumPurchase:
return UnmarshalAuthorizationStateWaitPremiumPurchase(data)
case TypeAuthorizationStateWaitEmailAddress:
return UnmarshalAuthorizationStateWaitEmailAddress(data)
@ -22617,6 +22787,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeBusinessGreetingMessageSettings:
return UnmarshalBusinessGreetingMessageSettings(data)
case TypeBusinessBotRights:
return UnmarshalBusinessBotRights(data)
case TypeBusinessConnectedBot:
return UnmarshalBusinessConnectedBot(data)
@ -22779,6 +22952,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStarGiveawayPaymentOptions:
return UnmarshalStarGiveawayPaymentOptions(data)
case TypeAcceptedGiftTypes:
return UnmarshalAcceptedGiftTypes(data)
case TypeGiftSettings:
return UnmarshalGiftSettings(data)
case TypeUpgradedGiftModel:
return UnmarshalUpgradedGiftModel(data)
@ -22914,6 +23093,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStarTransactionTypePremiumPurchase:
return UnmarshalStarTransactionTypePremiumPurchase(data)
case TypeStarTransactionTypeBusinessBotTransferSend:
return UnmarshalStarTransactionTypeBusinessBotTransferSend(data)
case TypeStarTransactionTypeBusinessBotTransferReceive:
return UnmarshalStarTransactionTypeBusinessBotTransferReceive(data)
case TypeStarTransactionTypeUnsupported:
return UnmarshalStarTransactionTypeUnsupported(data)
@ -23334,23 +23519,29 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeSponsoredMessages:
return UnmarshalSponsoredMessages(data)
case TypeSponsoredChat:
return UnmarshalSponsoredChat(data)
case TypeSponsoredChats:
return UnmarshalSponsoredChats(data)
case TypeReportOption:
return UnmarshalReportOption(data)
case TypeReportChatSponsoredMessageResultOk:
return UnmarshalReportChatSponsoredMessageResultOk(data)
case TypeReportSponsoredResultOk:
return UnmarshalReportSponsoredResultOk(data)
case TypeReportChatSponsoredMessageResultFailed:
return UnmarshalReportChatSponsoredMessageResultFailed(data)
case TypeReportSponsoredResultFailed:
return UnmarshalReportSponsoredResultFailed(data)
case TypeReportChatSponsoredMessageResultOptionRequired:
return UnmarshalReportChatSponsoredMessageResultOptionRequired(data)
case TypeReportSponsoredResultOptionRequired:
return UnmarshalReportSponsoredResultOptionRequired(data)
case TypeReportChatSponsoredMessageResultAdsHidden:
return UnmarshalReportChatSponsoredMessageResultAdsHidden(data)
case TypeReportSponsoredResultAdsHidden:
return UnmarshalReportSponsoredResultAdsHidden(data)
case TypeReportChatSponsoredMessageResultPremiumRequired:
return UnmarshalReportChatSponsoredMessageResultPremiumRequired(data)
case TypeReportSponsoredResultPremiumRequired:
return UnmarshalReportSponsoredResultPremiumRequired(data)
case TypeFileDownload:
return UnmarshalFileDownload(data)
@ -24465,6 +24656,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageRefundedUpgradedGift:
return UnmarshalMessageRefundedUpgradedGift(data)
case TypeMessagePaidMessagesRefunded:
return UnmarshalMessagePaidMessagesRefunded(data)
case TypeMessagePaidMessagePriceChanged:
return UnmarshalMessagePaidMessagePriceChanged(data)
case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data)
@ -25764,6 +25961,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStorePaymentPurposeGiftedStars:
return UnmarshalStorePaymentPurposeGiftedStars(data)
case TypeStoreTransactionAppStore:
return UnmarshalStoreTransactionAppStore(data)
case TypeStoreTransactionGooglePlay:
return UnmarshalStoreTransactionGooglePlay(data)
case TypeTelegramPaymentPurposePremiumGift:
return UnmarshalTelegramPaymentPurposePremiumGift(data)
@ -27096,6 +27299,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateForumTopicInfo:
return UnmarshalUpdateForumTopicInfo(data)
case TypeUpdateForumTopic:
return UnmarshalUpdateForumTopic(data)
case TypeUpdateScopeNotificationSettings:
return UnmarshalUpdateScopeNotificationSettings(data)
@ -27258,6 +27464,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateConnectionState:
return UnmarshalUpdateConnectionState(data)
case TypeUpdateFreezeState:
return UnmarshalUpdateFreezeState(data)
case TypeUpdateTermsOfService:
return UnmarshalUpdateTermsOfService(data)